Model Debugging

Problems with modeling
Post Reply
Mensh95
User
User
Posts: 15
Joined: 1 year ago

Model Debugging

Post by Mensh95 »

Dear All,

I wrote the attached model below, but I got an infeasible integer solution and am working on debugging the model.
Thesis Model Replication.gms
(9.78 KiB) Downloaded 74 times
In the pre-solve stage, I got the below error.
image.png
So, I thought I was missing indicating in the constraint that (j, i)∈A_j^- and j ∈ S. My question is, how to write these two conditions in the constraint?
image.png
But when I'm using the dollar option, it gives me error 148.
image.png
Would someone help me to solve this condition?

I really appreciate any help you can provide.
Mensh95
User
User
Posts: 15
Joined: 1 year ago

Re: Model Debugging

Post by Mensh95 »

Dear All,

I'll appreciate any guidance on the above topic.

Best Regards
Omar
player
User
User
Posts: 8
Joined: 3 years ago

Re: Model Debugging

Post by player »

I couldn't be familiar in your code, but, as I know, if you want to use a set indices in the $ condition, you should use with "ord".
For example;

Code: Select all

sum(i$(ord(AMinus) > 5), x(i,j)) .....etc
Because you defined "AMinus" as a set. (but, still, I am not quite sure this is what you mean)
But, I dont know how you can write the condition for "∈".
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Model Debugging

Post by bussieck »

Send you entire model, so we can reproduce. Looking at the equation in isolation makes no sense. We don't even know what Aminus is in your code. -Michael
Mensh95
User
User
Posts: 15
Joined: 1 year ago

Re: Model Debugging

Post by Mensh95 »

I added it in the first post, but kindly find it attached

Thanks for your support
Thesis Model Replication.gms
(9.8 KiB) Downloaded 98 times
Post Reply