From 8f3043355611590454f04a9bb8df9864f73b49b6 Mon Sep 17 00:00:00 2001 From: Julian Blank Date: Sat, 16 Mar 2024 12:09:04 -0700 Subject: [PATCH] Expose algorithm.data #570 --- pymoo/core/algorithm.py | 1 + pymoo/core/result.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pymoo/core/algorithm.py b/pymoo/core/algorithm.py index 441aef1db..09335e9b1 100644 --- a/pymoo/core/algorithm.py +++ b/pymoo/core/algorithm.py @@ -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 diff --git a/pymoo/core/result.py b/pymoo/core/result.py index 300b6bf43..33d2b3057 100644 --- a/pymoo/core/result.py +++ b/pymoo/core/result.py @@ -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]