diff --git a/src/rtctools/optimization/seed_mixin.py b/src/rtctools/optimization/seed_mixin.py index 29c2796..a9023fa 100644 --- a/src/rtctools/optimization/seed_mixin.py +++ b/src/rtctools/optimization/seed_mixin.py @@ -109,10 +109,18 @@ def optimize( postprocessing: bool = True, log_solver_failure_as_error: bool = True, ) -> bool: + if preprocessing: + self.pre() self._seed_timeseries = self.seed_options().seed_timeseries fallback = self.seed_options().fallback - success = super().optimize(preprocessing, postprocessing, log_solver_failure_as_error) + success = super().optimize( + preprocessing=False, + postprocessing=False, + log_solver_failure_as_error=log_solver_failure_as_error, + ) if not success and self._use_seed_timeseries() and fallback: self._seed_timeseries = None success = super().optimize(preprocessing, postprocessing, log_solver_failure_as_error) + if postprocessing: + self.post() return success