VICUS is a linear programming optimisation model for capacity expansion planning and unit commitment for localised energy systems. Its name, latin for village, is derived from its bigger sister model URBS (latin for city). Its name stems from its origin as a model for optimisation for urban energy systems.
- VICUS is a linear programming model for multi-commodity energy systems with a focus on optimal storage sizing and use.
- It finds the minimum cost energy system to satisfy given demand timeseries for possibly multiple commodities (e.g. electricity).
- By default, operates on hourly-spaced timesteps (configurable).
- Thanks to pandas, data analysis code is short and clean.
- The model itself is quite small (<40 kB source code) thanks to relying on the Coopr/Pyomo and includes reporting and plotting functionality.
Follow the installation instructions for the urbs, then continue with the section Get started below.
Once installation is complete, clone (or download) this repository and execute the runme script on the command prompt:
git clone https://github.com/ojdo/vicus.git
cd vicus
python runme.py
About a minute later, two pictures plot-ElecAC.png
, plot-ElecDC.png
and a spreadsheet report.xlsx
should have been generated.
- Read the source code of
runme.py
. - Quickly scan through
vicus.py
, read function names and their docstrings. - Fire up IPython (
ipython --pylab
) and run the script from there using the run command:run runme
. Then usewhos
and inspect the workspace afterwards. See what you can do (analyses, plotting) with the DataFrames returned byvicus.get_constants
andvicus.get_timeseries
after a successful optimisation run. Takevicus.plot
andvicus.report
functions as inspriation and the pandas docs as reference.
- The book Python for Data Analysis best summarises the capabilities of the packages installed here. It starts with IPython, then adds NumPy, slowly fades to pandas and then shows first basic, then advanced data conversion and analysis recipes. Visualisation with matplotlib is given its own chapter, both with and without pandas.
- For a huge buffet of appetizers, showing the capabilities of the Python for scientific computing, I recommend browsing this gallery of interesting IPython Notebooks.