Hello all!
I want to create a variable in GAMS that returns the feasibility of the solution. For example, say the variable is 'b', and once the solution is completed, I want b=1 if the solution is feasible, and b=0 if infeasible. Is there any way to do that?
Thanks in advance!
Infeasibility as a variable
Re: Infeasibility as a variable
Hi
You can save the solve status in a parameter.
Have a look at the solvestat possible values here.
Cheers
Renger
You can save the solve status in a parameter.
Code: Select all
b = mymodel.solvestat;
Cheers
Renger
____________________________________
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Enjoy modeling even more: Read my blog on modeling at The lazy economist
Re: Infeasibility as a variable
Awesome, thank you Renger!Renger wrote: ↑3 years ago Hi
You can save the solve status in a parameter.
Have a look at the solvestat possible values here.Code: Select all
b = mymodel.solvestat;
Cheers
Renger