# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution
Highlighted

## Linear programming

Can Linear Programming Simplex Method VI solve the optimization problem with real value variables (x>=0 or x<0)? If yes, how?

Message 1 of 6
(1,409 Views)

Message 2 of 6
(1,324 Views)

## Re: Linear programming

Hi, Thanks for your reply. But in the guidance you provided, Linear programming Simplex Method VI is only used for nonnegitive variables, i.e., x>=0. I am wondering whether the VI can be used for both negative and nonnegative varibales or not. Any suggestion with more details? Thanks a lot.

Message 3 of 6
(1,318 Views)
Solution
Accepted by topic author ZDX

## Re: Linear programming

Assuming your (potentially) negative variables have constraints (say -1000) you can offest them accordingly and adapt your input data correspondingly.

replace x0 >= -1000 with X0 = (x0 + 1000) >= 0

Don't use negative constraints unnecesseraly big as it may results in numerical issues.

Message 4 of 6
(1,299 Views)
Solution
Accepted by topic author ZDX

## Re: Linear programming

I've created a quick example (Lv2014) that finds the minimax solution for three equations with two variables.

The solution has both variables negative so using the raw algorithm returns {0, 0}. If you increase the variables offset parameter, the actual solution { -4.86. -0.49} is found for any offset value >= 4.87.

I hope this works for you!

Message 5 of 6
(1,280 Views)

## Re: Linear programming

Thanks for your help. It works for me!

Message 6 of 6
(1,219 Views)