BigM formulation Topic is solved

Problems with modeling
Post Reply
David123
User
User
Posts: 6
Joined: 2 years ago

BigM formulation

Post by David123 »

Dear all,

I am trying to model a situation, x1(t) = f(t) when f(t) >= 200, otherwise x1(t) = 0, where x1, x2, and f are variables.

I am not sure how to do this in GAMS. It will be a big help if someone can help me with correcting codes in the attached toy problem
Untitled_78.gms
(1.08 KiB) Downloaded 128 times
. Thanks in advance!

Kind regards,
David
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: BigM formulation

Post by bussieck »

Does not look like that you are struggling with the GAMS syntax, more the logical stuff. I have attached a model that does what you ask for. Be sure you understand the point about implication of f<200 => y=0 and equivalence f<200 <=> y=0 and the requirement to have the equation eq1x in the model or not.

Hope this helps,
-Michael
new1.gms
(1.77 KiB) Downloaded 151 times
David123
User
User
Posts: 6
Joined: 2 years ago

Re: BigM formulation

Post by David123 »

Thanks a lot for sharing codes and most importantly explaining the codes!

Kind regards,
Rofice
Post Reply