All Projects → tum-ens → Urbs

tum-ens / Urbs

Licence: gpl-3.0
A linear optimisation model for distributed energy systems

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Urbs

Sigmoidal ai
Tutoriais de Python, Data Science, Machine Learning e Deep Learning - Sigmoidal
Stars: ✭ 103 (-16.26%)
Mutual labels:  pandas
Sweetviz
Visualize and compare datasets, target values and associations, with one line of code.
Stars: ✭ 1,851 (+1404.88%)
Mutual labels:  pandas
Ibis
A pandas-like deferred expression system, with first-class SQL support
Stars: ✭ 1,630 (+1225.2%)
Mutual labels:  pandas
Stocks
machine learning web app game where the user competes against the AI in picking stocks
Stars: ✭ 108 (-12.2%)
Mutual labels:  pandas
Ni Pyt
Materiály k předmětu NI-PYT na FIT ČVUT
Stars: ✭ 112 (-8.94%)
Mutual labels:  pandas
Seaborn Tutorial
This repository is my attempt to help Data Science aspirants gain necessary Data Visualization skills required to progress in their career. It includes all the types of plot offered by Seaborn, applied on random datasets.
Stars: ✭ 114 (-7.32%)
Mutual labels:  pandas
Maps Location History
Get, Concatenate and Process you location history from Google Maps TimeLine
Stars: ✭ 99 (-19.51%)
Mutual labels:  pandas
Pandas Videos
Jupyter notebook and datasets from the pandas Q&A video series
Stars: ✭ 1,716 (+1295.12%)
Mutual labels:  pandas
Pandarallel
A simple and efficient tool to parallelize Pandas operations on all available CPUs
Stars: ✭ 1,887 (+1434.15%)
Mutual labels:  pandas
D6t Python
Accelerate data science
Stars: ✭ 118 (-4.07%)
Mutual labels:  pandas
Twelvedata Python
Twelve Data Python Client - Financial data APIs & WebSockets
Stars: ✭ 111 (-9.76%)
Mutual labels:  pandas
Studybook
Study E-Book(ComputerVision DeepLearning MachineLearning Math NLP Python ReinforcementLearning)
Stars: ✭ 1,457 (+1084.55%)
Mutual labels:  pandas
Df2gspread
Manage Google Spreadsheets in Pandas DataFrame with Python
Stars: ✭ 114 (-7.32%)
Mutual labels:  pandas
100 Pandas Puzzles
100 data puzzles for pandas, ranging from short and simple to super tricky (60% complete)
Stars: ✭ 1,382 (+1023.58%)
Mutual labels:  pandas
30 Days Of Python
Learn Python for the next 30 (or so) Days.
Stars: ✭ 1,748 (+1321.14%)
Mutual labels:  pandas
Pygraphistry
PyGraphistry is a Python library to quickly load, shape, embed, and explore big graphs with the GPU-accelerated Graphistry visual graph analyzer
Stars: ✭ 1,365 (+1009.76%)
Mutual labels:  pandas
Baidu poi search
一个基于pyqt5的百度地图兴趣点GUI采集工具,可根据关键词搜索指定区域的兴趣点,并导出为excel文件
Stars: ✭ 113 (-8.13%)
Mutual labels:  pandas
Pbpython
Code, Notebooks and Examples from Practical Business Python
Stars: ✭ 1,724 (+1301.63%)
Mutual labels:  pandas
Gspread Dataframe
Read/write Google spreadsheets using pandas DataFrames
Stars: ✭ 118 (-4.07%)
Mutual labels:  pandas
Dat8
General Assembly's 2015 Data Science course in Washington, DC
Stars: ✭ 1,516 (+1132.52%)
Mutual labels:  pandas

urbs

urbs is a linear programming optimisation model for capacity expansion planning and unit commitment for distributed energy systems. Its name, latin for city, stems from its origin as a model for optimisation for urban energy systems. Since then, it has been adapted to multiple scales from neighbourhoods to continents.

Documentation Status DOI

Features

  • urbs 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 time series for possibly multiple commodities (e.g. electricity).
  • By default, operates on hourly-spaced time steps (configurable).
  • Thanks to Pandas, complex data analysis is easy.
  • The model itself is quite small thanks to relying on package Pyomo.
  • The small codebase includes reporting and plotting functionality.

Screenshots

