Skip to content
Snippets Groups Projects
Commit d99b80b4 authored by Niklas Nolzen's avatar Niklas Nolzen
Browse files

initial push of SecMOD MILP open-source repo

parent 75504aae
Branches
No related tags found
No related merge requests found
Showing
with 9088 additions and 75 deletions
.vscode
.vscode/tags
SecMOD.egg-info
secmod/__pycache__
__pycache__
tests/downloads
logs
\ No newline at end of file
Copyright © 2023 Niklas Nolzen (a,b), Christiane Reinert (a), Julia Frohmann (a), Dominik Tillmanns (a), and André Bardow (b,c).
(a) Institute of Technical Thermodynamics, RWTH Aachen University, Aachen, Germany.
(b) Energy & Process Systems Engineering, Department of Mechanical and Process Engi-
neering, ETH Zurich, Zürich, Switzerland.
(c) Institute of Energy and Climate Research – Energy Systems Engineering (IEK-10),
Forschungszentrum Jülich, Jülich, Germany.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
# Include the README
include *.md
# Include the license file
include LICENSE.txt
# Include the data files
recursive-include data *
\ No newline at end of file
# Secmod Milp # SecMOD MILP - A framework for multi-energy system optimization and life-cycle assessment
The SecMOD MILP framework is a flexible framework for the optimization and life-cycle assessment of industrial multi-energy systems.
The SecMOD MILP framework entails continuous sizing of discrete components including minimal part-load and part-load dependent efficiencies.
## Referencing
If you use our software or any part of it, please cite [Reinert, Nolzen et al. (2023)](https://www.sciencedirect.com/science/article/pii/S0098135423000455). The full information on the publication is also shown below:
## Getting started Nolzen, N., Reinert, C.; Frohmann, J., Tillmanns, D., and Bardow, A. (2023): "Design of low-carbon multi-energy systems in the SecMOD framework by combining
MILP optimization and life-cycle assessment". Computer & Chemical Engineering. DOI: https://doi.org/10.1016/j.compchemeng.2023.108176.
To make it easy for you to get started with GitLab, here's a list of recommended next steps. Since the publication above by Reinert, Nolzen, et al. and this repository only describe the extensions compared to the linear SecMOD, we also refer to for further information to
[Reinert et al. (2022)](https://www.frontiersin.org/articles/10.3389/fenrg.2022.884525/abstract). The full information on the publication is also shown below:
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! Reinert, C.; Schellhas, L.; Mannhardt, J.; Shu, D.; Kämper, A.; Baumgärtner, N.; Deutz, S., and Bardow, A. (2022): "SecMOD: An open-source modular framework
combining multi-sector system optimization and life-cycle assessment". Frontiers in Energy Research. DOI: https://doi.org/10.3389/fenrg.2022.884525.
## Add your files ## License
This project is licensed under the MIT license, for more information please refer to the license file.
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
```
cd existing_repo
git remote add origin https://git-ce.rwth-aachen.de/ltt/secmod-milp.git
git branch -M main
git push -uf origin main
```
## Integrate with your tools
- [ ] [Set up project integrations](https://git-ce.rwth-aachen.de/ltt/secmod-milp/-/settings/integrations)
## Collaborate with your team
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
## Test and Deploy
Use the built-in continuous integration in GitLab.
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
***
# Editing this README
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
## Name ## Documentation and Support
Choose a self-explaining name for your project. **Please, find the full documentation of the SecMOD MILP framework [here](SecMOD_MILP_Documentation.pdf).**
## Description In addition, please, find the full documentation of the SecMOD LP framework [here](https://ltt.pages.git-ce.rwth-aachen.de/opt/secmod/secmod/).
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
## Badges You can further find a video about SecMOD and some example applications [here](https://www.youtube.com/watch?v=wXFocTL95hs).
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
## Visuals In case you need help using Git, please refer to the git documentation [here](https://git-scm.com/docs).
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
## Installation ## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. A brief instruction to install SecMOD can also be found below:
Clone a copy of the whole repository to your computer:
## Usage ```
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. git clone git@git-ce.rwth-aachen.de:ltt/secmod-milp.git
```
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. Open a terminal with a python enviroment (e.g. Anaconda promt) and install the secmod package with:
```shell
pip install --user -e '<Path\to\cloned\repository>'
```
The path should point to the directory where secmod is saved (repository folder).
Make sure that the setup.py file is located in your repository folder. You can use this installation for several projects in multiple working directories.
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. For further installation instruction please go [here](https://ltt.pages.git-ce.rwth-aachen.de/opt/secmod/secmod/usage/installation.html). The code was tested with Python 3.7.5.
## First Steps
## Authors and acknowledgment Create a working directory for the optimization framework. Next, cd to that directory and enter
Show your appreciation to those who have contributed to the project. ```shell
python -m secmod.setup
```
in the terminal. This sets up the right folder structure.
Start the optimization with double clicking the start.bat file, where you can choose your enviroment or
alternatively use
## License ```shell
For open source projects, say how it is licensed. python -m secmod
```
to start.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
File added
m3 = m ** 3 = cubic_meter
m2 = m ** 2 = square_meter
mass_CO2_equivalent = [Global_Warming_Potential_100a] = CO2_eq = CO2_Eq = CO2_EQ
megajoule_equivalent = [cumulative_energy_demand] = MJ_Eq =MJ =MJ_EQ = MJ_eq
mole_h_plus_equivalent = [acidification] =mol_H_plus_Eq=mol_H_plus_eq=H_plus_eq = H_plus_Eq = H_plus_EQ
comparative_toxic_unit_for_humans = [ecotoxicity] = CTUh=CTU
phosphor_equivalent = [freshwater_eutrophication] = P_Eq = P_EQ = P_eq
nitrogen_equivalent = [marine_eutrophication] = N_Eq = N_EQ = N_eq
mass_uranium_235_equivalent = [ionising_radiation] = U235_Eq = U235_EQ = U235_eq
mass_CFC_11_equivalent = [ozone_layer_depletion] = CFC_11_Eq = CFC_11_EQ = CFC_11_eq
mass_ethylen_equivalent = [photochemical_ozone_creation] = ethylen_Eq = ethylen_EQ = ethylen_eq = C2H4_Eq = C2H4_EQ = C2H4_eq
mass_particulate_matter_2_5_equivalent = [respiratory_effects] = PM2_5_Eq = PM2_5_EQ = PM2_5_eq = PM2_5
mass_deficit_of_soil_organic_carbon = [land_use] = soil_organic_carbon = SOC
mass_antimony_equivalent = [mineral] = Sb_Eq = Sb_EQ = Sb_eq
oil_equivalent = [FDP] = oil_Eq = oil_EQ = oil_eq
mass_1_4_DCB_equivalent = [FETPinf] = DCB_Eq = DCB_EQ = DCB_eq
iron_equivalent = [MDP] = Fe_Eq = Fe_EQ = Fe_eq
particulate_matter_10_equivalent = [PMFP] = PM10_Eq = PM10_EQ = PM10_eq = PM10
NMVOC_equivalent = [POFP] = NMVOC_Eq = NMVOC_EQ = NMVOC_eq = NMVOC
mass_sulfur_dioxide = [TAP100] = SO2_Eq = SO2_EQ = SO2_eq
Euro = [money] = EURO
car = [car]
meter_vehicle = [mobility] = meter * car
circuit = [power_circuit]
water_eq = [dissipated_water] = water = water_Eq
disease_i_eq = [respiratory_effects_inorganics] = disease = disease_i disease_i_Eq
\ No newline at end of file
# README - GRID DE
This data package contains all the data for the MILP model. To account for spatial resolution, the model consists of nodes and connections. Nodes have an integer
ID and geo coordinates. Connections have an integer ID as well
and are defined by the two nodes they connect. Please note that the location of our nodes was chosen randomly and is not relevant in our case study.
connection,node1,node2,manual_distance,manual_distance_unit
1,1,2,65.0,km
{
"profile": "tabular-data-package",
"resources": [
{
"path": "connections.csv",
"profile": "tabular-data-resource",
"name": "connections",
"format": "csv",
"mediatype": "text/csv",
"encoding": "utf-8",
"schema": {
"fields": [
{
"name": "connection",
"type": "integer",
"format": "default"
},
{
"name": "node1",
"type": "integer",
"format": "default"
},
{
"name": "node2",
"type": "integer",
"format": "default"
}
],
"missingValues": [
""
]
}
},
{
"path": "nodes.csv",
"profile": "tabular-data-resource",
"name": "nodes",
"format": "csv",
"mediatype": "text/csv",
"encoding": "utf-8",
"schema": {
"fields": [
{
"name": "node",
"type": "integer",
"format": "default"
},
{
"name": "country",
"type": "string",
"format": "default"
},
{
"name": "state",
"type": "string",
"format": "default"
},
{
"name": "dena_region",
"type": "string",
"format": "default"
},
{
"name": "z6_region",
"type": "string",
"format": "default"
},
{
"name": "latitude",
"type": "number",
"format": "default"
},
{
"name": "longitude",
"type": "number",
"format": "default"
}
],
"missingValues": [
""
]
}
}
]
}
\ No newline at end of file
node,latitude,longitude,country,state,dena_region,z6_region
1,54.716,9.317,DE,DE_SH,dena21,DE_NW
2,54.349,10.061,DE,DE_SH,dena21,DE_NW
# README - 01-GRID
This directory contains all data packages which define
a grid model. A grid definition contains the information
about the nodes of the grid, their geo coordinates
and connections between the nodes. A connection is only
defined by the two nodes it connects.
[
"megameter",
"kilocar",
"megawatt",
"MWh",
"circuit",
"1 / kilocar",
"1 / megawatt",
"cubic_meter / car / hour",
"cubic_meter / hour / megawatt",
"megawatt / car",
"",
"gigagram / car / hour",
"gigagram / hour / megawatt",
"megameter / hour",
"gigagram * mass_CO2_equivalent / kilocar",
"gigagram * mass_CO2_equivalent / megawatt",
"gigagram * mass_CO2_equivalent / (kilocar * megameter)",
"gigagram * mass_CO2_equivalent / MWh",
"kiloEuro / kilocar",
"kiloEuro / megawatt",
"kiloEuro / (kilocar * megameter)",
"kiloEuro / MWh",
"hour * kiloEuro / megameter / cubic_meter",
"kiloEuro / megameter / cubic_meter",
"gigagram * mass_CO2_equivalent / megameter / megawatt",
"kiloEuro / megameter / megawatt",
"kiloEuro / megameter / MWh",
"kiloEuro / cubic_meter",
"kiloEuro / gigagram",
"cubic_meter / hour",
"1 / hour",
"gigagram * mass_CO2_equivalent",
"kiloEuro",
"1 / gigagram / mass_CO2_equivalent",
"1 / kiloEuro",
"gigagram / hour",
"kilocar * megameter / hour",
"kilogram * meter / second**2",
"second**2 / kilogram / meter",
"mass_CO2_equivalent * second**2 / meter**3",
"gigagram / second**3",
" 1/meter**(2)",
"gigagram / second**3" ,
"K",
"points / megawatt",
"points",
"1 / points",
"cubic_meter * water_eq / megawatt",
"cubic_meter * water_eq / (megawatt * hour)",
"cubic_meter * water_eq",
"1 / (cubic_meter * water_eq)",
"megajoule_equivalent / megawatt",
"megajoule_equivalent/ (megawatt * hour)",
"megajoule_equivalent",
"1 / megajoule_equivalent",
"kilogram * mass_antimony_equivalent / megawatt",
"kilogram * mass_antimony_equivalent / (megawatt * hour)",
"kilogram * mass_antimony_equivalent",
"1 / (kilogram * mass_antimony_equivalent)",
"mole * mole_h_plus_equivalent / megawatt",
"mole * mole_h_plus_equivalent / (megawatt * hour)",
"mole * mole_h_plus_equivalent",
"1 / (mole * mole_h_plus_equivalent)",
"comparative_toxic_unit_for_humans / megawatt",
"comparative_toxic_unit_for_humans / (megawatt * hour)",
"comparative_toxic_unit_for_humans",
"1 / comparative_toxic_unit_for_humans",
"kilogram * phosphor_equivalent / megawatt",
"kilogram * phosphor_equivalent / (megawatt * hour)",
"kilogram * phosphor_equivalent",
"1 / (kilogram * phosphor_equivalent)",
"kilogram * nitrogen_equivalent / megawatt",
"kilogram * nitrogen_equivalent / (megawatt * hour)",
"kilogram * nitrogen_equivalent",
"1 / (kilogram * nitrogen_equivalent)",
"mole * nitrogen_equivalent / megawatt",
"mole * nitrogen_equivalent / (megawatt * hour)",
"mole * nitrogen_equivalent",
"1 / (mole * nitrogen_equivalent)",
"kilogram * mass_uranium_235_equivalent / megawatt",
"kilogram * mass_uranium_235_equivalent / (megawatt * hour)",
"kilogram * mass_uranium_235_equivalent",
"1 / (kilogram * mass_uranium_235_equivalent)",
"kilogram * mass_CFC_11_equivalent / megawatt",
"kilogram * mass_CFC_11_equivalent / (megawatt * hour)",
"kilogram * mass_CFC_11_equivalent",
"1 / (kilogram * mass_CFC_11_equivalent)",
"kilogram * NMVOC_equivalent / megawatt",
"kilogram * NMVOC_equivalent / (megawatt * hour)",
"kilogram * NMVOC_equivalent",
"1 / (kilogram * NMVOC_equivalent)"
]
\ No newline at end of file
# README - ABSORPTION CHILLER - ONE NODE
This data package contains all necessary information
about the production process **absortion chiller** in the grid: **ONE NODE**
node,unit,2020,comments
1,MW ,0,
2,MW ,0,
node,unit,2020,2025,comments
1,1,,,
2,1,,,
node,unit,2020,2025,comments
1,MW ,1,1,
2,MW ,0,0,
node,unit,2020,2025,comments
1,MW ,2,2,
2,MW ,0,0,
# README - ABSORPTION CHILLER
This data package contains all necessary information
about the production process **absorption chiller**
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment