Package org.jacop.constraints
Class VariableTrace
java.lang.Object
org.jacop.constraints.DecomposedConstraint<Constraint>
org.jacop.constraints.Constraint
org.jacop.constraints.VariableTrace
- All Implemented Interfaces:
RemoveLevelLate,UsesQueueVariable
VariableTrace is a daemon that prints information on variables whenever they are changed.
- Version:
- 4.10
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static AtomicInteger(package private) Store(package private) Var[]Fields inherited from class org.jacop.constraints.Constraint
afcWeight, atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scope, trace, watchedVariableGroundedFields inherited from class org.jacop.constraints.DecomposedConstraint
queueIndex -
Constructor Summary
ConstructorsConstructorDescriptionVariableTrace(List<Var> vs) It constructs trace daemon for variables vsVariableTrace(Var v) It constructs trace daemon for variable vVariableTrace(Var[] vs) It constructs trace daemon for variables vs -
Method Summary
Modifier and TypeMethodDescriptionvoidconsistency(Store store) It is a (most probably incomplete) consistency function which removes the values from variables domains.intvoidIt imposes the constraint in a given store.voidIt increases the weight of the variables in the constraint scope.voidqueueVariable(int level, Var var) This is a function called to indicate which variable in a scope of constraint has changed.voidIt removes the constraint by removing this constraint from all variables.voidremoveLevelLate(int level) This function is called in case of the backtrack.booleantoString()It produces a string representation of a constraint state.Methods inherited from class org.jacop.constraints.Constraint
afc, arguments, cleanAfterFailure, decompose, getConsistencyPruningEvent, getGuideConstraint, getGuideValue, getGuideVariable, grounded, grounded, id, impose, imposeDecomposition, intArrayToString, long2int, numberArgs, requiresMonotonicity, setConsistencyPruningEvent, setConstraintScope, setScope, setScope, setScope, setScope, setScope, setWatchedVariableGrounded, supplyGuideFeedback, toInt, toInt, updateAFC, watchedVariableGroundedMethods inherited from class org.jacop.constraints.DecomposedConstraint
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
-
Field Details
-
Constructor Details
-
VariableTrace
It constructs trace daemon for variable v- Parameters:
v- variable to be traced
-
VariableTrace
It constructs trace daemon for variables vs- Parameters:
vs- variables to be traced
-
VariableTrace
It constructs trace daemon for variables vs- Parameters:
vs- variables to be traced
-
-
Method Details
-
impose
Description copied from class:ConstraintIt imposes the constraint in a given store.- Overrides:
imposein classConstraint- Parameters:
store- the constraint store to which the constraint is imposed to.
-
consistency
Description copied from class:ConstraintIt is a (most probably incomplete) consistency function which removes the values from variables domains. Only values which do not have any support in a solution space are removed.- Specified by:
consistencyin classConstraint- Parameters:
store- constraint store within which the constraint consistency is being checked.
-
getDefaultConsistencyPruningEvent
public int getDefaultConsistencyPruningEvent()- Specified by:
getDefaultConsistencyPruningEventin classConstraint
-
queueVariable
Description copied from class:ConstraintThis is a function called to indicate which variable in a scope of constraint has changed. It also indicates a store level at which the change has occurred.- Overrides:
queueVariablein classConstraint- Parameters:
level- the level of the store at which the change has occurred.var- variable which has changed.
-
removeLevelLate
public void removeLevelLate(int level) Description copied from interface:RemoveLevelLateThis function is called in case of the backtrack. It is called after all timestamps, variables, mutablevariables have reverted to their values *after* removing the level.- Specified by:
removeLevelLatein interfaceRemoveLevelLate- Parameters:
level- the level which is being removed.
-
removeConstraint
public void removeConstraint()Description copied from class:ConstraintIt removes the constraint by removing this constraint from all variables.- Overrides:
removeConstraintin classConstraint
-
satisfied
public boolean satisfied() -
toString
Description copied from class:ConstraintIt produces a string representation of a constraint state.- Overrides:
toStringin classConstraint
-
increaseWeight
public void increaseWeight()Description copied from class:ConstraintIt increases the weight of the variables in the constraint scope.- Overrides:
increaseWeightin classConstraint
-