public class NetworkFlow extends Constraint implements UsesQueueVariable, Stateful, RemoveLevelLate
| Modifier and Type | Field and Description |
|---|---|
IntVar |
costVariable
The cost variable
|
boolean |
disableQueueVariable
Disables the queue variable function during consistency
|
Map<IntVar,VarHandler> |
map
The variables and their handlers
|
Pruning |
network
The network
|
int |
previousLevel |
Set<IntVar> |
queue
The set of queued variables
|
atomicExecution, consistencyPruningEvents, constraintScope, earlyTerminationOK, increaseWeight, numberId, scope, tracequeueIndex| Constructor and Description |
|---|
NetworkFlow(NetworkBuilder builder) |
| 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 |
getConsistencyPruningEvent(Var var)
It retrieves the pruning event which causes reevaluation of the
constraint.
|
int |
getDefaultConsistencyPruningEvent() |
void |
impose(Store store)
It imposes the constraint in a given store.
|
void |
queueVariable(int level,
Var variable)
Search & Backtracking
|
void |
removeLevel(int level)
This function is called in case of the backtrack, so a constraint can
clear the queue of changed variables which is no longer valid.
|
void |
removeLevelLate(int level)
This function is called in case of the backtrack.
|
String |
toString()
Identifiers
|
afc, arguments, cleanAfterFailure, decompose, getGuideConstraint, getGuideValue, getGuideVariable, grounded, grounded, id, impose, imposeDecomposition, increaseWeight, intArrayToString, long2int, numberArgs, removeConstraint, requiresMonotonicity, setConsistencyPruningEvent, setConstraintScope, setScope, setScope, setScope, setScope, setScope, setWatchedVariableGrounded, supplyGuideFeedback, updateAFC, watchedVariableGroundedauxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecompositionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisStatefulpublic final Pruning network
public IntVar costVariable
public final Map<IntVar,VarHandler> map
public boolean disableQueueVariable
public int previousLevel
public NetworkFlow(NetworkBuilder builder)
public int getConsistencyPruningEvent(Var var)
ConstraintgetConsistencyPruningEvent in class Constraintvar - variable for which pruning event is retrievedpublic int getDefaultConsistencyPruningEvent()
getDefaultConsistencyPruningEvent in class Constraintpublic void impose(Store store)
Constraintimpose in class Constraintstore - the constraint store to which the constraint is imposed to.public void queueVariable(int level,
Var variable)
queueVariable in class Constraintlevel - the level of the store at which the change has occurred.variable - variable which has changed.public void consistency(Store store)
Constraintconsistency in class Constraintstore - constraint store within which the constraint consistency is being checked.public void removeLevel(int level)
StatefulremoveLevel in interface Statefullevel - the level which is being removed.public void removeLevelLate(int level)
RemoveLevelLateremoveLevelLate in interface RemoveLevelLatelevel - the level which is being removed.public String toString()
toString in class ConstraintCopyright © 2022. All rights reserved.