LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unconstraned Optimization

Hi Jesse_D,

 

Thanks a lot for your example. I am able to understand what 's going on with the vi and I developed my own vi for minimizing x/y+45 within the bounds 25<x<50 and 2<y<8.

 

Can you let me know how to wire the constraints as they seem to take an array of numbers as input and if I have to wite something like x>4 and y=5 how can I do that?

0 Kudos
Message 11 of 15
(793 Views)

Hello,

 

I know this is a old topic, but i have faced with the next problem: i implemented unconstrained nonlinear optimization similar with the giving example, it works, but sometimes,it exceeds the number of function calls set in stopping criteria! I can't figure out where is the problem! Was anyone facing with this kind of problem before?

 

THKS

0 Kudos
Message 12 of 15
(751 Views)

Hi Robot and Alexandru, 

 

Robot, I missed your reply somehow but the code attached should answer your question. 

 

Alexandru, how often does it exceed the parametes? Can you reproduce the behavior consistently? 

 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 13 of 15
(736 Views)

Hi Jesse,

 

Thanks for your answer. That error appears often and there is no pattern in entry data to suggest that is a limitation for optimization algorithm.  What i'm trying to obtain is a similar result as fmincon function from Matlab! When that error is not present, the result is the same as the result from fmincon. Till now, I observe if ai minimize the starting point of Constrained Nonlinear Optimization.vi the error become more rare,but not disappear!

 

Thnks a lot!

 

Alexandru Danicescu

0 Kudos
Message 14 of 15
(719 Views)

Hi Alex, 

 

Can you post your code with defaults on the front panel set such that the behavior is reproduced? Also, you can open up the unconstrained optimization and trace the VI manually.

 

 

An immediate workaround is just to use the matlabscript node or mathscript node with fmincon. 

 

Jesse Dennis
Engineer
INTP
0 Kudos
Message 15 of 15
(715 Views)