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, trace
queueIndex
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, watchedVariableGrounded
auxiliaryVariables, checkInput, checkInput, checkInputForDuplication, checkInputForDuplicationSkipSingletons, checkInputForNullness, checkInputForNullness, checkInputForNullness, derivative, getDubletonsSkipSingletons, imposeDecomposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isStateful
public 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)
Constraint
getConsistencyPruningEvent
in class Constraint
var
- variable for which pruning event is retrievedpublic int getDefaultConsistencyPruningEvent()
getDefaultConsistencyPruningEvent
in class Constraint
public void impose(Store store)
Constraint
impose
in class Constraint
store
- the constraint store to which the constraint is imposed to.public void queueVariable(int level, Var variable)
queueVariable
in class Constraint
level
- the level of the store at which the change has occurred.variable
- variable which has changed.public void consistency(Store store)
Constraint
consistency
in class Constraint
store
- constraint store within which the constraint consistency is being checked.public void removeLevel(int level)
Stateful
removeLevel
in interface Stateful
level
- the level which is being removed.public void removeLevelLate(int level)
RemoveLevelLate
removeLevelLate
in interface RemoveLevelLate
level
- the level which is being removed.public String toString()
toString
in class Constraint
Copyright © 2022. All rights reserved.