Class PowellOptimizer
java.lang.Object
org.hipparchus.optim.BaseOptimizer<P>
org.hipparchus.optim.BaseMultivariateOptimizer<PointValuePair>
org.hipparchus.optim.nonlinear.scalar.MultivariateOptimizer
org.hipparchus.optim.nonlinear.scalar.noderiv.PowellOptimizer
Powell's algorithm.
This code is translated and adapted from the Python version of this
algorithm (as implemented in module
The default stopping criterion is based on the differences of the function value between two successive iterations. It is however possible to define a custom convergence checker that might terminate the algorithm earlier.
Line search is performed by the
Constraints are not supported: the call to
optimize.py
v0.5 of
SciPy).
The default stopping criterion is based on the differences of the function value between two successive iterations. It is however possible to define a custom convergence checker that might terminate the algorithm earlier.
Line search is performed by the
LineSearch
class.
Constraints are not supported: the call to
MultivariateOptimizer.optimize(OptimizationData...)
optimize} will throw
MathRuntimeException
if bounds are passed to it.
In order to impose simple constraints, the objective function must be
wrapped in an adapter like
MultivariateFunctionMappingAdapter
or
MultivariateFunctionPenaltyAdapter
.-
Field Summary
Fields inherited from class org.hipparchus.optim.BaseOptimizer
evaluations, iterations
-
Constructor Summary
ConstructorDescriptionPowellOptimizer
(double rel, double abs) The parameters control the default convergence checking procedure.PowellOptimizer
(double rel, double abs, double lineRel, double lineAbs) Builds an instance with the default convergence checking procedure.PowellOptimizer
(double rel, double abs, double lineRel, double lineAbs, ConvergenceChecker<PointValuePair> checker) This constructor allows to specify a user-defined convergence checker, in addition to the parameters that control the default convergence checking procedure and the line search tolerances.PowellOptimizer
(double rel, double abs, ConvergenceChecker<PointValuePair> checker) This constructor allows to specify a user-defined convergence checker, in addition to the parameters that control the default convergence checking procedure. -
Method Summary
Modifier and TypeMethodDescriptionprotected PointValuePair
Performs the bulk of the optimization algorithm.Methods inherited from class org.hipparchus.optim.nonlinear.scalar.MultivariateOptimizer
computeObjectiveValue, getGoalType, optimize, parseOptimizationData
Methods inherited from class org.hipparchus.optim.BaseMultivariateOptimizer
getLowerBound, getStartPoint, getUpperBound
Methods inherited from class org.hipparchus.optim.BaseOptimizer
getConvergenceChecker, getEvaluations, getIterations, getMaxEvaluations, getMaxIterations, incrementEvaluationCount, incrementIterationCount, optimize
-
Constructor Details
-
PowellOptimizer
This constructor allows to specify a user-defined convergence checker, in addition to the parameters that control the default convergence checking procedure.
The internal line search tolerances are set to the square-root of their corresponding value in the multivariate optimizer.- Parameters:
rel
- Relative threshold.abs
- Absolute threshold.checker
- Convergence checker.- Throws:
MathIllegalArgumentException
- ifabs <= 0
.MathIllegalArgumentException
- ifrel < 2 * FastMath.ulp(1d)
.
-
PowellOptimizer
public PowellOptimizer(double rel, double abs, double lineRel, double lineAbs, ConvergenceChecker<PointValuePair> checker) This constructor allows to specify a user-defined convergence checker, in addition to the parameters that control the default convergence checking procedure and the line search tolerances.- Parameters:
rel
- Relative threshold for this optimizer.abs
- Absolute threshold for this optimizer.lineRel
- Relative threshold for the internal line search optimizer.lineAbs
- Absolute threshold for the internal line search optimizer.checker
- Convergence checker.- Throws:
MathIllegalArgumentException
- ifabs <= 0
.MathIllegalArgumentException
- ifrel < 2 * FastMath.ulp(1d)
.
-
PowellOptimizer
public PowellOptimizer(double rel, double abs) The parameters control the default convergence checking procedure.
The internal line search tolerances are set to the square-root of their corresponding value in the multivariate optimizer.- Parameters:
rel
- Relative threshold.abs
- Absolute threshold.- Throws:
MathIllegalArgumentException
- ifabs <= 0
.MathIllegalArgumentException
- ifrel < 2 * FastMath.ulp(1d)
.
-
PowellOptimizer
public PowellOptimizer(double rel, double abs, double lineRel, double lineAbs) Builds an instance with the default convergence checking procedure.- Parameters:
rel
- Relative threshold.abs
- Absolute threshold.lineRel
- Relative threshold for the internal line search optimizer.lineAbs
- Absolute threshold for the internal line search optimizer.- Throws:
MathIllegalArgumentException
- ifabs <= 0
.MathIllegalArgumentException
- ifrel < 2 * FastMath.ulp(1d)
.
-
-
Method Details
-
doOptimize
Performs the bulk of the optimization algorithm.- Specified by:
doOptimize
in classBaseOptimizer<PointValuePair>
- Returns:
- the point/value pair giving the optimal value of the objective function.
-