Class CompilationConfig<T>

java.lang.Object
org.ddolib.ddo.core.compilation.CompilationConfig<T>
Type Parameters:
T - the type representing the state of the problem

public class CompilationConfig<T> extends Object
Represents the configuration parameters used during the compilation of a Multi-valued Decision Diagram (MDD) or similar decision structure.

A CompilationConfig object centralizes all components, heuristics, and algorithmic options required to guide the compilation process. It defines how the search space is explored, bounded, reduced, and pruned.

This configuration supports multiple compilation strategies such as exact, relaxed, approximate, or hybrid approaches. It also integrates advanced mechanisms like dominance checking, caching, and large neighborhood search (LNS).

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Best known upper bound on the objective value at compilation time.
    Optional cache to store previously computed states and avoid redundant work.
    Specifies how the MDD is compiled.
    Defines the cut set strategy used to control node expansion and pruning.
    Debugging level controlling logging and internal consistency checks.
    Dominance checker used to prune dominated states and reduce the size of the search space.
    Indicates whether the compiled MDD should be exported as a DOT file (Graphviz format) for visualization purposes.
    Fast lower bound heuristic used to estimate the best achievable objective value from a given state.
    int[]
    Initial solution provided to guide the search (e.g., for heuristics or LNS).
    Maximum allowed width (number of nodes) per layer in the MDD.
    double
    Probability parameter used in randomized strategies (e.g., LNS or heuristics).
    Reference to the optimization or constraint problem being solved.
    Strategy used to reduce the width of the MDD by merging or discarding nodes.
    Relaxation model used to approximate or merge states in relaxed MDD compilation.
    The residual (sub)problem defining the remaining search space to explore during compilation.
    int[]
    Stores the current or best solution found during compilation.
    Ranking heuristic used to prioritize states when pruning nodes in width-limited MDD layers.
    Indicates whether Large Neighborhood Search (LNS) should be used to improve solutions during compilation.
    Heuristic used to select the next variable to branch on during compilation.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new compilation configuration for the given model.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a shallow copy of this configuration.
    Returns a human-readable string representation of this configuration.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • compilationType

      public CompilationType compilationType
      Specifies how the MDD is compiled.

      Determines whether the compilation is exact, relaxed, approximate, or hybrid depending on the selected algorithm.

    • problem

      public Problem<T> problem
      Reference to the optimization or constraint problem being solved.
    • variableHeuristic

      public VariableHeuristic<T> variableHeuristic
      Heuristic used to select the next variable to branch on during compilation.
    • stateRanking

      public StateRanking<T> stateRanking
      Ranking heuristic used to prioritize states when pruning nodes in width-limited MDD layers.
    • residual

      public SubProblem<T> residual
      The residual (sub)problem defining the remaining search space to explore during compilation.
    • maxWidth

      public Integer maxWidth
      Maximum allowed width (number of nodes) per layer in the MDD.

      Smaller values improve performance but may reduce solution quality.

    • flb

      public FastLowerBound<T> flb
      Fast lower bound heuristic used to estimate the best achievable objective value from a given state.
    • dominance

      public DominanceChecker<T> dominance
      Dominance checker used to prune dominated states and reduce the size of the search space.
    • bestUB

      public Double bestUB
      Best known upper bound on the objective value at compilation time.
    • exportAsDot

      public Boolean exportAsDot
      Indicates whether the compiled MDD should be exported as a DOT file (Graphviz format) for visualization purposes.
    • debugLevel

      public DebugLevel debugLevel
      Debugging level controlling logging and internal consistency checks.

      Higher levels provide more detailed diagnostics but may impact performance.

    • reductionStrategy

      public ReductionStrategy<T> reductionStrategy
      Strategy used to reduce the width of the MDD by merging or discarding nodes.
    • relaxation

      public Relaxation<T> relaxation
      Relaxation model used to approximate or merge states in relaxed MDD compilation.
    • cache

      public Optional<SimpleCache<T>> cache
      Optional cache to store previously computed states and avoid redundant work.
    • cutSetType

      public CutSetType cutSetType
      Defines the cut set strategy used to control node expansion and pruning.
    • initialSolution

      public int[] initialSolution
      Initial solution provided to guide the search (e.g., for heuristics or LNS).
    • solution

      public int[] solution
      Stores the current or best solution found during compilation.
    • probability

      public double probability
      Probability parameter used in randomized strategies (e.g., LNS or heuristics).
    • useLNS

      public Boolean useLNS
      Indicates whether Large Neighborhood Search (LNS) should be used to improve solutions during compilation.
  • Constructor Details

    • CompilationConfig

      public CompilationConfig(Model<T> model)
      Constructs a new compilation configuration for the given model.
      Parameters:
      model - the model containing problem-specific components (heuristics, bounds, dominance, etc.)
  • Method Details

    • toString

      public String toString()
      Returns a human-readable string representation of this configuration.
      Overrides:
      toString in class Object
      Returns:
      a formatted string containing the compilation type, residual problem, and best known upper bound
    • copy

      public CompilationConfig<T> copy()
      Creates a shallow copy of this configuration.

      Some components are re-fetched from the underlying model (e.g., heuristics, bounds, dominance), while others are directly copied.

      Returns:
      a new CompilationConfig instance with the same parameters