diff --git a/src/simulation.cpp b/src/simulation.cpp index f8d4e5470..d9a4fd131 100644 --- a/src/simulation.cpp +++ b/src/simulation.cpp @@ -400,8 +400,11 @@ void finalize_batch() simulation::time_tallies.stop(); // update weight windows if needed - for (const auto& wwg : variance_reduction::weight_windows_generators) { - wwg->update(); + if (settings::solver_type != SolverType::RANDOM_RAY || + simulation::current_batch == settings::n_batches) { + for (const auto& wwg : variance_reduction::weight_windows_generators) { + wwg->update(); + } } // Reset global tally results