|
Post by haftka on Jul 31, 2007 10:37:34 GMT -5
Problems with Matlab fmincon:
We have been having problems with Matlab fmincon, and we have been wondering if this is a general experience. To illustrate here is an example of a quadratic objective function and quadratic constraint.
First the problem definition.
function f=quad2(x,a) f=x(1)^2+a*x(2)^2; Function [c,ceq]=ring(x,ri,ro) c(1)=ri-x(1)^2-x(2)^2; c(2)=x(1)^2+x(2)^2-ro; ceq=[]; x0=[1,10]; a=10;r1=10.; r2=20; [x,fval]=fmincon(@(x)quad2(x,a),x0,[],[],[],[],[],[],@(x)ring(x,r1,r2))
Matlab output is good. x =3.1623 -0.0000 fval =10.0000
Make the problem a bit harder and you get nonsense
a=1.1;r1=10; r2=20; [x,fval]=fmincon(@(x)quad2(x,a),x0,[],[],[],[],[],[],@(x)ring(x,r1,r2)) Maximum number of function evaluations exceeded; increase OPTIONS.MaxFunEvals.
x =2.2044 2.3249 fval =10.8052
|
|
|
Post by Domenico Lahaye on Sept 19, 2007 4:40:20 GMT -5
Dear Prof. Haftka,
What follows is a humble attempt to provide some feedback on the issue you raise.
In the work I was previously involved in, we extensively used Matlab fmincon. Through a review of our work by a leading expert in non-linear optimization, we learned that fmincon is not reliable. It seems that this fact is known in certain communities, and the test you propose seems to confirm this "common knowledge". Unfortunately, I do not have details at this point. The same reviewer suggested us to use other software packages such as IP-OPT for instance.
Kind regards,
Domenico Lahaye.
|
|
|
Post by namhokim on Oct 3, 2007 16:15:45 GMT -5
Rafi:
When I tried them, the second optimization problem stopped due to maximum iteration. If you increase the maximum iteration to 10,000, you will obtain the correct optimization.
|
|