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 Details

    • problem

      Problem<T> problem()
      Returns the optimization problem instance associated with this model.
      Returns:
      the Problem defining the structure, transitions, and objective function
    • lowerBound

      default FastLowerBound<T> lowerBound()
      Returns a heuristic that estimates a lower bound on the objective value for a given state.
      Returns:
      the FastLowerBound heuristic
    • initialSolution

      default Solution 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. A null or empty solution means that no initial solution is available.

      Returns:
      a precomputed solution, or null if there is none
    • dominance

      default NoLayerDominanceChecker<T> dominance()
      Returns the dominance checker used to prune dominated states.
      Returns:
      the NoLayerDominanceChecker used for dominance testing
    • verbosityLevel

      default VerbosityLevel verbosityLevel()
      Returns the verbosity level of the solver when this model is executed.
      Returns:
      the desired VerbosityLevel
    • debugMode

      default DebugLevel debugMode()
      Returns the debugging level.
      Returns:
      the DebugLevel controlling debug behavior
    • setInitialSolution

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