SOLNP – Nonlinear optimization solver

Block SymbolLicensing group: MATRIX
Qt SVG Document Exported by REXYGEN Studio uBlk uXb uIb uHes HLD cmd yX yF E iE SOLNP

Function Description
The SOLNP block is designed to solve a general Nonlinear Programming Problem (NLP) in the form

minf(x)

subject to

g(x) = 0, lh h(x) uh, lx x ux,

where

  • x n is a vector of decision variables to be optimized,
  • f(x) is a cost function (objective function),
  • g(x) is a vector of equality constraints,
  • h(x) is a vector of inequality constraints,
  • lh is a vector of lower bounds on inequality constraints,
  • uh is a vector of upper bounds on inequality constraints,
  • lx is a vector of lower bounds on decision variables,
  • ux is a vector of upper bounds on decision variables.

The SOLNP solver tries to find optimal solution x = argminxf(x) with the use of Augmented Lagrangian Method and Sequential Quadratic Programming (SQP).

For technical details, refer to [16] and [17]. In general, f, g, and h 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: x0.
  • Matrix xb defining range of decision variables, referred to as simple bounds: xb = [lx,ux].
  • Matrix uIb defining inequality constraints: uIb = [lh,uh] (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 uXb is constructed:

  1. uXb = [x0,xb]: The solver will use the given initial estimate and simple bounds.
  2. uXb = x0: The solver will only use the given initial estimate.
  3. uXb = xb: The solver only uses the given simple bounds. Initial estimate is constructed automatically as x0 = lx+ux 2 .

The vector uXb may have one, two, or three columns; and the number of rows corresponds to the number of decision variables (dimension of x).

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)

2025 © REX Controls s.r.o., www.rexygen.com