Hello,
I am quite new in programming gams and I need a MIP version of the following equation:
equation eq;
eq.. F =e= rel_le(c,1)*0.9
+rel_gt(c,1)*rel_lt(c,4)*(0.8+0.1*(4-c)/3)
+rel_ge(c,4)*0.8;
So: F is 0.8 for c = 1 or lower and 0.9 for c= 4 or higher, linear between.
I would be so happy to receive help! Thank you!
MIP equation for "lower equal", "greater equal", "lower then" and "greater then"
Re: MIP equation for "lower equal", "greater equal", "lower then" and "greater then"
This is a classic example for piece-wise linear functions. There are many ways to formulate this, see e.g. https://www.gams.com/latest/gamslib_ml/ ... nspwl.html. If your c is bounded, then I would go for the binary formulation (trnsdiscB).
Have fun.
-Michael
Have fun.
-Michael