Constrained Nonlinear Optimization VI
- Updated2025-07-30
- 7 minute(s) read
Solves a general nonlinear optimization problem with nonlinear equality constraint and nonlinear inequality constraint bounds using a sequential quadratic programming method.

Inputs/Outputs
function data
—
function data contains static data that the user-defined function needs at run time.
objective and constraint function
—
objective and constraint function is a reference to the VI that implements the nonlinear function to minimize, the nonlinear equality constraints function, and the nonlinear inequality constraints function as separate outputs. The objective function output must not be empty. The constraint functions are optional. Therefore, the equality constraints output, the inequality constraints output, or both can be empty. Create this VI by starting from the VI template located in labview\vi.lib\gmath\NumericalOptimization\cno_objective function template.vit.
start
—
start are the points in n dimension at which the optimization process starts.
bounds
—
bounds is a cluster that contains the upper and lower numeric limits for the parameters being optimized and the inequality constraints.
beginning state
—
beginning state contains the initial values of the inequality constraint function, the Lagrangian multipliers, and the Hessian. beginning state is typically the ending state of a previous optimization and allows a warm start of the optimization.
error in (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
cno settings
—
cno settings contains additional tolerance and termination settings that are specific to this algorithm.
stopping criteria
—
stopping criteria is the collection of conditions that terminate the optimization. If (function tolerance AND parameter tolerance AND gradient tolerance) OR max iterations OR max function calls then optimization terminates.
number of function calls
—
number of function calls is the number of times the objective function calls in the optimization process.
minimum
—
minimum is the determined local minimum in n dimension.
f(minimum)
—
f(minimum) is the function value of objective function at the determined minimum.
ending state
—
ending state contains the final values of the inequality constraint function, the Lagrange multipliers, and the Hessian.
error out
—
error out contains error information. This output provides standard error out functionality. |
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Mathematics\Fitting\Nonlinear Spring Constant fit.vi
function data
—
objective and constraint function
—
start
—
bounds
—
hessian
—
error in (no error)
—
cno settings
—
constraint weight
—
maximum minor iterations
—
number of function calls
—
minimum
—
f(minimum)
—
ending state
—
hessian
—
error out
—