Package xal.extension.solver.algorithm
Class SimplexSearchAlgorithm
java.lang.Object
xal.extension.solver.algorithm.SearchAlgorithm
xal.extension.solver.algorithm.SimplexSearchAlgorithm
- All Implemented Interfaces:
AlgorithmScheduleListener
,SolutionJudgeListener
Simplex optimization search algorithm.
- Author:
- shishlo
-
Field Summary
Fields inherited from class xal.extension.solver.algorithm.SearchAlgorithm
EFFICIENCY_COMPARATOR, problem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
foundNewOptimalSolution
(SolutionJudge source, List<Trial> solutions, Trial solution) Send a message that a new optimal solution has been found.getLabel()
Get the label for this search algorithm.int
Get the maximum number of evaluations per run.int
Get the minimum number of evaluations per run.int
Get the rating for this algorithm which in an integer between 0 and 10 and indicates how well this algorithm performs on global searches.int
Get the rating for this algorithm which in an integer between 0 and 10 and indicates how well this algorithm performs on local searches.void
performRun
(AlgorithmSchedule algorithmSchedule) Calculate the next few trial points.void
reset()
Reset this algorithm.void
setProblem
(Problem problem) Set the specified problem to solve.void
trialScored
(AlgorithmSchedule schedule, Trial trial) Handle a message that a trial has been scored.void
trialVetoed
(AlgorithmSchedule schedule, Trial trial) Handle a message that a trial has been vetoed.Methods inherited from class xal.extension.solver.algorithm.SearchAlgorithm
addSearchAlgorithmListener, algorithmRunExecuted, algorithmRunWillExecute, evaluateTrialPoint, executeRun, getEfficiency, getEvaluationsLeft, removeSearchAlgorithmListener, setProposedEvaluations
-
Constructor Details
-
SimplexSearchAlgorithm
public SimplexSearchAlgorithm()Empty constructor.
-
-
Method Details
-
setProblem
Set the specified problem to solve. Override the inherited method to initialize the searcher.- Overrides:
setProblem
in classSearchAlgorithm
- Parameters:
problem
- the problem to solve
-
reset
public void reset()Reset this algorithm.- Overrides:
reset
in classSearchAlgorithm
-
getLabel
Get the label for this search algorithm.- Specified by:
getLabel
in classSearchAlgorithm
- Returns:
- The label for this algorithm
-
performRun
Calculate the next few trial points.- Specified by:
performRun
in classSearchAlgorithm
-
getMinEvaluationsPerRun
public int getMinEvaluationsPerRun()Get the minimum number of evaluations per run.- Overrides:
getMinEvaluationsPerRun
in classSearchAlgorithm
- Returns:
- the minimum number of evaluation per run.
-
getMaxEvaluationsPerRun
public int getMaxEvaluationsPerRun()Get the maximum number of evaluations per run.- Overrides:
getMaxEvaluationsPerRun
in classSearchAlgorithm
- Returns:
- the maximum number of evaluation per run.
-
globalRating
public int globalRating()Get the rating for this algorithm which in an integer between 0 and 10 and indicates how well this algorithm performs on global searches.- Returns:
- The global search rating for this algorithm.
-
localRating
public int localRating()Get the rating for this algorithm which in an integer between 0 and 10 and indicates how well this algorithm performs on local searches.- Returns:
- The local search rating for this algorithm.
-
trialScored
Handle a message that a trial has been scored.- Specified by:
trialScored
in interfaceAlgorithmScheduleListener
- Overrides:
trialScored
in classSearchAlgorithm
- Parameters:
schedule
- Description of the Parametertrial
- Description of the Parameter
-
trialVetoed
Handle a message that a trial has been vetoed.- Specified by:
trialVetoed
in interfaceAlgorithmScheduleListener
- Overrides:
trialVetoed
in classSearchAlgorithm
- Parameters:
schedule
- Description of the Parametertrial
- Description of the Parameter
-
foundNewOptimalSolution
Send a message that a new optimal solution has been found.- Specified by:
foundNewOptimalSolution
in interfaceSolutionJudgeListener
- Overrides:
foundNewOptimalSolution
in classSearchAlgorithm
- Parameters:
source
- The source of the new optimal solution.solutions
- The list of solutions.solution
- The new optimal solution.
-