From cb31b6d6c2f24d0dfe350b60d5380528aee3463c Mon Sep 17 00:00:00 2001 From: Marco Foley <marco.foley@inria.fr> Date: Fri, 9 Oct 2020 17:07:26 +0200 Subject: [PATCH] [aevol_post_robustness_bias.cpp] Fix seed option not changing rng --- src/post_treatments/aevol_post_robustness_bias.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/post_treatments/aevol_post_robustness_bias.cpp b/src/post_treatments/aevol_post_robustness_bias.cpp index ca1ed99c3..ca9ca4b87 100644 --- a/src/post_treatments/aevol_post_robustness_bias.cpp +++ b/src/post_treatments/aevol_post_robustness_bias.cpp @@ -101,7 +101,6 @@ void interpret_cmd_line_options(int argc, char **argv) { } int main(int argc, char ** argv) { - seed_prng = 456465; number_replications = 1000; genomeFile = "input.json"; print_every = 100; @@ -115,7 +114,11 @@ int main(int argc, char ** argv) { IOJson inputJson(genomeFile); - Individual* individual = inputJson.getIndividuals().front(); + auto mut_prng = std::make_shared<JumpingMT>(seed_prng); + auto stoch_prng = std::make_shared<JumpingMT>(seed_prng); + Individual ancestor = Individual(inputJson.getIndividuals().front(), 0, mut_prng, stoch_prng); + + Individual* individual = new Individual(ancestor); individual->clear_everything_except_dna_and_promoters(); individual->compute_phenotype(); Robustness_bias_output out(*individual, "indiv.csv", "mutation.csv"); -- GitLab