Add possibility of divisor spanning zero #3207
|
What language and solver does this apply to? Describe the problem you are trying to solve. Describe the solution you'd like Describe alternatives you've considered Additional context |
Replies: 2 comments 1 reply
|
Noted. It will not happen soon. You can emulate it by looking at: or-tools/ortools/sat/cp_model_expand.cc Line 255 in b37d9c7 Roughly speaking, divide the domain of the divisor in 2 (< 0, >0). Create one BoolVar b, link it to the 2 side of the domains. |
|
I have just pushed the code for that. Never too late :-) |
Noted.
It will not happen soon.
You can emulate it by looking at:
or-tools/ortools/sat/cp_model_expand.cc
Line 255 in b37d9c7
Roughly speaking,
divide the domain of the divisor in 2 (< 0, >0). Create one BoolVar b, link it to the 2 side of the domains.
Create 2 temp divisor variables (pos_div, neg_div), 2 temp target variable (pos_target, neg_target).