javax.constraints.impl.search
Class Dichotomize
java.lang.Object
javax.constraints.impl.search.Dichotomize
public class Dichotomize
- extends java.lang.Object
This class is used by the Solver's method "findOptimalSolutionDichotomize". Its method
"execute" is trying to find a solution that minimizes the parameter
"objective" using the current search strategy.
The "tolerance" specifies a difference between different optimal
solutions that can be ignored. It may be considered as a precision of the
search algorithm.
|
Method Summary |
Solution |
execute()
The actual minimization algorithm executes a dichotomized search. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Dichotomize
public Dichotomize(Solver solver,
Var objective)
execute
public Solution execute()
- The actual minimization algorithm executes a dichotomized search. During
the search it modifies an interval [objectiveMin; objectiveMax]. First it
is trying to find a solution in the [objectiveMin; objectiveMid]. If it
fails, it is looking at [objectiveMid+1; objectiveMax]. During this
process it switches the search target: one time in looks at in the upper
half of the selected interval, another time - to the lower half.
Successful search stops when objectiveMax - objectiveMin <= tolerance.