Initialize output columns based on the problem. Args: algorithm: The optimization algorithm instance.
(self, algorithm: Any)
| 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. |
nothing calls this directly
no test coverage detected