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 TypeMethodDescriptionvoidfoundNewOptimalSolution(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.intGet the maximum number of evaluations per run.intGet the minimum number of evaluations per run.intGet the rating for this algorithm which in an integer between 0 and 10 and indicates how well this algorithm performs on global searches.intGet the rating for this algorithm which in an integer between 0 and 10 and indicates how well this algorithm performs on local searches.voidperformRun(AlgorithmSchedule algorithmSchedule) Calculate the next few trial points.voidreset()Reset this algorithm.voidsetProblem(Problem problem) Set the specified problem to solve.voidtrialScored(AlgorithmSchedule schedule, Trial trial) Handle a message that a trial has been scored.voidtrialVetoed(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:
setProblemin classSearchAlgorithm- Parameters:
problem- the problem to solve
-
reset
public void reset()Reset this algorithm.- Overrides:
resetin classSearchAlgorithm
-
getLabel
Get the label for this search algorithm.- Specified by:
getLabelin classSearchAlgorithm- Returns:
- The label for this algorithm
-
performRun
Calculate the next few trial points.- Specified by:
performRunin classSearchAlgorithm
-
getMinEvaluationsPerRun
public int getMinEvaluationsPerRun()Get the minimum number of evaluations per run.- Overrides:
getMinEvaluationsPerRunin classSearchAlgorithm- Returns:
- the minimum number of evaluation per run.
-
getMaxEvaluationsPerRun
public int getMaxEvaluationsPerRun()Get the maximum number of evaluations per run.- Overrides:
getMaxEvaluationsPerRunin 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:
trialScoredin interfaceAlgorithmScheduleListener- Overrides:
trialScoredin classSearchAlgorithm- Parameters:
schedule- Description of the Parametertrial- Description of the Parameter
-
trialVetoed
Handle a message that a trial has been vetoed.- Specified by:
trialVetoedin interfaceAlgorithmScheduleListener- Overrides:
trialVetoedin 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:
foundNewOptimalSolutionin interfaceSolutionJudgeListener- Overrides:
foundNewOptimalSolutionin classSearchAlgorithm- Parameters:
source- The source of the new optimal solution.solutions- The list of solutions.solution- The new optimal solution.
-