我正在尝试使用集成在Python的Platypus包中的NSGA 2来解决一个具有两个目标和两个决策变量的多目标优化问题。这是我查看超级卷的代码
from platypus.algorithms import NSGAII
from platypus.experimenter import experiment
from platypus.experimenter import calculate
from platypus import *
if __name__ == "__main__":
algorithms = [NSGAII]
problems = [Belegundu]
# run the experiment
results = experiment(algorithms, problems, nfe=10000, seeds=10)
# calculate the hypervolume indicator
hyp = Hypervolume(minimum=[0, 0, 0], maximum=[1, 1, 1])
hyp_result = calculate(results, hyp)
display(hyp_result, ndigits=3)
但是,我收到的错误是“未定义名称‘Hypervolume’”
目前没有回答
相关问题 更多 >
编程相关推荐