亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pso.asv

?? 基于matlab開發的pso程序
?? ASV
字號:
%PSO >> function for the multi-objective PSO ALGORITHM Programmed by Li Shaojun
%
% USAGES:   1.) [fxmin, xmin, Swarm, history] = PSO(psoOptions);
%           2.) [fxmin, xmin, Swarm, history] = PSO;
%           3.) fxmin = PSO(psoOptions);
%           3.) PSO 
%           etc.
%
% Arguments     : psoOptions--> A Matlab stucture containing all PSO related options. (see also: get_psoOptions)
% Return Values : [fxmin, xmin, Swarm, history]
%                     |     |       |       |_The history of the algorithm. Depicts how the function value of GBest changes over the run.
%                     |     |       |_The final Swarm. (A matrix containing co-ordinates of all particles)
%                     |     |_The co-ordinates of Best (ever) particle found during the PSO's run.
%                     |__The objective value of Best (^xmin) particle.
%
%  History        :   Author      :   JAG (Jagatpreet Singh)
%                     Created on  :   05022003 (Friday. 2nd May, 2003)
%                     Comments    :   The basic PSO algorithm.
%                     Modified on :   0710003 (Thursday. 10th July, 2003)
%                     Comments    :   It uses psoOptions structure now. More organized.
%  
%                     see also: get_psoOptions
function [fxmin, xmin, Swarm, history] = PSO(psoOptions)

%Globals
global psoFlags;
global psoVars;
global psoSParameters;
global notifications;


upbnd = 600; % Upper bound for init. of the swarm
lwbnd = 300; % Lower bound for init. of the swarm
GM = 0; % Global minimum (used in the stopping criterion)
ErrGoal = 1e-10; % Desired accuracy
% 

%Initializations
if nargin == 0
    psoOptions = get_psoOptions;
end


%For Displaying 
if psoOptions.Flags.ShowViz
    global vizAxes; %Use the specified axes if using GUI or create a new global if called from command window
    vizAxes = plot(0,0, '.');
    axis([-1000 1000 -1000 1000 -1000 1000]);   %Initially set to a cube of this size
    axis square;
    grid off;
    set(vizAxes,'EraseMode','xor','MarkerSize',15); %Set it to show particles.
    pause(1);
end
%End Display initialization

% Initializing variables
success = 0; % Success Flag
iter = 0;   % Iterations' counter
fevals = 0; % Function evaluations' counter

% Using params---
% Determine the value of weight change
w_start = psoOptions.SParams.w_start;   %Initial inertia weight's value
w_end = psoOptions.SParams.w_end;       %Final inertia weight
w_varyfor = floor(psoOptions.SParams.w_varyfor*psoOptions.Vars.Iterations); %Weight change step. Defines total number of iterations for which weight is changed.
w_now = w_start;
inertdec = (w_start-w_end)/w_varyfor; %Inertia weight's change per iteration

% Initialize Swarm and Velocity
SwarmSize = psoOptions.Vars.SwarmSize;
Swarm = rand(SwarmSize, psoOptions.Vars.Dim)*(psoOptions.Obj.ub-psoOptions.Obj.lb) + psoOptions.Obj.lb;
VStep = rand(SwarmSize, psoOptions.Vars.Dim);

f2eval = psoOptions.Obj.f2eval; %The objective function to optimize.

%Find initial function values.
fSwarm = feval(f2eval, Swarm);
fevals = fevals + SwarmSize;

% Initializing the Best positions matrix and
% the corresponding function values
PBest = Swarm;
fPBest = fSwarm;

% Finding best particle in initial population
[fGBest, g] = min(fSwarm);
lastbpf = fGBest;
Best = Swarm(g,:); %Used to keep track of the Best particle ever     
fBest = fGBest;
history = [0, fGBest];

if psoOptions.Flags.Neighbor
    % Define social neighborhoods for all the particles
    for i = 1:SwarmSize
        lo = mod(i-psoOptions.SParam.Nhood:i+psoOptions.SParam.Nhood, SwarmSize);
        nhood(i,:) = [lo];
    end
    nhood(find(nhood==0)) = SwarmSize; %Replace zeros with the index of last particle.
end

