Page 1 of 1

Model Debugging

Posted: Fri Jan 06, 2023 10:51 am
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 89 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.

Re: Model Debugging

Posted: Sat Jan 14, 2023 9:15 am
by Mensh95
Dear All,

I'll appreciate any guidance on the above topic.

Best Regards
Omar

Re: Model Debugging

Posted: Mon Jan 16, 2023 8:58 pm
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 "∈".

Re: Model Debugging

Posted: Tue Jan 17, 2023 10:59 am
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

Re: Model Debugging

Posted: Tue Jan 24, 2023 8:45 am
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 117 times