def _decide(self, metrics): cv = to_numpy([e["cv"] for e in metrics]) delta_cv = to_numpy([e["delta_cv"] for e in metrics]) n_feasible = (cv <= 0).sum() # if the whole window had only feasible solutions if n_feasible == len(metrics): return False # transition period - some were feasible some were not elif 0 < n_feasible < len(metrics): return True # all solutions are infeasible else: return delta_cv.max() > self.tol
def _decide(self, metrics): delta_f = to_numpy(metrics) return delta_f.max() > self.tol
def _decide(self, metrics): return to_numpy(metrics).mean() > self.tol