Class AbstractSQPOptimizer
java.lang.Object
org.hipparchus.optim.BaseOptimizer<P>
org.hipparchus.optim.BaseMultivariateOptimizer<LagrangeSolution>
org.hipparchus.optim.nonlinear.vector.constrained.ConstraintOptimizer
org.hipparchus.optim.nonlinear.vector.constrained.AbstractSQPOptimizer
- Direct Known Subclasses:
SQPOptimizerGM
,SQPOptimizerS
Abstract class for Sequential Quadratic Programming solvers
- Since:
- 3.1
-
Field Summary
Fields inherited from class org.hipparchus.optim.BaseOptimizer
evaluations, iterations
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGetter for equality constraint.Getter for inequality constraint.getObj()
Getter for objective function.Getter for settings.protected RealVector
lagrangianGradX
(RealVector currentGrad, RealMatrix jacobConstraint, RealVector x, RealVector y) Compute Lagrangian gradient for variable Xoptimize
(OptimizationData... optData) Stores data and performs the optimization.protected void
parseOptimizationData
(OptimizationData... optData) Scans the list of (required and optional) optimization data that characterize the problem.Methods inherited from class org.hipparchus.optim.BaseMultivariateOptimizer
getLowerBound, getStartPoint, getUpperBound
Methods inherited from class org.hipparchus.optim.BaseOptimizer
doOptimize, getConvergenceChecker, getEvaluations, getIterations, getMaxEvaluations, getMaxIterations, incrementEvaluationCount, incrementIterationCount, optimize
-
Constructor Details
-
AbstractSQPOptimizer
protected AbstractSQPOptimizer()Simple constructor.
-
-
Method Details
-
getSettings
Getter for settings.- Returns:
- settings
-
getObj
Getter for objective function.- Returns:
- objective function
-
getEqConstraint
Getter for equality constraint.- Returns:
- equality constraint
-
getIqConstraint
Getter for inequality constraint.- Returns:
- inequality constraint
-
optimize
Description copied from class:ConstraintOptimizer
Stores data and performs the optimization.The list of parameters is open-ended so that sub-classes can extend it with arguments specific to their concrete implementations.
When the method is called multiple times, instance data is overwritten only when actually present in the list of arguments: when not specified, data set in a previous call is retained (and thus is optional in subsequent calls).
Important note: Subclasses must override
BaseOptimizer.parseOptimizationData(OptimizationData[])
if they need to register their own options; but then, they must also callsuper.parseOptimizationData(optData)
within that method.- Overrides:
optimize
in classConstraintOptimizer
- Parameters:
optData
- Optimization data. In addition to those documented inBaseOptimizer
, this method will register the following data:- Returns:
- a point/value pair that satisfies the convergence criteria.
-
parseOptimizationData
Description copied from class:BaseMultivariateOptimizer
Scans the list of (required and optional) optimization data that characterize the problem.- Overrides:
parseOptimizationData
in classBaseMultivariateOptimizer<LagrangeSolution>
- Parameters:
optData
- Optimization data. The following data will be looked for:
-
lagrangianGradX
protected RealVector lagrangianGradX(RealVector currentGrad, RealMatrix jacobConstraint, RealVector x, RealVector y) Compute Lagrangian gradient for variable X- Parameters:
currentGrad
- current gradientjacobConstraint
- Jacobianx
- value of xy
- value of y- Returns:
- Lagrangian
-