modperformevolution.bas
来自「用vb编写的一个遗传算法的程序」· BAS 代码 · 共 14 行
BAS
14 行
Attribute VB_Name = "ModPerformEvolution"
'保留最佳个体策略
'用当前最优个体代替本代最差个体
Sub PerformEvolution()
test = 0
If BestIndividual.fitness > CurrentBest.fitness Then
test = 1
CurrentBest = Population(Best_Index) '好像这个分支没有什么用???
'因为在FindBestAndWorstIndividual()中有CurrentBest = BestIndividual
Else
Population(Worst_Index) = CurrentBest
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?