From e7b9bc92a2a655cee87beb2bdfece75d94d5cddc Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby Date: Thu, 27 Aug 2026 10:10:08 +0200 Subject: [PATCH] Ensemble: Run: Log variation. --- src/Solver/Mage.py | 9 +++++++-- src/View/RunSolver/Window.py | 14 ++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/Solver/Mage.py b/src/Solver/Mage.py index 38ddebfc..1ea9220d 100644 --- a/src/Solver/Mage.py +++ b/src/Solver/Mage.py @@ -1050,10 +1050,15 @@ class Mage8(Mage): if ens.target_data is None: continue + x = next(samples[ens]) + + qlog.put(f"*** Variation " + + f"'{ens.target_data}' - {ens.data_type} x {x}") + if ens.data_type == "strickler_minor": - ens.target_data.minor = next(samples[ens]) + ens.target_data.minor = x elif ens.data_type == "strickler_medium": - ens.target_data.medium = next(samples[ens]) + ens.target_data.medium = x if qlog is not None: qlog.put("Export variation of RUG file") diff --git a/src/View/RunSolver/Window.py b/src/View/RunSolver/Window.py index dae6484d..99e9ccf8 100644 --- a/src/View/RunSolver/Window.py +++ b/src/View/RunSolver/Window.py @@ -533,7 +533,7 @@ class SolverLogEnsWindow(SolverLogWindow): samples=self._samples, ) else: - self.ensemble_variation_strickler() + self.ensemble_variation() self._solver.export( self._study, self._workdir, qlog=self._output ) @@ -546,15 +546,21 @@ class SolverLogEnsWindow(SolverLogWindow): self._last_run += 1 self._progress_bar.setValue(self._last_run - 1) - def ensemble_variation_strickler(self): + def ensemble_variation(self): for ens in self._samples: if ens.target_data is None: continue + x = next(self._samples[ens]) + + self._log(f"*** Variation #{self._last_run} " + + f"'{ens.target_data}' - {ens.data_type} x {x}", + color="blue") + if ens.data_type == "strickler_minor": - ens.target_data.minor = next(self._samples[ens]) + ens.target_data.minor = x elif ens.data_type == "strickler_medium": - ens.target_data.medium = next(self._samples[ens]) + ens.target_data.medium = x def run(self): self._log(f" *** Run solver {self._solver.name}", color="blue")