mesido


Namemesido JSON
Version 0.1.8.3 PyPI version JSON
download
home_pagehttps://github.com/Multi-Energy-Systems-Optimization/mesido/
SummaryMulti Energy System Optimization
upload_time2024-12-02 15:10:13
maintainerJim Rojer, Kobus van Rooyen, Kelbij Star, Femke Janssen, Jesús Andrés Rodríguez Sarasty, Thijs van der Klauw
docs_urlNone
authorJim Rojer
requires_python<3.11,>=3.8
licenseLGPLv3
keywords multi-energy-systems optimization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MESIDO

MESIDO is an optimization application for optimal planning, design and 
operation of Energy Systems with the current main focus on District Heating Systems (DHS). The current application focuses on a Mixed Integer Linear Problem (MILP) approach, with multiple linearization strategies to conservatively approximate the steady-state physics and financial models. See for example the head loss validation test, using pandapipes, in the test folder. All physics, placement, sizing and financial models are combined in the TechnoEconomicMixin class. When inherited this class can be combined with objective functions (that typically incorporate the financial aspects) and interface methods to create an
optimization workflow (see also running an example).

The main supported method for defining your Energy system is ESDL (Energy System Description Language), which is a modelling language for energy systems. See also: https://github.com/EnergyTransition/ESDL.
With ESDL you can define assets like demands, sources, pipes, etc. and fill in their attributes. The ESDLMixin class
will parse the ESDL file and utilize the attributes to build up the model representation.

The documentation on the mathematical modelling and workflow application can be found on: 
readthedocs: https://mesido.readthedocs.io/en/latest/.

Installation
============

Installation of the MESIDO library is as simple as::

    # 1a. Use pip to install directly
    pip install mesido

If you are going to develop and change the source code, you probably want to do something like::

	# 1b. Use git clone and pip to make an editable/developer installation
	git clone https://github.com/Multi-Energy-Systems-Optimization/mesido
	pip install -e mesido

MESIDO depends on `RTC-Tools <https://gitlab.com/deltares/rtc-tools.git>`_, which is automatically installed as one of its dependencies.

Running an example
==================

To make sure that everything is set-up correctly, you can run one of the example cases.
These do not come with the installation, and need to be downloaded separately::

    # 1. Clone the repository
    git clone https://github.com/Multi-Energy-Systems-Optimization/mesido.git

    # 2. Change directory to the example folder
    cd mesido/examples/pipe_diameter_sizing/src

    # 3. Run the example
    python example.py

You will see the progress in your shell.
If all is well, you should see something like the following output:

![img.png](img.png)

In this example.py file you can see a small workflow being set-up. The PipeDiameterSizingProblem class
inherits from (Note only the *classes are defined in MESIDO the others come from rtc-tools package):
- CollocatedIntegratedOptimizationProblem: This class does all the discretization of the state variables in your problem.
- *ESDLMixin: This class does the parsing and setting up of a model based on an ESDL file.
- GoalProgrammingMixin: This class allows you to add Goals (objective functions) with different priorities.
- LinearizedOrderGoalProgrammingMixin: This class allows you to add higher order goals (e.g. order=2) for MILP problems.
- *TechnoEconomicMixin: This class combines all the Mixin classes required for a full techno-economic optimization. 

Within the PipeDiameterSizingProblem class you can see that the path_goals() function is overwritten and that
a path_goal with priority one is added to meet the heat demands. The definition path_goal is used
to define a goal that is applied to a state variable at every time step. Furthermore, the goals() method is also overwritten
in this case where an objective with priority two is added to minimize `length*diameter`.
The goals() method is used here for global variables that do not change over time. The priorities indicate the sequential order 
in which the optimizer would be applied to the goals. In this example the heat demand is matched first, after which priority 2 `length*diameter` 
is minimized. In this example the objective of the priority one goal constraints the priority two goal optimization, which ensures that the 
optimization of the priority two goal does not have impact on the optimal result of the priority one goal.

Contribute
==========

You can contribute to this code through Pull Request on GitHub.
Please, make sure that your code is coming with unit tests to ensure full coverage and continuous integration in the API.

GitHub: https://github.com/Multi-Energy-Systems-Optimization/mesido



