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

Clean up repo and refactor model logic #2

Merged
merged 10 commits into from
Dec 19, 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
63 changes: 20 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,22 @@
![Python > 3.9](https://img.shields.io/badge/python-%3E%3D3.9-blue)
![Maintenance](https://img.shields.io/badge/status-maintenance-blue)

# Jamaica Energy Model (JEM)
### A high-level power flow model of Jamaica's energy system

<img align="center" width="800" src="https://github.com/nismod/JEM/blob/main/demo/schematic.png">

This repository contains a simulation model for Jamaica's energy system formulated as an arc-node network. Based on a given supply and demand curve, JEM solves for flows of electricity across the network using linear programming.
This repository contains a simulation model for Jamaica's energy system formulated as an arc-node network. Based on a given supply and demand curve, JEM solves for flows of electricity across the network using linear programming. This tool was originally developed for a [CCRI](https://resilientinvestment.org/) project by researchers at [OPSIS, University of Oxford](https://opsis.eci.ox.ac.uk/) in 2020. The repository is now less active and is only maintained or developed occasionally.

**NOTE:** The tool is currently under development and all code published here is part of an on-going project.

### Contributors
**Project Lead:** Aman Majid ([email protected]), University of Oxford <br>
**Principal Investigator:** [Professor Jim Hall](https://www.eci.ox.ac.uk/people/jhall.html), University of Oxford <br>
**Contributors and Collaborators**: <br>
[Raghav Pant](https://github.com/itrcrisks), University of Oxford <br>
[Tom Russell](https://github.com/tomalrussell), University of Oxford <br>
<!-- [JPS Co.](https://www.jpsco.com/), Jamaica <br> -->

<!-- ### What's Here
The repository contains the InfraSim source code. The model has been applied to a case-study from the Thames basin, England, and will be expanded to other cases in future. These cases serve as a guide for other users to apply the InfraSim model to their areas of interest. An overview of each directory within the repository is shown below.

_demo/_
- A Jupyter Notebook explaining the model theory, as well as a small demo model of a water-wastewater-energy network in London, UK.
- Updated December 2020

_data/demo/_
- **spatial**: Shapefiles of node and edge data that can be opened in QGis.
- **csv**: Time series demo nodal flow data.

_infrasim/_
- InfraSim source code related to the Thames system can be found in thames.py
- There are a series of other Python files that contain code for data pre-processing and post-processing.
- Model metadata, parameters, and assumptions can also be found here.

_qgis/_
- A QGis project file to explore the network spatial data.

_outputs/_
- All model outputs such as figures, data, and statistics are saved here. -->
- [Tom Russell](https://github.com/tomalrussell), University of Oxford <br>
- [Nadia Leonova](https://github.com/nnleonova), University of Oxford <br>
- [Raghav Pant](https://github.com/itrcrisks), University of Oxford <br>

### Requirements
The model requires [Gurobi](https://www.gurobi.com) and the associated [GurobiPy](https://www.gurobi.com) library for the optimisation. In addition, standard scientific libraries in Python are needed such as [pandas](https://pandas.pydata.org/), [numpy](https://numpy.org/), [matplotlib](https://matplotlib.org/) etc. Requirements for spatial network analysis include [QGis](https://www.qgis.org/en/site/), [geopandas](https://geopandas.org/install.html), and [snkit](https://github.com/tomalrussell/snkit).
Expand All @@ -49,32 +30,28 @@ The model requires [Gurobi](https://www.gurobi.com) and the associated [GurobiPy

- Create project enviroment using the config file in this directory (only tested on macOS Big Sur):

```
mamba env update -n JEM --file environment.yml
conda activate ./env
```bash
mamba create -n JEM python=3.11
mamba activate JEM
```

or

```bash
conda create -n JEM python=3.11
conda activate JEM
```
conda env create --prefix ./env --file environment.yml
conda activate ./env
```

- See the [demo notebook](https://github.com/amanmajid/InfraSim/blob/main/demo/demo.ipynb) for a small demonstration.

<!-- ### To Do
- Implement the InfraSim model using Julia code to allow users to choose their solver
- Navigate to the JEM repository and install it as a package by running:

### Future extensions
- InfraSim.JV: a model for the energy-water system in Israel, Palestine, and Jordan
- InfraSim.Jamaica: a model for the water system in Jamaica -->
```bash
pip install -e .
```

<!-- ### Citing Research
Coming soon... -->
- See the [demo notebook](https://github.com/amanmajid/InfraSim/blob/main/demo/demo.ipynb) for a small demonstration.

### Support
This work is supported part of the [Coalition for Climate Resilient Investment (CCRI)](https://resilientinvestment.org/) project on creating a platform for infrastructure risk assessment and resilient investment prioritisation in Jamaica and is funded by the [UK Foreign, Commonwealth and Development Office (FCDO)](https://www.gov.uk/government/organisations/foreign-commonwealth-development-office).
This work is supported by the [Coalition for Climate Resilient Investment (CCRI)](https://resilientinvestment.org/) project on creating a platform for infrastructure risk assessment and resilient investment prioritisation in Jamaica and is funded by the [UK Foreign, Commonwealth and Development Office (FCDO)](https://www.gov.uk/government/organisations/foreign-commonwealth-development-office).

### License
Copyright (C) 2020 Aman Majid. All versions released under the [MIT License](https://opensource.org/licenses/MIT).
Copyright (C) 2020 Aman Majid and the authors. All versions released under the [MIT License](https://opensource.org/licenses/MIT).
File renamed without changes
Binary file removed data/adaptation/options.xlsx
Binary file not shown.
12 changes: 0 additions & 12 deletions data/costs_and_damages/flooding_electricity.csv

This file was deleted.

26 changes: 0 additions & 26 deletions data/costs_and_damages/hazard_summary.csv

This file was deleted.

12 changes: 0 additions & 12 deletions data/costs_and_damages/maximum_damage_values.csv

This file was deleted.

Binary file removed data/costs_and_damages/pole_capital_cost.xlsx
Binary file not shown.
8 changes: 0 additions & 8 deletions data/costs_and_damages/unit_costs.csv

This file was deleted.

14 changes: 0 additions & 14 deletions data/costs_and_damages/wind_speed_electricity.csv

This file was deleted.

1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ channels:
- conda-forge
- defaults
dependencies:
- python=3.11
- black
- geopandas
- jupyter
Expand Down
Loading