java.lang.Object
org.maxicp.cp.engine.core.AbstractCPConstraint
org.maxicp.cp.engine.constraints.CostCardinalityMaxDC
org.maxicp.cp.engine.constraints.CostAllDifferentDC
- All Implemented Interfaces:
CPConstraint,ConcreteConstraint<ConcreteCPModel>
Arc Consistent AllDifferent Constraint with Costs
-
Nested Class Summary
Nested classes/interfaces inherited from class org.maxicp.cp.engine.constraints.CostCardinalityMaxDC
CostCardinalityMaxDC.Algorithm -
Constructor Summary
ConstructorsConstructorDescriptionCostAllDifferentDC(CPIntVar[] x, int[][] costs, CPIntVar H) Creates a domain-consistent AllDifferent constraint with costs, enforcing that all variables inxtake pairwise distinct values and that the total assignment costsum_i costs[i][x[i]] <= H. -
Method Summary
Methods inherited from class org.maxicp.cp.engine.constraints.CostCardinalityMaxDC
getAssignment, getMinCostAssignment, post, propagateMethods inherited from class org.maxicp.cp.engine.core.AbstractCPConstraint
getSolver, isActive, isScheduled, priority, registerDelta, setActive, setScheduled, updateDeltas
-
Constructor Details
-
CostAllDifferentDC
Creates a domain-consistent AllDifferent constraint with costs, enforcing that all variables inxtake pairwise distinct values and that the total assignment costsum_i costs[i][x[i]] <= H.- Parameters:
x- the variables to constrain (non-negative domains)costs- the cost matrix wherecosts[i][v]is the cost of assigning valuevtox[i]H- the upper-bound variable on the total assignment cost
-