最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

基于統(tǒng)一空間方法的動態(tài)切換擁擠(DSC)DSC-MOAGDE算法附matlab代碼

2023-02-04 23:49 作者:Matlab工程師  | 我要投稿

?作者簡介:熱愛科研的Matlab仿真開發(fā)者,修心和技術同步精進,matlab項目合作可私信。

??個人主頁:Matlab科研工作室

??個人信條:格物致知。

更多Matlab仿真內(nèi)容點擊??

智能優(yōu)化算法??神經(jīng)網(wǎng)絡預測?雷達通信??無線傳感器

信號處理?圖像處理?路徑規(guī)劃?元胞自動機?無人機??電力系統(tǒng)

? 內(nèi)容介紹

本研究提出了一種穩(wěn)健的方法,使用基于帕累托的歸檔機制和基于擁擠距離的歸檔處理機制來提高多目標進化算法 (MOEA) 的搜索性能。所提出方法的目的是在目標和決策空間中提供可持續(xù)的多樣性,并在兩個空間中建立穩(wěn)定的開發(fā)-探索平衡。為此:1) 定義了參考空間組合,2) 開發(fā)了由參考空間組合組成的策略以提高擁擠距離計算的性能,以及 3) 提出了一種動態(tài)切換機制來實現(xiàn)這些策略。在所提出的 DSC 方法中,非支配解在三個不同的參考空間中表示:決策空間、目標空間、以及這兩個空間的統(tǒng)一結(jié)果。創(chuàng)建了這三個空間的二進制組合,并開發(fā)了使用不同參考空間的策略。切換機制旨在動態(tài)地實施這些策略。參考由該切換機制選擇的空間向量執(zhí)行擁擠距離計算。所提出的 DSC 方法在多模態(tài)多目標優(yōu)化問題 (MMOP) 和結(jié)合交流最優(yōu)功率流 (AC-OPF) 和交流/直流最優(yōu)功率流 (AC/DC-OPF) 的實際工程問題上進行了測試. 根據(jù)實驗研究結(jié)果,與競爭對手相比,所提出的 DSC-MOAGDE 算法在 MMOP 上的成功率提高了約 30%。同樣,所提出的方法能夠?qū)⒊杀緝?yōu)化 6.66%、24.15%、52。

? 部分代碼

function [bestFitness]=MOAGDE_SingerMap_Cr3(NP,funnum)

[fname,D, n_obj, L, H] = terminate_problem(funnum);

GEN = 50;

problemName = strcat("@",fname);

ObjectiveFunction=eval(problemName);

X = zeros(D,1); % trial vector

Pop = zeros(D,NP); % population

Fit = zeros(NP,n_obj); % fitness of the population

r = zeros(3,1); % randomly selected indices

Archive_member_no = 0;

bestFitness=inf*ones(1,n_obj);

Archive_X=zeros(NP,D);

Archive_F=ones(NP,n_obj)*inf;

ArchiveMaxSize = NP;

% *********************** %

% ** CREATE POPULATION ** %

% *********************** %


for j = 1:NP % initialize each individual

? ? Pop(:,j) = L + (H-L).*rand(1,D); % within b.constraints

end

Cr_All=zeros(1,2);

NW=zeros(1,2);

global chaosMap

SingerMap(GEN+10)

for g = 1:GEN % for each generation

? ??

? ? for i=1:NP %Calculate all the objective values first

