From: Dmitrey <openopt@ukr.net>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: Re: Fmincon + Ansys, Looking for a global minimum
Message-ID: <ef473bb.4@webcrossing.raydaftYaTP>
Date: Fri, 1 Dec 2006 14:35:07 -0500
References: <1164841726.133763.24890@j72g2000cwa.googlegroups.com> <ef473bb.0@webcrossing.raydaftYaTP> <1164921803.302933.143550@80g2000cwy.googlegroups.com> <ef473bb.2@webcrossing.raydaftYaTP> <1164998150.473053.38470@j44g2000cwa.googlegroups.com>
Lines: 41
NNTP-Posting-Host: 193.239.179.130
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:381558



Hi strefli3,
very well.
First of all, non-smooth doesn't means having lots of local minima, &
lots of local minima doesn't mean function is smooth (even without
taking into account any constraints).
Our department of optimization researches non-smooth optimization
since 1964 or so (as a rule, local solvers).
The fact of stopping fmincon in different points from different x0
doesn't mean anything, for example try that one with function
Lemarechal from the OpenOpt & you will see, that fmincon & even
MATLAB fminsearch fails to solve the one, despite it is convex and
has only 1 local=global minimum.
So, I recomend you 2 ways.
1st is like that:
prob = ooAssign(@objFun, x0);
prob.lb = LB;
prob.ub = UB; (BTW you can use it all in one ooAssign line)
prob.c =@cons; % note, that cons should take 2 params: x & prob.
Ignore prob inside, but describe it as input param in 1st line of
cons. The same with objFun. I intend to simplify it later, but now
it's not implemented.
of course, you can use 1-line assignment as in ooexample.m
So, run
r = ooRun(prob, @GAConstrain);
I hope this will help.
Also, try to modify stop criteria that will stop the calculations
(see r.msg for more info), for example it will be TolX -> try to
reduce this one and see, will your FvalOptim better or not.
nVars = 12 is sensible number for global solvers (however, I don't
know how many time is consumed by you objfun& cons), however I would
recommend you to try ralg (treating lb-ub constraints via LbUbWrapper
& non-lin constraints via ObjFun2(x,prob) = @(x,prob)
ObjFun(x,prob)+N*sum(max(0, cons(x,prob)))) and/or use hPSO (handling
of non-lin constraints must be the same, LbUbWrapper is called from
hPSO automatically). N must be a great number, try 10, 100, 1000,
5000 untill max(c)>TolCon (if solving will take lots of time, use
x0 = x_solution_with_previous_N). I intend to make it running
automatically in nearest future.
If you'll find it more convinient, you may contact me via email or
icq 275976670 (as for me it's hard to observ this forum often)
WBR, D.