Class TSPModel

java.lang.Object
org.ddolib.examples.nolayer.tsp.TSPModel
All Implemented Interfaces:
Model<TSPState>

public class TSPModel extends Object implements Model<TSPState>
Base model for the Traveling Salesman Problem (TSP), using the no-layer modeling API.

Bundles a TSPProblem instance together with the TSPFlb fast lower bound used to guide and prune the search.

  • Constructor Details

    • TSPModel

      public TSPModel(TSPProblem problem)
      Creates a new model for the given TSP instance.
      Parameters:
      problem - the TSP instance to solve
  • Method Details

    • problem

      public Problem<TSPState> problem()
      Description copied from interface: Model
      Returns the optimization problem instance associated with this model.
      Specified by:
      problem in interface Model<TSPState>
      Returns:
      the Problem defining the structure, transitions, and objective function
    • lowerBound

      public FastLowerBound<TSPState> lowerBound()
      Description copied from interface: Model
      Returns a heuristic that estimates a lower bound on the objective value for a given state.
      Specified by:
      lowerBound in interface Model<TSPState>
      Returns:
      the FastLowerBound heuristic