Hello,
Good time.
I wrote a source code, but I can not solve with the GAMS software and I encounter the following messages:
Integer infeasible
CPLEX error 1217: No solution exists
MIP status (119) is integer infeasible or unbounded
This project is simple and should be solved by this powerful software.
I searched a lot to solve this problem, but I did not get any results.
This project is important to me.
Help me please. I do not know where the problem can be?
I've added the project as an attachment.
Thanks.
Having trouble with GAMS

 User
 Posts: 3
 Joined: 2 years ago
Having trouble with GAMS
 Attachments

 model 2 int  appli.gms
 (3.83 KiB) Downloaded 124 times

 User
 Posts: 85
 Joined: 2 years ago
Re: Having trouble with GAMS
You can set solver to Cplex.
creat 2 option files cplex.opt/cplex.op2. cplex.opt is for BCCf1, and cplex.op2 is for BCCf2.
In cplex.opt,
if they are still infeasible.
use cplex to check the infeasibility.
run cplex in command line of your computer,
then it will give your the minimum number of conflict constraints.
Hope it works for you!
Code: Select all
Option mip =cplex;
BCCf1.optfile = 1;
BCCf2.optfile = 2;
In cplex.opt,
In cplex.op2,writelp BCCf1.lp
after you get the lp files, test them only for a single iteration.writelp BCCf2.lp
if they are still infeasible.
use cplex to check the infeasibility.
run cplex in command line of your computer,
Code: Select all
cplex
read BCCf1.lp
tools conflict
Hope it works for you!

 User
 Posts: 3
 Joined: 2 years ago
Re: Having trouble with GAMS
Hello,
thank you.
Sorry... .
But I could not solve the problem. Unfortunately, I do not know exactly where to put the solution that you have been told. Please guide me further.
thank you.
Sorry... .
But I could not solve the problem. Unfortunately, I do not know exactly where to put the solution that you have been told. Please guide me further.
Re: Having trouble with GAMS
Hi,
I can help you with getting the various analysis tools the solvers offer to run, but you need to analyze the output and modify the model yourself. There are three ways of analyzing infeasibilities that I find helpful:
1) Since you are convinced that the model has a feasible point, provide it in the variable attribute .l (x.l = ... before the solve, turn the equation listing all on (option limrow=1e9;) and solve. Check the equation listing for INFES in the equation listing to see where your "feasible" solution is actually infeasible.
2) Automatic relaxation. You can find a minimal relaxation of your infeasible model by allowing bounds and constraints to be violated. You can give different weights to the bounds and constraints and even do not allow to violate some bounds and constraint. This all can be accomplished by adding slack variables to your model and the slacks into the objective with different weights. Some solver, like Cplex, have an option to do this automatically (see https://www.gams.com/latest/docs/S_CPLE ... RELAXATION).
3) Use the conflict refiner (suggested by the previous answer). Just supply the "iis yes" in an option file and look at the listing file to get the smallest set of constraints and bounds that make the problem infeasible. In your case the set is rather larger and hence the tool is not that useful.
You find a nice writeup by Bruce McCarl about how to deal with infeasible models in the 40th issues of his newsletter in chapter 3: https://www.gams.com/fileadmin/communit ... news40.pdf.
I modified your GAMS program so it stops in the first iteration. No point in solving hundreds of models when you are debugging. I also create the necessary option files as part of the program.
Michael
I can help you with getting the various analysis tools the solvers offer to run, but you need to analyze the output and modify the model yourself. There are three ways of analyzing infeasibilities that I find helpful:
1) Since you are convinced that the model has a feasible point, provide it in the variable attribute .l (x.l = ... before the solve, turn the equation listing all on (option limrow=1e9;) and solve. Check the equation listing for INFES in the equation listing to see where your "feasible" solution is actually infeasible.
2) Automatic relaxation. You can find a minimal relaxation of your infeasible model by allowing bounds and constraints to be violated. You can give different weights to the bounds and constraints and even do not allow to violate some bounds and constraint. This all can be accomplished by adding slack variables to your model and the slacks into the objective with different weights. Some solver, like Cplex, have an option to do this automatically (see https://www.gams.com/latest/docs/S_CPLE ... RELAXATION).
3) Use the conflict refiner (suggested by the previous answer). Just supply the "iis yes" in an option file and look at the listing file to get the smallest set of constraints and bounds that make the problem infeasible. In your case the set is rather larger and hence the tool is not that useful.
You find a nice writeup by Bruce McCarl about how to deal with infeasible models in the 40th issues of his newsletter in chapter 3: https://www.gams.com/fileadmin/communit ... news40.pdf.
I modified your GAMS program so it stops in the first iteration. No point in solving hundreds of models when you are debugging. I also create the necessary option files as part of the program.
Michael
 Attachments

 model 2 int  appli_mrb.gms
 (4.01 KiB) Downloaded 87 times