Class ExactModel<T>

java.lang.Object
org.ddolib.modeling.ExactModel<T>
Type Parameters:
T - the type representing the state space of the problem
All Implemented Interfaces:
DdoModel<T>, Model<T>

public abstract class ExactModel<T> extends Object implements DdoModel<T>
Defines the interface for a Dynamic Decision Diagram Optimization (DDO) model, used by the ExactSolver

It specifies the Problem instance to solve and optionally provides custom heuristics, dominance relations, and debugging or verbosity configurations.

  • Constructor Details

    • ExactModel

      public ExactModel()
  • Method Details

    • relaxation

      public final Relaxation<T> relaxation()
      Description copied from interface: DdoModel
      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.

      Specified by:
      relaxation in interface DdoModel<T>
      Returns:
      the Relaxation object associated with this model
    • ranking

      public final StateRanking<T> ranking()
      Description copied from interface: DdoModel
      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.

      Specified by:
      ranking in interface DdoModel<T>
      Returns:
      a StateRanking comparator between states
    • widthHeuristic

      public final WidthHeuristic<T> widthHeuristic()
      Description copied from interface: DdoModel
      Returns the width heuristic controlling the maximum number of nodes per layer.

      The default implementation uses a fixed width of 10.

      Specified by:
      widthHeuristic in interface DdoModel<T>
      Returns:
      a WidthHeuristic instance controlling diagram width
    • frontier

      public final Frontier<T> frontier()
      Description copied from interface: DdoModel
      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 DdoModel.ranking() and uses CutSetType.LastExactLayer as the cut set.

      Specified by:
      frontier in interface DdoModel<T>
      Returns:
      a Frontier instance defining the search frontier
    • useCache

      public final boolean useCache()
      Description copied from interface: DdoModel
      Indicates whether caching should be used during the diagram construction.

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

      Specified by:
      useCache in interface DdoModel<T>
      Returns:
      true if caching is enabled, false otherwise
    • relaxStrategy

      public final ReductionStrategy<T> relaxStrategy()
      Description copied from interface: DdoModel
      Strategy to select which nodes should be merged together on a relaxed DD.
      Specified by:
      relaxStrategy in interface DdoModel<T>
    • restrictStrategy

      public final ReductionStrategy<T> restrictStrategy()
      Description copied from interface: DdoModel
      Strategy to select which nodes should be dropped on a restricted DD.
      Specified by:
      restrictStrategy in interface DdoModel<T>
    • stateDistance

      public final StateDistance<T> stateDistance()
      Specified by:
      stateDistance in interface DdoModel<T>
    • variableHeuristic

      public final VariableHeuristic<T> variableHeuristic()
      Description copied from interface: Model
      Returns the heuristic used to determine the next variable to branch on during decision diagram compilation.

      By default, this method returns a DefaultVariableHeuristic instance.

      Specified by:
      variableHeuristic in interface Model<T>
      Returns:
      the VariableHeuristic guiding variable selection