Interface SQPProblem
- All Superinterfaces:
OptimizationData
Defines a nonlinear constrained optimization problem suitable for use
with Sequential Quadratic Programming (SQP) solvers.
Implementations supply objective function information, constraint definitions, bounds, and problem dimensionality. SQP solvers use this interface to query the optimization model.
Each component is optional: the problem may include only an objective (unconstrained case), or objective plus bounds, or full equality and inequality constraint sets. Boolean guard methods allow users and solvers to detect which problem structures are active.
Implementations must be deterministic and thread-safe if used across multiple optimizer instances.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns lower bounds for each decision variable, if available.double[]Returns upper bounds for each decision variable, if available.intgetdim()Returns the number of decision variables of the problem.Computes equality constraint values at the given point.Computes the Jacobian of the equality constraints at the given point.Returns the lower bound for equality constraints (typically zero).Computes inequality constraint values at the given point.Computes the Jacobian of inequality constraints at the given point.Returns the lower bound for inequality constraints.doubleEvaluates the objective function at the given point.Evaluates the gradient of the objective function at the given point.booleanIndicates whether explicit variable bounds are defined.booleanIndicates whether equality constraints are present.booleanIndicates whether inequality constraints are present.
-
Method Details
-
getdim
int getdim()Returns the number of decision variables of the problem.- Returns:
- problem dimension
-
hasBounds
boolean hasBounds()Indicates whether explicit variable bounds are defined.- Returns:
- true if box constraints are available
-
getBoundsLB
double[] getBoundsLB()Returns lower bounds for each decision variable, if available.- Returns:
- array of lower bound values (length equals problem dimension)
-
getBoundsUB
double[] getBoundsUB()Returns upper bounds for each decision variable, if available.- Returns:
- array of upper bound values (length equals problem dimension)
-
getObjectiveEvaluation
Evaluates the objective function at the given point.- Parameters:
rv- point at which to evaluate the objective- Returns:
- objective function value
-
getObjectiveGradient
Evaluates the gradient of the objective function at the given point.- Parameters:
rv- point at which to evaluate the gradient- Returns:
- gradient vector
-
hasEquality
boolean hasEquality()Indicates whether equality constraints are present.- Returns:
- true if the problem contains equality constraints
-
getEqConstraintEvaluation
Computes equality constraint values at the given point.- Parameters:
rv- evaluation point- Returns:
- vector of equality constraint residuals
-
getEqConstraintJacobian
Computes the Jacobian of the equality constraints at the given point.- Parameters:
rv- evaluation point- Returns:
- Jacobian matrix of equality constraints
-
getEqConstraintLB
RealVector getEqConstraintLB()Returns the lower bound for equality constraints (typically zero).Some interior-point/SQP formulations treat equalities as bounded two–sided constraints
h(x) = 0.- Returns:
- vector of equality constraint lower bounds
-
hasInequality
boolean hasInequality()Indicates whether inequality constraints are present.- Returns:
- true if the problem contains inequality constraints
-
getIneqConstraintEvaluation
Computes inequality constraint values at the given point.Inequalities follow the canonical form
g(x) >= c.- Parameters:
rv- evaluation point- Returns:
- vector of inequality constraint residuals
-
getIneqConstraintJacobian
Computes the Jacobian of inequality constraints at the given point.- Parameters:
rv- evaluation point- Returns:
- Jacobian matrix of inequality constraints
-
getIneqConstraintLB
RealVector getIneqConstraintLB()Returns the lower bound for inequality constraints.- Returns:
- vector of lower bound values for inequality constraints
-