CPLEX Error 1217 Topic is solved

Solver related questions
Post Reply
Mensh95
User
User
Posts: 15
Joined: 1 year ago

CPLEX Error 1217

Post by Mensh95 »

Hi,

I tried to run my model but always got an infeasible solution. I searched on the forum about that error and found that I need to use option IIS to debug my model. Also, I checked every single post and CPLEX option to know how to conduct this option, but I couldn't know how to use that option in my model.
Thesis Model Replication.gms
(5.48 KiB) Downloaded 115 times
Would someone help me with this issue?

I appreciate any help you can provide.
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: CPLEX Error 1217

Post by bussieck »

You can ignore the error 1217. The GAMS link makes a call to Cplex to retrieve (the infeasible) "solution" and that fails, because the infeasibility was detected during presolve. Even without the iis the log gives you good information:

Code: Select all

Row 'C3(r1)' infeasible, all entries at implied bounds.
The iis gives you:

Code: Select all

Number of equations in conflict: 3
lower: C3(r1) > 2.1
upper: C5(x1,r1) < 0
upper: C6(r1,t1) < 0.4

Number of variables in conflict: 3
lower: x(x3,r1) > 0
lower: x(x4,r1) > 0
lower: x(x5,r1) > 0
That should allow you to find the infeasibility.

-Michael
Mensh95
User
User
Posts: 15
Joined: 1 year ago

Re: CPLEX Error 1217

Post by Mensh95 »

Hi,

Thanks a lot for your quick reply.

Also, I would like to know how did you use the IIS option or how to use any option in CPLEX?

I checked the available solver manual, but i could understand how to use the option in my code.

Thanks in advance
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Re: CPLEX Error 1217

Post by abhosekar »

It is well documented in gams solver usage.
https://www.gams.com/latest/docs/UG_Sol ... PTION_FILE

copy the following lines of code anywhere in your gams file.

Code: Select all

$onecho > cplex.opt
iis 1
$offecho
This will create the options file. You can then tell the solver to look for option file by writing the following statement before solve.

<modelname>.optfile=1;

where <modelname> is your modelname. So if your model name is x, you should have x.optfile=1;

- Atharv
Post Reply