Class DdoStats


public class DdoStats extends SearchStatistics
Class tracking statistics specific to Decision Diagram Optimization (DDO) solver.
  • Constructor Details

    • DdoStats

      public DdoStats(long startTime, double initValue)
      Constructs a new SearchStatistics instance.
      Parameters:
      startTime - the start time of the search (in milliseconds)
      initValue - the initial value for the incumbent
  • Method Details

    • createSpecificInstance

      protected DdoStats createSpecificInstance()
      Creates a new instance of the specific subclass with initial values. This is used by the copy method to maintain the correct type.
      Specified by:
      createSpecificInstance in class SearchStatistics
      Returns:
      a new instance of the specific subclass
    • copy

      public DdoStats copy()
      Creates and returns a copy of this statistics instance.
      Overrides:
      copy in class SearchStatistics
      Returns:
      a copy of the current statistics
    • updateIncumbent

      public DdoStats updateIncumbent(double incumbent, double gap)
      Returns a new SearchStatistics instance with an updated incumbent value and gap.
      Overrides:
      updateIncumbent in class SearchStatistics
      Parameters:
      incumbent - the new incumbent value
      gap - the new optimality gap
      Returns:
      a new instance with updated incumbent and gap
    • updateStatus

      public DdoStats updateStatus(SearchStatus status)
      Returns a new SearchStatistics instance with an updated search status.
      Overrides:
      updateStatus in class SearchStatistics
      Parameters:
      status - the new SearchStatus
      Returns:
      a new instance with the updated status
    • incrementNbIter

      public DdoStats incrementNbIter()
      Returns a new SearchStatistics instance with the iteration count incremented by one.
      Overrides:
      incrementNbIter in class SearchStatistics
      Returns:
      a new instance with incremented iterations
    • updateFrontierMaxSize

      public DdoStats updateFrontierMaxSize(int frontierSize)
      Returns a new SearchStatistics instance with an updated maximum frontier size.
      Overrides:
      updateFrontierMaxSize in class SearchStatistics
      Parameters:
      frontierSize - the current frontier size to potentially update the maximum
      Returns:
      a new instance with the updated maximum frontier size
    • updateGap

      public DdoStats updateGap(double gap)
      Returns a new SearchStatistics instance with an updated optimality gap.
      Overrides:
      updateGap in class SearchStatistics
      Parameters:
      gap - the new gap value
      Returns:
      a new instance with the updated gap
    • updateNodeCounts

      public DdoStats updateNodeCounts(long nbExpanded, long nbGenerated)
      Returns a new SearchStatistics instance with the given numbers of expanded and generated nodes (totals since the beginning of the search).
      Overrides:
      updateNodeCounts in class SearchStatistics
      Parameters:
      nbExpanded - the number of expanded nodes
      nbGenerated - the number of generated nodes
      Returns:
      a new instance with the updated node counts
    • addNodeCounts

      public DdoStats addNodeCounts(long nbExpanded, long nbGenerated)
      Returns a new SearchStatistics instance with the given numbers of expanded and generated nodes added to the current ones.
      Overrides:
      addNodeCounts in class SearchStatistics
      Parameters:
      nbExpanded - the number of expanded nodes to add
      nbGenerated - the number of generated nodes to add
      Returns:
      a new instance with the updated node counts
    • updateBestBound

      public DdoStats updateBestBound(double bound)
      Returns a new SearchStatistics instance with an updated best bound. Any valid lower bound on the optimal value can be given: the best one seen so far is kept.
      Overrides:
      updateBestBound in class SearchStatistics
      Parameters:
      bound - a lower bound on the optimal value
      Returns:
      a new instance with the updated best bound
    • updateTime

      public DdoStats updateTime(long time)
      Returns a new SearchStatistics instance with an updated current time.
      Overrides:
      updateTime in class SearchStatistics
      Parameters:
      time - the current time (in milliseconds)
      Returns:
      a new instance with the updated time
    • incrementNbFastLowerBoundPruning

      public DdoStats incrementNbFastLowerBoundPruning()
      Creates and returns a copy of this statistics instance with one more node pruned by the fast lower bound.
      Overrides:
      incrementNbFastLowerBoundPruning in class SearchStatistics
      Returns:
      a new instance with the incremented number of fast lower bound prunings
    • incrementNbDominancePruning

      public DdoStats incrementNbDominancePruning()
      Creates and returns a copy of this statistics instance with one more node pruned by the dominance.
      Overrides:
      incrementNbDominancePruning in class SearchStatistics
      Returns:
      a new instance with the incremented number of dominance prunings
    • addNbFastLowerBoundPruning

      public DdoStats addNbFastLowerBoundPruning(int nbPruning)
      Creates and returns a copy of this statistics instance with additional nodes pruned by the fast lower bound, for instance those pruned during the compilation of a decision diagram.
      Overrides:
      addNbFastLowerBoundPruning in class SearchStatistics
      Parameters:
      nbPruning - the number of nodes pruned by the fast lower bound to add
      Returns:
      a new instance with the updated number of fast lower bound prunings
    • addNbDominancePruning

      public DdoStats addNbDominancePruning(int nbPruning)
      Creates and returns a copy of this statistics instance with additional nodes pruned by the dominance, for instance those pruned during the compilation of a decision diagram.
      Overrides:
      addNbDominancePruning in class SearchStatistics
      Parameters:
      nbPruning - the number of nodes pruned by the dominance to add
      Returns:
      a new instance with the updated number of dominance prunings
    • totalNodes

      public long totalNodes()
      Returns the total number of nodes created in all compiled MDDs.
      Returns:
      the total number of nodes
    • maxExploredDepth

      public int maxExploredDepth()
      Returns the maximum depth reached during the search.
      Returns:
      the maximum depth
    • bestLowerBound

      public double bestLowerBound()
      Returns the best (highest) global lower bound found so far.
      Returns:
      the best lower bound
    • lastIterationOfLowerBoundImprovement

      public int lastIterationOfLowerBoundImprovement()
      Returns the iteration during which the last lower bound improvement was found.
      Returns:
      the last iteration of lower bound improvement
    • addNodes

      public DdoStats addNodes(int nodes)
      Updates the total number of nodes created.
      Parameters:
      nodes - the number of nodes to add
      Returns:
      a new DdoStats instance with updated totalNodes
    • updateMaxDepth

      public DdoStats updateMaxDepth(int depth)
      Updates the maximum depth reached.
      Parameters:
      depth - the current depth
      Returns:
      a new DdoStats instance with updated maxExploredDepth
    • updateLowerBound

      public DdoStats updateLowerBound(double lb)
      Updates the best lower bound and tracks its improvement iteration.
      Parameters:
      lb - the new lower bound
      Returns:
      a new DdoStats instance with updated bestLowerBound