Skip to content

Commit

Permalink
Addd rewrite: false in Tutorial Luneray flu, as default behavior of save
Browse files Browse the repository at this point in the history
statement is now to rewrite data in the file.
  • Loading branch information
benoitgaudou committed Apr 16, 2021
1 parent 6ee43ac commit b795192
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -136,9 +136,10 @@ experiment explore_model type: batch until: time > 2#h repeat: 2 {
parameter "proba_leave" var: proba_leave among: [0, 0.01, 0.05, 0.1, 1.0];

reflex save_results {

ask simulations {
write "proba_leave: " + proba_leave + " infected_rate: " + self.infected_rate;
save [proba_leave, self.infected_rate] type: csv to:"results.csv";
save [proba_leave, self.infected_rate] type: csv to:"results.csv" rewrite: (int(self) = 0) ? true : false header: true ;
}
}
}
Expand Down

0 comments on commit b795192

Please sign in to comment.