Interface DdoModel<T>

Type Parameters:
T - the state type
All Superinterfaces:
Model<T>
All Known Implementing Classes:
ExactModel

public interface DdoModel<T> extends Model<T>
Defines the interface for a Dynamic Decision Diagram Optimization (DDO) model.

A DdoModel extends the generic Model interface by providing methods related to relaxation, ranking, width control, and frontier management. It serves as the foundation for implementing algorithms that construct and explore decision diagrams dynamically (e.g., exact or approximate methods).

This interface provides several default behaviors, which can be overridden to customize model evaluation, search strategy, or diagram generation.

Responsibilities

  • Provide the problem relaxation used for node evaluation (relaxation()).
  • Define the ranking strategy between states (ranking()).
  • Control the diagram’s width through heuristics (widthHeuristic()).
  • Specify how to maintain and update the frontier (frontier()).
  • Indicate optional behaviors like caching (useCache()) or exporting the structure (exportDot()).
  • Method Details

    • relaxation

      Relaxation<T> relaxation()
      Returns the relaxation of the model used to evaluate the nodes or layers of the decision diagram.

      The relaxation defines a simplified or approximate version of the problem, which helps bound the objective function or guide the search.

      Returns:
      the Relaxation object associated with this model
    • ranking

      default StateRanking<T> ranking()
      Returns the ranking function used to order states within a layer.

      The default implementation imposes no specific order (always returns 0), meaning all states are considered equal in priority. Override this method to implement problem-specific ranking heuristics.

      Returns:
      a StateRanking comparator between states
    • widthHeuristic

      default WidthHeuristic<T> widthHeuristic()
      Returns the width heuristic controlling the maximum number of nodes per layer.

      The default implementation uses a fixed width of 10.

      Returns:
      a WidthHeuristic instance controlling diagram width
    • frontier

      default Frontier<T> frontier()
      Returns the frontier management strategy used to store and expand the current layer of the decision diagram.

      The default implementation creates a SimpleFrontier based on ranking() and uses CutSetType.LastExactLayer as the cut set.

      Returns:
      a Frontier instance defining the search frontier
    • useCache

      default boolean useCache()
      Indicates whether caching should be used during the diagram construction.

      Caching stores intermediate results to avoid redundant computations. By default, caching is disabled.

      Returns:
      true if caching is enabled, false otherwise
    • useCache

      default DdoModel<T> useCache(boolean b)
      Returns a copy of this model by enabling or disabling the cache.
      Parameters:
      b - whether the cache must be used
      Returns:
      a copy of this model by enabling or disabling the cache
    • exportDot

      default boolean exportDot()
      Indicates whether the generated decision diagram should be exported to a DOT file (Graphviz format).

      This feature allows visualization of the structure of the generated decision diagram for debugging or analysis purposes. By default, export is disabled.

      Returns:
      true if DOT export is enabled, false otherwise
    • relaxStrategy

      default ReductionStrategy<T> relaxStrategy()
      Strategy to select which nodes should be merged together on a relaxed DD.
      Returns:
      the ReductionStrategy used to merge nodes in a relaxed decision diagram
    • restrictStrategy

      default ReductionStrategy<T> restrictStrategy()
      Strategy to select which nodes should be dropped on a restricted DD.
      Returns:
      the ReductionStrategy used to drop nodes in a restricted decision diagram
    • stateDistance

      default StateDistance<T> stateDistance()
      Returns the distance measure used to compare states, notably to select the neighborhood explored by a large neighborhood search.
      Returns:
      the StateDistance used to compare states
    • useLNS

      default boolean useLNS()
      Indicates whether Large Neighborhood Search (LNS) should be used to improve the solution found by this model.

      By default, LNS is disabled.

      Returns:
      true if LNS is enabled, false otherwise
    • fixWidth

      default DdoModel<T> fixWidth(int width)
      Returns a copy of this model but with a fixed width.
      Parameters:
      width - the maximum width of the diagram
      Returns:
      a copy of this model but with a fixed width
    • setCutSetType

      default DdoModel<T> setCutSetType(CutSetType type)
      Returns a copy of this model by changing the CutSetType.
      Parameters:
      type - the new cutset type
      Returns:
      a copy of this model by changing the CutSetType
    • disableDominance

      default DdoModel<T> disableDominance()
      Description copied from interface: Model
      Returns a copy of this model but without dominance.
      Specified by:
      disableDominance in interface Model<T>
      Returns:
      a copy of this model but without dominance
    • disableLowerBound

      default DdoModel<T> disableLowerBound()
      Description copied from interface: Model
      Returns a copy of this model but without FastLowerBound.
      Specified by:
      disableLowerBound in interface Model<T>
      Returns:
      a copy of this model but without FastLowerBound
    • toExactModel

      default ExactModel<T> toExactModel()
      Convert this model into a model for the exact solver.
      Returns:
      a model usable by an ExactModel
    • setInitialSolution

      default DdoModel<T> setInitialSolution(Solution solution)
      Returns a copy of this model but with the given initial solution.
      Specified by:
      setInitialSolution in interface Model<T>
      Parameters:
      solution - the initial solution (see Model.initialSolution())
      Returns:
      a copy of this model but with the given initial solution