Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add solutions to 3perOG chapter exercises #28

Merged
merged 4 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/book/content/UNtutorial/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ For the October 21-25, 2024 United Nations `OG-PHL` training in Manila, we will
- Theory: ["Simple" 3-period-lived agent model](https://eapd-drb.github.io/OG-PHL/content/UNtutorial/3perOG.html)
* - Tue.
- Morning
- Review 3-period-lived-agent exercises <br> Review OG-Core and OG-PHL modules <br> Quick Git and GitHub workflow review
- Review 3-period-lived-agent exercises (solutions in [this folder](https://github.com/EAPD-DRB/OG-PHL/blob/main/docs/book/content/UNtutorial/solutions/3perOG/)) <br> Review OG-Core and OG-PHL modules <br> Quick Git and GitHub workflow review
* -
- Afternoon
- Running OG-PHL, inputs, outputs <br> Calibrating OG-PHL, current state, still to do
Expand Down
14 changes: 14 additions & 0 deletions docs/book/content/UNtutorial/solutions/3perOG/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Solutions to the exercises in the 3-period-lived OG model chapter in the UN Tutorial section
This folder contains the python scripts that compute the solutions to [Exercise 1](https://eapd-drb.github.io/OG-PHL/content/UNtutorial/3perOG.html#ExerUNtut_3perOGfeas), [Exercise 2](https://eapd-drb.github.io/OG-PHL/content/UNtutorial/3perOG.html#ExerUNtut_3perOGSS), and [Exercise 3](https://eapd-drb.github.io/OG-PHL/content/UNtutorial/3perOG.html#ExerUNtut_3perOGTPI) in the "[A 'Simple' 3-period-lived agent OG model](https://eapd-drb.github.io/OG-PHL/content/UNtutorial/3perOG.html)". In addition to this `README.md` file, this folder contains the following three Python scripts.
- [`execute.py`](https://github.com/EAPD-DRB/OG-PHL/blob/main/docs/book/content/UNtutorial/solutions/3perOG/execute.py). This script runs everything and delivers the solutions to the exercises. It calls the following two modules [`SS.py`](https://github.com/EAPD-DRB/OG-PHL/blob/main/docs/book/content/UNtutorial/solutions/3perOG/SS.py) and [`TPI.py`](https://github.com/EAPD-DRB/OG-PHL/blob/main/docs/book/content/UNtutorial/solutions/3perOG/TPI.py).
- [`SS.py`](https://github.com/EAPD-DRB/OG-PHL/blob/main/docs/book/content/UNtutorial/solutions/3perOG/SS.py). Python module that has the functions for solving the feasibility questions of [Exercise 1](https://eapd-drb.github.io/OG-PHL/content/UNtutorial/3perOG.html#ExerUNtut_3perOGfeas) and the steady-state equilibrium questions of [Exercise 2](https://eapd-drb.github.io/OG-PHL/content/UNtutorial/3perOG.html#ExerUNtut_3perOGSS).
- [`TPI.py`](https://github.com/EAPD-DRB/OG-PHL/blob/main/docs/book/content/UNtutorial/solutions/3perOG/TPI.py). Python module that has the functions for solving the transition path equilibrium questions of [Exercise 3](https://eapd-drb.github.io/OG-PHL/content/UNtutorial/3perOG.html#ExerUNtut_3perOGTPI).

You can run these computations that solve for the solutions to the three exercises by doing the following steps.
1. Open your terminal windown (Mac or Linux) or Anaconda prompt (Windows).
2. Activate your `ogphl-dev` conda environment: `conda activate ogphl-dev`
3. Navigate to your `OG-PHL` repository directory.
4. Navigate to the `/docs/book/content/UNtutorial/solutions/3perOG/` subfolder of this repository.
5. Run the `execute.py` script: `python execute.py`.

Running the `execute.py` script will print all the answers to the exercises in the output of the terminal. It will also create an `images` folder in this directory that has some of the images from the steady state and transition path equilibrium solutions.
Loading
Loading