public class LinearIntDom extends LinearInt
sum(i in 1..N)(ai*xi) = b
It provides the weighted sum from all variables on the list. The weights are integers. Domain consistency is used.
relationType
notConsistencyPruningEvents
atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scope, trace
queueIndex
Constructor and Description |
---|
LinearIntDom(IntVar[] list,
int[] weights,
String rel,
int sum)
It constructs the constraint LinearIntDom.
|
LinearIntDom(IntVar[] list,
int[] weights,
String rel,
IntVar sum)
It constructs the constraint LinearIntDom.
|
LinearIntDom(List<? extends IntVar> variables,
List<Integer> weights,
String rel,
int sum)
It constructs the constraint LinearIntDom.
|
LinearIntDom(Store store,
IntVar[] list,
int[] weights,
String rel,
int sum)
Deprecated.
LinearIntDom constraint does not use Store parameter any longer.
|
LinearIntDom(Store store,
IntVar[] list,
int[] weights,
String rel,
IntVar sum)
Deprecated.
LinearIntDom constraint does not use Store parameter any longer.
|
LinearIntDom(Store store,
List<? extends IntVar> variables,
List<Integer> weights,
String rel,
int sum)
Deprecated.
LinearIntDom constraint does not use Store parameter any longer.
|
Modifier and Type | Method and Description |
---|---|
void |
consistency(Store store)
It is a (most probably incomplete) consistency function which removes the
values from variables domains.
|
int |
getDefaultConsistencyPruningEvent() |
protected int |
getDefaultNestedConsistencyPruningEvent() |
protected int |
getDefaultNestedNotConsistencyPruningEvent() |
protected int |
getDefaultNotConsistencyPruningEvent() |
void |
notConsistency(Store store)
It makes pruning in such a way that constraint is notConsistent.
|
void |
propagate(int rel) |
String |
toString()
It produces a string representation of a constraint state.
|
commonInitialization, impose, notSatisfied, rel2String, relation, satisfied, satisfiedEq, satisfiedGtEq, satisfiedLtEq, satisfiedNeq
getNestedPruningEvent, getNotConsistencyPruningEvent, include, setNotConsistencyPruningEvent
afc, arguments, cleanAfterFailure, decompose, getConsistencyPruningEvent, getGuideConstraint, getGuideValue, getGuideVariable, grounded, grounded, id, impose, imposeDecomposition, increaseWeight, intArrayToString, long2int, numberArgs, queueVariable, removeConstraint, requiresMonotonicity, setConsistencyPruningEvent, setConstraintScope, setScope, setScope, setScope, setScope, setScope, setWatchedVariableGrounded, supplyGuideFeedback, updateAFC, watchedVariableGrounded
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
@Deprecated public LinearIntDom(Store store, IntVar[] list, int[] weights, String rel, int sum)
store
- current storelist
- variables which are being multiplied by weights.weights
- weight for each variable.rel
- the relation, one of "==", "<", ">", "<=", ">=", "!="sum
- the sum of weighted variables.@Deprecated public LinearIntDom(Store store, IntVar[] list, int[] weights, String rel, IntVar sum)
store
- current storelist
- variables which are being multiplied by weights.weights
- weight for each variable.rel
- the relation, one of "==", "<", ">", "<=", ">=", "!="sum
- variable containing the sum of weighted variables.@Deprecated public LinearIntDom(Store store, List<? extends IntVar> variables, List<Integer> weights, String rel, int sum)
store
- current storevariables
- variables which are being multiplied by weights.weights
- weight for each variable.rel
- the relation, one of "==", "<", ">", "<=", ">=", "!="sum
- variable containing the sum of weighted variables.public LinearIntDom(IntVar[] list, int[] weights, String rel, int sum)
list
- variables which are being multiplied by weights.weights
- weight for each variable.rel
- the relation, one of "==", "<", ">", "<=", ">=", "!="sum
- the sum of weighted variables.public LinearIntDom(IntVar[] list, int[] weights, String rel, IntVar sum)
list
- variables which are being multiplied by weights.weights
- weight for each variable.rel
- the relation, one of "==", "<", ">", "<=", ">=", "!="sum
- variable containing the sum of weighted variables.public LinearIntDom(List<? extends IntVar> variables, List<Integer> weights, String rel, int sum)
variables
- variables which are being multiplied by weights.weights
- weight for each variable.rel
- the relation, one of "==", "<", ">", "<=", ">=", "!="sum
- variable containing the sum of weighted variables.public void consistency(Store store)
Constraint
consistency
in class LinearInt
store
- constraint store within which the constraint consistency is being checked.public void notConsistency(Store store)
PrimitiveConstraint
notConsistency
in class LinearInt
store
- the constraint store in which context the notConsistency technique is evaluated.protected int getDefaultNestedConsistencyPruningEvent()
getDefaultNestedConsistencyPruningEvent
in class LinearInt
protected int getDefaultNestedNotConsistencyPruningEvent()
getDefaultNestedNotConsistencyPruningEvent
in class LinearInt
public int getDefaultConsistencyPruningEvent()
getDefaultConsistencyPruningEvent
in class LinearInt
protected int getDefaultNotConsistencyPruningEvent()
getDefaultNotConsistencyPruningEvent
in class LinearInt
public String toString()
Constraint
Copyright © 2022. All rights reserved.