google / or-tools

Google's Operations Research tools:
https://developers.google.com/optimization/
Apache License 2.0
11k stars 2.11k forks source link

Indicator constraint for constraint programming #2043

Closed sreyas7 closed 4 years ago

sreyas7 commented 4 years ago

using ORTools v7+ in Python on Windows 10

solvers like CPLEX have an indicator function which sets enforces a constraint only if it satisfies a boolean condition, but I couldn't find any function in ORTools CP-SAT.

Please reference it, if it is present.

Thanks, Sreyas

lperron commented 4 years ago

Modeling questions should be asked on the mailing list.

The answer is here: https://github.com/google/or-tools/blob/master/ortools/sat/doc/channeling.md