Solves a linear programming problem. This node uses arrays to represent the linear function to optimize and the constraints.
To solve the optimization problem, an optimal vector must exist. This node returns an error if an optimal vector does not exist.
Vector describing the linear function to maximize.
Matrix describing the different constraints.
Vector describing the right sides of the constraints inequalities.
Optimization problem this node solves.
Name | Description |
---|---|
Maximize | Solves a maximization problem. |
Minimize | Solves a minimization problem. |
Default: Maximize
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.
Default: No error
Maximum or minimum value, if it exists, of the solution vector under the constraints.
Solution vector.
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.
Given that optimization problem is set to Maximize, the following equation defines the optimization problem this node solves.
c x = max!
with the constraints x ≥ 0 and M x ≥ b.
where
The solution to a linear programming problem is a two-step process. This node completes the following steps to solve a linear programming problem.
This node uses constraint matrix and constraint inequalities to represent the constraints under which you want to optimize linear function to maximize. You must first organize the constraints in terms of formulas, and then convert the formulas to arrays. The following table explains how to convert the formulas to constraint matrix and constraint inequalities:
Formulas | constraint matrix | constraint inequalities | ||
-0.53 * t 1 - 1.07 * t 2 - 0.4 * t 3 >= -180 | -0.53 | -1.07 | -0.4 | -180 |
t 1 >= 30 | 1 | 0 | 0 | 30 |
t 2 >= 30 | 0 | 1 | 0 | 30 |
t 3 >= 30 | 0 | 0 | 1 | 30 |
-t 1 - t 2 - t 3 >= -180 | -1 | -1 | -1 | -180 |
Where This Node Can Run:
Desktop OS: Windows
FPGA: Not supported
Web Server: Not supported in VIs that run in a web application