Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!postnews.google.com!j22g2000hsf.googlegroups.com!not-for-mail
From: woodchips@rochester.rr.com
Newsgroups: comp.soft-sys.matlab
Subject: Re: hybrid PSO not working right
Date: Mon, 1 Sep 2008 14:13:11 -0700 (PDT)
Organization: http://groups.google.com
Lines: 36
Message-ID: <b471a0ba-ee8b-44c1-b9aa-4be8278c8d56@j22g2000hsf.googlegroups.com>
References: <g9hgi9$mq$1@fred.mathworks.com>
NNTP-Posting-Host: 66.66.29.246
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1220303591 23774 127.0.0.1 (1 Sep 2008 21:13:11 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 1 Sep 2008 21:13:11 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: j22g2000hsf.googlegroups.com; posting-host=66.66.29.246; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en-us) 
Xref: news.mathworks.com comp.soft-sys.matlab:488138



On Sep 1, 3:42=A0pm, "Dave Brackett" <davebrack...@hotmail.com> wrote:
> I am trying to implement the hybrid particle swarm
> optimisation (hPSO) algorithm from the file exchange, but
> can't seem to get it to do much. As shown in the table
> below, it doesn't improve over the whole optimisation. My
> fitness function works fine with other Matlab optimisation
> algorithms e.g. GA and simulated annealing, but doesn't
> seem to work here. Any ideas why?
>
> A snippit of my code is as follows:

Since I can't possibly know why your code fails
to do anything, I can't really suggest the solution.
But I can test the hPSO code itself. It does work,
at least some of the time.

rosen =3D @(X) (1-X(:,1)).^2 + 105*(X(:,2)-X(:,1).^2).^2;

[x,fval,gfx,output]=3DhPSO(rosen,2,opts);
Global minimum reached:   0.0000

x
x =3D
       1.0042       1.0085

As a code, its not terribly well documented. In
fact, while I rated it sometime ago as a 4, I think
now that was perhaps quite generous on my part.
I should have rated it at best about a 3.

It took me a bit of time to figure out what most
of the options did when I just now looked at it,
and there are a few that remain a mystery,
although I did stop looking after a while.

John