Infeasible,no solution exist MIP using CPLEX

Problems with modeling
Post Reply
MUNARITA
User
User
Posts: 2
Joined: 8 months ago

Infeasible,no solution exist MIP using CPLEX

Post by MUNARITA » 2 weeks ago

Hello all,

Please, I am in dire need of urgent help as I have spent quite large amount of time trying to make this model to work but all my effort is futile.
I honestly cannot figure out what am not doing correctly or even how to fix it.

My code just keep giving an infeasible solution.

Pls,can experts in the house check my code for me. Attached are my code and input data. The model in equation form which I am trying to reproduce can be found on pages 7-16 of the attached paper.

Thanks guys for your help.

Muna
Attachments
Paper.pdf
(8.57 MiB) Downloaded 9 times
ProjectDATA.xlsx
(64.31 KiB) Downloaded 7 times
Infeasible model.gms
(16.24 KiB) Downloaded 9 times

User avatar
Renger
Posts: 87
Joined: 1 year ago

Re: Infeasible,no solution exist MIP using CPLEX

Post by Renger » 2 weeks ago

Hi
I don't have the time to check your equations, but I noticed that if you solve the model as an LP model by changing to binary to normal variables, the model solves, but no investment in new diesel generators.
Perhaps this might help in detecting the problem
Cheers
Renger

MUNARITA
User
User
Posts: 2
Joined: 8 months ago

Re: Infeasible,no solution exist MIP using CPLEX

Post by MUNARITA » 2 weeks ago

Hi,

Thanks Renger for your reply.I was able to get a feasible solution with the MIP when I increased the existing generator available hours (GH).However, once I reduce it so that the old generators can not meet the load alone, instead of the new generators to dispatch, it doesn't. Instead it gives an infeasible solution. Pls, can you check why the model refuses to allow investment in the new diesel generators.

Thanks!

Muna

Fred
Posts: 11
Joined: 1 year ago

Re: Infeasible,no solution exist MIP using CPLEX

Post by Fred » 2 weeks ago

Munarita,

A good idea, when implementing a new model is usually to look at the equation listing to make sure that you really modeled the equations properly. A frequent source of errors are for example lag and lead operators and that might be an issue in your model too. Looking for example at constraint ComND(nD,y,h)

ComND(nD,y,h).. CapnD(nD,y,h) + NCAnD(nD,y,h) =E= CapnD(nD,y,h+1);

it seems that you might have made a mistake.
For the last h which is '288' the following equation is generated (because there is no h+1):

ComND(1,1,288).. CapnD(1,1,288) + NCAnD(1,1,288) =E= 0 ; (LHS = 0)

Apparently, that forces CapnD(1,1,288) = NCAnD(1,1,288) = 0; Now that carries forward (or backward) through other equations because in consequence

ComND(1,1,287).. CapnD(1,1,287) - CapnD(1,1,288) + NCAnD(1,1,287) =E= 0 ;

enforces CapnD(1,1,287)=NCAnD(1,1,287)=0 etc.

There might be a similar problem in

SComND(nD,y,h).. CapnD(nD,y,'288') + NCAnD(nD,y,'288') =E= CapnD(nD,y+1,'1') $ ((ord(y) ge 3) and (ord(y)lt 20));

where for the last y='20' this equation reads

SComND(1,20,1).. CapnD(1,20,288) + NCAnD(1,20,288) =E= 0 ; (LHS = 0)

You may want to reformulate the equation definitions as follows

ComND(nD,y,h)$(ord(h)<card(h)).. CapnD(nD,y,h) + NCAnD(nD,y,h) =E= CapnD(nD,y,h+1);
SComND(nD,y,h)$(ord(y)<=3 and ord(y)<card(y)).. CapnD(nD,y,'288') + NCAnD(nD,y,'288') =E= CapnD(nD,y+1,'1') ;

After making those changes I get at least a feasible solution (see attached log). However, no one else but you will be able to guarantee that your model is correct. I suggest to thoroughly go through the equation listing and make sure that the actual model fits your intentions.

I hope this helps!

Fred
Attachments
Infeasible model.log
(12.35 KiB) Downloaded 6 times

Post Reply