Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AldoGl authored May 18, 2024
1 parent 94a8b78 commit 865d1be
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 865d1be

Please sign in to comment.