CPLEX Error 1217

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 KB)
Would someone help me with this issue?

I appreciate any help you can provide.

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:

Row 'C3(r1)' infeasible, all entries at implied bounds.

The iis gives you:

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

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

It is well documented in gams solver usage.
https://www.gams.com/latest/docs/UG_SolverUsage.html#BASIC_USAGE_SOLVER_OPTION_FILE

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

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

.optfile=1;

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

  • Atharv