-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ Then, whithin the Julia environment, you can install BeforeIT.jl as | |
|
||
```julia | ||
using Pkg | ||
Pkg.add(url="[email protected]:bancaditalia/BeforeIT.jl.git") | ||
Pkg.add("BeforeIT") | ||
``` | ||
|
||
You can ensure to have installed all dependencies via | ||
|
@@ -55,21 +55,31 @@ Pkg.instantiate() | |
|
||
Now you should be able to run the the following code | ||
|
||
|
||
```julia | ||
using BeforeIT, Plots | ||
using BeforeIT | ||
|
||
parameters = BeforeIT.AUSTRIA2010Q1.parameters | ||
initial_conditions = BeforeIT.AUSTRIA2010Q1.initial_conditions | ||
|
||
T = 20 | ||
model = BeforeIT.initialise_model(parameters, initial_conditions, T) | ||
data = BeforeIT.run_one_sim!(model) | ||
``` | ||
|
||
plot(data.real_gdp) | ||
This will simulate the model with the original Austrian parametrisation for 20 quarters and save the results in the `data` object. | ||
To plot the time series within the `data` object, make sure you install Plots.jl in the same environment using | ||
|
||
```julia | ||
Pkg.add("Plots") | ||
``` | ||
|
||
This will simulate the model with the original Austrian parametrisation for 20 quarters. | ||
and then try running | ||
|
||
```julia | ||
using Plots | ||
|
||
plot(data.real_gdp) | ||
``` | ||
|
||
In you want to run the script without opening a REPL, you can copy and paste the above lines into a file, | ||
say `main.jl`, and run it directly from the terminal by typing | ||
|