Hey folks,
I am currently working on a GAMS-implementation for my work at University. Since this is my first time working with GAMS I would really appreciate your help!
Enough chitchat:
I am trying to work out a way to implement a Big-M restriction and for some reason, I just can’t get it to work. I’ll post the work that I have accomplished so far, ignore the german notes haha…
My BigM Restrictions are in Lines 71-73, 97-107 and 139-141 .
Basically, this is what I want to do: BigM =g= max(sum((t), DP(t)), sum((t), DR(t)), sum((t), OU(t))) , but no matter what code I try, i always get a malfunctioning code… Maybe my code itself is wrong, or am i just missing something… The version attached to this thread has BigM-settings set to 999999999999, just because its the only way I get this to work …
Any suggestions?
It is not clear what you are trying to do. It would also be useful for the users to know what you mean by ‘malfunctioning code’
As for big-M values, it looks like you would want to have p(t) to be 0 when deltao(t) is 0 and less than bigMP when deltap is 1. By this definition, you would want value of bigmp to be the upper bound on p(t).
Similarly, bigmr to be upper bound on r(t), bigmd to be upper bound on d(t) and so on.
With that in mind, values like 9999999999999 make sense only if these represent the upper bounds. It should be noted that GAMS allows you to define numbers such 1e10. This might help you in having a neat representation.
I don’t understand what you mean by “BigM =g= max(sum((t), DP(t)), sum((t), DR(t)), sum((t), OU(t)))” but as long as the above conditions are satisfied, your formulation should behave as expected.
Hope this helps.