![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
#include <cp_constraints.h>
Public Member Functions | |
GreaterThanAtLeastOneOfPropagator (IntegerVariable target_var, absl::Span< const AffineExpression > exprs, absl::Span< const Literal > selectors, absl::Span< const Literal > enforcements, Model *model) | |
GreaterThanAtLeastOneOfPropagator (const GreaterThanAtLeastOneOfPropagator &)=delete | |
This type is neither copyable nor movable. | |
GreaterThanAtLeastOneOfPropagator & | operator= (const GreaterThanAtLeastOneOfPropagator &)=delete |
bool | Propagate () final |
void | RegisterWith (GenericLiteralWatcher *watcher) |
void | Explain (int id, IntegerValue propagation_slack, IntegerVariable var_to_explain, int trail_index, std::vector< Literal > *literals_reason, std::vector< int > *trail_indices_reason) final |
For LazyReasonInterface. | |
![]() | |
PropagatorInterface ()=default | |
virtual | ~PropagatorInterface ()=default |
virtual bool | IncrementalPropagate (const std::vector< int > &) |
![]() | |
LazyReasonInterface ()=default | |
virtual | ~LazyReasonInterface ()=default |
If we have:
This constraint take care of this case when no selectors[i] is chosen yet.
This constraint support duplicate selectors.
Definition at line 71 of file cp_constraints.h.
operations_research::sat::GreaterThanAtLeastOneOfPropagator::GreaterThanAtLeastOneOfPropagator | ( | IntegerVariable | target_var, |
absl::Span< const AffineExpression > | exprs, | ||
absl::Span< const Literal > | selectors, | ||
absl::Span< const Literal > | enforcements, | ||
Model * | model ) |
Definition at line 82 of file cp_constraints.cc.
|
delete |
This type is neither copyable nor movable.
|
finalvirtual |
For LazyReasonInterface.
If the level zero bounds is good enough, no reason needed.
Implements operations_research::sat::LazyReasonInterface.
Definition at line 93 of file cp_constraints.cc.
|
delete |
|
finalvirtual |
This will be called after one or more literals that are watched by this propagator changed. It will also always be called on the first propagation cycle after registration.
Compute the min of the lower-bound for the still possible variables.
The permutation is needed to have proper lazy reason.
Abort if we can't get a better bound.
All false, conflit.
Implements operations_research::sat::PropagatorInterface.
Definition at line 122 of file cp_constraints.cc.
void operations_research::sat::GreaterThanAtLeastOneOfPropagator::RegisterWith | ( | GenericLiteralWatcher * | watcher | ) |
Definition at line 174 of file cp_constraints.cc.