public class SoftGCC extends DecomposedConstraint<Constraint>
It is soft in a sense that every violation of softLower, softUpper bound or softCounter contributes to the violation cost. It is hard in a sense that it does enforce hardLower, hardUpper bound or hardCounter. It uses value based violation metric.
Modifier and Type | Field and Description |
---|---|
IntVar |
costVar |
int[] |
countedValue |
List<Constraint> |
decomposition |
IntVar[] |
hardCounters |
int[] |
hardLowerBound |
int[] |
hardUpperBound |
IntVar[] |
softCounters |
int[] |
softLowerBound |
int[] |
softUpperBound |
ViolationMeasure |
violationMeasure |
IntVar[] |
xVars |
queueIndex
Constructor and Description |
---|
SoftGCC(IntVar[] xVars,
int[] hardLowerBound,
int[] hardUpperBound,
int[] countedValue,
IntVar[] softCounters,
IntVar costVar,
ViolationMeasure violationMeasure)
It specifies soft-GCC constraint.
|
SoftGCC(IntVar[] xVars,
int[] hardLowerBound,
int[] hardUpperBound,
IntVar[] softCounters,
IntVar costVar,
ViolationMeasure violationMeasure)
It specifies soft-GCC constraint.
|
SoftGCC(IntVar[] xVars,
IntVar[] hardCounters,
int[] countedValue,
int[] softLowerBound,
int[] softUpperBound,
IntVar costVar,
ViolationMeasure violationMeasure)
It specifies soft-GCC constraint.
|
SoftGCC(IntVar[] xVars,
IntVar[] hardCounters,
int[] softLowerBound,
int[] softUpperBound,
IntVar costVar,
ViolationMeasure violationMeasure)
It specifies soft-GCC constraint.
|
SoftGCC(IntVar[] xVars,
IntVar[] hardCounters,
int[] countedValue,
IntVar[] softCounters,
IntVar costVar,
ViolationMeasure violationMeasure)
It specifies soft-GCC constraint.
|
SoftGCC(IntVar[] xVars,
IntVar[] hardCounters,
IntVar[] softCounters,
IntVar costVar,
ViolationMeasure violationMeasure)
It specifies soft-GCC constraint.
|
Modifier and Type | Method and Description |
---|---|
List<Constraint> |
decompose(Store store)
It returns an array list of constraint which are used to decompose this
constraint.
|
void |
imposeDecomposition(Store store)
It imposes the constraint in a given store.
|
List<Constraint> |
primitiveDecomposition(Store store) |
String |
toString() |
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
public List<Constraint> decomposition
public IntVar[] xVars
public IntVar[] hardCounters
public IntVar[] softCounters
public int[] countedValue
public int[] softLowerBound
public int[] softUpperBound
public int[] hardLowerBound
public int[] hardUpperBound
public IntVar costVar
public ViolationMeasure violationMeasure
public SoftGCC(IntVar[] xVars, IntVar[] hardCounters, int[] countedValue, int[] softLowerBound, int[] softUpperBound, IntVar costVar, ViolationMeasure violationMeasure)
xVars
- variables over which counting takes place.hardCounters
- idNumber variables for different values being counted. Their domain specify hard constraints on the occurrences.countedValue
- it specifies values which occurrence is being counted.softLowerBound
- it specifies constraint what is the minimal number of occurrences.softUpperBound
- it specifies constraint what is the maximal number of occurrences.costVar
- a cost variable specifying the cost of violations.violationMeasure
- it is only accepted to use Value_Based violation measure.public SoftGCC(IntVar[] xVars, int[] hardLowerBound, int[] hardUpperBound, int[] countedValue, IntVar[] softCounters, IntVar costVar, ViolationMeasure violationMeasure)
xVars
- variables over which counting takes place.hardLowerBound
- it specifies constraint what is the minimal number of occurrences. (hard)hardUpperBound
- it specifies constraint what is the maximal number of occurrences. (hard)countedValue
- it specifies values which occurrence is being counted.softCounters
- it specifies the number of occurrences (soft).costVar
- a cost variable specifying the cost of violations.violationMeasure
- it is only accepted to use Value_Based violation measure.public SoftGCC(IntVar[] xVars, IntVar[] hardCounters, int[] countedValue, IntVar[] softCounters, IntVar costVar, ViolationMeasure violationMeasure)
xVars
- variables over which counting takes place.hardCounters
- idNumber variables for different values being counted. (hard)countedValue
- it specifies values which occurrence is being counted.softCounters
- idNumber variables for different values being counted. (soft)costVar
- a cost variable specifying the cost of violations.violationMeasure
- it is only accepted to use Value_Based violation measure.public SoftGCC(IntVar[] xVars, IntVar[] hardCounters, int[] softLowerBound, int[] softUpperBound, IntVar costVar, ViolationMeasure violationMeasure)
xVars
- variables over which counting takes place.hardCounters
- idNumber variables for different values being counted. (hard)softLowerBound
- it specifies constraint what is the minimal number of occurrences. (soft)softUpperBound
- it specifies constraint what is the maximal number of occurrences. (soft)costVar
- a cost variable specifying the cost of violations.violationMeasure
- it is only accepted to use Value_Based violation measure.public SoftGCC(IntVar[] xVars, int[] hardLowerBound, int[] hardUpperBound, IntVar[] softCounters, IntVar costVar, ViolationMeasure violationMeasure)
xVars
- variables over which counting takes place.hardLowerBound
- it specifies constraint what is the minimal number of occurrences. (hard)hardUpperBound
- it specifies constraint what is the maximal number of occurrences. (hard)softCounters
- idNumber variables for different values being counted. (soft)costVar
- a cost variable specifying the cost of violations.violationMeasure
- it is only accepted to use Value_Based violation measure.public SoftGCC(IntVar[] xVars, IntVar[] hardCounters, IntVar[] softCounters, IntVar costVar, ViolationMeasure violationMeasure)
xVars
- variables over which counting takes place.hardCounters
- idNumber variables for different values being counted. (hard)softCounters
- idNumber variables that may be violated.costVar
- a cost variable specifying the cost of violations.violationMeasure
- it is only accepted to use Value_Based violation measure.public List<Constraint> primitiveDecomposition(Store store)
public List<Constraint> decompose(Store store)
DecomposedConstraint
decompose
in class DecomposedConstraint<Constraint>
store
- the constraint store in which context the decomposition takes place.public void imposeDecomposition(Store store)
DecomposedConstraint
imposeDecomposition
in class DecomposedConstraint<Constraint>
store
- the constraint store to which the constraint is imposed to.Copyright © 2022. All rights reserved.