LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error quadratic programming

Hi,

 

I'm trying to use the QP vi, that is present in mathematics/optimization toolkit in LabVIEW 8.6. But, I'm having this problem:

 

Error code -20068: qpopt - equality constr main loop


I have attached the vi file with the default data that was giving me the error. Furthermore, I have solved this same problem in Matlab, and the answer is: minimum = [-19.4 ; 0.4] and f(minimum) = 19.3335.

 

Please, if anyone knows how to fix this kind of error help me.

 

Murilo

0 Kudos
Message 1 of 4
(3,213 Views)

Hi -

 

You are getting the -20068 error because in your inequality constraints cluster it does not like the "-Inf" in the Imin array in cells 0-4. If click on the Help drop down there is a option called "Explain Error...". Typically, that will give you more detailed error information.

 

In the Explain Error window it gives a "possible reason(s):" section. In this case the possible reason was given as: ""Analysis:  Input parameters has at least one element that is Inf, NaN, DBL_MAX, or DBL_MIN". S, in your input parameters I simply started looking for any of those items and noticed your "-Inf". I'm not sure what you are going to need to change that to to get your solution...

 

Hope that helps!

0 Kudos
Message 2 of 4
(3,195 Views)

Hi,

 

Thanks. So I have tried to change de "-Inf" for "-1000", but the error remains. I don't know which parameters are resulting these bad inputs (Inf, NaN, DBL_MAX, or DBL_MIN).

Murilo

0 Kudos
Message 3 of 4
(3,163 Views)

I have found the problem.

 

This error occurred often in my application. I don't understand the algorithm deployed but I could track the error to figure what is happening.

 

The problem is triggered inside "Matrix left divisionMM" VI and is caused by a -Inf value in the input matrix. Going back through the code I could find out the inversion where the -Inf was generated. The result of the sum of the gap array and epsilon's squared root was zero and its inversion caused the -Inf. But this made no sense because the gap should be always grater then zero as the initial solution is always inside the range.

 

The problem happens when any value in the initial solution is equal to the maximum limit. I don't know if this always happens but in some cases the gap created is exactly negative squared root of epsilon. Adding a positive epsilon's square root result in zero. So the problem is caused by a floating point residue.

 

Adding a zero limit before the add operation seems to solve the problem. 

 

PS.: I have found this problem in Labview 2012 and 2011.

 

QP

 

0 Kudos
Message 4 of 4
(2,696 Views)