## Release
This package is released on pypi [here](https://pypi.org/project/mesido/) whenever a new tag is pushed.
In order to release this package:

1. Make sure that all relevant merge requests and commits have been merged to the master and/or poc-release branch.
2. Run `git checkout master` or `git checkout poc-release` to switch to the release branch.
3. Run `git pull origin master` or `git pull origin poc-release` to pull all latest changes.
4. Run `git tag <new_version>` where `<new_version>` is the new version number.
5. Run `git push origin <new_version>` to push the tag to Github.
6. Check [Github](https://github.com/Multi-Energy-Systems-Optimization/mesido/actions) to confirm the release is
   processed without errors.
7. Once the release has finished, confirm the new version is available on [pypi](https://pypi.org/project/mesido/).


License
=======

This code base is licensed as LGPLv3 as specified in `LICENSE`. However, the LGPLv3 license
references the GPLv3 license. As such, we have added a copy of GPLv3 as a reference in the file
`additional_info_for_license.txt`. This does NOT entail that this code base is licensed as `GPLv3`.
The copy of the `GPLv3` license is only added as a reference.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Multi-Energy-Systems-Optimization/mesido/",
    "name": "mesido",
    "maintainer": "Jim Rojer, Kobus van Rooyen, Kelbij Star, Femke Janssen, Jes\u00fas Andr\u00e9s Rodr\u00edguez Sarasty, Thijs van der Klauw",
    "docs_url": null,
    "requires_python": "<3.11,>=3.8",
    "maintainer_email": null,
    "keywords": "Multi-Energy-Systems, optimization",
    "author": "Jim Rojer",
    "author_email": "jim.rojer@tno.nl",
    "download_url": "https://files.pythonhosted.org/packages/22/9d/46f57118aa9fd042bc3f800d100824f5dff3298b0edf0430bf3d025a1792/mesido-0.1.8.3.tar.gz",
    "platform": "Windows",
    "description": "# MESIDO\n\nMESIDO is an optimization application for optimal planning, design and \noperation of Energy Systems with the current main focus on District Heating Systems (DHS). The current application focuses on a Mixed Integer Linear Problem (MILP) approach, with multiple linearization strategies to conservatively approximate the steady-state physics and financial models. See for example the head loss validation test, using pandapipes, in the test folder. All physics, placement, sizing and financial models are combined in the TechnoEconomicMixin class. When inherited this class can be combined with objective functions (that typically incorporate the financial aspects) and interface methods to create an\noptimization workflow (see also running an example).\n\nThe main supported method for defining your Energy system is ESDL (Energy System Description Language), which is a modelling language for energy systems. See also: https://github.com/EnergyTransition/ESDL.\nWith ESDL you can define assets like demands, sources, pipes, etc. and fill in their attributes. The ESDLMixin class\nwill parse the ESDL file and utilize the attributes to build up the model representation.\n\nThe documentation on the mathematical modelling and workflow application can be found on: \nreadthedocs: https://mesido.readthedocs.io/en/latest/.\n\nInstallation\n============\n\nInstallation of the MESIDO library is as simple as::\n\n    # 1a. Use pip to install directly\n    pip install mesido\n\nIf you are going to develop and change the source code, you probably want to do something like::\n\n\t# 1b. Use git clone and pip to make an editable/developer installation\n\tgit clone https://github.com/Multi-Energy-Systems-Optimization/mesido\n\tpip install -e mesido\n\nMESIDO depends on `RTC-Tools <https://gitlab.com/deltares/rtc-tools.git>`_, which is automatically installed as one of its dependencies.\n\nRunning an example\n==================\n\nTo make sure that everything is set-up correctly, you can run one of the example cases.\nThese do not come with the installation, and need to be downloaded separately::\n\n    # 1. Clone the repository\n    git clone https://github.com/Multi-Energy-Systems-Optimization/mesido.git\n\n    # 2. Change directory to the example folder\n    cd mesido/examples/pipe_diameter_sizing/src\n\n    # 3. Run the example\n    python example.py\n\nYou will see the progress in your shell.\nIf all is well, you should see something like the following output:\n\n![img.png](img.png)\n\nIn this example.py file you can see a small workflow being set-up. The PipeDiameterSizingProblem class\ninherits from (Note only the *classes are defined in MESIDO the others come from rtc-tools package):\n- CollocatedIntegratedOptimizationProblem: This class does all the discretization of the state variables in your problem.\n- *ESDLMixin: This class does the parsing and setting up of a model based on an ESDL file.\n- GoalProgrammingMixin: This class allows you to add Goals (objective functions) with different priorities.\n- LinearizedOrderGoalProgrammingMixin: This class allows you to add higher order goals (e.g. order=2) for MILP problems.\n- *TechnoEconomicMixin: This class combines all the Mixin classes required for a full techno-economic optimization. \n\nWithin the PipeDiameterSizingProblem class you can see that the path_goals() function is overwritten and that\na path_goal with priority one is added to meet the heat demands. The definition path_goal is used\nto define a goal that is applied to a state variable at every time step. Furthermore, the goals() method is also overwritten\nin this case where an objective with priority two is added to minimize `length*diameter`.\nThe goals() method is used here for global variables that do not change over time. The priorities indicate the sequential order \nin which the optimizer would be applied to the goals. In this example the heat demand is matched first, after which priority 2 `length*diameter` \nis minimized. In this example the objective of the priority one goal constraints the priority two goal optimization, which ensures that the \noptimization of the priority two goal does not have impact on the optimal result of the priority one goal.\n\nContribute\n==========\n\nYou can contribute to this code through Pull Request on GitHub.\nPlease, make sure that your code is coming with unit tests to ensure full coverage and continuous integration in the API.\n\nGitHub: https://github.com/Multi-Energy-Systems-Optimization/mesido\n\n\n\n## Release\nThis package is released on pypi [here](https://pypi.org/project/mesido/) whenever a new tag is pushed.\nIn order to release this package:\n\n1. Make sure that all relevant merge requests and commits have been merged to the master and/or poc-release branch.\n2. Run `git checkout master` or `git checkout poc-release` to switch to the release branch.\n3. Run `git pull origin master` or `git pull origin poc-release` to pull all latest changes.\n4. Run `git tag <new_version>` where `<new_version>` is the new version number.\n5. Run `git push origin <new_version>` to push the tag to Github.\n6. Check [Github](https://github.com/Multi-Energy-Systems-Optimization/mesido/actions) to confirm the release is\n   processed without errors.\n7. Once the release has finished, confirm the new version is available on [pypi](https://pypi.org/project/mesido/).\n\n\nLicense\n=======\n\nThis code base is licensed as LGPLv3 as specified in `LICENSE`. However, the LGPLv3 license\nreferences the GPLv3 license. As such, we have added a copy of GPLv3 as a reference in the file\n`additional_info_for_license.txt`. This does NOT entail that this code base is licensed as `GPLv3`.\nThe copy of the `GPLv3` license is only added as a reference.\n",
    "bugtrack_url": null,
    "license": "LGPLv3",
    "summary": "Multi Energy System Optimization",
    "version": "0.1.8.3",
    "project_urls": {
        "Homepage": "https://github.com/Multi-Energy-Systems-Optimization/mesido/"
    },
    "split_keywords": [
        "multi-energy-systems",
        " optimization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "05f7b3596bcc43cf86c5482ca9ed88bdf653fdba2be860b3e778afb17a9f0463",
                "md5": "0267aa375a15254c158e59d4b595b9bc",
                "sha256": "8cb3daffb2af1978db430512aa25e4d43e80f3a8cf198f5109df3bde2b657f41"
            },
            "downloads": -1,
            "filename": "mesido-0.1.8.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0267aa375a15254c158e59d4b595b9bc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.11,>=3.8",
            "size": 321484,
            "upload_time": "2024-12-02T15:10:10",
            "upload_time_iso_8601": "2024-12-02T15:10:10.970654Z",
            "url": "https://files.pythonhosted.org/packages/05/f7/b3596bcc43cf86c5482ca9ed88bdf653fdba2be860b3e778afb17a9f0463/mesido-0.1.8.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "229d46f57118aa9fd042bc3f800d100824f5dff3298b0edf0430bf3d025a1792",
                "md5": "381ebf553adc2121af145005559bf0ae",
                "sha256": "ffebf73fbe21a9825b98da37b94353b53ff44942f2e0689152ba067e4050e948"
            },
            "downloads": -1,
            "filename": "mesido-0.1.8.3.tar.gz",
            "has_sig": false,
            "md5_digest": "381ebf553adc2121af145005559bf0ae",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.11,>=3.8",
            "size": 355387,
            "upload_time": "2024-12-02T15:10:13",
            "upload_time_iso_8601": "2024-12-02T15:10:13.201096Z",
            "url": "https://files.pythonhosted.org/packages/22/9d/46f57118aa9fd042bc3f800d100824f5dff3298b0edf0430bf3d025a1792/mesido-0.1.8.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-02 15:10:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Multi-Energy-Systems-Optimization",
    "github_project": "mesido",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "mesido"
}
        
Elapsed time: 2.33553s