Package org.jacop.constraints.netflow
Class Network
java.lang.Object
org.jacop.constraints.netflow.simplex.NetworkSimplex
org.jacop.constraints.netflow.Network
- All Implemented Interfaces:
MutableNetwork
- Direct Known Subclasses:
Pruning
This class extends the minimum-cost flow network by providing operations and
data structures for removal and modification of arcs.
- Version:
- 4.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionlongCost due to deleted arcsList of deleted arcs (contains no duplicates)Number of deleted arcs at each levelfinal LinkedHashSet<ArcCompanion> Set of arcs modified at current levelfinal List<ArcCompanion> List of modified arcs (may contain duplicates)Number of modified arcs at each levelprivate static final booleanThe storeFields inherited from class org.jacop.constraints.netflow.simplex.NetworkSimplex
allArcs, blocking, DEBUG, DEBUG_ALL, DELETED_ARC, infeasibleNodes, LARGE_COST, lower, nodes, numArcs, pivotRule, root, TREE_ARC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidvoidchangeCostOffset(long delta) Changes the cost offset by some value.longcost(long cutoff) intRetrieves the current store level for domain pruning.voidvoidinitialize(Store store) voidmodified(ArcCompanion companion) Tells the network that an arc has been modified.booleanneedsUpdate(int maxCost) voidRemoves an arc from the network.private voidrestore(ArcCompanion companion) Methods inherited from class org.jacop.constraints.netflow.simplex.NetworkSimplex
addArc, addArcWithFlow, augmentFlow, dualPivot, networkSimplex, parametricStep, primalStep, print, removeArc, treeSwap, updateTree
-
Field Details
-
SHOW_CHANGES
private static final boolean SHOW_CHANGES- See Also:
-
deletedArcs
List of deleted arcs (contains no duplicates) -
deletedSize
Number of deleted arcs at each level -
costOffset
public long costOffsetCost due to deleted arcs -
modifiedArcs
List of modified arcs (may contain duplicates) -
modifiedSize
Number of modified arcs at each level -
lastModifiedArcs
Set of arcs modified at current level -
store
The store
-
-
Constructor Details
-
Network
-
-
Method Details
-
initialize
-
add
-
remove
Description copied from interface:MutableNetworkRemoves an arc from the network. The arc must be at its lower or upper bound before it can be removed.- Specified by:
removein interfaceMutableNetwork- Parameters:
arc- The arc to be removed
-
modified
Description copied from interface:MutableNetworkTells the network that an arc has been modified. The network will then restore the arc upon backtracking.- Specified by:
modifiedin interfaceMutableNetwork- Parameters:
companion- The arc that was modified
-
increaseLevel
public void increaseLevel() -
backtrack
public void backtrack() -
restore
-
changeCostOffset
public void changeCostOffset(long delta) Description copied from interface:MutableNetworkChanges the cost offset by some value.- Specified by:
changeCostOffsetin interfaceMutableNetwork- Parameters:
delta- the change in cost
-
cost
public long cost(long cutoff) - Overrides:
costin classNetworkSimplex
-
getStoreLevel
public int getStoreLevel()Description copied from interface:MutableNetworkRetrieves the current store level for domain pruning.- Specified by:
getStoreLevelin interfaceMutableNetwork- Returns:
- the store level
-
needsUpdate
public boolean needsUpdate(int maxCost)
-