From 78ba9802bc4ed5d5e98f0916a7ade34e85c1ac29 Mon Sep 17 00:00:00 2001 From: Adriano Meligrana <68152031+Tortar@users.noreply.github.com> Date: Thu, 28 Nov 2024 23:48:34 +0100 Subject: [PATCH] Update get_simulations.jl --- examples/get_simulations.jl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/get_simulations.jl b/examples/get_simulations.jl index 9b6dc2e..cf64a54 100644 --- a/examples/get_simulations.jl +++ b/examples/get_simulations.jl @@ -1,10 +1,13 @@ -# Here we show how to get simulations for all quarters from 2010Q1 to 2019Q4, and for all years from 2010 to 2019. +# Here we show how to get simulations for all quarters +# from `2010Q1` to `2019Q4`, and for all years from 2010 to 2019. using BeforeIT, MAT, FileIO -# The following code, loads the parameters and initial conditions, it initialises the model, -# runs the model n_sims times, and finally saves the data_list into a .jld2 file with an appropriate name. -# The whole process is repeatead for all quarters from 2010Q1 to 2019Q4, and for all years from 2010 to 2019. +# The following code loads the parameters and initial conditions, +# it initialises the model, runs the model `n_sims` times, and finally +# saves the `data_vector` into a `.jld2` file with an appropriate name. +# The whole process is repeatead for all quarters from `2010Q1` to `2019Q4`, +# and for all years from 2010 to 2019. for year in 2010:2019 for quarter in 1:4 @@ -16,6 +19,5 @@ for year in 2010:2019 n_sims = 4 data_vector = BeforeIT.run_n_sims(model, n_sims) save("data/italy/simulations/" * string(year) * "Q" * string(quarter) * ".jld2", "data_vector", data_vector) - end end