if psoOptions.Disp.Interval & (rem(iter, psoOptions.Disp.Interval) == 0)
    disp(sprintf('Iterations\t\tfGBest\t\t\tfevals'));
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                  THE  PSO  LOOP                          %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
while( (success == 0) & (iter <= psoOptions.Vars.Iterations) )
    iter = iter+1;
    
    % Update the value of the inertia weight w
    if (iter<=w_varyfor) & (iter > 1)
        w_now = w_now - inertdec; %Change inertia weight
    end
    
    
    %%%%%%%%%%%%%%%%%
    % The PLAIN PSO %
    
    % Set GBest
    A = repmat(Swarm(g,:), SwarmSize, 1); %A = GBest. repmat(X, m, n) repeats the matrix X in m rows by n columns.
    B = A; %B wil be nBest (best neighbor) matrix
    
    % use neighborhood model
    % circular neighborhood is used
    if psoOptions.Flags.Neighbor
        for i = 1:SwarmSize
            [fNBest(i), nb(i)] = min(fSwarm( find(nhood(i)) ));
            B(i, :) = Swarm(nb(i), :);
        end
    end
        
    % Generate Random Numbers
    R1 = rand(SwarmSize, psoOptions.Vars.Dim);
    R2 = rand(SwarmSize, psoOptions.Vars.Dim);
    
    % Calculate Velocity
    if ~psoOptions.Flags.Neighbor %Normal
        VStep = w_now*VStep + psoOptions.SParams.c1*R1.*(PBest-Swarm) + psoOptions.SParams.c2*R2.*(A-Swarm);
    else %With neighborhood
        R3 = rand(SwarmSize, psoOptions.Vars.Dim); %random nos for neighborhood
        VStep = w_now*VStep + psoOptions.SParams.c1*R1.*(PBest-Swarm) + psoOptionsSParams.c2*R2.*(A-Swarm) + psoOptionsSParams.c3*R3.*(B-Swarm);
    end
    
    % Apply Vmax Operator for v > Vmax
    changeRows = VStep > psoOptions.SParams.Vmax;
    VStep(find(changeRows)) = psoOptions.SParams.Vmax;
    % Apply Vmax Operator for v < -Vmax
    changeRows = VStep < -psoOptions.SParams.Vmax;
    VStep(find(changeRows)) = -psoOptions.SParams.Vmax;
    
    % ::UPDATE POSITIONS OF PARTICLES::
    Swarm = Swarm + psoOptions.SParams.Chi * VStep;    % Evaluate new Swarm
    
    fSwarm = feval(f2eval, Swarm);
    fevals = fevals + SwarmSize;
    
    % Updating the best position for each particle
    changeRows = fSwarm < fPBest;
    fPBest(find(changeRows)) = fSwarm(find(changeRows));
    PBest(find(changeRows), :) = Swarm(find(changeRows), :);
    
    lastbpart = PBest(g, :);
    % Updating index g
    [fGBest, g] = min(fPBest);

    %Update Best. Only if fitness has improved.
    if fGBest < lastbpf
        [fBest, b] = min(fPBest);
        Best = PBest(b,:);
    end
    
    %%OUTPUT%%
    if psoOptions.Save.Interval & (rem(iter, psoOptions.Save.Interval) == 0)
        history((size(history,1)+1), :) = [iter, fBest];
    end
    
    if psoOptions.Disp.Interval & (rem(iter, psoOptions.Disp.Interval) == 0)
        disp(sprintf('%4d\t\t\t%.5g\t\t\t%5d', iter, fGBest, fevals));
    end

    if psoOptions.Flags.ShowViz
        [fworst, worst] = max(fGBest);
        DrawSwarm(Swarm, SwarmSize, iter, psoOptions.Vars.Dim, Swarm(g,:), vizAxes);
    end
    
    %%TERMINATION%%
    if abs(fGBest-psoOptions.Obj.GM) <= psoOptions.Vars.ErrGoal     %GBest
        success = 1;
    elseif abs(fBest-psoOptions.Obj.GM)<=psoOptions.Vars.ErrGoal    %Best
        success = 1
    else
        lastbpf = fGBest; %To be used to find Best
    end

    
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                  END  OF PSO  LOOP                       %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



[fxmin, b] = min(fPBest);
xmin = PBest(b, :);

