Module org.maxicp

Class CostAllDifferentDC

All Implemented Interfaces:
CPConstraint, ConcreteConstraint<ConcreteCPModel>

public class CostAllDifferentDC extends CostCardinalityMaxDC
Arc Consistent AllDifferent Constraint with Costs
  • Constructor Details

    • CostAllDifferentDC

      public CostAllDifferentDC(CPIntVar[] x, int[][] costs, CPIntVar H)
      Creates a domain-consistent AllDifferent constraint with costs, enforcing that all variables in x take pairwise distinct values and that the total assignment cost sum_i costs[i][x[i]] <= H.
      Parameters:
      x - the variables to constrain (non-negative domains)
      costs - the cost matrix where costs[i][v] is the cost of assigning value v to x[i]
      H - the upper-bound variable on the total assignment cost