Interface Model<T>
- Type Parameters:
T- the type representing the state space of the problem
- All Known Subinterfaces:
AcsModel<T>,AwAstarModel<T>,DdoModel<T>,LnsModel<T>
- All Known Implementing Classes:
ExactModel
A Model encapsulates all components required to define, evaluate, and guide the
resolution of an optimization problem. It specifies the Problem instance to solve and
optionally provides custom heuristics, dominance relations, and debugging or verbosity
configurations.
Implementations of this interface typically serve as the entry point for configuring solvers
such as ExactSolver or SequentialSolver. Users can override the default
methods to customize behavior such as lower bound evaluation, variable selection heuristics, or
dominance checking.
-
Method Summary
Modifier and TypeMethodDescriptiondefault DebugLevelReturns the debugging level to apply during the compilation and solving phases.Returns a copy of this model but without dominance.Returns a copy of this model but withoutFastLowerBound.default DominanceChecker<T> Returns the dominance checker used to prune dominated states from the search space.default SolutionReturns a precomputed solution to start the search from.default FastLowerBound<T> Returns a heuristic that estimates a lower bound on the objective value for a given state.problem()Returns the optimization problem instance associated with this model.setInitialSolution(Solution solution) Returns a copy of this model but with the given initial solution.default VariableHeuristic<T> Returns the heuristic used to determine the next variable to branch on during decision diagram compilation.default VerbosityLevelReturns the verbosity level of the solver when this model is executed.
-
Method Details
-
problem
Returns the optimization problem instance associated with this model.- Returns:
- the
Problemdefining the structure, transitions, and objective function of the optimization task
-
lowerBound
Returns a heuristic that estimates a lower bound on the objective value for a given state.By default, this method provides a
DefaultFastLowerBoundinstance, which can be overridden for problem-specific bound estimation.- Returns:
- the
FastLowerBoundheuristic used to compute lower bounds
-
initialSolution
Returns a precomputed solution to start the search from.Its value is used as initial upper bound, which allows to start pruning earlier. It is returned by the solver if no better solution is found. A non-empty solution must assign all the variables and be feasible.
By default, it returns
null. Anullor empty solution means that no initial solution is available.- Returns:
- a precomputed solution, or
nullif there is none
-
dominance
Returns the dominance checker used to prune dominated states from the search space.By default, this method provides a
DefaultDominanceCheckerinstance, which can be replaced by custom dominance logic tailored to the problem.- Returns:
- the
DominanceCheckerused for dominance testing
-
variableHeuristic
Returns the heuristic used to determine the next variable to branch on during decision diagram compilation.By default, this method returns a
DefaultVariableHeuristicinstance.- Returns:
- the
VariableHeuristicguiding variable selection
-
verbosityLevel
Returns the verbosity level of the solver when this model is executed.By default, the verbosity level is
VerbosityLevel.SILENT.- Returns:
- the desired
VerbosityLevel
-
debugMode
Returns the debugging level to apply during the compilation and solving phases.By default, debugging is disabled (
DebugLevel.OFF).- Returns:
- the
DebugLevelcontrolling debug behavior
-
disableDominance
Returns a copy of this model but without dominance.- Returns:
- a copy of this model but without dominance
-
disableLowerBound
Returns a copy of this model but withoutFastLowerBound.- Returns:
- a copy of this model but without
FastLowerBound
-
setInitialSolution
Returns a copy of this model but with the given initial solution.- Parameters:
solution- the initial solution (seeinitialSolution())- Returns:
- a copy of this model but with the given initial solution
-