Class Network

All Implemented Interfaces:
MutableNetwork
Direct Known Subclasses:
Pruning

public class Network extends NetworkSimplex implements MutableNetwork
This class extends the minimum-cost flow network by providing operations and data structures for removal and modification of arcs.
Version:
4.10
  • Field Details

    • SHOW_CHANGES

      private static final boolean SHOW_CHANGES
      See Also:
    • deletedArcs

      public final List<Arc> deletedArcs
      List of deleted arcs (contains no duplicates)
    • deletedSize

      public TimeStamp<Integer> deletedSize
      Number of deleted arcs at each level
    • costOffset

      public long costOffset
      Cost due to deleted arcs
    • modifiedArcs

      public final List<ArcCompanion> modifiedArcs
      List of modified arcs (may contain duplicates)
    • modifiedSize

      public TimeStamp<Integer> modifiedSize
      Number of modified arcs at each level
    • lastModifiedArcs

      public final LinkedHashSet<ArcCompanion> lastModifiedArcs
      Set of arcs modified at current level
    • store

      public Store store
      The store
  • Constructor Details

  • Method Details

    • initialize

      public void initialize(Store store)
    • add

      private void add(Arc arc)
    • remove

      public void remove(Arc arc)
      Description copied from interface: MutableNetwork
      Removes an arc from the network. The arc must be at its lower or upper bound before it can be removed.
      Specified by:
      remove in interface MutableNetwork
      Parameters:
      arc - The arc to be removed
    • modified

      public void modified(ArcCompanion companion)
      Description copied from interface: MutableNetwork
      Tells the network that an arc has been modified. The network will then restore the arc upon backtracking.
      Specified by:
      modified in interface MutableNetwork
      Parameters:
      companion - The arc that was modified
    • increaseLevel

      public void increaseLevel()
    • backtrack

      public void backtrack()
    • restore

      private void restore(ArcCompanion companion)
    • changeCostOffset

      public void changeCostOffset(long delta)
      Description copied from interface: MutableNetwork
      Changes the cost offset by some value.
      Specified by:
      changeCostOffset in interface MutableNetwork
      Parameters:
      delta - the change in cost
    • cost

      public long cost(long cutoff)
      Overrides:
      cost in class NetworkSimplex
    • getStoreLevel

      public int getStoreLevel()
      Description copied from interface: MutableNetwork
      Retrieves the current store level for domain pruning.
      Specified by:
      getStoreLevel in interface MutableNetwork
      Returns:
      the store level
    • needsUpdate

      public boolean needsUpdate(int maxCost)