规模为N的种群中的每个个体都要针对M个目标函数和种群中的N-1个个体进行比较,复杂度为O(MN),因此种群中的N个个体都比较结束的复杂度为O(MN2),即每进行一次Pareto分级的时间复杂度为O(MN2)。
该算法需要保存两个量:
(1).支配个数np。该量是在可行解空间中可以支配个体p的所有个体的数量。
(2).被支配个体集合SP。该量是可行解空间中所有被个体p支配的个体组成的集合。
matlab代码:
(注意PopObj填入的多目标的函数值,如果有两个目标,100个个体,那么就是100*2的矩阵,nSort是前沿面的编号)
| 
					 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66  | 
						function [FrontNO,MaxFNO] = NDSort(PopObj,nSort) %NDSort - Do non-dominated sorting on the population by ENS % %   FrontNO = NDSort(A,s) does non-dominated sorting on A, where A is a %   matrix which stores the objective values of all the individuals in the %   population, and s is the number of individuals being sorted at least. %   FrontNO(i) means the number of front of the i-th individual. % %   [FrontNO,K] = NDSort(...) also returns the maximum number of fronts, %   except for the value of inf. % %   In particular, s = 1 stands for find only the first non-dominated %   front, s = size(A,1)/2 stands for sort only half of the population %   (which is often used in the algorithm), and s = inf stands for sort the %   whole population. % %   Example: %       [FrontNO,MaxFNO] = NDSort(PopObj,1)     [N,M] = size(PopObj);     FrontNO = inf(1,N);     MaxFNO  = 0;     [PopObj,rank] = sortrows(PopObj);     while sum(FrontNO<inf) < min(nSort,N)         MaxFNO = MaxFNO + 1;         for i = 1 : N             if FrontNO(i) == inf                 Dominated = false;                 for j = i-1 : -1 : 1                     if FrontNO(j) == MaxFNO                         m = 2;                         while m <= M && PopObj(i,m) >= PopObj(j,m)                             m = m + 1;                         end                         Dominated = m > M;                         if Dominated || M == 2                             break;                         end                     end                 end                 if ~Dominated                     FrontNO(i) = MaxFNO;                 end             end         end     end     FrontNO(rank) = FrontNO; end  | 
					






博主,您好,我最近想通过platEMO这个平台测试下我自己的目标函数problem,所以想问一下博主有没有自定义问题的一些例子来让我参考一下下,或者请教一下怎么定义自己的目标问题。感谢!!
抱歉哈,这个平台我也不太熟悉,不是我做的,里面有个说明书应该介绍了如何自定义问题。
请问可以具体举个输入的例子吗?发现里面的好多都需要输入参数,例如“基于非支配排序的多目标PSO算法MATLAB实现”也需要,谢谢~
http://bimk.ahu.edu.cn/12957/list.htm
这个里面有很多例子
好的呢,但是我在刚才您发的链接上找到的也是出现同样的情况,都出现“输入参数的数目不足”这个问题,例如MOPSO中运行出错,出现“出错 MOPSO(LINE 17) div=Global. ParameterSet(10)”这种问题,谢谢~
全局参数未定义,试试GUI
您好,我又下载了其他的程序运行了,都是出现同样的问题“输入参数不足”,是需要我输入相应的参数吗?好难受啊,都不能运行,我现在想要解决多目标优化问题,还请大佬多多指教,可以参考一下哪些代码资料呢?还有,您刚才说的GUI我没有找到哎,需要在哪里找呢?谢谢~
直接在matlab 控制台输入main()
好的呢,谢谢博主,讲解到位,还有,出现PlatEMO v1.5界面中,在Problem这一栏中,里面的具体解决的问题是CEO2018-MaOO-Tech-Report这个pdf中的问题吗?谢谢~
不清楚呢,你问问作者
好的呢,请问在Omega这个网站上的代码运行也是出现“输入参数不足”需要怎么解决呢?是不是没有主函数呢?谢谢~
需要更多专业性问题,可以关注网站下方公众号。
新手小白,请问这个代码是不是不能直接运行,需要输入一些参数吗?
可以直接运行,但是输入的变量格式是有要求的。