资源简介

http://www.mathworks.com/matlabcentral/fileexchange/25986-constrained-particle-swarm-optimization Description Previously titled "Another Particle Swarm Toolbox" Introduction Particle swarm optimization (PSO) is a derivative-free global optimum solver. It is inspired by the surprisingly organized behaviour of large groups of simple animals, such as flocks of birds, schools of fish, or swarms of locusts. The individual creatures, or "particles", in this algorithm are primitive, knowing only four simple things: 1 & 2) their own current location in the search space and fitness value, 3) their previous personal best location, and 4) the overall best location found by all the particles in the "swarm". There are no gradients or Hessians to calculate. Each particle continually adjusts its speed and trajectory in the search space based on this information, moving closer towards the global optimum with each iteration. As seen in nature, this computational swarm displays a remarkable level of coherence and coordination despite the simplicity of its individual particles. Ease of Use If you are already using the Genetic Algorithm (GA) included with MATLAB's Global Optimization Toolbox, then this PSO toolbox will save you a great deal of time. It can be called from the MATLAB command line using the same syntax as the GA, with some additional options specific to PSO. This will allow a high degree of code re-usability between the PSO toolbox and the GA toolbox. Certain GA-specific parameters such as cross-over and mutation functions will obviously not be applicable to the PSO algorithm. However, many of the commonly used options for the Genetic Algorithm Toolbox may be used interchangeably with PSO since they are both iterative population-based solvers. See >> help pso (from the ./psopt directory) for more details. Features * NEW: support for distributed computing using MATLAB's parallel computing toolbox. * Full support for bounded, linear, and nonlinear constraints. *

资源截图

代码片段和文件信息

function state = evolutioncomplete(optionsstateflag)
% 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] = audioread([sounddir ‘\ZAdUpd02.wav‘]) ;
        obj = audioplayer(y Fs nbits);
        playblocking(obj)
    end
end

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-02-25 06:07  sdnchen-psomatlab-a65870f\
     文件        4913  2016-02-25 06:07  sdnchen-psomatlab-a65870f\README.md
     文件         633  2016-02-25 06:07  sdnchen-psomatlab-a65870f\evolutioncomplete.m
     文件        1107  2016-02-25 06:07  sdnchen-psomatlab-a65870f\license.txt
     目录           0  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\
     文件         182  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\heart.m
     文件         718  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\initstate.m
     文件         585  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\overlaycontour.m
     文件        1993  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\overlaysurface.m
     文件        4726  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\psocheckbounds.m
     文件        5123  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\psocheckinitialpopulation.m
     文件         730  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\psocheckpopulationinitrange.m
     文件         800  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\psocreationbinary.m
     文件         948  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\psocreationuniform.m
     文件        1811  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\psogenerateoutputmessage.m
     文件         805  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\psogetinitialpopulation.m
     文件        2756  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\psorunhybridfcn.m
     文件         444  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\quadrifolium.m
     文件         288  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\unitcircle.m
     文件         286  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\unitdisk.m
     文件          38  2016-02-25 06:07  sdnchen-psomatlab-a65870f\private\void.m
     文件       26034  2016-02-25 06:07  sdnchen-psomatlab-a65870f\pso.m
     文件        1461  2016-02-25 06:07  sdnchen-psomatlab-a65870f\psobinary.m
     文件        1814  2016-02-25 06:07  sdnchen-psomatlab-a65870f\psoboundsabsorb.m
     文件        2971  2016-02-25 06:07  sdnchen-psomatlab-a65870f\psoboundspenalize.m
     文件         540  2016-02-25 06:07  sdnchen-psomatlab-a65870f\psoboundsreflect.m
     文件        2454  2016-02-25 06:07  sdnchen-psomatlab-a65870f\psoboundssoft.m
     文件         723  2016-02-25 06:07  sdnchen-psomatlab-a65870f\psocalculatepenalties.m
     文件        2301  2016-02-25 06:07  sdnchen-psomatlab-a65870f\psodemo.m
     文件        2254  2016-02-25 06:07  sdnchen-psomatlab-a65870f\psoiterate.m
     文件        9936  2016-02-25 06:07  sdnchen-psomatlab-a65870f\psooptimset.m
............此处省略18个文件信息

评论

共有 条评论