Linear constraint

Problems with modeling
Post Reply
Aathira01
User
User
Posts: 1
Joined: 1 year ago

Linear constraint

Post 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;
);
Post Reply