|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a class that creates and returns common local search actions and objects that can be used to build searches
Method Summary | |
SearchAction |
browseNeighborhood(SolverSolution initial,
Neighborhood hood,
CurrentNeighbor current)
This action will browse a list of neighbors produced from a Neighborhood
and attempt to apply each in turn in order to locate other valid solutions to
the problem. |
SearchAction |
browseNeighborhood(SolverSolution initial,
Neighborhood hood,
Metaheuristic meta,
CurrentNeighbor current)
This action will browse a list of neighboring solutions with the guidance of a metaheuristic used to determine which solutions are acceptable. |
SearchAction |
browseNeighbors(SolverSolution initial,
SolverSolution[] neighbors)
This action will browse a list of neighboring solutions based on an initial solution. |
Neighborhood |
flipNeighborhood(CspIntVariable[] vars)
Creates a neighborhood that is useful for flipping 0 and 1 values on binary variables. |
SearchAction |
improve(SolverSolution solution,
double step)
Action that will post a constraint during searching that will require additional solutions located to be better than the solution given to this action. |
SearchAction |
improve(SolverSolution solution,
float step)
Action that will post a constraint during searching that will require additional solutions located to be better than the solution given to this action. |
SearchAction |
improve(SolverSolution solution,
int step)
Action that will post a constraint during searching that will require additional solutions located to be better than the solution given to this action. |
SearchAction |
improve(SolverSolution solution,
long step)
Action that will post a constraint during searching that will require additional solutions located to be better than the solution given to this action. |
SearchAction |
moveToNeighbor(SolverSolution initial,
SolverSolution neighbor)
Restores a neighboring solution to the solver |
SearchAction |
neighborMove(SolverSolution solution,
Neighborhood hood)
Advanced action that performs all actions necessary to move to a neighboring solution during local search operations and will only return the first valid neighboring solution |
SearchAction |
neighborMove(SolverSolution solution,
Neighborhood hood,
Metaheuristic meta)
Advanced action that performs all actions necessary to move to a neighboring solution during local search operations and will only return the first valid neighboring solution |
SearchAction |
neighborMove(SolverSolution solution,
Neighborhood hood,
Metaheuristic meta,
SearchGoal goal)
Advanced action that performs all actions necessary to move to a neighboring solution during local search operations and will only return the first valid neighboring solution |
SearchAction |
neighborMove(SolverSolution solution,
Neighborhood hood,
SearchGoal goal)
Advanced action that performs all actions necessary to move to a neighboring solution during local search operations and will only return the first valid neighboring solution |
Neighborhood |
randomize(Neighborhood neighborhood)
Creates a randomized neighborhood from the specified neighborhood |
Neighborhood |
randomize(Neighborhood[] neighborhoods)
Creates a unified, randomized neighborhood from the specified neighborhoods |
SearchAction |
selectCurrentNeighbor(SolverSolution initial,
CurrentNeighbor current)
Advises neighborhoods that the current neighbor is about to be made the new initial solution. |
Neighborhood |
swapNeighborhood(CspIntVariable[] vars)
Creates a neighborhood where each neighbor selects two variables from the initial solution and swaps their values |
Metaheuristic |
tabu(int forbiddenUndoMoves)
Tabu Search metaheuristic that tracks moves performed during a local search and maintains lists of moves that are forbidden. |
Metaheuristic |
tabu(int forbiddenUndoMoves,
double objectiveGap)
Tabu Search metaheuristic that tracks moves performed during a local search and maintains lists of moves that are forbidden. |
Metaheuristic |
tabu(int forbiddenUndoMoves,
int forbiddenAlterMoves,
double objectiveGap)
Tabu Search metaheuristic that tracks moves performed during a local search and maintains lists of moves that are forbidden. |
SearchAction |
tabuMove(SolverSolution solution,
Neighborhood hood,
int numToCheck)
|
SearchAction |
tabuMove(SolverSolution solution,
Neighborhood hood,
Metaheuristic meta,
int numToCheck)
|
SearchAction |
tabuMove(SolverSolution solution,
Neighborhood hood,
Metaheuristic meta,
SearchGoal goal,
int numToCheck)
|
SearchAction |
tabuMove(SolverSolution solution,
Neighborhood hood,
SearchGoal goal,
int numToCheck)
|
Neighborhood |
unifiedNeighborhood(Neighborhood[] neighborhoods)
Creates a neighborhood from a combination of several neighborhoods |
Neighborhood |
weightedRandomize(Neighborhood[] neighborhoods,
double[] weights)
Creates a unified, randomized, weighted neighborhood using the specified neighbors and weights. |
Method Detail |
public SearchAction browseNeighbors(SolverSolution initial, SolverSolution[] neighbors)
CspSolver
class's
CspSolver.reset()
and
CspSolver.restoreNeighboringSolution(SolverSolution, SolverSolution)
This action is not a replacement of the restore neighboring solution
method in the CspSolver class. It is just a convenient way of calling
the restore during a search.
initial
- Initial solution related to neighborneighbors
- Array of neighboring solutions to be browsedpublic SearchAction moveToNeighbor(SolverSolution initial, SolverSolution neighbor)
initial
- Initial solution related to neighborneighbor
- Neighboring solution to be restoredpublic Neighborhood flipNeighborhood(CspIntVariable[] vars)
vars
- Array of variables to be flipped to produce neighborhoodpublic Neighborhood swapNeighborhood(CspIntVariable[] vars)
vars
- Array of variables to be swappedpublic Neighborhood unifiedNeighborhood(Neighborhood[] neighborhoods)
neighborhoods
- the neighborhoods to "combine"public Neighborhood randomize(Neighborhood[] neighborhoods)
neighborhoods
- the neighborhoods to "combine" and randomizepublic Neighborhood randomize(Neighborhood neighborhood)
neighborhood
- to be randomizedpublic Neighborhood weightedRandomize(Neighborhood[] neighborhoods, double[] weights)
neighborhoods
- the neighborhoods to unify and randomizeweights
- the weights determining how frequently neighbors
from the associated neighborhood are returnedpublic SearchAction browseNeighborhood(SolverSolution initial, Neighborhood hood, CurrentNeighbor current)
Neighborhood
and attempt to apply each in turn in order to locate other valid solutions to
the problem. The application of a neighboring solution is very similar to
restoring a solution. It does not reset any of the variables, but simply constrains
them further to conform to the values of the currently selected neighbor.
If you want to want to apply a neighboring solution to a problem so the
exact solution is restored, you may want to refer to the CspSolver
class's
CspSolver.reset()
and
CspSolver.restoreNeighboringSolution(SolverSolution, SolverSolution)
This action is not a replacement of the restore neighboring solution
method in the CspSolver class. It is just a convenient way of calling
the restore during a search.
initial
- Initial solution related to neighborhood
- Neighborhood of solutions, each to be applied as an alternative choicescurrent
- Updated as neighbors are restored to solver to store the currently selected neighborbrowseNeighbors(SolverSolution, SolverSolution[])
,
selectCurrentNeighbor(SolverSolution, CurrentNeighbor)
public SearchAction browseNeighborhood(SolverSolution initial, Neighborhood hood, Metaheuristic meta, CurrentNeighbor current)
initial
- Initial solution related to neighborhood
- Neighborhood of solutions, each to be applied as an alternative choicemeta
- Metaheuristic used to guide the searchcurrent
- Updated as neighbors are restored to solver to store the currently selected neighborbrowseNeighborhood(SolverSolution, Neighborhood, CurrentNeighbor)
public SearchAction selectCurrentNeighbor(SolverSolution initial, CurrentNeighbor current)
neighborSelected()
method on the
neighborhood that produced the solution before the initial solution is
updated.
initial
- Initial solution neighbor is based upon that will be updatedcurrent
- Current neighboring solution that is applied to the problempublic SearchAction improve(SolverSolution solution, int step)
solution
- Solution that should be improved uponstep
- Positive value indicating amount objective value should be improvedpublic SearchAction improve(SolverSolution solution, float step)
solution
- Solution that should be improved uponstep
- Positive value indicating amount objective value should be improvedpublic SearchAction improve(SolverSolution solution, long step)
solution
- Solution that should be improved uponstep
- Positive value indicating amount objective value should be improvedpublic SearchAction improve(SolverSolution solution, double step)
solution
- Solution that should be improved uponstep
- Positive value indicating amount objective value should be improvedpublic SearchAction neighborMove(SolverSolution solution, Neighborhood hood, Metaheuristic meta, SearchGoal goal)
solution
- Solution that move is based upon and result will be stored inhood
- Neighborhood of solutions relative to initialmeta
- Metaheuristic used to guide the searchgoal
- Search goal used to select neighboring solutionpublic SearchAction neighborMove(SolverSolution solution, Neighborhood hood, Metaheuristic meta)
solution
- Solution that move is based upon and result will be stored inhood
- Neighborhood of solutions relative to initialmeta
- Metaheuristic used to guide the searchpublic SearchAction neighborMove(SolverSolution solution, Neighborhood hood, SearchGoal goal)
solution
- Solution that move is based upon and result will be stored inhood
- Neighborhood of solutions relative to initialgoal
- Search goal used to select neighboring solutionpublic SearchAction neighborMove(SolverSolution solution, Neighborhood hood)
solution
- Solution that move is based upon and result will be stored inhood
- Neighborhood of solutions relative to initialpublic SearchAction tabuMove(SolverSolution solution, Neighborhood hood, Metaheuristic meta, SearchGoal goal, int numToCheck)
public SearchAction tabuMove(SolverSolution solution, Neighborhood hood, Metaheuristic meta, int numToCheck)
public SearchAction tabuMove(SolverSolution solution, Neighborhood hood, SearchGoal goal, int numToCheck)
public SearchAction tabuMove(SolverSolution solution, Neighborhood hood, int numToCheck)
public Metaheuristic tabu(int forbiddenUndoMoves, int forbiddenAlterMoves, double objectiveGap)
forbiddenUndoMoves
- Number of moves that will return a variable to a previous value that are not allowedforbiddenAlterMoves
- Number of moves that will alter a previously changed variable in any way that are not allowedobjectiveGap
- Amount objective value of move must be within initial objective valuebrowseNeighborhood(SolverSolution, Neighborhood, Metaheuristic, CurrentNeighbor)
public Metaheuristic tabu(int forbiddenUndoMoves, double objectiveGap)
forbiddenUndoMoves
- Number of moves that will return a variable to a previous value that are not allowedobjectiveGap
- Amount objective value of move must be within initial objective valuebrowseNeighborhood(SolverSolution, Neighborhood, Metaheuristic, CurrentNeighbor)
public Metaheuristic tabu(int forbiddenUndoMoves)
forbiddenUndoMoves
- Number of moves that will return a variable to a previous value that are not allowedbrowseNeighborhood(SolverSolution, Neighborhood, Metaheuristic, CurrentNeighbor)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |