Page 1 of 1

BigM formulation

Posted: Wed Aug 04, 2021 1:08 pm
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 132 times
. Thanks in advance!

Kind regards,
David

Re: BigM formulation

Posted: Thu Aug 05, 2021 12:57 pm
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 155 times

Re: BigM formulation

Posted: Fri Aug 06, 2021 6:19 pm
by David123
Thanks a lot for sharing codes and most importantly explaining the codes!

Kind regards,
Rofice