Package org.ddolib.nolayer.modeling
Interface Model<T>
- Type Parameters:
T- the type representing the state space of the problem
- All Known Subinterfaces:
AcsModel<T>,AwAstarModel<T>,DdoModel<T>
- All Known Implementing Classes:
GRModel,KSModel,MispModel,TSPModel,TSPTWModel
public interface Model<T>
Defines the core model interface for describing an optimization problem in the NoLayer API.
-
Method Summary
Modifier and TypeMethodDescriptiondefault DebugLevelReturns the debugging level.default NoLayerDominanceChecker<T> Returns the dominance checker used to prune dominated states.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 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
-
lowerBound
Returns a heuristic that estimates a lower bound on the objective value for a given state.- Returns:
- the
FastLowerBoundheuristic
-
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 reach a target state 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.- Returns:
- the
NoLayerDominanceCheckerused for dominance testing
-
verbosityLevel
Returns the verbosity level of the solver when this model is executed.- Returns:
- the desired
VerbosityLevel
-
debugMode
Returns the debugging level.- Returns:
- the
DebugLevelcontrolling debug behavior
-
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
-