def __init__(self, dim=2):
full_min_loc_vec = [
2.202905513296628, 1.570796322320509, 1.284991564577549, 1.923058467505610,
1.720469766517768, 1.570796319218113, 1.454413962081172, 1.756086513575824,
1.655717409323190, 1.570796319387859, 1.497728796097675, 1.923739461688219,
]
full_fmin_vec = [
0.8013034100985499, 1, 0.9590912698958649, 0.9384624184720668,
0.9888010806214966, 1, 0.9932271353558245, 0.9828720362721659,
0.9963943649250527, 1, 0.9973305415507061, 0.9383447102236013,
]
assert dim <= len(full_min_loc_vec)
super(Michalewicz, self).__init__(dim)
self.bounds = lzip([0] * self.dim, [pi] * self.dim)
self.min_loc = full_min_loc_vec[:dim]
self.fmin = -sum(full_fmin_vec[:dim])
self.fmax = 0.0
self.classifiers = ['boring', 'complicated']
评论列表
文章目录