Open mym92 opened 1 year ago
Hi, @thouska ,thank you and all contributors for the spotpy project. I have learnt a lot from your project. I found a minor bug in the the Ackley function example: your code in _spot_setupackley.py:
def simulation(self, vector): firstSum = 0.0 secondSum = 0.0 for c in range(len(vector)): firstSum += c**2.0 secondSum += np.cos(2.0 * np.pi * vector[c]) n = float(len(vector)) return [ -20.0 * np.exp(-0.2 * np.sqrt(firstSum / n)) - np.exp(secondSum / n) + 20 + np.e ]
def simulation(self, vector): firstSum = 0.0 secondSum = 0.0 for c in range(len(vector)): firstSum += vector[c]**2.0 secondSum += np.cos(2.0 * np.pi * vector[c]) n = float(len(vector)) return [ -20.0 * np.exp(-0.2 * np.sqrt(firstSum / n)) - np.exp(secondSum / n) + 20 + np.e ]
Hi, @thouska ,thank you and all contributors for the spotpy project. I have learnt a lot from your project. I found a minor bug in the the Ackley function example: your code in _spot_setupackley.py: