Project-Platypus / Platypus

A Free and Open Source Python Library for Multiobjective Optimization
GNU General Public License v3.0
563 stars 153 forks source link

ZeroDivisionError in update_distribution #134

Closed Martin1887 closed 1 year ago

Martin1887 commented 4 years ago

Hello.

The following exception has happened using experiment inside a ProcessPoolEvaluator:

platypus/algorithms.py", line 1273, in update_distribution
    artmp[i] = sum([self.B[j][i]*BDz[j] for j in range(self.problem.nvars)]) / self.diag_D[i]
ZeroDivisionError: float division by zero

It could be solved adding an epsilon to self.diag_D[i].

Regards.

github-actions[bot] commented 1 year ago

This issue is stale and will be closed soon. If you feel this issue is still relevant, please comment to keep it active. Please also consider working on a fix and submitting a PR.