How to set inequality constraints in Constrained Nonlinear Optimization VI

Updated Sep 7, 2026

Environment

Software

  • LabVIEW

The Constrained Nonlinear Optimization VI is used in the LabVIEW sample program "Nonlinear Spring Constant Fit". We describe how to set inequality constraints for this sample.

  1. In the Bounds cluster of the Constrained Nonlinear Optimization VI, set the Minimum Inequality Constraint to the lower bound (2 in the figure below),

    Set the upper limit (5 in the figure below) to the Maximum Inequality Constraint.

    Step1 - Create Constant to Constrained Nonlinear Optimization.png

  2. Inside the Objective and Constraint Function VI, connect the X value to the Inequality Constraint Function Value.

    Step 2 - Wire X Value to inequality constraint function values.png

You can see that the fitted spring constant values are between 2<x<5.