SOLNP – Nonlinear optimization solver
Block SymbolLicensing group: MATRIX
Function Description
The SOLNP block is designed to solve a general Nonlinear Programming Problem (NLP) in the
form
subject to
where
- is a vector of decision variables to be optimized,
- is a cost function (objective function),
- is a vector of equality constraints,
- is a vector of inequality constraints,
- is a vector of lower bounds on inequality constraints,
- is a vector of upper bounds on inequality constraints,
- is a vector of lower bounds on decision variables,
- is a vector of upper bounds on decision variables.
The SOLNP solver tries to find optimal solution with the use of Augmented Lagrangian Method and Sequential Quadratic Programming (SQP).
For technical details, refer to [16] and [17]. In general, , , and are any nonlinear smooth functions.
Regarding implementation, the objective function, equality, and inequality constraints can be defined separately, for example, via the REXLANG block which allows the definition of custom functions. Its output y0 is then propagated back to SOLNP’s input uBlk.
The following auxiliary variables may be used in the formulation of the optimization problem to be solved by SOLNP block:
- Vector of initial estimates: .
- Matrix defining range of decision variables, referred to as simple bounds: .
- Matrix defining inequality constraints: (optional, only used if the optimization problem includes inequality constraints).
The block can be configured in one of three ways depending on how the input vector is constructed:
- : The solver will use the given initial estimate and simple bounds.
- : The solver will only use the given initial estimate.
- : The solver only uses the given simple bounds. Initial estimate is constructed automatically as .
The vector may have one, two, or three columns; and the number of rows corresponds to the number of decision variables (dimension of ).
This block does not propagate the signal quality. More information can be found in the 1.4 section.
Input
uBlk | Associated REXLANG block reference | Reference |
uXb | Initial estimate and simple bounds | Reference |
uIb | Bounds on inequality constraints (optional) | Reference |
uHes | User-supplied Hessian matrix (optional) | Reference |
HLD | Hold | Bool |
Parameter
rho | Penalty parameter for the augmented Lagrangian objective function 1.0 | Double (F64) |
MaxIterMajor | Maximum number of major iterations 0 400 | Long (I32) |
MaxIterMinor | Maximum number of minor iterations 0 200 | Long (I32) |
delta | Perturbation parameter for numerical gradient calculation 1.79769e+308 double | Long (I32) |
tolerance | Tolerance parameter for feasibility and optimality 1.79769e+308 double | Long (I32) |
nmax | Allocated size of array 10 100000 100 | Long (I32) |
Output
cmd | Phase identification for the associated REXLANG block | Long (I32) |
yX | Input vector for the associated REXLANG block | Reference |
yF | Output vector for the associated REXLANG block | Reference |
E | Error indicator | Bool |
iE | Error code | Long (I32) |
[Previous] [Back to top] [Up]
2025 © REX Controls s.r.o., www.rexygen.com