Timeseries plot of 8 days of electricity generation in vertex 'North' in scenario_all_together in hourly resolution: Hydro and biomass provide flat base load of about 50% to cover the daily fluctuating load, while large share of wind and small part photovoltaic generation cover the rest, supported by a day-night storage.

Bar chart of cumulated annual electricity generation costs for all 5 scenarios defined in runme.py.

Installation

There are 2 ways to get all required packages under Windows. We recommend using the Python distribution Anaconda. If you don't want to use it or already have an existing Python (version 3.6 recommended, 2.7 is supported as well) installation, you can also download the required packages by yourself..

Anaconda/Miniconda (recommended)

  1. Anaconda (Python 3)/Miniconda. Choose the 64-bit installer if possible. During the installation procedure, keep both checkboxes "modify PATH" and "register Python" selected! If only higher Python versions are available, you can switch to a specific Python Version by typing conda install python=<version>
  2. Packages and Solver: GLPK.
    1. Download the environment file.
    2. Launch a new command prompt (Windows: Win+R, type "cmd", Enter)
    3. Install it via conda by conda env create -f urbs-env.yml.
    4. Each time you open a new terminal for running urbs, you can activate the environment by conda activate urbs.

Continue at Get Started.

Manually (the hard way)

For all packages, best take the latest release or release candidate version. Both 32 bit and 64 bit versions work, though 64 bit is recommended. The list of packages can be found in the environment file.

Get started

Developers

Once installation is complete, finally install git (for version control). Remark: at step "Adjusting your PATH environment", select "Run Git from the Windows Command Prompt".

Then, in a directory of your choice, clone this repository by:

git clone https://github.com/tum-ens/urbs.git

Continue like the users after they downloaded the zip file.

Users

If you are not planning on developing urbs, pick the latest release and download the zip file.

In the downloaded directory, open a execute the runme script by using the following on the command prompt (Windows) or Terminal (Linux). (Depending on what your standard python version is, you might need to call python3 instead of python.):

python runme.py

Some minutes later, the subfolder result should contain plots and summary spreadsheets for multiple optimised energy supply scenarios, whose definitions are contained in the run script (watch out for def scenario lines). Not working at the moment: To get a graphical and tabular summary over all scenarios, execute

python comp.py

and look at the new files result/mimo-example-.../comparison.xlsx and result/mimo-example-.../comparison.png for a quick comparison. This script parses the summary spreadsheets for all scenarios.

Next steps and tips

  1. Head over to the tutorial at http://urbs.readthedocs.io, which goes through runme.py step by step.
  2. Read the source code of runme.py and comp.py.
  3. Try adding/modifying scenarios in scenarios.py and see their effect on results.
  4. If you need a nice python editor, think about using PyCharm. It has many features including easy Git integration, package management, etc.
  5. Fire up IPython (ipython3) and run the scripts from there using the run command: run runme and run comp. Then use whos and inspect the workspace afterwards (whos). See what you can do (analyses, plotting) with the DataFrames. Take the urbs.get_constants, urbs.get_timeseries and urbs.plot functions as inspriation and the Pandas docs as reference.

Further reading

  • If you do not know anything about the command line, read Command Line Crash Course. Python programs are scripts that are executed from the command line, similar to MATLAB scripts that are executed from the MATLAB command prompt.
  • If you do not know Python, try one of the following ressources:
  • 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 Python for scientific computing, I recommend browsing this gallery of interesting IPython Notebooks.

Example uses

  • Branch 1node in the forked repository ojdo/urbs shows a small example of a real-world usage of the model. It includes a scenario_generator function in its run script, which is useful for extensive parameter sweeps.
  • Branch 1house in the forked repository ojdo/urbs shows another (newer) example of a small-scale application of the model. It demonstrates the use for two demand commodities (electricity and heat) for a single consumer (a single site named 'house'). It also shows how to create a very customized comparison script:

Comparison plot in example study 1house.

  • Branch haag15 in the forked repository ojdo/urbs shows a larger example of a real-world use. Its input file contains a town divided into 12 regions, 12 process types, and 2 demand commodities (electricity and heat) . Patience and RAM (64 GB or more) is needed to run these scenarios with 8760 timesteps. The branch also contains three IPython notebooks that are used for result analysis and coupling to model rivus.

Copyright

Copyright (C) 2014-2019 TUM ENS

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].