Package xal.extension.solver.algorithm
Class RandomShrinkSearch.ComboSearcher
java.lang.Object
xal.extension.solver.algorithm.RandomShrinkSearch.RandomSearcher
xal.extension.solver.algorithm.RandomShrinkSearch.ComboSearcher
- All Implemented Interfaces:
RandomShrinkSearch.Searcher
- Enclosing class:
- RandomShrinkSearch
Use a combination of search engines to search for the best solution.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RandomShrinkSearch.RandomSearcher
Description of the Fieldprotected static final double
Description of the Fieldprotected RandomShrinkSearch.ShrinkSearcher
Description of the FieldFields inherited from class xal.extension.solver.algorithm.RandomShrinkSearch.RandomSearcher
changeProbabilityBase, numVariables, randomGenerator, values
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
newTopSolution
(TrialPoint oldPoint, TrialPoint newPoint) An event indicating that a new solution has been found which is better than the previous best solution according to the score given by the evaluator.protected double
proposeValue
(Variable variable) Propose a new value for the variable by picking a search engine to propose a new value.void
reset()
reset for searching from scratch; forget historyvoid
turns shouldShift onMethods inherited from class xal.extension.solver.algorithm.RandomShrinkSearch.RandomSearcher
nextPoint, nextPoint, nextTrialPoint
-
Field Details
-
shrinkSearcher
Description of the Field -
randomSearcher
Description of the Field -
SHRINK_THRESHOLD
protected static final double SHRINK_THRESHOLDDescription of the Field- See Also:
-
-
Constructor Details
-
ComboSearcher
public ComboSearcher()Constructor
-
-
Method Details
-
shouldShift
public void shouldShift()turns shouldShift on- Specified by:
shouldShift
in interfaceRandomShrinkSearch.Searcher
- Overrides:
shouldShift
in classRandomShrinkSearch.RandomSearcher
-
reset
public void reset()reset for searching from scratch; forget history- Specified by:
reset
in interfaceRandomShrinkSearch.Searcher
- Overrides:
reset
in classRandomShrinkSearch.RandomSearcher
-
newTopSolution
An event indicating that a new solution has been found which is better than the previous best solution according to the score given by the evaluator.- Specified by:
newTopSolution
in interfaceRandomShrinkSearch.Searcher
- Overrides:
newTopSolution
in classRandomShrinkSearch.RandomSearcher
- Parameters:
oldPoint
- The old best point.newPoint
- The new best point.
-
proposeValue
Propose a new value for the variable by picking a search engine to propose a new value.- Overrides:
proposeValue
in classRandomShrinkSearch.RandomSearcher
- Parameters:
variable
- the variable for which to propose a new value- Returns:
- the new value to propose for the variable
-