How do I model conditional constraints in YALMIP? #1435
-
Dear sir! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
correct: implies(x<=y,z>=w2); |
Beta Was this translation helpful? Give feedback.
-
Binary implications should simply be written as Disjoints constraints should always explicitly be made disjoint, as solvers easily can see two disjoint constraints to be active/inactive due to numerical tolerances, i.e.
for two binary variables case1 and case2 |
Beta Was this translation helpful? Give feedback.
You define case1 and case2 as binary variables, and as only one of them can be true, the two disjoint cases you list cannot occur at the same time but one has to occur (and of course you will have to add an eps in some direction if you have that as you cannot work with strict cases)