C++ Reference: class CircuitPropagator

Note: This documentation is automatically generated.

Circuit/sub-circuit constraint.

Nodes that are not in the unique allowed sub-circuit must point to themseves. A nodes that has no self-arc must thus be inside the sub-circuit. If there is no self-arc at all, then this constaint forces the circuit to go through all the nodes. Multi-arcs are NOT supported.

Important: for correctness, this constraint requires that "exactly one" constraints have been added for all the incoming (resp. outgoing) arcs of each node. Also, such constraint must propagate before this one.
Method
CircuitPropagator

Arguments: int num_nodes, const std::vector<int>& tails, const std::vector<int>& heads, const std::vector<Literal>& literals, Options options, Model* model

The constraints take a sparse representation of a graph on [0, n). Each arc being present when the given literal is true.

IncrementalPropagate

Return type: bool

Arguments: const std::vector<int>& watch_indices

Propagate

Return type: bool

RegisterWith

Return type: void

Arguments: GenericLiteralWatcher* watcher

SetLevel

Return type: void

Arguments: int level