Skip to content

Commit

Permalink
Expose algorithm.data #570
Browse files Browse the repository at this point in the history
  • Loading branch information
blankjul committed Mar 16, 2024
1 parent af8d260 commit 8f30433
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pymoo/core/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,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 8f30433

Please sign in to comment.