From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure objective function for use in minimization?

Solved!
Go to solution

Hi all,

 

I have been working on a minimization problem (for details, see this post).  I have figured out how to run an unconstrained minimization, but can't quite figure out why my objective function wire remains broken.  Here is a screen shot:

 

Screen shot 2010-11-17 at 10.38.35 AM.png

 

Any ideas?

 

I include below this example main VI, a subroutine that does the minimization, and a subroutine that gets called during the minimization.  As it seems I am limited to 3 attachments, I will add some sample data to the first reply that I will generate.

 

Many thanks,

 

RipRock

Download All
0 Kudos
Message 1 of 7
(3,322 Views)

And here is the sample data

0 Kudos
Message 2 of 7
(3,321 Views)
Solution
Accepted by topic author RipRock99

Hello all,

 

I just figured it out.  For those who may be confused as well, the answer is: Follow the directions!  RTFM!  In other words, if you use the provided template located at labview\vi.lib\gmath\NumericalOptimization\ucno_objective function template.vit, instead of recreating the code in the example, it works.

 

Sorry for these posts - and thanks for your consideration,

 

RipRock

Message 3 of 7
(3,309 Views)

Hi RipRock,

 

Could you please post your solution that worked? I'm having a similar problem, but the directions remain vague, and I'm still not sure how to proceed even after reading the directions. 

 

Thanks.

0 Kudos
Message 4 of 7
(3,160 Views)

Basically all I did wrong was I created my own function to minimize from scratch.  The help very clearly says to copy the template and use that.  Here is the function copied into the LV provided template.  

 

All the best,

 

RipRock

Message 5 of 7
(3,143 Views)

Thanks, great help.

0 Kudos
Message 6 of 7
(3,128 Views)

Sorry for bumping this old thread.

I just encountered this problem again using LV2016. However, even though I used the template as per instruction, I still encountered class conflict error.

The solution is to right-click the Static VI Reference, and make sure that the "Strictly Typed VI Reference" is checked.

Hope I am able to help other people encountering the same problems. Cheers!

Message 7 of 7
(2,560 Views)