# Find a Minimum nD Constrained (G Dataflow)

Version:

Finds a local minimum of a given n-dimension function with constraints.

This node uses the sequential quadratic programming method to determine the local minimum.

## data

Arbitrary values passed to the strictly typed VI reference.

## objective and constraint function

Strictly typed reference to the VI that implements the objective function(s), the equality constraints function, and the inequality constraints function as separate outputs.

## start

Values of the variables at which the optimization starts.

## parameter bounds

Upper and lower numeric limits for the parameters being optimized and the inequality constraints.

### x minimum

Smallest allowed values of the parameters being optimized.

The number of elements in x minimum can be 0 or the same as start. x minimum must contain the same number of elements as x maximum. This input does not allow exceptional values, such as Inf, -Inf, or NaN.

### x maximum

Greatest allowed values of the parameters being optimized.

The number of elements in x maximum can be 0 or the same as start. x maximum must contain the same number of elements as x minimum. This input does not allow exceptional values, such as Inf, -Inf, or NaN.

### inequality constraint minimum

Smallest allowed values of the inequality constraints.

The length of this input must match the length of the inequality constraints returned from objective and constraint function. This input does not allow exceptional values, such as Inf, -Inf, or NaN.

### inequality constraint maximum

Greatest allowed values of the inequality constraints.

The length of this input must match the length of the inequality constraints returned from objective and constraint function. This input does not allow exceptional values, such as Inf, -Inf, or NaN.

## beginning state

Initial values of the inequality constraint function, the Lagrangian multipliers, and the Hessian.

beginning state is typically the ending state of a previous call to this node and allows a warm start of the optimization.

### inequality constraints

Initial values of the inequality constraint functions.

### Lagrangian multipliers

Initial values of the Lagrangian multipliers.

### Hessian

Initial estimate values of the Hessian.

## error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

## settings

Tolerance and termination settings.

### constraint weight

Relative weighting of the constraints as compared to the objective function and distance that the optimization search travels outside the feasible range to seek an optimal solution.

A value greater than 1 forces the search to stay close to the known feasible range. A value equal to or smaller than 1 allows a broader range of searching.

Default: 1

### maximum minor iterations

Upper bound on the number of iterations allowed to solve the quadratic problem.

If the constraint functions in the quadratic problem are highly nonlinear, you can force the node to update the linear approximation more often by limiting the number of maximum minor iterations so that the linearized constraints are more accurate.

Default: 10

## stopping criteria

Conditions that terminate the optimization.

This node terminates the optimization if this node reaches all the tolerance thresholds or passes any of the maximum thresholds.

### function tolerance

Minimum relative change in function values between two internal iterations.

Definition of Relative Change in Function Values

The relative change in function values between two internal iterations is defined as follows:

$\frac{\mathrm{abs}\left({f}_{n}-{f}_{n-1}\right)}{\mathrm{abs}\left({f}_{n}\right)+\epsilon }$

where

• fn is the function value of the current iteration
• fn - 1 is the function value of the previous iteration
• ε is the machine epsilon

Default: 1E-06

### parameter tolerance

Minimum relative change in parameter values between two internal iterations.

Definition of Relative Change in Parameter Values

The relative change in parameter values between two internal iterations is defined as follows:

$\frac{\mathrm{abs}\left({P}_{n}-{P}_{n-1}\right)}{\mathrm{abs}\left({P}_{n}\right)+\epsilon }$

where

• Pn is the parameter value of the current iteration
• Pn - 1 is the parameter value of the previous iteration
• ε is the machine epsilon

Default: 1E-06

Default: 1E-06

### maximum iterations

Maximum number of iterations that the node runs in the optimization.

Default: 100

### maximum function calls

Maximum number of calls to the objective function allowed in the optimization.

Default: 1000

### maximum time

Maximum amount of time in seconds allowed for the optimization.

Default: -1 — The optimization never times out.

## minimum

Values of the variables where the objective function has the local minimum.

## f(minimum)

Value of the objective function at minimum.

## ending state

Final values of the inequality constraint function, the Lagrange multipliers, and the Hessian.

### inequality constraints

Values of the inequality constraint functions at the end of the optimization.

### Lagrangian multipliers

Values of the Lagrangian multipliers at the end of the optimization.

### Hessian

Estimated values of the Hessian at the end of the optimization.

## function calls

Number of times that this node called the objective function(s) in the optimization.

## error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices

Web Server: Not supported in VIs that run in a web application