this is what I would like (but donìt work because i can't do single dimension table)
Code: Select all
SET
order/i1*i5/;
PARAMETERS timeproduction(order)/i1 3,i2 4,i3 5,i4 4,i5 6/ ;
SCALAR capacity/10/;
TABLE
costset(order ,order)
i1 i2 i3 i4 i5
i1 1000 2 3 4 5
i2 1 1000 3 4 5
i3 1 3 1000 4 5
i4 1 2 3 1000 4
i5 1 2 3 4 1000;
VARIABLES x(order,order),costset,ccap,costot; INTEGER VARIABLE x;
x.up(ordini,cic) = 1;
equations ob,ob2,ob3;
ob.. costset=e=sum((order,order), costset(order ,order)*x(order,order));
ob2.. ccap=e= (capacity - sum((order), timeproduction(order)*x(order,order))*100; '100 is a cost factor for capacity inutilization
ob3.. costot =e= costset + ccap;
MODEL trasp/all/;OPTIONS mip=cplex,optcr=0.0;
SOLVE trasp USING mip MINIMIZING ttot;
sorry for the great amount of concettual errors, but I know little gams and coding in general