Closed caowencai closed 5 years ago
以整数为例: 假设chrom1 = '1000',ranges = [0,10],chrom1变异为1100则outrange,此处在库里面没看到相关处理; 同理,假设chrom2 = '0101',与chrom1在第2位交叉,也会出现outrange; 当然,outrange异常可以在fitness中进行惩罚,但这点不得不提一下。
你好,为了能使得最大值对应二进制编码序列的最大值1111...,程序会对离散精度进行自动的调节,一般会使得精度降低(尽可能降低,但是基本争取不会影响最后的优化结果
1111...
以整数为例: 假设chrom1 = '1000',ranges = [0,10],chrom1变异为1100则outrange,此处在库里面没看到相关处理; 同理,假设chrom2 = '0101',与chrom1在第2位交叉,也会出现outrange; 当然,outrange异常可以在fitness中进行惩罚,但这点不得不提一下。