Hello Guys
I am trying to model the following optimization problem but I am getting the following errors:
52 Endogenous $-control operations not allowed
256 Error(s) in analyzing solve statement. More detail appears
Below the solve statement above
299 Unexpected end of file
This is the code:
set
j /L1*L6/
k /t1*t24/
j1 /L1*L3/
j2 /L4*L6/
Table OT(j,*)
p s f r
L1 750 17 24 2
L2 700 15 20 3
L3 600 15 24 2
L4 400 15 24 10
L5 150 1 24 24
L6 150 16 18 3;
Table c(k,*)
m n t d u
t1 10.1 1 22 24 1
t2 10.1 2 22 1 1
t3 10.1 3 21 2 1
t4 10.1 4 21 3 1
t5 10.1 5 21 4 1
t6 10.1 6 20 5 1
t7 10.1 7 21 6 0
t8 14.4 8 22 7 0
t9 14.4 9 23 8 0
t10 14.4 10 24 9 0
t11 14.4 11 24 10 0
t12 20.8 12 25 11 0
t13 20.8 13 25 12 0
t14 20.8 14 25 13 0
t15 20.8 15 24 14 0
t16 20.8 16 23 15 1
t17 20.8 17 23 16 1
t18 14.4 18 22 17 1
t19 14.4 19 21 18 1
t20 10.1 20 21 19 1
t21 10.1 21 21 20 1
t22 10.1 22 20 21 1
t23 10.1 23 20 22 1
t24 10.1 24 20 23 1;
variable f, T(k), p(k);
T.up(k)=26;
T.lo(k)=19;
binary variable u(j,k);
equations eq1, eq2, eq3, eq4, eq5, eq6;
eq1(j) .. sum(k,u(j,k))=e= OT(j,'r');
eq2(j,k) $(c(k,'n') > OT(j,'f')) .. u(j,k) =e= 0 ;
eq3(j,k) $(c(k,'n') < OT(j,'s')) .. u(j,k) =e= 0;
eq4(k) $(T(k) < c(k,'t')) .. T(k) =e= 0.08*T(k-1) + (1-0.08)*(c(k,'t')-0.05*p(k)/0.026);
eq5(k) $(T(k) > c(k,'t')) .. T(k) =e= 0.08*T(k-1) + (1-0.08)*(c(k,'t')+0.05*p(k)/0.026);
eq6 .. f =e= sum((j,k),c(k,'m')*OT(j,'p')*u(j,k)) + sum(k,c(k,'m')*p(k)*c(k,'u'));
model base /all/;
Solve base min f using MINLP