CPLEX error 1217

Problems with syntax of GAMS
Post Reply
mjavadm
User
User
Posts: 6
Joined: 3 years ago

CPLEX error 1217

Post by mjavadm »

Hello everyone.
I am working on a project and the file is attached here. I am using MIP programaming and cplex. unfortunately, the code does not work properly and there is no solution. I know in some equations there is INFES output, however, I do not know what is the reason. I would be thankful if you can guide me to fix the problem. the code is attached here
Untitled_10.gms
(6.7 KiB) Downloaded 108 times
image.png
Attachments
Untitled_10.gms
(6.7 KiB) Downloaded 113 times
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: CPLEX error 1217

Post by bussieck »

Infeasible models are no errors (The "Cplex Error 1217: No solution exists" is an unfortunate by-product of an API call in the GAMS/Cplex link that can't be supressed, but it's fine). It's a valid state for an optimization model (besides optimal and unbounded). If you are interested in the cause of the infeasibility there are multiple methods, just search this forum for "infeasible". I used IIS for you model and there is a single constraint gen5(1,1) that causes one infeasibility. Gen5(1,1) looks as follows (from the GAMS Equation Listing):

Code: Select all

gen5(1,1)..  alpha(1,2,1) + alpha(2,2,1) + alpha(3,2,1) + alpha(4,2,1) =G= 5 ;
Alpha is a binary variable, so adding just four binaries will never be greater or equal 5. If you overcome this issue, there might be many more. You need to learn how to deal with infeasibilities.

-Michael
mjavadm
User
User
Posts: 6
Joined: 3 years ago

Re: CPLEX error 1217

Post by mjavadm »

Thanks, dear bussieck for your response. I am reading the related issues here and trying to find my mistakes. I have only one more question. you mentioned about IIS method to find the infeasibly. could you pls explain a little more about it or give me some references for it?
Post Reply