How to build a model which involves several complicated situations by using command "implies"or any commands #1325
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
It is unclear which implies operator is causing your crash as you've supplied a complex piece of code and not simplified for support But generally, you should always strive to code as explicit disjunction implies(binary1,something)+implies(binary2,something)...+[binary1+binary2+...==1] Pattern implies(something,something else) or implies(something, binary) is supported but advised against Pattern implies(something nonlinear,whatever) is probably not supported at all |
Beta Was this translation helpful? Give feedback.
-
There is another question, if case1 == 1, then a+b+c must be equal to 3, then “whatever” will be true, right? Similarly, if case2 is true, a+b+c<=2 must also be true, and then The expression is also true (although it will not be true, because what I want to get is a+b+c==3, which leads to case2==0 must be true), am I right to understand this? |
Beta Was this translation helpful? Give feedback.
You can never have a+b+c==3 and case2 true at the same time. That is the whole idea with the disjunction,. Only one out of the two things can happen, and exactly one will have to hold
[a+b+c ==3 , whatever]
[a+b+c <=2 , whateverthenifanything]