1 / 13
文档名称:

多目标遗传算法代码.doc

格式:doc   大小:114KB   页数:13页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

多目标遗传算法代码.doc

上传人:ttteee8 2020/8/11 文件大小:114 KB

下载得到文件列表

多目标遗传算法代码.doc

相关文档

文档介绍

文档介绍:%functionnsga_2(pro)%%MainFunction%MainprogramtoruntheNSGA-IIMOEA・%Readthecorrespondingdocumentationtolearnmoreaboutmultiobjective%optimizationusingevolutionaryalgorithms.%initialize_variableshastwoarguments;Firstbeingthepopulationsize%andthesecondtheproblemnumbe匚TcorrespondstoM0P1and2%correspondstoM0P2・%inp_para_definition=input_parameters_definition;%%Initializethevariables%Declarethevariablesandinitializetheirvalues%pop-population%gen・generations%pro-problemnumber%clear;clc;tic;pop=100;%每一代的种群数gen=100;%总共的代数pro=2; %问题选择1或者2,见switchswitchprocase1%=2;%%difficulttovisualizethedecisionvariablesspacewhilethe%=6;case2M=3;V=12;case3 %case1和case2用来对整个算法进行常规验证,作为调试之用;case3为本工程所需;M=2;%(outputparameters个数)V=8;%(inputparameters个数)K=10;end%Initializethepopulationchromosome=initializc_variablcs(pop,pro);%%Sorttheinitializedpopulation%Sortthepopulationusingnon-domination-%foreachindividualwhicharetherankandthecrowdingdistance%correspondingtotheirpositioninthefronttheybelong・真是牛X了。chromosome=non_domination_sort_mod(chromosome,pro);%%Starttheevolutionprocess%Thefollowingareperformedineachgeneration%Selecttheparents%PerfromcrossoverandMutationoperator%PerformSelectionfori=1:gen%Selecttheparents%Parentsarcselectedforreproductiontogenerateoffspring・The%originalNSGA-IIusesabinarytournamentselectionbasedonthe%parisionoperato匚Theargumentsare%pool・% populationsize.%tour--IIusesabinarytournament% selection,buttoseetheeffectoftournamentsizethisiskept% arbitary,=round(pop/2);tour=2;%下面进行二人锦标赛配对,新的群体规模是原来群体的一半parent_chromosome=toumament_selection(chromosome,pool,tour);%PerfromcrossoverandMutationoperator%TheoriginalNSGA-IIalgorithmusesSimulatedBinaryCrossover(SBX)and%Polynomialcrossove匚Crossoverprobabilitypc=%probabilityispm=1/n,wherenisthenumberofdec