Infeasible Solution

Hello Everyone,

I have the following 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), z(j,k);

T.up(k)=26;
T.lo(k)=19;

binary variable u(j,k);

equations eq1, eq2, eq3, eq4, eq5, eq6, eq7;
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) =e= 0.08*T(k-1) + (1-0.08)*(c(k,'t')-0.05*p(k)/0.026);
eq5(j,k)  .. z(j,k) =e= u(j,k) - u(j,k--1);
eq6(j) .. sum(k,abs(z(j,k)))  =e= 2;

eq7 .. 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

I am stuck with this solution report:

**** SOLVER STATUS     1 Normal Completion         
**** MODEL STATUS      19 Infeasible - No Solution

Any suggestion to overcome this error and get a solution?

An infeasible model is a normal outcome for optimization, so this is no error. Nevertheless, it often points to an issue in the implementation or the data, since the real world is normally not infeasible. There are many different ways to detect the cause of infeasibilities. Search the forum and you find many pointers. Key for all ways is a good knowledge of your model and data, so you are in the best position to fix this. Some methodical procedures identify, e.g. the smallest subset of constraints and bounds that already show the infeasibiliy (known as IIS). Here is Baron’s output for an IIS on your model. Something with L5 does seem right.

An IIS is a set equations and variables (i.e., a submodel) which is
infeasible but becomes feasible if any one equation or variable bound
is dropped.

A problem may contain several independent IISs. Only one IIS will be
found per run. Alternative IISs may be obtained by using different
values of the CompIIS option in BARON.

Number of equations in the IIS:  26.
Both: eq5(L5,t1) = 0
Both: eq5(L5,t2) = 0
Both: eq5(L5,t3) = 0
Both: eq5(L5,t4) = 0
Both: eq5(L5,t5) = 0
Both: eq5(L5,t6) = 0
Both: eq5(L5,t7) = 0
Both: eq5(L5,t8) = 0
Both: eq5(L5,t9) = 0
Both: eq5(L5,t10) = 0
Both: eq5(L5,t11) = 0
Both: eq5(L5,t12) = 0
Both: eq5(L5,t13) = 0
Both: eq5(L5,t14) = 0
Both: eq5(L5,t15) = 0
Both: eq5(L5,t16) = 0
Both: eq5(L5,t17) = 0
Both: eq5(L5,t18) = 0
Both: eq5(L5,t19) = 0
Both: eq5(L5,t20) = 0
Both: eq5(L5,t21) = 0
Both: eq5(L5,t22) = 0
Both: eq5(L5,t23) = 0
Both: eq5(L5,t24) = 0
Lower: eq6(L5) >= 2
Lower: eq1(L5) >= 24

Number of variables in the IIS:  0.

You problem is small enough that you can provide manually a “feasible” solution by setting the variable.l suffix. The Equation listing in the listing file will show you which constraints for infeasible for your “feasible” solution.

Good luck,
-Michael