Stay organized with collections
Save and categorize content based on your preferences.
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 |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[],["The `CircuitPropagator` class enforces circuit/sub-circuit constraints in a graph represented sparsely. Nodes outside the allowed sub-circuit must self-loop; absence of a self-loop implies node inclusion. The constraint mandates \"exactly one\" constraints on each node's incoming/outgoing arcs, and these must propagate first. Key methods include: `CircuitPropagator` (constructor taking graph parameters and options), `Propagate` and `IncrementalPropagate` (for constraint enforcement), `RegisterWith` (to interact with a watcher), and `SetLevel` (for setting a propagation level).\n"]]