public class CircuitConstraint extends Constraint
This constraint allows adding arcs to the circuit constraint incrementally.
Constructor and Description |
---|
CircuitConstraint(CpModelProto.Builder builder) |
Modifier and Type | Method and Description |
---|---|
CircuitConstraint |
addArc(int tail,
int head,
Literal literal)
Add an arc to the graph of the circuit constraint.
|
getBuilder, getIndex, onlyEnforceIf, onlyEnforceIf
public CircuitConstraint(CpModelProto.Builder builder)
public CircuitConstraint addArc(int tail, int head, Literal literal)
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.Copyright © 2025. All rights reserved.