Skip to content

Commit

Permalink
Merge pull request #8 from trevorb1/otoole-v1.0-update
Browse files Browse the repository at this point in the history
  • Loading branch information
willu47 authored Mar 14, 2023
2 parents 662c96a + 89e2b2a commit dbe71c5
Show file tree
Hide file tree
Showing 7 changed files with 1,953 additions and 3,367 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
results/*.csv
simplicity.txt
1,425 changes: 1,425 additions & 0 deletions OSeMOSYS.txt

Large diffs are not rendered by default.

25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
# OSeMOSYS Example Model: Simplicity

[![DOI](https://zenodo.org/badge/214192147.svg)](https://zenodo.org/badge/latestdoi/214192147)
[![goodtables.io](https://goodtables.io/badge/github/OSeMOSYS/simplicity.svg)](https://goodtables.io/github/OSeMOSYS/simplicity)

This is an example OSeMOSYS model published as a Frictionless Data [Tabular Data Package](https://frictionlessdata.io/specs/tabular-data-package/).
This is an example OSeMOSYS model used to demonstrate the functionality of the Python
package [otoole](https://github.com/OSeMOSYS/otoole). You can use **otoole** to generate
a GNU MathProg data file from the dataset with the following commands. Full
**otoole** documentation (including installation and examples) can be found on
its [ReadTheDocs site](https://otoole.readthedocs.io/en/latest/).

The Data Package was constructed with the help of the Python **otoole** package available on [PyPI](https://pypi.org/project/otoole/) and [Github](https://github.com/OSeMOSYS/otoole).

Simplicity `v0.2` requires `v0.5.4` or later of **otoole**.
You can use **otoole** to generate a GNU MathProg data file from the dataset with the following commands and then run OSeMOSYS.
**NOTE**: To be able to solve the model in this example, you will need to install
the free and open-source solver [GLPK](https://www.gnu.org/software/glpk/)

```bash
# Install the OSeMOSYS toolkit
pip install otoole>=0.5.4
# Download the dataset and build a GNU MathProg datafile
# On Linux or OSX use wget
pip install otoole>=1.0.0

# Download the dataset. On Linux or OSX use wget, otherwise download and unzip
wget https://zenodo.org/record/3707794/files/OSeMOSYS/simplicity-v0.2.1.zip
unzip simplicity-v0.2.1.zip -d simplicity
# Otherwise download manually and unzip, and then...
otoole convert datapackage datafile simplicity/OSeMOSYS-simplicity-11a3a26/datapackage.json ./simplicity.txt

# Create the GNUMathProg data file with otoole
otoole convert csv datafile simplicity/data ./simplicity.txt simplicity/config.yaml

# Solve the model
glpsol -m OSeMOSYS.txt -d simplicity.txt
```
Loading

0 comments on commit dbe71c5

Please sign in to comment.