![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
单位同事合乘算法
飞翔的武璐璐
这个作者很懒,什么都没留下…
展开
-
NSGA2算法二:加信息素
#主函数pop_size=200max_gen=300solution=[]company = [0,118.719989,32.208781]zuhe=[]for n in range(pop_size): location = [[1, 118.77089, 32.242341], [2, 118.77116, 32.242325], [3, 118.758009, 32.236431], [4, 118.753302, 32.25167], .原创 2020-09-12 21:53:16 · 161 阅读 · 0 评论 -
NSGA2算法一
pop_size=200max_gen=300solution=[]company = [0,118.719989,32.208781]for n in range(pop_size): location = [[1, 118.77089, 32.242341], [2, 118.77116, 32.242325], [3, 118.758009, 32.236431], [4, 118.753302, 32.25167], .原创 2020-09-12 21:49:37 · 466 阅读 · 0 评论 -
NSGA2改进尝试(二):根据信息素删除部分基因
看似很简单,但是弄了两天,之前用remove函数各种报错import numpyc = numpy.zeros((34,34))# c[a[0][0][0]][a[0][1][0]]+=1for j in range(200): i = 0 while (2*i+1)<len(a[0]): c[a[j][2*i][0]][a[j][i*2+1][0]]+=1 i=i+1shan=[]import numpy as np..原创 2020-09-12 19:02:03 · 366 阅读 · 0 评论 -
NSGA2改进尝试(一):加信息素
思路:把每一代种群的基因排列以信息素的方式统计,目前可行a=【种族】print(len(a))print(a[0])print(len(a[0]))print(a[0][0])print(a[0][0][0])import numpyc = numpy.zeros((len(a[0])+1,len(a[0])+1))# c[a[0][0][0]][a[0][1][0]]+=1for j in range(200): i = 0 while (2*i+1)<len.原创 2020-09-10 22:46:50 · 866 阅读 · 2 评论