Code covered by the BSD License
-
...
This is like "soft" boundaries, except that some kind of penalty value
-
...
-
...
Particle swarm optimization for binary genomes.
-
...
-
...
Find the minimum of a function using Particle Swarm Optimization.
-
ackleysfcn(x)
Ackley's Function.
-
binarytestfcn(x)
-
dejongsfcn(x)
-
dropwavefcn(x)
-
evolutioncomplete(options,sta...
Plays a notification when genetic algorithm finishes. Requires a
-
griewangksfcn(x)
Template for writing custom test/demonstration functions for psodemo.
-
langermannsfcn(x)
-
nonlinearconstrdemo(x)
Nonlinear constraints demo with Rosenbrock's function.
-
psoboundsabsorb(state,Aineq,b...
-
psodemo(DemoMode)
Runs the PSO on a few demonstration functions, which should be located
-
psoiterate(options,state,flag...
Updates swarm positions and velocities. Called to iterate the swarm from
-
psooptimset(varargin)
Creates an options structure for pso.
-
psoplotbestf(options,state,fl...
Plots the best, mean, and worst scores of particle swarm.
-
psoplotscores(options,state,f...
Plots the best and mean scores of particle swarm.
-
psoplotswarm(options,state,fl...
Plots the positions of particle swarm.
-
psoplotswarmsurf(options,stat...
Shows the evolution of a 2-variable population over a known surface. This
-
rastriginsfcn(x)
Takes row inputs. If not row, will attempt to correct it.
-
rosenbrocksfcn(x)
Takes row inputs. If input is not row, will attempt to correct it.
-
schwefelsfcn(x)
Schwefel's function.
-
templatefcn(x)
Template for writing custom test/demonstration functions for psodemo.
-
testfcn1(x)
-
View all files
from
Another Particle Swarm Toolbox
by Sam
Implementation of a PSO algorithm with the same syntax as the Genetic Algorithm Toolbox.
|
| evolutioncomplete(options,state,flag)
|
function state = evolutioncomplete(options,state,flag)
% Plays a notification when genetic algorithm finishes. Requires a
% Starcraft installation, in its default directory, typically:
% C:\Program Files\Starcraft
%
% Works with Windows, not tested on other platforms.
if ispc && strcmp(flag,'done') && ~strcmp(options.Display,'off')
sounddir = [getenv('ProgramFiles') '\Starcraft\Sound\Zerg\Advisor'] ;
if isdir(sounddir) && exist([sounddir '\ZAdUpd02.wav'],'file')
[y, Fs, nbits] = wavread([sounddir '\ZAdUpd02.wav']) ;
obj = audioplayer(y, Fs, nbits);
playblocking(obj)
end
end
|
|
Contact us at files@mathworks.com