Skip to content
Discussion options

You must be logged in to vote

Noted.

It will not happen soon.

You can emulate it by looking at:

void ExpandIntProdWithOneAcrossZero(int a_ref, int b_ref, int product_ref,

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

b implies divisor > 0
b implies pos_divisor == divisor
b implies neg_divisor == -1  # or max of the negative part of the divisor domain
add_division_equality(pos_target, numerator, pos_divisor)

not(b) implies divisor < 0
not(b) implies neg_divisor =…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@snedeljkovic
Comment options

Answer selected by snedeljkovic
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Missing Feature/Wrapper Solver: CP-SAT Solver Relates to the CP-SAT solver
2 participants
Converted from issue

This discussion was converted from issue #3206 on March 27, 2022 15:11.