SETS:

dmu:lambda;

inp;

out;

inpdata(inp,dmu):X;
outdata(out,dmu):Y;

ENDSETS

DATA:

dmunumber=5;
dmu=1..dmunumber;

inpnumber=3;
inp=1..inpnumber;

outnumber=4;
out=1..outnumber;

X=
8 7 8 8 9
5 4 7 6 3 
4 3 2 3 2
;

Y=
7 8 9 3 5
3 4 3 4 4
6 7 6 5 3
1 2 4 1 1
;

unit=1;

ENDDATA

! input oriented;
min=theta;
@FOR(inp(i):@SUM(dmu(k): lambda(k)*X(i,k)) < theta * X(i,unit) );
@FOR(out(j):@SUM(dmu(k): lambda(k)*Y(j,k)) > Y(j,unit) );

! output oriented ;
!max=phi;
!@FOR(inp(i):@SUM(dmu(k): lambda(k)*X(i,k)) <  X(i,unit) );
!@FOR(out(j):@SUM(dmu(k): lambda(k)*Y(j,k)) > phi* Y(j,unit) );

@SUM(dmu(k):lambda(k))=1;