MCPcopy Create free account
hub / github.com/anyoptimization/pymoo / initialize

Method initialize

pymoo/util/display/multi.py:52–74  ·  view source on GitHub ↗

Initialize output columns based on the problem. Args: algorithm: The optimization algorithm instance.

(self, algorithm: Any)

Source from the content-addressed store, hash-verified

50 self.indicator_no_pf: Any = None
51
52 def initialize(self, algorithm: Any) -> None:
53 """Initialize output columns based on the problem.
54
55 Args:
56 algorithm: The optimization algorithm instance.
57 """
58 problem = algorithm.problem
59
60 self.columns += [self.n_nds]
61
62 if problem.has_constraints():
63 self.columns += [self.cv_min, self.cv_avg]
64
65 self.pf = pareto_front_if_possible(problem)
66 if self.pf is not None:
67 self.columns += [self.igd, self.gd]
68
69 if problem.n_obj == 2:
70 self.columns += [self.hv]
71
72 else:
73 self.indicator_no_pf = MultiObjectiveSpaceTermination()
74 self.columns += [self.eps, self.indicator]
75
76 def update(self, algorithm: Any) -> None:
77 """Update output columns with current algorithm state.

Callers

nothing calls this directly

Calls 3

pareto_front_if_possibleFunction · 0.90
has_constraintsMethod · 0.45

Tested by

no test coverage detected