Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
nonlinear constrained optimization

Subject: nonlinear constrained optimization

From: A.E lover

Date: 27 Apr, 2007 10:59:33

Message: 1 of 6

Dear all,

I am looking for MATLAB's functions to solve my nonlinear
constrained optimization problem. For example my problem is :

min f(x)=4x1+x2^2

subject to

x1^2+x2^2=9 (1)
and x1+x2<=3 (2)


What Matlab's function can do this problem?

Thank you.

Subject: nonlinear constrained optimization

From: kamuran turksoy

Date: 1 Sep, 2011 00:24:11

Message: 2 of 6

"A.E lover" <aelover11@gmail.com> wrote in message <1177696772.905240.65430@t38g2000prd.googlegroups.com>...
> Dear all,
>
> I am looking for MATLAB's functions to solve my nonlinear
> constrained optimization problem. For example my problem is :
>
> min f(x)=4x1+x2^2
>
> subject to
>
> x1^2+x2^2=9 (1)
> and x1+x2<=3 (2)
>
>
> What Matlab's function can do this problem?
>
> Thank you.
>


I also need way for this problem

Subject: nonlinear constrained optimization

From: Bruno Luong

Date: 1 Sep, 2011 05:57:14

Message: 3 of 6

"kamuran turksoy" <kamuranturksoy@gmail.com> wrote in message <j3mjbb$q06$1@newscl01ah.mathworks.com>...
> "A.E lover" <aelover11@gmail.com> wrote in message <1177696772.905240.65430@t38g2000prd.googlegroups.com>...
> > Dear all,
> >
> > I am looking for MATLAB's functions to solve my nonlinear
> > constrained optimization problem. For example my problem is :
> >
> > min f(x)=4x1+x2^2
> >
> > subject to
> >
> > x1^2+x2^2=9 (1)
> > and x1+x2<=3 (2)
> >
> >
> > What Matlab's function can do this problem?
> >
> > Thank you.
> >
>
>
> I also need way for this problem

Brute force method is FMINCON.

A more intelligent and robust way is:

A) argmin f with constraint (1) can be solved with this tool:

http://www.mathworks.com/matlabcentral/fileexchange/27596

B) argmin f with constraint (1) can be solved with QUADPROG.

C) Constraints (1) and (2) alone (without minimization) has close form solutions.

Solve A, B, C and compare the solutions, pick the best: argmin f of (A,B,C).

Bruno

Subject: nonlinear constrained optimization

From: Bruno Luong

Date: 1 Sep, 2011 06:04:28

Message: 4 of 6

Sorry typo correction:
 
> A) argmin f with constraint (1) can be solved with this tool:
>
> http://www.mathworks.com/matlabcentral/fileexchange/27596
>
> B) argmin f with constraint (2) can be solved with QUADPROG.
>
> C) Constraints (1) and (2) alone (without minimization) has closed form solutions.
>
> Solve A, B, C and compare the solutions, pick the best: argmin f of (A,B,C).
>
> Bruno

Subject: nonlinear constrained optimization

From: Bruno Luong

Date: 1 Sep, 2011 06:50:27

Message: 5 of 6

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <j3n79c$lmm$1@newscl01ah.mathworks.com>...
> Sorry typo correction:
>
> > A) argmin f with constraint (1) can be solved with this tool:
> >
> > http://www.mathworks.com/matlabcentral/fileexchange/27596
> >
> > B) argmin f with constraint (2) can be solved with QUADPROG.
> >
> > C) Constraints (1) and (2) alone (without minimization) has closed form solutions.
> >
> > Solve A, B, C and compare the solutions, pick the best: argmin f of (A,B,C).
> >
> > Bruno

I forget also the case argmin f no constraint (which has infinity solution in this specific example), and eventual cross-check of constraint that has been ignored, etc...

Some work out on the logics needed to be addressed more rigorously, but the idea is there.

Bruno

Subject: nonlinear constrained optimization

From: Marc Edvall

Date: 1 Sep, 2011 16:22:12

Message: 6 of 6

Here is how you solve it with TOMLAB:

toms x1 x2
sol = ezsolve(4*x1+x2^2,{x1^2+x2^2==9; x1+x2<=3});

Observe that the system will generate 1st and 2nd order derivatives so you will have a very high precision in your solutions.

Best wishes, Marc
http://tomopt.com/
http://tomsym.com/

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us