Package org.ddolib.nolayer.modeling
Interface AwAstarModel<T>
- Type Parameters:
T- the type of states in the problem
- All Superinterfaces:
Model<T>
Defines the structure of an optimization model solved using the Anytime Weighted A* (AWA*)
algorithm within the no-layer framework.
The Anytime Weighted A* algorithm is derived from the A* algorithm. By adding a weight to the heuristic function, it speeds up reaching a feasible solution, then incrementally improves the best solution found.
-
Method Summary
Modifier and TypeMethodDescriptiondefault AwAstarModel<T> setInitialSolution(Solution solution) Returns a copy of this model but with the given initial solution.default AwAstarModel<T> setWeight(double w) Returns a copy of this model but with another weight.default doubleweight()Returns the weight to add to the heuristic function.Methods inherited from interface org.ddolib.nolayer.modeling.Model
debugMode, dominance, initialSolution, lowerBound, problem, verbosityLevel
-
Method Details
-
weight
default double weight()Returns the weight to add to the heuristic function. Must be > 1- Returns:
- the weight to add to the heuristic function (5 by default)
-
setWeight
Returns a copy of this model but with another weight.- Parameters:
w- the weight to use- Returns:
- a copy of this model but with another weight
-
setInitialSolution
Returns a copy of this model but with the given initial solution.- Specified by:
setInitialSolutionin interfaceModel<T>- Parameters:
solution- the initial solution (seeModel.initialSolution())- Returns:
- a copy of this model but with the given initial solution
-