Skip to content

Commit

Permalink
Update get_simulations.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar authored Nov 28, 2024
1 parent 96973a4 commit 78ba980
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions examples/get_simulations.jl
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 78ba980

Please sign in to comment.