history = history(:,1);
%Comment below line to Return Swarm. Uncomment to return previous best positions.
% Swarm = PBest; %Return PBest

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人免费视频app| 亚洲综合免费观看高清完整版在线| 亚洲6080在线| 欧美四级电影在线观看| 性久久久久久久| 欧美嫩在线观看| 奇米色一区二区三区四区| 欧美一级艳片视频免费观看| 蜜桃视频在线观看一区| 精品欧美乱码久久久久久 | 久久精品欧美日韩精品| 国产在线精品一区二区夜色| 久久久精品蜜桃| 大桥未久av一区二区三区中文| 中文字幕在线观看不卡视频| 91碰在线视频| 日韩精品亚洲一区二区三区免费| 日韩欧美电影一区| 国产不卡在线视频| 一区二区三区.www| 日韩一区二区在线看| 国产剧情在线观看一区二区| 亚洲日本在线a| 91麻豆精品国产91久久久资源速度| 蜜桃视频免费观看一区| 日本一区二区三区四区| 日韩免费视频一区| 国产成人三级在线观看| 一区二区三区在线观看动漫| 91精品国产乱码| 成人激情小说乱人伦| 亚洲成a人片在线不卡一二三区| 91精品欧美久久久久久动漫| 成人免费黄色大片| 日韩高清不卡一区二区三区| 中文字幕免费观看一区| 欧美美女激情18p| 高清在线观看日韩| 日韩av中文字幕一区二区三区| 中文字幕免费不卡在线| 欧美日韩国产小视频在线观看| 国产精品18久久久久久久久| 亚洲国产日日夜夜| 欧美激情一区二区三区在线| 777久久久精品| 成人avav在线| 国产一区二区三区蝌蚪| 亚洲国产日韩a在线播放| 久久久777精品电影网影网| 欧美乱妇20p| 色悠久久久久综合欧美99| 精品一区二区精品| 午夜一区二区三区在线观看| 最新国产成人在线观看| 久久久亚洲精品一区二区三区| 欧美日韩精品一区二区天天拍小说 | 中文字幕乱码日本亚洲一区二区 | 欧美视频在线播放| 日韩一卡二卡三卡国产欧美| 97久久精品人人澡人人爽| 国产成人在线电影| 免费欧美日韩国产三级电影| 亚洲香肠在线观看| 亚洲少妇30p| 国产亲近乱来精品视频| 欧美va在线播放| 欧美乱妇23p| 欧美精品久久天天躁| 欧亚一区二区三区| 在线观看日韩电影| 91福利视频网站| av在线一区二区三区| 成人中文字幕在线| 国产乱码字幕精品高清av | 亚洲日本成人在线观看| 国产欧美日韩三级| 国产日韩av一区| 久久嫩草精品久久久精品一| 久久―日本道色综合久久| 日韩一区二区在线播放| 9191精品国产综合久久久久久| 欧美视频自拍偷拍| 欧美日韩视频在线观看一区二区三区 | 国产91精品欧美| 国产999精品久久久久久| 国产成人av影院| 国产成人精品午夜视频免费| 国产91精品一区二区麻豆网站| 国产a区久久久| 成人黄色片在线观看| 99国产精品一区| 在线观看区一区二| 精品1区2区3区| 欧美一区二区成人6969| 精品国一区二区三区| 久久人人爽人人爽| 国产精品视频九色porn| 亚洲视频免费看| 天天综合天天综合色| 久久99精品视频| 国产酒店精品激情| av动漫一区二区| 欧美日韩一本到| 精品久久国产老人久久综合| 国产欧美日韩亚州综合| 亚洲欧美怡红院| 午夜日韩在线电影| 国产一区二区三区综合| 成人免费视频免费观看| 欧美午夜精品久久久久久孕妇| 欧美一级二级三级蜜桃| 久久久久久免费毛片精品| 亚洲人成伊人成综合网小说| 亚洲一区二区四区蜜桃| 激情综合网天天干| 精品欧美一区二区在线观看 | 久久久亚洲国产美女国产盗摄| 国产日韩在线不卡| 夜夜嗨av一区二区三区中文字幕| 五月天视频一区| 国产成人综合自拍| 欧美性色欧美a在线播放| 久久综合资源网| 亚洲人成网站色在线观看| 麻豆精品精品国产自在97香蕉| 丁香婷婷综合网| 欧美蜜桃一区二区三区| 国产精品伦一区二区三级视频| 日韩在线一二三区| jlzzjlzz亚洲女人18| 欧美一区二区三区免费| 亚洲视频网在线直播| 国产资源在线一区| 欧美午夜一区二区三区 | 69精品人人人人| 中文字幕精品综合| 免费不卡在线观看| 色婷婷av一区二区三区大白胸| 精品三级在线观看| 午夜影院久久久| 一本一道综合狠狠老| 国产亚洲婷婷免费| 久久精品久久综合| 欧美影视一区在线| 亚洲欧美综合在线精品| 国产精品一区在线观看你懂的| 777午夜精品视频在线播放| 伊人一区二区三区| 成人h精品动漫一区二区三区| 精品国产成人系列| 日韩不卡免费视频| 欧美午夜寂寞影院| 一区二区三区鲁丝不卡| a在线播放不卡| 日本一区二区三区久久久久久久久不| 日韩高清不卡在线| 欧美狂野另类xxxxoooo| 亚洲一区二区三区在线看| 91免费在线播放| 日韩毛片在线免费观看| 成人黄色国产精品网站大全在线免费观看| 日韩精品影音先锋| 麻豆精品精品国产自在97香蕉 | 日本不卡视频一二三区| 欧美视频日韩视频| 偷窥少妇高潮呻吟av久久免费| 欧美午夜电影一区| 亚洲电影视频在线| 欧美日韩成人综合天天影院| 亚洲精品中文在线观看| 欧美激情在线一区二区| 国产一区二区三区最好精华液| 欧美一区二区三区白人| 日本欧美在线看| 日韩一级大片在线观看| 久久精品99国产精品| 精品美女一区二区| 国产高清精品久久久久| 在线看国产日韩| 97成人超碰视| 欧美一区二区视频网站| 国产精品护士白丝一区av| 成人app下载| 亚洲激情综合网| 欧美视频中文一区二区三区在线观看| 一区二区三区国产精华| 欧美日韩极品在线观看一区| 亚洲一区二区免费视频| 欧美日韩精品一区二区三区蜜桃| 亚洲综合网站在线观看| 欧美一区午夜精品| 国内精品写真在线观看| 欧美国产精品专区| eeuss鲁片一区二区三区| 一级中文字幕一区二区| 91精品国产手机| 成人午夜短视频| 一区二区成人在线视频| 欧美一卡2卡3卡4卡| 成人高清免费观看|