javax.constraints
Enum OptimizationStrategy
java.lang.Object
java.lang.Enum<OptimizationStrategy>
javax.constraints.OptimizationStrategy
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<OptimizationStrategy>
public enum OptimizationStrategy
- extends java.lang.Enum<OptimizationStrategy>
These strategies are used by an optimization process implemented within the Solver's
method findOptimalSolution(Objective objective, Var objectiveVar, OptimizationStrategy optStrategy)
BASIC strategy iterates through solution assuming that each next solution has optimization objectives
better than in a previous solution.
DICHOTOMIZE strategy implements a dichotomized search of an optimal solution.
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.
NATIVE strategy implements a search strategy that is the best for a concrete implementation.
|
Method Summary |
static OptimizationStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static OptimizationStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
| Methods inherited from class java.lang.Enum |
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
BASIC
public static final OptimizationStrategy BASIC
DICHOTOMIZE
public static final OptimizationStrategy DICHOTOMIZE
NATIVE
public static final OptimizationStrategy NATIVE
valueOf
public static OptimizationStrategy valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is null
values
public static OptimizationStrategy[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (OptimizationStrategy c : OptimizationStrategy.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared