Path: news.mathworks.com!newsfeed-00.mathworks.com!newscon06.news.prodigy.net!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!80g2000cwy.googlegroups.com!not-for-mail
From: strefli3@gmail.com
Newsgroups: comp.soft-sys.matlab
Subject: Re: Fmincon + Ansys, Looking for a global minimum
Date: 30 Nov 2006 13:23:23 -0800
Organization: http://groups.google.com
Lines: 53
Message-ID: <1164921803.302933.143550@80g2000cwy.googlegroups.com>
References: <1164841726.133763.24890@j72g2000cwa.googlegroups.com>
NNTP-Posting-Host: 35.9.40.148
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1164921809 1502 127.0.0.1 (30 Nov 2006 21:23:29 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 30 Nov 2006 21:23:29 +0000 (UTC)
In-Reply-To: <ef473bb.0@webcrossing.raydaftYaTP>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: 80g2000cwy.googlegroups.com; posting-host=35.9.40.148;
Xref: news.mathworks.com comp.soft-sys.matlab:381400



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