This repository contains all the work done for the Bachelor End Project (BEP) assignment: A Web Application For The Simulation Of Day-Ahead Energy Markets.
This project is made as an Bachelor Final End project assignment for the Electrical Energy Systems (EES) group of the departement of Electrical Engineering on the TU/e.
The project provides an web application where users may preform an simulation of the day ahead energy market , using an optimization model to dispatch the electricity in the most optimal way.
Users may choose multiple models for the optimization explained in models
The main goal of this project is to provide an easy to use (and modify) web application where users may play with market clearing problems where the overall cost of generators and load are minimized
- Demo
- Front-end vs back-end
- Name origin
- Documentation
- Optimization model
- Getting started
- To-do
- Changelog
Below is an gif which serves as an demonstration of how Stargazer works
Stargazer consists of two main parts namely the front-end written in React and the back-end is written in Python3 using Pyomo & PyPSA
NodeJs is further used to compile the React files to browser render-able Javascript files
In short the global overview of the application may be given by the figures below
This project is named after a venomous fish called Stargazer
The fish has electricity conducting organs and is able to send an electric shock to its surroundings
This electric link is the reason the project is named after the Stargazer
Documentation may be found in multiple forms
code documentation can be found by going to docs an pdf and epub version of the code documentation may be found in the
docs folder
A paper regarding the also be found in the docs folder and is written in the IEEE paper style
The web application is currently capable of optimizing using
- Basic economic dispatch model
- Network constrained unit commitment model
A third model, the stochastic programming joint market clearing model is proposed to be added to Stargazer.
For more in depth information about the inner workings of the model please read the paper
The basic economic dispatch model preforms an optimization with an reduced set of constrains
The goal of the optimization proces is to minimize the overall cost of the powerplant, given the constrained parameters
The network constrained model , models a more real world generator with limitations on the generating output regarding time i.e. ramp up, ramp down, minimum up time, minimum down time
The network model has been larlgey made around the PyPSA framework, and can be modeled using the following equations
The stochastic model is at this stage an proposed model and although it has been researched, it is not yet implemented.
And preforms an two-stage joint reserve and renewable energy optimization model
Where the uncertainty of renewable energy is optimized by clearing (in advanced) reserves for the renewable energy source
The model can be desrcibed by the following equations
This web application uses python 3 To install python on a debian based machines simply run
sudo apt-get install python3
It's always helpful to use a virtual environment for your python installation.
The web application is known to work with the free MILP solver GLPK and the Cbc solver.
The backend paper investigated the performance of these solvers.
For Debian-based systems you can get the Cbc solver with
sudo apt-get install coinor-cbc
There are similar packages for other GNU/Linux distributions. For Windows there is WinGLPK and Cbc
If you have the Python package installer installed ( pip3
) just run
sudo pip3 install -r requirements.txt
Please make sure to install the dependencies for Python 3, since the web application is only compatible with Python 3
If for some reason you want to manually install the packages that also possible just install :
- pypsa
- numpy
- scipy
- pandas
- networkx
- pyomo
- moreitertools
- Django
- django-webpack-loader
NodeJs can be installed by going to NodeJs
To install NodeJs on debian based systems run
sudo apt-get install node
Make sure to install node version 4.x
Also webpack is needed wich may be installed using npm
npm install --save-dev webpack
After installing Node.Js and webpack run
npm install
Inside the asset (stargazer/assets) folder to compile the React to Javascript
After the dependencies have been installed make sure to run run
webpack --config webpack.config.js --watch
In side the asset folder
After you have installed the back-end and the front-end run
python3 manage.py runserver --nothreading --noreload
To run the web application after this just open localhost localhost on port 8000
- Integrate the stochastic model
- Rewrite export options
- version 1.0 : first public release