Deprecated
As of 3.1 (to be removed in 4.0).
This base class handles the boilerplate methods associated to thresholds settings and iterations counters.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | DEFAULT_MAX_ITERATIONS
Default maximal number of iterations allowed. |
| private LinearObjectiveFunction | function
Deprecated
as a consequence of Linear objective function.
LinearObjectiveFunction being deprecated.
|
| private GoalType | goal
Deprecated
as a consequence of Type of optimization goal: either GoalType being deprecated.
GoalType#MAXIMIZE or GoalType#MINIMIZE.
|
| private int | iterations
Number of iterations already performed. |
| private Collection | linearConstraints
Linear constraints. |
| private int | maxIterations
Maximal number of iterations allowed. |
| private boolean | nonNegative
Whether to restrict the variables to non-negative values. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract PointValuePair | Returns: the point/value pair giving the optimal value for objective function
Deprecated
as a consequence of
PointValuePair being deprecated.
Perform the bulk of optimization algorithm. |
| protected Collection | |
| protected LinearObjectiveFunction | Returns: the optimization type.
Deprecated
as a consequence of
LinearObjectiveFunction being deprecated.
|
| protected GoalType | Returns: the optimization type.
Deprecated
as a consequence of
GoalType being deprecated.
|
| public int | getIterations()
Implements org. Get the number of iterations realized by the algorithm. |
| public int | getMaxIterations()
Implements org. Get the maximal number of iterations of the algorithm. |
| protected void | |
| public PointValuePair | optimize(final LinearObjectiveFunction
linear objective function f, final Collection<LinearConstraint> linear constraints constraints, final GoalType type of optimization goal: either goalType, final boolean GoalType#MAXIMIZE or GoalType#MINIMIZEwhether to restrict the variables to non-negative values restrictToNonNegative)Implements org.
Deprecated
as a consequence of
LinearObjectiveFunction, GoalType and PointValuePair being deprecated.
Optimizes an objective function. |
| protected boolean | |
| public void | setMaxIterations(int
maximal number of function calls maxIterations)Implements org. Set the maximal number of iterations of the algorithm. |
| DEFAULT_MAX_ITERATIONS | back to summary |
|---|---|
| public static final int DEFAULT_MAX_ITERATIONS Default maximal number of iterations allowed. | |
| function | back to summary |
|---|---|
| private LinearObjectiveFunction function
Deprecated as a consequence of Linear objective function.
| |
| goal | back to summary |
|---|---|
| private GoalType goal
Deprecated as a consequence of Type of optimization goal: either
| |
| iterations | back to summary |
|---|---|
| private int iterations Number of iterations already performed. | |
| linearConstraints | back to summary |
|---|---|
| private Collection<LinearConstraint> linearConstraints Linear constraints.
| |
| maxIterations | back to summary |
|---|---|
| private int maxIterations Maximal number of iterations allowed. | |
| nonNegative | back to summary |
|---|---|
| private boolean nonNegative Whether to restrict the variables to non-negative values.
| |
| AbstractLinearOptimizer | back to summary |
|---|---|
| protected AbstractLinearOptimizer() Simple constructor with default settings. The maximal number of evaluation is set to its default value. | |
| doOptimize | back to summary |
|---|---|
| protected abstract PointValuePair doOptimize() throws MathIllegalStateException
Deprecated as a consequence of Perform the bulk of optimization algorithm.
| |
| getConstraints | back to summary |
|---|---|
protected Collection
| |
| getFunction | back to summary |
|---|---|
| protected LinearObjectiveFunction getFunction()
Deprecated as a consequence of
| |
| getGoalType | back to summary |
|---|---|
| protected GoalType getGoalType()
Deprecated as a consequence of
| |
| getIterations | back to summary |
|---|---|
| public int getIterations() Implements org. Doc from org. Get the number of iterations realized by the algorithm.
The number of evaluations corresponds to the last call to the
| |
| getMaxIterations | back to summary |
|---|---|
| public int getMaxIterations() Implements org. Doc from org. Get the maximal number of iterations of the algorithm.
| |
| incrementIterationsCounter | back to summary |
|---|---|
| protected void incrementIterationsCounter() throws MaxCountExceededException Increment the iterations counter by 1.
| |
| optimize | back to summary |
|---|---|
| public PointValuePair optimize(final LinearObjectiveFunction f, final Collection<LinearConstraint> constraints, final GoalType goalType, final boolean restrictToNonNegative) throws MathIllegalStateException Implements org. Doc from org. Deprecated as a consequence of Optimizes an objective function.
| |
| restrictToNonNegative | back to summary |
|---|---|
protected boolean restrictToNonNegative()
| |
| setMaxIterations | back to summary |
|---|---|
| public void setMaxIterations(int maxIterations) Implements org. Doc from org. Set the maximal number of iterations of the algorithm.
| |