@Deprecated public interface LinearOptimizer
Optimization algorithms find the input point set that either maximize or minimize
an objective function. In the linear case the form of
the function is restricted to
c1x1 + ... cnxn = vand there may be linear constraints too, of one of the forms:
Modifier and Type | Method and Description |
---|---|
int |
getIterations()
Deprecated.
Get the number of iterations realized by the algorithm.
|
int |
getMaxIterations()
Deprecated.
Get the maximal number of iterations of the algorithm.
|
PointValuePair |
optimize(LinearObjectiveFunction f,
Collection<LinearConstraint> constraints,
GoalType goalType,
boolean restrictToNonNegative)
Deprecated.
Optimizes an objective function.
|
void |
setMaxIterations(int maxIterations)
Deprecated.
Set the maximal number of iterations of the algorithm.
|
void setMaxIterations(int maxIterations)
maxIterations
- maximal number of function callsint getMaxIterations()
int getIterations()
The number of evaluations corresponds to the last call to the
optimize
method. It is 0 if the method has not been called yet.
PointValuePair optimize(LinearObjectiveFunction f, Collection<LinearConstraint> constraints, GoalType goalType, boolean restrictToNonNegative) throws MathIllegalStateException
f
- linear objective functionconstraints
- linear constraintsgoalType
- type of optimization goal: either GoalType.MAXIMIZE
or GoalType.MINIMIZE
restrictToNonNegative
- whether to restrict the variables to non-negative valuesMathIllegalStateException
- if no solution fulfilling the constraints
can be found in the allowed number of iterationsCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.