? ? ? ? Fit(i,:)=ObjectiveFunction(Pop(:,i)');

? ? ? ? if dominates(Fit(i,:),bestFitness)

? ? ? ? ? ? bestFitness=Fit(i,:);

? ? ? ? end

? ? end

? ??

? ? [Archive_X, Archive_F, Archive_member_no]=UpdateArchive(Archive_X, Archive_F, Pop', Fit, Archive_member_no);

? ??

? ? if Archive_member_no>ArchiveMaxSize

? ? ? ? Archive_X_F = [Archive_X Archive_F];

? ? ? ? Norm_Archive_X_F = Normalize(Archive_X_F);

? ? ? ? Norm_Archive_X = Normalize(Archive_X);

? ? ? ? if(rand()>chaosMap(g))

? ? ? ? ? ? ?Archive_mem_ranks_X=RankingProcess(Norm_Archive_X, ArchiveMaxSize, D);

? ? ? ? ? ? [Archive_X, Archive_F, ~, Archive_member_no]=HandleFullArchive(Archive_X, Archive_F, Archive_member_no, Archive_mem_ranks_X, ArchiveMaxSize);

? ? ? ? else

? ? ? ? ? ? Archive_mem_ranks_X_F=RankingProcess(Norm_Archive_X_F, ArchiveMaxSize, (n_obj+D));

? ? ? ? ? ? [Archive_X, Archive_F, ~, Archive_member_no]=HandleFullArchive(Archive_X, Archive_F, Archive_member_no, Archive_mem_ranks_X_F, ArchiveMaxSize);

? ? ? ?end? ??

? ? end

? ??

? ? Norm_Archive_X = Normalize(Archive_X);

? ? Archive_mem_ranks_X=RankingProcess(Norm_Archive_X, Archive_member_no, D);

? ? index=RouletteWheelSelection(1./Archive_mem_ranks_X);

? ? if index==-1

? ? ? ? index=1;

? ? end

? ? % Update the best Organism

? ? bestSolution=Archive_X(index,:);

? ? bestFitness=Archive_F(index,:);

? ??

? ? Norm_Archive_F = Normalize(Archive_F);

? ? Archive_mem_ranks_F=RankingProcess(Norm_Archive_F, Archive_member_no, n_obj);

? ??

? ? Norm_Fit = Normalize(Fit);

? ? allRank=RankingProcess(Norm_Fit, ArchiveMaxSize, n_obj);

? ??

? ? CrPriods_Index=zeros(1,NP);

? ? Sr=zeros(1,2);

? ? CrPriods_Count=zeros(1,2);

? ? for j = 1:NP % for each individual

? ? ? ? ?

? ? ? ? ?%%%%%%%%ADAPTIVE CR RULE? %%%%%%%%%%%%%%%%%%%%%%%%%

? ? ? ? ? ? Ali = rand;

? ? ? ? ? ? if(g<=1) % Do for the first Generation

? ? ? ? ? ? ? ? if (Ali<=1/2)

? ? ? ? ? ? ? ? ? ? CR=0.05+0.1*rand(1,1);

? ? ? ? ? ? ? ? ? ? CrPriods_Index(j)=1;

? ? ? ? ? ? ? ??

? ? ? ? ? ? ? ? else

? ? ? ? ? ? ? ? ? ? CR=0.9+0.1*rand(1,1);

? ? ? ? ? ? ? ? ? ? CrPriods_Index(j)=2;? ??

? ? ? ? ? ? ? ? end

? ? ? ? ? ? ? ? CrPriods_Count(CrPriods_Index(j))=CrPriods_Count(CrPriods_Index(j)) + 1;

? ? ? ? ? ? else

? ? ? ? ? ? ? ? ?if (Ali<=NW(1))

? ? ? ? ? ? ? ? ? ? CR=0.05+0.1*rand(1,1);

? ? ? ? ? ? ? ? ? ? CrPriods_Index(j)=1;

? ? ? ? ? ? ? ??

? ? ? ? ? ? ? ? ?else

? ? ? ? ? ? ? ? ? ? CR=0.9+0.1*rand(1,1);

? ? ? ? ? ? ? ? ? ? CrPriods_Index(j)=2;? ??

? ? ? ? ? ? ? ? end

? ? ? ? ? ? ? ? CrPriods_Count(CrPriods_Index(j))=CrPriods_Count(CrPriods_Index(j)) + 1;

? ? ? ? ? ? end


? ? ? ? ? ? %%%%%%%%%%%%%%%%%END OF CR RULE%%%%%%%%%%%%%%%%%%%%%%%%%%%

? ? ? ? ? ? ? ? indexs_Archive = [];

? ? ? ? ? ? ? ? while(size(indexs_Archive) < 3)

? ? ? ? ? ? ? ? ? ? index=RouletteWheelSelection(1./Archive_mem_ranks_F);

? ? ? ? ? ? ? ? ? ? if ismember(index,indexs_Archive) == 0

? ? ? ? ? ? ? ? ? ? ? ? indexs_Archive = [indexs_Archive index];

? ? ? ? ? ? ? ? ? ? end

? ? ? ? ? ? ? ? end

? ? ? ? ? ? ? ??

? ? ? ? ? ? ? ? indexs_Pop = [];

? ? ? ? ? ? ? ? while(size(indexs_Pop) < 3)

? ? ? ? ? ? ? ? ? ? index=RouletteWheelSelection(1./allRank);

? ? ? ? ? ? ? ? ? ? if ismember(index,indexs_Pop) == 0

? ? ? ? ? ? ? ? ? ? ? ? indexs_Pop = [indexs_Pop index];

? ? ? ? ? ? ? ? ? ? end

? ? ? ? ? ? ? ? end

? ? ? ? ? ? ? ??

? ? ? ? ? ? ? ? r(1) = indexs_Pop(1);

? ? ? ? ? ? ? ? r(2) = indexs_Archive(1);

? ? ? ? ? ? ? ? r(3) = indexs_Pop(2);


? ? ? ? ? ? ? ? F=0.1+0.9*rand(1,1);

? ? ? ? ? ? ? ? Archive_Pop = Archive_X';

? ? ? ? ? ? ? ? Rnd = floor(rand()*D) + 1;

? ? ? ? ? ? ? ? for i = 1:D

? ? ? ? ? ? ? ? ? ? if ( rand()<CR ) || ( Rnd==i )

? ? ? ? ? ? ? ? ? ? ? ? X(i)=Pop(i,r(3))+F*(Pop(i,r(1))-(Archive_Pop(i,r(2))));

? ? ? ? ? ? ? ? ? ? else

? ? ? ? ? ? ? ? ? ? ? ? %X(i) = Pop(i,j);

? ? ? ? ? ? ? ? ? ? ? ? X(i) = bestSolution(i);

? ? ? ? ? ? ? ? ? ? end

? ? ? ? ? ? ? ? end

? ? ? ? % end%end of All cases

? ? ? ? % verify boundary constraints

? ? ? ? % verify boundary constraints

? ? ? ? for i = 1:D

? ? ? ? ? ? if (X(i)<L(i))||(X(i)>H(i))

? ? ? ? ? ? ? ? X(i) = L(i) + (H(i)-L(i))*rand();

? ? ? ? ? ? end

? ? ? ? end

? ? ? ? % select the best individual

? ? ? ? % between trial and current ones

? ? ? ? % calculate fitness of trial individual? ?

? ? ? ? XPf=ObjectiveFunction(X');

? ? ? ? % if trial is better or equal than current

? ? ? ? % CRRatio(find(A==CRs(j)))=CRRatio(find(A==CRs(j)))+1-(min(f,Fit(j))/max(f,Fit(j)));

? ? ? ? Sr (CrPriods_Index(j)) = Sr(CrPriods_Index(j)) +1;


? ? ? ? Pop(:,j) = X; % replace current by trial

? ? ? ? Fit(j,:) = XPf ;

? ? ? ? % if trial is better than the best

? ? end

? ? CrPriods_Count(CrPriods_Count==0)=0.0001;

? ? Sr=Sr./CrPriods_Count;

%%%%%%%%%%%%%%%%USING SR ONLY%%%%%%%%%%5? ??

? ? if(sum(Sr)==0)

? ? ? ? W=[1/2 1/2];

? ? else

? ? ? ? W=Sr/sum(Sr);

? ? end

? ??

%%%%%%%%%%%%%%%%%%%%%%%%%%5

? ? NW=(NW*(g-1)+W)/g;

? ? Cr_All=Cr_All+CrPriods_Count;

? ? display(['At the iteration ', num2str(g), ' best fitness ', num2str(bestFitness)]);

? ??

end

end

? 運行結(jié)果

編輯

? 參考文獻

KAHRAMAN, H. T., AKBEL, M., DUMAN, S., KATI, M., SAYAN, H. H. (2022). Unified Space Approach-based Dynamic Switched Crowding (DSC): A New Method for Designing Pareto-based Multi/Many-Objective Algorithms, Swarm and Evolutionary Computation, 101196, https://doi.org/10.1016/j.swevo.2022.101196

? Matlab代碼關注

??部分理論引用網(wǎng)絡文獻,若有侵權(quán)聯(lián)系博主刪除

?? 關注我領取海量matlab電子書和數(shù)學建模資料

?


基于統(tǒng)一空間方法的動態(tài)切換擁擠(DSC)DSC-MOAGDE算法附matlab代碼的評論 (共 條)

分享到微博請遵守國家法律
电白县| 西乌珠穆沁旗| 沙湾县| 平潭县| 楚雄市| 瑞金市| 孝义市| 留坝县| 承德市| 精河县| 平顺县| 木兰县| 桓仁| 大厂| 巴林右旗| 云梦县| 北川| 锡林浩特市| 鹤庆县| 新泰市| 顺昌县| 高邑县| 定安县| 建宁县| 乳源| 体育| 长沙市| 湖北省| 清镇市| 临漳县| 通榆县| 汝州市| 阿荣旗| 金门县| 平乐县| 桃园县| 新兴县| 克山县| 什邡市| 宁河县| 乐东|