Module org.maxicp

Class SubCircuit

java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.SubCircuit
All Implemented Interfaces:
CPConstraint, ConcreteConstraint<ConcreteCPModel>

public class SubCircuit extends AbstractCPConstraint
Ensures that only one Hamiltonian circuit appears in the provided successor variables. The nodes not belonging to the main circuit have themselves as successor.
Author:
pschaus
  • Constructor Details

    • SubCircuit

      public SubCircuit(CPIntVar[] x)
      Creates a SubCircuit Constraint. Nodes with x[i] == i are considered outside the active circuit.
      Parameters:
      x - the variables representing the successor array
  • Method Details

    • post

      public void post()
      Description copied from interface: CPConstraint
      Initializes the constraint when it is posted to the solver.
      Specified by:
      post in interface CPConstraint
      Overrides:
      post in class AbstractCPConstraint
    • fixed

      public void fixed(int u)