![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Specialized circuit constraint.
This constraint allows adding arcs to the multiple circuit constraint incrementally.
Definition at line 605 of file cp_model.h.
#include <cp_model.h>
Public Member Functions | |
| void | AddArc (int tail, int head, BoolVar literal) |
| Public Member Functions inherited from operations_research::sat::Constraint | |
| Constraint | OnlyEnforceIf (absl::Span< const BoolVar > literals) |
| Constraint | OnlyEnforceIf (BoolVar literal) |
| See OnlyEnforceIf(absl::Span<const BoolVar> literals). | |
| Constraint | WithName (absl::string_view name) |
| Sets the name of the constraint. | |
| absl::string_view | Name () const |
| Returns the name of the constraint (or the empty string if not set). | |
| const ConstraintProto & | Proto () const |
| Returns the underlying protobuf object (useful for testing). | |
| ConstraintProto * | MutableProto () const |
| Returns the mutable underlying protobuf object (useful for model edition). | |
Friends | |
| class | CpModelBuilder |
Additional Inherited Members | |
| Protected Member Functions inherited from operations_research::sat::Constraint | |
| Constraint (ConstraintProto *proto) | |
| Protected Attributes inherited from operations_research::sat::Constraint | |
| ConstraintProto * | proto_ = nullptr |
| void operations_research::sat::MultipleCircuitConstraint::AddArc | ( | int | tail, |
| int | head, | ||
| BoolVar | literal ) |
Add an arc to the circuit.
| tail | the index of the tail node. |
| head | the index of the head node. |
| literal | it will be set to true if the arc is selected. |
Definition at line 520 of file cp_model.cc.
|
friend |
Definition at line 617 of file cp_model.h.