Skip to content
/ urbs Public
forked from tum-ens/urbs

A linear optimisation model for distributed energy systems

License

Notifications You must be signed in to change notification settings

ojdo/urbs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

urbs - 1house example

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.

Reference energy system (RES) chart of the modelled study object.

Reproduction steps

Recreating the environment

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

Running the optimization

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.

Running the comparison script

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.

Result plots

Scenario comparison

Bar chart of total system cost, electricity generation shares and storage use for all scenarios.

Timeseries: electricity

Timeseries plot of month August for electricity generation in scenario s10: CO2 limit 50%

Timeseries plot of month December for electricity generation in scenario s10: CO2 limit 50%

Timeseries: heat

Timeseries plot of month August for heat generation in scenario s10: CO2 limit 50%

Timeseries plot of month December for heat generation in scenario s10: CO2 limit 50%

Background

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.

About

A linear optimisation model for distributed energy systems

Resources

License

Stars

Watchers

Forks

Languages

  • Python 100.0%