Skip to content

Instantly share code, notes, and snippets.

@mhsharifi96
Last active August 23, 2020 16:36
Show Gist options
  • Save mhsharifi96/f1a4118b59501b6831c287c1967f9c46 to your computer and use it in GitHub Desktop.
Save mhsharifi96/f1a4118b59501b6831c287c1967f9c46 to your computer and use it in GitHub Desktop.
BCC model output Oriented lingo code
! BCC model input Oriented lingo code ;
!write by mohammad hossein sharifi Aug 2020;
model:
sets:
dmu/1..10/; !10 dmu;
input/1..4/:v; !4 input;
output/1..3/:u; !3 output ;
link(input,dmu):x; !xij 10*4;
linke(output,dmu):y; !yrj 3*10;
endsets
!add data ;
data:
x y=@ole('C:\Users\mohammad hossein\Documents\vru\lingo\code\book.xlsx','x','y');
enddata
!formula;
max=@sum(output(r):u(r)*y(r,o))+w;
@sum(input(i):v(i)*x(i,o))=1;
@for(dmu(j):@sum(output(r):u(r)*y(r,j))-@sum(input(i):v(i)*x(i,j))+w<=0);
@free(w);
calc:
@for(dmu(j):o=j;
@solve();
);
endcalc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment