Page 1 of 1

Linear constraint

Posted: Tue May 03, 2022 1:46 pm
by Aathira01
Hi!
How can be write the following if else statements containing decision variable as linear constraints?

Here x is a the decision variable.

if (((x>=0) and (x<=0.5)), y= a1;
else if((x>=0.5) and (x<=1)), y=a2;
else if((x>=1) and (x<=1.5)), y=a2;
else y=a2;
);