This branch contains a small example study with one site, custom run script and a comparison script. It employs two scenario generator functions to create a cost and performance parameter study for the relevant technologies.
As this version of the model is outdated (state early 2017), it can be run with its main dependencies pinned to the same point in time. To install the dependencies as specified in file environment.yml
, you can use the following steps:
conda env create -f environment.yml
conda activate urbs-2017
To verify that the environment is active, either run the above within Anaconda Prompt, which displays the active environment to the left of your prompt:
# Windows
(urbs-2017) C:\Users\ojdo\src\urbs>
# Linux
(urbs-2017) /home/ojdo/src/urbs$
or instead run command conda env list
, which marks the active environment with an asterisk (*
):
# conda environments:
base C:\ProgramData\Anaconda3
urbs-2017 * C:\Users\ojdo\.conda\envs\urbs-2017
File run1house.py
is the main entry point, which contains user settings like solver and how many timesteps (some days for debugging, weeks or a whole year for the actual study) should be included in the optimization. Results (spreadsheets and timeseries plots) are generated within a timestamped subdirectory within result
.
File comp.py
can be run after a successful optimization run to generate a condensed cross-scenario comparison spreadsheet + plot. It automatically analyses the newest subfolder within result
, or a target directory can be specified.
Both files are meant as a demonstration and basis for one's own optimization and analyses scripts.
The study object is an exemplary house which has to satisfy its hourly demand for electricity (4047 kWh/a, 462 W average load) and heat (6115 kWh/a, 698 W average load). It can choose to install and operate any subset from a suite of common technologies and energy sources.
For electricity, on-roof photovoltaics can be installed. Its hourly yield is determined by a pre-specified time series of so-called capacity factors (sheet SupIm). Other than that, a time-variable priced supply from the electricity grid can be purchased. Surplus electricity can be sold back to the grid (called Feed-in), but generally the revenue is lower than the purchase price.
For heat, a standard gas boiler is the most commonly available technology for relatively low investment and medium operating costs (gas price). Alternatives are a heating rod (efficiency 1.0) and a more expensive heat pump (coefficient of performance 3.5), both using electricity as their input. The last option is to install solarthermal panel on the house roof, whose output is determined by a time series similar to that of the photovoltaics.