02-13-2010 06:39 PM
Hi there,
I have a constrained nonlinear optimization problem. I've tried to see and use Constrained Nonlinear Optimization.vi, but I got stuck with defining the constrained. When I looked for some help, it only shows a template (labview\vi.lib\gmath\NumericalOptimization\cno_objective function template.vit) which not giving much and real example.
I have some experiences using 'fmincon' in Matlab. Although I know that we can use it in MathScript, but I want to get the result purely from LabView, not connecting and using Matlab 'fmincon' algorithm.
A simple example I took from Matlab; If I have function f(x) = –x1*x2*x3 and the constraint is 0 <= x1 + 2*x2 + 2*x3 <= 72. How to write the constraint function to be connected into Constrained Nonlinear Optimization.vi ? Can someone help me ?
PS: Those equestions (function and constrained) are just examples for my case. If someone already have another example which involving defining the constraints function, I would like to know it.
Thank you.
Cah_londo
02-13-2010 06:48 PM
cah_londo wrote:Hi there,
If someone already have another example which involving defining the constraints function, I would like to know it.
Thank you.
Cah_londo
Hi,
Try ..\labview\examples\math\curvefit.llb for an example of using the Constrained Nonlinear Optimization VI.
02-15-2010 05:02 PM
Hi Giedrius,
Thanks for your advice. Yes indeed, it has an example of how to use Constraint Nonlinear Optimization.vi. However, when I opened the Static VI Reference as the input for objective and constraint function, I saw a text block stated that there are "no equality and inequality constraints for this problem". On the other hand, an example of how to implement both equality and inequality constraints is the one I'm looking for.To be more precise, how to write my constraints, 0 <= x1 + 2*x2 + 2*x3 <= 72 ?
Regards,
Cah Londo
10-19-2010 04:18 AM
Hello,cah_londo.I meet the same question with you--Constrained nonlinear optimization. Have you solved your problem?
10-20-2010 03:02 PM
Hi enotsss,
Yes, I also found difficulties to apply boundaries in LabView. In fact, I gave up on this.
Fortunately, I still can solve the problem with Matlab. If you still need to use LabView, probably you can use SIT connection after you finish with your nonlinear optimization process.
Good luck !
10-21-2010 07:26 AM
Thank you, cah_londo! In fact, I intended to write a paper about the vi's application in engineering . So, I have no choise except I give up my plan. Yesterday, I called to the expert work in NI for help, but he didn't know how to use that vi either. I felt very disappointed and helpless. I solved the problem by C++ program, but you know , it's too long and not convenient. I deside to resarch that example and wait for help. Can somebody help me?