LEGO is a mixed integer quadratically constrained optimization problem and has been designed to be a multi-purpose tool, like a Swiss army knife, that can be employed to study many different aspects of the energy sector. Ranging from short-term unit commitment to long-term generation and transmission expansion planning. The underlying modeling philosophies are: modularity and flexibility. LEGO is also composed of thematic modules that can be added or removed from the model easily via data options depending on the scope of the study. You can use this code freely according to the LICENSE file, but please cite our paper [1] if you do.
- Install MPI implementation according to your OS (e.g., MPICH, OpenMPI or Microsoft-MPI)
- Create environment from the 'environment.yml' file
- For Pros: Use whatever environment manager you like, e.g., for
conda:conda env create -f environment.yml conda activate LEGO-Pyomo_env
- For all others: Use the
Conda-Activation-Scriptsprovided in this repository:- Download Anaconda to manage Python packages: https://www.anaconda.com/download
- Choose "Just Me (recommended)" when asked for the installation type
- Leave all other options on default
- Execute the activation script:
- Windows: Execute the
activate_environment_windows.batfile - Unix: Execute the
activate_environment_unix.shfile- When executing it from terminal, use
source activate_environment_unix.sh
- When executing it from terminal, use
- Windows: Execute the
- In the now opened command line, you can use the activated environment. The working directory will be the current folder of the script
- For Pros: Use whatever environment manager you like, e.g., for
- Test if it works
- Run the following command in the now opened terminal:
python LEGO.py data/example
- Run the following command in the now opened terminal: