Search found 1 match

by Aathira01
2 years ago
Forum: Modeling
Topic: Linear constraint
Replies: 0
Views: 5113

Linear constraint

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