Skip to content

Commit

Permalink
Merge branch 'anyoptimization:main' into reconstruct_objs
Browse files Browse the repository at this point in the history
  • Loading branch information
waterfall-xi authored Mar 21, 2024
2 parents 8d9214d + d567f46 commit 6db6bf9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/source/algorithms/algorithms.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
:ref:`AGE-MOEA <nb_agemoea>`, AGEMOEA, many,, Similar to NSGA-II but estimates the shape of the Pareto-front to compute a score replacing the crowding distance.
:ref:`C-TAEA <nb_ctaea>`, CTAEA, many, x, An algorithm with a more sophisticated constraint-handling for many-objective optimization algoritms.
:ref:`SMS-EMOA <nb_sms>`, CTAEA, many, x, An algorithm that uses hypervolume during the environmental survival.
:ref:`RVEA <nb_rvea>`, RVEA, many, x, A reference direction based algorithm used an angle-penalized metric.
:ref:`RVEA <nb_rvea>`, RVEA, many, , A reference direction based algorithm used an angle-penalized metric.
4 changes: 2 additions & 2 deletions pymoo/constraints/adaptive.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, algorithm):
def _setup(self, _, **kwargs):
self.evaluator = AttachConfigEvaluator(self.evaluator, self.config)

def _adapt(self, config, infills=None, **kwargs):
def _adapt_constraint_handling(self, config, infills=None, **kwargs):
pass

def _initialize_advance(self, infills=None, **kwargs):
Expand All @@ -53,7 +53,7 @@ def _advance(self, infills=None, **kwargs):
super()._advance(infills=infills, **kwargs)
copy_to_dict(self.default_config, self.config)

self._adapt(self.adapted_config, infills=infills, **kwargs)
self._adapt_constraint_handling(self.adapted_config, infills=infills, **kwargs)

def _infill(self):
copy_to_dict(self.adapted_config, self.config)
Expand Down
2 changes: 1 addition & 1 deletion pymoo/constraints/eps.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def __init__(self, algorithm, perc_eps_until=0.5):
self.perc_eps_until = perc_eps_until
self.max_cv = None

def _adapt(self, config, **kwargs):
def _adapt_constraint_handling(self, config, **kwargs):
t = self.termination.perc
alpha = np.maximum(0.0, 1 - 1 / self.perc_eps_until * t)
eps = alpha * self.max_cv
Expand Down
1 change: 1 addition & 0 deletions pymoo/core/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ def result(self):

res.pop = self.pop
res.archive = self.archive
res.data = self.data

# get the optimal solution found
opt = self.opt
Expand Down
3 changes: 3 additions & 0 deletions pymoo/core/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def __init__(self) -> None:
# the history of the optimization run is they were saved
self.history = []

# data stored within the algorithm
self.data = None

@property
def cv(self):
return self.CV[0]
Expand Down

0 comments on commit 6db6bf9

Please sign in to comment.