LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to specify equality constraints in constrained nonlinear optimization

Solved!
Go to solution

Can you please upload the VI in LabVIEW 2015 format?

0 Kudos
Message 11 of 23
(1,396 Views)

Here you go.  I took the liberty of doing some Cleanup and rearranging of the wires (so I could understand it, myself).

 

Bob Schor

0 Kudos
Message 12 of 23
(1,387 Views)

Dear Sir i have the same problem, but my labVIEW Version is 14, if please attach here the 14 version of your Global Optimization_Objective Function 1 so that i can also avail the help you provided about adding constraints please...

0 Kudos
Message 13 of 23
(1,273 Views)
0 Kudos
Message 14 of 23
(1,266 Views)

Thank you so much Sir, i have seen the example you provided, if inequality constraints are within bounds than how it can be written like if

1<x1<10

2<x2<19

0.1<x3<1

than how we can write inequality constraints please guide Sir

 

 kind regards

0 Kudos
Message 15 of 23
(1,252 Views)

1<x1<10 is really two constraints:  1<x1 and x1<10.  So you now have six inequality constraints.  Do the math.  And who is this "Sir"?

 

Bob Schor

0 Kudos
Message 16 of 23
(1,245 Views)

ohh sorry if you mind word Sir, i m student that's why i always says Sir who teach me. i have attached the updated VI, i don't know which input should i give to constraint indicator, i added all the option that came in my mind about x1, please suggest which one is write.

 

one thing more variant to data converter is not giving output due to which my objective function is giving zero value, please also spot error in code their, i will be very very thankful.

0 Kudos
Message 17 of 23
(1,238 Views)

I think you'll have to find DSPGuy, who posted the Solution to this question that you have "hijacked".  My involvement to your query was to clean up some code and save it in your version of LabVIEW.  I've done minimization problems, and have had some fun coding the Simplex algorithm in LabVIEW, but I haven't recently studied these particular LabVIEW functions and methods, so I don't want to make any further comments for fear of leading you astray.

 

What I would recommend is to read the Help for the functions you are trying to use, and see if they provide references to the technique/theory/algorithm on which they are based.  Then go to the Web (or your school library) and do some research on the methods.  The math could get fairly interesting ...

 

Bob Schor

0 Kudos
Message 18 of 23
(1,209 Views)

Okay Bro, Thank you so much for your time and suggestion. Let me Try as you suggested 🙂 

0 Kudos
Message 19 of 23
(1,185 Views)

Bob's suggestion to decompose the compound inequality constraints into simple constraints is the place I would start.

As Bob stated, "1<x1<10 is really two constraints:  1<x1 and x1<10.  So you now have six inequality constraints."

So your set of constraints:

1<x1<10

2<x2<19

0.1<x3<1

 

Becomes:

1<x1

x1<10

2<x2

x2<19

0.1<x3

x3<1

 

From my earlier post "The inequality constraints are specified to be less than 0."

So rewrite the six inequality constraints to be of the form "expression<0"

1-x1<0

x1-10<0

2-x2<0

x2-19<0

0.1-x3<0

x3-1<0

Now implement the left side of the equality constraints in your cost function. Below is a snapshot of an implementation.

 

inequality constraints snippet.png

 

-Jim

 
0 Kudos
Message 20 of 23
(1,175 Views)