From: "Marcus M. Edvall" <medvREMall@tomREMopt.cREMom>
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.9@webcrossing.raydaftYaTP>
Date: Tue, 12 Dec 2006 11:32:04 -0500
References: <1164841726.133763.24890@j72g2000cwa.googlegroups.com> <ef473bb.0@webcrossing.raydaftYaTP> <1164921803.302933.143550@80g2000cwy.googlegroups.com> <el4205$7h4$1@fred.mathworks.com> <1165939328.273924.306090@73g2000cwn.googlegroups.com>
Lines: 175
NNTP-Posting-Host: 69.105.136.213
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:383433



Hello,

If you got only local solutions with TOMLAB, you must have done
something wrong. The defaults are not always ideal for your
situation.

If you can obtain local solutions in 51s, then glcCluster should be
ideal.

Best wishes, Marcus
 <http://tomopt.com/tomlab/>

 strefli3 wrote:
>
>
> Thanks for all the help everyone. Using everyone suggestions I am
> still
> arriving at local minimums though. However I decided to simply
> write my
> own algorithm based on my knowlege of the optimim solution.
>
> Knowing that at the optimum solution all of my constraints will be
> active, unless of course the design varaible is at its lb, a very
> simple algorithm can be implemented to solve the problem. Indeed it
> found the local minimum, and it only took 51s. Compared to GAs
> that
> where taking 6+hours.
>
> Thanks again,
>
> Rakesh Kumar wrote:
>> You can try using some evolutionary algorithms or even better
> some form of
>> hybrid scheme (evolutionary & classical together) to maximize
> your chances
>> of finding a global minimum. If you have access to Genetic
> Algorithm and
>> Direct Search Toolbox, you may try one of two schemes:
>>
>> - Use PATTERNSEARCH function with a search step. here are the
> options I
>> would use to find a global minimum.
>>
>> options =
>>
>
psoptimset('SearchMethod',{@searchlhs,10},'InitialMeshSize',10,'Disp
> lay','iter')
>>
>> % Call patternsearch
>> [R,weight,exit,output] =
>> patternsearch(@obj,R0,M,b,Meq,beq,lb,ub,@cons,options)
>>
>> You can play with options such as 'InitialPenalty' and
> 'PenaltyFactor' if
>> nonlinear constraints are not easily satisfied.
>>
>>
>> - Use GA with FMINCON as hybrid function
>> options = gaoptimset('HybridFcn',@fmincon, 'PopulationSize',
>>
>
200,'Generations',500,'MutationFcn',@mutationadaptfeasible,'Display'
> ,'iter');
>>
>> % Call ga
>> [R,weight,exit,output] =
>> ga(@obj,numel(R0),M,b,Meq,beq,lb,ub,@cons,options)
>>
>> Note that the second input argument to GA is numel(R0) i.e.,
> number of
>> variables.
>>
>> hth,
>> Rakesh
>>
>> <strefli3@gmail.com> wrote in message
>> news:1164921803.302933.143550@80g2000cwy.googlegroups.com...
>> > Dmitrey,
>> > I have downloaded OpenOpt and read all the documentation,
but I
> can't
>> > seem to implement it into my current situation. Let me
exaplain
> how I
>> > use fmincon
>> >
>> > [R,weight,exit,output] =
>> > fmincon(@obj,R0,M,b,Meq,beq,lb,ub,@cons,options)
>> >
>> > Breaking it down:
>> > @obj represents my objective function, this is simply the
> weight of the
>> > truss which is then scalled to be a reasonable. In other
words
> it is
>> > each design variable, which is a the radius of the bar
squared,
> *pi *
>> > length.
>> >
>> > R0 is my initial guess to the problem
>> >
>> > M,b,Meq,beq are all empty
>> >
>> > lb and ub are my upper bounds and lower bounds of the
design
> variables.
>> >
>> > @cons is a function that calls Ansys which the retuns
stresses
> for each
>> > bar and then @cons converts them to contraints based on
the
> maximium
>> > allowable stress.
>> >
>> > So my question is, How do I call OpenOPT with my in the
way
> that I use
>> > fmincon; using the @cons function to determine the
contraints?
>> >
>> > Thanks for the tips thus far.
>> >
>> > Dmitrey wrote:
>> >> Hi strefli3
>> >> If you are interested in local-global solvers, I would
propose
> you to
>> >> try hPSO from OpenOpt
>> >> It was written by Alexandros Leontitsis & we make some
changes
> - for
>> >> example, replaced inner solver from MATLAB fminsearch
to Shor
> r-alg
>> >> with AST. However, currently it can handle non-linear
> constraints via
>> >> N*max(0, c(x)), where N is a big number; on the other
hand, in
> a very
>> >> sucsessful way.
>> >> however, it's 1st-order optimizer & don't use
user-supplied
> Hesse
>> >> matrix (but can use (sub)gradient info)
>> >> Lates Openopt version is available at
>> >> <http://www.box.net/public/6bsuq765t4>
>> >> if you'll find the OpenOpt usefull please make a good
review
> at
>> >>
>> >> <http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=13115&objectType=file>
>> >> OpenOpt also includes GAConstrain solver, which can
handle
> c(x)<=0
>> >> & Ax<=b; also you must provide lb, ub. However, as
all global
>> >> solvers, it can handle only small-scaled problems with
nvars
> ~1...15
>> >>
>> >> You can try non-smooth solver fminsearchOS (free, use
web
> search) or
>> >> snopt() from TOMLAB - they propose 21 evaluation ver,
but
> their
>> >> prices are not for everyone.
>> >> best regards, Dmitrey
>> >
>
>