diff --git a/.bumpversion.cfg b/.bumpversion.cfg index d45e1fcea..867d689ee 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.5.0 +current_version = 0.5.1 commit = True tag = True diff --git a/.cookiecutterrc b/.cookiecutterrc deleted file mode 100644 index fb28818a5..000000000 --- a/.cookiecutterrc +++ /dev/null @@ -1,69 +0,0 @@ -# This file exists so you can easily regenerate your project. -# -# `cookiepatcher` is a convenient shim around `cookiecutter` -# for regenerating projects (it will generate a .cookiecutterrc -# automatically for any template). To use it: -# -# pip install cookiepatcher -# cookiepatcher gh:ionelmc/cookiecutter-pylibrary project-path -# -# See: -# https://pypi.org/project/cookiepatcher -# -# Alternatively, you can run: -# -# cookiecutter --overwrite-if-exists --config-file=project-path/.cookiecutterrc gh:ionelmc/cookiecutter-pylibrary - -default_context: - - _extensions: ['jinja2_time.TimeExtension'] - _template: 'gh:ionelmc/cookiecutter-pylibrary' - allow_tests_inside_package: 'yes' - appveyor: 'yes' - c_extension_function: 'longest' - c_extension_module: '_oemof-solph' - c_extension_optional: 'no' - c_extension_support: 'no' - c_extension_test_pypi: 'no' - c_extension_test_pypi_username: 'oemof' - codacy: 'yes' - codacy_projectid: 'CODECYTOKEN' - codeclimate: 'no' - codecov: 'yes' - command_line_interface: 'no' - command_line_interface_bin_name: 'oemof-solph' - coveralls: 'yes' - coveralls_token: 'COVERALLSTOKEN' - distribution_name: 'oemof-solph' - email: 'contact@oemof.org' - full_name: 'oemof developer group' - landscape: 'no' - license: 'MIT license' - linter: 'flake8' - package_name: 'oemof-solph' - project_name: 'oemof-solph' - project_short_description: 'A model generator for energy system modelling and optimisation.' - pypi_badge: 'yes' - pypi_disable_upload: 'no' - release_date: '2020-04-04' - repo_hosting: 'github.com' - repo_hosting_domain: 'github.com' - repo_name: 'oemof-solph' - repo_username: 'oemof' - requiresio: 'yes' - scrutinizer: 'yes' - setup_py_uses_setuptools_scm: 'no' - setup_py_uses_test_runner: 'no' - sphinx_docs: 'yes' - sphinx_docs_hosting: 'https://oemof-solph.readthedocs.io/' - sphinx_doctest: 'no' - sphinx_theme: 'sphinx-rtd-theme' - test_matrix_configurator: 'yes' - test_matrix_separate_coverage: 'no' - test_runner: 'pytest' - travis: 'yes' - travis_osx: 'yes' - version: '0.4.0.dev0' - website: 'https://oemof.org' - year_from: '2014' - year_to: '2020' diff --git a/.github/workflows/tox_checks.yml b/.github/workflows/tox_checks.yml index cde986c4a..f84eb1c2c 100644 --- a/.github/workflows/tox_checks.yml +++ b/.github/workflows/tox_checks.yml @@ -25,6 +25,8 @@ jobs: - docs steps: + - name: Update package list + run: sudo apt update - name: Install LaTeX run: sudo apt install dvipng rubber texlive-latex-extra - name: Git clone diff --git a/.gitignore b/.gitignore index dfe58380d..0672a8eba 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ htmlcov .project .pydevproject .idea +.vscode *.iml *.komodoproject diff --git a/.readthedocs.yml b/.readthedocs.yaml similarity index 95% rename from .readthedocs.yml rename to .readthedocs.yaml index 27dfafdef..aff41b4cf 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yaml @@ -5,7 +5,7 @@ build: - coinor-cbc sphinx: configuration: docs/conf.py -formats: all +formats: [] python: version: "3.8" install: diff --git a/AUTHORS.rst b/AUTHORS.rst index a4fb78d80..85443fee1 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -28,7 +28,9 @@ Authors * Jonathan Amme * Julian Endres * Lluis Millet +* Lennart Schürmann * Martin Soethe +* Marie-Claire Gering * Patrik Schönfeldt * Pierre-François Duc * Saeed Sayadi @@ -36,3 +38,4 @@ Authors * Simon Hilpert * Stephan Günther * Uwe Krien +* Tobi Rohrer diff --git a/CHANGELOG.rst b/CHANGELOG.rst deleted file mode 100644 index e9d55c21a..000000000 --- a/CHANGELOG.rst +++ /dev/null @@ -1,26 +0,0 @@ - -Changelog -========= - -0.4.0 (2020-06-04) ------------------- - -* First release of oemof.solph on PyPI. - -0.4.1 (2020-06-24) ------------------- - -* Fixed incompatibility with recent Pyomo release (5.7) - -0.4.2 (2021-XX-XX) ------------------- - -* Enhanced custom SinkDSM: - * Renamed keyword argument `method` to `approach` - * Renamed approaches `interval` to `oemof` and `delay` to `DIW` - * Added modeling approach `DLR` (PhD thesis of Hans Christian Gils 2015) - * Included load shedding - * Introduced `recovery_time` in `DIW` approach - * Introduced `shift_time` and other parameters for `DLR` approach - * Included investments in DSM - * Normalized keyword arguments `demand`, `capapcity_up` and `capacity_down` diff --git a/CITATION.cff b/CITATION.cff index b3fedc2c7..19f8f340a 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -51,6 +51,8 @@ authors: given-names: Hendrik alias: "@henhuy" - + family-names: Developer + given-names: Anonymous alias: "@steffenGit" - family-names: Schachler @@ -81,10 +83,12 @@ authors: given-names: David alias: "@DFuh" - + family-names: Developer + given-names: Anonymous alias: "@gplssm" - - family-names: Francesco - given-names: Witte + family-names: Witte + given-names: Francesco alias: "@fwitte" - family-names: Kassing @@ -103,39 +107,67 @@ authors: given-names: Bryan alias: "@bmlancien" - + family-names: Developer + given-names: Anonymous alias: "@nesnoj" - + family-names: Developer + given-names: Anonymous alias: "@lmilletb" - + family-names: Developer + given-names: Anonymous alias: "@mloenneberga" - + family-names: "Schürmann" + given-names: Lennart alias: "@lensum" - + family-names: Developer + given-names: Anonymous alias: "@RD-OTH" - family-names: Delfs given-names: Jens-Olaf alias: "@drjod" - + family-names: Developer + given-names: Anonymous alias: "@stefansc1" - + family-names: Developer + given-names: Anonymous alias: "@escalacjo" - family-names: Smalla given-names: Tjark alias: "@ChillkroeteTTS" - + family-names: Developer + given-names: Anonymous alias: "@ajimenezUCLA" - family-names: Wolf given-names: Jakob alias: "@jakob-wo" - + family-names: Developer + given-names: Anonymous alias: "@elisapap" - family-names: Gaudchau given-names: Elisa alias: "@elisagaudchau" - + family-names: Developer + given-names: Anonymous alias: "@chrisflei" + - + family-names: Rohrer + given-names: Tobi + alias: "@tobirohrer" + - + family-names: Gering + given-names: Marie-Claire + alias: "@MaGering" ... diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index e71d74380..ac3547310 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -72,11 +72,11 @@ For merging, you should: 1. Include passing tests (run ``tox``) [1]_. 2. Update documentation when there's new API, functionality etc. -3. Add a note to ``CHANGELOG.rst`` about the changes. -4. Add yourself to ``AUTHORS.rst`` and ``CITATION.cff``. +3. Add a note about the changes to ``docs/whatsnew/next_version.rst``. +4. Add your name to ``AUTHORS.rst`` and ``CITATION.cff``. -.. [1] If you don't have all the necessary python versions available locally you can rely on Travis - it will - `run the tests `_ for each change you add in the pull request. +.. [1] If you don't have all the necessary python versions available locally, + you can rely on the CI pipeline at GitHub. It will be slower though ... diff --git a/LICENSE b/LICENSE index 00db70e6d..d053e4142 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2014-2022, oemof developer group +Copyright (c) 2014-2023, oemof developer group 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: diff --git a/MANIFEST.in b/MANIFEST.in index 94eb45271..c80f59439 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,17 +9,16 @@ include .cookiecutterrc include .editorconfig include AUTHORS.rst -include CHANGELOG.rst include CITATION.cff include CONTRIBUTING.rst include LICENSE include README.rst include *.md include VERSION -include pytest.ini include tox.ini include *.yml +include *.yaml recursive-exclude examples *.py recursive-include examples *.csv diff --git a/README.rst b/README.rst index 7d2bf7840..6151423e1 100644 --- a/README.rst +++ b/README.rst @@ -100,25 +100,24 @@ Introduction The oemof.solph package is part of the `Open energy modelling framework (oemof) `_. -This an organisational framework to bundle tools for energy (system) modelling. +This is an organisational framework to bundle tools for energy (system) modelling. oemof-solph is a model generator for energy system modelling and optimisation. -The ``oemof.solph`` package is very often called just ``oemof`` as it was part of the -oemof meta package. Now you need to install ``oemof.solph`` instead of ``oemof``, but -everything else is still the same. -(Note: Since the oemof package refers to legacy versions before v0.4, -it is not possible to install both, oemof and oemof.solph, at the same time. -Just use ``pip install oemof.solph``.) +The package ``oemof.solph`` is very often called just ``oemof``. +This is because installing the ``oemof`` meta package was once the best way to get ``oemof.solph``. +Notice that you should prefeably install ``oemof.solph`` instead of ``oemof`` +if you want to use ``solph``. + Everybody is welcome to use and/or develop oemof.solph. Read our `contribution `_ section. Contribution is already possible on a low level by simply fixing typos in oemof's documentation or rephrasing sections which are unclear. -If you want to support us that way please fork the oemof repository to your own -github account and make changes as described in the `github guidelines `_ +If you want to support us that way please fork the oemof-solph repository to your own +GitHub account and make changes as described in the `github guidelines `_ -If you have questions regarding the use of oemof you can visit the forum at `openmod-initiative.org `_ and open a new thread if your questions hasn't been already answered. +If you have questions regarding the use of oemof including oemof.solph you can visit the openmod forum (`tag oemof `_ or `tag oemof-solph `_) and open a new thread if your questions hasn't been already answered. Keep in touch! - You can become a watcher at our `github site `_, but this will bring you quite a few mails and might be more interesting for developers. @@ -135,20 +134,26 @@ The `oemof.solph documentation `_ is powere Installation ============ -If you have a working Python3 environment, use pypi to install the latest oemof version. Python >= 3.6 is recommended. Lower versions may work but are not tested. +If you have a working Python installation, use pypi to install the latest version of oemof.solph. +Python >= 3.8 is recommended. Lower versions may work but are not tested. + +We highly recommend to use virtual environments. +Please refer to the documentation of your Python distribution (e.g. Anaconda, +Micromamba, or the version of Python that came with your Linux installation) +to learn how to set up and use virtual environments. :: - pip install oemof.solph + (venv) pip install oemof.solph If you want to use the latest features, you might want to install the **developer version**. The developer version is not recommended for productive use:: - pip install https://github.com/oemof/oemof-solph/archive/dev.zip + (venv) pip install https://github.com/oemof/oemof-solph/archive/dev.zip For running an oemof-solph optimisation model, you need to install a solver. -Following you will find guidelines for the installation process for different operation systems. +Following you will find guidelines for the installation process for different operating systems. .. _windows_solver_label: .. _linux_solver_label: @@ -156,10 +161,10 @@ Following you will find guidelines for the installation process for different op Installing a solver ------------------- -There are various commercial and open-source solvers that can be used with oemof. -There are two common OpenSource solvers available (CBC, GLPK), while oemof recommends CBC (Coin-or branch and cut). -But sometimes its worth comparing the results of different solvers. -Other commercial solvers like Gurobi or Cplex can be used as well. +There are several solvers that can work with oemof, both open source and commercial. +Two open source solvers are widely used (CBC and GLPK), but oemof suggests CBC (Coin-or branch and cut). +It may be useful to compare results of different solvers to see which performs best. +Other commercial solvers, like Gurobi or Cplex, are also options. Have a look at the `pyomo docs `_ to learn about which solvers are supported. Check the solver installation by executing the test_installation example below (see section Installation Test). @@ -170,7 +175,7 @@ To install the solvers have a look at the package repository of your Linux distr **Windows** - 1. Download CBC (`64 `_ or `32 `_ bit) + 1. Download `CBC `_ 2. Download `GLPK (64/32 bit) `_ 3. Unpack CBC/GLPK to any folder (e.g. C:/Users/Somebody/my_programs) 4. Add the path of the executable files of both solvers to the PATH variable using `this tutorial `_ @@ -192,12 +197,12 @@ If you install the CBC solver via brew (highly recommended), it should work with **conda** -Provided you are using a Linux or MacOS, the CBC-solver can also be installed in a `conda` environment. Please note, that it is highly recomended to `use pip after conda `_, so: +Provided you are using a Linux or MacOS, the CBC-solver can also be installed in a `conda` environment. Please note, that it is highly recommended to `use pip after conda `_, so: .. code:: console - conda install -c conda-forge coincbc - pip install oemof.solph + (venv) conda install -c conda-forge coincbc + (venv) pip install oemof.solph .. _check_installation_label: @@ -210,7 +215,7 @@ in your virtual environment: .. code:: console - oemof_installation_test + (venv) oemof_installation_test If the installation was successful, you will receive something like this: @@ -253,20 +258,21 @@ To allow citing specific versions, we use the zenodo project to get a DOI for ea Examples ======== -The linkage of specific modules of the various packages is called an -application (app) and depicts for example a concrete energy system model. -You can find a large variety of helpful examples in `oemof's example repository `_ on github to download or clone. -The examples show optimisations of different energy systems and are supposed +The combination of specific modules (often including other packages) is called an +application (app). For example, it can depict a concrete energy system model. +You can find a large variety of helpful examples in the documentation. +The examples show the optimisation of different energy systems and are supposed to help new users to understand the framework's structure. There is some elaboration on the examples in the respective repository. The repository has sections for each major release. -You are welcome to contribute your own examples via a `pull request `_ or by sending us an e-mail (see `here `_ for contact information). +You are welcome to contribute your own examples via a `pull request `_ +or by e-mailing us (see `here `_ for contact information). License ======= -Copyright (c) 2022 oemof developer group +Copyright (c) 2023 oemof developer group Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/VERSION b/VERSION index 3d187266f..dd9b22ccc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -__version__ = "0.5.0" +__version__ = "0.5.1" diff --git a/docs/_files/OffsetTransformer_efficiency.svg b/docs/_files/OffsetConverter_efficiency.svg similarity index 100% rename from docs/_files/OffsetTransformer_efficiency.svg rename to docs/_files/OffsetConverter_efficiency.svg diff --git a/docs/_files/OffsetTransformer_power_relation.svg b/docs/_files/OffsetConverter_power_relation.svg similarity index 100% rename from docs/_files/OffsetTransformer_power_relation.svg rename to docs/_files/OffsetConverter_power_relation.svg diff --git a/docs/_files/example_network.svg b/docs/_files/example_network.svg index c79e8934a..5bf16d798 100644 --- a/docs/_files/example_network.svg +++ b/docs/_files/example_network.svg @@ -26,7 +26,7 @@ Bus 1 - Transformer + Converter Sink 1 diff --git a/docs/_files/oemof_solph_example.svg b/docs/_files/oemof_solph_example.svg index e2aba7b9f..f74e17158 100644 --- a/docs/_files/oemof_solph_example.svg +++ b/docs/_files/oemof_solph_example.svg @@ -144,7 +144,7 @@ - Transformer + Converter diff --git a/docs/changelog.rst b/docs/changelog.rst index dc332779f..a7815ef88 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -9,6 +9,8 @@ These are new features and improvements of note in each release :backlinks: top +.. include:: whatsnew/v0-5-1.rst +.. include:: whatsnew/v0-5-0.rst .. include:: whatsnew/v0-4-5.rst .. include:: whatsnew/v0-4-4.rst .. include:: whatsnew/v0-4-2.rst diff --git a/docs/conf.py b/docs/conf.py index c79fe8d7b..12972c768 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -27,14 +27,16 @@ def setup(app): "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", + "sphinx_copybutton", + "sphinx_design", ] source_suffix = ".rst" master_doc = "index" project = "oemof.solph" -year = "2014-2022" +year = "2014-2023" author = "oemof-developer-group" copyright = "{0}, {1}".format(year, author) -version = release = "0.5.0" +version = release = "0.5.1" pygments_style = "trac" templates_path = ["."] diff --git a/docs/examples/activity_costs.rst b/docs/examples/activity_costs.rst new file mode 100644 index 000000000..0edabd8c1 --- /dev/null +++ b/docs/examples/activity_costs.rst @@ -0,0 +1,7 @@ +Activity costs +-------------- + +Costs for operation a boiler +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: activity_costs.activity_costs diff --git a/docs/examples/basic_example.rst b/docs/examples/basic_example.rst new file mode 100644 index 000000000..abcd5e7c2 --- /dev/null +++ b/docs/examples/basic_example.rst @@ -0,0 +1,7 @@ +Basic example +------------- + +Using standard oemof-solph components +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: basic_example.basic_example diff --git a/docs/examples/cellular.rst b/docs/examples/cellular.rst new file mode 100644 index 000000000..27ae45942 --- /dev/null +++ b/docs/examples/cellular.rst @@ -0,0 +1,7 @@ +Cellular energy system +---------------------- + +Building your system from smaller cells +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: cellular.cellular diff --git a/docs/examples/custom_constraints.rst b/docs/examples/custom_constraints.rst new file mode 100644 index 000000000..ee7e58195 --- /dev/null +++ b/docs/examples/custom_constraints.rst @@ -0,0 +1,15 @@ +.. _custom_constraints_label: + +Custom constraints +------------------ + +Custom-made shared limit for Flows +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: flexible_modelling.add_constraints + + +Charge-rate depending on state-of-charge +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: flexible_modelling.saturating_storage diff --git a/docs/examples/electrical.lopf.rst b/docs/examples/electrical.lopf.rst new file mode 100644 index 000000000..391f372e7 --- /dev/null +++ b/docs/examples/electrical.lopf.rst @@ -0,0 +1,7 @@ +Linear optimal power flow (lopf) +-------------------------------- + +Three-Bus system +~~~~~~~~~~~~~~~~ + +.. automodule:: electrical.lopf diff --git a/docs/examples/electrical.transshipment.rst b/docs/examples/electrical.transshipment.rst new file mode 100644 index 000000000..52ce8307f --- /dev/null +++ b/docs/examples/electrical.transshipment.rst @@ -0,0 +1,7 @@ +Transshipment +------------- + +Using the link component +~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: electrical.transshipment diff --git a/docs/examples/emission_constraint.rst b/docs/examples/emission_constraint.rst new file mode 100644 index 000000000..1933d3bb1 --- /dev/null +++ b/docs/examples/emission_constraint.rst @@ -0,0 +1,7 @@ +Emission constraint +------------------- + +Limiting CO2 emissions +~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: emission_constraint.emission_constraint diff --git a/docs/examples/excel_reader.rst b/docs/examples/excel_reader.rst new file mode 100644 index 000000000..ee2d6737f --- /dev/null +++ b/docs/examples/excel_reader.rst @@ -0,0 +1,9 @@ +.. _excel_reader_example_label: + +Spreadsheet (Excel) Reader +-------------------------- + +Generating a model from excel +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: excel_reader.dispatch diff --git a/docs/examples/flow_count_limit.rst b/docs/examples/flow_count_limit.rst new file mode 100644 index 000000000..62c3be78d --- /dev/null +++ b/docs/examples/flow_count_limit.rst @@ -0,0 +1,7 @@ +Flow count limit +---------------- + +Limit the maximum number of active flows +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: flow_count_limit.flow_count_limit diff --git a/docs/examples/flow_gradient.rst b/docs/examples/flow_gradient.rst new file mode 100644 index 000000000..ba70d9797 --- /dev/null +++ b/docs/examples/flow_gradient.rst @@ -0,0 +1,7 @@ +Flow gradient +------------- + +Ramping of a power plant +~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: gradient_example.gradient_example diff --git a/docs/examples/index.rst b/docs/examples/index.rst index e64a5dbb4..db44d467b 100644 --- a/docs/examples/index.rst +++ b/docs/examples/index.rst @@ -5,5 +5,29 @@ Examples .. toctree:: :glob: + :maxdepth: 2 - solph.examples* + basic_example.rst + time_index.rst + nametuple.rst + simple_dispatch.rst + cellular.rst + activity_costs.rst + min_max_runtimes.rst + startup_costs.rst + flow_gradient.rst + variable_chp.rst + unbalanced_storage.rst + storage_costs.rst + emission_constraint.rst + flow_count_limit.rst + storage_level_constraint.rst + electrical.transshipment.rst + excel_reader.rst + storage_investment.rst + shared_invest_limit.rst + minimal_investment.rst + invest_nonconvex.rst + offset_converter.rst + electrical.lopf.rst + custom_constraints.rst diff --git a/docs/examples/invest_nonconvex.rst b/docs/examples/invest_nonconvex.rst new file mode 100644 index 000000000..2c3f74c25 --- /dev/null +++ b/docs/examples/invest_nonconvex.rst @@ -0,0 +1,14 @@ +Combination of investment and binary status variable +---------------------------------------------------- + +Different components in common energy system +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. automodule:: invest_nonconvex_flow_examples.house_without_nonconvex_investment + +Same component but different Flows +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. automodule:: invest_nonconvex_flow_examples.house_with_nonconvex_investment + +Same Flow +~~~~~~~~~ +.. automodule:: invest_nonconvex_flow_examples.diesel_genset_nonconvex_investment diff --git a/docs/examples/min_max_runtimes.rst b/docs/examples/min_max_runtimes.rst new file mode 100644 index 000000000..aee5bc0e3 --- /dev/null +++ b/docs/examples/min_max_runtimes.rst @@ -0,0 +1,9 @@ +.. _runtime_limit_example_label: + +Minimal and maximal runtime +--------------------------- + +Constraining uptime and downtime of plants +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: min_max_runtimes.min_max_runtimes diff --git a/docs/examples/minimal_investment.rst b/docs/examples/minimal_investment.rst new file mode 100644 index 000000000..93bafd364 --- /dev/null +++ b/docs/examples/minimal_investment.rst @@ -0,0 +1,7 @@ +Investment with minimal invest +------------------------------ + +Converter with minimum size +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: investment_with_minimal_invest.minimal_invest diff --git a/docs/examples/nametuple.rst b/docs/examples/nametuple.rst new file mode 100644 index 000000000..497891d40 --- /dev/null +++ b/docs/examples/nametuple.rst @@ -0,0 +1,7 @@ +Tuple as label +-------------- + +Using tuples as names for components +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: tuple_as_labels.tuple_as_label diff --git a/docs/examples/offset_converter.rst b/docs/examples/offset_converter.rst new file mode 100644 index 000000000..c08f28728 --- /dev/null +++ b/docs/examples/offset_converter.rst @@ -0,0 +1,7 @@ +Offset Converter +---------------- + +Investement considering part-load efficiency +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: offset_converter_example.offset_diesel_genset_nonconvex_investment diff --git a/docs/examples/shared_invest_limit.rst b/docs/examples/shared_invest_limit.rst new file mode 100644 index 000000000..6395703f3 --- /dev/null +++ b/docs/examples/shared_invest_limit.rst @@ -0,0 +1,7 @@ +Generic Invest limit +-------------------- + +Concurrence for building space +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: generic_invest_limit.example_generic_invest diff --git a/docs/examples/simple_dispatch.rst b/docs/examples/simple_dispatch.rst new file mode 100644 index 000000000..101b82987 --- /dev/null +++ b/docs/examples/simple_dispatch.rst @@ -0,0 +1,7 @@ +Simple heat and power dispatch +------------------------------ + +Linear dispatch optimization +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: simple_dispatch.simple_dispatch diff --git a/docs/examples/solph.examples.rst b/docs/examples/solph.examples.rst deleted file mode 100644 index 917d8c997..000000000 --- a/docs/examples/solph.examples.rst +++ /dev/null @@ -1,137 +0,0 @@ -Basic example -------------- - -.. automodule:: basic_example.basic_example - - -Basic Time Index ----------------- - -.. automodule:: time_index_example.time_index_example - - -Activity costs --------------- - -.. automodule:: activity_costs.activity_costs - - -Balanced and unbalanced storage -------------------------------- - -.. automodule:: storage_balanced_unbalanced.storage - - -Electrical ----------- - -Linear optimal power flow (lopf) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. automodule:: electrical.lopf - -Transshipment -~~~~~~~~~~~~~ - -.. automodule:: electrical.transshipment - - -Emission constraint -------------------- - -.. automodule:: emission_constraint.emission_constraint - - -Flexible modelling ------------------- - -Add constraints -~~~~~~~~~~~~~~~ - -.. automodule:: flexible_modelling.add_constraints - - -Flow count limit ----------------- - -.. automodule:: flow_count_limit.flow_count_limit - - -Flow gradient -------------- - -.. automodule:: gradient_example.gradient_example - - -Generic Invest limit --------------------- - -.. automodule:: generic_invest_limit.example_generic_invest - - -Investment with minimal invest ------------------------------- - -.. automodule:: investment_with_minimal_invest.minimal_invest - - -Minimal and maximal runtime ---------------------------- - -.. automodule:: min_max_runtimes.min_max_runtimes - - -Simple heat and power dispatch ------------------------------- - -.. automodule:: simple_dispatch.simple_dispatch - - -Spreadsheet (Excel) Reader --------------------------- - -.. automodule:: excel_reader.dispatch - - -Start and shutdown costs ------------------------- - -.. automodule:: start_and_shutdown_costs.startup_shutdown - - -Storage investment ------------------- - -Optimize all technologies -~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. automodule:: storage_investment.v1_invest_optimize_all_technologies - - -Optimize only gas and storage -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. automodule:: storage_investment.v2_invest_optimize_only_gas_and_storage - -Optimize only storage with fossil share -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. automodule:: storage_investment.v3_invest_optimize_only_storage_with_fossil_share - -Optimize all technologies with fossil share -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. automodule:: storage_investment.v4_invest_optimize_all_technologies_with_fossil_share - - -Tuple as label --------------- - -.. automodule:: tuple_as_labels.tuple_as_label - - -Variable CHP ------------- - -.. automodule:: variable_chp.variable_chp - diff --git a/docs/examples/startup_costs.rst b/docs/examples/startup_costs.rst new file mode 100644 index 000000000..c9503c703 --- /dev/null +++ b/docs/examples/startup_costs.rst @@ -0,0 +1,7 @@ +Start and shutdown costs +------------------------ + +Costs for change in operational status +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: start_and_shutdown_costs.startup_shutdown diff --git a/docs/examples/storage_costs.rst b/docs/examples/storage_costs.rst new file mode 100644 index 000000000..55ce42087 --- /dev/null +++ b/docs/examples/storage_costs.rst @@ -0,0 +1,7 @@ +Storage costs +------------- + +Costs by state of charge +~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: storage_costs.storage_costs diff --git a/docs/examples/storage_investment.rst b/docs/examples/storage_investment.rst new file mode 100644 index 000000000..2b22b60c8 --- /dev/null +++ b/docs/examples/storage_investment.rst @@ -0,0 +1,23 @@ +Storage investment +------------------ + +Optimize all technologies +~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: storage_investment.v1_invest_optimize_all_technologies + + +Optimize only gas and storage +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: storage_investment.v2_invest_optimize_only_gas_and_storage + +Optimize only storage with fossil share +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: storage_investment.v3_invest_optimize_only_storage_with_fossil_share + +Optimize all technologies with fossil share +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: storage_investment.v4_invest_optimize_all_technologies_with_fossil_share diff --git a/docs/examples/storage_level_constraint.rst b/docs/examples/storage_level_constraint.rst new file mode 100644 index 000000000..31082b567 --- /dev/null +++ b/docs/examples/storage_level_constraint.rst @@ -0,0 +1,7 @@ +Storage level constraint +------------------------ + +Constrain inflows and outflows to storage level +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: storage_level_constraint.storage_level_constraint diff --git a/docs/examples/time_index.rst b/docs/examples/time_index.rst new file mode 100644 index 000000000..95a7da6f7 --- /dev/null +++ b/docs/examples/time_index.rst @@ -0,0 +1,12 @@ +Time Index +---------- + +Basic time index +~~~~~~~~~~~~~~~~ + +.. automodule:: time_index_example.simple_time_step_example + +Non-equidistant time steps +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: time_index_example.non_equidistant_time_step_example diff --git a/docs/examples/unbalanced_storage.rst b/docs/examples/unbalanced_storage.rst new file mode 100644 index 000000000..0215ca892 --- /dev/null +++ b/docs/examples/unbalanced_storage.rst @@ -0,0 +1,7 @@ +Balanced and unbalanced storage +------------------------------- + +Cyclic storage behavior +~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: storage_balanced_unbalanced.storage diff --git a/docs/examples/variable_chp.rst b/docs/examples/variable_chp.rst new file mode 100644 index 000000000..082c2bd33 --- /dev/null +++ b/docs/examples/variable_chp.rst @@ -0,0 +1,7 @@ +Variable CHP +------------ + +Modeling different types of CHP plants +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. automodule:: variable_chp.variable_chp diff --git a/docs/index.rst b/docs/index.rst index 64537786a..7e9bc0820 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,9 +3,9 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -================================= -Welcome to oemof's documentation! -================================= +======================================= +Welcome to oemof.solph's documentation! +======================================= .. toctree:: :maxdepth: 3 diff --git a/docs/reference/oemof.solph.components.rst b/docs/reference/oemof.solph.components.rst index 74ad176fb..d809fad02 100644 --- a/docs/reference/oemof.solph.components.rst +++ b/docs/reference/oemof.solph.components.rst @@ -17,10 +17,10 @@ Source :undoc-members: :show-inheritance: -Transformer ------------ +Converter +--------- -.. automodule:: oemof.solph.components._transformer +.. automodule:: oemof.solph.components._converter :members: :undoc-members: :show-inheritance: @@ -49,10 +49,18 @@ GenericStorage :undoc-members: :show-inheritance: -OffsetTransformer ------------------ +OffsetConverter +--------------- -.. automodule:: oemof.solph.components._offset_transformer +.. automodule:: oemof.solph.components._offset_converter + :members: + :undoc-members: + :show-inheritance: + +Link +---- + +.. automodule:: oemof.solph.components._link :members: :undoc-members: :show-inheritance: @@ -73,18 +81,9 @@ experimental.GenericCAES :undoc-members: :show-inheritance: -experimental.Link ------------------ - -.. automodule:: oemof.solph.components.experimental._link - :members: - :undoc-members: - :show-inheritance: - -experimental.PiecewiseLinearTransformer ---------------------------------------- - -.. automodule:: oemof.solph.components.experimental._piecewise_linear_transformer +experimental.PiecewiseLinearConverter +------------------------------------- +.. automodule:: oemof.solph.components.experimental._piecewise_linear_converter :members: :undoc-members: :show-inheritance: diff --git a/docs/reference/oemof.solph.constraints.rst b/docs/reference/oemof.solph.constraints.rst index b84d6a101..2658cf79e 100644 --- a/docs/reference/oemof.solph.constraints.rst +++ b/docs/reference/oemof.solph.constraints.rst @@ -2,6 +2,6 @@ oemof.solph.constraints ----------------------- .. automodule:: oemof.solph.constraints - :members: equate_variables, equate_flows, limit_active_flow_count, limit_active_flow_count_by_keyword, emission_limit, generic_integral_limit, additional_investment_flow_limit, investment_limit, shared_limit + :members: equate_variables, equate_flows, limit_active_flow_count, limit_active_flow_count_by_keyword, emission_limit, generic_integral_limit, additional_investment_flow_limit, investment_limit, shared_limit, storage_level_constraint :undoc-members: :show-inheritance: diff --git a/docs/requirements.txt b/docs/requirements.txt index dde8ed384..5937633e1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,14 @@ -sphinx>=1.3 +sphinx>=1.3, < 7 sphinx-rtd-theme +sphinx-copybutton +sphinx-design setuptools matplotlib +blinker +dill +numpy +pandas >= 1.5.3 +pyomo >= 6.6.0, < 7.0 +networkx +oemof.tools >= 0.4.2 +oemof.network >= 0.5.0a1 diff --git a/docs/usage.rst b/docs/usage.rst index 03c923c92..32b8e3741 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -6,11 +6,11 @@ User's guide ~~~~~~~~~~~~ -Solph is an oemof-package, designed to create and solve linear or mixed-integer linear optimization problems. The package is based on pyomo. To create an energy system model generic and specific components are available. To get started with solph, checkout the examples in the :ref:`solph_examples_label` section. +Solph is an oemof-package, designed to create and solve linear or mixed-integer linear optimization problems. The package is based on pyomo. To create an energy system model generic and specific components are available. To get started with solph, checkout the examples in the :ref:`examples_label` section. This User's guide provides a user-friendly introduction into oemof-solph, which includes small examples and nice illustrations. -However, the functionality of oemof-solph go beyond the content of this User's guide section. +However, the functionalities of oemof-solph go beyond the content of this User's guide section. So, if you want to know all details of a certain component or a function, please go the :ref:`api_reference_label`. There, you will find a detailed and complete description of all oemof-solph modules. @@ -24,10 +24,12 @@ a detailed and complete description of all oemof-solph modules. How can I use solph? -------------------- -To use solph you have to install oemof and at least one solver (see :ref:`installation_label`), which can be used together with pyomo (e.g. CBC, GLPK, Gurobi, Cplex). See the `pyomo installation guide `_ for all supported solver. -You can test it by executing one of the existing examples (see :ref:`solph_examples_label`, or directly `oemof's example repository `__). Be aware that the examples require the CBC solver but you can change the solver name in the example files to your solver. +To use solph you have to install oemof.solph and at least one solver (see :ref:`installation_label`), which can be used together with pyomo (e.g. CBC, GLPK, Gurobi, Cplex). See the `pyomo installation guide `_ for all supported solvers. +You can test it by executing one of the existing examples (see :ref:`examples_label`). +Be aware that the examples require the CBC solver but you can change the solver name in the example files to your +solver. -Once the example work you are close to your first energy model. +Once the examples work you are close to your first energy model. Handling of Warnings @@ -35,7 +37,7 @@ Handling of Warnings The solph library is designed to be as generic as possible to make it possible to use it in different use cases. This concept makes it difficult to raise -Error or Warnings because sometimes untypical combinations of parameters are +Errors or Warnings because sometimes untypical combinations of parameters are allowed even though they might be wrong in over 99% of the use cases. Therefore, a SuspiciousUsageWarning was introduced. This warning will warn you @@ -49,7 +51,7 @@ information. Set up an energy system ^^^^^^^^^^^^^^^^^^^^^^^ -In most cases an EnergySystem object is defined when we start to build up an energy system model. The EnergySystem object will be the main container for the model. +In most cases an EnergySystem object is defined when we start to build up an energy system model. The EnergySystem object will be the main container for the model's elements. The model time is defined by the number of intervals and the length of intervals. The length of each interval does not have to be the same. This can be defined in two ways: @@ -88,7 +90,7 @@ Now you can start to add the components of the network. Add components to the energy system ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -After defining an instance of the EnergySystem class you have to add all nodes you define in the following to your EnergySystem. +After defining an instance of the EnergySystem class, in the following you have to add all nodes you define to your EnergySystem. Basically, there are two types of *nodes* - *components* and *buses*. Every Component has to be connected with one or more *buses*. The connection between a *component* and a *bus* is the *flow*. @@ -133,7 +135,7 @@ Therefore it is also possible to add lists or dictionaries with components but y Bus +++ -All flows into and out of a *bus* are balanced. Therefore an instance of the Bus class represents a grid or network without losses. To define an instance of a Bus only a unique label is necessary. If you do not set a label a random label is used but this makes it difficult to get the results later on. +All flows into and out of a *bus* are balanced (by default). Therefore an instance of the Bus class represents a grid or network without losses. To define an instance of a Bus only a unique label is necessary. If you do not set a label a random label is used but this makes it difficult to get the results later on. To make it easier to connect the bus to a component you can optionally assign a variable for later use. @@ -142,28 +144,28 @@ To make it easier to connect the bus to a component you can optionally assign a solph.buses.Bus(label='natural_gas') electricity_bus = solph.buses.Bus(label='electricity') -.. note:: See the :py:class:`~oemof.solph.network.bus.Bus` class for all parameters and the mathematical background. +.. note:: See the :py:class:`~oemof.solph.buses._bus.Bus` class for all parameters and the mathematical background. Flow ++++ -The flow class has to be used to connect. An instance of the Flow class is normally used in combination with the definition of a component. +The flow class has to be used to connect nodes and buses. An instance of the Flow class is normally used in combination with the definition of a component. A Flow can be limited by upper and lower bounds (constant or time-dependent) or by summarised limits. -For all parameters see the API documentation of the :py:class:`~oemof.solph.network.flow.Flow` class or the examples of the nodes below. A basic flow can be defined without any parameter. +For all parameters see the API documentation of the :py:class:`~oemof.solph.flows._flow.Flow` class or the examples of the nodes below. A basic flow can be defined without any parameter. .. code-block:: python solph.flows.Flow() -Oemof has different types of *flows* but you should be aware that you cannot connect every *flow* type with every *component*. +oemof.solph has different types of *flows* but you should be aware that you cannot connect every *flow* type with every *component*. -.. note:: See the :py:class:`~oemof.solph.network.flow.Flow` class for all parameters and the mathematical background. +.. note:: See the :py:class:`~oemof.solph.flows._flow.Flow` class for all parameters and the mathematical background. Components ++++++++++ -Components can be classified into three categories. Basic components, detailed components, and experimental components. The experimental section was created to lower the entry barrier for new components. Be aware that these components might not be properly documented or even sometimes do not even work as intended. Let us know if you have used and tested these components. This is the first step to remove the experimental disclaimer. +Components are divided in two categories. Well-tested components (solph.components) and experimental components (solph.components.experimental). The experimental section was created to lower the entry barrier for new components. Be aware that these components might not be properly documented or even sometimes do not even work as intended. Let us know if you have successfully used and tested these components. This is the first step to move them to the regular components section. See :ref:`oemof_solph_components_label` for a list of all components. @@ -175,11 +177,14 @@ Optimise your energy system The typical optimisation of an energy system in solph is the dispatch optimisation, which means that the use of the sources is optimised to satisfy the demand at least costs. Therefore, variable cost can be defined for all components. The cost for gas should be defined in the gas source while the variable costs of the gas power plant are caused by operating material. +The actual fuel cost in turn is calculated in the framework itself considering the efficiency of the power plant. You can deviate from this scheme but you should keep it consistent to make it understandable for others. Costs do not have to be monetary costs but could be emissions or other variable units. -Furthermore, it is possible to optimise the capacity of different components (see :ref:`investment_mode_label`). +Furthermore, it is possible to optimise the capacity of different components using the investment mode (see :ref:`investment_mode_label`). + +Since v0.5.1, there also is the possibility to have multi-period (i.e. dynamic) investments over longer-time horizon which is in experimental state (see :ref:`multi_period_mode_label`). .. code-block:: python @@ -202,7 +207,7 @@ If you want to analyse the lp-file to see all equations and bounds you can write Analysing your results ^^^^^^^^^^^^^^^^^^^^^^ -If you want to analyse your results, you should first dump your EnergySystem instance, otherwise you have to run the simulation again. +If you want to analyse your results, you should first dump your EnergySystem instance to permanently store results. Otherwise you would have to run the simulation again. .. code-block:: python @@ -243,7 +248,7 @@ Solph components * :ref:`oemof_solph_components_sink_label` * :ref:`oemof_solph_components_source_label` - * :ref:`oemof_solph_components_transformer_label` + * :ref:`oemof_solph_components_converter_label` * :ref:`oemof_solph_components_extraction_turbine_chp_label` * :ref:`oemof_solph_components_generic_caes_label` * :ref:`oemof_solph_components_generic_chp_label` @@ -303,23 +308,23 @@ The *nominal_value* sets the installed capacity. .. note:: The Source class is only a plug and provides no additional constraints or variables. -.. _oemof_solph_components_transformer_label: +.. _oemof_solph_components_converter_label: -Transformer (basic) -^^^^^^^^^^^^^^^^^^^ +Converter (basic) +^^^^^^^^^^^^^^^^^ -An instance of the Transformer class can represent a node with multiple input and output flows such as a power plant, a transport line or any kind of a transforming process as electrolysis, a cooling device or a heat pump. +An instance of the Converter class can represent a node with multiple input and output flows such as a power plant, a transport line or any kind of a transforming process as electrolysis, a cooling device or a heat pump. The efficiency has to be constant within one time step to get a linear transformation. You can define a different efficiency for every time step (e.g. the thermal powerplant efficiency according to the ambient temperature) but this series has to be predefined and cannot be changed within the optimisation. -A condensing power plant can be defined by a transformer with one input (fuel) and one output (electricity). +A condensing power plant can be defined by a converter with one input (fuel) and one output (electricity). .. code-block:: python b_gas = solph.buses.Bus(label='natural_gas') b_el = solph.buses.Bus(label='electricity') - solph.components.Transformer( + solph.components.Converter( label="pp_gas", inputs={bgas: solph.flows.Flow()}, outputs={b_el: solph.flows.Flow(nominal_value=10e10)}, @@ -333,7 +338,7 @@ A CHP power plant would be defined in the same manner but with two outputs: b_el = solph.buses.Bus(label='electricity') b_th = solph.buses.Bus(label='heat') - solph.components.Transformer( + solph.components.Converter( label='pp_chp', inputs={b_gas: Flow()}, outputs={b_el: Flow(nominal_value=30), @@ -349,7 +354,7 @@ A CHP power plant with 70% coal and 30% natural gas can be defined with two inpu b_el = solph.buses.Bus(label='electricity') b_th = solph.buses.Bus(label='heat') - solph.components.Transformer( + solph.components.Converter( label='pp_chp', inputs={b_gas: Flow(), b_coal: Flow()}, outputs={b_el: Flow(nominal_value=30), @@ -369,23 +374,26 @@ A heat pump would be defined in the same manner. New buses are defined to make t # a scalar or a sequence. cop = 3 - solph.components.Transformer( + solph.components.Converter( label='heat_pump', inputs={b_el: Flow(), b_th_low: Flow()}, outputs={b_th_high: Flow()}, conversion_factors={b_el: 1/cop, b_th_low: (cop-1)/cop}) -If the low-temperature reservoir is nearly infinite (ambient air heat pump) the low temperature bus is not needed and, therefore, a Transformer with one input is sufficient. +If the low-temperature reservoir is nearly infinite (ambient air heat pump) the +low temperature bus is not needed and, therefore, a Converter with one input +is sufficient. -.. note:: See the :py:class:`~oemof.solph.network.transformer.Transformer` class for all parameters and the mathematical background. +.. note:: See the :py:class:`~oemof.solph.components.converter.Converter` class for all parameters and the mathematical background. .. _oemof_solph_components_extraction_turbine_chp_label: ExtractionTurbineCHP (component) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The :py:class:`~oemof.solph.components._extraction_turbine_chp.ExtractionTurbineCHP` inherits from the :ref:`oemof_solph_components_transformer_label` class. Like the name indicates, +The :py:class:`~oemof.solph.components._extraction_turbine_chp.ExtractionTurbineCHP` +inherits from the :ref:`oemof_solph_components_converter_label` class. Like the name indicates, the application example for the component is a flexible combined heat and power (chp) plant. Of course, an instance of this class can represent also another component with one input and two output flows and a flexible ratio between @@ -396,7 +404,7 @@ these flows, with the following constraints: :end-before: """ These constraints are applied in addition to those of a standard -:class:`~oemof.solph.network.transformer.Transformer`. The constraints limit the range of +:class:`~oemof.solph.components.Converter`. The constraints limit the range of the possible operation points, like the following picture shows. For a certain flow of fuel, there is a line of operation points, whose slope is defined by the power loss factor :math:`\beta` (in some contexts also referred to as @@ -412,7 +420,7 @@ For now, :py:class:`~oemof.solph.components._extraction_turbine_chp.ExtractionTu have one input and two output flows. The class allows the definition of a different efficiency for every time step that can be passed as a series of parameters that are fixed before the optimisation. In contrast to the -:py:class:`~oemof.solph.network.transformer.Transformer`, a main flow and a tapped flow is +:py:class:`~oemof.solph.components.Converter`, a main flow and a tapped flow is defined. For the main flow you can define a separate conversion factor that applies when the second flow is zero (*`conversion_factor_full_condensation`*). @@ -430,8 +438,8 @@ of the two flows is the main flow. In the example above, the flow to the Bus *'b_el'* is the main flow and the flow to the Bus *'b_th'* is the tapped flow. The following plot shows how the variable chp (right) schedules it's electrical and thermal power production in contrast to a fixed chp (left). The plot is the -output of an example in the `example repository -`_. +output of an example in the `example directory +`_. .. image:: _files/variable_chp_plot.svg :scale: 10 % @@ -441,10 +449,10 @@ output of an example in the `example repository .. note:: See the :py:class:`~oemof.solph.components._extraction_turbine_chp.ExtractionTurbineCHP` class for all parameters and the mathematical background. -.. _oemof_solph_components_generic_caes_label: +.. _oemof_solph_components_generic_chp_label: GenericCHP (component) -^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^ With the GenericCHP class it is possible to model different types of CHP plants (combined cycle extraction turbines, back pressure turbines and motoric CHP), which use different ranges of operation, as shown in the figure below. @@ -606,7 +614,7 @@ By calling: you get the results of the scalar values of your storage, e.g. the initial storage content before time step zero (``init_content``). -For more information see the definition of the :py:class:`~oemof.solph.components._generic_storage.GenericStorage` class or check the `example repository of oemof `_. +For more information see the definition of the :py:class:`~oemof.solph.components._generic_storage.GenericStorage` class or check the :ref:`examples_label`. Using an investment object with the GenericStorage component @@ -660,12 +668,23 @@ The following example describes a battery with flows coupled to the capacity of .. note:: See the :py:class:`~oemof.solph.components._generic_storage.GenericStorage` class for all parameters and the mathematical background. -OffsetTransformer (component) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. _oemof_solph_custom_link_label: + +Link +^^^^ + +The `Link` allows to model connections between two busses, e.g. modeling the transshipment of electric energy between two regions. -The `OffsetTransformer` object makes it possible to create a Transformer with different efficiencies in part load condition. +.. note:: See the :py:class:`~oemof.solph.components.experimental._link.Link` class for all parameters and the mathematical background. + + + +OffsetConverter (component) +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The `OffsetConverter` object makes it possible to create a Converter with different efficiencies in part load condition. For this object it is necessary to define the inflow as a nonconvex flow and to set a minimum load. -The following example illustrates how to define an OffsetTransformer for given information for the output: +The following example illustrates how to define an OffsetConverter for given information for the output: .. code-block:: python @@ -682,8 +701,8 @@ The following example illustrates how to define an OffsetTransformer for given i c1 = (P_out_max-P_out_min)/(P_in_max-P_in_min) c0 = P_out_max - c1*P_in_max - # define OffsetTransformer - solph.custom.OffsetTransformer( + # define OffsetConverter + solph.components.OffsetConverter( label='boiler', inputs={bfuel: solph.flows.Flow( nominal_value=P_in_max, @@ -697,21 +716,21 @@ This example represents a boiler, which is supplied by fuel and generates heat. It is assumed that the nominal thermal power of the boiler (output power) is 100 (kW) and the efficiency at nominal power is 80 %. The boiler cannot operate under 20 % of nominal power, in this case 20 (kW) and the efficiency at that part load is 50 %. Note that the nonconvex flow has to be defined for the input flow. -By using the OffsetTransformer a linear relation of in- and output power with a power dependent efficiency is generated. +By using the OffsetConverter a linear relation of in- and output power with a power dependent efficiency is generated. The following figures illustrate the relations: -.. image:: _files/OffsetTransformer_power_relation.svg +.. image:: _files/OffsetConverter_power_relation.svg :width: 70 % - :alt: OffsetTransformer_power_relation.svg + :alt: OffsetConverter_power_relation.svg :align: center -Now, it becomes clear, why this object has been named `OffsetTransformer`. The +Now, it becomes clear, why this object has been named `OffsetConverter`. The linear equation of in- and outflow does not hit the origin, but is offset. By multiplying the Offset :math:`C_{0}` with the binary status variable of the nonconvex flow, the origin (0, 0) becomes part of the solution space and the boiler is allowed to switch off: -.. include:: ../src/oemof/solph/components/_offset_transformer.py - :start-after: _OffsetTransformer-equations: +.. include:: ../src/oemof/solph/components/_offset_converter.py + :start-after: _OffsetConverter-equations: :end-before: """ The following figures shows the efficiency dependent on the output power, @@ -721,14 +740,14 @@ which results in a nonlinear relation: \eta = C_1 \cdot P_{out}(t) / (P_{out}(t) - C_0) -.. image:: _files/OffsetTransformer_efficiency.svg +.. image:: _files/OffsetConverter_efficiency.svg :width: 70 % - :alt: OffsetTransformer_efficiency.svg + :alt: OffsetConverter_efficiency.svg :align: center The parameters :math:`C_{0}` and :math:`C_{1}` can be given by scalars or by series in order to define a different efficiency equation for every timestep. -.. note:: See the :py:class:`~oemof.solph.components._offset_transformer.OffsetTransformer` class for all parameters and the mathematical background. +.. note:: See the :py:class:`~oemof.solph.components._offset_converter.OffsetConverter` class for all parameters and the mathematical background. .. _oemof_solph_custom_electrical_line_label: @@ -741,7 +760,7 @@ Electrical line. .. note:: See the :py:class:`~oemof.solph.flows.experimental._electrical_line.ElectricalLine` class for all parameters and the mathematical background. -.. _oemof_solph_custom_link_label: +.. _oemof_solph_components_generic_caes_label: GenericCAES (experimental) ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -755,19 +774,9 @@ The following constraints describe the CAES: .. note:: See the :py:class:`~oemof.solph.components.experimental._generic_caes.GenericCAES` class for all parameters and the mathematical background. -.. _oemof_solph_components_generic_chp_label: - -Link (experimental) -^^^^^^^^^^^^^^^^^^^ - -Link. - -.. note:: See the :py:class:`~oemof.solph.components.experimental._link.Link` class for all parameters and the mathematical background. - .. _oemof_solph_custom_sinkdsm_label: - SinkDSM (experimental) ^^^^^^^^^^^^^^^^^^^^^^ @@ -868,21 +877,29 @@ Investment optimisation ------------------------- As described in :ref:`oemof_solph_optimise_es_label` the typical way to optimise an energy system is the dispatch optimisation based on marginal costs. Solph also provides a combined dispatch and investment optimisation. -Based on investment costs you can compare the usage of existing components against building up new capacity. -The annual savings by building up new capacity must therefore compensate the annuity of the investment costs (the time period does not have to be one year but depends on your Datetime index). +This standard investment mode is limited to one period where all investments happen at the start of the optimization time frame. If you want to optimize longer-term horizons and allow investments at the beginning +of each of multiple periods, also taking into account units lifetimes, you can try the :ref:`multi_period_mode_label`. Please be aware that the multi-period feature is experimental. If you experience any bugs or unexpected +behaviour, please report them. + +In the standard investment mode, based on investment costs you can compare the usage of existing components against building up new capacity. +The annual savings by building up new capacity must therefore compensate the annuity of the investment costs (the time period does not have to be one year, but depends on your Datetime index). See the API of the :py:class:`~oemof.solph.options.Investment` class to see all possible parameters. -Basically, an instance of the investment class can be added to a Flow or a -Storage. All parameters that usually refer to the *nominal_value/capacity* will +Basically, an instance of the Investment class can be added to a Flow, a +Storage or a DSM Sink. All parameters that usually refer to the *nominal_value/capacity* will now refer to the investment variables and existing capacity. It is also possible to set a maximum limit for the capacity that can be build. If existing capacity is considered for a component with investment mode enabled, -the *ep_costs* still apply only to the newly built capacity. +the *ep_costs* still apply only to the newly built capacity, i.e. the existing capacity +comes at no costs. The investment object can be used in Flows and some components. See the :ref:`oemof_solph_components_label` section for detailed information of each -component. +component. Besides the flows, it can be invested into + +* :ref:`oemof_solph_components_generic_storage_label` and +* :ref:`oemof_solph_custom_sinkdsm_label` For example if you want to find out what would be the optimal capacity of a wind power plant to decrease the costs of an existing energy system, you can define @@ -909,7 +926,7 @@ allow for 30,000 kW of new installations and formulate as follows. maximum=30000, existing=20000))}) -The periodical costs (*ep_costs*) are typically calculated as follows: +The periodical costs (*ep_costs*) are typically calculated as annuities, i.e. as follows: .. code-block:: python @@ -932,12 +949,12 @@ nominal power, or, the marginal costs of bigger plants decrease. Therefore, you can use the parameter *nonconvex* and *offset* of the investment class. Both, work with investment in flows and storages. Here is an -example of an transformer: +example of a converter: .. code-block:: python - trafo = solph.components.Transformer( - label='transformer_nonconvex', + trafo = solph.components.Converter( + label='converter_nonconvex', inputs={bus_0: solph.flows.Flow()}, outputs={bus_1: solph.flows.Flow( investment=solph.Investment( @@ -949,7 +966,7 @@ example of an transformer: conversion_factors={bus_1: 0.9}) In this examples, it is assumed, that independent of the size of the -transformer, there are always fix investment costs of 400 (€). +converter, there are always fix investment costs of 400 (€). The minimum investment size is 20 (kW) and the costs per installed unit are 4 (€/kW). With this option, you could theoretically approximate every cost function you want. But @@ -967,7 +984,7 @@ the *ep_costs* value: :align: center In case of a convex investment (which is the default setting -`nonconvex=Flase`), the *minimum* attribute leads to a forced investment, +`nonconvex=False`), the *minimum* attribute leads to a forced investment, whereas in the nonconvex case, the investment can become zero as well. The calculation of the specific costs per kilowatt installed capacity results @@ -985,6 +1002,402 @@ mathematical background, like variables and constraints, which are used. .. note:: At the moment the investment class is not compatible with the MIP classes :py:class:`~oemof.solph.options.NonConvex`. +.. _multi_period_mode_label: + +Using the multi-period (investment) mode (experimental) +------------------------------------------------------- +Sometimes you might be interested in how energy systems could evolve in the longer-term, e.g. until 2045 or 2050 to meet some +carbon neutrality and climate protection or RES and energy efficiency targets. + +While in principle, you could try to model this in oemof.solph using the standard investment mode described above (see :ref:`investment_mode_label`), +you would make the implicit assumption that your entire system is built at the start of your optimization and doesn't change over time. +To address this shortcoming, the multi-period (investment) feature has been introduced. Be aware that it is still experimental. +So feel free to report any bugs or unexpected behaviour if you come across them. + +While in principle, you can define a dispatch-only multi-period system, this doesn't make much sense. The power of the multi-period feature +only unfolds if you look at long-term investments. Let's see how. + +First, you start by defining your energy system as you might have done before, but you + +* choose a longer-term time horizon (spanning multiple years, i.e. multiple periods) and +* explicitly define the `periods` attribute of your energy system which maps time steps to the simulated period. + +.. code-block:: python + + import pandas as pd + import oemof.solph as solph + + my_index = pd.date_range('1/1/2013', periods=17520, freq='H') + periods = { + 0: pd.date_range('1/1/2013', periods=8760, freq='H'), + 1: pd.date_range('1/1/2014', periods=8760, freq='H'), + } + my_energysystem = solph.EnergySystem(timeindex=my_index, periods=periods) + +If you want to use a multi-period model you have define periods of your energy system explicitly. This way, +you are forced to critically think, e.g. about handling leap years, and take some design decisions. It is possible to +define periods with different lengths, but remember that decommissioning of components is possible only at the +beginning of each period. This means that if the life of a component is just a little longer, it will remain for the +entire next period. This can have a particularly large impact the longer your periods are. + +To assist you, here is a plain python snippet that includes leap years which you can just copy +and adjust to your needs: + +.. code-block:: python + + def determine_periods(datetimeindex): + """Explicitly define and return periods of the energy system + + Leap years have 8784 hourly time steps, regular years 8760. + + Parameters + ---------- + datetimeindex : pd.date_range + DatetimeIndex of the model comprising all time steps + + Returns + ------- + periods : dict + pd.date_ranges defining the time stamps for the respective period, + starting with period 0 + """ + years = sorted(list(set(getattr(datetimeindex, "year")))) + periods = {} + filter_series = datetimeindex.to_series() + for number, year in enumerate(years): + start = filter_series.loc[filter_series.index.year == year].min() + end = filter_series.loc[filter_series.index.year == year].max() + periods[number] = pd.date_range(start, end, freq=datetimeindex.freq) + + return periods + +So if you want to use this, the above would simplify to: + +.. code-block:: python + + import pandas as pd + import oemof.solph as solph + + # Define your method (or import it from somewhere else) + def determine_periods(datetimeindex): + ... + + my_index = pd.date_range('1/1/2013', periods=17520, freq='H') + periods = determine_periods(my_index) # Make use of method + my_energysystem = solph.EnergySystem(timeindex=my_index, periods=periods) + + +Then you add all the *components* and *buses* to your energy system, just as you are used to with, but with few additions. + +.. code-block:: python + + hydrogen_bus = solph.buses.Bus(label="hydrogen") + coal_bus = solph.buses.Bus(label="coal") + electricity_bus = solph.buses.Bus(label="electricity") + + hydrogen_source = solph.components.Source( + label="green_hydrogen", + outputs={ + hydrogen_bus: solph.flows.Flow( + variable_costs=[25] * 8760 + [30] * 8760 + ) + }, + ) + + coal_source = solph.components.Source( + label="hardcoal", + outputs={ + coal_bus: solph.flows.Flow(variable_costs=[20] * 8760 + [24] * 8760) + }, + ) + + electrical_sink = solph.components.Sink( + label="electricity_demand", + inputs={ + electricity_bus: solph.flows.Flow( + nominal_value=1000, fix=[0.8] * len(my_index) + ) + }, + ) + +So defining buses is the same as for standard models. Also defining components that do not have any investments associated with +them or any lifetime limitations is the same. + +Now if you want to have components that can be invested into, you use the investment option, just as in :ref:`investment_mode_label`, +but with a few minor additions and modifications in the investment object itself which you specify by additional attributes: + +* You have to specify a `lifetime` attribute. This is the components assumed technical lifetime in years. If it is 20 years, + the model invests into it and your simulation has a 30 years horizon, the plant will be decommissioned. Now the model is + free to reinvest or choose another option to fill up the missing capacity. +* You can define an initial `age` if you have `existing` capacity. If you do not specify anything, the default value 0 will be used, + meaning your `existing` capacity has just been newly invested. +* You can define an `interest_rate` that the investor you model has, i.e. the return he desires expressed as the weighted + average osts of capital (wacc) and used for calculating annuities in the model itself. +* You also can define `fixed_costs`, i.e. costs that occur every period independent of the plants usage. + +Here is an example + +.. code-block:: python + + hydrogen_power_plant = solph.components.Converter( + label="hydrogen_pp", + inputs={hydrogen_bus: solph.flows.Flow()}, + outputs={ + electricity_bus: solph.flows.Flow( + investment=solph.Investment( + maximum=1000, + ep_costs=1e6, + lifetime=30, + interest_rate=0.06, + fixed_costs=100, + ), + variable_costs=3, + ) + }, + conversion_factors={electricity_bus: 0.6}, + ) + +.. warning:: + + The `ep_costs` attribute for investments is used in a different way in a multi-period model. Instead + of periodical costs, it depicts (nominal or real) investment expenses, so actual Euros you have to pay per kW or MW + (or whatever power or energy unit) installed. Also, you can depict a change in investment expenses over time, + so instead of providing a scalar value, you could define a list with investment expenses with one value for each period modelled. + + Annuities are calculated within the model. You do not have to do that. + Also the model takes care of discounting future expenses / cashflows. + +Below is what it would look like if you altered `ep_costs` and `fixed_costs` per period. This can be done by simply +providing a list. Note that the length of the list must equal the number of periods of your model. +This would mean that for investments in the particular period, these values would be the one that are applied over their lifetime. + +.. code-block:: python + + hydrogen_power_plant = solph.components.Converter( + label="hydrogen_pp", + inputs={hydrogen_bus: solph.flows.Flow()}, + outputs={ + electricity_bus: solph.flows.Flow( + investment=solph.Investment( + maximum=1000, + ep_costs=[1e6, 1.1e6], + lifetime=30, + interest_rate=0.06, + fixed_costs=[100, 110], + ), + variable_costs=3, + ) + }, + conversion_factors={electricity_bus: 0.6}, + ) + +For components that is not invested into, you also can specify some additional attributes for their inflows and outflows: + +* You can specify a `lifetime` attribute. This can be used to depict existing plants going offline when reaching their lifetime. +* You can define an initial `age`. Also, this can be used for existing plants. +* You also can define `fixed_costs`, i.e. costs that occur every period independent of the plants usage. How they are handled + depends on whether the flow has a limited or an unlimited lifetime. + +.. code-block:: python + + coal_power_plant = solph.components.Converter( + label="existing_coal_pp", + inputs={coal_bus: solph.flows.Flow()}, + outputs={ + electricity_bus: solph.flows.Flow( + nominal_value=600, + max=1, + min=0.4, + lifetime=50, + age=46, + fixed_costs=100, + variable_costs=3, + ) + }, + conversion_factors={electricity_bus: 0.36}, + ) + +To solve our model and retrieve results, you basically perform the same operations as for standard models. +So it works like this: + +.. code-block:: python + + my_energysystem.add( + hydrogen_bus, + coal_bus, + electricity_bus, + hydrogen_source, + coal_source, + electrical_sink, + hydrogen_power_plant, + coal_power_plant, + ) + + om = solph.Model(my_energysystem) + om.solve(solver="cbc", solve_kwargs={"tee": True}) + + # Obtain results + results = solph.processing.results(om) + hydrogen_results = solph.views.node(results, "hydrogen_pp") + + # Show investment plan for hydrogen power plants + print(hydrogen_results["period_scalars"]) + +The keys in the results dict in a multi-period model are "sequences" and "period_scalars". +So for sequences, it is all the same, while for scalar values, we now have values for each period. + +Besides the `invest` variable, new variables are introduced as well. These are: + +* `total`: The total capacity installed, i.e. how much is actually there in a given period. +* `old`: (Overall) capacity to be decommissioned in a given period. +* `old_end`: Endogenous capacity to be decommissioned in a given period. This is capacity that has been invested into + in the model itself. +* `old_exo`: Exogenous capacity to be decommissioned in a given period. This is capacity that was already existing and + given by the `existing` attribute. + +.. note:: + + * You can specify a `discount_rate` for the model. If you do not do so, 0.02 will be used as a default, corresponding + to sort of a social discount rate. If you work with costs in real terms, discounting is obsolete, so define + `discount_rate = 0` in that case. + * You can specify an `interest_rate` for every investment object. If you do not do so, it will be chosen the same + as the model's `discount_rate`. You could use this default to model a perfect competition administered by some sort of + social planner, but even in a social planner setting, you might want to deviate from the `discount_rate` + value and/or discriminate among technologies with different risk profiles and hence different interest requirements. + * For storage units, the `initial_content` is not allowed combined with multi-period investments. + The storage inflow and outflow are forced to zero until the storage unit is invested into. + * You can specify periods of different lengths, but the frequency of your timeindex needs to be consistent. Also, + you could use the `timeincrement` attribute of the energy system to model different weightings. Be aware that this + has not yet been tested. + * Also please be aware, that periods correspond to years by default. You could also choose + monthly periods, but you would need to be very careful in parameterizing your energy system and your model and also, + this would mean monthly discounting (if applicable) as well as specifying your plants lifetimes in months. + +Modelling cellular energy systems and modularizing energy system models +----------------------------------------------------------------------- + +The cellular approach is a concept proposed by the [VDE-ETG](https://shop.vde.com/en/vde-study-the-cellular-approach). It is +related to smart-grids and multi-microgrid systems but extends both. The idea is to group the components of an energy system +into a hierarchically aggregating structure of cells. For example, the sources, sinks, storages and converters of a household +could be a single cell. Then a group of physically neighboring households could form another cell, consisting of household-cells. +This behaviour can be scaled up. The real game-changer in the cellular approach is the way the cells are operated, which will +not be covered here. Here, we focus on the way such cellular energy systems can be modeled. + +So far, the implementation in solph is just a neat way to group different parts of a larger energy system into cells. However, +the implementation can also be regarded as a precursor for further functionality. Decomposition techniques such +as [Benders](https://en.wikipedia.org/wiki/Benders_decomposition) or +[Dantzig-Wolfe](https://en.wikipedia.org/wiki/Dantzig%E2%80%93Wolfe_decomposition) could be implemented in solph. These methods +are dependent on a special constraint matrix structure, which the cellular modelling approach presented here is helping to obtain. + +Modelling procedure +^^^^^^^^^^^^^^^^^^^ + +Similar to the creation of regular energy systems, the creation of energy cells is the first step in model creation. Essentially, +each energy cell is just an energy system, therefore we use the class :py:class:`oemof.solph.EnergySystem` to create energy cells. + +.. code-block:: python + + from oemof.solph import EnergySystem + + es = EnergySystem( + label="es", timeindex=timeindex, infer_last_interval=False + ) + ec_1 = EnergySystem( + label="ec_1", timeindex=timeindex, infer_last_interval=False + ) + ec_2 = EnergySystem( + label="ec_2", timeindex=timeindex, inver_last_interval=False + ) + +Now we can go on and add components to the energy cells just like we do with regular energy systems. + +.. code-block:: python + + from oemof import solph + + bus_el_es = solph.buses.Bus(label="bus_el_es") + es.add(bus_el_es) + + bus_el_ec_1 = solph.buses.Bus(label="bus_el_ec_1") + sink_el_ec_1 = solph.components.Sink( + label="sink_el_ec_1", + inputs={bus_el_ec_1: flows.Flow(fix=10, nominal_value=1)}, + ) + source_el_ec_1 = solph.components.Source( + label="source_el_ec_1", + outputs={ + bus_el_ec_1: flows.Flow( + max=30, nominal_value=1, variable_costs=10, + ), + }, + ) + ec_1.add(bus_el_ec_1, sink_el_ec_1, source_el_ec_1) + +.. note:: This is just an exemplary piece of code. A (little bit more interesting) working + example can be found in the examples. + +The next step would be to model the connections between cells. Here, we resort to the class +:py:class:`oemof.solph.components.Link`. Each connection Link has two inputs (from the +"parent cell" and the "child cell") and two outputs (to the "parent cell" and the "child +cell"). A connection between the "parent cell" `es` and the "child cell" `ec_1` could look +like this: + +.. code-block:: python + + connector_el_ec_1 = solph.buses.Bus( + label="connector_el_ec_1", + inputs={ + bus_el_es: flows.Flow(), + bus_el_ec_1: flows.Flow(), + }, + outputs={ + bus_el_es: flows.Flow(), + bus_el_ec_1: flows.Flow(), + }, + conversion_factors={ + (bus_el_es, bus_el_ec_1): 0.85, + (bus_el_ec_1, bus_el_es): 0.85 + } + ) + es.add(connector_el_ec_1) + +The `conversion_factors` can be used to model transmission losses. Here, a symmetrical +loss of 15% is assumed. +All connection Links are added to the upmost energy cell. + +.. note:: Note that we do not add the energy cells as components to their parent cells! + Instead, the hierarchical structure is flattened and all connections between the cells + are created as depicted above. + +The last step is to create (and solve) the model. Again, this is fairly similar to the +regular model creation. However, instead of passing just one instance of +:py:class:`oemof.solph.EnergySystem`, a list of energy systems is passed. + +.. warning:: + By convention the first element of the list is assumed to be the upmost energy cell. + The ordering afterwards does not play a role. + +.. note:: The resulting model is monolithic. This means that all components of all energy + cells are actually grouped into one pyomo model. It would, therefore, also be possible + to model all the components in one :py:class:`oemof.solph.EnergySystem` instance and + the results would be identical. + +.. code-block:: python + + cmodel = Model( + energysystem=[es, ec_1, ec_2, ...] + ) + cmodel.solve() + +As pointed out above, the resulting model is monolithic. Nonetheless, this modelling approach +holds some benefits: + +* Better overview through segmentation of the energy system +* (Facilitated) opportunity to model cellular energy systems where the energy exchanged between cells + is of interest +* Segmentation of the energy system is a necessary precursor for distributed optimization via Dantzig-Wolfe + + Mixed Integer (Linear) Problems ------------------------------- @@ -999,7 +1412,7 @@ but the optimal dispatch strategy must be obtained. For this purpose, the class :py:class:`~oemof.solph._options.NonConvex` should be used, as seen in the following example. Note that this flow class's usage is incompatible with the :py:mod:`~oemof.solph.options.Investment` option. This means that, -as stated before, the optimal capacity of the transformer cannot be obtained using the :py:class:`~oemof.solph.flows.NonConvexFlow` +as stated before, the optimal capacity of the converter cannot be obtained using the :py:class:`~oemof.solph.flows.NonConvexFlow` class, and only the optimal dispatch strategy of an existing asset with a given capacity can be optimized here. .. code-block:: python @@ -1008,7 +1421,7 @@ class, and only the optimal dispatch strategy of an existing asset with a given b_el = solph.buses.Bus(label='electricity') b_th = solph.buses.Bus(label='heat') - solph.components.Transformer( + solph.components.Converter( label='pp_chp', inputs={b_gas: solph.flows.Flow()}, outputs={b_el: solph.flows.Flow( @@ -1018,7 +1431,7 @@ class, and only the optimal dispatch strategy of an existing asset with a given b_th: solph.flows.Flow(nominal_value=40)}, conversion_factors={b_el: 0.3, b_th: 0.4}) -The class :py:class:`~oemof.solph.options.NonConvex` for the electrical output of the created LinearTransformer (i.e., CHP) +The class :py:class:`~oemof.solph.options.NonConvex` for the electrical output of the created Converter (i.e., CHP) will create a 'status' variable for the flow. This will be used to model, for example, minimal/maximal power production constraints if the attributes `min`/`max` of the flow are set. It will also be used to include start-up constraints and costs @@ -1037,7 +1450,7 @@ which combines both :py:class:`~oemof.solph._options.Investment` and :py:class:` The new class offers the possibility to perform the investment optimization of an asset considering `min`/`max` values of the flow as fractions of the optimal capacity. Moreover, it obtains the optimal 'status' of the flow during the simulation period. -It must be noted that in a streighforward implementation, a binary variable +It must be noted that in a straighforward implementation, a binary variable representing the 'status' of the flow at each time is multiplied by the 'invest' parameter, which is a continuous variable representing the capacity of the asset being optimized (i.e., :math:`status \times invest`). This nonlinearity is linearised in the @@ -1048,7 +1461,7 @@ This nonlinearity is linearised in the b_diesel = solph.buses.Bus(label='diesel') b_el = solph.buses.Bus(label='electricity') - solph.components.Transformer( + solph.components.Converter( label='diesel_genset', inputs={b_diesel: solph.flows.Flow()}, outputs={ @@ -1112,8 +1525,8 @@ increases the computation time by more than 9 times compared to the Adding additional constraints ----------------------------- -You can add additional constraints to your :py:class:`~oemof.solph.models.Model`. See `flexible_modelling in the example repository -`_ to learn how to do it. +You can add additional constraints to your :py:class:`~oemof.solph.models.Model`. +See :ref:`custom_constraints_label` to learn how to do it. Some predefined additional constraints can be found in the :py:mod:`~oemof.solph.constraints` module. @@ -1148,13 +1561,13 @@ returns a key for the group depending e.g. on node attributes: def constraint_grouping(node): if isinstance(node, Bus) and node.balanced: return blocks.Bus - if isinstance(node, Transformer): - return blocks.Transformer + if isinstance(node, Converter): + return blocks.Converter GROUPINGS = [constraint_grouping] This function can be passed in a list to `groupings` of :class:`oemof.solph.network.energy_system.EnergySystem`. So that we end up with two groups, -one with all Transformers and one with all Buses that are balanced. These +one with all Converters and one with all Buses that are balanced. These groups are simply stored in a dictionary. There are some advanced functionalities to group two connected nodes with their connecting flow and others (see for example: FlowsWithNodes class in the oemof.network package). @@ -1169,7 +1582,7 @@ The idea is to create different sheets within one spreadsheet file for different Once you have create your specific excel reader you can lower the entry barrier for other users. It is some sort of a GUI in form of platform independent spreadsheet software and to make data and models exchangeable in one archive. -See `oemof's example repository `_ for an excel reader example. +See :ref:`excel_reader_example_label` for an excel reader example. .. _oemof_outputlib_label: @@ -1260,7 +1673,7 @@ On the same way you can get a list of all nodes by applying: Probably you will just get storages as nodes, if you have some in your energy system. Note, that just nodes containing decision variables are listed, e.g. a -Source or a Transformer object does not have decision variables. These are in +Source or a Converter object does not have decision variables. These are in the flows from or to the nodes. All items within the results dictionary are dictionaries and have two items @@ -1274,12 +1687,12 @@ with 'scalars' and 'sequences' as keys: print(results[flow]['sequences']) There many options of filtering the flows and nodes as you prefer. -The following will give you all flows which are outputs of transformer: +The following will give you all flows which are outputs of converter: .. code-block:: python - flows_from_transformer = [x for x in flows if isinstance( - x[0], solph.components.Transformer)] + flows_from_converter = [x for x in flows if isinstance( + x[0], solph.components.Converter)] You can filter your flows, if the label of in- or output contains a given string, e.g.: diff --git a/docs/whatsnew/v0-2-0.rst b/docs/whatsnew/v0-2-0.rst index 7b3ba7914..2800e41d3 100644 --- a/docs/whatsnew/v0-2-0.rst +++ b/docs/whatsnew/v0-2-0.rst @@ -5,9 +5,7 @@ API changes #################### * The `NodesFromCSV` has been removed from the code base. An alternative excel - (spreadsheet) reader is provided in the newly created - `excel example in the oemof_examples `_ - repository. + (spreadsheet) reader is provided at :ref:`excel_reader_example_label`. * LinearTransformer and LinearN1Transformer classes are now combined within one Transformer class. The new class has n inputs and n outputs. Please note that the definition of the conversion factors (for N1) has changed. See the new @@ -30,8 +28,7 @@ API changes ` to an `energy system `. This option has been made a bit more feature rich by the way, but see below for more on this. - Also check the - `oemof_examples `_ repository + Also check the :ref:`examples_label` for more information on the usage. * The `fixed_costs` attribute of the `nodes ` has been removed. See @@ -44,14 +41,12 @@ API changes New features #################### -* A new `oemof_examples `_ repository - with some new examples was created. * A new outputlib module has been created to provide a convenient data structure for optimization results and enable quick analyses. All decision variables of a Node are now collected automatically which enables an easier development of custom components. See the revised :ref:`oemof_outputlib_label` documentation for more details or have a look at - the `oemof_examples `_ repository + :ref:`examples_label` for information on the usage. Keep your eyes open, some new functions will come soon that make the processing of the results easier. See the actual pull request or issues for detailed information. @@ -91,13 +86,13 @@ New components Please check your results. Feedback is welcome! * The custom component `Link ` can now be used to model a bidirectional connection within one component. Check out the example in the - `oemof_examples `_ repository. + :ref:`examples_label`. * The component `GenericCHP ` can be used to model different CHP types such as extraction or back-pressure turbines and motoric plants. The component uses a mixed-integer linear formulation and can be adapted to different technical layouts with a high level of detail. Check out the example in the - `oemof_examples `_ repository. + :ref:`examples_label`. * The component `GenericCAES ` can be used to model different concepts of compressed air energy storage. Technical concepts such as diabatic or adiabatic layouts can be modelled at a high level @@ -146,7 +141,7 @@ Other changes they are less a necessary part but more an optional tool . Basic plotting examples that show how to quickly create plots from optimization results can now be found in the - `oemof_examples `_ repository. + :ref:`examples_label`. You can still find the "old" standard plots within the `oemof_visio `_ repository as they are now maintained separately. diff --git a/docs/whatsnew/v0-2-1.rst b/docs/whatsnew/v0-2-1.rst index 7e3a745b9..3a9f6127e 100644 --- a/docs/whatsnew/v0-2-1.rst +++ b/docs/whatsnew/v0-2-1.rst @@ -15,8 +15,7 @@ New features #################### * It is now possible determine minimum up and downtimes for nonconvex flows. - Check the `oemof_examples `_ - repository for an exemplary usage. + Check :ref:`runtime_limit_example_label` for an exemplary usage. * Startup and shutdown costs can now be defined time-dependent. diff --git a/docs/whatsnew/v0-4-4.rst b/docs/whatsnew/v0-4-4.rst index 62e393c86..292766fbd 100644 --- a/docs/whatsnew/v0-4-4.rst +++ b/docs/whatsnew/v0-4-4.rst @@ -12,7 +12,7 @@ API changes New components/constraints ########################## -* Custom component: oemof.solph.custom.PiecewiseLinearTransformer. A transformer model with one input and one output and an arbitrary piecewise linear conversion function. On how to use the component, refer to the `test script `_ and `example `_. +* Custom component: oemof.solph.custom.PiecewiseLinearTransformer. A transformer model with one input and one output and an arbitrary piecewise linear conversion function. On how to use the component, refer to the `test script `_. * Enhanced custom SinkDSM: * Renamed keyword argument `method` to `approach` * Renamed approaches `interval` to `oemof` and `delay` to `DIW` diff --git a/docs/whatsnew/v0-5-0.rst b/docs/whatsnew/v0-5-0.rst index 140d40157..9d07d3447 100644 --- a/docs/whatsnew/v0-5-0.rst +++ b/docs/whatsnew/v0-5-0.rst @@ -1,10 +1,11 @@ -v0.5.0 ------- +v0.5.0 (February 3rd, 2023) +--------------------------- API changes ########### +* Clean definition of time indexes: You need N+1 points in time do define N time spans. * Parts of the energy system graph are now clearly structured into `buses`, `components`, and `flows`. * Public and private API are be more distinguished now. ('_' signifies private, public API is defined in init files.) * Experimental code is now sitting in submodules called `experimental` (replaces "custom"). @@ -15,8 +16,8 @@ API changes New features ############ -* Add `inactivity_costs` as an option for `Flow`s. Inactivity costs is a cost for times where a Flow is not operated. -* It is now possible to optimise the size of `Flow`s that have a status variable. Internally, this is done by the `InvestNonConvexFlowBlock` which provides the possibility to perform capacity optimization of assets considering their min/max loads, as well as their operation status. +* Add `inactivity_costs` as an option for `Flow` objects. Inactivity costs is a cost for times where a Flow is not operated. +* It is now possible to optimise the size of `Flow` objects that have a status variable. Internally, this is done by the `InvestNonConvexFlowBlock` which provides the possibility to perform capacity optimization of assets considering their min/max loads, as well as their operation status. Documentation ############# @@ -51,3 +52,4 @@ Contributors * Ekaterina Zolotarevskaia * Sarah Berendes * Francesco Witte +* Johannes Kochems diff --git a/docs/whatsnew/v0-5-1.rst b/docs/whatsnew/v0-5-1.rst new file mode 100644 index 000000000..1922d23ab --- /dev/null +++ b/docs/whatsnew/v0-5-1.rst @@ -0,0 +1,73 @@ +v0.5.1 (August 31st, 2023) +-------------------------- + + +API changes +########### + +* The component `Transformer` is renamed to `Converter`. + When people hear "transformer", they think of electrical devices. + However, the Transformer is neither meant to be (only) electrical + nor bidirectional (as electrical transformers typically are). + Thus, the more generic term "converter" is now used. + (Note that we always had the argument "conversion_factor".) +* Unify API for constant sized objects and sizing of investment. For both, `Flow` and + `GenericStorage`, the argument `investment` is now deprecated. Instead, + `nominal_value` and `nominal_storage_capacity` accept an `Investment` object. +* Change investment for experimental :class:`oemof.solph.components.experimental._sink_dsm.SinkDSM`: Remove + obsolete parameters `flex_share_down` and `flex_share_up`. +* Mainline link component :class:`oemof.solph.components._link.Link` from experimental. + +New features +############ + +* Add option to run multi-period (dynamic) investment models with oemof.solph as an experimental feature: + * You can change from standard model to multi-period model by defining the newly introduced `periods` + attribute of your energy system. Be aware that it is experimental as of now. `periods` is a dictionary + mapping the periods you want to model (usually years) to pandas.date_range objects. + * Add attributes `periods` to :class:`oemof.solph._energy_system.EnergySystem`. + * Introduce new Pyomo Sets `PERIODS` and `TIMEINDEX` in :class:`oemof.solph.models.Model`. + * Index all investment-related variables with `PERIODS` and flow variable with `TIMEINDEX`, which + is a tuple of periods and timesteps. + * Add lifetime tracking for investment options by introducing the attributes `lifetime` and `age`. + * Add new investment-related variables `total` holding the total capacity, `old` holding capacity + to be decommissioned, `old_exo` (for exogenous) holding existing capacity to be decommissioned and + `old_end` holding model-endogenously installed capacity to be decommissioned after its lifetime. + * Include discounting and calculating annuities in the objective function terms. Introduce attribute `discount_rate` + of :class:`oemof.solph.models.Model` and `interest_rate` for individual investment objects (options.Investment). +* Add `storage_level_constraint` that allows to set flows from/to storage (in)active based on storage content. +* `Model` now accepts a list of `EnergySystem` objects, which allows for modelling of cellular energysystems. +* Add `storage_costs` option for `GenericStorage`. (Note: Differnt lengths of time steps are not considered. + If you use non-equidistant time steps, you need to scale costs accordingly.) + +Documentation +############# + +* See extensive documentation in user guide and API reference for the new (experimental) multi-period feature. +* Be more strict about about oemof (meta package) oemof.solph (this package). +* Improved presentation of examples as part of the documentation. + +Bug fixes +######### + +* Fixed error when calling `oemof_installation_test` as console script. +* Corrected several typos in the docs. +* Periods with multiple period lengths are now supported in multi-period investment. +* Add missing 'custom_attributes' for the link component + +Testing +####### + +* Add tests for experimental SinkDSM component. +* Add tests for multi-period investment. + +Contributors +############ + +* Johannes Kochems +* Patrik Schönfeldt +* Tobi Rohrer +* Julian Endres +* Jann Launer +* Lennart Schürmann + diff --git a/examples/activity_costs/activity_costs.py b/examples/activity_costs/activity_costs.py index a51dbbb0e..950304d21 100644 --- a/examples/activity_costs/activity_costs.py +++ b/examples/activity_costs/activity_costs.py @@ -8,19 +8,30 @@ There are the following components: - - demand_heat: heat demand (constant, for the sake of simplicity) - - fireplace: wood firing, burns "for free" if somebody is around - - boiler: gas firing, consumes (paid) gas +- demand_heat: heat demand (constant, for the sake of simplicity) +- fireplace: wood firing, burns "for free" if somebody is around +- boiler: gas firing, consumes (paid) gas Notice that activity_costs is an attribute to NonConvex. This is because it relies on the activity status of a component which is only available for nonconvex flows. +Code +---- +Download source code: :download:`activity_costs.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/activity_costs/activity_costs.py + :language: python + :lines: 43-118 Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] License diff --git a/examples/basic_example/basic_example.py b/examples/basic_example/basic_example.py index 03b806012..c35aca98f 100644 --- a/examples/basic_example/basic_example.py +++ b/examples/basic_example/basic_example.py @@ -22,22 +22,32 @@ demand(Sink) |<------------------| | | | | | | - pp_gas(Transformer) |<---------| | + pp_gas(Converter) |<---------| | |------------------>| | | | storage(Storage) |<------------------| |------------------>| +Code +---- +Download source code: :download:`basic_example.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/basic_example/basic_example.py + :language: python + :lines: 61- Data ---- -basic_example.csv - +Download data: :download:`basic_example.csv ` Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] License @@ -156,9 +166,9 @@ def main(): ) ) - # create simple transformer object representing a gas power plant + # create simple converter object representing a gas power plant energysystem.add( - cmp.Transformer( + cmp.Converter( label="pp_gas", inputs={bgas: flows.Flow()}, outputs={bel: flows.Flow(nominal_value=10e10, variable_costs=50)}, diff --git a/examples/cellular/cellular.py b/examples/cellular/cellular.py new file mode 100644 index 000000000..2d208a16e --- /dev/null +++ b/examples/cellular/cellular.py @@ -0,0 +1,346 @@ +""" +General description +------------------- + +Cellular energy systems are proposed by the VDE-ETG. They are, as the name +implies, energy systems that consist of cells. Each cell can contain +multiple other cells. So there is a hierarchy between them. + +However, the hierarchical levels are abstracted here and the structure is flat. + +The connections between the cells are modelled as Links. Each connector Link +has two inputs (buses of the parent and child cell) and two outputs (buses of +the parent and child cell). Losses can be modelled by using the +`conversion_factors` of the Link class. + +Code +---- +Download source code: :download:`cellular.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/cellular/cellular.py + :language: python + :lines: 45-346 + +Installation requirements +------------------------- + +This example requires at least oemof.solph (v0.5.1), install by: + +.. code:: bash + + pip install oemof.solph[examples] + +Licence +------- + +Lennart Schürmann + +`MIT license `_ + +""" + + +from oemof.solph import EnergySystem +from oemof.solph import Model +from oemof.solph import buses +from oemof.solph import components as cmp +from oemof.solph import create_time_index +from oemof.solph import flows +from oemof.solph import processing +from oemof.solph import views + + +def main(): + ########################################################################### + # define the cells of the cellular energy system + ########################################################################### + # define necessary parameters + + n_periods = 3 + + daterange = create_time_index(year=2020, interval=1, number=n_periods) + + mysolver = "cbc" + + # create the energy cells + es = EnergySystem( + label="es", timeindex=daterange, infer_last_interval=False + ) + ec_1 = EnergySystem( + label="ec1", timeindex=daterange, infer_last_interval=False + ) + ec_2 = EnergySystem( + label="ec2", timeindex=daterange, infer_last_interval=False + ) + ec_1_1 = EnergySystem( + label="ec1_1", timeindex=daterange, infer_last_interval=False + ) + ec_1_2 = EnergySystem( + label="ec1_2", timeindex=daterange, infer_last_interval=False + ) + ec_2_1 = EnergySystem( + label="ec2_1", timeindex=daterange, infer_last_interval=False + ) + ec_2_2 = EnergySystem( + label="ec2_2", timeindex=daterange, infer_last_interval=False + ) + + demand_1 = [10] * n_periods + demand_2 = [10] * n_periods + demand_1_1 = [10] * n_periods + demand_1_2 = [10] * n_periods + demand_2_1 = [10] * n_periods + demand_2_2 = [80] * n_periods + + pv_1 = [10] * n_periods + pv_2 = [10] * n_periods + pv_1_1 = [80] * n_periods + pv_1_2 = [40] * n_periods + pv_2_1 = [10] * n_periods + pv_2_2 = [10] * n_periods + + bus_el_es = buses.Bus(label="bus_el_es") + bus_el_ec_1 = buses.Bus(label="bus_el_ec_1") + bus_el_ec_2 = buses.Bus(label="bus_el_ec_2") + bus_el_ec_1_1 = buses.Bus(label="bus_el_ec_1_1") + bus_el_ec_1_2 = buses.Bus(label="bus_el_ec_1_2") + bus_el_ec_2_1 = buses.Bus(label="bus_el_ec_2_1") + bus_el_ec_2_2 = buses.Bus(label="bus_el_ec_2_2") + + es.add(bus_el_es) + ec_1.add(bus_el_ec_1) + ec_2.add(bus_el_ec_2) + ec_1_1.add(bus_el_ec_1_1) + ec_1_2.add(bus_el_ec_1_2) + ec_2_1.add(bus_el_ec_2_1) + ec_2_2.add(bus_el_ec_2_2) + + sink_el_ec_1 = cmp.Sink( + label="sink_el_ec_1", + inputs={bus_el_ec_1: flows.Flow(fix=demand_1, nominal_value=1)}, + ) + sink_el_ec_2 = cmp.Sink( + label="sink_el_ec_2", + inputs={bus_el_ec_2: flows.Flow(fix=demand_2, nominal_value=1)}, + ) + sink_el_ec_1_1 = cmp.Sink( + label="sink_el_ec_1_1", + inputs={bus_el_ec_1_1: flows.Flow(fix=demand_1_1, nominal_value=1)}, + ) + sink_el_ec_1_2 = cmp.Sink( + label="sink_el_ec_1_2", + inputs={bus_el_ec_1_2: flows.Flow(fix=demand_1_2, nominal_value=1)}, + ) + sink_el_ec_2_1 = cmp.Sink( + label="sink_el_ec_2_1", + inputs={bus_el_ec_2_1: flows.Flow(fix=demand_2_1, nominal_value=1)}, + ) + sink_el_ec_2_2 = cmp.Sink( + label="sink_el_ec_2_2", + inputs={bus_el_ec_2_2: flows.Flow(fix=demand_2_2, nominal_value=1)}, + ) + + ec_1.add(sink_el_ec_1) + ec_2.add(sink_el_ec_2) + ec_1_1.add(sink_el_ec_1_1) + ec_1_2.add(sink_el_ec_1_2) + ec_2_1.add(sink_el_ec_2_1) + ec_2_2.add(sink_el_ec_2_2) + + source_el_ec_1 = cmp.Source( + label="source_el_ec_1", + outputs={ + bus_el_ec_1: flows.Flow( + max=pv_1, nominal_value=1, variable_costs=5 + ) + }, + ) + source_el_ec_2 = cmp.Source( + label="source_el_ec_2", + outputs={ + bus_el_ec_2: flows.Flow( + max=pv_2, nominal_value=1, variable_costs=5 + ) + }, + ) + source_el_ec_1_1 = cmp.Source( + label="source_el_ec_1_1", + outputs={ + bus_el_ec_1_1: flows.Flow( + max=pv_1_1, nominal_value=1, variable_costs=10 + ) + }, + ) + source_el_ec_1_2 = cmp.Source( + label="source_el_ec_1_2", + outputs={ + bus_el_ec_1_2: flows.Flow( + max=pv_1_2, nominal_value=1, variable_costs=1 + ) + }, + ) + source_el_ec_2_1 = cmp.Source( + label="source_el_ec_2_1", + outputs={ + bus_el_ec_2_1: flows.Flow( + max=pv_2_1, nominal_value=1, variable_costs=5 + ) + }, + ) + source_el_ec_2_2 = cmp.Source( + label="source_el_ec_2_2", + outputs={ + bus_el_ec_2_2: flows.Flow( + max=pv_2_2, nominal_value=1, variable_costs=5 + ) + }, + ) + + ec_1.add(source_el_ec_1) + ec_2.add(source_el_ec_2) + ec_1_1.add(source_el_ec_1_1) + ec_1_2.add(source_el_ec_1_2) + ec_2_1.add(source_el_ec_2_1) + ec_2_2.add(source_el_ec_2_2) + + connector_el_ec_1 = cmp.Link( + label="connector_el_ec_1", + inputs={ + bus_el_es: flows.Flow(), + bus_el_ec_1: flows.Flow(), + }, + outputs={ + bus_el_es: flows.Flow(), + bus_el_ec_1: flows.Flow(), + }, + conversion_factors={ + (bus_el_es, bus_el_ec_1): 1, + (bus_el_ec_1, bus_el_es): 1, + }, + ) + + connector_el_ec_2 = cmp.Link( + label="connector_el_ec_2", + inputs={ + bus_el_es: flows.Flow(), + bus_el_ec_2: flows.Flow(), + }, + outputs={ + bus_el_es: flows.Flow(), + bus_el_ec_2: flows.Flow(), + }, + conversion_factors={ + (bus_el_es, bus_el_ec_2): 1, + (bus_el_ec_2, bus_el_es): 1, + }, + ) + + connector_el_ec_1_1 = cmp.Link( + label="connector_el_ec_1_1", + inputs={ + bus_el_ec_1: flows.Flow(), + bus_el_ec_1_1: flows.Flow(), + }, + outputs={ + bus_el_ec_1: flows.Flow(), + bus_el_ec_1_1: flows.Flow(), + }, + conversion_factors={ + (bus_el_ec_1, bus_el_ec_1_1): 0.85, + (bus_el_ec_1_1, bus_el_ec_1): 0.85, + }, + ) + + connector_el_ec_1_2 = cmp.Link( + label="connector_el_ec_1_2", + inputs={ + bus_el_ec_1: flows.Flow(), + bus_el_ec_1_2: flows.Flow(), + }, + outputs={ + bus_el_ec_1: flows.Flow(), + bus_el_ec_1_2: flows.Flow(), + }, + conversion_factors={ + (bus_el_ec_1, bus_el_ec_1_2): 1, + (bus_el_ec_1_2, bus_el_ec_1): 1, + }, + ) + + connector_el_ec_2_1 = cmp.Link( + label="connector_el_ec_2_1", + inputs={ + bus_el_ec_2: flows.Flow(), + bus_el_ec_2_1: flows.Flow(), + }, + outputs={ + bus_el_ec_2: flows.Flow(), + bus_el_ec_2_1: flows.Flow(), + }, + conversion_factors={ + (bus_el_ec_2, bus_el_ec_2_1): 1, + (bus_el_ec_2_1, bus_el_ec_2): 1, + }, + ) + + connector_el_ec_2_2 = cmp.Link( + label="connector_el_ec_2_2", + inputs={ + bus_el_ec_2: flows.Flow(), + bus_el_ec_2_2: flows.Flow(), + }, + outputs={ + bus_el_ec_2: flows.Flow(), + bus_el_ec_2_2: flows.Flow(), + }, + conversion_factors={ + (bus_el_ec_2, bus_el_ec_2_2): 1, + (bus_el_ec_2_2, bus_el_ec_2): 1, + }, + ) + + # the connectors are all part of the overarching, the upmost es + es.add( + connector_el_ec_1, + connector_el_ec_2, + connector_el_ec_1_1, + connector_el_ec_1_2, + connector_el_ec_2_1, + connector_el_ec_2_2, + ) + + cmodel = Model( + energysystem=[es, ec_1, ec_2, ec_1_1, ec_1_2, ec_2_1, ec_2_2] + ) + + cmodel.solve(solver=mysolver) + + # evaluate and plot the results + results = processing.results(cmodel) + + print(views.node(results, "bus_el_ec_1")["sequences"].iloc[0, :]) + msg = ( + "\nAs we can see, a flow of 70 kW is going from the bus_el_ec_1 " + "to the connector_el_ec_1. It is composed of 30 kW from " + "connector_el_ec_1_2 (and therefore ec_1_2) and 40 kW from " + "connector_el_ec_1_1 (and therefore ec_1_1). Where does it go?\n" + ) + print(msg) + print(views.node(results, "bus_el_ec_2_2")["sequences"].iloc[0, :]) + msg = ( + "\nIt is going into bus_el_ec_2_2 (and therefore ec_2_2), to " + "supply the demand.\n" + ) + print(msg) + + msg = ( + "Here we can see that the conversion factors are in fact considered:\n" + ) + print(msg) + print(views.node(results, "connector_el_ec_1_1")["sequences"].iloc[0, :]) + + +if __name__ == "__main__": + main() diff --git a/examples/dual_variable_example/dual_variable_example.py b/examples/dual_variable_example/dual_variable_example.py index 77c9ec9fc..5a58240b1 100644 --- a/examples/dual_variable_example/dual_variable_example.py +++ b/examples/dual_variable_example/dual_variable_example.py @@ -7,18 +7,44 @@ A basic example to show how to get the dual variables from the system. Try to understand the plot. +Code +---- +Download source code: :download:`dual_variable_example.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/dual_variable_example/dual_variable_example.py + :language: python + :lines: 34-297 + Installation requirements ------------------------- This example requires the version v0.5.x of oemof.solph: +.. code:: bash + pip install 'oemof.solph[examples]>=0.5,<0.6' SPDX-FileCopyrightText: Uwe Krien SPDX-License-Identifier: MIT """ +########################################################################### +# imports +########################################################################### + +import pandas as pd +from matplotlib import pyplot as plt +from oemof.tools import logger + +from oemof.solph import EnergySystem +from oemof.solph import Model +from oemof.solph import buses +from oemof.solph import components as cmp +from oemof.solph import flows +from oemof.solph import processing def main(): @@ -26,21 +52,6 @@ def main(): # ********** PART 1 - Define and optimise the energy system *************** # ************************************************************************* - ########################################################################### - # imports - ########################################################################### - - import pandas as pd - from matplotlib import pyplot as plt - from oemof.tools import logger - - from oemof.solph import EnergySystem - from oemof.solph import Model - from oemof.solph import buses - from oemof.solph import components as cmp - from oemof.solph import flows - from oemof.solph import processing - solver = "cbc" # 'glpk', 'gurobi',.... number_of_time_steps = 48 solver_verbose = False # show/hide solver output @@ -199,9 +210,9 @@ def main(): ) ) - # create simple transformer object representing a gas power plant + # create simple converter object representing a gas power plant energysystem.add( - cmp.Transformer( + cmp.Converter( label="pp_gas", inputs={bus_gas: flows.Flow()}, outputs={bus_elec: flows.Flow(nominal_value=400)}, diff --git a/examples/electrical/lopf.py b/examples/electrical/lopf.py index 9254f604c..33be875c0 100644 --- a/examples/electrical/lopf.py +++ b/examples/electrical/lopf.py @@ -10,14 +10,28 @@ Note: As oemof currently does not support models with one timesteps, therefore there are two. +Code +---- +Download source code: :download:`lopf.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/electrical/lopf.py + :language: python + :lines: 44-221 + Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] To draw the graph pygraphviz is required, installed by: +.. code:: bash + pip install pygraphviz License @@ -31,11 +45,17 @@ import pandas as pd from matplotlib import pyplot as plt from oemof.network.graph import create_nx_graph -from oemof.solph import EnergySystem, Investment, Model, processing, views -from oemof.solph.components import Sink, Source + +from oemof.solph import EnergySystem +from oemof.solph import Investment +from oemof.solph import Model +from oemof.solph import processing +from oemof.solph import views from oemof.solph.buses.experimental import ElectricalBus -from oemof.solph.flows.experimental import ElectricalLine +from oemof.solph.components import Sink +from oemof.solph.components import Source from oemof.solph.flows import Flow +from oemof.solph.flows.experimental import ElectricalLine try: import pygraphviz as pygz diff --git a/examples/electrical/transshipment.py b/examples/electrical/transshipment.py index afbd59690..2379da98b 100644 --- a/examples/electrical/transshipment.py +++ b/examples/electrical/transshipment.py @@ -6,15 +6,28 @@ This script shows how use the custom component `solph.custom.Link` to build a simple transshipment model. +Code +---- +Download source code: :download:`transshipment.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/electrical/transshipment.py + :language: python + :lines: 39-211 Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] To draw the graph pygraphviz is required, installed by: +.. code:: bash + pip install pygraphviz License @@ -37,7 +50,7 @@ from oemof.solph import components as cmp from oemof.solph import processing from oemof.solph import views -from oemof.solph.components.experimental import Link +from oemof.solph.components import Link try: import pygraphviz as pygz @@ -135,7 +148,6 @@ def main(): b_0: Flow(investment=Investment()), }, conversion_factors={(b_0, b_1): 0.95, (b_1, b_0): 0.9}, - limit_direction=False, ) ) diff --git a/examples/emission_constraint/emission_constraint.py b/examples/emission_constraint/emission_constraint.py index 0633ded72..4945eaa28 100644 --- a/examples/emission_constraint/emission_constraint.py +++ b/examples/emission_constraint/emission_constraint.py @@ -5,11 +5,23 @@ ------------------- Example that shows how to add an emission constraint in a model. +Code +---- +Download source code: :download:`emission_constraint.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/emission_constraint/emission_constraint.py + :language: python + :lines: 32-129 + Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] License @@ -78,9 +90,9 @@ def main(): ) ) - # create simple transformer object representing a gas power plant + # create simple converter object representing a gas power plant energysystem.add( - solph.components.Transformer( + solph.components.Converter( label="pp_gas", inputs={bgas: solph.Flow()}, outputs={bel: solph.Flow(nominal_value=200)}, diff --git a/examples/excel_reader/dispatch.py b/examples/excel_reader/dispatch.py index 4894b1497..97baad936 100644 --- a/examples/excel_reader/dispatch.py +++ b/examples/excel_reader/dispatch.py @@ -9,25 +9,38 @@ The pandas package supports the '.xls' and the '.xlsx' format but one can create read and adept the files with open source software such as libreoffice, -openoffice, gnumeric,... +openoffice, gnumeric, ... + +Code +---- +Download source code: :download:`dispatch.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/excel_reader/dispatch.py + :language: python + :lines: 57-437 Data ---- -scenario.xlsx +Download data: :download:`scenario.xlsx ` Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: - pip install oemof.solph[examples] +.. code:: bash - pip3 install openpyxl + pip install oemof.solph[examples] + pip install openpyxl If you want to plot the energy system's graph, you have to install pygraphviz using: - pip3 install pygraphviz +.. code:: bash + + pip install pygraphviz For pygraphviz under Windows, some hints are available in the oemof Wiki: https://github.com/oemof/oemof/wiki/Windows---general @@ -41,16 +54,16 @@ """ -import os import logging -import pandas as pd +import os +import networkx as nx +import pandas as pd +from matplotlib import pyplot as plt +from oemof.network.graph import create_nx_graph from oemof.tools import logger -from oemof import solph -from oemof.network.graph import create_nx_graph -from matplotlib import pyplot as plt -import networkx as nx +from oemof import solph def nodes_from_excel(filename): @@ -78,7 +91,7 @@ def nodes_from_excel(filename): nodes_data = { "buses": xls.parse("buses"), "commodity_sources": xls.parse("commodity_sources"), - "transformers": xls.parse("transformers"), + "converters": xls.parse("converters"), "renewables": xls.parse("renewables"), "demand": xls.parse("demand"), "storages": xls.parse("storages"), @@ -197,18 +210,18 @@ def create_nodes(nd=None): ) ) - # Create Transformer objects from 'transformers' table - for i, t in nd["transformers"].iterrows(): + # Create Converter objects from 'converters' table + for i, t in nd["converters"].iterrows(): if t["active"]: # set static inflow values inflow_args = {"variable_costs": t["variable input costs"]} - # get time series for inflow of transformer + # get time series for inflow of converter for col in nd["timeseries"].columns.values: if col.split(".")[0] == t["label"]: inflow_args[col.split(".")[1]] = nd["timeseries"][col] # create nodes.append( - solph.components.Transformer( + solph.components.Converter( label=t["label"], inputs={busd[t["from"]]: solph.Flow(**inflow_args)}, outputs={ @@ -250,7 +263,7 @@ def create_nodes(nd=None): bus1 = busd[p["bus_1"]] bus2 = busd[p["bus_2"]] nodes.append( - solph.components.Transformer( + solph.components.Converter( label="powerline" + "_" + p["bus_1"] + "_" + p["bus_2"], inputs={bus1: solph.Flow()}, outputs={bus2: solph.Flow()}, @@ -258,7 +271,7 @@ def create_nodes(nd=None): ) ) nodes.append( - solph.components.Transformer( + solph.components.Converter( label="powerline" + "_" + p["bus_2"] + "_" + p["bus_1"], inputs={bus2: solph.Flow()}, outputs={bus1: solph.Flow()}, diff --git a/examples/excel_reader/scenario.xlsx b/examples/excel_reader/scenario.xlsx index 5cb89172f..160d95fd1 100755 Binary files a/examples/excel_reader/scenario.xlsx and b/examples/excel_reader/scenario.xlsx differ diff --git a/examples/flexible_modelling/add_constraints.py b/examples/flexible_modelling/add_constraints.py index 3f76264ae..824da815a 100644 --- a/examples/flexible_modelling/add_constraints.py +++ b/examples/flexible_modelling/add_constraints.py @@ -8,14 +8,28 @@ The constraint we add forces a flow to be greater or equal a certain share of all inflows of its target bus. Moreover we will set an emission constraint. +Code +---- +Download source code: :download:`add_constraints.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/flexible_modelling/add_constraints.py + :language: python + :lines: 41-158 + Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] To draw the graph pygraphviz is required, installed by: +.. code:: bash + pip install pygraphviz License @@ -24,10 +38,6 @@ `MIT license `_ """ - -__copyright__ = "oemof developer group" -__license__ = "GPLv3" - import logging import pandas as pd @@ -61,13 +71,13 @@ def run_add_constraints_example(solver="cbc", nologg=False): label="Sink", inputs={b_el: Flow(nominal_value=40, fix=[0.5, 0.4, 0.3, 1])}, ) - pp_oil = cmp.Transformer( + pp_oil = cmp.Converter( label="pp_oil", inputs={boil: Flow()}, outputs={b_el: Flow(nominal_value=50, variable_costs=25)}, conversion_factors={b_el: 0.39}, ) - pp_lig = cmp.Transformer( + pp_lig = cmp.Converter( label="pp_lig", inputs={blig: Flow()}, outputs={b_el: Flow(nominal_value=50, variable_costs=10)}, @@ -113,26 +123,26 @@ def run_add_constraints_example(solver="cbc", nologg=False): # add the sub-model to the oemof Model instance om.add_component("MyBlock", myblock) - def _inflow_share_rule(m, s, e, t): + def _inflow_share_rule(m, s, e, p, t): """pyomo rule definition: Here we can use all objects from the block or the om object, in this case we don't need anything from the block except the newly defined set MYFLOWS. """ - expr = om.flow[s, e, t] >= om.flows[s, e].outflow_share[t] * sum( - om.flow[i, o, t] for (i, o) in om.FLOWS if o == e + expr = om.flow[s, e, p, t] >= om.flows[s, e].outflow_share[t] * sum( + om.flow[i, o, p, t] for (i, o) in om.FLOWS if o == e ) return expr myblock.inflow_share = po.Constraint( - myblock.MYFLOWS, om.TIMESTEPS, rule=_inflow_share_rule + myblock.MYFLOWS, om.TIMEINDEX, rule=_inflow_share_rule ) # add emission constraint myblock.emission_constr = po.Constraint( expr=( sum( - om.flow[i, o, t] + om.flow[i, o, p, t] for (i, o) in myblock.COMMODITYFLOWS - for t in om.TIMESTEPS + for p, t in om.TIMEINDEX ) <= emission_limit ) diff --git a/examples/flexible_modelling/saturating_storage.py b/examples/flexible_modelling/saturating_storage.py new file mode 100644 index 000000000..08efa43ab --- /dev/null +++ b/examples/flexible_modelling/saturating_storage.py @@ -0,0 +1,140 @@ +# -*- coding: utf-8 -*- + +""" +General description +------------------- +Example that shows the how to implement a `GenericStorage` +that charges at reduced rates for high storage contents. + +Code +---- +Download source code: :download:`saturating_storage.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/flexible_modelling/saturating_storage.py + :language: python + :lines: 34-140 + + +Installation requirements +------------------------- +This example requires oemof.solph (v0.5.x), install by: + +.. code:: bash + + pip install oemof.solph[examples] + + +License +------- +`MIT license `_ +""" + +import pandas as pd +from pyomo import environ as po +from matplotlib import pyplot as plt + +from oemof import solph + + +def saturating_storage_example(): + # create an energy system + idx = pd.date_range("1/1/2023", periods=100, freq="H") + es = solph.EnergySystem(timeindex=idx, infer_last_interval=False) + + # power bus + bel = solph.Bus(label="bel") + es.add(bel) + + es.add( + solph.components.Source( + label="source_el", + outputs={bel: solph.Flow(nominal_value=1, fix=1)}, + ) + ) + + es.add( + solph.components.Sink( + label="sink_el", + inputs={ + bel: solph.Flow( + nominal_value=1, + variable_costs=1, + ) + }, + ) + ) + + # Electric Storage + + inflow_capacity = 0.5 + full_charging_limit = 0.4 + storage_capacity = 10 + battery = solph.components.GenericStorage( + label="battery", + nominal_storage_capacity=storage_capacity, + inputs={bel: solph.Flow(nominal_value=inflow_capacity)}, + outputs={bel: solph.Flow(variable_costs=2)}, + initial_storage_level=0, + balanced=False, + loss_rate=0.0001, + ) + es.add(battery) + + # create an optimization problem and solve it + model = solph.Model(es) + + def soc_limit_rule(m): + for p, ts in m.TIMEINDEX: + soc = ( + m.GenericStorageBlock.storage_content[battery, ts + 1] + / storage_capacity + ) + expr = (1 - soc) / (1 - full_charging_limit) >= m.flow[ + bel, battery, p, ts + ] / inflow_capacity + getattr(m, "soc_limit").add((p, ts), expr) + + setattr( + model, + "soc_limit", + po.Constraint( + model.TIMEINDEX, + noruleinit=True, + ), + ) + setattr( + model, + "soc_limit_build", + po.BuildAction(rule=soc_limit_rule), + ) + + # solve model + model.solve(solver="cbc") + + # create result object + results = solph.processing.results(model) + + plt.plot(results[(battery, None)]["sequences"], "r--", label="content") + plt.step( + 20 * results[(bel, battery)]["sequences"], "b-", label="20*inflow" + ) + plt.legend() + plt.grid() + + plt.figure() + plt.plot( + results[(battery, None)]["sequences"][1:], + results[(bel, battery)]["sequences"][:-1], + "b-", + ) + plt.grid() + plt.xlabel("Storage content") + plt.ylabel("Charging power") + + plt.show() + + +if __name__ == "__main__": + saturating_storage_example() diff --git a/examples/flow_count_limit/flow_count_limit.py b/examples/flow_count_limit/flow_count_limit.py index 3cbcd0c40..0ba707e74 100644 --- a/examples/flow_count_limit/flow_count_limit.py +++ b/examples/flow_count_limit/flow_count_limit.py @@ -4,14 +4,32 @@ General description ------------------- -Something... +Example that shows how to use "flow_count_limit". +This example shows a case where only one out of two Flows can be +active at a time. Another typical usage might be a connection to a +grid where energy can only flow into one direction or a storage that +cannot be charged and discharged at the same time. + +Note that binary variables are computationally expensive. Thus, you +might want to avoid using this constraint if you do not really need it. + +Code +---- +Download source code: :download:`flow_count_limit.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/flow_count_limit/flow_count_limit.py + :language: python + :lines: 39-159 Installation requirements ------------------------- - This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] License diff --git a/examples/generic_invest_limit/example_generic_invest.py b/examples/generic_invest_limit/example_generic_invest.py index 3840804d4..f7b6387bf 100644 --- a/examples/generic_invest_limit/example_generic_invest.py +++ b/examples/generic_invest_limit/example_generic_invest.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- r""" +General description +------------------- Example that shows how to use "Generic Investment Limit". There are two supply chains. The energy systems looks like that: @@ -21,21 +23,33 @@ | Everything is identical - the costs for the sources, the demand, the efficiency -of the Transformer. And both Transformer have an investment at the output. +of the Converter. And both Converter have an investment at the output. The source '\*_1' is in both cases very expensive, so that -a investment is probably done in the transformer. +a investment is probably done in the converter. Now, both investments share a third resource, which is called "space" in this example. (This could be anything, and you could use as many additional resources as you want.) And this resource is limited. In this case, every -Transformer capacity unit, which might be installed, needs 2 space for +converter capacity unit, which might be installed, needs 2 space for 'trafo a', and 1 space per installed capacity for 'trafo b'. And the total space is limited to 24. See what happens, have fun ;) +Code +---- +Download source code: :download:`example_generic_invest.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/generic_invest_limit/example_generic_invest.py + :language: python + :lines: 62-219 + Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] License @@ -43,8 +57,6 @@ Johannes Röder `MIT license `_ - - """ import logging @@ -122,9 +134,9 @@ def main(): ) ) - # transformer a + # Converter a es.add( - solph.components.Transformer( + solph.components.Converter( label="trafo_a", inputs={bus_a_0: solph.Flow()}, outputs={ @@ -132,7 +144,7 @@ def main(): nominal_value=None, investment=solph.Investment( ep_costs=epc_invest, - space=2, + custom_attributes={"space": 2}, ), ) }, @@ -140,9 +152,9 @@ def main(): ) ) - # transformer b + # Converter b es.add( - solph.components.Transformer( + solph.components.Converter( label="trafo_b", inputs={bus_b_0: solph.Flow()}, outputs={ @@ -150,7 +162,7 @@ def main(): nominal_value=None, investment=solph.Investment( ep_costs=epc_invest, - space=1, + custom_attributes={"space": 1}, ), ) }, diff --git a/examples/gradient_example/gradient_example.py b/examples/gradient_example/gradient_example.py index e6ea77bad..5df0d5ecb 100644 --- a/examples/gradient_example/gradient_example.py +++ b/examples/gradient_example/gradient_example.py @@ -8,11 +8,22 @@ Change the GRADIENT variable in the example to see the effect on the usage of the storage. +Code +---- +Download source code: :download:`gradient_example.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/gradient_example/gradient_example.py + :language: python + :lines: 35-211 Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] @@ -122,9 +133,9 @@ def main(): ) ) - # create simple transformer object representing a gas power plant + # create simple Converter object representing a gas power plant energysystem.add( - cmp.Transformer( + cmp.Converter( label="pp_gas", inputs={bgas: flows.Flow()}, outputs={ diff --git a/examples/invest_nonconvex_flow_examples/__init__.py b/examples/invest_nonconvex_flow_examples/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/invest_nonconvex_flow_examples/diesel_genset_nonconvex_investment.py b/examples/invest_nonconvex_flow_examples/diesel_genset_nonconvex_investment.py index 2413733df..e90d0f10c 100644 --- a/examples/invest_nonconvex_flow_examples/diesel_genset_nonconvex_investment.py +++ b/examples/invest_nonconvex_flow_examples/diesel_genset_nonconvex_investment.py @@ -8,22 +8,35 @@ There are the following components: - - pv: solar potential to generate electricity - - diesel_source: input diesel for the diesel genset - - diesel_genset: generates ac electricity - - rectifier: converts generated ac electricity from the diesel genset - to dc electricity - - inverter: converts generated dc electricity from the pv to ac electricity - - battery: stores the generated dc electricity - - demand_el: ac electricity demand (given as a separate *.csv file) - - excess_el: allows for some electricity overproduction +- pv: solar potential to generate electricity +- diesel_source: input diesel for the diesel genset +- diesel_genset: generates ac electricity +- rectifier: converts generated ac electricity from the diesel genset to dc electricity +- inverter: converts generated dc electricity from the pv to ac electricity +- battery: stores the generated dc electricity +- demand_el: ac electricity demand (given as a separate csv file) +- excess_el: allows for some electricity overproduction +Code +---- +Download source code: :download:`diesel_genset_nonconvex_investment.py ` +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/invest_nonconvex_flow_examples/diesel_genset_nonconvex_investment.py + :language: python + :lines: 44- + +Data +---- +Download data: :download:`solar_generation.csv ` Installation requirements ------------------------- This example requires the version v0.5.x of oemof.solph. Install by: +.. code:: bash + pip install 'oemof.solph>=0.5,<0.6' """ @@ -31,13 +44,16 @@ __copyright__ = "oemof developer group" __license__ = "MIT" -import numpy as np import os -import pandas as pd import time -from datetime import datetime, timedelta -from oemof import solph import warnings +from datetime import datetime +from datetime import timedelta + +import numpy as np +import pandas as pd + +from oemof import solph try: import matplotlib.pyplot as plt @@ -69,12 +85,7 @@ def main(): # Import data. filename = os.path.join(os.getcwd(), "solar_generation.csv") - try: - data = pd.read_csv(filename) - except FileNotFoundError: - msg = "Data file not found: {0}. Only one value used!" - warnings.warn(msg.format(filename), UserWarning) - data = pd.DataFrame({"pv": [0.3], "wind": [0.6], "demand_el": [500]}) + data = pd.read_csv(filename) # Change the index of data to be able to select data based on the time # range. @@ -130,7 +141,7 @@ def main(): }, ) - # -------------------- TRANSFORMERS -------------------- + # -------------------- CONVERTERS -------------------- # The diesel genset assumed to have a fixed efficiency of 33%. # The output power of the diesel genset can only vary between @@ -141,7 +152,7 @@ def main(): variable_cost_diesel_genset = 0.045 # currency/kWh min_load = 0.2 max_load = 1.0 - diesel_genset = solph.components.Transformer( + diesel_genset = solph.components.Converter( label="diesel_genset", inputs={b_diesel: solph.flows.Flow()}, outputs={ @@ -162,7 +173,7 @@ def main(): # The rectifier assumed to have a fixed efficiency of 98%. epc_rectifier = 62.35 # currency/kW/year - rectifier = solph.components.Transformer( + rectifier = solph.components.Converter( label="rectifier", inputs={ b_el_ac: solph.flows.Flow( @@ -174,14 +185,14 @@ def main(): ) }, outputs={b_el_dc: solph.flows.Flow()}, - conversion_factor={ + conversion_factors={ b_el_dc: 0.98, }, ) # The inverter assumed to have a fixed efficiency of 98%. epc_inverter = 62.35 # currency/kW/year - inverter = solph.components.Transformer( + inverter = solph.components.Converter( label="inverter", inputs={ b_el_dc: solph.flows.Flow( @@ -193,7 +204,7 @@ def main(): ) }, outputs={b_el_ac: solph.flows.Flow()}, - conversion_factor={ + conversion_factors={ b_el_ac: 0.98, }, ) diff --git a/examples/invest_nonconvex_flow_examples/house_with_nonconvex_investment.py b/examples/invest_nonconvex_flow_examples/house_with_nonconvex_investment.py index c137ce46d..e8fbb1458 100644 --- a/examples/invest_nonconvex_flow_examples/house_with_nonconvex_investment.py +++ b/examples/invest_nonconvex_flow_examples/house_with_nonconvex_investment.py @@ -9,18 +9,26 @@ There are the following components: - - demand_heat: heat demand (high in winter, low in summer) - - fireplace: wood firing, has a minimum heat and - will burn for a minimum time if lit. - - boiler: gas firing, more flexible but still - with minimal load and also with - higher cost than wood firing +- demand_heat: heat demand (high in winter, low in summer) +- fireplace: wood firing, has a minimum heat and will burn for a minimum time if lit. +- boiler: gas firing, more flexible but still with minimal load and also with higher cost than wood firing +Code +---- +Download source code: :download:`house_with_nonconvex_investment.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/invest_nonconvex_flow_examples/house_with_nonconvex_investment.py + :language: python + :lines: 37- Installation requirements ------------------------- This example requires the version v0.5.x of oemof.solph. Install by: +.. code:: bash + pip install 'oemof.solph>=0.5,<0.6' """ @@ -30,9 +38,10 @@ import numpy as np import pandas as pd -from oemof import solph from oemof.tools import economics +from oemof import solph + try: import matplotlib.pyplot as plt except ImportError: diff --git a/examples/invest_nonconvex_flow_examples/house_without_nonconvex_investment.py b/examples/invest_nonconvex_flow_examples/house_without_nonconvex_investment.py index 14dd060e6..cca936cce 100644 --- a/examples/invest_nonconvex_flow_examples/house_without_nonconvex_investment.py +++ b/examples/invest_nonconvex_flow_examples/house_without_nonconvex_investment.py @@ -9,24 +9,28 @@ There are the following components: - - demand_heat: heat demand (high in winter, low in summer) - - fireplace: wood firing, has a minimum heat and - will burn for a minimum time if lit - - boiler: gas firing, more flexible but with - higher (flexible) cost than wood firing - - thermal_collector: solar thermal collector, - size is to be optimized in this example - (high gain in summer, low in winter) - - excess_heat: allow for some heat overproduction - (solution would be trivial without, - as the collector size would be given - by the demand in summer) +- demand_heat: heat demand (high in winter, low in summer) +- fireplace: wood firing, has a minimum heat and will burn for a minimum time if lit +- boiler: gas firing, more flexible but with higher (flexible) cost than wood firing +- thermal_collector: solar thermal collector, size is to be optimized in this example (high gain in summer, low in winter) +- excess_heat: allow for some heat overproduction (solution would be trivial without, as the collector size would be given by the demand in summer) +Code +---- +Download source code: :download:`house_without_nonconvex_investment.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/invest_nonconvex_flow_examples/house_without_nonconvex_investment.py + :language: python + :lines: 43- Installation requirements ------------------------- This example requires the version v0.5.x of oemof.solph. Install by: +.. code:: bash + pip install 'oemof.solph>=0.5,<0.6' """ @@ -36,9 +40,10 @@ import numpy as np import pandas as pd -from oemof import solph from oemof.tools import economics +from oemof import solph + try: import matplotlib.pyplot as plt except ImportError: diff --git a/examples/investment_with_minimal_invest/minimal_invest.py b/examples/investment_with_minimal_invest/minimal_invest.py index 1b9b3c572..8e9944ede 100644 --- a/examples/investment_with_minimal_invest/minimal_invest.py +++ b/examples/investment_with_minimal_invest/minimal_invest.py @@ -2,10 +2,22 @@ """ Example that shows how to use "Offset-Invest". +Code +---- +Download source code: :download:`minimal_invest.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/investment_with_minimal_invest/minimal_invest.py + :language: python + :lines: 31- + Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] License @@ -69,8 +81,8 @@ def main(): eta = 0.8 # non offset invest - trafo = solph.components.Transformer( - label="transformer", + trafo = solph.components.Converter( + label="converter", inputs={bus_0: solph.Flow()}, outputs={ bus_1: solph.Flow( @@ -117,11 +129,11 @@ def main(): # Nachvollziehen der Berechnung # Kosten Invest - p_invest = solph.views.node(results, "transformer")["scalars"][ - (("transformer", "bus_1"), "invest") + p_invest = solph.views.node(results, "converter")["scalars"][ + (("converter", "bus_1"), "invest") ] - invest_binary = solph.views.node(results, "transformer")["scalars"][ - (("transformer", "bus_1"), "invest_status") + invest_binary = solph.views.node(results, "converter")["scalars"][ + (("converter", "bus_1"), "invest_status") ] c_invest = p_invest * c_var + c_fix * invest_binary @@ -157,8 +169,8 @@ def main(): ) print( "Maximale Leistung im Einsatz", - solph.views.node(results, "transformer")["sequences"][ - (("transformer", "bus_1"), "flow") + solph.views.node(results, "converter")["sequences"][ + (("converter", "bus_1"), "flow") ].max(), ) if p_invest > max(data): diff --git a/examples/min_max_runtimes/min_max_runtimes.py b/examples/min_max_runtimes/min_max_runtimes.py index 54ee37159..46a56deed 100644 --- a/examples/min_max_runtimes/min_max_runtimes.py +++ b/examples/min_max_runtimes/min_max_runtimes.py @@ -5,11 +5,23 @@ ------------------- Example that illustrates how to model min and max runtimes. +Code +---- +Download source code: :download:`min_max_runtimes.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/min_max_runtimes/min_max_runtimes.py + :language: python + :lines: 33- + Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] diff --git a/examples/offset_converter_example/diesel_genset_data.csv b/examples/offset_converter_example/diesel_genset_data.csv new file mode 100644 index 000000000..879824571 --- /dev/null +++ b/examples/offset_converter_example/diesel_genset_data.csv @@ -0,0 +1,8761 @@ +Demand,SolarGen +4.22474,0 +4.45403,0 +5.3011,0 +3.16906,0 +10.03151,0 +13.2778,0 +19.24819,0.102 +17.00729,0.31 +16.53521,0.484 +19.5529,0.627 +23.8912,0.691 +25.88103,0.705 +23.11513,0.666 +20.05156,0.584 +20.22608,0.452 +22.63168,0.272 +31.45385,0.075 +43.30997,0 +45.99877,0 +69.80705,0 +47.07643,0 +25.4737,0 +11.59541,0 +5.23135,0 +5.02319,0 +3.32235,0 +3.7696,0 +4.62483,0 +9.43047,0 +13.53437,0 +17.93359,0.081 +18.31902,0.262 +14.79921,0.426 +23.49871,0.511 +18.50075,0.594 +23.06378,0.632 +23.47799,0.632 +18.15995,0.555 +24.54657,0.426 +27.33855,0.259 +29.81535,0.074 +43.87063,0 +48.51107,0 +73.68254,0 +42.12253,0 +18.66909,0 +12.64807,0 +6.19575,0 +5.09342,0 +4.18958,0 +5.23064,0 +5.67486,0 +11.11339,0 +13.291,0 +22.87269,0.108 +17.22755,0.313 +18.99219,0.485 +19.45546,0.624 +26.53453,0.692 +27.89729,0.707 +24.02282,0.668 +23.67693,0.59 +26.78275,0.463 +25.48228,0.286 +34.94128,0.084 +53.36549,0 +61.26902,0 +67.07315,0 +59.52776,0 +28.99028,0 +16.58011,0 +5.36034,0 +4.7385,0 +3.83916,0 +3.05115,0 +3.73534,0 +7.21331,0 +10.76435,0 +15.6995,0.106 +13.15778,0.303 +16.68943,0.479 +17.99258,0.619 +19.53466,0.685 +19.8237,0.697 +20.22261,0.661 +14.19591,0.563 +19.64475,0.44 +17.82306,0.272 +22.66842,0.08 +31.80033,0 +38.56134,0 +46.8676,0 +37.57283,0 +20.03321,0 +10.47946,0 +5.45584,0 +5.0287,0 +4.93321,0 +4.58769,0 +5.13002,0 +11.05986,0 +14.81571,0 +19.69291,0.109 +14.89649,0.319 +17.81056,0.493 +20.46611,0.62 +22.65619,0.686 +22.4139,0.703 +26.20481,0.661 +20.73495,0.583 +25.38399,0.453 +22.7326,0.274 +30.63317,0.076 +35.20841,0 +64.42321,0 +74.74342,0 +47.80456,0 +23.97433,0 +14.37736,0 +5.71425,0 +4.26995,0 +5.05298,0 +4.51067,0 +4.69231,0 +10.36802,0 +13.62933,0 +20.37952,0.105 +15.31292,0.314 +16.6966,0.49 +20.16643,0.638 +27.43088,0.7 +23.0167,0.714 +22.84244,0.675 +21.51039,0.596 +21.19772,0.466 +20.21964,0.287 +30.39236,0.083 +45.38985,0 +68.50704,0 +64.03693,0 +56.474,0 +27.47291,0 +13.10015,0 +5.69868,0 +3.75114,0 +4.73138,0 +3.75075,0 +3.85098,0 +8.39239,0 +12.01005,0 +16.57572,0.128 +13.64969,0.345 +16.92931,0.518 +16.18982,0.635 +21.117,0.699 +18.98579,0.714 +22.38616,0.676 +21.0621,0.599 +19.97967,0.472 +19.40516,0.286 +25.79622,0.083 +36.65529,0 +51.50643,0 +57.13331,0 +41.56129,0 +21.39163,0 +11.94513,0 +5.51807,0 +4.60647,0 +3.84783,0 +4.52635,0 +4.5976,0 +13.42174,0 +12.47641,0 +19.50874,0.131 +15.90901,0.35 +17.58157,0.523 +23.58609,0.646 +21.86183,0.707 +26.98045,0.72 +25.5118,0.682 +27.77952,0.599 +21.29681,0.461 +20.97275,0.276 +31.52303,0.079 +43.87461,0 +70.53776,0 +77.01289,0 +59.59741,0 +26.36914,0 +11.42377,0 +6.27767,0 +4.19493,0 +4.44985,0 +4.12294,0 +4.81801,0 +7.2027,0 +13.15496,0 +17.36991,0.147 +16.25177,0.367 +12.36741,0.539 +20.03644,0.653 +25.90832,0.714 +22.68127,0.727 +18.79482,0.693 +24.72683,0.615 +23.33262,0.488 +20.35606,0.293 +27.66641,0.088 +31.71608,0 +53.76698,0 +55.14842,0 +51.0227,0 +22.19222,0 +12.67791,0 +5.40975,0 +5.1139,0 +4.48678,0 +5.68419,0 +4.44337,0 +11.09467,0 +17.23192,0 +21.8523,0.11 +19.13065,0.316 +22.68035,0.496 +24.3969,0.631 +25.54604,0.692 +26.74864,0.705 +31.96965,0.67 +28.11172,0.59 +29.17624,0.459 +26.32814,0.28 +29.9675,0.081 +49.40399,0 +62.7131,0 +77.239,0 +53.14018,0 +24.60229,0 +16.09214,0 +6.04622,0 +5.07247,0 +4.7527,0 +4.51144,0 +5.76064,0 +12.5561,0 +14.83993,0 +20.41778,0.115 +15.56702,0.324 +16.23823,0.503 +19.43922,0.616 +29.87408,0.68 +25.31074,0.698 +27.84674,0.657 +25.05055,0.578 +24.27476,0.447 +19.38161,0.266 +31.87432,0.073 +46.08667,0 +57.17426,0 +68.24239,0 +57.24497,0 +27.11754,0 +16.14363,0 +5.54631,0 +4.56197,0 +5.39893,0 +5.57636,0 +4.5123,0 +10.067,0 +13.55532,0 +16.00822,0.098 +11.62713,0.301 +17.13928,0.479 +19.19901,0.634 +22.79117,0.698 +27.61017,0.715 +26.77469,0.68 +22.27408,0.604 +20.93919,0.477 +20.87823,0.3 +30.50277,0.093 +44.54269,0 +51.76476,0 +63.81319,0 +44.58174,0 +24.84816,0 +15.49837,0 +5.32578,0 +4.635,0 +5.09351,0 +4.82831,0 +5.42722,0 +11.03734,0 +13.34206,0 +18.80908,0.125 +16.21671,0.341 +17.1759,0.513 +20.09924,0.632 +25.5697,0.694 +22.47107,0.706 +24.20657,0.663 +25.78094,0.585 +28.1929,0.46 +25.05568,0.284 +32.92701,0.084 +42.30497,0 +70.02921,0 +85.62541,0 +62.24389,0 +28.34723,0 +17.49688,0 +5.51629,0 +4.27596,0 +3.94559,0 +3.26052,0 +3.59081,0 +8.82459,0 +11.73501,0 +16.09011,0.117 +14.92238,0.329 +12.77877,0.504 +16.83617,0.623 +21.38418,0.689 +19.22894,0.702 +24.73825,0.653 +17.63523,0.559 +22.79765,0.43 +21.57141,0.259 +21.18503,0.073 +40.01648,0 +46.89939,0 +54.68934,0 +40.22745,0 +21.63884,0 +10.47431,0 +4.83993,0 +5.60233,0 +4.85207,0 +5.90318,0 +4.78722,0 +12.66486,0 +12.5411,0 +23.08354,0.091 +15.39583,0.283 +17.31278,0.457 +22.01096,0.621 +29.211,0.687 +29.18253,0.703 +22.76948,0.655 +26.13165,0.565 +29.59085,0.426 +32.60957,0.245 +32.30623,0.067 +44.35585,0 +68.58435,0 +78.30628,0 +57.02617,0 +27.80926,0 +14.08147,0 +5.517,0 +5.05333,0 +4.26794,0 +4.12788,0 +3.5585,0 +8.57892,0 +10.10733,0 +16.90793,0.107 +14.72118,0.31 +18.51561,0.484 +20.29659,0.607 +19.35674,0.677 +19.30178,0.695 +20.66551,0.653 +21.18514,0.575 +25.49557,0.445 +21.22971,0.256 +27.04464,0.07 +37.22264,0 +51.53411,0 +51.1758,0 +52.77681,0 +26.80418,0 +11.09544,0 +4.77749,0 +5.26395,0 +5.75921,0 +4.63375,0 +4.76443,0 +11.287,0 +15.77922,0 +22.09458,0.111 +18.08013,0.293 +17.72057,0.451 +22.02357,0.577 +26.95584,0.644 +28.37599,0.665 +28.20368,0.635 +22.45695,0.549 +28.7079,0.41 +28.92758,0.229 +34.9099,0.064 +52.43333,0 +66.33391,0 +75.38024,0 +49.63446,0 +26.87657,0 +16.86659,0 +6.23322,0 +5.52703,0 +5.74881,0 +5.3713,0 +6.11413,0 +13.54442,0 +18.24856,0 +21.64105,0.131 +18.74778,0.345 +22.80683,0.517 +24.4403,0.624 +28.93786,0.691 +29.37241,0.709 +32.97155,0.676 +27.99287,0.596 +27.59706,0.463 +30.20039,0.283 +33.37451,0.085 +55.74126,0 +73.14426,0 +71.19209,0 +60.3283,0 +31.21212,0 +17.05691,0 +7.17809,0 +6.39386,0 +5.55334,0 +5.6757,0 +5.76154,0 +10.84548,0 +15.69932,0 +21.20197,0.1 +19.98214,0.277 +21.27332,0.44 +23.99427,0.578 +30.09368,0.651 +27.42096,0.668 +24.74882,0.629 +29.01409,0.537 +33.86689,0.397 +29.88834,0.228 +34.99342,0.067 +54.52785,0 +70.66375,0 +75.12746,0 +57.08071,0 +33.05672,0 +16.17854,0 +7.166,0 +3.06883,0 +4.02678,0 +4.16078,0 +4.55347,0 +9.64651,0 +12.96538,0 +19.03797,0.137 +12.14515,0.355 +15.59597,0.53 +18.54268,0.648 +23.92393,0.712 +23.61202,0.728 +21.81173,0.699 +20.52792,0.622 +22.89687,0.494 +18.46921,0.315 +28.18992,0.103 +41.46674,0 +50.57726,0 +69.70188,0 +34.56152,0 +20.99043,0 +12.88343,0 +5.42249,0 +5.97611,0 +5.54455,0 +5.43051,0 +6.26333,0 +12.0699,0 +15.40028,0 +23.21107,0.145 +18.0847,0.362 +18.61875,0.531 +27.30837,0.646 +28.62478,0.708 +27.02862,0.717 +26.4128,0.674 +27.57351,0.605 +28.58316,0.492 +29.28425,0.318 +40.92909,0.104 +51.85682,0 +62.6438,0 +73.92183,0 +52.74439,0 +29.12267,0 +15.12717,0 +7.11389,0 +4.65202,0 +3.99487,0 +4.29901,0 +5.64846,0 +12.42496,0 +12.60396,0 +20.07876,0.147 +17.03814,0.366 +18.13486,0.535 +19.8784,0.653 +19.76895,0.72 +21.58002,0.736 +24.29634,0.707 +20.83278,0.629 +27.94138,0.501 +20.21084,0.32 +25.49728,0.105 +48.81399,0 +66.8979,0 +70.05319,0 +52.82597,0 +27.12173,0 +11.72392,0 +6.9548,0 +5.42967,0 +5.12269,0 +5.45386,0 +5.69074,0 +11.69871,0 +14.90536,0 +23.49752,0.118 +17.45982,0.312 +17.42011,0.468 +26.14366,0.57 +28.127,0.645 +24.7077,0.683 +30.24003,0.66 +23.82918,0.584 +28.15801,0.451 +24.48801,0.279 +32.9824,0.086 +53.84588,0 +74.14465,0 +74.54256,0 +55.80057,0 +32.35664,0 +14.67696,0 +6.71978,0 +4.57117,0 +4.74413,0 +5.12863,0 +5.79013,0 +10.92811,0 +14.796,0 +21.8698,0.071 +18.57927,0.209 +19.80714,0.367 +26.44879,0.527 +27.54039,0.643 +28.87201,0.679 +29.5893,0.654 +25.71733,0.576 +25.20462,0.438 +23.77344,0.265 +33.52254,0.079 +51.31869,0 +74.5057,0 +81.5589,0 +62.15971,0 +32.42635,0 +16.37148,0 +7.07516,0 +4.10559,0 +4.54625,0 +5.08968,0 +5.00149,0 +10.56117,0 +13.91924,0 +19.3479,0.091 +16.93252,0.278 +21.20731,0.459 +24.25149,0.587 +24.69981,0.656 +23.58455,0.668 +23.93179,0.629 +22.09412,0.535 +23.19437,0.395 +27.62766,0.231 +28.64579,0.067 +40.26374,0 +59.88071,0 +70.95802,0 +46.16549,0 +28.12407,0 +15.60376,0 +6.23282,0 +4.81557,0 +4.78858,0 +6.09577,0 +6.00467,0 +11.21538,0 +16.29198,0 +22.74779,0.109 +20.48569,0.282 +19.80066,0.437 +23.48432,0.572 +28.50465,0.659 +29.27761,0.68 +24.03921,0.645 +23.76077,0.563 +28.0905,0.435 +26.95595,0.263 +36.63153,0.079 +48.76536,0 +62.86446,0 +61.65066,0 +57.00964,0 +27.97315,0 +13.66937,0 +5.82252,0 +4.97401,0 +4.64914,0 +5.66615,0 +5.13243,0 +11.7456,0 +17.19412,0 +19.67043,0.068 +17.49621,0.256 +19.99454,0.472 +23.67923,0.626 +30.35702,0.699 +29.04614,0.716 +24.5172,0.687 +21.19254,0.607 +29.29963,0.473 +30.76757,0.291 +32.19493,0.09 +47.11145,0 +65.88096,0 +74.6941,0 +54.80101,0 +25.42399,0 +13.82438,0 +5.9817,0 +4.41147,0 +4.33208,0 +3.5319,0 +4.49988,0 +8.82441,0 +11.94427,0 +17.50052,0.102 +13.49696,0.293 +16.81667,0.454 +19.09476,0.579 +24.26289,0.662 +17.62678,0.685 +24.05858,0.652 +20.90855,0.544 +24.01913,0.356 +16.66146,0.201 +28.87985,0.058 +39.51957,0 +55.89495,0 +66.10152,0 +46.93071,0 +23.21146,0 +13.3664,0 +5.08442,0 +3.63747,0 +4.71405,0 +4.90189,0 +5.42527,0 +8.60872,0 +11.84128,0 +21.35464,0.094 +11.90722,0.269 +18.76051,0.428 +19.50879,0.547 +24.60951,0.606 +24.72763,0.63 +22.77002,0.591 +27.1308,0.517 +20.83169,0.411 +20.93145,0.244 +28.37071,0.071 +44.74666,0 +42.20142,0 +72.12677,0 +55.25781,0 +22.49839,0 +16.08666,0 +5.97077,0 +4.82973,0 +4.75428,0 +4.93016,0 +5.19168,0 +11.84132,0 +16.68356,0 +19.46498,0.073 +18.52697,0.224 +16.79648,0.398 +20.77581,0.542 +23.78806,0.622 +24.89729,0.621 +24.22659,0.557 +27.92576,0.453 +23.00397,0.342 +26.36874,0.202 +34.05191,0.064 +47.98429,0 +67.27352,0 +82.87606,0 +52.86699,0 +32.58827,0 +17.37207,0 +6.15275,0 +4.89473,0 +4.13445,0 +4.55076,0 +3.49791,0 +7.33857,0 +11.20745,0 +20.37969,0.108 +15.18927,0.304 +16.29279,0.469 +20.53999,0.56 +23.61687,0.616 +26.70228,0.611 +22.44263,0.549 +23.11872,0.436 +22.04556,0.258 +23.91815,0.115 +33.03593,0.028 +49.16157,0 +62.71341,0 +66.72736,0 +45.57348,0 +27.46824,0 +12.89558,0 +6.20229,0 +3.9103,0 +3.84793,0 +2.9878,0 +3.34327,0 +8.52997,0 +10.116,0 +14.4465,0.071 +14.9816,0.213 +12.81663,0.352 +10.60293,0.472 +15.66741,0.567 +21.03115,0.612 +17.88237,0.605 +19.30925,0.511 +22.0943,0.285 +22.46617,0.108 +20.85183,0.026 +32.22508,0 +46.46455,0 +51.47283,0 +36.24519,0 +20.34697,0 +13.62285,0 +4.29345,0 +4.00713,0 +4.85722,0 +5.07437,0 +4.33784,0 +8.8596,0 +15.95265,0 +19.86207,0.104 +15.41135,0.296 +16.4563,0.475 +19.67751,0.595 +20.92466,0.657 +21.34684,0.67 +25.57576,0.616 +16.22164,0.515 +23.35853,0.37 +23.70479,0.19 +23.54548,0.049 +51.21217,0 +48.75223,0 +65.17768,0 +50.9906,0 +21.71501,0 +11.43366,0 +5.61385,0 +4.48318,0 +5.46616,0 +4.92408,0 +5.54057,0 +9.21443,0 +15.22005,0 +21.19499,0.109 +18.57747,0.308 +18.62641,0.478 +22.48645,0.619 +27.24784,0.685 +21.23909,0.696 +30.3518,0.664 +24.2429,0.582 +28.07944,0.449 +26.93654,0.268 +32.09651,0.078 +58.72453,0 +59.48673,0 +72.43135,0 +51.08755,0 +23.33073,0 +13.76019,0 +6.77145,0 +5.32631,0 +3.93223,0 +5.72542,0 +5.38178,0 +11.49801,0 +14.8319,0 +19.18355,0.118 +16.11138,0.326 +18.61894,0.501 +21.41328,0.626 +29.64192,0.691 +29.35194,0.707 +25.87578,0.683 +24.77252,0.607 +26.67083,0.477 +26.20021,0.297 +30.66316,0.094 +47.93635,0 +69.9567,0 +79.58562,0 +61.6385,0 +29.86475,0 +11.76743,0 +7.37178,0 +4.99933,0 +4.77245,0 +3.80724,0 +4.92798,0 +8.99152,0 +13.99881,0 +14.53688,0.13 +15.48787,0.345 +15.81088,0.519 +20.22914,0.646 +23.70306,0.707 +21.25045,0.719 +21.69936,0.683 +22.28558,0.601 +23.28299,0.465 +27.49505,0.281 +28.64849,0.082 +31.91533,0 +46.65685,0 +60.18981,0 +42.13874,0 +24.21184,0 +9.04184,0 +4.28577,0 +6.06498,0 +5.28006,0 +4.96292,0 +5.91858,0 +11.82597,0 +16.09033,0 +22.50539,0.114 +17.60378,0.322 +18.74413,0.501 +25.61081,0.639 +27.24768,0.706 +27.67332,0.722 +25.47852,0.686 +26.39984,0.587 +22.18491,0.425 +27.20817,0.234 +35.13534,0.07 +53.87173,0 +58.55214,0 +100.20537,0 +59.78158,0 +25.13211,0 +16.61984,0 +6.50734,0 +4.59075,0 +5.40854,0 +4.94876,0 +5.80271,0 +9.32256,0 +13.70128,0 +17.29193,0.101 +15.94695,0.304 +18.36284,0.5 +20.88699,0.649 +21.57202,0.712 +20.39485,0.727 +26.82716,0.677 +22.89416,0.591 +27.92608,0.452 +26.8119,0.266 +29.77494,0.075 +45.73416,0 +66.07201,0 +79.39511,0 +46.53132,0 +26.98099,0 +12.99074,0 +6.5435,0 +3.91289,0 +3.38812,0 +3.24737,0 +4.17285,0 +10.30224,0 +13.41073,0 +17.28589,0.106 +12.09046,0.305 +15.81365,0.474 +18.37917,0.588 +20.41321,0.649 +21.91424,0.657 +20.95446,0.618 +14.72711,0.53 +24.59457,0.396 +16.56506,0.226 +25.43575,0.067 +33.40405,0 +55.15457,0 +53.49979,0 +38.37103,0 +22.6727,0 +15.00211,0 +4.65289,0 +5.76908,0 +5.43781,0 +5.01277,0 +4.99089,0 +11.46147,0 +15.35168,0.001 +22.3353,0.123 +17.81362,0.325 +18.78489,0.49 +22.7097,0.61 +31.45853,0.68 +23.73012,0.702 +28.81757,0.655 +24.83807,0.579 +28.33501,0.451 +25.66902,0.272 +28.76151,0.079 +52.50688,0 +72.60031,0 +68.50616,0 +49.16298,0 +23.84431,0 +16.20212,0 +6.62153,0 +4.11431,0 +4.63443,0 +4.31153,0 +4.47329,0 +9.22913,0 +15.42213,0.001 +19.83051,0.124 +15.5681,0.337 +23.45272,0.513 +22.1655,0.632 +25.60482,0.699 +32.58614,0.716 +23.39061,0.672 +23.00922,0.595 +24.27787,0.466 +27.12649,0.284 +29.88158,0.089 +50.83658,0 +70.82741,0 +69.04431,0 +44.87258,0 +26.3334,0 +14.66662,0 +7.24257,0 +5.66242,0 +5.39128,0 +4.70077,0 +5.37192,0 +10.18433,0 +13.48252,0.001 +23.30071,0.13 +16.15072,0.342 +19.40707,0.515 +20.5145,0.643 +27.12068,0.71 +25.2097,0.727 +29.58187,0.689 +21.82281,0.599 +25.0899,0.453 +25.38372,0.266 +31.8401,0.082 +50.93224,0 +69.63447,0 +80.84992,0 +42.9598,0 +25.5279,0 +15.06924,0 +6.10873,0 +5.14504,0 +4.87656,0 +5.35,0 +5.32071,0 +10.27012,0 +13.07266,0.001 +18.57193,0.125 +16.53757,0.322 +19.21634,0.48 +20.39836,0.608 +25.97327,0.694 +27.03095,0.715 +19.92162,0.682 +22.99954,0.612 +26.38925,0.486 +22.22026,0.307 +32.79513,0.101 +48.61609,0 +53.54638,0 +70.45458,0 +46.65835,0 +24.83816,0 +13.90675,0 +6.40713,0 +5.30355,0 +5.01396,0 +5.46664,0 +4.98985,0 +11.54241,0 +15.76109,0.001 +21.52653,0.108 +15.24064,0.28 +21.18236,0.481 +25.3399,0.626 +28.08041,0.694 +26.58542,0.698 +26.97754,0.658 +24.86603,0.57 +27.36722,0.421 +30.41848,0.239 +33.8679,0.069 +44.75953,0 +68.45923,0 +78.90634,0 +58.98839,0 +23.03012,0 +16.77074,0 +6.21351,0 +5.71782,0 +5.27238,0 +5.89049,0 +4.59842,0 +11.41066,0 +15.99496,0.001 +21.1549,0.153 +16.21963,0.371 +20.09775,0.547 +19.50012,0.676 +26.3323,0.739 +30.65678,0.752 +26.42984,0.708 +28.06403,0.625 +29.47598,0.49 +30.9299,0.305 +31.07595,0.098 +51.47647,0 +65.85893,0 +71.00151,0 +56.60024,0 +33.30018,0 +17.00386,0 +7.03141,0 +3.91826,0 +4.11468,0 +3.86628,0 +4.5773,0 +8.25094,0 +12.2638,0.001 +16.92679,0.116 +14.33923,0.324 +17.68904,0.507 +21.39042,0.633 +22.51235,0.698 +19.99599,0.701 +29.06021,0.624 +20.36902,0.548 +26.20806,0.421 +22.39008,0.244 +28.67105,0.069 +37.23745,0 +51.0552,0 +65.87714,0 +50.59325,0 +20.56705,0 +13.04367,0 +5.8755,0 +5.39412,0 +5.7095,0 +6.61336,0 +5.39438,0 +13.93296,0 +14.86081,0 +21.11751,0.073 +19.1107,0.237 +21.68617,0.441 +22.09863,0.562 +30.61851,0.607 +32.7256,0.618 +25.3424,0.55 +29.77963,0.424 +30.44846,0.275 +31.33353,0.141 +37.02186,0.039 +53.43919,0 +72.17683,0 +100.0929,0 +62.48585,0 +29.5529,0 +17.46044,0 +6.44305,0 +4.66261,0 +5.11235,0 +3.89426,0 +4.4282,0 +10.3933,0 +12.3475,0 +20.34228,0.082 +14.18685,0.247 +16.01656,0.401 +22.6255,0.521 +24.84386,0.615 +24.16886,0.664 +27.7161,0.657 +22.14568,0.584 +25.27975,0.463 +20.32758,0.292 +27.93597,0.094 +39.54317,0 +54.83108,0 +51.92108,0 +51.2779,0 +23.44328,0 +12.33097,0 +6.44398,0 +5.32619,0 +5.00796,0 +5.20533,0 +5.30194,0 +10.84792,0 +12.21679,0.002 +20.73741,0.149 +19.48152,0.371 +16.695,0.545 +24.0277,0.66 +26.20741,0.728 +25.52665,0.745 +28.92184,0.703 +21.75417,0.623 +27.4002,0.493 +28.14231,0.311 +35.88368,0.105 +39.54689,0 +58.05187,0 +73.77818,0 +60.43342,0 +26.98891,0 +16.30277,0 +5.19547,0 +6.51541,0 +6.76803,0 +5.25907,0 +6.00871,0 +10.51623,0 +14.11446,0.002 +24.34829,0.152 +15.85422,0.372 +23.38588,0.545 +25.66911,0.66 +28.00149,0.724 +26.50083,0.74 +32.24634,0.697 +27.40303,0.621 +31.71933,0.492 +31.47507,0.31 +36.70137,0.104 +51.14526,0 +64.91289,0 +75.84698,0 +66.98103,0 +28.11878,0 +16.1643,0 +6.92017,0 +4.28955,0 +4.3322,0 +3.94026,0 +4.26366,0 +9.52546,0 +15.67559,0.001 +21.61957,0.119 +15.26093,0.327 +18.6877,0.505 +21.23216,0.609 +28.0367,0.676 +23.82476,0.692 +21.10787,0.656 +26.94788,0.572 +21.93746,0.436 +27.13248,0.255 +26.87959,0.076 +44.2581,0 +48.48813,0 +67.71174,0 +51.95574,0 +22.78881,0 +13.84232,0 +6.37056,0 +5.1987,0 +5.17749,0 +3.76463,0 +5.09304,0 +12.53108,0 +14.8672,0.001 +20.38054,0.109 +16.63659,0.302 +18.09572,0.471 +25.01076,0.582 +28.24378,0.648 +22.30339,0.664 +23.05638,0.632 +24.85524,0.543 +26.17048,0.41 +26.04888,0.222 +28.69656,0.057 +39.79287,0 +51.77514,0 +77.95431,0 +59.47389,0 +26.68657,0 +14.20805,0 +6.97168,0 +5.53879,0 +4.81556,0 +4.01817,0 +4.36499,0 +8.70843,0 +15.59884,0.002 +20.44719,0.139 +15.00221,0.353 +13.50629,0.526 +19.29955,0.645 +19.29813,0.714 +20.45811,0.733 +20.17697,0.702 +21.3077,0.619 +22.68806,0.484 +27.83195,0.301 +29.80376,0.103 +41.93034,0 +48.13672,0 +58.48096,0 +40.77911,0 +30.14023,0 +13.57126,0 +6.72725,0 +5.86902,0 +5.53172,0 +5.24861,0 +5.58294,0 +10.99799,0 +14.79209,0.002 +18.84998,0.148 +15.94198,0.363 +21.3122,0.536 +23.31052,0.653 +24.20463,0.718 +28.69619,0.733 +27.0746,0.696 +24.37813,0.617 +24.185,0.486 +30.44111,0.305 +34.05843,0.102 +51.76983,0 +64.45275,0 +71.58103,0 +57.79728,0 +29.23869,0 +15.0902,0 +6.2672,0 +4.37798,0 +4.258,0 +4.93396,0 +4.45148,0 +10.77232,0 +14.27786,0.001 +18.32692,0.1 +16.86786,0.289 +16.70567,0.46 +16.09551,0.584 +24.37919,0.662 +22.17451,0.683 +20.77768,0.632 +19.12615,0.54 +21.87844,0.393 +20.07221,0.219 +27.32628,0.063 +48.89309,0 +55.68371,0 +69.27229,0 +41.79594,0 +20.2572,0 +12.66538,0 +5.26503,0 +5.33283,0 +5.7156,0 +4.54438,0 +5.376,0 +10.64445,0 +14.1537,0.001 +20.31821,0.089 +16.60836,0.264 +18.10225,0.431 +25.35963,0.598 +23.9838,0.669 +19.96662,0.689 +28.08444,0.628 +24.69097,0.548 +30.68943,0.419 +23.95793,0.251 +29.51618,0.077 +52.03097,0 +67.78393,0 +76.31236,0 +53.00879,0 +28.16836,0 +13.52917,0 +6.44156,0 +4.39969,0 +4.88605,0 +5.5822,0 +5.38754,0 +10.60191,0 +12.70106,0.002 +20.50678,0.108 +16.05135,0.299 +15.24466,0.47 +19.72442,0.588 +26.07921,0.65 +22.8013,0.662 +27.81894,0.618 +23.84419,0.538 +27.11062,0.412 +20.60732,0.227 +23.72587,0.071 +39.88241,0 +68.51806,0 +67.56634,0 +55.92797,0 +26.89239,0 +13.88678,0 +7.01014,0 +3.49462,0 +4.38228,0 +4.32886,0 +3.34961,0 +8.02667,0 +11.2345,0.002 +16.38577,0.096 +15.81015,0.256 +14.50079,0.391 +17.35793,0.511 +18.75883,0.585 +20.68828,0.622 +23.03364,0.6 +20.61899,0.535 +27.08414,0.426 +22.29832,0.267 +23.69931,0.09 +47.63164,0 +47.03751,0 +59.47988,0 +36.22444,0 +23.91717,0 +12.56128,0 +5.61178,0 +6.27948,0 +4.99443,0 +4.71417,0 +4.9831,0 +8.94617,0 +15.69557,0.001 +20.7074,0.061 +17.41427,0.155 +20.73969,0.223 +23.26269,0.253 +23.86103,0.295 +25.45179,0.317 +26.70851,0.343 +24.80872,0.334 +30.34729,0.287 +26.28076,0.167 +35.7392,0.045 +45.53603,0 +72.75162,0 +66.69438,0 +56.92728,0 +29.33451,0 +16.47561,0 +7.46804,0 +4.19764,0 +4.10233,0 +4.77071,0 +4.06853,0 +9.80285,0 +13.692,0.001 +18.40154,0.077 +14.52581,0.201 +17.69926,0.315 +23.09948,0.413 +19.7946,0.455 +25.77704,0.444 +23.87029,0.386 +23.18803,0.302 +29.22193,0.235 +25.82299,0.12 +27.77029,0.038 +41.26162,0 +68.54635,0 +65.45237,0 +48.22958,0 +22.99355,0 +14.65956,0 +5.01556,0 +4.49712,0 +4.07894,0 +4.47835,0 +4.67739,0 +8.87285,0 +12.61793,0 +18.1132,0.056 +15.32056,0.192 +15.58074,0.367 +18.33119,0.491 +25.72155,0.55 +19.25227,0.555 +25.89702,0.512 +22.06786,0.399 +18.48933,0.288 +23.61069,0.175 +33.4522,0.058 +34.7204,0 +70.45656,0 +64.94217,0 +45.85264,0 +25.49101,0 +13.42432,0 +5.89507,0 +4.4129,0 +4.45955,0 +3.32827,0 +4.93752,0 +11.1058,0 +14.28317,0 +17.49913,0.057 +18.03027,0.185 +16.97243,0.376 +23.8278,0.536 +22.84976,0.609 +23.06214,0.602 +26.62156,0.514 +26.86231,0.35 +24.86454,0.237 +23.13744,0.137 +25.30457,0.044 +44.96687,0 +61.72681,0 +56.32522,0 +51.19723,0 +22.39203,0 +14.70152,0 +5.1457,0 +4.11158,0 +4.77021,0 +4.29875,0 +4.43081,0 +11.24624,0 +11.71583,0.002 +20.13243,0.108 +17.30372,0.286 +17.80768,0.447 +17.47331,0.611 +24.98431,0.68 +21.83245,0.677 +26.10091,0.568 +22.19088,0.473 +27.22085,0.323 +23.91168,0.177 +26.52784,0.05 +44.17797,0 +46.80018,0 +73.778,0 +44.55003,0 +26.27448,0 +15.5897,0 +6.6897,0 +5.10055,0 +4.7785,0 +5.48618,0 +5.23748,0 +10.77097,0 +16.07718,0.003 +23.66001,0.127 +16.33273,0.316 +21.13816,0.406 +22.84855,0.406 +25.56473,0.391 +26.69948,0.391 +28.27042,0.407 +22.47465,0.4 +34.08739,0.348 +30.34059,0.208 +36.34498,0.069 +54.92963,0 +61.6688,0 +78.08466,0 +55.96997,0 +29.97017,0 +16.9323,0 +6.5521,0 +4.94943,0 +5.10412,0 +5.36413,0 +6.08984,0 +11.69504,0 +16.71493,0.002 +23.8109,0.075 +13.99954,0.17 +17.64101,0.251 +23.88355,0.324 +25.98553,0.413 +28.85794,0.438 +26.55924,0.441 +29.0453,0.348 +26.22863,0.243 +31.23634,0.148 +34.08261,0.046 +50.25087,0 +74.83814,0 +82.77862,0 +57.24886,0 +27.04317,0 +15.79317,0 +6.79376,0 +4.07915,0 +4.42675,0 +5.24796,0 +4.7665,0 +8.47266,0 +12.4714,0.002 +21.30716,0.089 +16.80477,0.23 +19.13478,0.38 +17.8642,0.526 +28.805,0.646 +20.91957,0.663 +28.13946,0.584 +22.49792,0.418 +21.52867,0.257 +26.23442,0.148 +34.14454,0.048 +41.42271,0 +57.51278,0 +67.61745,0 +49.0806,0 +26.61565,0 +15.03657,0 +5.93811,0 +4.7879,0 +5.4544,0 +4.82305,0 +5.35541,0 +12.94545,0 +16.25137,0.003 +18.58165,0.122 +15.98412,0.3 +20.54236,0.443 +24.07475,0.549 +32.62679,0.626 +27.06137,0.66 +26.15281,0.634 +26.64673,0.55 +29.24378,0.421 +28.05157,0.243 +30.78012,0.077 +47.13718,0 +63.31971,0 +81.94839,0 +55.56224,0 +29.38759,0 +16.59683,0 +6.91219,0 +3.91882,0 +3.85737,0 +4.10439,0 +3.81834,0 +7.90886,0 +12.01526,0.004 +16.62631,0.131 +13.78045,0.314 +14.46715,0.463 +13.93056,0.583 +20.74554,0.647 +14.00752,0.679 +16.38612,0.633 +19.41768,0.514 +20.43307,0.367 +16.9084,0.214 +22.78066,0.072 +34.42578,0 +39.33443,0 +56.8165,0 +36.77079,0 +24.06494,0 +10.92155,0 +6.21815,0 +3.78059,0 +4.86203,0 +3.79584,0 +4.61102,0 +8.78124,0 +14.0041,0.002 +15.86166,0.089 +14.59399,0.232 +16.31144,0.371 +18.5204,0.479 +24.39697,0.516 +22.54273,0.512 +22.60456,0.487 +23.84125,0.413 +23.42515,0.305 +21.75995,0.175 +25.73118,0.056 +35.94578,0 +48.02541,0 +51.90609,0 +36.63013,0 +23.43285,0 +11.7796,0 +4.40506,0 +6.09389,0 +5.13981,0 +5.23155,0 +5.55681,0 +15.20794,0 +15.43417,0.004 +24.85934,0.134 +17.80512,0.341 +20.47998,0.517 +22.02229,0.662 +29.47338,0.718 +26.50381,0.717 +23.87352,0.676 +30.25738,0.592 +30.61988,0.46 +29.98877,0.292 +35.25457,0.108 +49.05424,0.001 +66.41507,0 +76.48278,0 +58.23339,0 +31.86252,0 +17.22729,0 +7.91982,0 +5.62029,0 +4.40464,0 +4.44359,0 +4.54372,0 +10.1041,0 +14.97975,0.005 +22.46572,0.18 +12.81263,0.403 +14.9419,0.571 +22.71446,0.682 +27.82126,0.746 +26.52469,0.76 +20.92903,0.722 +24.71236,0.638 +23.87073,0.506 +22.6619,0.337 +32.87364,0.137 +50.22011,0.002 +57.45592,0 +61.0549,0 +53.60859,0 +31.53791,0 +14.38298,0 +7.04051,0 +3.73708,0 +3.24615,0 +4.56146,0 +4.09446,0 +9.34782,0 +12.05155,0.005 +15.7118,0.157 +13.97428,0.38 +15.71383,0.564 +18.93735,0.689 +21.00666,0.752 +24.00487,0.767 +21.79868,0.738 +16.92506,0.662 +25.47512,0.534 +18.81404,0.354 +26.58698,0.14 +37.42203,0.002 +51.35256,0 +59.33592,0 +40.08266,0 +21.50771,0 +10.91669,0 +4.45831,0 +3.5126,0 +3.4559,0 +4.63602,0 +4.38732,0 +9.80252,0 +11.95323,0.004 +19.61418,0.135 +11.784,0.326 +15.95379,0.493 +17.17774,0.636 +22.23248,0.711 +24.38808,0.728 +24.72614,0.703 +21.32366,0.621 +22.799,0.489 +23.17293,0.311 +27.3859,0.107 +47.69089,0.001 +46.64842,0 +59.48305,0 +43.71919,0 +22.47779,0 +15.1836,0 +5.30078,0 +4.06605,0 +4.62212,0 +4.80766,0 +4.67775,0 +9.92833,0 +14.86411,0.004 +19.56926,0.137 +15.91632,0.334 +16.87115,0.498 +19.17774,0.612 +24.38838,0.68 +20.25813,0.684 +24.87346,0.647 +23.46568,0.562 +23.16386,0.414 +16.75115,0.241 +32.36755,0.07 +42.03593,0 +58.12435,0 +68.19031,0 +54.83855,0 +22.28078,0 +12.93169,0 +4.72679,0 +4.40266,0 +4.06898,0 +5.12078,0 +3.3828,0 +10.09231,0 +14.1185,0.004 +15.9256,0.131 +13.66419,0.339 +18.8637,0.508 +20.01889,0.623 +17.52179,0.677 +24.31715,0.674 +23.08017,0.616 +19.14286,0.506 +21.16094,0.379 +22.17525,0.211 +28.45657,0.065 +40.92352,0 +57.05069,0 +65.31461,0 +45.17542,0 +24.2598,0 +14.74223,0 +5.46264,0 +5.74233,0 +5.84632,0 +5.90878,0 +4.5066,0 +11.14914,0 +14.10859,0.004 +21.57486,0.114 +18.17263,0.31 +19.01471,0.458 +22.04863,0.566 +29.37723,0.633 +24.42195,0.639 +27.46241,0.597 +23.78728,0.516 +29.78926,0.399 +24.28573,0.221 +32.29025,0.079 +55.88075,0 +58.02722,0 +78.64343,0 +52.18833,0 +30.27339,0 +15.37716,0 +5.7944,0 +4.62793,0 +5.64219,0 +5.08664,0 +5.86601,0 +11.20299,0 +13.0308,0.003 +19.28058,0.091 +16.62097,0.226 +21.55381,0.353 +25.76251,0.474 +27.45124,0.556 +27.03923,0.608 +25.09772,0.607 +24.07812,0.493 +29.25664,0.274 +28.17289,0.142 +32.6342,0.053 +48.31407,0 +71.51771,0 +77.19458,0 +53.41161,0 +28.82368,0 +17.75003,0 +6.15991,0 +4.75697,0 +4.85154,0 +5.38487,0 +4.08296,0 +9.2266,0 +14.81228,0.003 +17.6436,0.086 +11.18781,0.254 +15.01006,0.454 +18.15562,0.601 +23.59816,0.673 +24.20303,0.698 +20.46174,0.683 +20.28263,0.6 +23.59876,0.453 +25.09342,0.269 +27.18944,0.094 +36.91312,0.001 +61.28974,0 +57.72148,0 +45.14477,0 +26.15556,0 +14.39608,0 +5.3033,0 +5.48841,0 +4.60119,0 +4.57541,0 +5.06201,0 +11.51425,0 +14.12098,0.005 +19.881,0.122 +17.128,0.316 +18.42216,0.492 +24.73803,0.617 +24.49523,0.687 +24.02758,0.705 +20.4373,0.681 +26.36059,0.597 +28.16231,0.466 +26.21679,0.286 +30.93224,0.098 +35.44704,0.001 +51.61838,0 +76.76602,0 +54.74857,0 +28.85788,0 +15.04378,0 +7.05468,0 +4.62079,0 +4.84918,0 +5.10349,0 +5.18941,0 +12.84122,0 +15.27343,0.004 +21.36794,0.118 +21.0977,0.309 +18.10917,0.48 +26.45005,0.607 +27.67749,0.684 +25.08299,0.703 +28.11592,0.673 +19.53811,0.589 +26.6916,0.456 +26.78872,0.29 +31.01494,0.104 +45.54693,0.002 +65.10218,0 +69.47716,0 +59.70089,0 +29.34849,0 +19.02414,0 +6.87471,0 +6.36971,0 +5.95924,0 +5.57337,0 +5.06656,0 +13.75464,0 +16.73994,0.005 +21.31215,0.133 +20.00762,0.319 +20.93016,0.468 +22.57794,0.56 +26.65052,0.632 +26.85319,0.655 +28.80525,0.651 +27.54361,0.574 +31.09927,0.449 +26.97109,0.287 +35.32002,0.102 +47.30239,0.001 +68.04239,0 +83.47224,0 +58.35329,0 +31.56299,0 +15.71792,0 +7.6066,0 +3.73666,0 +4.18676,0 +4.01086,0 +4.94344,0 +8.89243,0 +7.14634,0.003 +16.7225,0.076 +15.10365,0.199 +14.21001,0.312 +18.49337,0.409 +19.76085,0.458 +22.68644,0.474 +20.05701,0.475 +19.41779,0.42 +23.03029,0.272 +21.83701,0.122 +32.24683,0.027 +33.21048,0 +51.59071,0 +43.06986,0 +48.81191,0 +25.64075,0 +12.78287,0 +6.12371,0 +5.59765,0 +5.65547,0 +5.4431,0 +5.9055,0 +12.43082,0 +16.24507,0.003 +24.77148,0.083 +20.46554,0.197 +19.42524,0.305 +28.82519,0.408 +31.42534,0.474 +30.59355,0.482 +31.4202,0.406 +34.00371,0.317 +29.42555,0.177 +33.34032,0.083 +35.32604,0.027 +54.82368,0 +60.78501,0 +86.98958,0 +61.92965,0 +28.32164,0 +17.11123,0 +8.38988,0 +5.96246,0 +5.95399,0 +4.04241,0 +4.50067,0 +11.24575,0 +13.50322,0.006 +18.90919,0.134 +18.79862,0.329 +19.09071,0.499 +24.76221,0.619 +27.92139,0.684 +24.279,0.701 +23.65181,0.645 +23.09466,0.462 +30.58772,0.273 +27.19906,0.15 +36.85528,0.05 +56.14041,0 +62.83101,0 +82.42092,0 +51.31981,0 +25.37847,0 +15.94587,0 +6.33671,0 +5.12861,0 +5.61565,0 +5.28781,0 +4.66196,0 +13.94234,0 +12.18137,0.006 +18.42949,0.136 +17.86513,0.322 +16.08496,0.466 +25.85823,0.582 +25.69166,0.654 +29.32734,0.671 +26.44927,0.638 +26.26204,0.542 +24.42214,0.353 +25.73152,0.172 +33.16479,0.054 +49.01341,0 +65.36239,0 +84.2682,0 +50.96233,0 +25.46838,0 +16.3762,0 +7.78832,0 +5.45032,0 +4.96282,0 +5.32559,0 +4.8088,0 +8.43105,0 +16.37325,0.004 +21.35977,0.092 +17.00601,0.239 +21.67271,0.348 +22.29063,0.415 +24.90511,0.462 +25.81038,0.486 +19.84558,0.463 +25.40252,0.412 +25.9343,0.315 +27.46097,0.159 +33.19287,0.041 +44.43201,0 +62.51736,0 +78.0531,0 +50.93288,0 +32.87783,0 +15.26889,0 +5.51848,0 +4.67434,0 +4.25807,0 +4.33213,0 +4.66025,0 +10.70737,0 +13.67883,0.004 +16.68922,0.106 +17.06096,0.253 +15.5398,0.345 +16.53527,0.383 +27.44237,0.354 +23.19689,0.318 +23.03674,0.307 +21.10794,0.283 +22.30906,0.223 +26.55169,0.152 +30.99178,0.069 +38.56148,0.001 +58.17089,0 +44.81501,0 +45.97073,0 +21.33368,0 +13.36362,0 +6.30222,0 +3.92054,0 +3.87664,0 +4.43444,0 +4.61785,0 +10.5169,0 +11.82041,0.008 +21.0607,0.144 +15.97443,0.353 +16.80263,0.493 +22.64113,0.598 +23.03196,0.644 +23.64392,0.631 +20.39356,0.55 +22.04317,0.382 +23.08854,0.201 +23.09071,0.098 +31.17809,0.032 +41.53347,0 +59.07886,0 +59.00935,0 +41.16924,0 +26.48003,0 +15.27475,0 +6.72397,0 +5.35374,0 +5.68302,0 +4.17332,0 +5.1124,0 +9.83911,0 +13.55847,0.006 +22.3798,0.12 +18.02884,0.296 +13.57272,0.42 +24.20462,0.477 +27.95546,0.493 +24.45017,0.467 +24.85148,0.418 +20.94299,0.318 +23.81456,0.199 +26.85569,0.109 +24.88248,0.036 +42.84729,0 +64.30575,0 +61.50987,0 +49.37098,0 +27.18913,0 +12.52769,0 +6.221,0 +4.77767,0 +4.8005,0 +4.7921,0 +4.73992,0 +11.55984,0 +13.34307,0.006 +22.51027,0.125 +17.72647,0.299 +21.17859,0.434 +20.51612,0.557 +24.84696,0.593 +22.92761,0.587 +29.41412,0.54 +21.1289,0.435 +22.21014,0.291 +26.52295,0.145 +34.57795,0.052 +40.25205,0 +64.0771,0 +72.66967,0 +57.89911,0 +26.95982,0 +12.69877,0 +6.14331,0 +4.04505,0 +4.36785,0 +5.90088,0 +5.30162,0 +13.14691,0 +16.39537,0.005 +21.88977,0.107 +17.95662,0.287 +17.44902,0.469 +23.99181,0.615 +27.29804,0.691 +25.41266,0.719 +28.67787,0.696 +24.66914,0.621 +27.66848,0.491 +30.86169,0.326 +31.76119,0.128 +53.49197,0.003 +61.75025,0 +75.1637,0 +61.67165,0 +27.28883,0 +14.94421,0 +6.77979,0 +3.48239,0 +4.51302,0 +4.09564,0 +3.96185,0 +10.95067,0 +11.76519,0.007 +18.52259,0.133 +15.05965,0.312 +15.77655,0.479 +16.14123,0.596 +20.49418,0.666 +22.77138,0.662 +25.03854,0.571 +17.9128,0.467 +23.0653,0.377 +26.9448,0.222 +28.55928,0.078 +42.04566,0.001 +49.31667,0 +57.79841,0 +47.18334,0 +24.47402,0 +13.2505,0 +5.14842,0 +6.19605,0 +4.79767,0 +6.26598,0 +5.38997,0 +13.38511,0 +14.30812,0.006 +20.05853,0.107 +20.14924,0.27 +21.57083,0.436 +23.90606,0.572 +28.55371,0.646 +28.5811,0.662 +28.88448,0.611 +27.48127,0.501 +32.73414,0.363 +27.77104,0.21 +30.76602,0.078 +49.12085,0.002 +72.22573,0 +80.94456,0 +55.65314,0 +33.49989,0 +18.44096,0 +7.6395,0 +5.14651,0 +5.41238,0 +4.69951,0 +5.25311,0 +12.62162,0 +12.0233,0.007 +18.04482,0.125 +15.00412,0.307 +18.7296,0.468 +21.36013,0.578 +26.95855,0.628 +18.76814,0.567 +25.68486,0.552 +22.82835,0.529 +25.09214,0.455 +21.34151,0.29 +35.52094,0.117 +49.69673,0.003 +61.06909,0 +66.84497,0 +53.96779,0 +29.31722,0 +14.98824,0 +6.84968,0 +5.36069,0 +5.5133,0 +5.90181,0 +5.03403,0 +10.76799,0 +16.21558,0.007 +20.5425,0.132 +17.54575,0.322 +17.29485,0.485 +22.88333,0.651 +24.30231,0.714 +27.11599,0.735 +26.69414,0.707 +28.77168,0.629 +28.97404,0.502 +23.28007,0.329 +32.3352,0.131 +46.89556,0.004 +72.16283,0 +72.35044,0 +60.44895,0 +27.17215,0 +15.70653,0 +7.3621,0 +5.16904,0 +6.06463,0 +4.96564,0 +4.67347,0 +10.77785,0 +15.25788,0.004 +19.09887,0.088 +17.128,0.218 +19.24464,0.331 +19.908,0.418 +26.44766,0.479 +27.19811,0.487 +27.21819,0.442 +22.50443,0.378 +25.79832,0.286 +23.56497,0.175 +29.37097,0.066 +41.84549,0.002 +70.0302,0 +84.51241,0 +49.84683,0 +30.70538,0 +15.77703,0 +6.12647,0 +4.70538,0 +3.73102,0 +4.79648,0 +4.53338,0 +10.86835,0 +11.71175,0.009 +20.18064,0.157 +16.03317,0.348 +19.92222,0.505 +21.10187,0.629 +27.23092,0.689 +25.09362,0.683 +27.72633,0.627 +21.41905,0.5 +29.46992,0.303 +23.50168,0.164 +31.23966,0.058 +44.98031,0.001 +53.47051,0 +70.94365,0 +49.87641,0 +26.98442,0 +15.3709,0 +5.13074,0 +5.03459,0 +3.76853,0 +4.41254,0 +3.50859,0 +9.68258,0 +11.37597,0.003 +15.74967,0.077 +13.93019,0.194 +16.03782,0.321 +22.709,0.434 +23.48491,0.521 +24.4062,0.558 +19.75735,0.536 +18.83907,0.428 +26.41047,0.289 +25.59477,0.167 +24.10286,0.063 +33.37061,0.001 +58.23948,0 +55.51604,0 +47.58091,0 +24.23459,0 +11.68589,0 +6.61458,0 +4.71987,0 +5.85556,0 +4.90602,0 +4.54064,0 +10.13069,0 +16.27847,0.009 +20.90762,0.15 +18.5107,0.341 +20.75259,0.476 +23.46739,0.574 +26.8704,0.606 +24.67867,0.559 +29.48596,0.447 +20.6984,0.24 +26.44345,0.147 +26.12069,0.084 +35.3526,0.031 +42.88414,0 +67.06656,0 +62.8537,0 +61.2978,0 +29.3333,0 +15.86526,0 +8.00199,0 +5.04305,0 +3.52029,0 +3.38757,0 +4.52069,0 +10.95653,0 +11.99992,0.007 +22.50405,0.115 +11.20338,0.272 +14.03707,0.432 +20.28451,0.591 +20.64033,0.666 +21.49144,0.685 +18.4257,0.656 +21.98191,0.516 +19.77181,0.376 +16.47559,0.228 +23.02663,0.085 +36.52691,0.002 +61.61541,0 +58.04608,0 +40.83781,0 +25.50825,0 +10.08705,0 +5.33815,0 +4.94211,0 +4.61541,0 +4.56096,0 +3.6078,0 +9.3724,0 +13.85892,0.007 +22.2868,0.117 +13.45255,0.305 +19.10159,0.456 +22.32009,0.571 +24.54333,0.659 +25.25655,0.687 +27.59385,0.671 +28.75937,0.597 +28.83961,0.461 +22.71795,0.282 +29.05565,0.096 +49.50727,0.003 +71.38433,0 +74.7293,0 +55.04254,0 +27.53302,0 +14.23191,0 +6.49997,0 +4.36166,0 +3.45082,0 +2.98023,0 +3.58316,0 +6.82957,0 +8.36817,0.01 +17.44988,0.153 +12.10982,0.35 +13.09195,0.51 +17.85918,0.656 +20.79767,0.717 +22.76338,0.727 +17.44284,0.627 +20.30134,0.479 +23.75388,0.285 +17.50328,0.166 +22.29593,0.071 +39.43511,0.003 +46.50974,0 +50.95805,0 +48.09185,0 +25.91976,0 +11.41146,0 +4.46891,0 +5.20958,0 +4.88537,0 +4.89582,0 +5.16932,0 +10.03888,0 +14.6547,0.01 +20.36631,0.139 +17.78173,0.328 +17.81835,0.481 +25.21847,0.593 +30.23224,0.654 +25.62914,0.665 +26.80747,0.619 +26.01308,0.534 +29.62765,0.397 +26.50248,0.23 +31.80624,0.086 +40.03635,0.003 +70.28178,0 +76.20594,0 +53.26545,0 +22.38707,0 +17.95913,0 +6.35058,0 +4.44739,0 +4.68238,0 +4.89963,0 +4.62053,0 +10.98541,0 +12.51847,0.009 +17.66346,0.122 +16.97017,0.305 +19.24909,0.43 +25.05127,0.506 +24.54484,0.525 +21.32525,0.504 +23.52482,0.438 +22.01418,0.369 +24.88144,0.274 +22.05111,0.18 +28.61145,0.075 +47.56849,0.002 +57.33332,0 +58.41942,0 +50.80154,0 +23.208,0 +14.12404,0 +6.32317,0 +5.3858,0 +5.27368,0 +4.95893,0 +5.02699,0 +11.95124,0 +17.11403,0.008 +21.46186,0.127 +17.52755,0.337 +20.98785,0.496 +23.55311,0.606 +26.58193,0.66 +26.85029,0.678 +23.63159,0.639 +23.07977,0.551 +28.48965,0.419 +25.48551,0.217 +31.54369,0.066 +55.16012,0.001 +68.24029,0 +90.71973,0 +61.75296,0 +29.92908,0 +12.51971,0 +6.33645,0 +3.8932,0 +3.71857,0 +3.57543,0 +2.84082,0 +7.75011,0 +8.39212,0.011 +15.2714,0.158 +11.12967,0.35 +13.80426,0.494 +15.65834,0.614 +15.78834,0.683 +16.97438,0.692 +23.36678,0.647 +16.77804,0.485 +20.95369,0.396 +23.19842,0.215 +28.41088,0.075 +39.35954,0.002 +59.06478,0 +55.08181,0 +34.44834,0 +19.87505,0 +10.119,0 +3.20029,0 +4.39846,0 +4.46827,0 +5.0646,0 +4.19236,0 +10.87233,0 +12.59582,0.006 +17.48608,0.1 +10.52269,0.281 +19.87954,0.409 +22.21394,0.524 +23.80397,0.592 +22.69223,0.608 +24.41239,0.561 +24.01517,0.447 +17.36572,0.302 +21.45423,0.118 +28.79019,0.036 +41.06464,0 +49.40818,0 +72.19893,0 +58.39569,0 +27.17266,0 +14.94877,0 +6.56935,0 +5.21465,0 +4.63248,0 +4.2247,0 +5.25764,0 +8.58911,0 +15.43877,0.005 +20.48294,0.076 +15.87967,0.17 +18.57337,0.24 +18.74203,0.271 +22.01891,0.285 +21.05414,0.273 +26.26307,0.271 +22.45558,0.242 +29.18522,0.196 +21.50229,0.136 +21.75397,0.056 +39.63925,0.001 +59.93031,0 +66.39473,0 +54.35339,0 +27.27252,0 +14.4706,0 +6.52052,0 +6.49892,0 +5.24602,0 +5.02669,0 +5.72482,0 +14.04408,0 +19.62411,0.01 +22.3233,0.135 +15.8892,0.279 +23.02058,0.373 +27.1034,0.427 +30.3558,0.478 +33.74387,0.443 +35.54555,0.383 +25.8472,0.314 +33.27434,0.233 +30.09012,0.149 +37.11652,0.056 +58.23749,0.001 +62.92423,0 +81.65201,0 +59.53073,0 +27.66231,0 +19.47137,0 +7.74511,0 +3.71384,0 +3.1976,0 +3.36692,0 +4.50961,0 +7.83123,0 +11.13779,0.01 +11.72253,0.138 +13.86243,0.301 +14.00982,0.418 +18.09655,0.486 +22.97473,0.507 +18.54507,0.497 +15.50114,0.405 +18.0242,0.279 +20.83735,0.189 +17.21616,0.108 +24.49496,0.047 +32.15593,0.002 +51.2882,0 +54.64689,0 +36.10628,0 +19.9387,0 +9.47063,0 +5.09114,0 +5.03587,0 +4.9869,0 +5.21601,0 +4.45156,0 +8.38146,0 +13.50419,0.009 +22.21542,0.125 +15.49462,0.279 +18.2982,0.372 +19.50436,0.441 +25.43257,0.49 +24.89858,0.492 +28.17765,0.436 +22.73503,0.338 +24.82695,0.215 +23.29844,0.13 +33.69049,0.052 +40.84664,0.002 +65.22918,0 +61.30924,0 +44.39581,0 +27.63763,0 +12.43798,0 +6.22595,0 +5.22371,0 +5.85328,0 +5.70393,0 +5.58907,0 +12.13037,0 +16.48696,0.009 +23.00633,0.121 +17.83638,0.298 +22.90469,0.396 +22.44962,0.464 +32.95958,0.502 +27.34753,0.486 +30.19419,0.468 +24.88801,0.407 +29.38028,0.286 +25.28461,0.136 +36.32833,0.047 +50.96803,0.001 +65.68274,0 +84.86285,0 +63.3696,0 +31.78702,0 +13.72068,0 +7.18152,0 +4.71377,0 +5.68159,0 +4.31735,0 +5.96261,0 +11.55453,0 +14.82918,0.011 +22.95734,0.142 +15.68426,0.338 +18.61292,0.473 +20.77228,0.554 +28.18888,0.584 +30.88793,0.57 +27.88278,0.502 +26.5128,0.4 +31.254,0.253 +25.87109,0.115 +34.95969,0.038 +53.85796,0 +57.90467,0 +83.80922,0 +70.40492,0 +32.46433,0 +16.84988,0 +7.65872,0 +4.38667,0 +4.85489,0 +4.21897,0 +4.66114,0 +11.4224,0 +13.28359,0.009 +18.88716,0.098 +17.63494,0.222 +19.15969,0.322 +20.12139,0.355 +23.29641,0.377 +23.7333,0.36 +21.6595,0.307 +20.76593,0.238 +20.45441,0.178 +25.43571,0.111 +30.39487,0.044 +47.01864,0.001 +54.76598,0 +80.80522,0 +45.68465,0 +25.00628,0 +13.45516,0 +5.97741,0 +5.03692,0 +4.80841,0 +5.29652,0 +4.8633,0 +10.60091,0 +15.48148,0.013 +23.8889,0.139 +18.19778,0.312 +19.98481,0.486 +22.98931,0.594 +26.06518,0.636 +31.58899,0.638 +25.34197,0.558 +26.78506,0.402 +31.98851,0.231 +25.13845,0.145 +32.82201,0.064 +52.73775,0.003 +54.79208,0 +80.20376,0 +55.29624,0 +25.39075,0 +16.28616,0 +6.29736,0 +4.94849,0 +4.79499,0 +4.65078,0 +5.25252,0 +11.45335,0 +13.64803,0.01 +20.35472,0.111 +18.04205,0.253 +16.81275,0.349 +19.76558,0.378 +23.71291,0.39 +24.32287,0.364 +27.23321,0.318 +22.71209,0.264 +27.57546,0.19 +23.17998,0.102 +28.6965,0.04 +38.23905,0.001 +55.30054,0 +71.4794,0 +65.43991,0 +22.14308,0 +15.05523,0 +5.40161,0 +4.28606,0 +4.67039,0 +4.69703,0 +4.5935,0 +9.71559,0 +11.5482,0.006 +22.02529,0.09 +13.17701,0.222 +17.86651,0.352 +23.59787,0.429 +20.73639,0.466 +24.20224,0.446 +20.8584,0.391 +20.19416,0.322 +20.9187,0.237 +27.04848,0.138 +31.26801,0.048 +42.37752,0.001 +63.60885,0 +62.72666,0 +48.05936,0 +22.56935,0 +14.98242,0 +4.18792,0 +6.11957,0 +5.7039,0 +5.87944,0 +5.54384,0 +14.18413,0 +16.38022,0.015 +22.15084,0.171 +19.6853,0.353 +21.87133,0.473 +29.39808,0.548 +29.64222,0.596 +26.75653,0.578 +29.23933,0.45 +31.54517,0.325 +37.64399,0.227 +31.18139,0.129 +33.69171,0.05 +54.00296,0.001 +67.73544,0 +91.27569,0 +46.9355,0 +32.88347,0 +17.0689,0 +6.83087,0 +6.09312,0 +5.55128,0 +5.44715,0 +4.39504,0 +9.71791,0 +10.24343,0.009 +21.33131,0.119 +18.1577,0.283 +16.26751,0.42 +17.82688,0.481 +27.66022,0.522 +22.07591,0.527 +23.87835,0.439 +25.31767,0.339 +25.93046,0.226 +24.42823,0.142 +31.03472,0.059 +44.58373,0.002 +68.99922,0 +77.69488,0 +44.66163,0 +24.43395,0 +14.16772,0 +5.37387,0 +4.88407,0 +3.68545,0 +5.39424,0 +4.53605,0 +11.05024,0 +13.36666,0.015 +20.05025,0.165 +13.60528,0.351 +13.74141,0.478 +21.58287,0.569 +23.28932,0.617 +26.73263,0.603 +21.25041,0.497 +25.79451,0.347 +28.51914,0.192 +22.33873,0.095 +32.62996,0.031 +43.74178,0 +61.12134,0 +65.76898,0 +50.06395,0 +29.6192,0 +15.84729,0 +5.76733,0 +3.46528,0 +2.96591,0 +3.65057,0 +3.80376,0 +7.77014,0 +11.21488,0.003 +14.16821,0.059 +15.06128,0.162 +13.21775,0.274 +15.11427,0.377 +16.57915,0.422 +22.01378,0.423 +18.10158,0.395 +13.91888,0.341 +18.57434,0.251 +25.4699,0.157 +25.00252,0.06 +38.29823,0.002 +56.92824,0 +39.75676,0 +38.24911,0 +21.89446,0 +11.14323,0 +3.01262,0 +5.34528,0 +5.669,0 +4.92836,0 +4.72262,0 +11.45683,0 +15.3209,0.006 +24.15244,0.092 +16.04049,0.259 +22.19437,0.425 +27.16739,0.528 +33.15925,0.562 +27.66414,0.557 +25.68344,0.5 +24.96984,0.401 +29.52077,0.3 +26.57338,0.193 +35.33203,0.09 +46.5397,0.005 +56.1857,0 +75.40011,0 +56.1462,0 +21.1911,0 +18.76849,0 +7.54263,0 +5.21133,0 +4.2399,0 +5.09289,0 +4.19128,0 +11.10051,0 +14.05811,0.006 +19.54483,0.084 +17.16343,0.203 +18.66562,0.322 +19.46757,0.42 +19.09139,0.471 +25.28015,0.488 +24.45351,0.454 +24.20082,0.368 +25.28951,0.266 +28.19155,0.148 +34.62329,0.066 +42.87098,0.003 +58.24965,0 +67.72605,0 +51.27116,0 +26.04495,0 +15.69514,0 +6.30228,0 +4.07388,0 +4.87629,0 +4.59625,0 +4.10295,0 +10.47729,0 +15.73458,0.005 +20.60705,0.1 +14.75284,0.251 +19.76832,0.302 +21.3669,0.335 +23.99218,0.413 +29.13331,0.477 +23.74982,0.467 +24.62008,0.393 +28.70575,0.325 +20.74353,0.212 +24.91374,0.1 +51.44958,0.007 +59.84071,0 +74.1192,0 +45.37121,0 +25.71022,0 +14.86743,0 +6.93654,0 +4.34316,0 +4.79875,0 +3.04316,0 +4.34622,0 +11.34098,0 +11.98147,0.014 +20.57206,0.161 +13.52576,0.351 +15.57219,0.522 +20.65985,0.63 +20.70438,0.683 +22.41994,0.667 +25.47133,0.636 +17.47702,0.554 +20.68525,0.432 +25.83018,0.245 +32.34383,0.088 +50.28138,0.004 +65.23714,0 +63.14514,0 +42.02977,0 +23.12888,0 +15.29441,0 +4.7924,0 +5.5613,0 +4.80442,0 +4.374,0 +4.42426,0 +9.90926,0 +12.41827,0.013 +18.36295,0.129 +18.268,0.279 +15.32762,0.406 +19.84191,0.474 +25.70912,0.493 +24.18408,0.471 +24.94841,0.371 +22.62102,0.28 +21.59638,0.19 +21.85787,0.12 +31.05631,0.051 +50.15908,0.002 +62.43499,0 +61.4237,0 +50.53625,0 +25.62839,0 +14.47833,0 +5.20192,0 +4.87826,0 +4.39987,0 +5.30289,0 +4.36226,0 +9.92322,0 +15.76433,0.003 +16.95996,0.052 +10.82879,0.134 +17.79206,0.211 +21.0228,0.283 +24.39817,0.298 +26.17139,0.29 +20.95187,0.248 +20.77426,0.197 +22.50959,0.149 +25.64743,0.092 +27.43243,0.036 +43.1053,0.001 +59.99039,0 +71.36843,0 +52.05799,0 +27.77402,0 +16.49457,0 +6.17046,0 +5.70257,0 +5.64439,0 +5.90974,0 +5.04689,0 +11.48968,0 +18.89294,0.005 +24.80056,0.06 +16.65733,0.151 +23.67084,0.278 +24.28697,0.373 +27.10492,0.429 +26.96769,0.453 +28.12055,0.445 +23.67487,0.381 +27.37286,0.272 +31.1898,0.165 +38.91633,0.077 +48.58247,0.004 +68.40971,0 +79.44612,0 +55.9797,0 +31.76736,0 +15.02495,0 +7.12176,0 +4.26358,0 +5.51013,0 +3.97763,0 +4.68052,0 +10.29935,0 +12.14008,0.007 +17.59426,0.081 +16.9244,0.205 +16.49554,0.327 +20.33239,0.416 +25.80656,0.46 +23.44199,0.464 +25.71791,0.425 +19.54858,0.337 +27.58622,0.244 +23.81053,0.15 +30.96688,0.058 +44.48632,0.002 +75.96807,0 +74.07805,0 +47.47274,0 +28.5283,0 +15.27277,0 +6.68521,0 +4.4024,0 +3.91933,0 +5.06238,0 +5.74597,0 +7.71344,0 +10.76047,0.012 +15.84193,0.121 +18.51519,0.257 +18.50907,0.37 +23.27353,0.43 +26.94652,0.496 +23.39784,0.521 +28.23201,0.507 +20.67029,0.457 +24.76581,0.354 +22.40366,0.2 +31.06072,0.065 +40.05414,0.002 +56.56448,0 +73.90399,0 +50.31327,0 +28.45868,0 +16.86823,0 +5.61553,0 +3.82623,0 +5.37836,0 +5.32974,0 +5.24288,0 +9.66388,0 +15.53626,0.01 +21.08073,0.115 +15.8857,0.287 +19.43962,0.439 +20.02452,0.514 +26.68924,0.561 +23.64387,0.567 +25.88586,0.538 +22.88461,0.452 +27.07379,0.346 +26.07762,0.209 +38.17762,0.079 +48.8696,0.004 +61.37284,0 +65.46043,0 +56.53639,0 +29.36475,0 +15.1102,0 +5.71218,0 +4.63758,0 +4.46311,0 +5.2682,0 +5.18333,0 +12.80105,0 +15.60936,0.011 +21.82215,0.12 +19.2795,0.285 +20.11255,0.42 +27.22023,0.53 +28.12818,0.594 +25.76147,0.612 +29.68645,0.562 +23.42174,0.468 +27.54341,0.308 +28.36125,0.159 +33.22395,0.052 +62.22069,0.002 +62.11534,0 +84.10011,0 +61.2431,0 +26.89108,0 +17.28034,0 +5.97694,0 +3.84725,0 +4.28458,0 +4.42287,0 +4.59816,0 +10.56338,0 +13.42242,0.013 +16.99787,0.13 +12.05244,0.276 +20.94101,0.393 +19.24178,0.468 +24.44286,0.466 +22.61979,0.442 +21.38695,0.33 +23.22092,0.248 +22.65283,0.188 +22.92338,0.132 +34.42045,0.072 +44.48441,0.005 +49.49322,0 +51.72014,0 +53.47096,0 +26.35256,0 +16.51773,0 +5.69187,0 +5.80881,0 +5.99497,0 +5.65542,0 +5.34538,0 +10.19068,0 +17.36265,0.016 +22.39001,0.152 +16.29185,0.3 +19.9886,0.425 +22.55244,0.535 +28.31145,0.592 +25.1898,0.606 +25.90164,0.53 +25.95644,0.362 +29.78496,0.24 +22.93919,0.148 +33.77085,0.067 +40.8669,0.003 +68.20319,0 +67.48925,0 +54.24332,0 +26.03836,0 +14.92735,0 +7.44621,0 +5.83042,0 +5.41165,0 +6.36237,0 +5.27414,0 +11.57452,0 +15.7648,0.011 +22.23623,0.109 +17.41113,0.225 +21.69713,0.325 +21.60431,0.406 +27.41102,0.48 +29.13359,0.535 +29.65115,0.573 +24.28326,0.53 +27.86308,0.429 +26.0792,0.297 +35.95528,0.142 +45.87662,0.01 +63.16059,0 +75.34637,0 +65.92405,0 +30.31628,0 +17.00697,0 +6.38997,0 +4.60872,0 +4.46384,0 +4.2924,0 +4.66937,0 +9.27118,0 +12.70039,0.016 +18.84469,0.164 +17.34587,0.343 +15.69338,0.493 +26.00046,0.627 +23.9439,0.692 +27.07885,0.715 +24.57162,0.687 +24.27156,0.596 +31.85154,0.42 +26.2559,0.256 +31.61366,0.106 +48.88566,0.007 +66.90977,0 +62.83875,0 +46.43866,0 +27.90065,0 +15.23851,0 +6.37881,0 +4.80105,0 +5.29164,0 +4.77835,0 +4.17122,0 +10.37736,0 +12.56504,0.01 +23.21692,0.094 +14.05344,0.218 +16.76921,0.344 +20.77538,0.434 +25.89274,0.513 +24.47051,0.542 +25.65189,0.549 +25.99618,0.495 +24.58179,0.387 +24.97236,0.26 +32.91815,0.116 +45.90999,0.009 +71.00499,0 +62.5027,0 +53.36833,0 +26.27869,0 +16.97837,0 +5.28755,0 +4.00403,0 +4.82744,0 +4.94745,0 +5.23069,0 +11.42882,0 +14.18622,0.016 +22.28295,0.162 +16.27517,0.344 +21.06517,0.49 +19.17955,0.608 +28.46482,0.671 +28.33087,0.684 +22.68985,0.633 +24.96829,0.531 +23.29058,0.314 +25.90523,0.171 +34.84523,0.076 +47.51218,0.006 +73.09549,0 +68.45779,0 +66.79623,0 +25.4689,0 +16.61822,0 +7.94973,0 +4.47539,0 +4.9156,0 +5.04737,0 +3.76188,0 +10.47737,0 +14.16413,0.014 +15.96303,0.142 +14.6334,0.321 +16.42627,0.45 +23.73601,0.516 +21.53218,0.551 +22.03715,0.541 +25.15058,0.458 +24.10931,0.392 +22.10275,0.219 +24.43567,0.12 +26.93996,0.055 +39.75986,0.003 +66.54149,0 +64.17799,0 +40.7016,0 +26.78841,0 +16.38134,0 +5.31963,0 +4.48961,0 +4.67701,0 +3.90672,0 +4.79667,0 +9.6489,0 +11.90783,0.015 +16.59285,0.135 +14.69633,0.272 +17.47453,0.348 +19.01142,0.468 +24.15932,0.572 +19.91235,0.58 +20.28184,0.512 +20.4725,0.383 +27.68315,0.261 +24.94291,0.174 +29.43129,0.083 +41.80305,0.006 +59.59023,0 +56.99223,0 +61.97239,0 +26.62045,0 +13.25746,0 +5.75179,0 +5.01638,0 +5.53158,0 +4.77229,0 +5.25367,0 +10.53313,0 +16.62601,0.015 +20.57413,0.142 +20.01925,0.324 +18.36731,0.471 +23.51819,0.571 +22.99469,0.635 +28.42395,0.65 +25.04085,0.608 +22.63879,0.517 +26.22175,0.385 +25.68306,0.201 +31.80408,0.076 +42.29916,0.004 +71.36637,0 +76.12396,0 +57.47318,0 +30.3618,0 +17.51758,0 +7.20059,0 +4.92377,0 +4.25573,0 +5.24026,0 +4.17858,0 +10.73711,0 +11.76676,0.011 +14.74678,0.114 +16.35447,0.276 +17.21792,0.415 +20.31345,0.542 +21.6327,0.627 +25.5092,0.66 +18.73617,0.636 +21.69776,0.554 +24.43267,0.395 +23.89639,0.212 +26.0407,0.067 +34.73882,0.004 +48.1337,0 +75.83521,0 +46.67689,0 +27.69912,0 +12.24,0 +5.1027,0 +3.86616,0 +4.50097,0 +3.99532,0 +4.04925,0 +8.22077,0 +12.18963,0.019 +13.47769,0.172 +13.04392,0.345 +16.90461,0.482 +15.57327,0.584 +17.16657,0.639 +23.99313,0.639 +21.35267,0.561 +18.14354,0.446 +21.44245,0.316 +21.75412,0.202 +25.62961,0.093 +37.87363,0.006 +52.30375,0 +50.65323,0 +65.19189,0 +19.42058,0 +13.18255,0 +4.75502,0 +4.90861,0 +5.24831,0 +4.16682,0 +4.00827,0 +10.94352,0 +16.84429,0.02 +17.1101,0.172 +16.61866,0.366 +16.53277,0.506 +23.3377,0.606 +28.1814,0.634 +18.88152,0.638 +23.26141,0.569 +22.80806,0.447 +21.74345,0.278 +20.67808,0.145 +28.18879,0.061 +50.26845,0.004 +61.34081,0 +61.26739,0 +51.73738,0 +26.74449,0 +15.534,0 +6.18263,0 +3.58002,0 +4.64654,0 +4.49089,0 +3.94125,0 +10.70315,0 +11.00939,0.019 +15.73813,0.167 +14.40194,0.353 +13.00383,0.494 +23.17917,0.592 +23.30847,0.639 +24.20331,0.653 +23.11662,0.617 +25.73129,0.512 +22.52344,0.318 +21.82332,0.197 +29.22848,0.058 +48.67398,0.003 +45.34394,0 +70.43891,0 +36.40285,0 +24.88117,0 +13.28264,0 +5.10643,0 +5.37854,0 +5.52365,0 +4.86944,0 +5.27756,0 +12.72722,0 +14.91816,0.019 +19.8809,0.171 +18.46901,0.351 +17.44794,0.466 +23.89592,0.543 +26.78996,0.597 +26.26217,0.559 +28.41454,0.454 +23.49823,0.384 +29.73864,0.278 +25.52643,0.188 +36.42917,0.098 +45.62744,0.006 +72.52747,0 +77.79709,0 +66.42528,0 +33.42188,0 +15.84462,0 +8.14508,0 +4.91482,0 +5.72627,0 +5.47922,0 +5.8717,0 +9.21387,0 +17.64402,0.017 +17.2895,0.148 +17.30767,0.291 +18.75924,0.393 +21.5459,0.503 +24.42899,0.549 +25.61145,0.519 +27.52326,0.435 +25.35727,0.319 +26.55032,0.27 +24.64435,0.191 +36.58404,0.085 +43.16523,0.006 +64.07788,0 +59.85289,0 +49.12928,0 +23.25375,0 +13.18578,0 +6.24145,0 +5.43413,0 +5.26639,0 +5.90069,0 +5.95975,0 +13.37967,0 +14.80119,0.003 +22.34189,0.045 +20.53712,0.154 +19.84183,0.293 +22.26463,0.372 +30.07119,0.373 +26.21657,0.364 +25.61985,0.335 +28.58521,0.287 +33.61487,0.213 +26.47106,0.14 +30.5771,0.057 +46.82285,0.003 +78.98274,0 +75.57678,0 +65.34538,0 +29.79768,0 +14.85522,0 +6.4495,0 +4.79518,0 +4.49969,0 +4.34827,0 +3.97705,0 +9.37023,0 +14.19067,0.003 +14.71379,0.048 +14.44719,0.119 +17.51269,0.189 +20.58555,0.269 +24.54777,0.307 +22.71436,0.336 +20.24626,0.342 +18.94031,0.326 +24.77663,0.259 +21.40087,0.191 +25.89701,0.087 +37.6507,0.005 +57.04989,0 +67.96787,0 +49.77445,0 +27.66672,0 +12.54068,0 +5.21891,0 +5.64006,0 +5.98332,0 +5.18734,0 +4.86806,0 +11.07167,0 +13.05847,0.014 +21.35827,0.127 +18.65322,0.276 +18.66512,0.394 +23.09824,0.448 +27.56867,0.483 +26.44205,0.512 +24.76543,0.521 +22.29257,0.509 +23.97333,0.438 +27.83679,0.309 +35.8169,0.146 +41.31146,0.011 +61.29793,0 +72.63072,0 +42.57978,0 +24.76677,0 +14.896,0 +6.64064,0 +3.89647,0 +4.48192,0 +3.78498,0 +4.23517,0 +9.27673,0 +14.84744,0.018 +20.73023,0.162 +16.02272,0.37 +18.15731,0.52 +20.16581,0.622 +19.90355,0.679 +25.13589,0.693 +17.13993,0.653 +16.1794,0.568 +24.93752,0.426 +18.07333,0.283 +26.41717,0.118 +39.90864,0.009 +53.43976,0 +51.7677,0 +44.68579,0 +25.25312,0 +12.26175,0 +5.305,0 +5.16489,0 +4.85075,0 +4.4117,0 +4.35478,0 +12.36196,0 +13.60284,0.004 +19.99939,0.062 +15.88015,0.168 +18.09266,0.287 +24.63862,0.358 +23.60808,0.417 +26.80279,0.429 +25.56125,0.402 +23.57209,0.354 +25.19197,0.274 +26.47752,0.185 +28.79629,0.086 +42.73148,0.006 +53.76779,0 +69.10551,0 +48.40022,0 +28.94321,0 +17.71265,0 +5.49954,0 +3.89809,0 +4.34779,0 +3.94009,0 +4.6879,0 +10.00312,0 +11.83487,0.014 +14.19129,0.132 +15.72353,0.289 +17.32948,0.416 +18.39712,0.501 +19.67273,0.543 +16.69156,0.544 +25.60126,0.489 +23.14948,0.415 +29.06532,0.316 +22.43491,0.21 +28.56794,0.09 +36.2294,0.006 +56.02546,0 +68.10853,0 +42.48643,0 +24.72323,0 +13.52235,0 +5.5735,0 +6.10441,0 +4.60494,0 +5.50924,0 +5.43984,0 +12.33231,0 +13.81729,0.005 +21.54104,0.058 +15.10523,0.132 +19.7003,0.201 +23.51769,0.272 +22.00575,0.331 +22.46861,0.356 +24.02998,0.363 +23.16033,0.311 +24.53469,0.22 +23.7219,0.125 +28.64547,0.051 +48.76238,0.002 +47.15457,0 +65.87653,0 +50.10958,0 +22.79028,0 +13.71428,0 +6.46446,0 +4.51528,0 +5.21274,0 +5.34995,0 +5.14043,0 +10.42927,0 +13.12468,0.011 +19.5273,0.099 +16.05882,0.238 +19.10918,0.39 +19.715,0.482 +26.82709,0.533 +29.25346,0.55 +25.73943,0.53 +25.86194,0.485 +28.35131,0.402 +25.22767,0.275 +29.74641,0.123 +54.73717,0.01 +59.99166,0 +75.30353,0 +54.03749,0 +28.863,0 +13.9938,0 +6.13747,0 +5.51018,0 +5.90072,0 +5.33807,0 +4.45194,0 +12.15102,0 +17.73951,0.014 +23.66183,0.123 +17.38697,0.279 +23.86777,0.44 +23.17764,0.566 +29.72781,0.628 +27.46615,0.636 +26.37462,0.603 +21.87694,0.524 +29.60313,0.412 +27.6854,0.277 +28.0901,0.128 +52.08584,0.01 +60.81103,0 +88.14777,0 +62.77951,0 +26.76993,0 +14.37426,0 +7.08946,0 +3.68605,0 +4.13636,0 +4.73478,0 +5.04322,0 +9.75499,0 +12.98501,0.016 +18.59629,0.131 +17.65541,0.286 +16.5354,0.374 +21.01295,0.423 +26.59346,0.442 +21.73936,0.446 +23.74591,0.396 +19.69727,0.361 +23.01429,0.276 +29.11581,0.206 +32.15024,0.103 +43.32499,0.009 +63.94084,0 +74.0959,0 +54.03539,0 +30.2176,0 +14.44837,0 +5.33214,0 +3.85013,0 +3.68278,0 +3.69598,0 +5.06697,0 +8.69628,0 +13.77616,0.018 +16.76547,0.158 +14.34936,0.32 +16.36258,0.429 +18.38716,0.516 +22.0303,0.562 +20.97317,0.562 +14.805,0.516 +15.99203,0.45 +18.33892,0.347 +24.12938,0.222 +26.4872,0.104 +38.22346,0.008 +62.05874,0 +58.60089,0 +49.74605,0 +19.30482,0 +12.95302,0 +5.46871,0 +5.30688,0 +5.04302,0 +4.76906,0 +4.87207,0 +10.18596,0 +15.75057,0.017 +22.90563,0.146 +14.9662,0.317 +16.39388,0.458 +23.03577,0.58 +21.12087,0.651 +22.51028,0.665 +23.58394,0.611 +22.56735,0.52 +27.76693,0.405 +28.86066,0.262 +31.05633,0.12 +47.76038,0.009 +64.75784,0 +75.2641,0 +56.67716,0 +23.01662,0 +12.86181,0 +6.26424,0 +5.10029,0 +5.05355,0 +5.27897,0 +5.37729,0 +11.99317,0 +15.29339,0.008 +24.36252,0.086 +16.37169,0.22 +19.79995,0.352 +23.22699,0.444 +25.7131,0.521 +29.49045,0.551 +29.98842,0.525 +25.39175,0.455 +28.93166,0.361 +29.67031,0.233 +32.33275,0.1 +54.32313,0.008 +60.62078,0 +71.94077,0 +47.85639,0 +29.73069,0 +14.4632,0 +5.44639,0 +4.67012,0 +4.63025,0 +5.55369,0 +4.28056,0 +11.21324,0 +17.44566,0.017 +20.80642,0.139 +14.30832,0.293 +19.89827,0.418 +24.57381,0.496 +24.12293,0.524 +22.69461,0.505 +28.2642,0.446 +23.45663,0.363 +21.90123,0.252 +21.39444,0.145 +27.85529,0.06 +45.58278,0.003 +56.97316,0 +66.20812,0 +54.23667,0 +26.35568,0 +15.33235,0 +6.87326,0 +4.85393,0 +4.4742,0 +4.89111,0 +4.5826,0 +10.09271,0 +11.37993,0.012 +21.19902,0.104 +16.3254,0.222 +20.56386,0.331 +21.5528,0.433 +23.54152,0.484 +26.46085,0.511 +24.35968,0.497 +24.22843,0.437 +27.74781,0.327 +27.55611,0.221 +26.92049,0.104 +50.95573,0.009 +67.71192,0 +68.26189,0 +51.96142,0 +25.75936,0 +14.04439,0 +5.6805,0 +3.52677,0 +4.54945,0 +3.87787,0 +3.87831,0 +10.60156,0 +11.59563,0.019 +19.29149,0.156 +16.14008,0.337 +16.33242,0.503 +16.17137,0.616 +22.28073,0.674 +19.12708,0.681 +19.61902,0.628 +16.86372,0.518 +29.40497,0.362 +19.70049,0.217 +28.20449,0.095 +41.47188,0.008 +57.08989,0 +73.08264,0 +50.8187,0 +25.14319,0 +14.27982,0 +6.0448,0 +4.95845,0 +3.96567,0 +4.84668,0 +5.06593,0 +10.84647,0 +14.84112,0.013 +23.02804,0.118 +18.52975,0.25 +20.71787,0.363 +20.11627,0.45 +20.75776,0.517 +23.0362,0.556 +28.15225,0.469 +25.69912,0.38 +24.42672,0.305 +23.02145,0.207 +30.65828,0.102 +45.526,0.008 +78.64212,0 +71.86822,0 +45.24809,0 +29.69495,0 +16.51209,0 +6.39986,0 +5.6463,0 +5.23739,0 +5.53837,0 +4.46117,0 +10.13067,0 +14.89912,0.015 +19.8703,0.13 +16.64623,0.304 +20.62118,0.44 +22.97147,0.513 +24.99844,0.565 +30.72008,0.579 +29.34334,0.566 +24.26904,0.507 +26.89403,0.393 +26.79437,0.24 +39.41239,0.104 +55.85788,0.009 +62.58868,0 +75.11372,0 +51.62268,0 +27.70835,0 +16.87115,0 +6.20047,0 +4.05121,0 +4.8513,0 +4.34012,0 +4.95112,0 +10.57581,0 +15.3928,0.015 +19.33242,0.134 +15.10729,0.313 +15.73117,0.454 +16.5038,0.553 +17.94473,0.622 +20.96412,0.65 +24.83395,0.63 +25.22652,0.539 +23.74056,0.418 +20.65689,0.258 +22.40205,0.095 +37.57849,0.006 +66.71947,0 +67.86029,0 +46.08762,0 +23.1689,0 +16.44839,0 +5.51973,0 +4.35038,0 +4.86126,0 +4.37896,0 +5.15913,0 +12.76455,0 +15.57875,0.014 +16.05841,0.132 +19.99027,0.303 +18.31555,0.444 +19.0424,0.527 +22.43136,0.572 +26.61189,0.573 +26.4165,0.514 +25.39416,0.403 +27.87017,0.274 +28.7442,0.16 +30.54955,0.071 +42.87492,0.006 +61.70014,0 +67.24687,0 +55.78482,0 +26.27747,0 +14.341,0 +6.47665,0 +4.88387,0 +4.71538,0 +4.37232,0 +4.42483,0 +9.75091,0 +15.16157,0.013 +23.49379,0.116 +17.35007,0.257 +20.72305,0.385 +21.23552,0.499 +23.22007,0.569 +23.82412,0.592 +28.74273,0.571 +29.1721,0.489 +33.55218,0.326 +26.69083,0.212 +32.47876,0.097 +39.38395,0.008 +66.99024,0 +72.40828,0 +62.62383,0 +24.94141,0 +16.27922,0 +5.17457,0 +5.2603,0 +4.13481,0 +3.9721,0 +5.3126,0 +10.27488,0 +14.00049,0.007 +19.85231,0.08 +18.4595,0.207 +18.14746,0.296 +22.80305,0.358 +25.36307,0.428 +21.99386,0.465 +25.71398,0.466 +23.71792,0.419 +25.71779,0.346 +26.608,0.239 +30.48449,0.114 +45.06883,0.01 +63.88433,0 +73.36448,0 +48.36034,0 +31.42869,0 +12.30282,0 +6.5415,0 +4.49058,0 +4.02024,0 +3.13488,0 +5.14989,0 +10.34053,0 +11.51726,0.016 +15.75398,0.133 +15.92039,0.301 +14.62637,0.427 +18.70862,0.525 +21.18698,0.564 +23.26285,0.532 +20.25981,0.476 +23.20064,0.384 +24.38175,0.289 +18.8966,0.184 +33.89041,0.084 +37.4091,0.008 +55.92052,0 +68.56773,0 +42.62624,0 +22.25945,0 +12.72025,0 +6.03973,0 +3.92079,0 +4.44223,0 +4.29185,0 +4.89531,0 +9.56784,0 +11.45695,0.014 +19.39327,0.129 +15.79849,0.297 +15.69804,0.426 +23.16562,0.519 +24.10212,0.556 +22.10532,0.553 +20.15871,0.497 +20.14869,0.412 +24.30915,0.288 +29.64448,0.167 +35.5419,0.061 +51.15132,0.004 +60.73476,0 +70.07258,0 +45.44291,0 +28.19741,0 +14.881,0 +5.02399,0 +2.84431,0 +3.27768,0 +2.95172,0 +3.01234,0 +4.84189,0 +7.97365,0.007 +15.16966,0.075 +10.46642,0.183 +13.19385,0.3 +14.79818,0.402 +11.12839,0.503 +19.96312,0.538 +18.55779,0.527 +17.51764,0.472 +20.22113,0.351 +17.50323,0.209 +18.49965,0.087 +33.96698,0.006 +52.69963,0 +38.85715,0 +36.40546,0 +19.70689,0 +10.41929,0 +3.22528,0 +4.37157,0 +5.06129,0 +5.13295,0 +4.51643,0 +11.13379,0 +12.07939,0.013 +22.12233,0.107 +15.99232,0.228 +17.28656,0.288 +25.95923,0.349 +30.71007,0.391 +25.77785,0.433 +29.16758,0.427 +26.05611,0.391 +25.6953,0.321 +27.69981,0.215 +36.37782,0.096 +50.40184,0.008 +55.06726,0 +86.9427,0 +42.72778,0 +27.06698,0 +15.18723,0 +5.50189,0 +4.38555,0 +4.47635,0 +4.74751,0 +3.39969,0 +10.39783,0 +11.48863,0.013 +16.44307,0.119 +13.72871,0.279 +17.27316,0.43 +18.07642,0.537 +23.57523,0.591 +22.74843,0.604 +24.05201,0.574 +19.22653,0.486 +18.49124,0.365 +20.88562,0.233 +21.11206,0.104 +47.13606,0.008 +58.89266,0 +66.37864,0 +39.99658,0 +22.09512,0 +11.60169,0 +4.48749,0 +5.56914,0 +5.06607,0 +4.21995,0 +4.94847,0 +11.88772,0 +16.51325,0.011 +16.78687,0.108 +18.96657,0.278 +17.26994,0.469 +22.90718,0.611 +28.9879,0.677 +21.37289,0.696 +20.85849,0.659 +24.58447,0.57 +25.92442,0.452 +29.17368,0.299 +30.58408,0.139 +54.12636,0.011 +69.87235,0 +68.01453,0 +54.04378,0 +25.02973,0 +15.21734,0 +6.77177,0 +4.73638,0 +4.46283,0 +3.84927,0 +3.15982,0 +11.02898,0 +10.93866,0.011 +13.85736,0.118 +16.23652,0.305 +15.56808,0.457 +20.94047,0.566 +19.25916,0.62 +20.55711,0.632 +24.36654,0.579 +17.64831,0.487 +19.86936,0.342 +25.22709,0.181 +28.69232,0.076 +40.90047,0.005 +51.09437,0 +74.89129,0 +50.23852,0 +19.57036,0 +12.2269,0 +5.81171,0 +4.60746,0 +4.3922,0 +5.28693,0 +5.75389,0 +14.73212,0 +15.62343,0.017 +24.06517,0.143 +18.82819,0.337 +21.55476,0.472 +26.68558,0.575 +25.67125,0.636 +28.93773,0.626 +21.2993,0.562 +24.02952,0.423 +29.72148,0.259 +28.00706,0.154 +32.32952,0.066 +53.11117,0.004 +66.7766,0 +68.35901,0 +57.47232,0 +35.07926,0 +15.4764,0 +6.17064,0 +3.20673,0 +4.02223,0 +5.0021,0 +3.23862,0 +9.4974,0 +13.19606,0.015 +15.90354,0.145 +13.11498,0.303 +15.79634,0.418 +18.74902,0.51 +20.72288,0.559 +18.4742,0.568 +19.27709,0.537 +16.34695,0.463 +21.93617,0.333 +23.47187,0.206 +28.5995,0.091 +31.96299,0.006 +55.84573,0 +59.26081,0 +41.29845,0 +28.33893,0 +13.36393,0 +4.58422,0 +4.65,0 +5.45385,0 +5.61286,0 +4.70408,0 +9.5988,0 +15.82037,0.016 +20.55866,0.133 +21.53484,0.288 +22.45986,0.409 +24.41366,0.471 +29.58816,0.484 +27.13571,0.454 +25.04572,0.378 +26.10834,0.335 +28.8573,0.237 +27.44123,0.147 +30.109,0.066 +45.17373,0.004 +74.30618,0 +72.307,0 +54.21699,0 +30.02543,0 +18.83879,0 +6.21605,0 +3.74752,0 +5.58915,0 +5.13014,0 +4.97583,0 +10.87493,0 +12.73319,0.002 +22.11,0.041 +16.29745,0.104 +17.15938,0.174 +19.84846,0.248 +30.88209,0.343 +26.0231,0.434 +27.69905,0.388 +26.95721,0.279 +31.9802,0.209 +23.68598,0.125 +27.89863,0.05 +48.90241,0.003 +59.83964,0 +69.90253,0 +57.96159,0 +28.00375,0 +16.56638,0 +7.4354,0 +5.46109,0 +5.4719,0 +5.95355,0 +6.24677,0 +12.24669,0 +16.35841,0.015 +23.75295,0.137 +18.45681,0.319 +21.41844,0.446 +26.10462,0.532 +33.54537,0.571 +31.60339,0.568 +29.0881,0.53 +28.55,0.462 +29.85011,0.372 +35.69792,0.25 +35.46591,0.114 +53.06982,0.009 +86.09485,0 +87.55591,0 +60.32226,0 +34.77411,0 +18.16852,0 +7.29936,0 +5.50813,0 +4.39634,0 +4.90763,0 +4.23872,0 +9.80202,0 +13.6091,0.011 +25.17351,0.117 +15.85905,0.278 +14.81662,0.407 +20.09904,0.505 +24.84057,0.558 +22.39712,0.572 +25.30889,0.54 +23.81326,0.454 +29.87185,0.324 +20.54991,0.219 +33.783,0.096 +47.93684,0.007 +58.97794,0 +68.56605,0 +50.63171,0 +25.33056,0 +14.11453,0 +6.17622,0 +5.06385,0 +4.26141,0 +4.04619,0 +4.04078,0 +8.8577,0 +11.77301,0.01 +18.53206,0.104 +14.75492,0.266 +17.58066,0.383 +19.32676,0.462 +20.66348,0.491 +20.13187,0.501 +21.72508,0.47 +22.4947,0.42 +25.74812,0.305 +22.33243,0.19 +34.80029,0.077 +43.71649,0.005 +44.60176,0 +63.0965,0 +46.42083,0 +21.67599,0 +11.97604,0 +4.93216,0 +4.44479,0 +4.29321,0 +4.54031,0 +4.95339,0 +8.5516,0 +14.96617,0.005 +15.97842,0.072 +14.26621,0.177 +17.44235,0.267 +18.12593,0.37 +18.65906,0.447 +22.30705,0.485 +19.23919,0.495 +21.84008,0.433 +26.41991,0.339 +23.9261,0.226 +28.67633,0.103 +39.24478,0.007 +56.44439,0 +70.31563,0 +44.81506,0 +24.07907,0 +14.55507,0 +5.80928,0 +3.02676,0 +4.30581,0 +3.29734,0 +3.64353,0 +7.44589,0 +11.36175,0.005 +14.85102,0.069 +11.88677,0.183 +11.89748,0.286 +16.838,0.373 +22.92918,0.424 +19.82902,0.42 +20.74734,0.367 +17.03879,0.311 +18.06956,0.237 +19.27396,0.148 +25.44035,0.061 +45.40447,0.005 +45.57545,0 +58.73502,0 +40.65867,0 +23.04986,0 +13.28514,0 +5.90868,0 +6.04932,0 +5.86934,0 +5.44799,0 +4.9527,0 +13.3465,0 +15.47708,0.008 +23.03153,0.065 +18.99189,0.159 +22.80523,0.262 +28.81499,0.38 +29.02554,0.41 +33.18846,0.433 +27.28873,0.395 +28.53408,0.358 +33.201,0.293 +31.78062,0.194 +38.89657,0.088 +62.87773,0.007 +76.25002,0 +82.97906,0 +66.00176,0 +33.5033,0 +15.25458,0 +8.03468,0 +5.98538,0 +5.44546,0 +6.09815,0 +5.56109,0 +11.6486,0 +15.24701,0.01 +22.17304,0.092 +16.94995,0.204 +23.8411,0.322 +25.39557,0.396 +30.15741,0.45 +28.62217,0.453 +22.93045,0.432 +27.8329,0.377 +27.49513,0.301 +31.39013,0.194 +38.83663,0.09 +48.21299,0.007 +88.65976,0 +67.55524,0 +65.11055,0 +28.91191,0 +17.14708,0 +7.72907,0 +4.92417,0 +5.85135,0 +4.53945,0 +4.58682,0 +12.00671,0 +16.02232,0.015 +16.95048,0.125 +16.36611,0.295 +20.51549,0.417 +22.81381,0.522 +23.46393,0.571 +24.35494,0.592 +27.76539,0.555 +25.10437,0.482 +30.21249,0.388 +26.59509,0.27 +30.49942,0.127 +52.89372,0.01 +56.04325,0 +62.29342,0 +61.27847,0 +24.57883,0 +17.58385,0 +7.04911,0 +4.21924,0 +4.5738,0 +4.40264,0 +4.15668,0 +10.14036,0 +14.84363,0.009 +18.62158,0.073 +14.52887,0.158 +20.5143,0.255 +21.38239,0.334 +27.53393,0.391 +24.16904,0.431 +22.60894,0.414 +27.15683,0.37 +25.93579,0.286 +29.09324,0.173 +36.77964,0.064 +41.46924,0.003 +59.78655,0 +80.41492,0 +43.7459,0 +26.73305,0 +15.91822,0 +6.689,0 +5.34429,0 +5.23161,0 +5.32181,0 +5.17079,0 +11.23561,0 +14.66764,0.008 +25.52503,0.082 +13.33364,0.186 +18.3634,0.268 +26.22389,0.318 +28.64353,0.33 +27.1374,0.333 +27.98941,0.324 +25.84793,0.263 +29.36238,0.174 +27.40105,0.102 +40.50701,0.039 +53.84294,0.001 +70.18197,0 +81.91187,0 +63.77478,0 +28.8303,0 +15.39307,0 +7.86308,0 +5.64125,0 +6.14838,0 +5.09923,0 +5.41907,0 +10.52887,0 +16.12683,0.016 +21.64086,0.154 +19.76837,0.351 +17.74573,0.503 +26.56886,0.607 +27.40451,0.653 +28.46814,0.649 +27.69414,0.61 +24.66239,0.531 +23.39719,0.408 +29.86526,0.227 +37.27584,0.103 +53.88973,0.008 +68.80763,0 +72.52411,0 +66.49182,0 +23.03748,0 +15.44231,0 +6.40106,0 +5.05681,0 +6.1538,0 +5.92358,0 +5.65577,0 +12.36753,0 +17.63393,0.018 +22.77909,0.156 +21.11886,0.331 +24.55781,0.483 +27.07388,0.591 +28.81085,0.634 +29.20567,0.637 +30.26501,0.599 +29.89267,0.519 +31.67157,0.399 +32.32254,0.238 +36.76631,0.092 +66.23913,0.006 +78.09673,0 +66.48525,0 +73.59952,0 +30.62658,0 +17.42331,0 +7.20496,0 +5.64831,0 +5.75229,0 +4.91053,0 +5.41404,0 +11.93967,0 +15.70431,0.007 +17.61138,0.078 +20.57068,0.162 +20.36951,0.25 +26.84642,0.319 +26.70645,0.378 +28.26645,0.383 +32.77429,0.345 +25.91955,0.313 +28.49448,0.248 +26.04576,0.167 +34.38004,0.076 +50.42437,0.005 +68.26165,0 +80.10046,0 +60.04194,0 +27.0439,0 +15.31817,0 +6.82715,0 +3.02742,0 +5.30621,0 +4.39551,0 +4.97614,0 +11.45453,0 +14.8825,0.014 +20.63772,0.135 +17.50474,0.317 +15.60098,0.434 +18.78444,0.54 +26.25022,0.609 +23.27664,0.616 +23.96123,0.577 +23.97216,0.479 +26.43535,0.332 +25.13585,0.155 +33.5571,0.057 +48.68855,0.004 +71.34088,0 +69.64637,0 +50.81924,0 +26.65004,0 +12.3876,0 +7.14443,0 +6.1816,0 +5.87832,0 +4.92883,0 +4.56386,0 +11.07896,0 +18.22343,0.019 +22.3117,0.174 +20.02228,0.381 +22.49893,0.533 +27.01243,0.639 +26.97528,0.697 +28.1446,0.711 +28.85233,0.676 +31.4439,0.597 +29.24296,0.449 +28.74634,0.28 +37.29608,0.122 +50.37907,0.008 +74.58014,0 +85.20982,0 +59.89483,0 +32.6865,0 +14.02861,0 +6.43403,0 +3.75574,0 +3.65162,0 +5.19209,0 +4.39924,0 +10.13984,0 +13.9012,0.005 +15.7987,0.067 +15.9778,0.203 +16.31004,0.32 +16.5537,0.409 +23.03649,0.473 +22.33686,0.481 +24.28338,0.447 +22.54748,0.374 +27.86088,0.244 +23.19915,0.146 +28.40074,0.067 +42.27928,0.005 +59.36692,0 +64.8735,0 +43.82256,0 +24.62536,0 +15.32597,0 +5.71948,0 +3.92861,0 +4.15495,0 +5.62649,0 +5.62513,0 +10.65703,0 +13.96924,0.01 +20.3524,0.086 +16.19246,0.207 +18.19864,0.304 +21.77515,0.338 +26.60843,0.376 +25.0665,0.341 +27.6422,0.3 +22.32186,0.242 +25.9875,0.15 +24.9509,0.082 +31.02977,0.027 +44.49508,0 +67.15479,0 +70.04458,0 +64.16132,0 +25.63247,0 +14.48774,0 +7.1715,0 +3.6843,0 +4.33616,0 +4.32403,0 +4.72452,0 +9.19798,0 +11.78174,0.005 +15.48607,0.062 +14.39347,0.154 +16.87579,0.233 +20.1837,0.325 +25.42439,0.431 +23.16244,0.47 +20.96759,0.467 +20.84753,0.428 +20.51207,0.35 +18.48173,0.233 +26.2385,0.107 +38.35007,0.008 +47.44679,0 +64.0978,0 +52.61553,0 +26.67608,0 +12.80723,0 +3.79025,0 +4.929,0 +5.07102,0 +6.24177,0 +3.80695,0 +10.86442,0 +13.59841,0.012 +17.82948,0.121 +16.47209,0.302 +19.34415,0.495 +22.80605,0.596 +23.73108,0.652 +26.32183,0.652 +25.20904,0.605 +23.61236,0.534 +28.27161,0.418 +27.33834,0.265 +28.39414,0.107 +47.13091,0.007 +61.42957,0 +68.79689,0 +57.62433,0 +30.0648,0 +15.4328,0 +6.33977,0 +5.17535,0 +4.67434,0 +4.93169,0 +4.8256,0 +10.89345,0 +12.04289,0.012 +19.43446,0.125 +16.71736,0.295 +20.72534,0.444 +23.96713,0.576 +23.57127,0.606 +26.51541,0.602 +24.01385,0.498 +25.09253,0.347 +34.39827,0.201 +23.18351,0.094 +29.09638,0.029 +51.27809,0 +67.10979,0 +71.97678,0 +54.52066,0 +29.88275,0 +16.91321,0 +6.79856,0 +4.03975,0 +5.43338,0 +4.70322,0 +4.22057,0 +12.18197,0 +17.51714,0.008 +22.19103,0.096 +19.11227,0.245 +25.71906,0.411 +22.91762,0.553 +24.26754,0.622 +27.04778,0.636 +32.96035,0.605 +19.86884,0.53 +30.07992,0.399 +30.42067,0.22 +37.67813,0.097 +49.46472,0.007 +76.16742,0 +81.74942,0 +53.80498,0 +25.93187,0 +14.83828,0 +5.24457,0 +3.90502,0 +4.35708,0 +5.10264,0 +4.60147,0 +10.29293,0 +16.65759,0.013 +19.8078,0.127 +15.13544,0.288 +17.48874,0.44 +20.4279,0.537 +25.48272,0.595 +24.02624,0.591 +22.3094,0.525 +25.08778,0.403 +27.85159,0.242 +21.11628,0.121 +27.06881,0.039 +37.11169,0.001 +54.5965,0 +76.19046,0 +51.37665,0 +26.53628,0 +12.0696,0 +6.26122,0 +5.31525,0 +4.33922,0 +4.81608,0 +5.43193,0 +9.81421,0 +14.64371,0.001 +19.31556,0.03 +16.92048,0.073 +22.37926,0.11 +25.37665,0.154 +19.91591,0.187 +24.70912,0.199 +25.19234,0.206 +24.61208,0.201 +32.00591,0.19 +25.13285,0.142 +34.16465,0.065 +43.48483,0.003 +62.06642,0 +81.8604,0 +55.87211,0 +27.38247,0 +15.87686,0 +6.08697,0 +5.62485,0 +5.20835,0 +5.07089,0 +4.21825,0 +12.0469,0 +14.53429,0.012 +18.20006,0.125 +18.23924,0.32 +18.81684,0.498 +22.73036,0.611 +22.60798,0.67 +26.90999,0.689 +24.79216,0.66 +25.39338,0.57 +27.90734,0.425 +28.832,0.263 +30.99805,0.113 +42.02539,0.008 +59.52995,0 +71.64542,0 +58.92078,0 +25.80071,0 +15.15545,0 +6.283,0 +4.21306,0 +5.64614,0 +4.67003,0 +4.13573,0 +10.90277,0 +17.23901,0.003 +25.39489,0.05 +18.41201,0.127 +18.96199,0.214 +24.29192,0.275 +24.32003,0.315 +28.57011,0.333 +25.91955,0.319 +20.08756,0.292 +25.20432,0.233 +24.79901,0.152 +28.4218,0.068 +49.06487,0.004 +56.59454,0 +57.79182,0 +52.1129,0 +30.80971,0 +16.81233,0 +5.19816,0 +2.94258,0 +3.26455,0 +4.11424,0 +4.03554,0 +7.77476,0 +9.69272,0.004 +14.51559,0.058 +12.00552,0.152 +11.43181,0.283 +16.46353,0.389 +19.63588,0.445 +15.53411,0.463 +18.3047,0.442 +18.93427,0.362 +18.65906,0.267 +18.35366,0.154 +28.643,0.058 +21.07347,0.002 +41.92544,0 +53.14469,0 +47.01949,0 +25.59874,0 +10.94385,0 +4.04474,0 +4.22326,0 +4.1918,0 +3.7757,0 +4.73228,0 +10.22751,0 +15.3614,0.004 +16.45673,0.058 +15.09007,0.158 +15.91995,0.283 +19.60884,0.375 +22.80582,0.442 +17.98439,0.529 +22.99678,0.545 +21.94248,0.489 +24.81519,0.398 +20.72223,0.279 +25.37741,0.126 +33.58214,0.009 +53.72316,0 +69.46336,0 +42.10899,0 +23.78264,0 +13.3901,0 +4.81767,0 +5.28319,0 +4.60077,0 +4.92133,0 +4.97732,0 +12.5343,0 +16.12173,0.012 +19.4824,0.126 +18.6307,0.31 +19.59011,0.495 +24.34651,0.598 +26.46721,0.647 +27.75328,0.659 +27.60669,0.597 +28.42539,0.513 +30.70108,0.347 +27.53441,0.226 +35.64811,0.097 +46.35607,0.006 +82.71753,0 +92.06566,0 +53.45801,0 +30.30569,0 +16.96126,0 +6.07156,0 +4.40041,0 +4.39588,0 +3.90183,0 +4.44026,0 +9.72264,0 +13.96247,0.007 +17.6274,0.09 +17.57663,0.225 +17.97088,0.376 +21.57361,0.524 +23.06238,0.592 +18.19109,0.591 +28.50269,0.489 +25.67246,0.353 +29.26314,0.229 +28.78676,0.15 +31.56022,0.062 +41.62642,0.003 +59.38971,0 +75.82677,0 +49.12001,0 +30.6864,0 +14.49897,0 +6.53044,0 +4.45843,0 +4.72705,0 +3.72316,0 +3.88803,0 +8.11654,0 +12.66143,0.005 +16.00236,0.065 +14.04698,0.156 +15.14317,0.236 +19.85004,0.28 +22.84725,0.313 +24.34713,0.331 +21.3745,0.321 +18.18159,0.278 +22.34924,0.226 +21.38996,0.157 +26.59091,0.078 +34.89435,0.005 +57.39165,0 +60.28098,0 +40.0385,0 +22.80302,0 +11.61057,0 +5.93145,0 +4.92469,0 +4.86165,0 +4.08136,0 +4.58132,0 +10.3291,0 +17.6518,0.008 +22.02657,0.082 +17.46704,0.181 +19.57762,0.282 +22.4445,0.386 +23.21462,0.484 +24.15034,0.492 +25.02192,0.472 +23.00087,0.4 +30.14424,0.291 +22.9586,0.176 +29.55628,0.069 +46.43635,0.003 +64.2746,0 +73.51158,0 +61.8309,0 +28.47126,0 +12.5458,0 +5.93018,0 +4.66504,0 +4.0923,0 +4.40011,0 +4.75179,0 +11.11384,0 +16.57448,0.01 +21.51919,0.115 +15.65689,0.317 +20.38627,0.469 +21.27486,0.555 +24.84108,0.593 +21.31707,0.589 +25.76899,0.537 +25.5914,0.442 +30.52755,0.291 +24.66817,0.15 +31.52644,0.052 +45.24488,0.001 +55.41627,0 +69.99533,0 +59.40424,0 +22.87566,0 +13.49393,0 +5.93447,0 +4.72886,0 +5.65132,0 +5.05263,0 +6.04565,0 +11.8064,0 +17.94996,0.001 +20.19744,0.032 +17.09608,0.082 +19.58047,0.134 +25.23254,0.167 +27.83742,0.212 +26.65222,0.255 +24.93812,0.255 +27.86939,0.228 +28.33155,0.177 +26.38385,0.107 +36.13221,0.037 +48.33648,0.001 +69.52424,0 +79.98346,0 +51.08823,0 +30.22849,0 +17.46096,0 +6.55019,0 +3.59367,0 +3.48952,0 +3.99097,0 +4.10098,0 +9.02535,0 +12.14239,0.007 +15.98331,0.09 +14.47626,0.239 +12.48463,0.421 +20.56239,0.513 +16.8377,0.542 +24.01195,0.543 +20.6762,0.488 +18.03812,0.415 +22.44898,0.327 +24.39378,0.216 +26.21043,0.092 +38.55881,0.005 +55.98414,0 +72.483,0 +46.19039,0 +23.77039,0 +12.69429,0 +5.6408,0 +3.78095,0 +4.72092,0 +4.1392,0 +4.26706,0 +11.13893,0 +14.4091,0.011 +19.02196,0.104 +15.68345,0.234 +18.25105,0.366 +22.23095,0.451 +20.55904,0.502 +29.06152,0.53 +27.0195,0.549 +21.49512,0.518 +22.00442,0.407 +20.39816,0.27 +27.14475,0.117 +40.56534,0.007 +57.17727,0 +62.02561,0 +54.51889,0 +23.44783,0 +13.49152,0 +5.31985,0 +5.00496,0 +4.74074,0 +4.77404,0 +4.5357,0 +11.89882,0 +14.07601,0.004 +18.60954,0.068 +18.05925,0.201 +20.17942,0.392 +27.48104,0.549 +24.66847,0.635 +27.87199,0.632 +26.57285,0.563 +21.34198,0.488 +26.96206,0.373 +25.48204,0.239 +32.47634,0.103 +48.05631,0.006 +59.99076,0 +70.90339,0 +49.72967,0 +23.71584,0 +15.96247,0 +7.45147,0 +4.76493,0 +5.37125,0 +6.14986,0 +5.40494,0 +10.54479,0 +15.68848,0.006 +19.39784,0.079 +18.45967,0.214 +18.16676,0.328 +25.67567,0.41 +29.11994,0.459 +22.57672,0.474 +26.7726,0.451 +23.92855,0.383 +25.51906,0.314 +25.10347,0.193 +28.0644,0.088 +46.1762,0.004 +70.1932,0 +79.20137,0 +56.2625,0 +29.87983,0 +17.80292,0 +6.93417,0 +5.34646,0 +4.22111,0 +5.28156,0 +4.84487,0 +8.17552,0 +16.27127,0.004 +18.38058,0.056 +12.73628,0.142 +21.0941,0.22 +24.18426,0.302 +25.07606,0.346 +25.71847,0.403 +21.6188,0.424 +21.74819,0.384 +28.57872,0.326 +25.53283,0.225 +33.98093,0.101 +43.9431,0.006 +56.36982,0 +76.84179,0 +46.76349,0 +24.27022,0 +15.31831,0 +5.98234,0 +4.47425,0 +4.2117,0 +4.33681,0 +5.64201,0 +9.44104,0 +13.03202,0.005 +17.79758,0.075 +15.03762,0.196 +13.13703,0.353 +19.21458,0.49 +22.65039,0.609 +25.89634,0.662 +23.44724,0.652 +23.99616,0.583 +22.03903,0.463 +24.3819,0.303 +26.65187,0.127 +49.52698,0.008 +53.30419,0 +72.1724,0 +41.03739,0 +28.70008,0 +14.72256,0 +5.6739,0 +4.66667,0 +4.55776,0 +4.60788,0 +5.1739,0 +9.34031,0 +13.11566,0.01 +21.76285,0.107 +16.6774,0.252 +19.61756,0.406 +25.72075,0.478 +26.4366,0.521 +27.26096,0.531 +21.61447,0.497 +26.16776,0.413 +26.56484,0.295 +27.26563,0.134 +30.55599,0.051 +45.5718,0.001 +56.96932,0 +79.86996,0 +51.07917,0 +29.96315,0 +12.282,0 +6.16704,0 +5.21937,0 +5.22506,0 +5.03259,0 +5.03605,0 +9.93529,0 +15.95941,0.003 +16.80054,0.049 +19.28155,0.131 +19.06782,0.244 +18.70359,0.37 +22.89367,0.45 +24.53874,0.516 +23.22261,0.506 +21.02271,0.453 +23.88337,0.337 +27.12446,0.207 +30.1523,0.102 +38.49445,0.007 +69.33635,0 +73.98017,0 +56.73164,0 +26.31039,0 +17.14344,0 +6.37623,0 +4.14754,0 +4.43759,0 +3.85427,0 +5.00015,0 +9.28016,0 +13.78525,0.013 +18.13891,0.155 +14.48529,0.349 +16.38407,0.542 +17.99884,0.637 +21.9901,0.692 +24.63814,0.698 +24.82511,0.654 +19.11701,0.59 +21.42012,0.469 +26.96419,0.327 +31.10797,0.142 +46.39366,0.006 +57.19417,0 +71.78259,0 +51.05207,0 +27.05714,0 +15.1208,0 +5.16854,0 +6.02144,0 +4.67479,0 +5.74317,0 +5.48257,0 +13.76256,0 +14.33376,0.011 +25.49012,0.135 +19.6317,0.304 +18.5263,0.425 +23.41316,0.428 +29.09676,0.371 +26.06637,0.369 +21.67777,0.279 +28.09241,0.207 +28.79584,0.137 +30.7598,0.087 +38.04166,0.039 +51.73104,0.001 +66.14757,0 +86.1122,0 +66.47449,0 +25.99957,0 +16.15067,0 +6.02144,0 +4.59264,0 +3.75811,0 +5.06867,0 +4.70063,0 +11.28177,0 +15.30243,0.004 +17.27753,0.059 +13.9287,0.146 +15.44836,0.254 +21.63398,0.344 +20.52861,0.421 +20.78916,0.453 +28.21999,0.458 +19.13495,0.445 +21.98548,0.352 +20.84734,0.238 +27.14811,0.092 +39.45177,0.004 +49.20685,0 +59.57975,0 +47.89296,0 +26.06236,0 +11.71478,0 +5.62762,0 +3.99477,0 +4.52348,0 +4.86449,0 +4.95948,0 +7.30792,0 +10.37572,0.012 +16.18207,0.142 +14.87812,0.355 +15.77552,0.519 +18.00256,0.625 +18.43011,0.689 +22.38103,0.707 +20.62399,0.677 +20.71337,0.605 +23.44776,0.488 +21.23044,0.327 +26.40858,0.145 +42.62591,0.008 +58.68509,0 +56.77718,0 +47.13745,0 +17.07122,0 +12.0483,0 +5.75797,0 +4.72178,0 +3.94859,0 +3.88284,0 +4.31562,0 +10.52747,0 +12.50194,0.013 +17.64029,0.138 +14.18183,0.329 +15.93082,0.503 +22.18924,0.573 +30.89456,0.643 +23.56752,0.648 +19.54283,0.605 +27.67565,0.518 +23.24252,0.414 +23.0415,0.267 +23.13699,0.108 +45.62628,0.005 +61.3611,0 +73.09826,0 +54.16065,0 +27.17697,0 +12.9056,0 +5.80947,0 +5.9786,0 +6.1811,0 +6.32749,0 +6.22752,0 +11.6363,0 +17.70488,0.002 +23.52358,0.05 +19.19581,0.126 +19.32603,0.206 +24.86571,0.241 +28.22519,0.269 +30.04456,0.274 +28.62071,0.259 +31.37892,0.226 +33.61648,0.167 +28.61837,0.101 +33.44599,0.039 +52.16301,0.001 +72.04949,0 +63.50622,0 +61.39369,0 +38.57335,0 +18.3383,0 +6.96718,0 +3.89697,0 +4.00376,0 +4.14922,0 +4.36395,0 +9.02718,0 +13.91318,0.004 +17.84535,0.063 +15.53571,0.164 +14.46253,0.286 +19.19497,0.337 +28.16083,0.332 +19.98047,0.302 +19.86722,0.28 +22.85206,0.245 +21.69961,0.184 +22.73871,0.113 +29.28219,0.044 +38.46773,0.001 +61.54899,0 +65.47926,0 +39.2722,0 +25.43113,0 +12.68922,0 +4.12489,0 +4.11079,0 +4.04043,0 +3.8277,0 +4.29403,0 +10.96319,0 +9.04602,0.008 +17.96521,0.123 +14.85597,0.329 +15.5397,0.501 +19.98243,0.581 +22.47129,0.61 +22.4355,0.575 +23.41722,0.495 +19.29247,0.383 +18.2059,0.25 +19.90931,0.147 +21.00034,0.057 +39.00673,0.001 +55.25847,0 +56.95824,0 +39.62301,0 +23.11423,0 +13.59571,0 +4.64258,0 +5.84086,0 +6.09135,0 +4.71826,0 +5.32834,0 +9.69415,0 +14.99168,0.007 +20.88494,0.119 +18.86085,0.303 +24.00856,0.461 +21.58806,0.538 +30.75869,0.564 +29.23166,0.553 +27.42535,0.482 +28.67081,0.382 +29.48812,0.253 +27.40928,0.145 +37.17279,0.056 +53.12163,0.002 +70.37477,0 +78.87665,0 +58.14122,0 +35.61062,0 +17.24352,0 +6.22134,0 +4.20624,0 +4.42091,0 +3.90045,0 +3.94739,0 +9.92864,0 +14.83205,0.012 +20.42516,0.156 +14.5672,0.344 +16.04681,0.511 +14.03824,0.649 +25.18116,0.707 +20.77794,0.71 +18.65708,0.662 +19.25248,0.58 +17.46784,0.441 +23.58321,0.287 +28.16755,0.12 +42.87072,0.006 +50.16528,0 +68.65562,0 +55.30801,0 +25.60672,0 +12.52561,0 +5.93499,0 +6.67945,0 +5.49661,0 +6.14897,0 +6.01316,0 +13.54146,0 +17.66502,0.007 +24.36299,0.112 +21.26478,0.309 +24.15127,0.465 +25.44098,0.586 +26.91007,0.639 +33.17706,0.651 +29.15344,0.613 +30.88955,0.532 +29.26726,0.408 +28.29668,0.277 +42.74433,0.109 +63.69957,0.004 +76.34659,0 +89.86958,0 +63.48726,0 +34.5811,0 +17.15098,0 +7.91981,0 +5.43334,0 +4.18144,0 +3.52056,0 +5.00165,0 +10.33704,0 +12.3903,0.012 +17.70378,0.142 +13.95538,0.356 +17.99321,0.517 +20.4546,0.623 +21.19954,0.663 +21.62687,0.662 +22.99035,0.608 +17.01324,0.509 +22.4236,0.378 +19.13816,0.173 +26.79286,0.061 +39.03463,0.001 +57.71009,0 +53.56805,0 +42.68422,0 +21.86933,0 +14.43798,0 +5.11445,0 +5.73159,0 +5.37309,0 +4.58035,0 +5.52385,0 +10.80499,0 +18.2398,0.005 +23.17852,0.081 +17.39084,0.185 +19.07668,0.265 +22.69664,0.337 +29.2453,0.415 +27.8358,0.425 +26.35391,0.391 +31.31982,0.346 +31.33158,0.22 +28.12452,0.126 +36.56697,0.043 +45.29845,0 +56.41409,0 +75.17724,0 +53.11806,0 +27.84583,0 +16.52761,0 +6.69411,0 +4.2179,0 +4.64593,0 +3.43996,0 +4.31315,0 +10.20531,0 +11.82408,0.004 +17.44656,0.064 +10.83458,0.171 +15.56277,0.316 +18.34976,0.419 +19.48728,0.472 +20.10201,0.474 +21.74905,0.457 +21.15974,0.422 +23.33,0.31 +18.64433,0.201 +33.73336,0.081 +37.25695,0.004 +41.66865,0 +56.09813,0 +42.48107,0 +19.66025,0 +12.80985,0 +4.90646,0 +4.60295,0 +5.27516,0 +4.19679,0 +4.09484,0 +8.8643,0 +14.71055,0.011 +24.3712,0.14 +18.74863,0.317 +17.85472,0.477 +23.0693,0.55 +28.51837,0.546 +23.09215,0.522 +23.71334,0.494 +23.45942,0.453 +23.14852,0.37 +24.58504,0.239 +30.40341,0.102 +46.73979,0.004 +62.88971,0 +76.35992,0 +53.26723,0 +26.46118,0 +14.66327,0 +5.61488,0 +5.13102,0 +4.17696,0 +5.43893,0 +4.74959,0 +11.91589,0 +12.43518,0.01 +21.25384,0.146 +16.05773,0.322 +18.48562,0.445 +21.23346,0.528 +25.67478,0.54 +26.28303,0.528 +27.10955,0.445 +21.79036,0.319 +27.78578,0.217 +24.41127,0.152 +32.93163,0.059 +44.72727,0 +61.3257,0 +64.46462,0 +53.16118,0 +29.9026,0 +15.69207,0 +5.56901,0 +5.09814,0 +5.62213,0 +5.428,0 +5.76227,0 +10.3877,0 +14.91591,0.007 +18.67112,0.094 +17.61244,0.208 +18.1154,0.292 +21.65654,0.379 +29.30538,0.434 +26.28923,0.474 +25.07435,0.482 +28.27812,0.442 +27.52867,0.349 +29.00113,0.226 +33.39283,0.098 +50.64185,0.004 +69.3555,0 +63.05553,0 +64.76973,0 +27.22317,0 +14.72268,0 +6.703,0 +4.76601,0 +4.79166,0 +4.94316,0 +5.65028,0 +10.17401,0 +15.21066,0.011 +21.30233,0.152 +15.25778,0.388 +19.60669,0.556 +20.62413,0.659 +25.65293,0.705 +22.55323,0.704 +25.44933,0.659 +20.21434,0.572 +28.82193,0.439 +24.15905,0.279 +32.58969,0.101 +41.3873,0.004 +67.18097,0 +61.88563,0 +51.83342,0 +27.49502,0 +11.13416,0 +5.96179,0 +4.48183,0 +4.43667,0 +4.06306,0 +3.54801,0 +10.35146,0 +14.34186,0.008 +18.50325,0.116 +14.94898,0.273 +15.40729,0.414 +20.02589,0.536 +20.90017,0.579 +20.22374,0.589 +22.79365,0.555 +19.20614,0.48 +21.26442,0.386 +23.95512,0.246 +22.48281,0.106 +45.7873,0.004 +58.96968,0 +57.41495,0 +49.64706,0 +23.07539,0 +11.99683,0 +5.67021,0 +4.71915,0 +4.21904,0 +4.48979,0 +5.03186,0 +10.55871,0 +13.56685,0.011 +21.86994,0.155 +16.17706,0.339 +18.6916,0.487 +17.68531,0.56 +20.43581,0.578 +21.02826,0.597 +25.06012,0.568 +18.73386,0.485 +20.08483,0.313 +24.80564,0.169 +24.88029,0.056 +40.73808,0.001 +58.43838,0 +58.49814,0 +45.95246,0 +21.4525,0 +13.84603,0 +5.31005,0 +5.59597,0 +5.12535,0 +5.07144,0 +4.45241,0 +13.04138,0 +16.76264,0.003 +21.14035,0.054 +19.78063,0.138 +19.90024,0.231 +23.99684,0.307 +24.75142,0.337 +28.52953,0.337 +31.73784,0.308 +29.76749,0.262 +31.41588,0.183 +32.90468,0.098 +36.1389,0.034 +59.83816,0 +79.97945,0 +76.48277,0 +59.99056,0 +28.14715,0 +16.22747,0 +7.4997,0 +4.89865,0 +5.14296,0 +5.06239,0 +5.12675,0 +10.53029,0 +14.91656,0.006 +21.62983,0.093 +18.44644,0.24 +21.21768,0.381 +24.01484,0.488 +27.92725,0.563 +25.97828,0.603 +27.34876,0.599 +22.69505,0.492 +24.66871,0.36 +30.09932,0.228 +31.77395,0.094 +43.93921,0.002 +65.37501,0 +81.83728,0 +53.63085,0 +30.6624,0 +13.15997,0 +6.95944,0 +5.05279,0 +4.76442,0 +6.05077,0 +5.92404,0 +9.92323,0 +16.94361,0.005 +17.71988,0.095 +16.93715,0.237 +16.60726,0.402 +20.85015,0.517 +23.83059,0.587 +27.9588,0.597 +24.37302,0.552 +20.91871,0.476 +23.66211,0.358 +31.35082,0.213 +33.106,0.084 +42.30307,0.002 +54.01086,0 +58.8277,0 +37.96092,0 +26.89159,0 +12.2703,0 +5.80354,0 +2.89747,0 +4.11499,0 +3.3701,0 +4.54142,0 +10.07528,0 +14.51951,0.007 +21.60528,0.112 +13.00972,0.252 +18.59669,0.406 +20.11847,0.6 +20.62238,0.662 +16.01541,0.684 +24.27431,0.61 +21.16988,0.527 +18.29378,0.393 +20.45399,0.215 +27.20363,0.068 +39.31326,0.001 +46.0924,0 +58.84434,0 +46.94749,0 +20.76942,0 +11.92812,0 +4.79028,0 +3.59231,0 +4.43278,0 +4.52266,0 +3.8189,0 +10.94894,0 +10.68522,0.001 +20.88056,0.046 +16.68014,0.13 +17.86572,0.221 +21.84444,0.282 +22.45388,0.315 +22.357,0.339 +20.00657,0.333 +19.0763,0.28 +23.47344,0.207 +27.50354,0.134 +31.29211,0.063 +42.26888,0.001 +51.39152,0 +59.2896,0 +40.7471,0 +28.35798,0 +15.37884,0 +5.64426,0 +4.14378,0 +4.28231,0 +2.98797,0 +3.20066,0 +9.58545,0 +11.73797,0.007 +16.94837,0.113 +13.7942,0.274 +13.28,0.436 +14.88863,0.541 +17.82769,0.595 +21.23034,0.6 +19.12823,0.562 +15.12963,0.469 +22.765,0.332 +23.68917,0.204 +24.87379,0.086 +30.89825,0.002 +59.22061,0 +60.89222,0 +43.15793,0 +24.02749,0 +12.8689,0 +5.51182,0 +3.33767,0 +5.46411,0 +5.2297,0 +4.18943,0 +9.244,0 +13.67831,0.004 +19.86291,0.095 +15.43156,0.243 +21.50453,0.395 +22.32694,0.484 +25.02842,0.494 +26.08563,0.417 +27.23799,0.281 +19.31991,0.192 +25.59272,0.132 +20.63822,0.083 +30.70441,0.028 +40.27783,0 +66.77299,0 +68.9001,0 +49.1445,0 +25.04607,0 +12.60141,0 +5.33615,0 +4.73935,0 +3.38526,0 +4.75769,0 +4.13941,0 +10.22472,0 +12.60286,0.005 +15.46067,0.091 +12.90152,0.26 +17.35762,0.412 +20.42351,0.533 +19.49228,0.568 +23.4592,0.543 +26.71901,0.492 +24.19194,0.44 +25.13253,0.348 +24.05858,0.227 +24.71112,0.102 +41.86793,0.003 +57.4342,0 +57.0107,0 +42.88794,0 +27.46581,0 +10.62416,0 +4.75142,0 +5.35428,0 +4.87151,0 +4.93318,0 +4.44131,0 +11.09138,0 +12.94249,0.007 +18.84606,0.122 +17.36547,0.299 +17.78223,0.474 +23.75854,0.605 +23.69805,0.697 +25.556,0.72 +26.59641,0.688 +21.71204,0.606 +31.38292,0.476 +22.94162,0.279 +28.16551,0.099 +48.58739,0.002 +56.33267,0 +63.46374,0 +48.2139,0 +23.45473,0 +15.2309,0 +5.61636,0 +4.02224,0 +4.17671,0 +4.4878,0 +4.42308,0 +10.17381,0 +14.12463,0.003 +19.53786,0.059 +12.84461,0.14 +14.91823,0.242 +20.96419,0.368 +25.16009,0.515 +24.76808,0.623 +23.79256,0.629 +20.21672,0.582 +24.54569,0.457 +23.39966,0.279 +27.88886,0.098 +39.23238,0.003 +52.80436,0 +75.29098,0 +54.24979,0 +22.39577,0 +12.99586,0 +6.71745,0 +5.27282,0 +5.08059,0 +5.22172,0 +4.2177,0 +11.79372,0 +15.28686,0.01 +22.49552,0.169 +17.88234,0.371 +20.6792,0.514 +20.95079,0.643 +24.69663,0.671 +30.34786,0.649 +28.7994,0.544 +22.90394,0.44 +29.89644,0.292 +27.70988,0.171 +37.82648,0.051 +45.25626,0 +62.59098,0 +63.26149,0 +51.29074,0 +28.09869,0 +16.49694,0 +5.90902,0 +5.03125,0 +5.37248,0 +4.87556,0 +4.22111,0 +11.45202,0 +14.69908,0.004 +17.95637,0.094 +17.135,0.261 +23.80506,0.435 +25.69002,0.58 +25.1202,0.663 +25.37166,0.678 +27.56597,0.651 +23.66017,0.561 +26.10338,0.431 +26.0907,0.288 +29.86587,0.097 +37.96413,0.002 +53.57218,0 +63.35361,0 +55.92965,0 +24.30809,0 +13.01821,0 +6.05859,0 +4.07167,0 +4.21757,0 +4.4828,0 +4.1524,0 +10.29189,0 +15.04017,0.003 +20.26238,0.074 +16.13613,0.187 +16.77576,0.32 +23.14621,0.491 +23.97799,0.654 +21.50018,0.705 +23.33505,0.687 +26.21772,0.613 +23.55972,0.49 +28.10315,0.316 +26.54892,0.126 +41.69601,0.003 +66.10769,0 +65.54773,0 +40.23399,0 +25.21334,0 +15.78793,0 +5.28665,0 +4.19491,0 +3.66896,0 +3.56557,0 +4.12895,0 +6.52076,0 +11.86121,0.01 +18.73374,0.178 +11.59214,0.395 +14.6931,0.561 +17.79942,0.671 +23.67264,0.708 +15.72481,0.705 +17.92546,0.648 +22.4266,0.562 +16.46973,0.45 +21.86064,0.27 +27.8663,0.104 +39.52607,0.003 +54.76283,0 +47.69618,0 +44.59973,0 +23.55062,0 +13.33255,0 +4.36087,0 +3.16114,0 +3.91878,0 +3.16102,0 +4.72368,0 +10.16506,0 +11.25165,0.003 +12.34589,0.077 +12.1672,0.208 +16.4101,0.342 +14.42413,0.442 +18.9985,0.501 +18.62419,0.52 +23.4597,0.489 +17.06543,0.41 +23.45665,0.266 +11.47989,0.145 +26.83219,0.047 +28.3481,0 +44.83155,0 +57.47371,0 +37.993,0 +21.44218,0 +11.34659,0 +4.43894,0 +4.6779,0 +4.72747,0 +4.92052,0 +4.08412,0 +9.68107,0 +14.83459,0.004 +18.88552,0.109 +15.51682,0.294 +18.46568,0.456 +18.02472,0.57 +20.23288,0.626 +25.80261,0.649 +23.04908,0.634 +25.67974,0.559 +26.64024,0.439 +27.42488,0.245 +35.01123,0.096 +41.92775,0.002 +55.23172,0 +62.7057,0 +54.04519,0 +23.22123,0 +13.64454,0 +6.87686,0 +4.96117,0 +5.07867,0 +4.24912,0 +3.86652,0 +11.15039,0 +14.56867,0.005 +21.99054,0.087 +19.24003,0.224 +17.02358,0.364 +21.42819,0.433 +28.06751,0.431 +24.32719,0.425 +23.42295,0.403 +25.41298,0.362 +22.42357,0.304 +16.57657,0.206 +35.10376,0.081 +44.70947,0.001 +50.34862,0 +61.56535,0 +48.80895,0 +28.52289,0 +10.74216,0 +5.88251,0 +3.88942,0 +4.03529,0 +4.58045,0 +5.11178,0 +9.88235,0 +15.78953,0.002 +20.02872,0.079 +15.84571,0.212 +19.41765,0.348 +18.83523,0.455 +20.87411,0.552 +28.38459,0.598 +19.37085,0.549 +22.88478,0.419 +28.67352,0.237 +25.03224,0.107 +29.99863,0.03 +48.71115,0 +60.79254,0 +58.22906,0 +44.98021,0 +29.72011,0 +13.4147,0 +5.59057,0 +5.75652,0 +4.56017,0 +5.19956,0 +4.57262,0 +9.51388,0 +12.66671,0.003 +20.64028,0.074 +17.04212,0.207 +20.04393,0.354 +21.9127,0.456 +26.6137,0.52 +26.21088,0.543 +25.87807,0.491 +22.9417,0.416 +31.23942,0.321 +25.58123,0.19 +30.15604,0.075 +43.64626,0.001 +64.96131,0 +74.38747,0 +48.54499,0 +31.19917,0 +15.70713,0 +5.64476,0 +5.32737,0 +4.33941,0 +5.29287,0 +4.64434,0 +12.62299,0 +14.61999,0.005 +20.64515,0.115 +15.43942,0.286 +19.59726,0.44 +23.2072,0.57 +28.06626,0.651 +27.24254,0.681 +28.87459,0.638 +26.5618,0.56 +29.72114,0.439 +26.50121,0.276 +39.12417,0.108 +40.38971,0.002 +69.47165,0 +75.68628,0 +57.06961,0 +33.59778,0 +15.94925,0 +7.31674,0 +4.68336,0 +4.50603,0 +4.74139,0 +5.23805,0 +11.90974,0 +12.6558,0.006 +19.25843,0.138 +17.48218,0.34 +15.47093,0.513 +19.62192,0.645 +21.32523,0.696 +25.98869,0.692 +23.75644,0.636 +20.33958,0.534 +25.4364,0.396 +16.59871,0.236 +28.8765,0.092 +44.4999,0.002 +57.16896,0 +62.34107,0 +47.28384,0 +23.94178,0 +15.15388,0 +5.37519,0 +4.72965,0 +4.00205,0 +3.70417,0 +4.77087,0 +11.76123,0 +16.13043,0.005 +22.61408,0.122 +14.92961,0.328 +19.13308,0.495 +21.42827,0.57 +23.35748,0.578 +19.60927,0.54 +31.69437,0.443 +25.30419,0.37 +24.06188,0.287 +22.21847,0.168 +29.26278,0.052 +43.5759,0 +61.11172,0 +67.2197,0 +53.42454,0 +28.28749,0 +15.40741,0 +6.30616,0 +4.8,0 +4.82884,0 +4.26276,0 +4.06686,0 +9.02525,0 +15.44596,0.003 +18.19212,0.079 +15.17517,0.206 +16.96083,0.319 +19.80531,0.426 +21.67571,0.517 +21.66535,0.552 +24.08152,0.545 +23.38737,0.481 +25.67326,0.374 +21.70908,0.235 +21.11692,0.091 +40.17666,0.001 +62.54586,0 +69.01591,0 +55.23547,0 +22.62792,0 +11.96709,0 +5.19718,0 +3.89975,0 +4.49642,0 +3.41581,0 +4.47119,0 +9.85443,0 +11.18924,0.005 +18.3306,0.127 +13.82057,0.303 +14.44671,0.432 +18.63855,0.507 +20.23743,0.551 +21.60026,0.55 +24.00276,0.509 +20.31577,0.39 +28.50424,0.283 +24.4693,0.162 +23.44558,0.057 +46.98021,0 +58.19245,0 +66.56214,0 +49.08761,0 +23.03158,0 +13.0185,0 +5.11431,0 +4.14792,0 +4.76804,0 +3.56566,0 +4.50578,0 +11.37,0 +13.57132,0.004 +15.69765,0.104 +17.41696,0.258 +19.73255,0.406 +20.44838,0.524 +19.96268,0.597 +29.29608,0.624 +19.43084,0.601 +20.95588,0.527 +24.55864,0.405 +24.87794,0.249 +34.28383,0.094 +37.76835,0.001 +67.35598,0 +68.92744,0 +39.61745,0 +29.36637,0 +11.23726,0 +5.20775,0 +4.75656,0 +5.77205,0 +5.0375,0 +5.81997,0 +9.55495,0 +13.13993,0.006 +20.36126,0.144 +17.31173,0.337 +16.46155,0.486 +22.53227,0.618 +24.77754,0.698 +30.47467,0.718 +21.9803,0.682 +23.97865,0.556 +22.81582,0.439 +30.45055,0.261 +29.91845,0.085 +44.74737,0.001 +43.68765,0 +55.65232,0 +54.59403,0 +24.40418,0 +14.85308,0 +5.94031,0 +4.40901,0 +5.1904,0 +4.88344,0 +4.37454,0 +10.34544,0 +13.81392,0.004 +18.50699,0.098 +14.58194,0.252 +18.84847,0.44 +24.05738,0.523 +25.53482,0.571 +28.1948,0.555 +23.06277,0.479 +21.86893,0.324 +25.23856,0.222 +24.55686,0.124 +26.49138,0.044 +54.74948,0 +62.48374,0 +65.74395,0 +51.67779,0 +24.19694,0 +15.1594,0 +6.97887,0 +4.06403,0 +4.48952,0 +4.84432,0 +3.58183,0 +9.95893,0 +12.53606,0.005 +17.61162,0.142 +15.82832,0.338 +17.03401,0.491 +18.07845,0.614 +21.51823,0.684 +27.24894,0.689 +25.63979,0.546 +23.44257,0.388 +22.05306,0.27 +25.03665,0.15 +29.22782,0.046 +41.28007,0 +50.37597,0 +64.54408,0 +55.25592,0 +26.0337,0 +12.10591,0 +5.44997,0 +5.10177,0 +4.17702,0 +5.04575,0 +4.27445,0 +9.53425,0 +12.64846,0.003 +17.96368,0.1 +14.9931,0.264 +16.29952,0.48 +21.57605,0.611 +25.8666,0.679 +26.02033,0.703 +28.29405,0.664 +24.10269,0.601 +19.9981,0.473 +29.73007,0.307 +28.85914,0.119 +42.13697,0.001 +54.95536,0 +60.71278,0 +52.68965,0 +28.02612,0 +13.00025,0 +6.99478,0 +4.70664,0 +5.27233,0 +4.50445,0 +4.56531,0 +12.17315,0 +15.13217,0.001 +22.3524,0.068 +18.69646,0.195 +17.05441,0.341 +17.28289,0.47 +25.32082,0.53 +26.05581,0.543 +27.58624,0.508 +23.72864,0.431 +28.62764,0.318 +26.38916,0.172 +29.87716,0.054 +45.85047,0 +61.39847,0 +61.51136,0 +54.53235,0 +28.82937,0 +13.68524,0 +5.4455,0 +5.47812,0 +5.11701,0 +5.1341,0 +5.70888,0 +13.89778,0 +17.15921,0.003 +21.19712,0.089 +19.00531,0.23 +20.90057,0.374 +24.39886,0.499 +28.91949,0.573 +28.32098,0.597 +29.89764,0.543 +25.87038,0.452 +21.90848,0.334 +29.3262,0.181 +38.18071,0.059 +53.24907,0 +67.7224,0 +76.3106,0 +55.15962,0 +30.41474,0 +16.07644,0 +5.82529,0 +3.67055,0 +4.07932,0 +4.32953,0 +3.77867,0 +9.87928,0 +12.90237,0.004 +18.00435,0.111 +12.91379,0.278 +11.21705,0.414 +18.5908,0.482 +22.76717,0.507 +21.22951,0.499 +21.95559,0.449 +17.14524,0.372 +19.14952,0.251 +23.35015,0.139 +25.63225,0.048 +40.11429,0 +33.35731,0 +48.74565,0 +43.97264,0 +20.43332,0 +11.06082,0 +4.53097,0 +4.75948,0 +5.15813,0 +4.78437,0 +4.64888,0 +9.97819,0 +14.03225,0 +23.0914,0.052 +15.74359,0.149 +20.9121,0.262 +21.10732,0.347 +22.85632,0.424 +21.57976,0.461 +28.49128,0.44 +22.84865,0.351 +21.99777,0.248 +26.17711,0.126 +32.71562,0.037 +41.95558,0 +59.60777,0 +64.50224,0 +53.65629,0 +30.65212,0 +14.75062,0 +6.40209,0 +3.9453,0 +4.70051,0 +4.15664,0 +4.4701,0 +9.76829,0 +11.76261,0 +21.91785,0.048 +15.04079,0.178 +18.16377,0.37 +18.38699,0.535 +22.32145,0.6 +25.27278,0.618 +22.90335,0.556 +24.82806,0.447 +26.47207,0.341 +22.64209,0.196 +30.25863,0.056 +49.57735,0 +55.88338,0 +59.1547,0 +48.86915,0 +23.00616,0 +13.5117,0 +7.09961,0 +4.53942,0 +4.48694,0 +4.85066,0 +5.28528,0 +12.4089,0 +16.10343,0.004 +22.70834,0.118 +16.84243,0.314 +20.1697,0.49 +22.73468,0.62 +24.75762,0.681 +27.49762,0.682 +24.96857,0.631 +22.59064,0.52 +31.27841,0.353 +26.19826,0.206 +37.51495,0.072 +42.46012,0 +63.14531,0 +77.89875,0 +55.18186,0 +33.1527,0 +16.03693,0 +7.62885,0 +4.24599,0 +3.7029,0 +3.81875,0 +3.00316,0 +9.07149,0 +12.65374,0.004 +20.34352,0.136 +15.21517,0.339 +14.83239,0.505 +18.78382,0.619 +16.82456,0.637 +20.2285,0.585 +21.57047,0.456 +18.17948,0.344 +25.36183,0.243 +19.59507,0.144 +29.40474,0.047 +29.22671,0 +58.70788,0 +53.85198,0 +42.73711,0 +19.08505,0 +14.56509,0 +4.8704,0 +4.93157,0 +5.66961,0 +5.62288,0 +5.78151,0 +12.21449,0 +16.0327,0.005 +20.95956,0.139 +20.01519,0.276 +23.00844,0.443 +22.19878,0.609 +30.19278,0.69 +29.40308,0.702 +31.11746,0.647 +26.23946,0.545 +25.09695,0.371 +30.74144,0.223 +34.47516,0.067 +55.19941,0 +71.50798,0 +78.182,0 +55.9953,0 +31.75287,0 +17.01144,0 +7.69623,0 +5.79706,0 +5.26876,0 +4.64773,0 +5.02399,0 +12.39212,0 +13.25037,0.004 +21.8174,0.126 +17.83277,0.328 +21.46968,0.508 +24.83995,0.634 +27.52286,0.707 +23.49856,0.728 +29.2705,0.692 +26.88789,0.553 +27.00895,0.37 +28.47489,0.206 +36.83333,0.069 +44.29689,0 +64.35399,0 +83.28445,0 +53.43032,0 +25.66061,0 +16.17806,0 +6.7201,0 +5.82016,0 +5.40606,0 +5.3208,0 +5.90545,0 +12.29262,0 +13.99656,0.004 +22.84263,0.13 +20.65342,0.329 +22.04534,0.493 +23.02519,0.622 +30.57614,0.686 +27.2784,0.699 +23.68646,0.672 +25.08349,0.59 +26.19979,0.425 +29.40072,0.264 +31.4693,0.093 +51.19913,0 +70.80696,0 +74.59731,0 +52.33197,0 +27.08865,0 +17.26459,0 +7.2871,0 +5.53675,0 +4.79063,0 +5.07348,0 +4.816,0 +11.84537,0 +16.35004,0.004 +22.27687,0.139 +16.40103,0.357 +16.91677,0.537 +19.98445,0.661 +25.70489,0.729 +29.31281,0.75 +28.92654,0.728 +24.77486,0.656 +30.44047,0.531 +25.0754,0.329 +30.20337,0.125 +46.29094,0 +61.09567,0 +71.66465,0 +48.51499,0 +30.61109,0 +17.1294,0 +5.87431,0 +5.87981,0 +5.45305,0 +4.84348,0 +5.81893,0 +10.25653,0 +14.69953,0.003 +19.28662,0.122 +17.29176,0.335 +21.87475,0.522 +25.59079,0.639 +24.36266,0.717 +28.70617,0.736 +29.46261,0.656 +29.55515,0.504 +34.56144,0.346 +35.30626,0.188 +36.93499,0.06 +43.604,0 +59.54457,0 +71.58284,0 +60.32879,0 +32.49378,0 +15.2495,0 +6.33087,0 +3.549,0 +3.93935,0 +3.50702,0 +4.33623,0 +9.19271,0 +12.87693,0.001 +18.68697,0.08 +16.3645,0.226 +16.18713,0.352 +18.32958,0.395 +19.50682,0.375 +21.21765,0.305 +24.27658,0.226 +23.21919,0.162 +26.98529,0.121 +21.39024,0.073 +28.00644,0.021 +41.94779,0 +61.78334,0 +72.44348,0 +45.81968,0 +21.35814,0 +12.82476,0 +5.01694,0 +4.76057,0 +5.69974,0 +6.29069,0 +4.9688,0 +10.68456,0 +12.41475,0.001 +19.85164,0.075 +18.43243,0.216 +20.18472,0.375 +21.67447,0.492 +28.1022,0.507 +27.99502,0.472 +24.10923,0.4 +27.594,0.284 +28.65093,0.177 +26.67682,0.089 +36.09889,0.026 +53.49952,0 +69.22359,0 +74.20801,0 +55.99816,0 +25.95219,0 +14.59272,0 +5.62524,0 +5.15184,0 +4.48187,0 +5.06953,0 +5.56371,0 +10.46248,0 +12.76969,0.001 +23.39316,0.096 +16.98588,0.237 +20.69906,0.381 +21.25568,0.497 +26.13969,0.578 +32.37326,0.585 +26.35408,0.546 +25.28761,0.446 +29.34872,0.317 +23.52624,0.182 +35.46746,0.064 +47.16645,0 +63.35471,0 +82.05772,0 +49.24982,0 +25.90488,0 +15.52938,0 +6.68727,0 +4.00024,0 +3.79094,0 +4.32792,0 +3.80808,0 +10.07942,0 +12.82479,0.002 +18.54431,0.102 +14.70592,0.285 +16.73585,0.433 +17.6833,0.521 +22.45889,0.567 +22.16565,0.557 +21.72095,0.49 +20.87047,0.385 +22.5934,0.23 +23.01248,0.118 +26.32758,0.034 +38.38365,0 +57.45977,0 +59.14473,0 +49.87889,0 +24.75893,0 +12.69596,0 +5.12882,0 +4.25448,0 +6.72453,0 +5.19914,0 +5.04293,0 +13.39109,0 +15.72395,0.001 +19.53617,0.074 +17.55786,0.229 +18.55231,0.379 +25.13239,0.49 +26.95241,0.562 +23.09952,0.575 +29.32341,0.567 +25.35582,0.482 +27.4319,0.336 +30.69335,0.201 +38.95974,0.061 +46.16654,0 +75.24967,0 +92.70018,0 +51.93775,0 +28.01609,0 +15.89261,0 +6.21075,0 +5.23553,0 +5.34063,0 +5.19148,0 +5.56158,0 +13.19107,0 +16.62191,0 +22.73996,0.074 +16.93323,0.249 +20.30852,0.431 +22.83732,0.548 +28.72908,0.622 +28.60179,0.629 +26.79195,0.591 +21.58969,0.491 +28.61405,0.337 +24.70108,0.185 +30.95042,0.054 +44.66813,0 +58.34795,0 +82.94766,0 +56.10152,0 +23.98624,0 +16.60292,0 +6.77761,0 +5.02684,0 +5.09503,0 +5.87608,0 +4.164,0 +11.54006,0 +16.12585,0.002 +21.42567,0.098 +19.23946,0.271 +20.11873,0.426 +23.92914,0.553 +25.51744,0.623 +27.86743,0.612 +27.50884,0.583 +26.71843,0.472 +29.71201,0.32 +26.54163,0.187 +30.25565,0.05 +47.24939,0 +70.38268,0 +80.58406,0 +61.12809,0 +27.44001,0 +16.79837,0 +7.72803,0 +3.90822,0 +3.8099,0 +4.58455,0 +4.5089,0 +8.55514,0 +12.94018,0 +15.15344,0.052 +16.3227,0.161 +19.18832,0.279 +19.51235,0.384 +25.12714,0.466 +23.40143,0.505 +23.44102,0.504 +20.14521,0.461 +29.57265,0.361 +24.0433,0.215 +33.13003,0.075 +42.43444,0 +51.51995,0 +64.19256,0 +34.4423,0 +26.83199,0 +14.0653,0 +5.42123,0 +4.33066,0 +4.64951,0 +5.11357,0 +4.69797,0 +9.04931,0 +16.41312,0.001 +19.78069,0.089 +18.38074,0.261 +17.42738,0.441 +21.95768,0.558 +27.06627,0.611 +25.0408,0.6 +22.63776,0.549 +22.78796,0.449 +26.03949,0.307 +23.68963,0.178 +27.29272,0.057 +48.74047,0 +72.37006,0 +62.71362,0 +40.42437,0 +26.37808,0 +16.01915,0 +6.7183,0 +4.1599,0 +4.52503,0 +4.40353,0 +4.93756,0 +9.82081,0 +14.37969,0.002 +16.22224,0.108 +14.39881,0.276 +16.02825,0.443 +19.75026,0.585 +23.78193,0.655 +24.41487,0.666 +22.88228,0.623 +17.84195,0.517 +25.02692,0.363 +26.03234,0.203 +28.04987,0.067 +56.90487,0 +59.66829,0 +60.54307,0 +49.89612,0 +25.30515,0 +12.40096,0 +5.75905,0 +5.18794,0 +4.25612,0 +4.63663,0 +4.2542,0 +11.7982,0 +15.13916,0.001 +19.54887,0.102 +17.09385,0.32 +14.00607,0.52 +23.13264,0.68 +30.11986,0.751 +23.61718,0.769 +29.05925,0.737 +20.88072,0.659 +28.11609,0.53 +33.148,0.349 +38.23326,0.133 +43.68215,0 +60.90455,0 +62.38065,0 +51.17437,0 +28.35249,0 +14.03974,0 +7.07516,0 +4.67918,0 +4.27582,0 +4.42428,0 +4.64129,0 +9.99854,0 +14.79389,0.002 +20.35981,0.132 +15.10127,0.347 +17.05418,0.527 +16.95322,0.686 +22.59985,0.752 +25.83978,0.769 +29.29611,0.737 +23.04087,0.658 +21.77434,0.527 +24.2927,0.342 +27.16141,0.126 +41.89871,0 +49.65515,0 +74.1833,0 +48.74986,0 +21.46655,0 +12.78846,0 +6.76325,0 +4.90841,0 +5.13212,0 +5.04219,0 +4.68293,0 +12.60877,0 +14.90307,0.002 +23.0104,0.103 +18.51115,0.292 +19.03025,0.479 +21.06102,0.62 +25.78693,0.705 +23.62485,0.726 +24.77074,0.709 +21.86808,0.624 +27.21452,0.48 +26.2857,0.279 +27.65501,0.083 +46.43577,0 +63.11854,0 +67.3346,0 +51.63906,0 +28.29401,0 +14.38285,0 +6.63035,0 +6.3153,0 +5.73489,0 +5.22942,0 +4.45308,0 +12.29479,0 +15.27728,0.002 +18.05634,0.118 +19.52366,0.318 +19.0907,0.496 +24.36543,0.651 +29.82465,0.714 +29.56172,0.73 +30.23966,0.688 +27.92736,0.603 +32.09141,0.439 +26.93502,0.247 +31.27276,0.067 +43.89306,0 +70.59622,0 +73.08601,0 +60.50041,0 +29.55554,0 +15.07201,0 +6.49422,0 +5.36711,0 +5.36149,0 +4.95343,0 +4.44256,0 +11.87655,0 +18.68342,0.002 +23.98687,0.132 +19.46616,0.338 +17.97213,0.508 +24.19391,0.621 +27.98043,0.675 +30.56001,0.648 +25.6726,0.53 +29.21786,0.403 +34.62526,0.275 +29.56029,0.15 +35.94915,0.044 +49.52775,0 +67.7309,0 +75.542,0 +58.12389,0 +29.44633,0 +17.29333,0 +6.7331,0 +4.8369,0 +4.50547,0 +4.59212,0 +3.92024,0 +10.08583,0 +12.64994,0.002 +18.43157,0.133 +14.72612,0.346 +16.60721,0.52 +15.52257,0.641 +20.84518,0.71 +24.30686,0.73 +23.54038,0.696 +23.25588,0.603 +19.95416,0.382 +21.37835,0.204 +27.23442,0.063 +39.60897,0 +60.75937,0 +60.48305,0 +59.59344,0 +28.39491,0 +8.67343,0 +5.76411,0 +4.60385,0 +5.70414,0 +4.55685,0 +4.30505,0 +10.09683,0 +14.49233,0.002 +16.95086,0.111 +15.56934,0.296 +20.4148,0.459 +21.11161,0.564 +21.88044,0.623 +24.58498,0.631 +30.81525,0.567 +20.75098,0.397 +23.28587,0.251 +23.94462,0.129 +30.45541,0.037 +38.03995,0 +56.66139,0 +64.28128,0 +51.29066,0 +25.06731,0 +13.47187,0 +6.00702,0 +3.6557,0 +3.61583,0 +3.22814,0 +3.80239,0 +9.17605,0 +11.16616,0.001 +14.80498,0.094 +13.44754,0.258 +17.99665,0.439 +17.70283,0.612 +24.7016,0.686 +16.47206,0.672 +23.80068,0.613 +18.57161,0.538 +20.69421,0.338 +17.33778,0.168 +23.5031,0.048 +37.74807,0 +46.60845,0 +65.27877,0 +43.30505,0 +24.45151,0 +12.25458,0 +5.8044,0 +5.76559,0 +5.29149,0 +5.61316,0 +5.24499,0 +12.8063,0 +18.53723,0.001 +23.50751,0.097 +17.63488,0.268 +18.41292,0.387 +25.27227,0.485 +33.96654,0.542 +28.55365,0.556 +32.47584,0.537 +25.14825,0.436 +34.86075,0.327 +29.09636,0.176 +34.90506,0.052 +45.41677,0 +73.9637,0 +72.63682,0 +58.70451,0 +29.91033,0 +17.981,0 +6.72351,0 +5.80708,0 +5.17798,0 +5.90086,0 +5.9435,0 +11.49454,0 +15.92264,0.001 +19.50146,0.089 +20.11351,0.248 +22.54536,0.396 +23.32083,0.495 +30.63021,0.528 +27.62942,0.509 +29.12119,0.457 +29.55602,0.355 +30.51182,0.223 +28.01052,0.106 +33.24033,0.026 +48.69296,0 +68.4482,0 +81.23277,0 +64.38973,0 +31.90085,0 +18.02844,0 +6.85984,0 +4.51382,0 +5.07112,0 +5.05853,0 +4.62731,0 +11.74838,0 +13.3817,0.002 +16.35335,0.127 +13.87179,0.334 +18.9156,0.504 +18.0234,0.626 +22.52934,0.691 +21.38062,0.703 +23.52588,0.669 +19.80948,0.578 +23.65121,0.402 +24.62147,0.211 +29.89942,0.053 +38.90321,0 +61.61263,0 +58.54431,0 +49.65931,0 +25.47777,0 +12.07254,0 +6.55091,0 +4.0379,0 +4.25043,0 +4.18632,0 +3.75652,0 +9.82892,0 +12.47677,0 +22.08977,0.08 +12.1247,0.229 +16.67148,0.36 +19.38844,0.417 +22.82855,0.446 +22.73076,0.406 +24.66163,0.351 +20.84358,0.249 +18.56931,0.177 +28.21324,0.097 +26.81619,0.028 +44.24257,0 +50.60821,0 +55.16546,0 +40.71241,0 +23.48883,0 +12.25922,0 +4.40556,0 +4.65621,0 +5.55163,0 +6.03104,0 +5.47055,0 +10.1422,0 +16.15254,0 +21.88623,0.064 +15.67949,0.187 +21.21438,0.316 +25.99623,0.428 +26.49325,0.496 +27.74595,0.53 +29.09128,0.535 +23.32944,0.485 +26.91374,0.349 +28.86806,0.205 +34.78718,0.061 +59.19258,0 +70.27166,0 +73.33517,0 +62.64134,0 +35.31329,0 +14.91216,0 +7.21266,0 +4.48829,0 +4.94185,0 +4.51951,0 +4.91707,0 +10.96943,0 +14.94152,0 +17.80905,0.096 +18.61461,0.288 +21.18873,0.475 +23.1601,0.629 +26.3726,0.712 +29.64899,0.739 +28.10269,0.713 +21.30613,0.638 +24.32713,0.512 +26.94983,0.336 +33.19972,0.125 +44.5745,0 +65.59098,0 +77.82392,0 +54.99658,0 +32.88907,0 +15.01157,0 +6.62577,0 +5.78623,0 +6.51897,0 +5.36677,0 +5.63064,0 +13.86501,0 +17.75699,0.001 +21.4834,0.125 +20.42509,0.342 +21.97703,0.52 +20.71824,0.641 +28.45409,0.697 +32.33684,0.682 +28.24384,0.601 +27.87464,0.49 +33.27731,0.351 +27.5246,0.207 +27.0128,0.064 +48.34488,0 +68.73847,0 +83.91503,0 +54.9724,0 +36.56756,0 +17.02602,0 +7.13026,0 +5.48466,0 +5.22678,0 +4.95226,0 +4.91036,0 +11.43151,0 +16.06121,0.001 +18.71796,0.13 +18.53156,0.329 +21.62922,0.489 +21.20866,0.611 +20.82295,0.684 +25.0488,0.677 +26.41079,0.58 +21.7456,0.426 +26.68436,0.291 +26.79432,0.141 +28.71032,0.05 +46.24198,0 +57.12105,0 +71.03944,0 +54.83686,0 +24.60105,0 +13.55419,0 +5.57273,0 +3.97643,0 +4.68764,0 +4.12031,0 +4.21108,0 +10.07351,0 +12.52398,0 +16.27543,0.041 +12.10748,0.149 +16.08615,0.273 +25.06104,0.392 +22.28336,0.488 +22.19383,0.506 +21.72364,0.454 +22.76624,0.362 +23.29944,0.256 +26.17377,0.138 +26.71506,0.036 +47.27363,0 +52.48186,0 +56.47795,0 +50.2833,0 +24.47526,0 +11.16833,0 +4.42812,0 +5.79415,0 +5.87393,0 +5.60047,0 +6.20611,0 +12.74422,0 +14.90024,0 +25.58163,0.074 +18.89698,0.247 +19.69381,0.425 +26.25935,0.558 +29.13249,0.607 +28.45151,0.605 +33.50824,0.543 +26.77804,0.424 +29.98575,0.314 +27.53727,0.17 +37.31891,0.051 +53.73679,0 +66.22725,0 +77.00771,0 +70.9425,0 +26.96339,0 +18.90415,0 +7.86213,0 +4.64844,0 +4.69564,0 +3.57256,0 +4.94083,0 +10.4104,0 +16.02179,0 +18.05516,0.087 +16.23425,0.258 +19.66663,0.427 +19.35677,0.553 +23.20346,0.626 +23.59522,0.64 +26.01779,0.609 +24.84932,0.53 +27.56575,0.404 +24.9354,0.233 +27.65332,0.077 +44.55082,0 +67.30989,0 +73.96819,0 +54.55034,0 +25.36319,0 +13.68369,0 +6.8692,0 +5.14146,0 +6.64597,0 +5.21528,0 +5.39837,0 +12.92741,0 +18.8727,0.001 +23.00649,0.117 +17.83698,0.325 +18.42361,0.5 +23.57795,0.625 +27.74318,0.696 +24.66047,0.721 +31.2563,0.698 +30.32438,0.626 +32.01559,0.503 +31.46979,0.329 +34.33738,0.122 +53.09808,0 +75.80335,0 +76.14255,0 +65.19445,0 +29.95174,0 +15.49392,0 +7.24166,0 +3.80339,0 +3.91079,0 +3.55799,0 +4.6862,0 +8.6203,0 +11.81942,0.001 +15.69573,0.152 +14.64905,0.369 +16.98385,0.536 +17.74558,0.649 +19.60776,0.713 +22.40506,0.73 +20.65113,0.699 +20.35411,0.622 +26.09339,0.496 +21.43637,0.316 +30.71998,0.111 +38.87243,0 +58.46425,0 +56.70615,0 +42.44572,0 +22.99686,0 +13.3252,0 +4.16204,0 +3.38372,0 +3.77742,0 +3.70816,0 +3.15251,0 +9.12109,0 +12.3719,0 +14.29722,0.122 +11.97213,0.329 +15.48689,0.5 +14.03885,0.624 +22.72471,0.692 +21.59804,0.711 +20.08085,0.681 +23.33641,0.596 +24.30659,0.458 +18.67592,0.277 +27.22708,0.089 +31.66232,0 +42.1792,0 +51.04407,0 +32.30929,0 +20.98766,0 +9.18673,0 +4.28772,0 +4.57646,0 +5.52445,0 +4.6352,0 +4.59046,0 +9.59438,0 +12.8125,0 +20.34049,0.081 +17.43795,0.242 +17.19695,0.371 +21.05804,0.469 +24.98967,0.524 +24.40916,0.537 +22.82862,0.516 +26.09975,0.454 +29.271,0.345 +25.91546,0.197 +27.06215,0.057 +43.9302,0 +62.90449,0 +63.50292,0 +55.73052,0 +27.27156,0 +10.38744,0 +6.07407,0 +4.35852,0 +4.48851,0 +4.96809,0 +4.56766,0 +9.4145,0 +17.0553,0 +17.44516,0.075 +18.27718,0.23 +17.77925,0.38 +19.92822,0.514 +29.62351,0.597 +21.27439,0.643 +21.70374,0.649 +23.02422,0.583 +28.17497,0.462 +26.42668,0.292 +32.39923,0.1 +46.01133,0 +62.149,0 +69.69419,0 +51.49566,0 +21.0122,0 +16.73682,0 +6.94119,0 +4.62809,0 +5.56279,0 +5.35762,0 +4.69767,0 +11.89517,0 +15.57293,0 +25.95488,0.126 +17.60518,0.343 +17.77206,0.521 +19.65369,0.644 +27.21778,0.707 +26.29577,0.724 +26.45777,0.693 +23.55713,0.616 +24.63414,0.492 +31.05702,0.317 +29.38666,0.112 +45.01434,0 +73.01604,0 +73.83546,0 +55.46709,0 +26.16454,0 +18.83476,0 +6.94159,0 +3.97266,0 +5.04281,0 +3.93023,0 +3.94735,0 +9.37419,0 +11.84289,0 +18.07354,0.106 +14.29635,0.313 +17.6706,0.506 +18.2932,0.625 +24.41083,0.691 +21.82842,0.709 +24.67448,0.681 +22.02652,0.604 +24.55781,0.478 +17.5265,0.303 +24.58389,0.102 +43.41775,0 +54.82088,0 +63.89395,0 +41.7233,0 +25.61552,0 +12.58567,0 +5.98743,0 +4.82311,0 +5.04447,0 +5.18433,0 +5.60867,0 +10.98567,0 +14.7783,0 +21.869,0.105 +19.17685,0.271 +19.56536,0.41 +22.74773,0.524 +30.32232,0.584 +22.79217,0.591 +26.96295,0.565 +25.68703,0.508 +28.0858,0.415 +28.58858,0.273 +29.29148,0.101 +49.39504,0 +60.65055,0 +76.27817,0 +56.4922,0 +27.6471,0 +13.5961,0 +6.60056,0 +3.82689,0 +4.5687,0 +4.51959,0 +4.2015,0 +9.5495,0 +10.94901,0 +16.33283,0.129 +16.81921,0.343 +15.84584,0.514 +19.11869,0.631 +25.25991,0.695 +24.21029,0.71 +19.49061,0.684 +21.99178,0.61 +23.27785,0.487 +22.30828,0.303 +28.55309,0.102 +46.55684,0 +46.46536,0 +57.73272,0 +51.64486,0 +20.55016,0 +11.34663,0 +4.55292,0 +5.30557,0 +6.17154,0 +6.21333,0 +6.28232,0 +12.44141,0 +16.98197,0 +27.42702,0.102 +19.509,0.271 +23.58815,0.39 +25.14457,0.502 +30.93777,0.554 +25.93454,0.582 +30.65456,0.56 +25.04223,0.509 +34.00302,0.394 +30.89762,0.216 +39.90353,0.058 +62.77993,0 +68.58329,0 +72.37295,0 +62.89417,0 +32.08519,0 +18.06633,0 +6.21218,0 +4.40513,0 +5.81298,0 +5.21001,0 +4.85163,0 +11.74054,0 +14.43428,0 +20.32487,0.041 +17.88348,0.131 +16.78019,0.224 +20.18347,0.327 +27.14874,0.41 +25.09746,0.406 +23.78649,0.349 +22.00761,0.262 +24.70683,0.181 +26.51059,0.097 +31.82315,0.024 +52.6823,0 +63.5094,0 +66.72092,0 +55.93747,0 +30.18624,0 +13.69983,0 +6.94621,0 +5.01844,0 +4.40119,0 +4.30785,0 +4.24839,0 +12.55767,0 +13.31193,0 +21.45369,0.092 +13.97629,0.288 +17.66813,0.47 +21.04722,0.607 +26.49401,0.679 +23.92275,0.699 +22.90677,0.668 +27.5034,0.587 +28.4316,0.454 +25.87391,0.275 +37.11556,0.085 +47.68845,0 +62.85762,0 +73.529,0 +49.31916,0 +23.13135,0 +16.34617,0 +6.31839,0 +4.9733,0 +4.40465,0 +4.51217,0 +4.59796,0 +10.56472,0 +13.79955,0 +16.45183,0.118 +16.52439,0.33 +19.73112,0.506 +22.77549,0.653 +23.36476,0.719 +21.44881,0.736 +23.18323,0.706 +26.58776,0.63 +24.29017,0.503 +20.91735,0.327 +29.69922,0.12 +47.93715,0 +65.33257,0 +66.70194,0 +59.06486,0 +26.23945,0 +14.52674,0 +6.66067,0 +4.88518,0 +4.57344,0 +4.73569,0 +4.66624,0 +10.33469,0 +14.59486,0 +17.63915,0.148 +17.06077,0.371 +20.29596,0.543 +22.1348,0.663 +21.47719,0.727 +26.92106,0.743 +25.81544,0.713 +20.63001,0.636 +24.69418,0.51 +19.37679,0.333 +26.90224,0.122 +53.60762,0 +68.42856,0 +56.69638,0 +46.78314,0 +30.90428,0 +13.5983,0 +6.07362,0 +5.07087,0 +4.86065,0 +4.46199,0 +4.15375,0 +9.51709,0 +13.99098,0 +18.96189,0.146 +14.44664,0.369 +20.62755,0.541 +19.35445,0.663 +24.56073,0.726 +26.45564,0.742 +25.77045,0.712 +22.43894,0.635 +24.18205,0.509 +29.73019,0.334 +31.67234,0.123 +51.56679,0 +71.38906,0 +75.05519,0 +53.77427,0 +27.12646,0 +15.77358,0 +7.40388,0 +5.03769,0 +5.09393,0 +4.288,0 +4.17286,0 +10.30473,0 +15.17315,0 +22.73888,0.105 +13.38947,0.292 +16.78051,0.456 +14.36193,0.589 +23.41426,0.675 +25.26543,0.706 +22.47926,0.671 +21.6074,0.588 +26.27916,0.438 +22.99446,0.23 +26.94721,0.059 +40.7439,0 +62.50218,0 +60.96268,0 +46.08525,0 +24.6699,0 +12.90221,0 +6.68515,0 +4.43369,0 +4.58423,0 +4.16748,0 +4.73419,0 +8.45359,0 +13.86059,0 +21.49822,0.124 +15.55067,0.342 +17.06778,0.514 +20.35001,0.641 +23.31714,0.704 +25.98667,0.721 +21.70463,0.689 +20.16325,0.613 +24.10469,0.488 +21.08322,0.313 +25.19564,0.105 +36.72531,0 +58.18813,0 +65.58911,0 +47.4905,0 +21.96068,0 +12.15908,0 +5.36036,0 +4.63578,0 +4.36344,0 +4.55222,0 +5.01259,0 +10.73774,0 +14.38595,0 +20.01855,0.097 +15.4033,0.308 +16.34321,0.485 +19.58122,0.587 +25.04814,0.609 +26.46256,0.567 +24.33662,0.502 +17.12011,0.421 +23.41967,0.314 +24.23951,0.192 +26.85958,0.06 +39.79703,0 +51.6539,0 +52.57542,0 +54.31985,0 +22.13954,0 +15.37495,0 +5.56662,0 +4.0076,0 +3.95085,0 +4.66878,0 +4.49544,0 +8.98553,0 +12.35331,0 +19.38292,0.089 +15.53646,0.281 +16.52993,0.462 +19.22858,0.588 +22.67389,0.649 +27.09267,0.665 +19.90411,0.615 +19.36789,0.532 +20.63938,0.401 +24.93925,0.23 +25.40697,0.064 +39.69565,0 +53.62856,0 +64.95416,0 +41.34284,0 +24.27616,0 +14.3011,0 +5.00327,0 +6.05797,0 +5.1026,0 +5.23206,0 +5.3072,0 +11.08608,0 +15.02664,0 +21.23678,0.095 +17.50493,0.278 +19.86397,0.434 +22.36183,0.537 +26.70536,0.592 +28.78919,0.602 +26.55465,0.576 +25.70937,0.496 +23.53551,0.376 +25.38697,0.223 +33.55047,0.061 +46.77002,0 +62.71452,0 +71.8523,0 +62.39706,0 +32.10333,0 +15.15909,0 +6.09565,0 +4.25223,0 +4.63545,0 +4.7884,0 +4.60507,0 +9.73699,0 +13.32572,0 +18.12587,0.115 +16.45607,0.328 +19.29696,0.504 +18.17973,0.641 +27.90422,0.708 +24.18237,0.726 +22.86282,0.691 +26.44171,0.614 +22.9321,0.484 +21.71588,0.305 +28.89181,0.101 +42.95208,0 +77.50009,0 +64.53254,0 +52.72737,0 +25.53594,0 +11.42818,0 +5.21971,0 +6.1373,0 +5.86549,0 +5.24493,0 +4.85062,0 +12.30118,0 +16.39715,0 +20.07333,0.144 +18.56922,0.367 +21.54207,0.54 +21.53586,0.661 +32.75755,0.725 +30.54501,0.74 +27.60111,0.711 +24.71956,0.634 +33.36699,0.506 +28.66943,0.329 +31.99862,0.118 +46.59583,0 +67.2269,0 +79.73076,0 +53.3649,0 +33.8879,0 +15.96709,0 +7.38613,0 +5.7468,0 +6.24919,0 +5.28707,0 +5.46697,0 +11.13421,0 +17.71618,0 +22.05672,0.14 +20.90517,0.357 +25.86435,0.525 +23.99917,0.641 +26.38394,0.705 +29.06907,0.721 +32.27194,0.69 +29.68348,0.613 +29.28996,0.487 +29.86208,0.31 +33.78294,0.104 +44.06283,0 +70.35384,0 +83.23653,0 +52.36278,0 +30.8588,0 +18.11483,0 +7.06747,0 +4.76157,0 +5.20527,0 +5.00388,0 +5.50013,0 +12.12765,0 +16.01691,0 +19.5055,0.132 +18.60714,0.35 +16.42577,0.519 +19.11866,0.637 +27.92056,0.702 +27.34572,0.719 +23.2809,0.689 +23.9281,0.614 +23.12445,0.49 +28.40194,0.316 +32.51455,0.111 +50.1295,0 +63.56687,0 +78.75018,0 +50.02027,0 +28.8816,0 +13.93599,0 +6.71971,0 +4.61228,0 +5.4562,0 +5.85172,0 +5.24876,0 +9.11876,0 +13.19824,0 +21.39013,0.12 +18.31814,0.33 +21.54901,0.501 +24.44349,0.619 +22.34915,0.684 +26.90368,0.701 +27.53041,0.671 +21.88646,0.596 +27.35137,0.474 +24.37431,0.305 +30.92907,0.104 +54.69379,0 +75.11682,0 +73.0803,0 +49.3042,0 +29.77529,0 +13.9568,0 +5.94876,0 +4.2722,0 +5.41434,0 +5.18962,0 +5.42852,0 +11.42569,0 +14.00722,0 +23.10789,0.087 +18.08341,0.275 +19.26488,0.455 +17.53575,0.586 +25.72891,0.654 +28.40041,0.669 +26.33151,0.626 +23.05195,0.529 +29.6084,0.384 +26.06935,0.214 +27.26102,0.06 +55.48292,0 +58.92121,0 +66.40217,0 +56.56906,0 +30.45966,0 +16.03833,0 +5.01629,0 +4.39549,0 +4.65088,0 +4.72437,0 +3.95079,0 +9.04865,0 +14.01969,0 +15.1687,0.13 +14.19435,0.347 +15.50291,0.523 +17.16738,0.647 +22.77976,0.717 +22.58384,0.736 +20.32612,0.709 +15.84393,0.635 +21.82502,0.509 +22.39268,0.333 +25.16497,0.12 +39.1911,0 +55.8819,0 +64.30563,0 +45.16891,0 +23.80086,0 +12.24115,0 +4.21223,0 +5.09405,0 +4.60567,0 +4.89549,0 +4.74962,0 +10.50855,0 +13.36038,0 +19.50225,0.132 +17.5806,0.345 +19.37597,0.509 +23.82599,0.624 +25.11064,0.684 +29.13436,0.693 +22.8021,0.653 +28.50506,0.564 +28.98403,0.426 +27.66671,0.249 +31.99257,0.072 +47.03487,0 +61.05502,0 +69.76498,0 +53.62493,0 +29.7261,0 +16.10842,0 +6.80172,0 +4.50467,0 +4.40554,0 +4.39774,0 +5.24757,0 +12.1818,0 +13.657,0 +21.03065,0.134 +19.22581,0.352 +21.50337,0.521 +21.72654,0.638 +25.97925,0.7 +26.34358,0.715 +23.20058,0.685 +26.50764,0.608 +26.83567,0.481 +26.21411,0.306 +33.52134,0.101 +49.22887,0 +69.34841,0 +72.50681,0 +55.14271,0 +28.0387,0 +18.57418,0 +7.20784,0 +4.97686,0 +4.82657,0 +5.09895,0 +4.99618,0 +11.06871,0 +16.28296,0 +20.48564,0.134 +19.20581,0.355 +19.54678,0.526 +22.46491,0.641 +26.02932,0.705 +30.65839,0.721 +26.68538,0.692 +25.49112,0.617 +22.85066,0.491 +26.81702,0.315 +33.04352,0.106 +50.49248,0 +64.40033,0 +69.6588,0 +58.43788,0 +28.05135,0 +15.86341,0 +7.48295,0 +5.41709,0 +6.28025,0 +5.35451,0 +5.32702,0 +12.38547,0 +17.46909,0 +20.37672,0.137 +14.21343,0.358 +18.78178,0.528 +21.44776,0.647 +26.84628,0.711 +28.45277,0.727 +23.65976,0.698 +22.87041,0.621 +22.78196,0.495 +27.81808,0.318 +34.85678,0.108 +45.61627,0 +69.224,0 +63.98092,0 +49.25567,0 +29.09672,0 +16.20718,0 +5.14546,0 +5.08777,0 +6.35273,0 +4.38172,0 +5.53914,0 +10.53926,0 +15.8586,0 +22.54951,0.14 +20.5978,0.357 +17.58633,0.528 +23.53379,0.644 +26.53319,0.708 +26.66893,0.724 +25.54894,0.694 +24.53668,0.618 +27.48266,0.492 +25.87197,0.314 +29.93049,0.104 +42.71216,0 +62.57434,0 +76.42185,0 +47.13356,0 +26.69974,0 +15.11811,0 +7.84023,0 +4.32888,0 +3.89301,0 +4.87749,0 +4.31667,0 +8.8279,0 +11.96758,0 +17.06843,0.128 +14.27465,0.342 +14.85249,0.512 +15.38318,0.63 +16.99985,0.695 +24.13036,0.712 +24.31007,0.682 +23.33991,0.606 +25.54181,0.48 +19.96073,0.304 +26.02104,0.098 +44.71064,0 +42.73601,0 +46.58194,0 +40.94849,0 +23.6602,0 +14.76519,0 +5.58521,0 +4.77987,0 +4.62817,0 +4.68094,0 +5.67287,0 +10.85384,0 +15.47216,0 +18.59377,0.115 +13.97838,0.319 +19.27302,0.472 +28.83603,0.577 +20.83759,0.641 +26.88664,0.669 +23.53094,0.65 +26.32852,0.578 +24.52568,0.436 +24.52238,0.227 +34.26468,0.054 +44.03872,0 +68.11038,0 +74.99143,0 +46.67519,0 +24.43095,0 +15.80374,0 +6.69898,0 +4.80985,0 +4.42254,0 +4.92587,0 +5.72746,0 +9.8833,0 +16.69285,0 +20.36093,0.094 +16.15971,0.291 +18.25292,0.467 +23.43498,0.595 +23.20299,0.628 +26.16619,0.587 +25.40025,0.474 +24.32363,0.406 +26.61164,0.349 +27.89882,0.215 +29.98474,0.054 +48.49214,0 +61.26542,0 +75.56532,0 +53.01919,0 +29.50389,0 +16.66576,0 +6.85851,0 +4.87335,0 +4.51425,0 +5.04382,0 +4.67901,0 +10.38963,0 +13.99414,0 +19.06989,0.079 +16.4878,0.271 +16.83112,0.456 +18.02135,0.589 +28.52982,0.646 +27.15721,0.648 +22.07979,0.615 +16.41286,0.504 +24.07477,0.357 +30.36002,0.19 +27.51074,0.06 +43.36509,0 +68.41502,0 +60.79189,0 +51.25584,0 +30.60128,0 +15.56425,0 +5.58398,0 +4.20278,0 +3.80484,0 +4.43958,0 +4.15039,0 +10.31665,0 +9.9283,0 +17.85683,0.074 +15.57156,0.243 +17.24083,0.404 +21.71618,0.576 +24.42463,0.622 +20.27659,0.61 +22.4048,0.56 +19.71089,0.482 +22.72803,0.365 +20.72172,0.192 +28.29856,0.041 +35.0715,0 +53.24455,0 +51.03356,0 +54.78698,0 +23.86853,0 +13.03647,0 +5.72032,0 +4.8269,0 +4.9832,0 +4.90237,0 +4.5663,0 +10.98053,0 +15.72338,0 +21.46125,0.064 +16.08605,0.237 +18.32082,0.395 +23.91385,0.496 +23.24859,0.556 +22.0681,0.553 +25.70645,0.507 +20.66974,0.39 +27.04548,0.285 +23.01713,0.161 +31.37455,0.041 +41.0393,0 +63.64896,0 +53.181,0 +43.03306,0 +25.93387,0 +17.0734,0 +5.26464,0 +4.52546,0 +4.66242,0 +4.66787,0 +4.97993,0 +11.08855,0 +13.62019,0 +20.33607,0.074 +13.53815,0.256 +14.71483,0.431 +22.70454,0.559 +24.55525,0.634 +26.63967,0.657 +25.58168,0.625 +23.85997,0.545 +24.04481,0.414 +20.46087,0.238 +35.56042,0.062 +43.42458,0 +60.64522,0 +66.68987,0 +46.26649,0 +19.27269,0 +14.52064,0 +5.90941,0 +5.02383,0 +4.36425,0 +4.01792,0 +4.34221,0 +10.60563,0 +13.07715,0 +17.95429,0.104 +12.50619,0.311 +16.93219,0.484 +20.26155,0.616 +24.08486,0.684 +26.62423,0.703 +26.48206,0.667 +20.45928,0.589 +24.56356,0.462 +20.75401,0.284 +27.43838,0.085 +42.41261,0 +55.21631,0 +69.94388,0 +43.74465,0 +27.05971,0 +13.59177,0 +5.9356,0 +4.69641,0 +5.67802,0 +5.39025,0 +5.2452,0 +11.31153,0 +14.6604,0 +22.42832,0.132 +15.79645,0.351 +18.34261,0.52 +20.69793,0.637 +24.56151,0.702 +24.4843,0.718 +26.54028,0.686 +26.11808,0.61 +23.93617,0.484 +25.16494,0.294 +31.76865,0.089 +42.69739,0 +68.65905,0 +76.80154,0 +50.46704,0 +30.43366,0 +17.51891,0 +5.97809,0 +4.62811,0 +5.18149,0 +5.19717,0 +4.31466,0 +12.10747,0 +15.69148,0 +20.25254,0.089 +16.57253,0.262 +19.74458,0.422 +21.16724,0.542 +30.26002,0.591 +25.85302,0.592 +27.20284,0.542 +26.28125,0.442 +29.34928,0.309 +23.40972,0.172 +35.09648,0.053 +39.22667,0 +66.11908,0 +66.62637,0 +57.69674,0 +28.16949,0 +15.52383,0 +7.73686,0 +4.37824,0 +4.10326,0 +3.89702,0 +4.49929,0 +10.29359,0 +13.66423,0 +17.71509,0.13 +15.49295,0.345 +14.72834,0.513 +20.82497,0.624 +23.49177,0.686 +26.27341,0.701 +23.76541,0.67 +14.96895,0.594 +26.58438,0.467 +23.34088,0.29 +30.28321,0.085 +39.17998,0 +58.37986,0 +73.7334,0 +48.71588,0 +25.36986,0 +14.67209,0 +5.92555,0 +4.6613,0 +5.67765,0 +5.55766,0 +4.75481,0 +10.09498,0 +13.19767,0 +20.20636,0.09 +18.68303,0.271 +19.45727,0.417 +21.80867,0.573 +26.73229,0.667 +20.43018,0.697 +26.54628,0.663 +28.38803,0.582 +27.86882,0.445 +27.14157,0.257 +34.29034,0.065 +51.7275,0 +76.36452,0 +67.59618,0 +57.45463,0 +28.38319,0 +14.79267,0 +5.60352,0 +5.14551,0 +4.79556,0 +4.39755,0 +4.78973,0 +9.03144,0 +16.47226,0 +19.08859,0.114 +14.68573,0.329 +19.1876,0.503 +25.50148,0.613 +22.56224,0.67 +27.68211,0.675 +24.48129,0.636 +24.59017,0.543 +27.36287,0.399 +22.46873,0.217 +29.05129,0.051 +46.2052,0 +64.91339,0 +75.12816,0 +54.0818,0 +31.48743,0 +12.03295,0 +4.62275,0 +4.93203,0 +5.11922,0 +4.58935,0 +3.92461,0 +10.96292,0 +12.22249,0 +21.94349,0.094 +18.59147,0.3 +19.28315,0.48 +22.42774,0.593 +27.6276,0.658 +28.26746,0.672 +24.73128,0.655 +21.4793,0.573 +22.71029,0.44 +22.98594,0.259 +32.40478,0.068 +50.58581,0 +55.40441,0 +70.8111,0 +47.68798,0 +23.62913,0 +13.85742,0 +5.97173,0 +4.58644,0 +4.62186,0 +4.06907,0 +4.15451,0 +10.62114,0 +12.09983,0 +19.00088,0.105 +17.08538,0.321 +20.73566,0.501 +21.99687,0.63 +29.14914,0.692 +28.58307,0.704 +28.29356,0.673 +24.20013,0.589 +25.99305,0.454 +22.96626,0.27 +27.79822,0.073 +42.33633,0 +52.90543,0 +67.66119,0 +45.31507,0 +24.71021,0 +13.05035,0 +6.79899,0 +6.0926,0 +5.83372,0 +5.39143,0 +5.7385,0 +11.84093,0 +18.25696,0 +24.80137,0.099 +20.62038,0.308 +21.19779,0.488 +24.24526,0.61 +29.14625,0.676 +30.06301,0.691 +27.74642,0.667 +26.08866,0.586 +30.49567,0.453 +22.4239,0.261 +37.05759,0.07 +53.93324,0 +70.82166,0 +91.01241,0 +60.04138,0 +32.50716,0 +16.75658,0 +8.12757,0 +4.82962,0 +4.27489,0 +4.30445,0 +4.96756,0 +10.68728,0 +15.40723,0 +18.45173,0.099 +14.27575,0.308 +15.89393,0.486 +20.04378,0.621 +22.36161,0.684 +23.45244,0.699 +24.81012,0.658 +22.86923,0.572 +25.68738,0.437 +24.1494,0.256 +25.4651,0.066 +42.96353,0 +62.40561,0 +65.60637,0 +51.64414,0 +29.45994,0 +11.08806,0 +6.50314,0 +4.08379,0 +3.86385,0 +4.43386,0 +4.40577,0 +10.88069,0 +14.63274,0 +21.13797,0.086 +14.40833,0.278 +15.91996,0.451 +24.42585,0.576 +23.75702,0.647 +24.55258,0.666 +20.40438,0.634 +25.022,0.553 +25.23213,0.422 +28.97149,0.233 +25.32377,0.058 +40.07939,0 +54.98804,0 +57.99258,0 +49.65411,0 +35.57427,0 +13.74549,0 +4.57201,0 +6.04388,0 +4.91675,0 +5.52932,0 +4.90279,0 +10.67337,0 +15.73559,0 +25.06351,0.09 +17.66286,0.286 +22.14251,0.461 +21.31061,0.599 +26.44562,0.669 +28.02357,0.687 +31.38329,0.659 +27.35516,0.579 +30.40207,0.447 +30.70017,0.259 +35.72139,0.054 +53.9038,0 +68.04301,0 +82.24062,0 +60.29079,0 +26.08371,0 +15.24404,0 +7.43961,0 +3.4231,0 +3.69287,0 +4.31144,0 +3.2011,0 +6.56017,0 +8.95558,0 +15.46905,0.105 +11.07772,0.311 +16.33365,0.482 +18.23924,0.596 +19.57509,0.661 +16.79295,0.676 +21.39498,0.65 +19.5481,0.571 +23.92334,0.414 +21.58958,0.197 +26.17668,0.044 +33.94537,0 +48.43045,0 +60.39715,0 +39.45402,0 +22.67802,0 +9.33867,0 +5.90681,0 +5.10016,0 +4.71448,0 +4.32779,0 +4.5603,0 +10.09373,0 +13.11992,0 +19.11832,0.096 +17.67471,0.296 +18.02422,0.467 +26.0012,0.607 +24.39119,0.67 +27.77322,0.684 +26.39946,0.637 +22.43919,0.549 +28.91763,0.415 +21.08925,0.22 +30.11988,0.058 +52.15019,0 +54.40204,0 +86.78675,0 +53.29828,0 +31.11376,0 +17.40072,0 +7.09158,0 +5.34385,0 +3.90404,0 +5.16663,0 +5.06424,0 +11.88616,0 +16.91786,0 +20.30695,0.105 +18.2039,0.308 +20.14462,0.477 +26.25448,0.613 +29.14181,0.669 +29.5983,0.669 +31.10156,0.635 +23.94263,0.566 +29.50956,0.451 +24.64571,0.283 +34.44422,0.085 +44.20961,0 +57.86625,0 +86.71133,0 +60.89797,0 +35.90664,0 +16.85376,0 +5.83536,0 \ No newline at end of file diff --git a/examples/offset_converter_example/offset_diesel_genset_nonconvex_investment.py b/examples/offset_converter_example/offset_diesel_genset_nonconvex_investment.py new file mode 100644 index 000000000..38e8cccf9 --- /dev/null +++ b/examples/offset_converter_example/offset_diesel_genset_nonconvex_investment.py @@ -0,0 +1,608 @@ +# -*- coding: utf-8 -*- + +""" +General description +------------------- +This example focuses on the modelling of an OffsetConverters representing +a diesel generator in a hybrid mini-grid system considering its real efficiency +curve based on the min/max load and efficiency. + +The system consists of the following components: + - pv: solar potential to generate electricity + - diesel_source: input diesel for the diesel genset + - diesel_genset: generates ac electricity + - rectifier: converts generated ac electricity from the diesel genset + to dc electricity + - inverter: converts generated dc electricity from the pv to ac electricity + - battery: stores the generated dc electricity + - demand_el: ac electricity demand (given as a separate csv file) + - excess_el: allows for some electricity overproduction + + +Code +---- +Download source code: :download:`offset_diesel_genset_nonconvex_investment.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/offset_converter_example/offset_diesel_genset_nonconvex_investment.py + :language: python + :lines: 44- + +Data +---- +Download data: :download:`input_data.csv ` + +Installation requirements +------------------------- +This example requires the version v0.5.x of oemof. Install by: + + pip install 'oemof.solph>=0.5,<0.6' + +""" + +__copyright__ = "oemof developer group" +__license__ = "MIT" + +import numpy as np +import os +import pandas as pd +import time +from datetime import datetime, timedelta +from oemof import solph + +try: + import matplotlib.pyplot as plt +except ImportError: + plt = None + + +def offset_converter_example(): + ########################################################################## + # Initialize the energy system and calculate necessary parameters + ########################################################################## + + # Start time for calculating the total elapsed time. + start_simulation_time = time.time() + + start = "2022-01-01" + + # The maximum number of days depends on the given csv file. + n_days = 5 + n_days_in_year = 365 + + # Create date and time objects. + start_date_obj = datetime.strptime(start, "%Y-%m-%d") + start_date = start_date_obj.date() + start_time = start_date_obj.time() + start_datetime = datetime.combine( + start_date_obj.date(), start_date_obj.time() + ) + end_datetime = start_datetime + timedelta(days=n_days) + + # Import data. + current_directory = os.path.dirname(os.path.abspath(__file__)) + filename = os.path.join(current_directory, "diesel_genset_data.csv") + data = pd.read_csv(filepath_or_buffer=filename) + + # Change the index of data to be able to select data based on the time range. + data.index = pd.date_range(start="2022-01-01", periods=len(data), freq="H") + + # Choose the range of the solar potential and demand + # based on the selected simulation period. + solar_potential = data.SolarGen.loc[start_datetime:end_datetime] + hourly_demand = data.Demand.loc[start_datetime:end_datetime] + peak_solar_potential = solar_potential.max() + peak_demand = hourly_demand.max() + + # Create the energy system. + date_time_index = pd.date_range( + start=start_date, periods=n_days * 24, freq="H" + ) + energy_system = solph.EnergySystem(timeindex=date_time_index) + + # -------------------- BUSES -------------------- + # Create electricity and diesel buses. + b_el_ac = solph.buses.Bus(label="electricity_ac") + b_el_dc = solph.buses.Bus(label="electricity_dc") + b_diesel = solph.buses.Bus(label="diesel") + + # -------------------- SOURCES -------------------- + diesel_cost = 0.65 # currency/l + diesel_density = 0.846 # kg/l + diesel_lhv = 11.83 # kWh/kg + diesel_source = solph.components.Source( + label="diesel_source", + outputs={ + b_diesel: solph.flows.Flow( + variable_costs=diesel_cost / diesel_density / diesel_lhv + ) + }, + ) + + # EPC stands for the equivalent periodical costs. + epc_pv = 152.62 # currency/kW/year + pv = solph.components.Source( + label="pv", + outputs={ + b_el_dc: solph.flows.Flow( + fix=solar_potential / peak_solar_potential, + nominal_value=None, + investment=solph.Investment( + ep_costs=epc_pv * n_days / n_days_in_year + ), + variable_costs=0, + ) + }, + ) + + # -------------------- CONVERTERS -------------------- + # The diesel genset does not have a fixed nominal capacity and will be + # optimized using the minimum and maximum loads and efficiencies. + # In this case, the `Investment` and `NonConvex` attributes must be used. The + # combination of these two attributes is utilized in the + # `InvestNonConvexFlowBlock`. + + # If the nominal capacity of the genset is already known, only the `NonConvex` + # attribute should be defined, and therefore, the `NonConvexFlowBlock` will + # be used. + + # Specify the minimum and maximum loads and the corresponding efficiencies + # for the diesel genset. + min_load = 0.2 + max_load = 1.0 + min_efficiency = 0.20 + max_efficiency = 0.33 + + # Calculate the two polynomial coefficients, i.e. the y-intersection and the + # slope of the linear equation. + c1 = (max_load / max_efficiency - min_load / min_efficiency) / ( + max_load - min_load + ) + c0 = min_load * (1 / min_efficiency - c1) + + epc_diesel_genset = 84.80 # currency/kW/year + variable_cost_diesel_genset = 0.045 # currency/kWh + diesel_genset = solph.components.OffsetConverter( + label="diesel_genset", + inputs={b_diesel: solph.flows.Flow()}, + outputs={ + b_el_ac: solph.flows.Flow( + nominal_value=None, + variable_costs=variable_cost_diesel_genset, + min=min_load, + max=max_load, + investment=solph.Investment( + ep_costs=epc_diesel_genset * n_days / n_days_in_year, + maximum=2 * peak_demand, + ), + nonconvex=solph.NonConvex(), + ), + }, + coefficients=(c0, c1), + ) + + # The rectifier assumed to have a fixed efficiency of 98%. + epc_rectifier = 62.35 # currency/kW/year + rectifier = solph.components.Converter( + label="rectifier", + inputs={ + b_el_ac: solph.flows.Flow( + nominal_value=None, + investment=solph.Investment( + ep_costs=epc_rectifier * n_days / n_days_in_year + ), + variable_costs=0, + ) + }, + outputs={b_el_dc: solph.flows.Flow()}, + conversion_factors={ + b_el_dc: 0.98, + }, + ) + + # The inverter assumed to have a fixed efficiency of 98%. + epc_inverter = 62.35 # currency/kW/year + inverter = solph.components.Converter( + label="inverter", + inputs={ + b_el_dc: solph.flows.Flow( + nominal_value=None, + investment=solph.Investment( + ep_costs=epc_inverter * n_days / n_days_in_year + ), + variable_costs=0, + ) + }, + outputs={b_el_ac: solph.flows.Flow()}, + conversion_factors={ + b_el_ac: 0.98, + }, + ) + + # -------------------- STORAGE -------------------- + epc_battery = 101.00 # currency/kWh/year + battery = solph.components.GenericStorage( + label="battery", + nominal_storage_capacity=None, + investment=solph.Investment( + ep_costs=epc_battery * n_days / n_days_in_year + ), + inputs={b_el_dc: solph.flows.Flow(variable_costs=0)}, + outputs={ + b_el_dc: solph.flows.Flow(investment=solph.Investment(ep_costs=0)) + }, + initial_storage_level=0.0, + min_storage_level=0.0, + max_storage_level=1.0, + balanced=True, + inflow_conversion_factor=0.9, + outflow_conversion_factor=0.9, + invest_relation_input_capacity=1, + invest_relation_output_capacity=0.5, + ) + + # -------------------- SINKS -------------------- + demand_el = solph.components.Sink( + label="electricity_demand", + inputs={ + b_el_ac: solph.flows.Flow( + fix=hourly_demand / peak_demand, + nominal_value=peak_demand, + ) + }, + ) + + excess_el = solph.components.Sink( + label="excess_el", + inputs={b_el_dc: solph.flows.Flow()}, + ) + + # Add all objects to the energy system. + energy_system.add( + pv, + diesel_source, + b_el_dc, + b_el_ac, + b_diesel, + inverter, + rectifier, + diesel_genset, + battery, + demand_el, + excess_el, + ) + + ########################################################################## + # Optimise the energy system + ########################################################################## + + # The higher the MipGap or ratioGap, the faster the solver would converge, + # but the less accurate the results would be. + solver_option = {"gurobi": {"MipGap": "0.02"}, "cbc": {"ratioGap": "0.02"}} + solver = "cbc" + + model = solph.Model(energy_system) + model.solve( + solver=solver, + solve_kwargs={"tee": True}, + cmdline_options=solver_option[solver], + ) + + # End of the calculation time. + end_simulation_time = time.time() + + ########################################################################## + # Process the results + ########################################################################## + + results = solph.processing.results(model) + + results_pv = solph.views.node(results=results, node="pv") + results_diesel_source = solph.views.node( + results=results, node="diesel_source" + ) + results_diesel_genset = solph.views.node( + results=results, node="diesel_genset" + ) + results_inverter = solph.views.node(results=results, node="inverter") + results_rectifier = solph.views.node(results=results, node="rectifier") + results_battery = solph.views.node(results=results, node="battery") + results_demand_el = solph.views.node( + results=results, node="electricity_demand" + ) + results_excess_el = solph.views.node(results=results, node="excess_el") + + # -------------------- SEQUENCES (DYNAMIC) -------------------- + # Hourly demand profile. + sequences_demand = results_demand_el["sequences"][ + (("electricity_ac", "electricity_demand"), "flow") + ] + + # Hourly profiles for solar potential and pv production. + sequences_pv = results_pv["sequences"][(("pv", "electricity_dc"), "flow")] + + # Hourly profiles for diesel consumption and electricity production + # in the diesel genset. + # The 'flow' from oemof is in kWh and must be converted to + # kg by dividing it by the lower heating value and then to + # liter by dividing it by the diesel density. + sequences_diesel_consumption = ( + results_diesel_source["sequences"][ + (("diesel_source", "diesel"), "flow") + ] + / diesel_lhv + / diesel_density + ) + + # Hourly profile for the kWh of the diesel provided for the diesel genset + sequences_diesel_consumption_kwh = results_diesel_source["sequences"][ + (("diesel_source", "diesel"), "flow") + ] + + sequences_diesel_genset = results_diesel_genset["sequences"][ + (("diesel_genset", "electricity_ac"), "flow") + ] + + # Hourly profiles for inverted electricity from dc to ac. + sequences_inverter = results_inverter["sequences"][ + (("inverter", "electricity_ac"), "flow") + ] + + # Hourly profiles for inverted electricity from ac to dc. + sequences_rectifier = results_rectifier["sequences"][ + (("rectifier", "electricity_dc"), "flow") + ] + + # Hourly profiles for excess ac and dc electricity production. + sequences_excess = results_excess_el["sequences"][ + (("electricity_dc", "excess_el"), "flow") + ] + + # -------------------- SCALARS (STATIC) -------------------- + capacity_diesel_genset = results_diesel_genset["scalars"][ + (("diesel_genset", "electricity_ac"), "invest") + ] + + # Define a tolerance to force 'too close' numbers to the `min_load` + # and to 0 to be the same as the `min_load` and 0. + # Load is defined here in percentage. + tol = 1e-8 + load_diesel_genset = sequences_diesel_genset / capacity_diesel_genset * 100 + sequences_diesel_genset[np.abs(load_diesel_genset) < tol] = 0 + sequences_diesel_genset[np.abs(load_diesel_genset - min_load) < tol] = ( + min_load * capacity_diesel_genset + ) + sequences_diesel_genset[np.abs(load_diesel_genset - max_load) < tol] = ( + max_load * capacity_diesel_genset + ) + + # Calculate the efficiency of the diesel genset. + # If the load is equal to 0, the efficiency will also be 0. + # Efficiency is defined here in percentage. + efficiency_diesel_genset = np.zeros(len(sequences_diesel_genset)) + for i in range(len(sequences_diesel_genset)): + if sequences_diesel_consumption_kwh[i] != 0: + efficiency_diesel_genset[i] = ( + sequences_diesel_genset[i] + / sequences_diesel_consumption_kwh[i] + * 100 + ) + + capacity_pv = results_pv["scalars"][(("pv", "electricity_dc"), "invest")] + capacity_inverter = results_inverter["scalars"][ + (("electricity_dc", "inverter"), "invest") + ] + capacity_rectifier = results_rectifier["scalars"][ + (("electricity_ac", "rectifier"), "invest") + ] + capacity_battery = results_battery["scalars"][ + (("electricity_dc", "battery"), "invest") + ] + + total_cost_component = ( + ( + epc_diesel_genset * capacity_diesel_genset + + epc_pv * capacity_pv + + epc_rectifier * capacity_rectifier + + epc_inverter * capacity_inverter + + epc_battery * capacity_battery + ) + * n_days + / n_days_in_year + ) + + # The only componnet with the variable cost is the diesl genset + total_cost_variable = ( + variable_cost_diesel_genset * sequences_diesel_genset.sum(axis=0) + ) + + total_cost_diesel = diesel_cost * sequences_diesel_consumption.sum(axis=0) + total_revenue = ( + total_cost_component + total_cost_variable + total_cost_diesel + ) + total_demand = sequences_demand.sum(axis=0) + + # Levelized cost of electricity in the system in currency's Cent per kWh. + lcoe = 100 * total_revenue / total_demand + + # The share of renewable energy source used to cover the demand. + res = ( + 100 + * sequences_pv.sum(axis=0) + / (sequences_diesel_genset.sum(axis=0) + sequences_pv.sum(axis=0)) + ) + + # The amount of excess electricity (which must probably be dumped). + excess_rate = ( + 100 + * sequences_excess.sum(axis=0) + / (sequences_excess.sum(axis=0) + sequences_demand.sum(axis=0)) + ) + + ########################################################################## + # Print the results in the terminal + ########################################################################## + + if __name__ == "__main__": + print("\n" + 50 * "*") + print( + f"Simulation Time: {end_simulation_time-start_simulation_time:.2f} s" + ) + print(50 * "*") + print(f"Peak Demand:\t {sequences_demand.max():.0f} kW") + print(f"LCOE:\t\t {lcoe:.2f} cent/kWh") + print(f"RES:\t\t {res:.0f}%") + print(f"Excess:\t\t {excess_rate:.1f}% of the total production") + print(50 * "*") + print("Optimal Capacities:") + print("-------------------") + print(f"Diesel Genset:\t {capacity_diesel_genset:.0f} kW") + print(f"PV:\t\t {capacity_pv:.0f} kW") + print(f"Battery:\t {capacity_battery:.0f} kW") + print(f"Inverter:\t {capacity_inverter:.0f} kW") + print(f"Rectifier:\t {capacity_rectifier:.0f} kW") + print(50 * "*") + + ########################################################################## + # Plot the duration curve for the diesel genset + ########################################################################## + + if plt is not None: + # Create the duration curve for the diesel genset. + fig1, ax = plt.subplots(figsize=(10, 5)) + + # Sort the power generated by the diesel genset in a descending order. + diesel_genset_duration_curve = np.sort(sequences_diesel_genset)[ + ::-1 + ] + + percentage = ( + 100 + * np.arange(1, len(diesel_genset_duration_curve) + 1) + / len(diesel_genset_duration_curve) + ) + + ax.scatter( + percentage, + diesel_genset_duration_curve, + color="dodgerblue", + marker="+", + ) + + # Plot a horizontal line representing the minimum load + ax.axhline( + y=min_load * capacity_diesel_genset, + color="crimson", + linestyle="--", + ) + min_load_annotation_text = ( + f"minimum load: {min_load * capacity_diesel_genset:0.2f} kW" + ) + ax.annotate( + min_load_annotation_text, + xy=(100, min_load * capacity_diesel_genset), + xytext=(0, 5), + textcoords="offset pixels", + horizontalalignment="right", + verticalalignment="bottom", + ) + + # Plot a horizontal line representing the maximum load + ax.axhline( + y=max_load * capacity_diesel_genset, + color="crimson", + linestyle="--", + ) + max_load_annotation_text = ( + f"maximum load: {max_load * capacity_diesel_genset:0.2f} kW" + ) + ax.annotate( + max_load_annotation_text, + xy=(100, max_load * capacity_diesel_genset), + xytext=(0, -5), + textcoords="offset pixels", + horizontalalignment="right", + verticalalignment="top", + ) + + ax.set_title( + "Duration Curve for the Diesel Genset Electricity Production", + fontweight="bold", + ) + ax.set_ylabel("diesel genset production [kW]") + ax.set_xlabel("percentage of annual operation [%]") + + # Create the second axis on the right side of the diagram + # representing the operation load of the diesel genset. + second_ax = ax.secondary_yaxis( + "right", + functions=( + lambda x: x / capacity_diesel_genset * 100, + lambda x: x * capacity_diesel_genset / 100, + ), + ) + second_ax.set_ylabel("diesel genset operation load [%]") + + ####################################################################### + # Plot the efficiency curve for the diesel genset + ####################################################################### + + fig2, ax = plt.subplots(figsize=(10, 5)) + ax.scatter( + load_diesel_genset, + efficiency_diesel_genset, + marker="+", + ) + + # Plot a horizontal line representing the minimum efficiency + ax.axhline( + y=min_efficiency * 100, + color="crimson", + linestyle="--", + ) + min_efficiency_annotation_text = ( + f"minimum efficiency: {min_efficiency*100:0.0f}%" + ) + ax.annotate( + min_efficiency_annotation_text, + xy=(100, min_efficiency * 100), + xytext=(0, 10), + textcoords="offset pixels", + horizontalalignment="right", + verticalalignment="bottom", + ) + + # Plot a horizontal line representing the maximum efficiency + ax.axhline( + y=max_efficiency * 100, + color="crimson", + linestyle="--", + ) + max_efficiency_annotation_text = ( + f"maximum efficiency: {max_efficiency*100:0.0f}%" + ) + ax.annotate( + max_efficiency_annotation_text, + xy=(100, max_efficiency * 100), + xytext=(0, 10), + textcoords="offset pixels", + horizontalalignment="right", + verticalalignment="bottom", + ) + + ax.set_title( + "Efficiency Curve for Different Loads of the Diesel Genset", + fontweight="bold", + ) + ax.set_ylabel("efficiency [%]") + ax.set_xlabel("diesel genset load [%]") + + ax.set_xlim(min_load * 100 - 5, max_load * 100 + 5) + ax.set_ylim(min_efficiency * 100 - 2, max_efficiency * 100 + 2) + + plt.show() + + +if __name__ == "__main__": + offset_converter_example() diff --git a/examples/simple_dispatch/simple_dispatch.py b/examples/simple_dispatch/simple_dispatch.py index 7c44b684b..ea9e9ab66 100644 --- a/examples/simple_dispatch/simple_dispatch.py +++ b/examples/simple_dispatch/simple_dispatch.py @@ -13,15 +13,27 @@ Additionally, it shows how combined heat and power units may be easily modelled as well. +Code +---- +Download source code: :download:`simple_dispatch.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/simple_dispatch/simple_dispatch.py + :language: python + :lines: 45- + Data ---- -input_data.csv +Download data: :download:`input_data.csv ` Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] @@ -44,7 +56,7 @@ from oemof.solph import views from oemof.solph.components import Sink from oemof.solph.components import Source -from oemof.solph.components import Transformer +from oemof.solph.components import Converter def main(): @@ -123,7 +135,7 @@ def main(): # power plants energysystem.add( - Transformer( + Converter( label="pp_coal", inputs={bcoal: Flow()}, outputs={bel: Flow(nominal_value=20.2, variable_costs=25)}, @@ -132,7 +144,7 @@ def main(): ) energysystem.add( - Transformer( + Converter( label="pp_lig", inputs={blig: Flow()}, outputs={bel: Flow(nominal_value=11.8, variable_costs=19)}, @@ -141,7 +153,7 @@ def main(): ) energysystem.add( - Transformer( + Converter( label="pp_gas", inputs={bgas: Flow()}, outputs={bel: Flow(nominal_value=41, variable_costs=40)}, @@ -150,7 +162,7 @@ def main(): ) energysystem.add( - Transformer( + Converter( label="pp_oil", inputs={boil: Flow()}, outputs={bel: Flow(nominal_value=5, variable_costs=50)}, @@ -160,7 +172,7 @@ def main(): # combined heat and power plant (chp) energysystem.add( - Transformer( + Converter( label="pp_chp", inputs={bgas: Flow()}, outputs={ @@ -181,7 +193,7 @@ def main(): cop = 3 energysystem.add( - Transformer( + Converter( label="heat_pump", inputs={bel: Flow(), b_heat_source: Flow()}, outputs={bth: Flow(nominal_value=10)}, diff --git a/examples/start_and_shutdown_costs/startup_shutdown.py b/examples/start_and_shutdown_costs/startup_shutdown.py index fabd0220f..47b9349b6 100644 --- a/examples/start_and_shutdown_costs/startup_shutdown.py +++ b/examples/start_and_shutdown_costs/startup_shutdown.py @@ -6,10 +6,22 @@ Example that illustrates how to model startup and shutdown costs attributed to a binary flow. +Code +---- +Download source code: :download:`startup_shutdown.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/start_and_shutdown_costs/startup_shutdown.py + :language: python + :lines: 32- + Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] License @@ -17,9 +29,10 @@ `MIT license `_ """ +import matplotlib.pyplot as plt import pandas as pd + from oemof import solph -import matplotlib.pyplot as plt def main(): diff --git a/examples/storage_balanced_unbalanced/storage.py b/examples/storage_balanced_unbalanced/storage.py index 3e62f1f7d..396e96bb1 100644 --- a/examples/storage_balanced_unbalanced/storage.py +++ b/examples/storage_balanced_unbalanced/storage.py @@ -5,11 +5,22 @@ ------------------- Example that shows the parameter `balanced` of `GenericStorage`. +Code +---- +Download source code: :download:`storage.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/storage_balanced_unbalanced/storage.py + :language: python + :lines: 32- Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] diff --git a/examples/storage_costs/storage_costs.py b/examples/storage_costs/storage_costs.py new file mode 100644 index 000000000..d82068860 --- /dev/null +++ b/examples/storage_costs/storage_costs.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- + +""" +General description +------------------- +Example that shows the parameter `storage_costs` of `GenericStorage`. +A battery is used to make profit from fluctuating electricity prices. +For a battery without storage costs, it is beneficial to be empty +the end of the time horizon of the optimisation. For a battery that +assumes the average revenue, energy is kept at the end. + +Code +---- +Download source code: :download:`storage_costs.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/storage_costs/storage_costs.py + :language: python + :lines: 36- + +Installation requirements +------------------------- +This example requires oemof.solph (v0.5.x) and matplotlib, install by: + +.. code:: bash + + pip install oemof.solph[examples] matplotlib + + +License +------- +`MIT license `_ +""" + +import numpy as np +import pandas as pd +from matplotlib import pyplot as plt + +from oemof import solph + + +def storage_costs_example(): + # create an energy system + idx = pd.date_range("1/1/2023", periods=13, freq="H") + es = solph.EnergySystem(timeindex=idx, infer_last_interval=False) + + # power bus + bel = solph.Bus(label="bel") + es.add(bel) + + es.add( + solph.components.Source( + label="source_el", + outputs={bel: solph.Flow()}, + ) + ) + + es.add( + solph.components.Sink( + label="sink_el", + inputs={bel: solph.Flow()}, + ) + ) + + electricity_price = np.array( + [ + 0.38, + 0.31, + 0.32, + 0.33, + 0.37, + 0.32, + 0.33, + 0.34, + 0.39, + 0.38, + 0.37, + 0.35, + 0.35, + ] + ) + + # Electric Storage 1 + # Costs are designed in a way that storing energy is benificial until the + # last four time steps but emptying it is not a good option. + battery1 = solph.components.GenericStorage( + label="battery 1", + nominal_storage_capacity=10, + inputs={ + bel: solph.Flow( + nominal_value=1, + variable_costs=electricity_price, + ) + }, + outputs={ + bel: solph.Flow( + nominal_value=1, + variable_costs=-electricity_price, + ) + }, + initial_storage_level=0.5, + balanced=False, + ) + es.add(battery1) + + # storages that balance our fluctuating costs + # Electric Storage 2 + battery2 = solph.components.GenericStorage( + label="battery 2", + nominal_storage_capacity=10, + inputs={ + bel: solph.Flow( + nominal_value=1, + variable_costs=electricity_price, + ) + }, + outputs={ + bel: solph.Flow( + nominal_value=1, + variable_costs=-electricity_price, + ) + }, + storage_costs=12 * [0] + [-np.mean(electricity_price)], + initial_storage_level=0.5, + balanced=False, + ) + es.add(battery2) + + # create an optimization problem and solve it + model = solph.Model(es) + + # solve model + model.solve(solver="cbc") + + # create result object + results = solph.processing.results(model) + + plt.plot( + results[(battery1, None)]["sequences"], + label="content w/o storage costs", + ) + plt.plot( + results[(battery2, None)]["sequences"], + label="content w/ storage revenue", + ) + plt.legend() + plt.grid() + + plt.show() + + +if __name__ == "__main__": + storage_costs_example() diff --git a/examples/storage_investment/v1_invest_optimize_all_technologies.py b/examples/storage_investment/v1_invest_optimize_all_technologies.py index 50cc4ad16..7bb185509 100644 --- a/examples/storage_investment/v1_invest_optimize_all_technologies.py +++ b/examples/storage_investment/v1_invest_optimize_all_technologies.py @@ -21,7 +21,7 @@ demand(Sink) |<------------------| | | | | | | - pp_gas(Transformer) |<---------| | + pp_gas(Converter) |<---------| | |------------------>| | | | storage(Storage) |<------------------| @@ -30,25 +30,40 @@ The example exists in four variations. The following parameters describe the main setting for the optimization variation 1: - - optimize wind, pv, gas_resource and storage - - set investment cost for wind, pv and storage - - set gas price for kWh +- optimize wind, pv, gas_resource and storage +- set investment cost for wind, pv and storage +- set gas price for kWh - Results show an installation of wind and the use of the gas resource. - A renewable energy share of 51% is achieved. +Results show an installation of wind and the use of the gas resource. +A renewable energy share of 51% is achieved. + +.. tip:: Have a look at different parameter settings. There are four variations of this example in the same folder. +Code +---- +Download source code: :download:`v1_invest_optimize_all_technologies.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/storage_investment/v1_invest_optimize_all_technologies.py + :language: python + :lines: 80- + Data ---- -storage_investment.csv +Download data: :download:`storage_investment.csv ` + Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] @@ -68,8 +83,6 @@ import warnings import pandas as pd - -# Default logger of oemof from oemof.tools import economics from oemof.tools import logger @@ -159,8 +172,8 @@ def main(): inputs={bel: solph.Flow(fix=data["demand_el"], nominal_value=1)}, ) - # create simple transformer object representing a gas power plant - pp_gas = solph.components.Transformer( + # create simple Converter object representing a gas power plant + pp_gas = solph.components.Converter( label="pp_gas", inputs={bgas: solph.Flow()}, outputs={bel: solph.Flow(nominal_value=10e10, variable_costs=0)}, diff --git a/examples/storage_investment/v2_invest_optimize_only_gas_and_storage.py b/examples/storage_investment/v2_invest_optimize_only_gas_and_storage.py index a49a245e0..3e91950c5 100644 --- a/examples/storage_investment/v2_invest_optimize_only_gas_and_storage.py +++ b/examples/storage_investment/v2_invest_optimize_only_gas_and_storage.py @@ -21,7 +21,7 @@ demand(Sink) |<------------------| | | | | | | - pp_gas(Transformer) |<---------| | + pp_gas(Converter) |<---------| | |------------------>| | | | storage(Storage) |<------------------| @@ -31,23 +31,41 @@ The example exists in four variations. The following parameters describe the main setting for the optimization variation 2: - - optimize gas_resource and storage - - set installed capacities for wind and pv - - set investment cost for storage - - set gas price for kWh +- optimize gas_resource and storage +- set installed capacities for wind and pv +- set investment cost for storage +- set gas price for kWh - Results show a higher renewable energy share than in variation 1 - (78% compared to 51%) due to preinstalled renewable capacities. - Storage is not installed as the gas resource is cheaper. +Results show a higher renewable energy share than in variation 1 +(78% compared to 51%) due to preinstalled renewable capacities. +Storage is not installed as the gas resource is cheaper. + +.. tip:: Have a look at different parameter settings. There are four variations of this example in the same folder. +Code +---- +Download source code: :download:`v2_invest_optimize_only_gas_and_storage.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/storage_investment/v2_invest_optimize_only_gas_and_storage.py + :language: python + :lines: 83- + +Data +---- +Download data: :download:`storage_investment.csv ` + Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] @@ -68,8 +86,6 @@ import warnings import pandas as pd - -# Default logger of oemof from oemof.tools import economics from oemof.tools import logger @@ -149,8 +165,8 @@ def main(): inputs={bel: solph.Flow(fix=data["demand_el"], nominal_value=1)}, ) - # create simple transformer object representing a gas power plant - pp_gas = solph.components.Transformer( + # create simple Converter object representing a gas power plant + pp_gas = solph.components.Converter( label="pp_gas", inputs={bgas: solph.Flow()}, outputs={bel: solph.Flow(nominal_value=10e10, variable_costs=0)}, diff --git a/examples/storage_investment/v3_invest_optimize_only_storage_with_fossil_share.py b/examples/storage_investment/v3_invest_optimize_only_storage_with_fossil_share.py index 0662d8e81..1046a8d29 100644 --- a/examples/storage_investment/v3_invest_optimize_only_storage_with_fossil_share.py +++ b/examples/storage_investment/v3_invest_optimize_only_storage_with_fossil_share.py @@ -21,7 +21,7 @@ demand(Sink) |<------------------| | | | | | | - pp_gas(Transformer) |<---------| | + pp_gas(Converter) |<---------| | |------------------>| | | | storage(Storage) |<------------------| @@ -30,24 +30,42 @@ The example exists in four variations. The following parameters describe the main setting for the optimization variation 3: - - calculate storage - - set installed capacities for wind and pv - - set investment cost for storage - - remove the gas price and set a fossil share - - now it becomes a calculation of storage capacity (no cost optimization) +- calculate storage +- set installed capacities for wind and pv +- set investment cost for storage +- remove the gas price and set a fossil share +- now it becomes a calculation of storage capacity (no cost optimization) Results show now the installation of storage because a higher renewable share than achieved in variation 2 is now required (80% compared to 78%). -Have a look at different parameter settings. There are four variations -of this example in the same folder. +.. tip:: + + Have a look at different parameter settings. There are four variations + of this example in the same folder. + +Code +---- +Download source code: :download:`v3_invest_optimize_only_storage_with_fossil_share.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/storage_investment/v3_invest_optimize_only_storage_with_fossil_share.py + :language: python + :lines: 82- + +Data +---- +Download data: :download:`storage_investment.csv ` Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] @@ -67,8 +85,6 @@ import warnings import pandas as pd - -# Default logger of oemof from oemof.tools import economics from oemof.tools import logger @@ -159,8 +175,8 @@ def main(): inputs={bel: solph.Flow(fix=data["demand_el"], nominal_value=1)}, ) - # create simple transformer object representing a gas power plant - pp_gas = solph.components.Transformer( + # create simple Converter object representing a gas power plant + pp_gas = solph.components.Converter( label="pp_gas", inputs={bgas: solph.Flow()}, outputs={bel: solph.Flow(nominal_value=10e10, variable_costs=0)}, diff --git a/examples/storage_investment/v4_invest_optimize_all_technologies_with_fossil_share.py b/examples/storage_investment/v4_invest_optimize_all_technologies_with_fossil_share.py index 1828b4ce3..7c1c89a7b 100644 --- a/examples/storage_investment/v4_invest_optimize_all_technologies_with_fossil_share.py +++ b/examples/storage_investment/v4_invest_optimize_all_technologies_with_fossil_share.py @@ -21,7 +21,7 @@ demand(Sink) |<------------------| | | | | | | - pp_gas(Transformer) |<---------| | + pp_gas(Converter) |<---------| | |------------------>| | | | storage(Storage) |<------------------| @@ -30,21 +30,39 @@ The example exists in four variations. The following parameters describe the main setting for the optimization variation 4: - - optimize wind, pv, and storage - - set investment cost for wind, pv and storage - - set a fossil share +- optimize wind, pv, and storage +- set investment cost for wind, pv and storage +- set a fossil share - Results show now the achievement of 80% renewable energy share - by solely installing a little more wind and pv (compared to - variation 2). Storage is not installed. +Results show now the achievement of 80% renewable energy share +by solely installing a little more wind and pv (compared to +variation 2). Storage is not installed. + +.. tip:: Have a look at different parameter settings. There are four variations of this example in the same folder. +Code +---- +Download source code: :download:`v4_invest_optimize_all_technologies_with_fossil_share.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/storage_investment/v4_invest_optimize_all_technologies_with_fossil_share.py + :language: python + :lines: 79- + +Data +---- +Download data: :download:`storage_investment.csv ` + Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] @@ -64,8 +82,6 @@ import warnings import pandas as pd - -# Default logger of oemof from oemof.tools import economics from oemof.tools import logger @@ -167,8 +183,8 @@ def main(): inputs={bel: solph.Flow(fix=data["demand_el"], nominal_value=1)}, ) - # create simple transformer object representing a gas power plant - pp_gas = solph.components.Transformer( + # create simple Converter object representing a gas power plant + pp_gas = solph.components.Converter( label="pp_gas", inputs={bgas: solph.Flow()}, outputs={bel: solph.Flow(nominal_value=10e10, variable_costs=0)}, diff --git a/examples/storage_level_constraint/storage_level_constraint.py b/examples/storage_level_constraint/storage_level_constraint.py new file mode 100644 index 000000000..9fd51a607 --- /dev/null +++ b/examples/storage_level_constraint/storage_level_constraint.py @@ -0,0 +1,142 @@ +# -*- coding: utf-8 -*- + +""" +General description +------------------- +Example that shows the `storage_level_constraint`. + +Code +---- +Download source code: :download:`storage_level_constraint.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/storage_level_constraint/storage_level_constraint.py + :language: python + :lines: 33- + +Installation requirements +------------------------- +This example requires oemof.solph (v0.5.x) and matplotlib, install by: + +.. code:: bash + + pip install oemof.solph[examples] matplotlib + + +License +------- +`MIT license `_ +""" + + +import pandas as pd +from oemof.solph import Bus, EnergySystem, Flow, Model +from oemof.solph.components import GenericStorage, Source, Sink +from oemof.solph.processing import results + +import matplotlib.pyplot as plt +import pandas as pd + +from oemof.solph import Bus +from oemof.solph import EnergySystem +from oemof.solph import Flow +from oemof.solph import Model +from oemof.solph.components import GenericStorage +from oemof.solph.components import Sink +from oemof.solph.components import Source +from oemof.solph.constraints import storage_level_constraint +from oemof.solph.processing import results + + +def storage_level_constraint_example(): + es = EnergySystem( + timeindex=pd.date_range("2022-01-01", freq="1H", periods=24), + infer_last_interval=True, + ) + + multiplexer = Bus( + label="multiplexer", + ) + + storage = GenericStorage( + label="storage", + nominal_storage_capacity=3, + initial_storage_level=1, + balanced=True, + loss_rate=0.05, + inputs={multiplexer: Flow()}, + outputs={multiplexer: Flow()}, + ) + + es.add(multiplexer, storage) + + in_0 = Source( + label="in_0", + outputs={multiplexer: Flow(nominal_value=0.5, variable_costs=0.15)}, + ) + es.add(in_0) + + in_1 = Source(label="in_1", outputs={multiplexer: Flow(nominal_value=0.1)}) + es.add(in_1) + + out_0 = Sink( + label="out_0", + inputs={multiplexer: Flow(nominal_value=0.25, variable_costs=-0.1)}, + ) + es.add(out_0) + + out_1 = Sink( + label="out_1", + inputs={multiplexer: Flow(nominal_value=0.15, variable_costs=-0.1)}, + ) + es.add(out_1) + + model = Model(es) + + storage_level_constraint( + model=model, + name="multiplexer", + storage_component=storage, + multiplexer_bus=multiplexer, + input_levels={in_1: 1 / 3}, # in_0 is always active + output_levels={out_0: 1 / 6, out_1: 1 / 2}, + ) + model.solve() + + my_results = results(model) + + df = pd.DataFrame(my_results[(storage, None)]["sequences"]) + df["in1_status"] = my_results[(in_1, None)]["sequences"] + df["out1_status"] = my_results[(out_1, None)]["sequences"] + df["out0_status"] = my_results[(out_0, None)]["sequences"] + + df["in1"] = my_results[(in_1, multiplexer)]["sequences"] + df["in0"] = my_results[(in_0, multiplexer)]["sequences"] + df["out0"] = my_results[(multiplexer, out_0)]["sequences"] + df["out1"] = my_results[(multiplexer, out_1)]["sequences"] + + plt.step(df.index, df["in0"], where="post", label="inflow (<= 1)") + plt.step(df.index, df["in1"], where="post", label="inflow (< 1/3)") + plt.step(df.index, df["out0"], where="post", label="outflow (> 1/6)") + plt.step(df.index, df["out1"], where="post", label="outflow (> 1/2)") + + plt.grid() + plt.legend() + plt.ylabel("Flow Power (arb. units)") + plt.ylim(0, 0.5) + + plt.twinx() + + plt.plot(df.index, df["storage_content"], "k--", label="storage content") + plt.ylim(0, 3) + plt.legend(loc="center right") + plt.ylabel("Stored Energy (arb. units)") + + print(df) + + plt.show() + + +if __name__ == "__main__": + storage_level_constraint_example() diff --git a/examples/time_index_example/non_equidistant_time_step_example.py b/examples/time_index_example/non_equidistant_time_step_example.py index 4b9a3e6a5..8e8d47081 100644 --- a/examples/time_index_example/non_equidistant_time_step_example.py +++ b/examples/time_index_example/non_equidistant_time_step_example.py @@ -7,25 +7,38 @@ An example to show how non-equidistant time steps work. In addition to the comments in the simple example, note that: -* Time steps in the beginning are 15 minutes. -* Time steps in the end are hourly. -* In the middle, there is a very short demand peak of one minute. - This, however, does barely influence the storage contents. -* Storage losses are defined per hour. - * storage_fixed looses 1 energy unit per hour - * storage_relative looses 50 % of its contents per hour -* If possible, energy is transferred from storage with - relative losses to the one with fixed losses to minimise total - losses. +- Time steps in the beginning are 15 minutes. +- Time steps in the end are hourly. +- In the middle, there is a very short demand peak of one minute. This, however, + does barely influence the storage contents. +- Storage losses are defined per hour. + - storage_fixed looses 1 energy unit per hour + - storage_relative looses 50 % of its contents per hour +- If possible, energy is transferred from storage with relative losses to the + one with fixed losses to minimise total losses. + +Code +---- +Download source code: :download:`non_equidistant_time_step_example.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/time_index_example/non_equidistant_time_step_example.py + :language: python + :lines: 40- Installation requirements ------------------------- This example requires oemof.solph, install by: +.. code:: bash + pip install oemof.solph + """ import pandas as pd + from oemof import solph try: diff --git a/examples/time_index_example/simple_time_step_example.py b/examples/time_index_example/simple_time_step_example.py index e84cc4e66..7a0509872 100644 --- a/examples/time_index_example/simple_time_step_example.py +++ b/examples/time_index_example/simple_time_step_example.py @@ -6,22 +6,33 @@ A minimal example to show how time steps work. -* Flows are defined in time intervals, storage content at points in time. - Thus, there is one more value for storage contents then for the - flow values. -* Time intervals are named by the time at the beginning of that interval. - The quantity changes to the given value at the given point in time. -* The initial_storage_level of a GenericStorage is given - at the first time step. If the storage is balanced, - this is the same storage level as in the last time step. -* The nominal_value in Flows has to be interpreted in means of power: - We have nominal_value=0.5, but the maximum change of the storage content - of an ideal storage is 0.125. +* Flows are defined in time intervals, storage content at points in time. Thus, + there is one more value for storage contents then for the flow values. +* Time intervals are named by the time at the beginning of that interval. The + quantity changes to the given value at the given point in time. +* The initial_storage_level of a GenericStorage is given at the first time step. + If the storage is balanced, this is the same storage level as in the last time + step. +* The nominal_value in Flows has to be interpreted in means of power: We have + nominal_value=0.5, but the maximum change of the storage content of an ideal + storage is 0.125. + +Code +---- +Download source code: :download:`non_equidistant_time_step_example.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/time_index_example/simple_time_step_example.py + :language: python + :lines: 43- Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] diff --git a/examples/time_index_example/time_index_example.py b/examples/time_index_example/time_index_example.py deleted file mode 100644 index e84cc4e66..000000000 --- a/examples/time_index_example/time_index_example.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -General description -------------------- - -A minimal example to show how time steps work. - -* Flows are defined in time intervals, storage content at points in time. - Thus, there is one more value for storage contents then for the - flow values. -* Time intervals are named by the time at the beginning of that interval. - The quantity changes to the given value at the given point in time. -* The initial_storage_level of a GenericStorage is given - at the first time step. If the storage is balanced, - this is the same storage level as in the last time step. -* The nominal_value in Flows has to be interpreted in means of power: - We have nominal_value=0.5, but the maximum change of the storage content - of an ideal storage is 0.125. - -Installation requirements -------------------------- -This example requires oemof.solph (v0.5.x), install by: - - pip install oemof.solph[examples] - - -License -------- -`MIT license `_ -""" -import matplotlib.pyplot as plt - -from oemof import solph - - -def main(): - solver = "cbc" # 'glpk', 'gurobi',... - solver_verbose = False # show/hide solver output - - date_time_index = solph.create_time_index(2000, interval=0.25, number=8) - - energy_system = solph.EnergySystem( - timeindex=date_time_index, infer_last_interval=False - ) - - bus = solph.buses.Bus(label="bus") - source = solph.components.Source( - label="source", - outputs={ - bus: solph.flows.Flow( - nominal_value=2, - variable_costs=0.2, - max=[0, 0, 0, 0, 1, 0.25, 0.75, 1], - ) - }, - ) - storage = solph.components.GenericStorage( - label="storage", - inputs={bus: solph.flows.Flow()}, - outputs={bus: solph.flows.Flow()}, - nominal_storage_capacity=4, - initial_storage_level=0.5, - ) - sink = solph.components.Sink( - label="sink", - inputs={ - bus: solph.flows.Flow( - nominal_value=2, - variable_costs=0.1, - fix=[1, 1, 0.5, 0.5, 0, 0, 0, 0], - ) - }, - ) - - energy_system.add(bus, source, sink, storage) - model = solph.Model(energy_system) - model.solve(solver=solver, solve_kwargs={"tee": solver_verbose}) - - results = solph.processing.results(model) - - results_df = results[(storage, None)]["sequences"].copy() - results_df["storage_inflow"] = results[(bus, storage)]["sequences"]["flow"] - results_df["storage_outflow"] = results[(storage, bus)]["sequences"][ - "flow" - ] - - print(results_df) - - if plt is not None: - plt.plot( - results[(bus, storage)]["sequences"], - drawstyle="steps-post", - label="Storage inflow", - ) - plt.plot( - results[(storage, None)]["sequences"], label="Storage content" - ) - plt.plot( - results[(storage, bus)]["sequences"], - drawstyle="steps-post", - label="Storage outflow", - ) - - plt.legend(loc="lower left") - plt.show() - - -if __name__ == "__main__": - main() diff --git a/examples/tuple_as_labels/tuple_as_label.py b/examples/tuple_as_labels/tuple_as_label.py index 44fbcd79e..b31fe559f 100644 --- a/examples/tuple_as_labels/tuple_as_label.py +++ b/examples/tuple_as_labels/tuple_as_label.py @@ -66,18 +66,30 @@ This a helpful adaption for automatic plots etc.. Afterwards you can use `format` to define your own custom string.: + >>> print('{0}+{1}-{2}'.format(pv_label.region, pv_label.tag2, pv_label.tag1)) region_1+pv-renewable_source -Data +Code ---- -basic_example.csv +Download source code: :download:`tuple_as_label.py ` +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/tuple_as_labels/tuple_as_label.py + :language: python + :lines: 106- + +Data +---- +Download data: :download:`tuple_as_label.csv ` Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] @@ -208,9 +220,9 @@ def main(): ) ) - # create simple transformer object representing a gas power plant + # create simple Converter object representing a gas power plant energysystem.add( - comp.Transformer( + comp.Converter( label=Label("power plant", "electricity", "gas"), inputs={bgas: flows.Flow()}, outputs={bel: flows.Flow(nominal_value=10000, variable_costs=50)}, diff --git a/examples/variable_chp/variable_chp.py b/examples/variable_chp/variable_chp.py index fb296c0c8..8561c3c32 100644 --- a/examples/variable_chp/variable_chp.py +++ b/examples/variable_chp/variable_chp.py @@ -11,15 +11,33 @@ heat and power excess and therefore needs more natural gas. The bar plot just shows the difference in the usage of natural gas. +Code +---- +Download source code: :download:`variable_chp.py ` + +.. dropdown:: Click to display code + + .. literalinclude:: /../examples/variable_chp/variable_chp.py + :language: python + :lines: 53- + +Data +---- +Download data: :download:`variable_chp.csv ` + Installation requirements ------------------------- This example requires oemof.solph (v0.5.x), install by: +.. code:: bash + pip install oemof.solph[examples] Optional to see the i/o balance plot: +.. code:: bash + pip install git+https://github.com/oemof/oemof_visio.git License @@ -186,23 +204,23 @@ def main(): }, ) - # This is just a dummy transformer with a nominal input of zero - noded["fixed_chp_gas"] = solph.components.Transformer( + # This is just a dummy Converter with a nominal input of zero + noded["fixed_chp_gas"] = solph.components.Converter( label="fixed_chp_gas", inputs={noded["bgas"]: solph.Flow(nominal_value=0)}, outputs={noded["bel"]: solph.Flow(), noded["bth"]: solph.Flow()}, conversion_factors={noded["bel"]: 0.3, noded["bth"]: 0.5}, ) - # create a fixed transformer to distribute to the heat_2 and elec_2 buses - noded["fixed_chp_gas_2"] = solph.components.Transformer( + # create a fixed Converter to distribute to the heat_2 and elec_2 buses + noded["fixed_chp_gas_2"] = solph.components.Converter( label="fixed_chp_gas_2", inputs={noded["bgas"]: solph.Flow(nominal_value=10e10)}, outputs={noded["bel2"]: solph.Flow(), noded["bth2"]: solph.Flow()}, conversion_factors={noded["bel2"]: 0.3, noded["bth2"]: 0.5}, ) - # create a fixed transformer to distribute to the heat and elec buses + # create a fixed Converter to distribute to the heat and elec buses noded["variable_chp_gas"] = solph.components.ExtractionTurbineCHP( label="variable_chp_gas", inputs={noded["bgas"]: solph.Flow(nominal_value=10e10)}, @@ -242,7 +260,7 @@ def main(): plt.show() # Create a plot with 6 tiles that shows the difference between the - # Transformer and the ExtractionTurbineCHP used for chp plants. + # Converter and the ExtractionTurbineCHP used for chp plants. smooth_plot = True if oeplot: diff --git a/setup.cfg b/setup.cfg index 8510401d3..889fafe6e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -94,9 +94,9 @@ skip = migrations # - can use as many you want python_versions = - py36 - py37 py38 + py39 + py310 dependencies = # 1.4: Django==1.4.16 !python_versions[py3*] diff --git a/setup.py b/setup.py index 2ccc8b8a9..8bbc36a0a 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ def read(*names, **kwargs): setup( name="oemof.solph", - version="0.5.0", + version="0.5.1", license="MIT", description=( "A model generator for energy system modelling and optimisation." @@ -79,20 +79,22 @@ def read(*names, **kwargs): "blinker", "dill", "numpy", - "pandas", - "pyomo >= 6.0.0, < 7.0", + "pandas >= 1.5.3", + "pyomo >= 6.6.0, < 7.0", "networkx", "oemof.tools >= 0.4.2", "oemof.network >= 0.5.0a1", ], extras_require={ "dev": [ + "matplotlib", + "nbformat", "pytest", "sphinx", "sphinx_rtd_theme", - "nbformat", + "sphinx-copybutton", + "sphinx-design", "termcolor", - "matplotlib", ], "examples": ["matplotlib"], "dummy": ["oemof"], @@ -100,7 +102,7 @@ def read(*names, **kwargs): entry_points={ "console_scripts": [ "oemof_installation_test = " - + "oemof.solph.console_scripts:check_oemof_installation" + + "oemof.solph._console_scripts:check_oemof_installation" ] }, ) diff --git a/src/oemof/solph/__init__.py b/src/oemof/solph/__init__.py index 59e60dfa3..d96fb5ed1 100644 --- a/src/oemof/solph/__init__.py +++ b/src/oemof/solph/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.5.0" +__version__ = "0.5.1" from . import buses from . import components diff --git a/src/oemof/solph/_console_scripts.py b/src/oemof/solph/_console_scripts.py index 74aea41d4..be8accacf 100644 --- a/src/oemof/solph/_console_scripts.py +++ b/src/oemof/solph/_console_scripts.py @@ -21,8 +21,11 @@ def check_oemof_installation(silent=False): logging.disable(logging.CRITICAL) - date_time_index = pd.date_range("1/1/2012", periods=5, freq="H") - energysystem = solph.EnergySystem(timeindex=date_time_index) + date_time_index = pd.date_range("1/1/2012", periods=6, freq="H") + energysystem = solph.EnergySystem( + timeindex=date_time_index, + infer_last_interval=False, + ) bgas = solph.buses.Bus(label="natural_gas") bel = solph.buses.Bus(label="electricity") @@ -34,7 +37,7 @@ def check_oemof_installation(silent=False): bel: solph.flows.Flow(fix=[10, 20, 30, 40, 50], nominal_value=1) }, ) - solph.components.Transformer( + solph.components.Converter( label="pp_gas", inputs={bgas: solph.flows.Flow()}, outputs={ diff --git a/src/oemof/solph/_energy_system.py b/src/oemof/solph/_energy_system.py index 12929b89d..a2a166fb5 100644 --- a/src/oemof/solph/_energy_system.py +++ b/src/oemof/solph/_energy_system.py @@ -8,6 +8,7 @@ SPDX-FileCopyrightText: Cord Kaldemeyer SPDX-FileCopyrightText: Stephan Günther SPDX-FileCopyrightText: Birgit Schachler +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT @@ -20,6 +21,7 @@ import numpy as np import pandas as pd from oemof.network import energy_system as es +from oemof.tools import debugging class EnergySystem(es.EnergySystem): @@ -48,6 +50,18 @@ class EnergySystem(es.EnergySystem): is unknown so it does only work for an equidistant DatetimeIndex with a 'freq' attribute that is not None. The parameter has no effect on the timeincrement parameter. + + periods : list or None + The periods of a multi-period model. + If this is explicitly specified, it leads to creating a multi-period + model, providing a respective user warning as a feedback. + + list of pd.date_range objects carrying the timeindex for the + respective period; + + For a standard model, periods are not (to be) declared, i.e. None. + A list with one entry is derived, i.e. [0]. + kwargs """ @@ -56,6 +70,7 @@ def __init__( timeindex=None, timeincrement=None, infer_last_interval=None, + periods=None, **kwargs, ): # Doing imports at runtime is generally frowned upon, but should work @@ -108,19 +123,30 @@ def __init__( # catch wrong combinations and infer timeincrement from timeindex. if timeincrement is not None and timeindex is not None: - msg = ( - "Specifying the timeincrement and the timeindex parameter at " - "the same time is not allowed since these might be " - "conflicting to each other." - ) - raise AttributeError(msg) + if periods is None: + msg = ( + "Specifying the timeincrement and the timeindex parameter " + "at the same time is not allowed since these might be " + "conflicting to each other." + ) + raise AttributeError(msg) + else: + msg = ( + "Ensure that your timeindex and timeincrement are " + "consistent.\nIf you are not considering non-equidistant " + "timeindices, consider only specifying a timeindex." + ) + warnings.warn(msg, debugging.SuspiciousUsageWarning) elif timeindex is not None and timeincrement is None: df = pd.DataFrame(timeindex) timedelta = df.diff() - timeincrement = pd.Series( - (timedelta / np.timedelta64(1, "h"))[1:].set_index(0).index - ) + timeincrement = timedelta / np.timedelta64(1, "h") + + # we want a series (squeeze) + # without the first item (no delta defined for first entry) + # but starting with index 0 (reset) + timeincrement = timeincrement.squeeze()[1:].reset_index(drop=True) if timeincrement is not None and (pd.Series(timeincrement) <= 0).any(): msg = ( @@ -134,6 +160,59 @@ def __init__( timeindex=timeindex, timeincrement=timeincrement, **kwargs ) + if periods is not None: + msg = ( + "CAUTION! You specified the 'periods' attribute for your " + "energy system.\n This will lead to creating " + "a multi-period optimization modeling which can be " + "used e.g. for long-term investment modeling.\n" + "Please be aware that the feature is experimental as of " + "now. If you find anything suspicious or any bugs, " + "please report them." + ) + warnings.warn(msg, debugging.SuspiciousUsageWarning) + self.periods = periods + self._extract_periods_years() + self._extract_periods_matrix() + + def _extract_periods_years(self): + """Map simulation years to the respective period based on time indices + + Returns + ------- + periods_years: dict + the simulation year of the start of each a period, + relative to the start of the optimization run and starting with 0 + """ + periods_years = [0] + if self.periods is not None: + start_year = self.periods[0].min().year + for k, v in enumerate(self.periods): + if k >= 1: + periods_years.append(v.min().year - start_year) + + self.periods_years = periods_years + + def _extract_periods_matrix(self): + """Determines a matrix describing the temporal distance to each period. + Rows represent investment/commissioning periods, columns represent + decommissioning periods. The values describe the temporal distance + between each investment period to each decommissioning period. + + Returns + ------- + period_distance_matrix: np.array + + """ + periods_matrix = [] + if self.periods is not None: + period_years = np.array(self.periods_years) + for v in period_years: + row = period_years - v + row = np.where(row < 0, 0, row) + periods_matrix.append(row) + self.periods_matrix = np.array(periods_matrix) + def create_time_index( year: int = None, diff --git a/src/oemof/solph/_models.py b/src/oemof/solph/_models.py index a03a9487d..65c23c8eb 100644 --- a/src/oemof/solph/_models.py +++ b/src/oemof/solph/_models.py @@ -9,6 +9,7 @@ SPDX-FileCopyrightText: Patrik Schönfeldt SPDX-FileCopyrightText: Saeed Sayadi SPDX-FileCopyrightText: Johannes Kochems +SPDX-FileCopyrightText: Lennart Schürmann SPDX-License-Identifier: MIT @@ -17,13 +18,14 @@ import warnings from logging import getLogger +from oemof.tools import debugging from pyomo import environ as po from pyomo.core.plugins.transform.relax_integrality import RelaxIntegrality from pyomo.opt import SolverFactory from oemof.solph import processing from oemof.solph.buses._bus import BusBlock -from oemof.solph.components._transformer import TransformerBlock +from oemof.solph.components._converter import ConverterBlock from oemof.solph.flows._invest_non_convex_flow_block import ( InvestNonConvexFlowBlock, ) @@ -39,19 +41,23 @@ class LoggingError(BaseException): class BaseModel(po.ConcreteModel): - """The BaseModel for other solph-models (Model, MultiPeriodModel, etc.) + """The BaseModel for other solph-models (Model) Parameters ---------- - energysystem : EnergySystem object - Object that holds the nodes of an oemof energy system graph + energysystem : EnergySystem object or (experimental) list + Object that holds the nodes of an oemof energy system graph. + Experimental: If a list is passed, the list needs to hold EnergySystem + objects and a cellular structure is assumed. In this case, the first + element needs to be the upmost energy cell (structurally containing + all other cells). constraint_groups : list (optional) Solph looks for these groups in the given energy system and uses them to create the constraints of the optimization problem. Defaults to `Model.CONSTRAINTS` objective_weighting : array like (optional) Weights used for temporal objective function - expressions. If nothing is passed `timeincrement` will be used which + expressions. If nothing is passed, `timeincrement` will be used which is calculated from the freq length of the energy system timeindex or can be directly passed as a sequence. auto_construct : boolean @@ -64,28 +70,28 @@ class BaseModel(po.ConcreteModel): Attributes ---------- timeincrement : sequence - Time increments. + Time increments flows : dict - Flows of the model. + Flows of the model name : str - Name of the model. + Name of the model es : solph.EnergySystem - Energy system of the model. + Energy system of the model (upmost energy cell for cellular structures) meta : `pyomo.opt.results.results_.SolverResults` or None - Solver results. + Solver results dual : `pyomo.core.base.suffix.Suffix` or None Store the dual variables of the model if pyomo suffix is set to IMPORT rc : `pyomo.core.base.suffix.Suffix` or None Store the reduced costs of the model if pyomo suffix is set to IMPORT """ - # The default list of constraint groups to be used for a model. + # The default list of constraint groups to be used for a model CONSTRAINT_GROUPS = [] def __init__(self, energysystem, **kwargs): """Initialize a BaseModel, using its energysystem as well as - optional kwargs for specifying the timeincrement, objective_weigting - and constraint groups.""" + optional kwargs for specifying the timeincrement, objective_weighting + and constraint_groups.""" super().__init__() # Check root logger. Due to a problem with pyomo the building of the @@ -109,7 +115,13 @@ def __init__(self, energysystem, **kwargs): # ######################## Arguments ################################# self.name = kwargs.get("name", type(self).__name__) - self.es = energysystem + self.is_cellular = isinstance(energysystem, list) + + if self.is_cellular: + self.es = energysystem[0] + self.ec = energysystem[1:] + else: + self.es = energysystem self.timeincrement = kwargs.get("timeincrement", self.es.timeincrement) self.objective_weighting = kwargs.get( @@ -128,6 +140,10 @@ def __init__(self, energysystem, **kwargs): ] self.flows = self.es.flows() + if self.is_cellular: + for cell in self.ec: + for io, f in cell.flows().items(): + self.flows.update({io: f}) self.solver_results = None self.dual = None @@ -138,7 +154,8 @@ def __init__(self, energysystem, **kwargs): def _construct(self): """Construct a BaseModel by adding parent block sets and variables - as well as child blocks and variables to it.""" + as well as child blocks and variables to it. + """ self._add_parent_block_sets() self._add_parent_block_variables() self._add_child_blocks() @@ -147,7 +164,8 @@ def _construct(self): def _add_parent_block_sets(self): """Method to create all sets located at the parent block, i.e. in the model itself, as they are to be shared across all model components. - See the class :py:class:~oemof.solph.models.Model for the sets created. + See the class :py:class:~oemof.solph._models.Model + for the sets created. """ pass @@ -163,7 +181,8 @@ def _add_parent_block_variables(self): def _add_child_blocks(self): """Method to add the defined child blocks for components that have been grouped in the defined constraint groups. This collects all the - constraints from the component blocks and adds them to the model. + constraints from the buses, components and flows blocks + and adds them to the model. """ for group in self._constraint_groups: # create instance for block @@ -213,9 +232,9 @@ def solve(self, solver="cbc", solver_io="lp", **kwargs): Parameters ---------- solver : string - solver to be used e.g. "cbc", "glpk","gurobi","cplex" + solver to be used e.g. "cbc", "glpk", "gurobi", "cplex" solver_io : string - pyomo solver interface file format: "lp","python","nl", etc. + pyomo solver interface file format: "lp", "python", "nl", etc. \**kwargs : keyword arguments Possible keys can be set see below: @@ -271,17 +290,35 @@ def relax_problem(self): class Model(BaseModel): - """An energy system model for operational and/or investment + """An energy system model for operational and/or investment optimization. Parameters ---------- - energysystem : EnergySystem object - Object that holds the nodes of an oemof energy system graph + energysystem : EnergySystem object or (experimental) list + Object that holds the nodes of an oemof energy system graph. + Experimental: If a list is passed, the list needs to hold EnergySystem + objects and a cellular structure is assumed. In this case, the first + element needs to be the upmost energy cell (structurally containing + all other cells). constraint_groups : list Solph looks for these groups in the given energy system and uses them to create the constraints of the optimization problem. Defaults to `Model.CONSTRAINT_GROUPS` + discount_rate : float or None + The rate used for discounting in a multi-period model. + A 2% discount rate needs to be defined as 0.02. + + Note + ---- + + * The discount rate is only applicable for a multi-period model. + * If you want to work with costs data in nominal terms, + you should specify a discount rate. + * By default, there is a discount rate of 2% in a multi-period model. + * If you want to provide your costs data in real terms, + just specify `discount_rate = 0`, i.e. effectively there will be + no discounting. **The following basic sets are created**: @@ -292,13 +329,22 @@ class Model(BaseModel): TIMESTEPS A set with all timesteps of the given time horizon. + PERIODS + A set with all investment periods of the given time horizon. + + TIMEINDEX + A set with all time indices of the given time horizon, whereby + time indices are defined as a tuple consisting of the period and the + timestep. E.g. (2, 10) would be timestep 10 (which is exactly the same + as in the TIMESTEPS set) and which is in period 2. + FLOWS A 2 dimensional set with all flows. Index: `(source, target)` **The following basic variables are created**: flow - Flow from source to target indexed by FLOWS, TIMESTEPS. + Flow from source to target indexed by FLOWS, TIMEINDEX. Note: Bounds of this variable are set depending on attributes of the corresponding flow object. @@ -306,20 +352,55 @@ class Model(BaseModel): CONSTRAINT_GROUPS = [ BusBlock, - TransformerBlock, + ConverterBlock, InvestmentFlowBlock, SimpleFlowBlock, NonConvexFlowBlock, InvestNonConvexFlowBlock, ] - def __init__(self, energysystem, **kwargs): + def __init__(self, energysystem, discount_rate=None, **kwargs): + if discount_rate is not None: + self.discount_rate = discount_rate + elif ( + not isinstance(energysystem, list) + and energysystem.periods is not None + ): + self._set_discount_rate_with_warning() + elif ( + isinstance(energysystem, list) + and energysystem[0].periods is not None + ): + self._set_discount_rate_with_warning() + else: + pass super().__init__(energysystem, **kwargs) + def _set_discount_rate_with_warning(self): + """ + Sets the discount rate to the standard value and raises a warning. + """ + self.discount_rate = 0.02 + msg = ( + f"By default, a discount_rate of {self.discount_rate} " + f"is used for a multi-period model. " + f"If you want to use another value, " + f"you have to specify the `discount_rate` attribute." + ) + warnings.warn(msg, debugging.SuspiciousUsageWarning) + def _add_parent_block_sets(self): - """Add all basic sets to the model, i.e. NODES, TIMESTEPS and FLOWS.""" - # set with all nodes - self.NODES = po.Set(initialize=[n for n in self.es.nodes]) + """Add all basic sets to the model, i.e. NODES, TIMESTEPS and FLOWS. + Also create sets PERIODS and TIMEINDEX used for multi-period models. + """ + self.nodes = self.es.nodes + if self.is_cellular: + # collect all nodes from the child cells + for cell in self.ec: + for node in cell.nodes: + self.nodes.append(node) + # create set with all nodes + self.NODES = po.Set(initialize=[n for n in self.nodes]) if self.es.timeincrement is None: msg = ( @@ -336,6 +417,41 @@ def _add_parent_block_sets(self): initialize=range(len(self.es.timeincrement) + 1), ordered=True ) + if self.es.periods is None: + self.TIMEINDEX = po.Set( + initialize=list( + zip( + [0] * len(self.es.timeincrement), + range(len(self.es.timeincrement)), + ) + ), + ordered=True, + ) + self.PERIODS = po.Set(initialize=[0]) + else: + nested_list = [ + [k] * len(self.es.periods[k]) + for k in range(len(self.es.periods)) + ] + flattened_list = [ + item for sublist in nested_list for item in sublist + ] + self.TIMEINDEX = po.Set( + initialize=list( + zip(flattened_list, range(len(self.es.timeincrement))) + ), + ordered=True, + ) + self.PERIODS = po.Set( + initialize=sorted(list(set(range(len(self.es.periods))))) + ) + + # (Re-)Map timesteps to periods + timesteps_in_period = {p: [] for p in self.PERIODS} + for p, t in self.TIMEINDEX: + timesteps_in_period[p].append(t) + self.TIMESTEPS_IN_PERIOD = timesteps_in_period + # previous timesteps previous_timesteps = [x - 1 for x in self.TIMESTEPS] previous_timesteps[0] = self.TIMESTEPS.last() @@ -365,35 +481,34 @@ def _add_parent_block_sets(self): def _add_parent_block_variables(self): """Add the parent block variables, which is the `flow` variable, - indexed by FLOWS and TIMESTEPS.""" - self.flow = po.Var(self.FLOWS, self.TIMESTEPS, within=po.Reals) + indexed by FLOWS and TIMEINDEX.""" + self.flow = po.Var(self.FLOWS, self.TIMEINDEX, within=po.Reals) for o, i in self.FLOWS: if self.flows[o, i].nominal_value is not None: if self.flows[o, i].fix[self.TIMESTEPS.at(1)] is not None: - for t in self.TIMESTEPS: - self.flow[o, i, t].value = ( + for p, t in self.TIMEINDEX: + self.flow[o, i, p, t].value = ( self.flows[o, i].fix[t] * self.flows[o, i].nominal_value ) - self.flow[o, i, t].fix() + self.flow[o, i, p, t].fix() else: - for t in self.TIMESTEPS: - self.flow[o, i, t].setub( + for p, t in self.TIMEINDEX: + self.flow[o, i, p, t].setub( self.flows[o, i].max[t] * self.flows[o, i].nominal_value ) - if not self.flows[o, i].nonconvex: - for t in self.TIMESTEPS: - self.flow[o, i, t].setlb( + for p, t in self.TIMEINDEX: + self.flow[o, i, p, t].setlb( self.flows[o, i].min[t] * self.flows[o, i].nominal_value ) elif (o, i) in self.UNIDIRECTIONAL_FLOWS: - for t in self.TIMESTEPS: - self.flow[o, i, t].setlb(0) + for p, t in self.TIMEINDEX: + self.flow[o, i, p, t].setlb(0) else: if (o, i) in self.UNIDIRECTIONAL_FLOWS: - for t in self.TIMESTEPS: - self.flow[o, i, t].setlb(0) + for p, t in self.TIMEINDEX: + self.flow[o, i, p, t].setlb(0) diff --git a/src/oemof/solph/_options.py b/src/oemof/solph/_options.py index 010b8471a..051eb8479 100644 --- a/src/oemof/solph/_options.py +++ b/src/oemof/solph/_options.py @@ -8,6 +8,7 @@ SPDX-FileCopyrightText: Stephan Günther SPDX-FileCopyrightText: Patrik Schönfeldt SPDX-FileCopyrightText: jmloenneberga +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT @@ -22,24 +23,55 @@ class Investment: Parameters ---------- - maximum : float, :math:`P_{invest,max}` or :math:`E_{invest,max}` - Maximum of the additional invested capacity - minimum : float, :math:`P_{invest,min}` or :math:`E_{invest,min}` + maximum : float, :math:`P_{invest,max}(p)` or :math:`E_{invest,max}(p)` + Maximum of the additional invested capacity; + defined per period p for a multi-period model. + minimum : float, :math:`P_{invest,min}(p)` or :math:`E_{invest,min}(p)` Minimum of the additional invested capacity. If `nonconvex` is `True`, - `minimum` defines the threshold for the invested capacity. + `minimum` defines the threshold for the invested capacity; + defined per period p for a multi-period model. ep_costs : float, :math:`c_{invest,var}` - Equivalent periodical costs for the investment per flow capacity. + Equivalent periodical costs or investment expenses for the investment + + * For a standard model: equivalent periodical costs for the investment + per flow capacity, i.e. annuities for investments already calculated. + * For a multi-period model: Investment expenses for the respective + period (in nominal terms). Annuities are calculated within the + objective term, also considering age and lifetime. existing : float, :math:`P_{exist}` or :math:`E_{exist}` Existing / installed capacity. The invested capacity is added on top - of this value. Not applicable if `nonconvex` is set to `True`. + of this value. Hence, existing capacities come at no additional costs. + Not applicable if `nonconvex` is set to `True`. nonconvex : bool If `True`, a binary variable for the status of the investment is created. This enables additional fix investment costs (*offset*) independent of the invested flow capacity. Therefore, use the `offset` parameter. offset : float, :math:`c_{invest,fix}` - Additional fix investment costs. Only applicable if `nonconvex` is set - to `True`. + Additional fixed investment costs. Only applicable if `nonconvex` is + set to `True`. + overall_maximum : float, :math:`P_{overall,max}` or :math:`E_{overall,max}` + Overall maximum capacity investment, i.e. the amount of capacity + that can be totally installed at maximum in any period (taking into + account decommissionings); only applicable for multi-period models + overall_minimum : float :math:`P_{overall,min}` or :math:`E_{overall,min}` + Overall minimum capacity investment that needs to be installed + in the last period of the optimization (taking into account + decommissionings); only applicable for multi-period models + lifetime : int, :math:`l` + Units lifetime, given in years; only applicable for multi-period + models + age : int, :math:`a` + Units start age, given in years at the beginning of the simulation; + only applicable for multi-period models + interest_rate : float, :math:`ir` + Interest rate for calculating annuities when investing in a particular + unit; only applicable for multi-period models. + If nothing else is specified, the interest rate is the same as the + model discount rate of the multi-period model. + fixed_costs : float or list of float, :math:`c_{fixed}(p)` + Fixed costs in each period (given in nominal terms); + only applicable for multi-period models For the variables, constraints and parts of the objective function, which @@ -60,16 +92,28 @@ def __init__( existing=0, nonconvex=False, offset=0, + overall_maximum=None, + overall_minimum=None, + lifetime=None, + age=0, + interest_rate=0, + fixed_costs=None, custom_attributes=None, ): if custom_attributes is None: custom_attributes = {} - self.maximum = maximum - self.minimum = minimum - self.ep_costs = ep_costs + self.maximum = sequence(maximum) + self.minimum = sequence(minimum) + self.ep_costs = sequence(ep_costs) self.existing = existing self.nonconvex = nonconvex - self.offset = offset + self.offset = sequence(offset) + self.overall_maximum = overall_maximum + self.overall_minimum = overall_minimum + self.lifetime = lifetime + self.age = age + self.interest_rate = interest_rate + self.fixed_costs = sequence(fixed_costs) for attribute in custom_attributes.keys(): value = custom_attributes.get(attribute) @@ -78,8 +122,10 @@ def __init__( self._check_invest_attributes() self._check_invest_attributes_maximum() self._check_invest_attributes_offset() + self._check_age_and_lifetime() def _check_invest_attributes(self): + """Throw an error if existing is other than 0 and nonconvex is True""" if (self.existing != 0) and (self.nonconvex is True): e1 = ( "Values for 'offset' and 'existing' are given in" @@ -89,10 +135,11 @@ def _check_invest_attributes(self): raise AttributeError(e1) def _check_invest_attributes_maximum(self): - if (self.maximum == float("+inf")) and (self.nonconvex is True): + """Throw an error if maximum is infinite and nonconvex is True""" + if (self.maximum[0] == float("+inf")) and (self.nonconvex is True): e2 = ( - "Please provide an maximum investment value in case of" - " nonconvex investemnt (nonconvex=True), which is in the" + "Please provide a maximum investment value in case of" + " nonconvex investment (nonconvex=True), which is in the" " expected magnitude." " \nVery high maximum values (> 10e8) as maximum investment" " limit might lead to numeric issues, so that no investment" @@ -101,13 +148,26 @@ def _check_invest_attributes_maximum(self): raise AttributeError(e2) def _check_invest_attributes_offset(self): - if (self.offset != 0) and (self.nonconvex is False): + """Throw an error if offset is given without nonconvex=True""" + if (self.offset[0] != 0) and (self.nonconvex is False): e3 = ( "If `nonconvex` is `False`, the `offset` parameter will be" " ignored." ) raise AttributeError(e3) + def _check_age_and_lifetime(self): + """Throw an error if age is chosen greater or equal to lifetime; + only applicable for multi-period models + """ + if self.lifetime is not None: + if self.age >= self.lifetime: + e4 = ( + "A unit's age must be smaller than its " + "expected lifetime." + ) + raise AttributeError(e4) + class NonConvex: """Defines a NonConvex object holding all the specifications for NonConvex @@ -144,7 +204,7 @@ class NonConvex: fixed for the four first and last timesteps of the optimization period. If both, up and downtimes are defined, the initial status is set for the maximum of both e.g. for six timesteps if a minimum downtime of - six timesteps is defined in addition to a four timestep minimum uptime. + six timesteps is defined besides a four timestep minimum uptime. negative_gradient_limit : numeric (iterable, scalar or None) the normed *upper bound* on the positive difference (`flow[t-1] < flow[t]`) of two consecutive flow values. @@ -194,5 +254,4 @@ def max_up_down(self): The maximum of both is used to set the initial status for this number of time steps within the edge regions. """ - return max(self.minimum_uptime, self.minimum_downtime) diff --git a/src/oemof/solph/buses/_bus.py b/src/oemof/solph/buses/_bus.py index 403fd38c5..704ddd7a9 100644 --- a/src/oemof/solph/buses/_bus.py +++ b/src/oemof/solph/buses/_bus.py @@ -9,6 +9,7 @@ SPDX-FileCopyrightText: Birgit Schachler SPDX-FileCopyrightText: jnnr SPDX-FileCopyrightText: jmloenneberga +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT @@ -21,11 +22,17 @@ class Bus(on.Bus): - """A balance object. Every node has to be connected to BusBlock. + """A balance object. Every component has to be connected to buses. The sum of all inputs of a Bus object must equal the sum of all outputs within one time step. + Attributes + ---------- + balanced: boolean + Indicates if bus is balanced, i.e. if the sum of inflows equals to + the sum of outflows for each timestep; defaults to True + Notes ----- The following sets, variables, constraints and objective parts are created @@ -54,9 +61,9 @@ class BusBlock(ScalarBlock): Bus balance: `om.Bus.balance[i, o, t]` .. math:: - \sum_{i \in INPUTS(n)} P_{i}(t) = - \sum_{o \in OUTPUTS(n)} P_{o}(t), \\ - \forall t \in \textrm{TIMESTEPS}, \\ + \sum_{i \in INPUTS(n)} P_{i}(p, t) = + \sum_{o \in OUTPUTS(n)} P_{o}(p, t), \\ + \forall p, t \in \textrm{TIMEINDEX}, \\ \forall i \in \textrm{INPUTS}, \\ \forall o \in \textrm{OUTPUTS} @@ -65,15 +72,15 @@ class BusBlock(ScalarBlock): output of the Bus object. The index :math:`n` is the index for the Bus node itself. Therefore, - a :math:`flow[i, n, t]` is a flow from the Component i to the Bus n at - time step t. + a :math:`flow[i, n, p, t]` is a flow from the Component i to the Bus n at + time index p, t. ====================== ============================ ==================== symbol attribute explanation ====================== ============================ ==================== - :math:`P_{i}(t)` `flow[i, n, t]` Bus, inflow + :math:`P_{i}(p, t)` `flow[i, n, p, t]` Bus, inflow - :math:`P_{o}(t)` `flow[n, o, t]` Bus, outflow + :math:`P_{o}(p, t)` `flow[n, o, p, t]` Bus, outflow ====================== ============================ ==================== """ @@ -102,14 +109,14 @@ def _create(self, group=None): outs[n] = [o for o in n.outputs] def _busbalance_rule(block): - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: - lhs = sum(m.flow[i, g, t] for i in ins[g]) - rhs = sum(m.flow[g, o, t] for o in outs[g]) + lhs = sum(m.flow[i, g, p, t] for i in ins[g]) + rhs = sum(m.flow[g, o, p, t] for o in outs[g]) expr = lhs == rhs # no inflows no outflows yield: 0 == 0 which is True if expr is not True: - block.balance.add((g, t), expr) + block.balance.add((g, p, t), expr) - self.balance = Constraint(group, m.TIMESTEPS, noruleinit=True) + self.balance = Constraint(group, m.TIMEINDEX, noruleinit=True) self.balance_build = BuildAction(rule=_busbalance_rule) diff --git a/src/oemof/solph/buses/experimental/_electrical_bus.py b/src/oemof/solph/buses/experimental/_electrical_bus.py index 9bf54954f..fe53b56e3 100644 --- a/src/oemof/solph/buses/experimental/_electrical_bus.py +++ b/src/oemof/solph/buses/experimental/_electrical_bus.py @@ -11,6 +11,7 @@ SPDX-FileCopyrightText: jakob-wo SPDX-FileCopyrightText: gplssm SPDX-FileCopyrightText: jnnr +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT @@ -20,14 +21,16 @@ class ElectricalBus(Bus): - r"""A electrical bus object. Every node has to be connected to BusBlock. + r"""An electrical bus object used for linear optimal power flow (LOPF) + + Every (spatial) node has to be connected to a BusBlock. This BusBlock is used in combination with ElectricalLine objects for linear optimal power flow (lopf) calculations. Parameters ---------- slack: boolean - If True BusBlock is slack bus for network + If True BusBlock is slack bus for electrical network v_max: numeric Maximum value of voltage angle at electrical bus v_min: numeric diff --git a/src/oemof/solph/components/__init__.py b/src/oemof/solph/components/__init__.py index 0ccab7538..0e0fa830a 100644 --- a/src/oemof/solph/components/__init__.py +++ b/src/oemof/solph/components/__init__.py @@ -10,21 +10,27 @@ """ from . import experimental +from ._converter import Converter +from ._converter import Transformer from ._extraction_turbine_chp import ExtractionTurbineCHP from ._generic_chp import GenericCHP from ._generic_storage import GenericStorage -from ._offset_transformer import OffsetTransformer +from ._link import Link +from ._offset_converter import OffsetConverter +from ._offset_converter import OffsetTransformer from ._sink import Sink from ._source import Source -from ._transformer import Transformer __all__ = [ + "Converter", "experimental", "ExtractionTurbineCHP", "GenericCHP", "GenericStorage", + "OffsetConverter", + "Link", "OffsetTransformer", "Sink", - "Source", "Transformer", + "Source", ] diff --git a/src/oemof/solph/components/_transformer.py b/src/oemof/solph/components/_converter.py similarity index 72% rename from src/oemof/solph/components/_transformer.py rename to src/oemof/solph/components/_converter.py index f5bc8a4f9..90782646b 100644 --- a/src/oemof/solph/components/_transformer.py +++ b/src/oemof/solph/components/_converter.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- """ -solph version of oemof.network.Transformer including +solph version of oemof.network.Converter including sets, variables, constraints and parts of the objective function -for TransformerBlock objects. +for ConverterBlock objects. SPDX-FileCopyrightText: Uwe Krien SPDX-FileCopyrightText: Simon Hilpert @@ -15,11 +15,14 @@ SPDX-FileCopyrightText: jmloenneberga SPDX-FileCopyrightText: David Fuhrländer SPDX-FileCopyrightText: Johannes Röder +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT """ +from warnings import warn + from oemof.network import network as on from pyomo.core import BuildAction from pyomo.core import Constraint @@ -29,8 +32,8 @@ from oemof.solph._plumbing import sequence -class Transformer(on.Transformer): - """A linear converter object with n inputs and n outputs. +class Converter(on.Transformer): + """A linear ConverterBlock object with n inputs and n outputs. Node object that relates any number of inflow and outflows with conversion factors. Inputs and outputs must be given as dictinaries. @@ -53,7 +56,7 @@ class Transformer(on.Transformer): Examples -------- - Defining an linear transformer: + Defining an linear converter: >>> from oemof import solph >>> bgas = solph.buses.Bus(label='natural_gas') @@ -61,7 +64,7 @@ class Transformer(on.Transformer): >>> bel = solph.buses.Bus(label='electricity') >>> bheat = solph.buses.Bus(label='heat') - >>> trsf = solph.components.Transformer( + >>> trsf = solph.components.Converter( ... label='pp_gas_1', ... inputs={bgas: solph.flows.Flow(), bcoal: solph.flows.Flow()}, ... outputs={bel: solph.flows.Flow(), bheat: solph.flows.Flow()}, @@ -71,12 +74,12 @@ class Transformer(on.Transformer): [0.2, 0.3, 0.5, 0.8] >>> type(trsf) - + >>> sorted([str(i) for i in trsf.inputs]) ['hard_coal', 'natural_gas'] - >>> trsf_new = solph.components.Transformer( + >>> trsf_new = solph.components.Converter( ... label='pp_gas_2', ... inputs={bgas: solph.flows.Flow()}, ... outputs={bel: solph.flows.Flow(), bheat: solph.flows.Flow()}, @@ -87,7 +90,7 @@ class Transformer(on.Transformer): Notes ----- The following sets, variables, constraints and objective parts are created - * :py:class:`~oemof.solph.components._transformer.TransformerBlock` + * :py:class:`~oemof.solph.components._converter.ConverterBlock` """ def __init__( @@ -132,21 +135,56 @@ def __init__( self.conversion_factors[cf] = sequence(1) def constraint_group(self): - return TransformerBlock + return ConverterBlock + + +# --- BEGIN: To be removed for versions >= v0.6 --- +class Transformer(Converter): + def __init__( + self, + label=None, + inputs=None, + outputs=None, + conversion_factors=None, + custom_attributes=None, + ): + super().__init__( + label=label, + inputs=inputs, + outputs=outputs, + conversion_factors=conversion_factors, + custom_attributes=custom_attributes, + ) + warn( + "solph.components.Transformer has been renamed to" + " solph.components.Converter. The transitional wrapper" + " will be deleted in the future.", + FutureWarning, + ) + + +# --- END --- + + +class ConverterBlock(ScalarBlock): + r"""Block for the linear relation of nodes with type + :class:`~oemof.solph.components._converter.ConverterBlock` + **The following sets are created:** (-> see basic sets at + :class:`.Model` ) -class TransformerBlock(ScalarBlock): - r""" - Block for the linear relation of nodes with type - :class:`~oemof.solph.network.transformer.Transformer` + CONVERTERS + A set with all + :class:`~oemof.solph.components._converter.Converter` objects. **The following constraints are created:** - Linear relation `om.Transformer.relation[i,o,t]` + Linear relation :attr:`om.ConverterBlock.relation[i,o,t]` .. math:: - P_{i}(t) \cdot \eta_{o}(t) = - P_{o}(t) \cdot \eta_{i}(t), \\ - \forall t \in \textrm{TIMESTEPS}, \\ + P_{i}(p, t) \cdot \eta_{o}(t) = + P_{o}(p, t) \cdot \eta_{i}(t), \\ + \forall p, t \in \textrm{TIMEINDEX}, \\ + \forall n \in \textrm{CONVERTERS}, \\ \forall i \in \textrm{INPUTS}, \\ \forall o \in \textrm{OUTPUTS} @@ -158,15 +196,15 @@ class TransformerBlock(ScalarBlock): constraints. The index :math: n is the index for the Transformer node itself. Therefore, - a `flow[i, n, t]` is a flow from the Bus i to the Transformer n at - time step t. + a `flow[i, n, p, t]` is a flow from the Bus i to the Transformer n at + time index p, t. ====================== ============================ ==================== symbol attribute explanation ====================== ============================ ==================== - :math:`P_{i}(t)` `flow[i, n, t]` Transformer, inflow + :math:`P_{i,n}(p, t)` `flow[i, n, p, t]` Converter, inflow - :math:`P_{o}(t)` `flow[n, o, t]` Transformer, outflow + :math:`P_{n,o}(p, t)` `flow[n, o, p, t]` Converter, outflow :math:`\eta_{i}(t)` `conversion_factor[i, n, t]` Inflow, efficiency @@ -180,18 +218,18 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def _create(self, group=None): - """Creates the linear constraint for the class:`TransformerBlock` + """Creates the linear constraint for the class:`ConverterBlock` block. Parameters ---------- group : list - List of oemof.solph.components.Transformers objects for which + List of oemof.solph.components.Converters objects for which the linear relation of inputs and outputs is created e.g. group = [trsf1, trsf2, trsf3, ...]. Note that the relation is created for all existing relations of all inputs and all outputs - of the transformer. The components inside the list need to hold + of the converter. The components inside the list need to hold an attribute `conversion_factors` of type dict containing the conversion factors for all inputs to outputs. """ @@ -205,8 +243,8 @@ def _create(self, group=None): self.relation = Constraint( [ - (n, i, o, t) - for t in m.TIMESTEPS + (n, i, o, p, t) + for p, t in m.TIMEINDEX for n in group for o in out_flows[n] for i in in_flows[n] @@ -215,17 +253,17 @@ def _create(self, group=None): ) def _input_output_relation(block): - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for n in group: for o in out_flows[n]: for i in in_flows[n]: try: lhs = ( - m.flow[i, n, t] + m.flow[i, n, p, t] * n.conversion_factors[o][t] ) rhs = ( - m.flow[n, o, t] + m.flow[n, o, p, t] * n.conversion_factors[i][t] ) except ValueError: @@ -235,6 +273,6 @@ def _input_output_relation(block): n.label, o.label ), ) - block.relation.add((n, i, o, t), (lhs == rhs)) + block.relation.add((n, i, o, p, t), (lhs == rhs)) self.relation_build = BuildAction(rule=_input_output_relation) diff --git a/src/oemof/solph/components/_extraction_turbine_chp.py b/src/oemof/solph/components/_extraction_turbine_chp.py index efdc7577b..0a2ef8f1e 100644 --- a/src/oemof/solph/components/_extraction_turbine_chp.py +++ b/src/oemof/solph/components/_extraction_turbine_chp.py @@ -13,6 +13,7 @@ SPDX-FileCopyrightText: Stephan Günther SPDX-FileCopyrightText: FabianTU SPDX-FileCopyrightText: Johannes Röder +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT @@ -23,17 +24,18 @@ from pyomo.environ import Constraint from oemof.solph._plumbing import sequence as solph_sequence -from oemof.solph.components._transformer import Transformer +from oemof.solph.components._converter import Converter -class ExtractionTurbineCHP(Transformer): +class ExtractionTurbineCHP(Converter): r""" - A CHP with an extraction turbine in a linear model. For more options see - the :class:`~oemof.solph.components.GenericCHP` class. + A CHP with an extraction turbine in a linear model. For a more + detailled modelling approach providing more options, also see + the :class:`.GenericCHP` class. One main output flow has to be defined and is tapped by the remaining flow. The conversion factors have to be defined for the maximum tapped flow ( - full CHP mode) and for no tapped flow (full condensing mode). Even though + full CHP mode) and for no tapped flow (full condensing mode). Even though, it is possible to limit the variability of the tapped flow, so that the full condensing mode will never be reached. @@ -95,7 +97,7 @@ def constraint_group(self): class ExtractionTurbineCHPBlock(ScalarBlock): r"""Block for all instances of - :class:`~oemof.solph.components.ExtractionTurbineCHP` + :class:`~oemof.solph.components.experimental._ExtractionTurbineCHP` **Variables** @@ -103,17 +105,17 @@ class ExtractionTurbineCHPBlock(ScalarBlock): * :math:`\dot H_{Fuel}` - Fuel input flow, represented in code as `flow[i,n,t]` + Fuel input flow, represented in code as `flow[i, n, p, t]` * :math:`P_{el}` Electric power outflow, represented in code as - `flow[n, main_output, t]` + `flow[n, main_output, p, t]` * :math:`\dot Q_{th}` Thermal output flow, represented in code as - `flow[n, tapped_output, t]` + `flow[n, tapped_output, p, t]` **Parameters** @@ -145,8 +147,8 @@ class ExtractionTurbineCHPBlock(ScalarBlock): .. math:: & (1)\dot H_{Fuel}(t) = - \frac{P_{el}(t) + \dot Q_{th}(t) \cdot \beta(t)} - {\eta_{el,woExtr}(t)} \\ + \frac{P_{el}(t) + \dot Q_{th}(t) \cdot \beta(t)} + {\eta_{el,woExtr}(t)} \\ & (2)P_{el}(t) \geq \dot Q_{th}(t) \cdot C_b @@ -165,7 +167,27 @@ class ExtractionTurbineCHPBlock(ScalarBlock): The first equation is the result of the relation between the input flow and the two output flows, the second equation stems from how the two - output flows relate to each other. + output flows relate to each other, and the symbols used are defined as + follows (with Variables (V) and Parameters (P)): + + ========================= ============================================ ==== ========= + symbol attribute type explanation + ========================= ============================================ ==== ========= + :math:`\dot H_{Fuel}` `flow[i, n, t]` V fuel input flow + + :math:`P_{el}` `flow[n, main_output, t]` V electric power + + :math:`\dot Q_{th}` `flow[n, tapped_output, t]` V thermal output + + :math:`\beta` `main_flow_loss_index[n, t]` P power loss index + + :math:`\eta_{el,woExtr}` `conversion_factor_full_condensation[n, t]` P electric efficiency + without heat extraction + :math:`\eta_{el,maxExtr}` `conversion_factors[main_output][n, t]` P electric efficiency + with max heat extraction + :math:`\eta_{th,maxExtr}` `conversion_factors[tapped_output][n, t]` P thermal efficiency with + maximal heat extraction + ========================= ============================================ ==== ========= """ # noqa: E501 @@ -175,18 +197,19 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def _create(self, group=None): - """Creates the linear constraint for the - :class:`oemof.solph.components.TransformerBlock` block. + """Creates the constraints for + :class:`oemof.solph.components.experimental._extraction_turbine_chp.ExtractionTurbineCHPBlock`. Parameters ---------- group : list - List of :class:`oemof.solph.components.ExtractionTurbineCHP` - (trsf) objects for which the linear relation of inputs and outputs - is created e.g. group = [trsf1, trsf2, trsf3, ...]. Note that the - relation is created for all existing relations of the inputs and - all outputs of the transformer. The components inside the list need - to hold all needed attributes. + List of + :class:`oemof.solph.components.experimental._extraction_turbine_chp.ExtractionTurbineCHP` + (trsf) objects for which the linear relation of inputs + and outputs is created e.g. group = [trsf1, trsf2, trsf3, ...]. + Note that the relation is created for all existing relations + of the inputs and all outputs of the converter-like object. + The components inside the list need to hold all needed attributes. """ if group is None: return None @@ -219,18 +242,18 @@ def _create(self, group=None): def _input_output_relation_rule(block): """Connection between input, main output and tapped output.""" - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: - lhs = m.flow[g.inflow, g, t] + lhs = m.flow[g.inflow, g, p, t] rhs = ( - m.flow[g, g.main_output, t] - + m.flow[g, g.tapped_output, t] + m.flow[g, g.main_output, p, t] + + m.flow[g, g.tapped_output, p, t] * g.main_flow_loss_index[t] ) / g.conversion_factor_full_condensation_sq[t] - block.input_output_relation.add((g, t), (lhs == rhs)) + block.input_output_relation.add((g, p, t), (lhs == rhs)) self.input_output_relation = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.input_output_relation_build = BuildAction( rule=_input_output_relation_rule @@ -238,17 +261,17 @@ def _input_output_relation_rule(block): def _out_flow_relation_rule(block): """Relation between main and tapped output in full chp mode.""" - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: - lhs = m.flow[g, g.main_output, t] + lhs = m.flow[g, g.main_output, p, t] rhs = ( - m.flow[g, g.tapped_output, t] + m.flow[g, g.tapped_output, p, t] * g.flow_relation_index[t] ) - block.out_flow_relation.add((g, t), (lhs >= rhs)) + block.out_flow_relation.add((g, p, t), (lhs >= rhs)) self.out_flow_relation = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.out_flow_relation_build = BuildAction( rule=_out_flow_relation_rule diff --git a/src/oemof/solph/components/_generic_chp.py b/src/oemof/solph/components/_generic_chp.py index d0f18efeb..d817f00f5 100644 --- a/src/oemof/solph/components/_generic_chp.py +++ b/src/oemof/solph/components/_generic_chp.py @@ -12,6 +12,7 @@ SPDX-FileCopyrightText: Stephan Günther SPDX-FileCopyrightText: FabianTU SPDX-FileCopyrightText: Johannes Röder +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT @@ -55,29 +56,31 @@ class GenericCHP(network.Transformer): Note ---- - An adaption for the flow parameter `H_L_FG_share_max` has been made to - set the flue gas losses at maximum heat extraction `H_L_FG_max` as share of - the fuel flow `H_F` e.g. for combined cycle extraction turbines. - The flow parameter `H_L_FG_share_min` can be used to set the flue gas - losses at minimum heat extraction `H_L_FG_min` as share of - the fuel flow `H_F` e.g. for motoric CHPs. - The boolean component parameter `back_pressure` can be set to model - back-pressure characteristics. + * An adaption for the flow parameter `H_L_FG_share_max` has been made to + set the flue gas losses at maximum heat extraction `H_L_FG_max` as share + of the fuel flow `H_F` e.g. for combined cycle extraction turbines. + * The flow parameter `H_L_FG_share_min` can be used to set the flue gas + losses at minimum heat extraction `H_L_FG_min` as share of + the fuel flow `H_F` e.g. for motoric CHPs. + * The boolean component parameter `back_pressure` can be set to model + back-pressure characteristics. Also have a look at the examples on how to use it. Parameters ---------- fuel_input : dict - Dictionary with key-value-pair of `oemof.Bus` and `oemof.Flow` object - for the fuel input. + Dictionary with key-value-pair of `oemof.solph.Bus` and + `oemof.solph.Flow` objects for the fuel input. electrical_output : dict - Dictionary with key-value-pair of `oemof.Bus` and `oemof.Flow` object - for the electrical output. Related parameters like `P_max_woDH` are - passed as attributes of the `oemof.Flow` object. + Dictionary with key-value-pair of `oemof.solph.Bus` and + `oemof.solph.Flow` objects for the electrical output. + Related parameters like `P_max_woDH` are passed as + attributes of the `oemof.Flow` object. heat_output : dict - Dictionary with key-value-pair of `oemof.Bus` and `oemof.Flow` object - for the heat output. Related parameters like `Q_CW_min` are passed as + Dictionary with key-value-pair of `oemof.solph.Bus` + and `oemof.solph.Flow` objects for the heat output. + Related parameters like `Q_CW_min` are passed as attributes of the `oemof.Flow` object. beta : list of numerical values beta values in same dimension as all other parameters (length of @@ -334,37 +337,37 @@ def _create(self, group=None): self.Y = Var(self.GENERICCHPS, m.TIMESTEPS, within=Binary) # constraint rules - def _H_flow_rule(block, n, t): + def _H_flow_rule(block, n, p, t): """Link fuel consumption to component inflow.""" expr = 0 expr += self.H_F[n, t] - expr += -m.flow[list(n.fuel_input.keys())[0], n, t] + expr += -m.flow[list(n.fuel_input.keys())[0], n, p, t] return expr == 0 self.H_flow = Constraint( - self.GENERICCHPS, m.TIMESTEPS, rule=_H_flow_rule + self.GENERICCHPS, m.TIMEINDEX, rule=_H_flow_rule ) - def _Q_flow_rule(block, n, t): + def _Q_flow_rule(block, n, p, t): """Link heat flow to component outflow.""" expr = 0 expr += self.Q[n, t] - expr += -m.flow[n, list(n.heat_output.keys())[0], t] + expr += -m.flow[n, list(n.heat_output.keys())[0], p, t] return expr == 0 self.Q_flow = Constraint( - self.GENERICCHPS, m.TIMESTEPS, rule=_Q_flow_rule + self.GENERICCHPS, m.TIMEINDEX, rule=_Q_flow_rule ) - def _P_flow_rule(block, n, t): + def _P_flow_rule(block, n, p, t): """Link power flow to component outflow.""" expr = 0 expr += self.P[n, t] - expr += -m.flow[n, list(n.electrical_output.keys())[0], t] + expr += -m.flow[n, list(n.electrical_output.keys())[0], p, t] return expr == 0 self.P_flow = Constraint( - self.GENERICCHPS, m.TIMESTEPS, rule=_P_flow_rule + self.GENERICCHPS, m.TIMEINDEX, rule=_P_flow_rule ) def _H_F_1_rule(block, n, t): diff --git a/src/oemof/solph/components/_generic_storage.py b/src/oemof/solph/components/_generic_storage.py index 6de23fffb..a10e02ca3 100644 --- a/src/oemof/solph/components/_generic_storage.py +++ b/src/oemof/solph/components/_generic_storage.py @@ -13,14 +13,22 @@ SPDX-FileCopyrightText: FabianTU SPDX-FileCopyrightText: Johannes Röder SPDX-FileCopyrightText: Ekaterina Zolotarevskaia +SPDX-FileCopyrightText: Johannes Kochems +SPDX-FileCopyrightText: Johannes Giehl SPDX-License-Identifier: MIT """ +import numbers +from warnings import warn +import numpy as np from oemof.network import network +from oemof.tools import debugging +from oemof.tools import economics from pyomo.core.base.block import ScalarBlock from pyomo.environ import Binary +from pyomo.environ import BuildAction from pyomo.environ import Constraint from pyomo.environ import Expression from pyomo.environ import NonNegativeReals @@ -32,7 +40,7 @@ from oemof.solph._plumbing import sequence as solph_sequence -class GenericStorage(network.Node): +class GenericStorage(network.Component): r""" Component `GenericStorage` to model with basic characteristics of storages. @@ -40,8 +48,10 @@ class GenericStorage(network.Node): Parameters ---------- - nominal_storage_capacity : numeric, :math:`E_{nom}` - Absolute nominal capacity of the storage + nominal_storage_capacity : numeric, :math:`E_{nom}` or + :class:`oemof.solph.options.Investment` object + Absolute nominal capacity of the storage, fixed value or + object describing parameter of investment optimisations. invest_relation_input_capacity : numeric or None, :math:`r_{cap,in}` Ratio between the investment variable of the input Flow and the investment variable of the storage: @@ -61,17 +71,25 @@ class GenericStorage(network.Node): initial_storage_level : numeric, :math:`c(-1)` The relative storage content in the timestep before the first time step of optimization (between 0 and 1). + + Note: When investment mode is used in a multi-period model, + `initial_storage_level` is not supported. + Storage output is forced to zero until the storage unit is invested in. balanced : boolean Couple storage level of first and last time step. (Total inflow and total outflow are balanced.) loss_rate : numeric (iterable or scalar) - The relative loss of the storage content per hour. + The relative loss of the storage content per time unit (e.g. hour). fixed_losses_relative : numeric (iterable or scalar), :math:`\gamma(t)` Losses per hour that are independent of the storage content but proportional to nominal storage capacity. + + Note: Fixed losses are not supported in investment mode. fixed_losses_absolute : numeric (iterable or scalar), :math:`\delta(t)` Losses per hour that are independent of storage content and independent of nominal storage capacity. + + Note: Fixed losses are not supported in investment mode. inflow_conversion_factor : numeric (iterable or scalar), :math:`\eta_i(t)` The relative conversion factor, i.e. efficiency associated with the inflow of the storage. @@ -79,7 +97,8 @@ class GenericStorage(network.Node): see: inflow_conversion_factor min_storage_level : numeric (iterable or scalar), :math:`c_{min}(t)` The normed minimum storage content as fraction of the - nominal storage capacity (between 0 and 1). + nominal storage capacity or the capacity that has been invested into + (between 0 and 1). To set different values in every time step use a sequence. max_storage_level : numeric (iterable or scalar), :math:`c_{max}(t)` see: min_storage_level @@ -89,6 +108,16 @@ class GenericStorage(network.Node): investment variable instead of to the nominal_storage_capacity. The nominal_storage_capacity should not be set (or set to None) if an investment object is used. + storage_costs : numeric (iterable or scalar), :math:`c_{storage}(t)` + Cost (per energy) for having energy in the storage. + lifetime_inflow : int, :math:`n_{in}` + Determine the lifetime of an inflow; only applicable for multi-period + models which can invest in storage capacity and have an + invest_relation_input_capacity defined + lifetime_outflow : int, :math:`n_{in}` + Determine the lifetime of an outflow; only applicable for multi-period + models which can invest in storage capacity and have an + invest_relation_output_capacity defined Notes ----- @@ -150,6 +179,10 @@ def __init__( fixed_losses_absolute=0, inflow_conversion_factor=1, outflow_conversion_factor=1, + fixed_costs=0, + storage_costs=None, + lifetime_inflow=None, + lifetime_outflow=None, custom_attributes=None, ): if inputs is None: @@ -164,7 +197,29 @@ def __init__( outputs=outputs, **custom_attributes, ) - self.nominal_storage_capacity = nominal_storage_capacity + # --- BEGIN: The following code can be removed for versions >= v0.6 --- + if investment is not None: + msg = ( + "For backward compatibility," + " the option investment overwrites the option nominal_value." + + " Both options cannot be set at the same time." + ) + if nominal_storage_capacity is not None: + raise AttributeError(msg) + else: + warn(msg, FutureWarning) + nominal_storage_capacity = investment + # --- END --- + + self.nominal_storage_capacity = None + self.investment = None + self._invest_group = False + if isinstance(nominal_storage_capacity, numbers.Real): + self.nominal_storage_capacity = nominal_storage_capacity + elif isinstance(nominal_storage_capacity, Investment): + self.investment = investment + self._invest_group = True + self.initial_storage_level = initial_storage_level self.balanced = balanced self.loss_rate = solph_sequence(loss_rate) @@ -178,36 +233,43 @@ def __init__( ) self.max_storage_level = solph_sequence(max_storage_level) self.min_storage_level = solph_sequence(min_storage_level) + self.fixed_costs = solph_sequence(fixed_costs) + self.storage_costs = solph_sequence(storage_costs) self.investment = investment self.invest_relation_input_output = invest_relation_input_output self.invest_relation_input_capacity = invest_relation_input_capacity self.invest_relation_output_capacity = invest_relation_output_capacity self._invest_group = isinstance(self.investment, Investment) + self.lifetime_inflow = lifetime_inflow + self.lifetime_outflow = lifetime_outflow # Check number of flows. self._check_number_of_flows() # Check for infeasible parameter combinations self._check_infeasible_parameter_combinations() - # Check attributes for the investment mode. - if self._invest_group is True: + if self._invest_group: self._check_invest_attributes() def _set_flows(self): + """Define inflow / outflow as investment flows when they are + coupled with storage capacity via invest relations + """ for flow in self.inputs.values(): if ( self.invest_relation_input_capacity is not None and not isinstance(flow.investment, Investment) ): - flow.investment = Investment() + flow.investment = Investment(lifetime=self.lifetime_inflow) for flow in self.outputs.values(): if ( self.invest_relation_output_capacity is not None and not isinstance(flow.investment, Investment) ): - flow.investment = Investment() + flow.investment = Investment(lifetime=self.lifetime_outflow) def _check_invest_attributes(self): + """Raise errors for infeasible investment attribute combinations""" if self.investment and self.nominal_storage_capacity is not None: e1 = ( "If an investment object is defined the invest variable " @@ -229,7 +291,7 @@ def _check_invest_attributes(self): self.investment and sum(solph_sequence(self.fixed_losses_absolute)) != 0 and self.investment.existing == 0 - and self.investment.minimum == 0 + and self.investment.minimum[0] == 0 ): e3 = ( "With fixed_losses_absolute > 0, either investment.existing " @@ -240,6 +302,7 @@ def _check_invest_attributes(self): self._set_flows() def _check_number_of_flows(self): + """Ensure that there is only one inflow and outflow to the storage""" msg = "Only one {0} flow allowed in the GenericStorage {1}." check_node_object_for_missing_attribute(self, "inputs") check_node_object_for_missing_attribute(self, "outputs") @@ -249,7 +312,7 @@ def _check_number_of_flows(self): raise AttributeError(msg.format("output", self.label)) def _check_infeasible_parameter_combinations(self): - """Checks for infeasible parameter combinations and raises error""" + """Check for infeasible parameter combinations and raise error""" msg = ( "initial_storage_level must be greater or equal to " "min_storage_level and smaller or equal to " @@ -276,16 +339,16 @@ class GenericStorageBlock(ScalarBlock): :class:`.Model` ) STORAGES - A set with all :class:`.Storage` objects, which do not have an - attr:`investment` of type :class:`.Investment`. + A set with all :py:class:`~.GenericStorage` objects, which do not have an + :attr:`investment` of type :class:`.Investment`. STORAGES_BALANCED A set of all :py:class:`~.GenericStorage` objects, with 'balanced' attribute set to True. STORAGES_WITH_INVEST_FLOW_REL - A set with all :class:`.Storage` objects with two investment flows - coupled with the 'invest_relation_input_output' attribute. + A set with all :py:class:`~.GenericStorage` objects with two investment + flows coupled with the 'invest_relation_input_output' attribute. **The following variables are created:** @@ -294,7 +357,7 @@ class GenericStorageBlock(ScalarBlock): storage content at the beginning is set by the parameter `initial_storage_level` or not set if `initial_storage_level` is None. The variable of storage s and timestep t can be accessed by: - `om.Storage.storage_content[s, t]` + `om.GenericStorageBlock.storage_content[s, t]` **The following constraints are created:** @@ -307,15 +370,16 @@ class GenericStorageBlock(ScalarBlock): (1 - \beta(t)) ^{\tau(t)/(t_u)} \\ &- \gamma(t)\cdot E_{nom} \cdot {\tau(t)/(t_u)}\\ &- \delta(t) \cdot {\tau(t)/(t_u)}\\ - &- \frac{\dot{E}_o(t)}{\eta_o(t)} \cdot \tau(t) - + \dot{E}_i(t) \cdot \eta_i(t) \cdot \tau(t) + &- \frac{\dot{E}_o(p, t)}{\eta_o(t)} \cdot \tau(t) + + \dot{E}_i(p, t) \cdot \eta_i(t) \cdot \tau(t) Connect the invest variables of the input and the output flow. .. math:: - InvestmentFlowBlock.invest(source(n), n) + existing = \\ - (InvestmentFlowBlock.invest(n, target(n)) + existing) * \\ + InvestmentFlowBlock.invest(source(n), n, p) + existing = \\ + (InvestmentFlowBlock.invest(n, target(n), p) + existing) * \\ invest\_relation\_input\_output(n) \\ - \forall n \in \textrm{INVEST\_REL\_IN\_OUT} + \forall n \in \textrm{INVEST\_REL\_IN\_OUT} \\ + \forall p \in \textrm{PERIODS} @@ -331,13 +395,16 @@ class GenericStorageBlock(ScalarBlock): :math:`c_{max}(t)` maximum allowed storage `max_storage_level[t]` :math:`\beta(t)` fraction of lost energy `loss_rate[t]` as share of - :math:`E(t)` per hour + :math:`E(t)` + per time unit + (e.g. hour) :math:`\gamma(t)` fixed loss of energy `fixed_losses_relative[t]` relative to :math:`E_{nom}` per - hour + time unit (e.g. hour) :math:`\delta(t)` absolute fixed loss `fixed_losses_absolute[t]` - of energy per hour + of energy per + time unit (e.g. hour) :math:`\dot{E}_i(t)` energy flowing in `inputs` :math:`\dot{E}_o(t)` energy flowing out `outputs` :math:`\eta_i(t)` conversion factor `inflow_conversion_factor[t]` @@ -353,12 +420,30 @@ class GenericStorageBlock(ScalarBlock): :math:`\delta(t)` and timeincrement :math:`\tau(t)` + :math:`c_{storage}(t)` costs of having `storage_costs` + energy stored =========================== ======================= ========= **The following parts of the objective function are created:** - Nothing added to the objective function. + *Standard model* + * :attr: `storage_costs` not 0 + + ..math:: + \sum_{t \in \textrm{TIMESTEPS}} c_{storage}(t) \cdot E(t) + + + *Multi-period model* + + * :attr:`fixed_costs` not None + + .. math:: + \sum_{p \in \textrm{PERIODS}} E_{nom} + \cdot c_{fixed}(p) \cdot DF^{-p} + + whereby: + :math:`DF=(1+dr)` is the discount factor with discount rate :math:`dr` """ # noqa: E501 @@ -431,7 +516,7 @@ def _storage_content_bound_rule(block, n, t): # ************* Constraints *************************** - def _storage_balance_rule(block, n, t): + def _storage_balance_rule(block, n, p, t): """ Rule definition for the storage balance of every storage n and every timestep. @@ -449,15 +534,15 @@ def _storage_balance_rule(block, n, t): ) expr += n.fixed_losses_absolute[t] * m.timeincrement[t] expr += ( - -m.flow[i[n], n, t] * n.inflow_conversion_factor[t] + -m.flow[i[n], n, p, t] * n.inflow_conversion_factor[t] ) * m.timeincrement[t] expr += ( - m.flow[n, o[n], t] / n.outflow_conversion_factor[t] + m.flow[n, o[n], p, t] / n.outflow_conversion_factor[t] ) * m.timeincrement[t] return expr == 0 self.balance = Constraint( - self.STORAGES, m.TIMESTEPS, rule=_storage_balance_rule + self.STORAGES, m.TIMEINDEX, rule=_storage_balance_rule ) def _balanced_storage_rule(block, n): @@ -474,55 +559,91 @@ def _balanced_storage_rule(block, n): self.STORAGES_BALANCED, rule=_balanced_storage_rule ) - def _power_coupled(block, n): + def _power_coupled(block): """ Rule definition for constraint to connect the input power and output power """ - expr = ( - m.InvestmentFlowBlock.invest[n, o[n]] - + m.flows[n, o[n]].investment.existing - ) * n.invest_relation_input_output == ( - m.InvestmentFlowBlock.invest[i[n], n] - + m.flows[i[n], n].investment.existing - ) - return expr + for n in self.STORAGES_WITH_INVEST_FLOW_REL: + for p in m.PERIODS: + expr = ( + m.InvestmentFlowBlock.total[n, o[n], p] + ) * n.invest_relation_input_output == ( + m.InvestmentFlowBlock.total[i[n], n, p] + ) + self.power_coupled.add((n, p), expr) self.power_coupled = Constraint( - self.STORAGES_WITH_INVEST_FLOW_REL, rule=_power_coupled + self.STORAGES_WITH_INVEST_FLOW_REL, m.PERIODS, noruleinit=True ) + self.power_coupled_build = BuildAction(rule=_power_coupled) + def _objective_expression(self): r""" Objective expression for storages with no investment. - Note: This adds nothing as variable costs are already - added in the Block :class:`SimpleFlowBlock`. + + Note + ---- + * For standard models, this adds nothing as variable costs are + already added in the Block :py:class:`~.SimpleFlowBlock`. + * For multi-period models, fixed costs may be introduced + and added here. """ + m = self.parent_block() + if not hasattr(self, "STORAGES"): return 0 - return 0 + fixed_costs = 0 + + if m.es.periods is not None: + for n in self.STORAGES: + if n.fixed_costs[0] is not None: + for p in m.PERIODS: + fixed_costs += ( + n.nominal_storage_capacity + * n.fixed_costs[p] + * ((1 + m.discount_rate) ** -p) + ) + self.fixed_costs = Expression(expr=fixed_costs) + + storage_costs = 0 + + for n in self.STORAGES: + if n.storage_costs[0] is not None: + storage_costs += ( + self.storage_content[n, 0] * n.storage_costs[0] + ) + for t in m.TIMESTEPS: + storage_costs += ( + self.storage_content[n, t + 1] * n.storage_costs[t + 1] + ) + + self.storage_costs = Expression(expr=storage_costs) + + return self.fixed_costs + self.storage_costs class GenericInvestmentStorageBlock(ScalarBlock): r""" Block for all storages with :attr:`Investment` being not None. - See :class:`oemof.solph.options.Investment` for all parameters of the + See :class:`.Investment` for all parameters of the Investment class. **Variables** - All Storages are indexed by :math:`n`, which is omitted in the following - for the sake of convenience. + All Storages are indexed by :math:`n` (denoting the respective storage + unit), which is omitted in the following for the sake of convenience. The following variables are created as attributes of - :attr:`om.InvestmentStorage`: + :attr:`om.GenericInvestmentStorageBlock`: - * :math:`P_i(t)` + * :math:`P_i(p, t)` Inflow of the storage (created in :class:`oemof.solph.models.BaseModel`). - * :math:`P_o(t)` + * :math:`P_o(p, t)` Outflow of the storage (created in :class:`oemof.solph.models.BaseModel`). @@ -531,15 +652,34 @@ class GenericInvestmentStorageBlock(ScalarBlock): Current storage content (Absolute level of stored energy). - * :math:`E_{invest}` + * :math:`E_{invest}(p)` + + Invested (nominal) capacity of the storage in period p. - Invested (nominal) capacity of the storage. + * :math:`E_{total}(p)` + + Total installed (nominal) capacity of the storage in period p. + + * :math:`E_{old}(p)` + + Old (nominal) capacity of the storage to be decommissioned in period p. + + * :math:`E_{old,exo}(p)` + + Exogenous old (nominal) capacity of the storage to be decommissioned + in period p; existing capacity reaching its lifetime. + + * :math:`E_{old,endo}(p)` + + Endogenous old (nominal) capacity of the storage to be decommissioned + in period p; endgenous investments reaching their lifetime. * :math:`E(-1)` Initial storage content (before timestep 0). + Not applicable for a multi-period model. - * :math:`b_{invest}` + * :math:`b_{invest}(p)` Binary variable for the status of the investment, if :attr:`nonconvex` is `True`. @@ -548,49 +688,120 @@ class GenericInvestmentStorageBlock(ScalarBlock): The following constraints are created for all investment storages: - Storage balance (Same as for :class:`.GenericStorageBlock`) + Storage balance (Same as for :class:`.GenericStorageBlock`) .. math:: E(t) = &E(t-1) \cdot (1 - \beta(t)) ^{\tau(t)/(t_u)} \\ - &- \gamma(t)\cdot (E_{exist} + E_{invest}) \cdot {\tau(t)/(t_u)}\\ + &- \gamma(t)\cdot (E_{total}(p)) \cdot {\tau(t)/(t_u)}\\ &- \delta(t) \cdot {\tau(t)/(t_u)}\\ - &- \frac{P_o(t)}{\eta_o(t)} \cdot \tau(t) - + P_i(t) \cdot \eta_i(t) \cdot \tau(t) + &- \frac{\dot{E}_o(p, t))}{\eta_o(t)} \cdot \tau(t) + + \dot{E}_i(p, t) \cdot \eta_i(t) \cdot \tau(t) + + Total storage capacity (p > 0 for multi-period model only) + + .. math:: + & + if \quad p=0:\\ + & + E_{total}(p) = E_{exist} + E_{invest}(p)\\ + &\\ + & + else:\\ + & + E_{total}(p) = E_{total}(p-1) + E_{invest}(p) - E_{old}(p)\\ + &\\ + & + \forall p \in \textrm{PERIODS} + + Old storage capacity (p > 0 for multi-period model only) + + .. math:: + & + E_{old}(p) = E_{old,exo}(p) + E_{old,end}(p)\\ + &\\ + & + if \quad p=0:\\ + & + E_{old,end}(p) = 0\\ + &\\ + & + else \quad if \quad l \leq year(p):\\ + & + E_{old,end}(p) = E_{invest}(p_{comm})\\ + &\\ + & + else:\\ + & + E_{old,end}(p)\\ + &\\ + & + if \quad p=0:\\ + & + E_{old,exo}(p) = 0\\ + &\\ + & + else \quad if \quad l - a \leq year(p):\\ + & + E_{old,exo}(p) = E_{exist} (*)\\ + &\\ + & + else:\\ + & + E_{old,exo}(p) = 0\\ + &\\ + & + \forall p \in \textrm{PERIODS} + + whereby: + + * (*) is only performed for the first period the condition is True. + A decommissioning flag is then set to True to prevent having falsely + added old capacity in future periods. + * :math:`year(p)` is the year corresponding to period p + * :math:`p_{comm}` is the commissioning period of the storage Depending on the attribute :attr:`nonconvex`, the constraints for the - bounds of the decision variable :math:`E_{invest}` are different:\ + bounds of the decision variable :math:`E_{invest}(p)` are different:\ * :attr:`nonconvex = False` .. math:: - E_{invest, min} \le E_{invest} \le E_{invest, max} + & + E_{invest, min}(p) \le E_{invest}(p) \le E_{invest, max}(p) \\ + & + \forall p \in \textrm{PERIODS} * :attr:`nonconvex = True` .. math:: & - E_{invest, min} \cdot b_{invest} \le E_{invest}\\ + E_{invest, min}(p) \cdot b_{invest}(p) \le E_{invest}(p)\\ + & + E_{invest}(p) \le E_{invest, max}(p) \cdot b_{invest}(p)\\ & - E_{invest} \le E_{invest, max} \cdot b_{invest}\\ + \forall p \in \textrm{PERIODS} The following constraints are created depending on the attributes of - the :class:`.components.GenericStorage`: + the :class:`.GenericStorage`: - * :attr:`initial_storage_level is None` + * :attr:`initial_storage_level is None`; + not applicable for multi-period model Constraint for a variable initial storage content: .. math:: - E(-1) \le E_{invest} + E_{exist} + E(-1) \le E_{exist} + E_{invest}(0) - * :attr:`initial_storage_level is not None` + * :attr:`initial_storage_level is not None`; + not applicable for multi-period model An initial value for the storage content is given: .. math:: - E(-1) = (E_{invest} + E_{exist}) \cdot c(-1) + E(-1) = (E_{invest}(0) + E_{exist}) \cdot c(-1) - * :attr:`balanced=True` + * :attr:`balanced=True`; + not applicable for multi-period model The energy content of storage of the first and the last timestep are set equal: @@ -603,79 +814,181 @@ class GenericInvestmentStorageBlock(ScalarBlock): Connect the invest variables of the storage and the input flow: .. math:: - P_{i,invest} + P_{i,exist} = - (E_{invest} + E_{exist}) \cdot r_{cap,in} + & + P_{i,total}(p) = + E_{total}(p) \cdot r_{cap,in} \\ + & + \forall p \in \textrm{PERIODS} * :attr:`invest_relation_output_capacity is not None` Connect the invest variables of the storage and the output flow: .. math:: - P_{o,invest} + P_{o,exist} = - (E_{invest} + E_{exist}) \cdot r_{cap,out} + & + P_{o,total}(p) = + E_{total}(p) \cdot r_{cap,out}\\ + & + \forall p \in \textrm{PERIODS} * :attr:`invest_relation_input_output is not None` Connect the invest variables of the input and the output flow: .. math:: - P_{i,invest} + P_{i,exist} = - (P_{o,invest} + P_{o,exist}) \cdot r_{in,out} + & + P_{i,total}(p) = + P_{o,total}(p) \cdot r_{in,out}\\ + & + \forall p \in \textrm{PERIODS} * :attr:`max_storage_level` Rule for upper bound constraint for the storage content: .. math:: - E(t) \leq E_{invest} \cdot c_{max}(t) + & + E(t) \leq E_{total}(p) \cdot c_{max}(t)\\ + & + \forall p, t \in \textrm{TIMEINDEX} * :attr:`min_storage_level` Rule for lower bound constraint for the storage content: - .. math:: E(t) \geq E_{invest} \cdot c_{min}(t) + .. math:: + & + E(t) \geq E_{total}(p) \cdot c_{min}(t)\\ + & + \forall p, t \in \textrm{TIMEINDEX} **Objective function** - The part of the objective function added by the investment storages - also depends on whether a convex or nonconvex + Objective terms for a standard model and a multi-period model differ + quite strongly. Besides, the part of the objective function added by the + investment storages also depends on whether a convex or nonconvex investment option is selected. The following parts of the objective function are created: + *Standard model* + + * :attr:`nonconvex = False` + + .. math:: + E_{invest}(0) \cdot c_{invest,var}(0) + + * :attr:`nonconvex = True` + + .. math:: + E_{invest}(0) \cdot c_{invest,var}(0) + + c_{invest,fix}(0) \cdot b_{invest}(0)\\ + + *Multi-period model* + * :attr:`nonconvex = False` .. math:: - E_{invest} \cdot c_{invest,var} + & + E_{invest}(p) \cdot A(c_{invest,var}(p), l, ir) \cdot l + \cdot DF^{-p}\\ + & + \forall p \in \textrm{PERIODS} * :attr:`nonconvex = True` .. math:: - E_{invest} \cdot c_{invest,var} - + c_{invest,fix} \cdot b_{invest}\\ + & + E_{invest}(p) \cdot A(c_{invest,var}(p), l, ir) \cdot l + \cdot DF^{-p} + c_{invest,fix}(p) \cdot b_{invest}(p)\\ + & + \forall p \in \textrm{PERIODS} + + * :attr:`fixed_costs` not None for investments + + .. math:: + & + \sum_{pp=year(p)}^{year(p)+l} + E_{invest}(p) \cdot c_{fixed}(pp) \cdot DF^{-pp}) + \cdot DF^{-p}\\ + & + \forall p \in \textrm{PERIODS} + + * :attr:`fixed_costs` not None for existing capacity + + .. math:: + \sum_{pp=0}^{l-a} E_{exist} \cdot c_{fixed}(pp) + \cdot DF^{-pp} + + + whereby: + + * :math:`A(c_{invest,var}(p), l, ir)` A is the annuity for + investment expenses :math:`c_{invest,var}(p)` lifetime :math:`l` and + interest rate :math:`ir` + * :math:`DF=(1+dr)` is the discount factor with discount rate math:`dr` + + The annuity hereby is: + + .. math:: + + A(c_{invest,var}(p), l, ir) = c_{invest,var}(p) \cdot + \frac {(1+i)^l \cdot i} {(1+i)^l - 1} \cdot + + It is retrieved, using oemof.tools.economics annuity function. The + interest rate is defined as a weighted average costs of capital (wacc) and + assumed constant over time. + + The overall summed cost expressions for all *InvestmentFlowBlock* objects + can be accessed by + + * :attr:`om.GenericInvestmentStorageBlock.investment_costs`, + * :attr:`om.GenericInvestmentStorageBlock.fixed_costs` and + * :attr:`om.GenericInvestmentStorageBlock.costs`. + + Their values after optimization can be retrieved by - The total value of all investment costs of all *InvestmentStorages* - can be retrieved calling - :meth:`om.GenericInvestmentStorageBlock.investment_costs.expr()`. + * :meth:`om.GenericInvestmentStorageBlock.investment_costs`, + * :attr:`om.GenericInvestmentStorageBlock.period_investment_costs` + (yielding a dict keyed by periods); note: this is not a Pyomo expression, + but calculated, + * :meth:`om.GenericInvestmentStorageBlock.fixed_costs` and + * :meth:`om.GenericInvestmentStorageBlock.costs`. .. csv-table:: List of Variables :header: "symbol", "attribute", "explanation" :widths: 1, 1, 1 - ":math:`P_i(t)`", ":attr:`flow[i[n], n, t]`", "Inflow of the storage" - ":math:`P_o(t)`", ":attr:`flow[n, o[n], t]`", "Outlfow of the storage" + ":math:`P_i(p, t)`", ":attr:`flow[i[n], n, p, t]`", "Inflow + of the storage" + ":math:`P_o(p, t)`", ":attr:`flow[n, o[n], p, t]`", "Outflow + of the storage" ":math:`E(t)`", ":attr:`storage_content[n, t]`", "Current storage content (current absolute stored energy)" - ":math:`E_{invest}`", ":attr:`invest[n, t]`", "Invested (nominal) + ":math:`E_{invest}(p)`", ":attr:`invest[n, p]`", "Invested (nominal) capacity of the storage" + ":math:`E_{old}(p)`", ":attr:`old[n, p]`", " + | Old (nominal) capacity of the storage + | to be decommissioned in period p" + ":math:`E_{old,exo}(p)`", ":attr:`old_exo[n, p]`", " + | Old (nominal) capacity of the storage + | to be decommissioned in period p + | which was exogenously given by :math:`E_{exist}`" + ":math:`E_{old,end}(p)`", ":attr:`old_end[n, p]`", " + | Old (nominal) capacity of the storage + | to be decommissioned in period p + | which was endogenously determined by :math:`E_{invest}(p_{comm})` + | whereby :math:`p_{comm}` is the commissioning period" ":math:`E(-1)`", ":attr:`init_cap[n]`", "Initial storage capacity (before timestep 0)" - ":math:`b_{invest}`", ":attr:`invest_status[i, o]`", "Binary variable - for the status of investment" - ":math:`P_{i,invest}`", ":attr:`InvestmentFlowBlock.invest[i[n], n]`", - "Invested (nominal) inflow (Investmentflow)" - ":math:`P_{o,invest}`", ":attr:`InvestmentFlowBlock.invest[n, o[n]]`", - "Invested (nominal) outflow (Investmentflow)" + ":math:`b_{invest}(p)`", ":attr:`invest_status[i, o, p]`", "Binary + variable for the status of investment" + ":math:`P_{i,invest}(p)`", " + :attr:`InvestmentFlowBlock.invest[i[n], n, p]`", " + Invested (nominal) inflow (InvestmentFlowBlock)" + ":math:`P_{o,invest}`", " + :attr:`InvestmentFlowBlock.invest[n, o[n]]`", " + Invested (nominal) outflow (InvestmentFlowBlock)" .. csv-table:: List of Parameters :header: "symbol", "attribute", "explanation" @@ -690,11 +1003,13 @@ class GenericInvestmentStorageBlock(ScalarBlock): ":math:`P_{i,exist}`", "`flows[i[n], n].investment.existing` ", "Existing inflow capacity" ":math:`P_{o,exist}`", "`flows[n, o[n]].investment.existing` - ", "Existing outlfow capacity" + ", "Existing outflow capacity" ":math:`c_{invest,var}`", "`flows[i, o].investment.ep_costs` ", "Variable investment costs" ":math:`c_{invest,fix}`", "`flows[i, o].investment.offset`", " Fix investment costs" + ":math:`c_{fixed}`", "`flows[i, o].investment.fixed_costs`", " + Fixed costs; only allowed in multi-period model" ":math:`r_{cap,in}`", ":attr:`invest_relation_input_capacity`", " Relation of storage capacity and nominal inflow" ":math:`r_{cap,out}`", ":attr:`invest_relation_output_capacity`", " @@ -711,12 +1026,18 @@ class GenericInvestmentStorageBlock(ScalarBlock): Conversion factor (i.e. efficiency) when storing energy" ":math:`\eta_o(t)`", "`outflow_conversion_factor[t]`", " Conversion factor when (i.e. efficiency) taking stored energy" - ":math:`c(-1)`", "`initial_storage_level`", "Initial relativ + ":math:`c(-1)`", "`initial_storage_level`", "Initial relative storage content (before timestep 0)" ":math:`c_{max}`", "`flows[i, o].max[t]`", "Normed maximum value of storage content" ":math:`c_{min}`", "`flows[i, o].min[t]`", "Normed minimum value of storage content" + ":math:`l`", "`flows[i, o].investment.lifetime`", " + Lifetime for investments in storage capacity" + ":math:`a`", "`flows[i, o].investment.age`", " + Initial age of existing capacity / energy" + ":math:`ir`", "`flows[i, o].investment.interest_rate`", " + interest rate for investment" ":math:`\tau(t)`", "", "Duration of time step" ":math:`t_u`", "", "Time unit of losses :math:`\beta(t)`, :math:`\gamma(t)`, :math:`\delta(t)` and timeincrement :math:`\tau(t)`" @@ -729,11 +1050,29 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def _create(self, group=None): - """ """ + """Create a storage block for investment modeling""" m = self.parent_block() if group is None: return None + # ########################## CHECKS ################################### + if m.es.periods is not None: + for n in group: + error_fixed_absolute_losses = ( + "For a multi-period investment model, fixed absolute" + " losses are not supported. Please remove parameter." + ) + if n.fixed_losses_absolute.default != 0: + raise ValueError(error_fixed_absolute_losses) + error_initial_storage_level = ( + "For a multi-period model, initial_storage_level is" + " not supported.\nIt needs to be removed since it" + " has no effect.\nstorage_content will be zero," + " until there is some usable storage capacity installed." + ) + if n.initial_storage_level is not None: + raise ValueError(error_initial_storage_level) + # ########################## SETS ##################################### self.INVESTSTORAGES = Set(initialize=[n for n in group]) @@ -793,93 +1132,345 @@ def _create(self, group=None): ] ) + self.OVERALL_MAXIMUM_INVESTSTORAGES = Set( + initialize=[ + n for n in group if n.investment.overall_maximum is not None + ] + ) + + self.OVERALL_MINIMUM_INVESTSTORAGES = Set( + initialize=[ + n for n in group if n.investment.overall_minimum is not None + ] + ) + + self.EXISTING_INVESTSTORAGES = Set( + initialize=[n for n in group if n.investment.existing is not None] + ) + # ######################### Variables ################################ self.storage_content = Var( self.INVESTSTORAGES, m.TIMESTEPS, within=NonNegativeReals ) - def _storage_investvar_bound_rule(block, n): + def _storage_investvar_bound_rule(block, n, p): """ Rule definition to bound the invested storage capacity `invest`. """ if n in self.CONVEX_INVESTSTORAGES: - return n.investment.minimum, n.investment.maximum + return n.investment.minimum[p], n.investment.maximum[p] elif n in self.NON_CONVEX_INVESTSTORAGES: - return 0, n.investment.maximum + return 0, n.investment.maximum[p] self.invest = Var( self.INVESTSTORAGES, + m.PERIODS, within=NonNegativeReals, bounds=_storage_investvar_bound_rule, ) - self.init_content = Var(self.INVESTSTORAGES, within=NonNegativeReals) + # Total capacity + self.total = Var( + self.INVESTSTORAGES, + m.PERIODS, + within=NonNegativeReals, + initialize=0, + ) + + if m.es.periods is not None: + # Old capacity to be decommissioned (due to lifetime) + self.old = Var( + self.INVESTSTORAGES, m.PERIODS, within=NonNegativeReals + ) + + # Old endogenous capacity to be decommissioned (due to lifetime) + self.old_end = Var( + self.INVESTSTORAGES, m.PERIODS, within=NonNegativeReals + ) + + # Old exogenous capacity to be decommissioned (due to lifetime) + self.old_exo = Var( + self.INVESTSTORAGES, m.PERIODS, within=NonNegativeReals + ) + + else: + self.init_content = Var( + self.INVESTSTORAGES, within=NonNegativeReals + ) # create status variable for a non-convex investment storage - self.invest_status = Var(self.NON_CONVEX_INVESTSTORAGES, within=Binary) + self.invest_status = Var( + self.NON_CONVEX_INVESTSTORAGES, m.PERIODS, within=Binary + ) # ######################### CONSTRAINTS ############################### i = {n: [i for i in n.inputs][0] for n in group} o = {n: [o for o in n.outputs][0] for n in group} - reduced_timesteps = [x for x in m.TIMESTEPS if x > 0] + reduced_periods_timesteps = [(p, t) for (p, t) in m.TIMEINDEX if t > 0] - def _inv_storage_init_content_max_rule(block, n): - """Constraint for a variable initial storage capacity.""" - return ( - block.init_content[n] - <= n.investment.existing + block.invest[n] - ) + # Handle unit lifetimes + def _total_storage_capacity_rule(block): + """Rule definition for determining total installed + capacity (taking decommissioning into account) + """ + for n in self.INVESTSTORAGES: + for p in m.PERIODS: + if p == 0: + expr = ( + self.total[n, p] + == self.invest[n, p] + n.investment.existing + ) + self.total_storage_rule.add((n, p), expr) + else: + expr = ( + self.total[n, p] + == self.invest[n, p] + + self.total[n, p - 1] + - self.old[n, p] + ) + self.total_storage_rule.add((n, p), expr) + + self.total_storage_rule = Constraint( + self.INVESTSTORAGES, m.PERIODS, noruleinit=True + ) - self.init_content_limit = Constraint( - self.INVESTSTORAGES_NO_INIT_CONTENT, - rule=_inv_storage_init_content_max_rule, + self.total_storage_rule_build = BuildAction( + rule=_total_storage_capacity_rule ) - def _inv_storage_init_content_fix_rule(block, n): - """Constraint for a fixed initial storage capacity.""" - return block.init_content[n] == n.initial_storage_level * ( - n.investment.existing + block.invest[n] + # multi-period storage implementation for time intervals + if m.es.periods is not None: + + def _old_storage_capacity_rule_end(block): + """Rule definition for determining old endogenously installed + capacity to be decommissioned due to reaching its lifetime. + Investment and decommissioning periods are linked within + the constraint. The respective decommissioning period is + determined for every investment period based on the components + lifetime and a matrix describing its age of each endogenous + investment. Decommissioning can only occur at the beginning of + each period. + + Note + ---- + For further information on the implementation check + PR#957 https://github.com/oemof/oemof-solph/pull/957 + """ + for n in self.INVESTSTORAGES: + lifetime = n.investment.lifetime + if lifetime is None: + msg = ( + "You have to specify a lifetime " + "for a Flow going into or out of " + "a GenericStorage unit " + "in a multi-period model!" + f" Value for {n} is missing." + ) + raise ValueError(msg) + # get the period matrix describing the temporal distance + # between all period combinations. + periods_matrix = m.es.periods_matrix + + # get the index of the minimum value in each row greater + # equal than the lifetime. This value equals the + # decommissioning period if not zero. The index of this + # value represents the investment period. If np.where + # condition is not met in any row, min value will be zero + decomm_periods = np.argmin( + np.where( + (periods_matrix >= lifetime), + periods_matrix, + np.inf, + ), + axis=1, + ) + + # no decommissioning in first period + expr = self.old_end[n, 0] == 0 + self.old_rule_end.add((n, 0), expr) + + # all periods not in decomm_periods have no decommissioning + # zero is excluded + for p in m.PERIODS: + if p not in decomm_periods and p != 0: + expr = self.old_end[n, p] == 0 + self.old_rule_end.add((n, p), expr) + + # multiple invests can be decommissioned in the same period + # but only sequential ones, thus a bookkeeping is + # introduced andconstraints are added to equation one + # iteration later. + last_decomm_p = np.nan + # loop over invest periods (values are decomm_periods) + for invest_p, decomm_p in enumerate(decomm_periods): + # Add constraint of iteration before + # (skipped in first iteration by last_decomm_p = nan) + if (decomm_p != last_decomm_p) and ( + last_decomm_p is not np.nan + ): + expr = self.old_end[n, last_decomm_p] == expr + self.old_rule_end.add((n, last_decomm_p), expr) + + # no decommissioning if decomm_p is zero + if decomm_p == 0: + # overwrite decomm_p with zero to avoid + # chaining invest periods in next iteration + last_decomm_p = 0 + + # if decomm_p is the same as the last one chain invest + # period + elif decomm_p == last_decomm_p: + expr += self.invest[n, invest_p] + # overwrite decomm_p + last_decomm_p = decomm_p + + # if decomm_p is not zero, not the same as the last one + # and it's not the first period + else: + expr = self.invest[n, invest_p] + # overwrite decomm_p + last_decomm_p = decomm_p + + # Add constraint of very last iteration + if last_decomm_p != 0: + expr = self.old_end[n, last_decomm_p] == expr + self.old_rule_end.add((n, last_decomm_p), expr) + + self.old_rule_end = Constraint( + self.INVESTSTORAGES, m.PERIODS, noruleinit=True ) - self.init_content_fix = Constraint( - self.INVESTSTORAGES_INIT_CONTENT, - rule=_inv_storage_init_content_fix_rule, - ) + self.old_rule_end_build = BuildAction( + rule=_old_storage_capacity_rule_end + ) - def _storage_balance_first_rule(block, n): - """ - Rule definition for the storage balance of every storage n for the - first time step. - """ - expr = 0 - expr += block.storage_content[n, 0] - expr += ( - -block.init_content[n] - * (1 - n.loss_rate[0]) ** m.timeincrement[0] + def _old_storage_capacity_rule_exo(block): + """Rule definition for determining old exogenously given + capacity to be decommissioned due to reaching its lifetime + """ + for n in self.INVESTSTORAGES: + age = n.investment.age + lifetime = n.investment.lifetime + is_decommissioned = False + for p in m.PERIODS: + # No shutdown in first period + if p == 0: + expr = self.old_exo[n, p] == 0 + self.old_rule_exo.add((n, p), expr) + elif lifetime - age <= m.es.periods_years[p]: + # Track decommissioning status + if not is_decommissioned: + expr = ( + self.old_exo[n, p] == n.investment.existing + ) + is_decommissioned = True + else: + expr = self.old_exo[n, p] == 0 + self.old_rule_exo.add((n, p), expr) + else: + expr = self.old_exo[n, p] == 0 + self.old_rule_exo.add((n, p), expr) + + self.old_rule_exo = Constraint( + self.INVESTSTORAGES, m.PERIODS, noruleinit=True ) - expr += ( - n.fixed_losses_relative[0] - * (n.investment.existing + self.invest[n]) - * m.timeincrement[0] + + self.old_rule_exo_build = BuildAction( + rule=_old_storage_capacity_rule_exo ) - expr += n.fixed_losses_absolute[0] * m.timeincrement[0] - expr += ( - -m.flow[i[n], n, 0] * n.inflow_conversion_factor[0] - ) * m.timeincrement[0] - expr += ( - m.flow[n, o[n], 0] / n.outflow_conversion_factor[0] - ) * m.timeincrement[0] - return expr == 0 - self.balance_first = Constraint( - self.INVESTSTORAGES, rule=_storage_balance_first_rule - ) + def _old_storage_capacity_rule(block): + """Rule definition for determining (overall) old capacity + to be decommissioned due to reaching its lifetime + """ + for n in self.INVESTSTORAGES: + for p in m.PERIODS: + expr = ( + self.old[n, p] + == self.old_end[n, p] + self.old_exo[n, p] + ) + self.old_rule.add((n, p), expr) + + self.old_rule = Constraint( + self.INVESTSTORAGES, m.PERIODS, noruleinit=True + ) + + self.old_rule_build = BuildAction(rule=_old_storage_capacity_rule) - def _storage_balance_rule(block, n, t): + def _initially_empty_rule(block): + """Ensure storage to be empty initially""" + for n in self.INVESTSTORAGES: + expr = self.storage_content[n, 0] == 0 + self.initially_empty.add((n, 0), expr) + + self.initially_empty = Constraint( + self.INVESTSTORAGES, m.TIMESTEPS, noruleinit=True + ) + + self.initially_empty_build = BuildAction( + rule=_initially_empty_rule + ) + + # Standard storage implementation for discrete time points + else: + + def _inv_storage_init_content_max_rule(block, n): + """Constraint for a variable initial storage capacity.""" + return ( + block.init_content[n] + <= n.investment.existing + block.invest[n, 0] + ) + + self.init_content_limit = Constraint( + self.INVESTSTORAGES_NO_INIT_CONTENT, + rule=_inv_storage_init_content_max_rule, + ) + + def _inv_storage_init_content_fix_rule(block, n): + """Constraint for a fixed initial storage capacity.""" + return block.init_content[n] == n.initial_storage_level * ( + n.investment.existing + block.invest[n, 0] + ) + + self.init_content_fix = Constraint( + self.INVESTSTORAGES_INIT_CONTENT, + rule=_inv_storage_init_content_fix_rule, + ) + + def _storage_balance_first_rule(block, n): + """ + Rule definition for the storage balance of every storage n + for the first time step. + """ + expr = 0 + expr += block.storage_content[n, 0] + expr += ( + -block.init_content[n] + * (1 - n.loss_rate[0]) ** m.timeincrement[0] + ) + expr += ( + n.fixed_losses_relative[0] + * (n.investment.existing + self.invest[n, 0]) + * m.timeincrement[0] + ) + expr += n.fixed_losses_absolute[0] * m.timeincrement[0] + expr += ( + -m.flow[i[n], n, 0, 0] * n.inflow_conversion_factor[0] + ) * m.timeincrement[0] + expr += ( + m.flow[n, o[n], 0, 0] / n.outflow_conversion_factor[0] + ) * m.timeincrement[0] + return expr == 0 + + self.balance_first = Constraint( + self.INVESTSTORAGES, rule=_storage_balance_first_rule + ) + + def _storage_balance_rule(block, n, p, t): """ - Rule definition for the storage balance of every storage n for the - every time step but the first. + Rule definition for the storage balance of every storage n + for every time step but the first. """ expr = 0 expr += block.storage_content[n, t] @@ -889,165 +1480,314 @@ def _storage_balance_rule(block, n, t): ) expr += ( n.fixed_losses_relative[t] - * (n.investment.existing + self.invest[n]) + * self.total[n, p] * m.timeincrement[t] ) expr += n.fixed_losses_absolute[t] * m.timeincrement[t] expr += ( - -m.flow[i[n], n, t] * n.inflow_conversion_factor[t] + -m.flow[i[n], n, p, t] * n.inflow_conversion_factor[t] ) * m.timeincrement[t] expr += ( - m.flow[n, o[n], t] / n.outflow_conversion_factor[t] + m.flow[n, o[n], p, t] / n.outflow_conversion_factor[t] ) * m.timeincrement[t] return expr == 0 self.balance = Constraint( - self.INVESTSTORAGES, reduced_timesteps, rule=_storage_balance_rule + self.INVESTSTORAGES, + reduced_periods_timesteps, + rule=_storage_balance_rule, ) - def _balanced_storage_rule(block, n): - return ( - block.storage_content[n, m.TIMESTEPS.at(-1)] - == block.init_content[n] - ) + if m.es.periods is None: - self.balanced_cstr = Constraint( - self.INVESTSTORAGES_BALANCED, rule=_balanced_storage_rule - ) + def _balanced_storage_rule(block, n): + return ( + block.storage_content[n, m.TIMESTEPS.at(-1)] + == block.init_content[n] + ) + + self.balanced_cstr = Constraint( + self.INVESTSTORAGES_BALANCED, rule=_balanced_storage_rule + ) - def _power_coupled(block, n): + def _power_coupled(block): """ Rule definition for constraint to connect the input power and output power """ - expr = ( - m.InvestmentFlowBlock.invest[n, o[n]] - + m.flows[n, o[n]].investment.existing - ) * n.invest_relation_input_output == ( - m.InvestmentFlowBlock.invest[i[n], n] - + m.flows[i[n], n].investment.existing - ) - return expr + for n in self.INVEST_REL_IN_OUT: + for p in m.PERIODS: + expr = ( + m.InvestmentFlowBlock.total[n, o[n], p] + ) * n.invest_relation_input_output == ( + m.InvestmentFlowBlock.total[i[n], n, p] + ) + self.power_coupled.add((n, p), expr) self.power_coupled = Constraint( - self.INVEST_REL_IN_OUT, rule=_power_coupled + self.INVEST_REL_IN_OUT, m.PERIODS, noruleinit=True ) - def _storage_capacity_inflow_invest_rule(block, n): + self.power_coupled_build = BuildAction(rule=_power_coupled) + + def _storage_capacity_inflow_invest_rule(block): """ Rule definition of constraint connecting the inflow `InvestmentFlowBlock.invest of storage with invested capacity `invest` by nominal_storage_capacity__inflow_ratio """ - expr = ( - m.InvestmentFlowBlock.invest[i[n], n] - + m.flows[i[n], n].investment.existing - ) == ( - n.investment.existing + self.invest[n] - ) * n.invest_relation_input_capacity - return expr + for n in self.INVEST_REL_CAP_IN: + for p in m.PERIODS: + expr = ( + m.InvestmentFlowBlock.total[i[n], n, p] + == self.total[n, p] * n.invest_relation_input_capacity + ) + self.storage_capacity_inflow.add((n, p), expr) self.storage_capacity_inflow = Constraint( - self.INVEST_REL_CAP_IN, rule=_storage_capacity_inflow_invest_rule + self.INVEST_REL_CAP_IN, m.PERIODS, noruleinit=True ) - def _storage_capacity_outflow_invest_rule(block, n): + self.storage_capacity_inflow_build = BuildAction( + rule=_storage_capacity_inflow_invest_rule + ) + + def _storage_capacity_outflow_invest_rule(block): """ Rule definition of constraint connecting outflow `InvestmentFlowBlock.invest` of storage and invested capacity `invest` by nominal_storage_capacity__outflow_ratio """ - expr = ( - m.InvestmentFlowBlock.invest[n, o[n]] - + m.flows[n, o[n]].investment.existing - ) == ( - n.investment.existing + self.invest[n] - ) * n.invest_relation_output_capacity - return expr + for n in self.INVEST_REL_CAP_OUT: + for p in m.PERIODS: + expr = ( + m.InvestmentFlowBlock.total[n, o[n], p] + == self.total[n, p] * n.invest_relation_output_capacity + ) + self.storage_capacity_outflow.add((n, p), expr) self.storage_capacity_outflow = Constraint( - self.INVEST_REL_CAP_OUT, rule=_storage_capacity_outflow_invest_rule + self.INVEST_REL_CAP_OUT, m.PERIODS, noruleinit=True + ) + + self.storage_capacity_outflow_build = BuildAction( + rule=_storage_capacity_outflow_invest_rule ) - def _max_storage_content_invest_rule(block, n, t): + def _max_storage_content_invest_rule(block, n, p, t): """ Rule definition for upper bound constraint for the storage content. """ expr = ( self.storage_content[n, t] - <= (n.investment.existing + self.invest[n]) - * n.max_storage_level[t] + <= self.total[n, p] * n.max_storage_level[t] ) return expr self.max_storage_content = Constraint( self.INVESTSTORAGES, - m.TIMESTEPS, + m.TIMEINDEX, rule=_max_storage_content_invest_rule, ) - def _min_storage_content_invest_rule(block, n, t): + def _min_storage_content_invest_rule(block, n, p, t): """ Rule definition of lower bound constraint for the storage content. """ expr = ( self.storage_content[n, t] - >= (n.investment.existing + self.invest[n]) - * n.min_storage_level[t] + >= self.total[n, p] * n.min_storage_level[t] ) return expr # Set the lower bound of the storage content if the attribute exists self.min_storage_content = Constraint( self.MIN_INVESTSTORAGES, - m.TIMESTEPS, + m.TIMEINDEX, rule=_min_storage_content_invest_rule, ) - def maximum_invest_limit(block, n): + def maximum_invest_limit(block, n, p): """ Constraint for the maximal investment in non convex investment storage. """ return ( - n.investment.maximum * self.invest_status[n] - self.invest[n] + n.investment.maximum[p] * self.invest_status[n, p] + - self.invest[n, p] ) >= 0 self.limit_max = Constraint( - self.NON_CONVEX_INVESTSTORAGES, rule=maximum_invest_limit + self.NON_CONVEX_INVESTSTORAGES, + m.PERIODS, + rule=maximum_invest_limit, ) - def smallest_invest(block, n): + def smallest_invest(block, n, p): """ Constraint for the minimal investment in non convex investment storage if the invest is greater than 0. So the invest variable can be either 0 or greater than the minimum. """ return ( - self.invest[n] - (n.investment.minimum * self.invest_status[n]) + self.invest[n, p] + - n.investment.minimum[p] * self.invest_status[n, p] >= 0 ) self.limit_min = Constraint( - self.NON_CONVEX_INVESTSTORAGES, rule=smallest_invest + self.NON_CONVEX_INVESTSTORAGES, m.PERIODS, rule=smallest_invest ) + if m.es.periods is not None: + + def _overall_storage_maximum_investflow_rule(block): + """Rule definition for maximum overall investment + in investment case. + """ + for n in self.OVERALL_MAXIMUM_INVESTSTORAGES: + for p in m.PERIODS: + expr = self.total[n, p] <= n.investment.overall_maximum + self.overall_storage_maximum.add((n, p), expr) + + self.overall_storage_maximum = Constraint( + self.OVERALL_MAXIMUM_INVESTSTORAGES, m.PERIODS, noruleinit=True + ) + + self.overall_maximum_build = BuildAction( + rule=_overall_storage_maximum_investflow_rule + ) + + def _overall_minimum_investflow_rule(block): + """Rule definition for minimum overall investment + in investment case. + + Note: This is only applicable for the last period + """ + for n in self.OVERALL_MINIMUM_INVESTSTORAGES: + expr = ( + n.investment.overall_minimum + <= self.total[n, m.PERIODS[-1]] + ) + self.overall_minimum.add(n, expr) + + self.overall_minimum = Constraint( + self.OVERALL_MINIMUM_INVESTSTORAGES, noruleinit=True + ) + + self.overall_minimum_build = BuildAction( + rule=_overall_minimum_investflow_rule + ) + def _objective_expression(self): - """Objective expression with fixed and investement costs.""" + """Objective expression with fixed and investment costs.""" + m = self.parent_block() + if not hasattr(self, "INVESTSTORAGES"): return 0 investment_costs = 0 + period_investment_costs = {p: 0 for p in m.PERIODS} + fixed_costs = 0 + + if m.es.periods is None: + for n in self.CONVEX_INVESTSTORAGES: + for p in m.PERIODS: + investment_costs += ( + self.invest[n, p] * n.investment.ep_costs[p] + ) + for n in self.NON_CONVEX_INVESTSTORAGES: + for p in m.PERIODS: + investment_costs += ( + self.invest[n, p] * n.investment.ep_costs[p] + + self.invest_status[n, p] * n.investment.offset[p] + ) - for n in self.CONVEX_INVESTSTORAGES: - investment_costs += self.invest[n] * n.investment.ep_costs - for n in self.NON_CONVEX_INVESTSTORAGES: - investment_costs += ( - self.invest[n] * n.investment.ep_costs - + self.invest_status[n] * n.investment.offset + else: + msg = ( + "You did not specify an interest rate.\n" + "It will be set equal to the discount_rate of {} " + "of the model as a default.\nThis corresponds to a " + "social planner point of view and does not reflect " + "microeconomic interest requirements." ) + + for n in self.CONVEX_INVESTSTORAGES: + lifetime = n.investment.lifetime + interest = n.investment.interest_rate + if interest == 0: + warn( + msg.format(m.discount_rate), + debugging.SuspiciousUsageWarning, + ) + interest = m.discount_rate + for p in m.PERIODS: + annuity = economics.annuity( + capex=n.investment.ep_costs[p], + n=lifetime, + wacc=interest, + ) + investment_costs_increment = ( + self.invest[n, p] + * annuity + * lifetime + * ((1 + m.discount_rate) ** (-m.es.periods_years[p])) + ) + investment_costs += investment_costs_increment + period_investment_costs[p] += investment_costs_increment + + for n in self.NON_CONVEX_INVESTSTORAGES: + lifetime = n.investment.lifetime + interest = n.investment.interest_rate + if interest == 0: + warn( + msg.format(m.discount_rate), + debugging.SuspiciousUsageWarning, + ) + interest = m.discount_rate + for p in m.PERIODS: + annuity = economics.annuity( + capex=n.investment.ep_costs[p], + n=lifetime, + wacc=interest, + ) + investment_costs_increment = ( + self.invest[n, p] * annuity * lifetime + + self.invest_status[n, p] * n.investment.offset[p] + ) * ((1 + m.discount_rate) ** (-m.es.periods_years[p])) + investment_costs += investment_costs_increment + period_investment_costs[p] += investment_costs_increment + + for n in self.INVESTSTORAGES: + if n.investment.fixed_costs[0] is not None: + lifetime = n.investment.lifetime + for p in m.PERIODS: + fixed_costs += sum( + self.invest[n, p] + * n.investment.fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range( + m.es.periods_years[p], + m.es.periods_years[p] + lifetime, + ) + ) * ((1 + m.discount_rate) ** (-m.es.periods_years[p])) + + for n in self.EXISTING_INVESTSTORAGES: + if n.investment.fixed_costs[0] is not None: + lifetime = n.investment.lifetime + age = n.investment.age + fixed_costs += sum( + n.investment.existing + * n.investment.fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range(0, lifetime - age) + ) + self.investment_costs = Expression(expr=investment_costs) + self.period_investment_costs = period_investment_costs + self.fixed_costs = Expression(expr=fixed_costs) + self.costs = Expression(expr=investment_costs + fixed_costs) - return investment_costs + return self.costs diff --git a/src/oemof/solph/components/experimental/_link.py b/src/oemof/solph/components/_link.py similarity index 66% rename from src/oemof/solph/components/experimental/_link.py rename to src/oemof/solph/components/_link.py index 251cb1465..e4b2c47f2 100644 --- a/src/oemof/solph/components/experimental/_link.py +++ b/src/oemof/solph/components/_link.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- """ -In-development component to add some intelligence -to connection between two Nodes. +Link to connect two Busses. SPDX-FileCopyrightText: Uwe Krien SPDX-FileCopyrightText: Simon Hilpert @@ -12,6 +11,7 @@ SPDX-FileCopyrightText: jakob-wo SPDX-FileCopyrightText: gplssm SPDX-FileCopyrightText: jnnr +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT @@ -25,26 +25,31 @@ from pyomo.environ import BuildAction from pyomo.environ import Constraint +from oemof.solph._helpers import warn_if_missing_attribute from oemof.solph._plumbing import sequence class Link(on.Transformer): - """A Link object with 1...2 inputs and 1...2 outputs. + """A Link object with 2 inputs and 2 outputs. Parameters ---------- + inputs : dict + Dictionary with inflows. Keys must be the starting node(s) of the + inflow(s). + outputs : dict + Dictionary with outflows. Keys must be the ending node(s) of the + outflow(s). conversion_factors : dict Dictionary containing conversion factors for conversion of each flow. Keys are the connected tuples (input, output) bus objects. The dictionary values can either be a scalar or an iterable with length of time horizon for simulation. - Note: This component is experimental. Use it with care. - Notes ----- The sets, variables, constraints and objective parts are created - * :py:class:`~oemof.solph.components.experimental._link.LinkBlock` + * :py:class:`~oemof.solph.components._link.LinkBlock` Examples -------- @@ -53,7 +58,7 @@ class Link(on.Transformer): >>> bel0 = solph.buses.Bus(label="el0") >>> bel1 = solph.buses.Bus(label="el1") - >>> link = solph.components.experimental.Link( + >>> link = solph.components.Link( ... label="transshipment_link", ... inputs={bel0: solph.flows.Flow(nominal_value=4), ... bel1: solph.flows.Flow(nominal_value=2)}, @@ -64,7 +69,7 @@ class Link(on.Transformer): [0.8, 0.9] >>> type(link) - + >>> sorted([str(i) for i in link.inputs]) ['el0', 'el1'] @@ -73,14 +78,34 @@ class Link(on.Transformer): 0.8 """ - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - + def __init__( + self, + label=None, + inputs=None, + outputs=None, + conversion_factors=None, + custom_attributes=None, + ): + if inputs is None: + warn_if_missing_attribute(self, "inputs") + inputs = {} + if outputs is None: + warn_if_missing_attribute(self, "outputs") + outputs = {} + if conversion_factors is None: + warn_if_missing_attribute(self, "conversion_factors") + conversion_factors = {} + if custom_attributes is None: + custom_attributes = {} + super().__init__( + label=label, + inputs=inputs, + outputs=outputs, + **custom_attributes, + ) self.conversion_factors = { - k: sequence(v) - for k, v in kwargs.get("conversion_factors", {}).items() + k: sequence(v) for k, v in conversion_factors.items() } - msg = ( "Component `Link` should have exactly " + "2 inputs, 2 outputs, and 2 " @@ -103,9 +128,7 @@ def constraint_group(self): class LinkBlock(ScalarBlock): r"""Block for the relation of nodes with type - :class:`~oemof.solph.components.experimental.Link` - - Note: This component is experimental. Use it with care. + :class:`~oemof.solph.components.Link` **The following constraints are created:** @@ -113,7 +136,8 @@ class LinkBlock(ScalarBlock): .. math:: & - (1) \qquad P_{\mathrm{in},n}(t) = c_n(t) \times P_{\mathrm{out},n}(t) + (1) \qquad P_{\mathrm{in},n}(p, t) = c_n(t) + \times P_{\mathrm{out},n}(p, t) \quad \forall t \in T, \forall n in {1,2} \\ & @@ -129,7 +153,7 @@ def _create(self, group=None): Parameters ---------- group : list - List of oemof.solph.components.experimental.Link objects for which + List of oemof.solph.components.Link objects for which the relation of inputs and outputs is createdBuildAction e.g. group = [link1, link2, link3, ...]. The components inside the list need to hold an attribute `conversion_factors` of type @@ -149,27 +173,27 @@ def _create(self, group=None): self.LINKS = Set(initialize=[g for g in group]) def _input_output_relation(block): - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for n, conversion in all_conversions.items(): for cidx, c in conversion.items(): try: expr = ( - m.flow[n, cidx[1], t] - == c[t] * m.flow[cidx[0], n, t] + m.flow[n, cidx[1], p, t] + == c[t] * m.flow[cidx[0], n, p, t] ) - except ValueError: - raise ValueError( - "Error in constraint creation", - "from: {0}, to: {1}, via: {2}".format( - cidx[0], cidx[1], n - ), + except KeyError: + raise KeyError( + "Error in constraint creation " + f"from: {cidx[0]}, to: {cidx[1]}, via: {n}. " + "Check if all connected buses match " + "the conversion factors.", ) - block.relation.add((n, cidx[0], cidx[1], t), (expr)) + block.relation.add((n, cidx[0], cidx[1], p, t), expr) self.relation = Constraint( [ - (n, cidx[0], cidx[1], t) - for t in m.TIMESTEPS + (n, cidx[0], cidx[1], p, t) + for p, t in m.TIMEINDEX for n, conversion in all_conversions.items() for cidx, c in conversion.items() ], diff --git a/src/oemof/solph/components/_offset_converter.py b/src/oemof/solph/components/_offset_converter.py new file mode 100644 index 000000000..d73165d6a --- /dev/null +++ b/src/oemof/solph/components/_offset_converter.py @@ -0,0 +1,272 @@ +# -*- coding: utf-8 - + +""" +OffsetConverter and associated individual constraints (blocks) and groupings. + +SPDX-FileCopyrightText: Uwe Krien +SPDX-FileCopyrightText: Simon Hilpert +SPDX-FileCopyrightText: Cord Kaldemeyer +SPDX-FileCopyrightText: Patrik Schönfeldt +SPDX-FileCopyrightText: FranziPl +SPDX-FileCopyrightText: jnnr +SPDX-FileCopyrightText: Stephan Günther +SPDX-FileCopyrightText: FabianTU +SPDX-FileCopyrightText: Johannes Röder +SPDX-FileCopyrightText: Saeed Sayadi +SPDX-FileCopyrightText: Johannes Kochems + +SPDX-License-Identifier: MIT + +""" + +from warnings import warn + +from oemof.network import network +from pyomo.core import BuildAction +from pyomo.core.base.block import ScalarBlock +from pyomo.environ import Constraint +from pyomo.environ import Set + +from oemof.solph._plumbing import sequence + + +class OffsetConverter(network.Transformer): + """An object with one input and one output and two coefficients to model + part load behaviour. + + Parameters + ---------- + coefficients : tuple, (:math:`C_0(t)`, :math:`C_1(t)`) + Tuple containing the first two polynomial coefficients + i.e. the y-intersection and slope of a linear equation. + The tuple values can either be a scalar or a sequence with length + of time horizon for simulation. + + Notes + ----- + The sets, variables, constraints and objective parts are created + * :py:class:`~oemof.solph.components._offset_converter.OffsetConverterBlock` + + Examples + -------- + >>> from oemof import solph + >>> bel = solph.buses.Bus(label='bel') + >>> bth = solph.buses.Bus(label='bth') + >>> ostf = solph.components.OffsetConverter( + ... label='ostf', + ... inputs={bel: solph.flows.Flow()}, + ... outputs={bth: solph.flows.Flow( + ... nominal_value=60, min=0.5, max=1.0, + ... nonconvex=solph.NonConvex())}, + ... coefficients=(20, 0.5)) + >>> type(ostf) + + """ # noqa: E501 + + def __init__( + self, + inputs, + outputs, + label=None, + coefficients=None, + custom_attributes=None, + ): + if custom_attributes is None: + custom_attributes = {} + super().__init__( + inputs=inputs, + outputs=outputs, + label=label, + **custom_attributes, + ) + + if coefficients is not None: + self.coefficients = tuple([sequence(i) for i in coefficients]) + if len(self.coefficients) != 2: + raise ValueError( + "Two coefficients or coefficient series have to be given." + ) + + # `OffsetConverter` always needs the `NonConvex` attribute, but the + # `Investment` attribute is optional. If it is used, the + # `InvestNonConvexFlow` will be used in the definition of constraints, + # otherwise, the `NonConvexFlow` will be used. + if len(self.outputs): + for v in self.outputs.values(): + if not v.nonconvex: + raise TypeError( + "Output flow must have the `NonConvex` attribute!" + ) + + # `Investment` and `NonConvex` attributes cannot be defined for the + # input flow. + if len(self.inputs): + for v in self.inputs.values(): + if v.investment: + raise TypeError( + "`Investment` attribute must be defined only for the " + + "output flow!" + ) + if v.nonconvex: + raise TypeError( + "`NonConvex` attribute must be defined only for the " + + "output flow!" + ) + + if len(self.inputs) > 1 or len(self.outputs) > 1: + raise ValueError( + "Component `OffsetConverter` must not have " + + "more than 1 input and 1 output!" + ) + + def constraint_group(self): + return OffsetConverterBlock + + +# --- BEGIN: To be removed for versions >= v0.6 --- +class OffsetTransformer(OffsetConverter): + def __init__( + self, + inputs, + outputs, + label=None, + coefficients=None, + custom_attributes=None, + ): + super().__init__( + label=label, + inputs=inputs, + outputs=outputs, + coefficients=coefficients, + custom_attributes=custom_attributes, + ) + warn( + "solph.components.OffsetTransformer has been renamed to" + " solph.components.OffsetConverter. The transitional wrapper" + " will be deleted in the future.", + FutureWarning, + ) + + +# --- END --- + + +class OffsetConverterBlock(ScalarBlock): + r"""Block for the relation of nodes with type + :class:`~oemof.solph.components._offset_converter.OffsetConverter` + + **The following constraints are created:** + + .. _OffsetConverter-equations: + + .. math:: + & + P_{in}(p, t) = C_1(t) \cdot P_{out}(p, t) + C_0(t) \cdot P_max(p) \cdot Y(t) \\ + + + The symbols used are defined as follows (with Variables (V) and Parameters (P)): + + +--------------------+------------------------+------+--------------------------------------------+ + | symbol | attribute | type | explanation | + +====================+========================+======+============================================+ + | :math:`P_{out}(t)` | `flow[n,o,p,t]` | V | Outflow of converter | + +--------------------+------------------------+------+--------------------------------------------+ + | :math:`P_{in}(t)` | `flow[i,n,p,t]` | V | Inflow of converter | + +--------------------+------------------------+------+--------------------------------------------+ + | :math:`Y(t)` | | V | Binary status variable of nonconvex inflow | + +--------------------+------------------------+------+--------------------------------------------+ + | :math:`P_{max}(t)` | | V | Maximum Outflow of converter | + +--------------------+------------------------+------+--------------------------------------------+ + | :math:`C_1(t)` | `coefficients[1][n,t]` | P | Linear coefficient 1 (slope) | + +--------------------+------------------------+------+--------------------------------------------+ + | :math:`C_0(t)` | `coefficients[0][n,t]` | P | Linear coefficient 0 (y-intersection) | + +--------------------+------------------------+------+--------------------------------------------+ + + Note that :math:`P_{max}(t) \cdot Y(t)` is merged into one variable, + called `status_nominal[n, o, p, t]`. + """ # noqa: E501 + CONSTRAINT_GROUP = True + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + def _create(self, group=None): + """Creates the relation for the class:`OffsetConverter`. + + Parameters + ---------- + group : list + List of oemof.solph.experimental.OffsetConverter objects for + which the relation of inputs and outputs is created + e.g. group = [ostf1, ostf2, ostf3, ...]. The components inside + the list need to hold an attribute `coefficients` of type dict + containing the conversion factors for all inputs to outputs. + """ + if group is None: + return None + + m = self.parent_block() + + self.OFFSETCONVERTERS = Set(initialize=[n for n in group]) + + in_flows = {n: [i for i in n.inputs.keys()] for n in group} + out_flows = {n: [o for o in n.outputs.keys()] for n in group} + + self.relation = Constraint( + [ + (n, i, o, p, t) + for p, t in m.TIMEINDEX + for n in group + for o in out_flows[n] + for i in in_flows[n] + ], + noruleinit=True, + ) + + def _relation_rule(block): + """Link binary input and output flow to component outflow.""" + for p, t in m.TIMEINDEX: + for n in group: + for o in out_flows[n]: + for i in in_flows[n]: + expr = 0 + expr += -m.flow[n, o, p, t] + expr += m.flow[i, n, p, t] * n.coefficients[1][t] + # `Y(t)` in the last term of the constraint + # (":math:`C_0(t) \cdot Y(t)`") is different for + # different cases. If both `Investment` and + # `NonConvex` attributes are used for the + # `OffsetConverter`, `Y(t)` would represent the + # `status_nominal[n,o,t]` in the + # `InvestNonConvexFlow`. But if only the + # `NonConvex` attribute is defined for the + # `OffsetConverter`, `Y(t)` would correspond to + # the `status_nominal[n,o,t]` in the + # `NonConvexFlow`. + try: + expr += ( + m.InvestNonConvexFlowBlock.status_nominal[ + n, o, t + ] + * n.coefficients[0][t] + ) + # `KeyError` occurs when more than one + # `OffsetConverter` is defined, and in some of + # them only the `NonConvex` attribute is + # considered, while in others both `NonConvex` + # and `Investment` attributes are defined. + # `AttributeError` only occurs when the + # `OffsetConverter` has only the `NonConvex` + # attribute, and therefore, + # `m.InvestNonConvexFlowBlock.status_nominal` + # (inside the `try` block) does not exist. + except (KeyError, AttributeError): + expr += ( + m.NonConvexFlowBlock.status_nominal[ + n, o, t + ] + * n.coefficients[0][t] + ) + block.relation.add((n, i, o, p, t), (expr == 0)) + + self.relation_build = BuildAction(rule=_relation_rule) diff --git a/src/oemof/solph/components/_offset_transformer.py b/src/oemof/solph/components/_offset_transformer.py deleted file mode 100644 index 40f159b23..000000000 --- a/src/oemof/solph/components/_offset_transformer.py +++ /dev/null @@ -1,174 +0,0 @@ -# -*- coding: utf-8 - - -""" -OffsetTransformer and associated individual constraints (blocks) and groupings. - -SPDX-FileCopyrightText: Uwe Krien -SPDX-FileCopyrightText: Simon Hilpert -SPDX-FileCopyrightText: Cord Kaldemeyer -SPDX-FileCopyrightText: Patrik Schönfeldt -SPDX-FileCopyrightText: FranziPl -SPDX-FileCopyrightText: jnnr -SPDX-FileCopyrightText: Stephan Günther -SPDX-FileCopyrightText: FabianTU -SPDX-FileCopyrightText: Johannes Röder - -SPDX-License-Identifier: MIT - -""" - -from oemof.network import network -from pyomo.core.base.block import ScalarBlock -from pyomo.environ import Constraint -from pyomo.environ import Set - -from oemof.solph._plumbing import sequence - - -class OffsetTransformer(network.Transformer): - """An object with one input and one output and two coefficients to model - part load behaviour. - - Parameters - ---------- - coefficients : tuple, (:math:`C_0(t)`, :math:`C_1(t)`) - Tuple containing the first two polynomial coefficients - i.e. the y-intersection and slope of a linear equation. - The tuple values can either be a scalar or a sequence with length - of time horizon for simulation. - - Notes - ----- - The sets, variables, constraints and objective parts are created - * :py:class:`~oemof.solph.components._offset_transformer.OffsetTransformerBlock` - - Examples - -------- - - >>> from oemof import solph - - >>> bel = solph.buses.Bus(label='bel') - >>> bth = solph.buses.Bus(label='bth') - - >>> ostf = solph.components.OffsetTransformer( - ... label='ostf', - ... inputs={bel: solph.flows.Flow( - ... nominal_value=60, min=0.5, max=1.0, - ... nonconvex=solph.NonConvex())}, - ... outputs={bth: solph.flows.Flow()}, - ... coefficients=(20, 0.5)) - - >>> type(ostf) - - """ # noqa: E501 - - def __init__( - self, - inputs, - outputs, - label=None, - coefficients=None, - custom_attributes=None, - ): - if custom_attributes is None: - custom_attributes = {} - super().__init__( - inputs=inputs, - outputs=outputs, - label=label, - **custom_attributes, - ) - - if coefficients is not None: - self.coefficients = tuple([sequence(i) for i in coefficients]) - if len(self.coefficients) != 2: - raise ValueError( - "Two coefficients or coefficient series have to be given." - ) - - if len(self.inputs) == 1: - for k, v in self.inputs.items(): - if not v.nonconvex: - raise TypeError( - "Input flows must have NonConvex attribute!" - ) - - if len(self.inputs) > 1 or len(self.outputs) > 1: - raise ValueError( - "Component `OffsetTransformer` must not have " - + "more than 1 input and 1 output!" - ) - - def constraint_group(self): - return OffsetTransformerBlock - - -class OffsetTransformerBlock(ScalarBlock): - r"""Block for the relation of nodes with type - :class:`~oemof.solph.components._offset_transformer.OffsetTransformer` - - **The following constraints are created:** - - .. _OffsetTransformer-equations: - - .. math:: - & - P_{out}(t) = C_1(t) \cdot P_{in}(t) + C_0(t) \cdot Y(t) \\ - - - The symbols used are defined as follows (with Variables (V) and Parameters (P)): - - +--------------------+------------------------+------+--------------------------------------------+ - | symbol | attribute | type | explanation | - +====================+========================+======+============================================+ - | :math:`P_{out}(t)` | `flow[n,o,t]` | V | Outflow of transformer | - +--------------------+------------------------+------+--------------------------------------------+ - | :math:`P_{in}(t)` | `flow[i,n,t]` | V | Inflow of transformer | - +--------------------+------------------------+------+--------------------------------------------+ - | :math:`Y(t)` | `status[i,n,t]` | V | Binary status variable of nonconvex inflow | - +--------------------+------------------------+------+--------------------------------------------+ - | :math:`C_1(t)` | `coefficients[1][n,t]` | P | Linear coefficient 1 (slope) | - +--------------------+------------------------+------+--------------------------------------------+ - | :math:`C_0(t)` | `coefficients[0][n,t]` | P | Linear coefficient 0 (y-intersection) | - +--------------------+------------------------+------+--------------------------------------------+ - """ # noqa: E501 - CONSTRAINT_GROUP = True - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - def _create(self, group=None): - """Creates the relation for the class:`OffsetTransformer`. - - Parameters - ---------- - group : list - List of oemof.solph.experimental.OffsetTransformer objects for - which the relation of inputs and outputs is created - e.g. group = [ostf1, ostf2, ostf3, ...]. The components inside - the list need to hold an attribute `coefficients` of type dict - containing the conversion factors for all inputs to outputs. - """ - if group is None: - return None - - m = self.parent_block() - - self.OFFSETTRANSFORMERS = Set(initialize=[n for n in group]) - - def _relation_rule(block, n, t): - """Link binary input and output flow to component outflow.""" - expr = 0 - expr += -m.flow[n, list(n.outputs.keys())[0], t] - expr += ( - m.flow[list(n.inputs.keys())[0], n, t] * n.coefficients[1][t] - ) - expr += ( - m.NonConvexFlowBlock.status[list(n.inputs.keys())[0], n, t] - * n.coefficients[0][t] - ) - return expr == 0 - - self.relation = Constraint( - self.OFFSETTRANSFORMERS, m.TIMESTEPS, rule=_relation_rule - ) diff --git a/src/oemof/solph/components/experimental/__init__.py b/src/oemof/solph/components/experimental/__init__.py index 64938d80e..a27c43915 100644 --- a/src/oemof/solph/components/experimental/__init__.py +++ b/src/oemof/solph/components/experimental/__init__.py @@ -8,13 +8,11 @@ """ from ._generic_caes import GenericCAES -from ._link import Link -from ._piecewise_linear_transformer import PiecewiseLinearTransformer +from ._piecewise_linear_converter import PiecewiseLinearConverter from ._sink_dsm import SinkDSM __all__ = [ "GenericCAES", - "Link", - "PiecewiseLinearTransformer", + "PiecewiseLinearConverter", "SinkDSM", ] diff --git a/src/oemof/solph/components/experimental/_generic_caes.py b/src/oemof/solph/components/experimental/_generic_caes.py index 58c859899..25948b5bc 100644 --- a/src/oemof/solph/components/experimental/_generic_caes.py +++ b/src/oemof/solph/components/experimental/_generic_caes.py @@ -305,13 +305,13 @@ class GenericCAESBlock(ScalarBlock): | Temporal efficiency | (loss factor to take intertemporal losses into account)" ":math:`electrical\_input`", " - `flow[list(n.electrical_input.keys())[0], n, t]`", "P", " + `flow[list(n.electrical_input.keys())[0], p, n, t]`", "P", " Electr. power input into compression" ":math:`electrical\_output`", " - `flow[n, list(n.electrical_output.keys())[0], t]`", "P", " + `flow[n, list(n.electrical_output.keys())[0], p, t]`", "P", " Electr. power output of expansion" ":math:`fuel\_input`", " - `flow[list(n.fuel_input.keys())[0], n, t]`", "P", "Heat input + `flow[list(n.fuel_input.keys())[0], n, p, t]`", "P", "Heat input (external) into Expansion" """ @@ -430,14 +430,14 @@ def _create(self, group=None): ) # Compression: Capacity on markets - def cmp_p_constr_rule(block, n, t): + def cmp_p_constr_rule(block, n, p, t): expr = 0 expr += -self.cmp_p[n, t] - expr += m.flow[list(n.electrical_input.keys())[0], n, t] + expr += m.flow[list(n.electrical_input.keys())[0], n, p, t] return expr == 0 self.cmp_p_constr = Constraint( - self.GENERICCAES, m.TIMESTEPS, rule=cmp_p_constr_rule + self.GENERICCAES, m.TIMEINDEX, rule=cmp_p_constr_rule ) # Compression: Max. capacity depending on cavern filling level @@ -520,14 +520,14 @@ def cmp_q_out_shr_constr_rule(block, n, t): ) # (10) Expansion: Capacity on markets - def exp_p_constr_rule(block, n, t): + def exp_p_constr_rule(block, n, p, t): expr = 0 expr += -self.exp_p[n, t] - expr += m.flow[n, list(n.electrical_output.keys())[0], t] + expr += m.flow[n, list(n.electrical_output.keys())[0], p, t] return expr == 0 self.exp_p_constr = Constraint( - self.GENERICCAES, m.TIMESTEPS, rule=exp_p_constr_rule + self.GENERICCAES, m.TIMEINDEX, rule=exp_p_constr_rule ) # (11-12) Expansion: Max. capacity depending on cavern filling level @@ -591,14 +591,14 @@ def exp_q_in_constr_rule(block, n, t): ) # (17) Expansion: Fuel allocation - def exp_q_fuel_constr_rule(block, n, t): + def exp_q_fuel_constr_rule(block, n, p, t): expr = 0 expr += -self.exp_q_fuel_in[n, t] - expr += m.flow[list(n.fuel_input.keys())[0], n, t] + expr += m.flow[list(n.fuel_input.keys())[0], n, p, t] return expr == 0 self.exp_q_fuel_constr = Constraint( - self.GENERICCAES, m.TIMESTEPS, rule=exp_q_fuel_constr_rule + self.GENERICCAES, m.TIMEINDEX, rule=exp_q_fuel_constr_rule ) # (18) Expansion: Definition of single heat flows diff --git a/src/oemof/solph/components/experimental/_piecewise_linear_transformer.py b/src/oemof/solph/components/experimental/_piecewise_linear_converter.py similarity index 77% rename from src/oemof/solph/components/experimental/_piecewise_linear_transformer.py rename to src/oemof/solph/components/experimental/_piecewise_linear_converter.py index da355becd..ebdf47349 100644 --- a/src/oemof/solph/components/experimental/_piecewise_linear_transformer.py +++ b/src/oemof/solph/components/experimental/_piecewise_linear_converter.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """ -In-development transfomer with piecewise linar efficiencies. +In-development Converter with piecewise linear efficiencies. SPDX-FileCopyrightText: Uwe Krien SPDX-FileCopyrightText: Simon Hilpert @@ -11,6 +11,7 @@ SPDX-FileCopyrightText: jakob-wo SPDX-FileCopyrightText: gplssm SPDX-FileCopyrightText: jnnr +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT @@ -25,8 +26,8 @@ from pyomo.environ import Var -class PiecewiseLinearTransformer(on.Transformer): - """Component to model a transformer with one input and one output +class PiecewiseLinearConverter(on.Transformer): + """Component to model an energy converter with one input and one output and an arbitrary piecewise linear conversion function. Parameters @@ -50,7 +51,7 @@ class PiecewiseLinearTransformer(on.Transformer): >>> b_gas = solph.buses.Bus(label='biogas') >>> b_el = solph.buses.Bus(label='electricity') - >>> pwltf = solph.components.experimental.PiecewiseLinearTransformer( + >>> pwltf = solph.components.experimental.PiecewiseLinearConverter( ... label='pwltf', ... inputs={b_gas: solph.flows.Flow( ... nominal_value=100, @@ -61,8 +62,8 @@ class PiecewiseLinearTransformer(on.Transformer): ... pw_repn='CC') >>> type(pwltf) - + """ def __init__(self, *args, **kwargs): @@ -74,7 +75,7 @@ def __init__(self, *args, **kwargs): if len(self.inputs) > 1 or len(self.outputs) > 1: raise ValueError( - "Component `PiecewiseLinearTransformer` cannot have " + "Component `PiecewiseLinearConverter` cannot have " + "more than 1 input and 1 output!" ) @@ -86,12 +87,12 @@ def __init__(self, *args, **kwargs): ) def constraint_group(self): - return PiecewiseLinearTransformerBlock + return PiecewiseLinearConverterBlock -class PiecewiseLinearTransformerBlock(ScalarBlock): +class PiecewiseLinearConverterBlock(ScalarBlock): r"""Block for the relation of nodes with type - :class:`~oemof.solph.components.experimental._piecewise_linear_transformer.PiecewiseLinearTransformer` + :class:`~oemof.solph.components.experimental._piecewise_linear_converter.PiecewiseLinearConverter` **The following constraints are created:** @@ -102,13 +103,13 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def _create(self, group=None): - """Creates the relation for the class:`PiecewiseLinearTransformer`. + """Creates the relation for the class:`PiecewiseLinearConverter`. Parameters ---------- group : list List of - oemof.solph.components.experimental.PiecewiseLinearTransformer + oemof.solph.components.experimental.PiecewiseLinearConverter objects for which the relation of inputs and outputs is created e.g. group = [pwltf1, pwltf2, pwltf3, ...]. @@ -118,14 +119,14 @@ def _create(self, group=None): m = self.parent_block() - self.PWLINEARTRANSFORMERS = Set(initialize=[n for n in group]) + self.PWLINEARCONVERTERS = Set(initialize=[n for n in group]) pw_repns = [n.pw_repn for n in group] if all(x == pw_repns[0] for x in pw_repns): self.pw_repn = pw_repns[0] else: print( - "Cannot different piecewise representations ", + "Cannot model different piecewise representations ", [n.pw_repn for n in group], ) @@ -136,7 +137,7 @@ def build_breakpoints(block, n): self.breakpoints[(n, t)] = n.in_breakpoints self.breakpoint_build = BuildAction( - self.PWLINEARTRANSFORMERS, rule=build_breakpoints + self.PWLINEARCONVERTERS, rule=build_breakpoints ) def _conversion_function(block, n, t, x): @@ -162,36 +163,36 @@ def get_outflow_bounds(model, n, t): return lower_bound_out[n], upper_bound_out[n] self.inflow = Var( - self.PWLINEARTRANSFORMERS, m.TIMESTEPS, bounds=get_inflow_bounds + self.PWLINEARCONVERTERS, m.TIMESTEPS, bounds=get_inflow_bounds ) self.outflow = Var( - self.PWLINEARTRANSFORMERS, m.TIMESTEPS, bounds=get_outflow_bounds + self.PWLINEARCONVERTERS, m.TIMESTEPS, bounds=get_outflow_bounds ) - def _in_equation(block, n, t): + def _in_equation(block, n, p, t): """Link binary input and output flow to component outflow.""" expr = 0 - expr += -m.flow[list(n.inputs.keys())[0], n, t] + expr += -m.flow[list(n.inputs.keys())[0], n, p, t] expr += self.inflow[n, t] return expr == 0 self.equate_in = Constraint( - self.PWLINEARTRANSFORMERS, m.TIMESTEPS, rule=_in_equation + self.PWLINEARCONVERTERS, m.TIMEINDEX, rule=_in_equation ) - def _out_equation(block, n, t): + def _out_equation(block, n, p, t): """Link binary input and output flow to component outflow.""" expr = 0 - expr += -m.flow[n, list(n.outputs.keys())[0], t] + expr += -m.flow[n, list(n.outputs.keys())[0], p, t] expr += self.outflow[n, t] return expr == 0 self.equate_out = Constraint( - self.PWLINEARTRANSFORMERS, m.TIMESTEPS, rule=_out_equation + self.PWLINEARCONVERTERS, m.TIMEINDEX, rule=_out_equation ) self.piecewise = Piecewise( - self.PWLINEARTRANSFORMERS, + self.PWLINEARCONVERTERS, m.TIMESTEPS, self.outflow, self.inflow, diff --git a/src/oemof/solph/components/experimental/_sink_dsm.py b/src/oemof/solph/components/experimental/_sink_dsm.py index 9a3e15ab4..eeda335aa 100644 --- a/src/oemof/solph/components/experimental/_sink_dsm.py +++ b/src/oemof/solph/components/experimental/_sink_dsm.py @@ -17,14 +17,17 @@ SPDX-FileCopyrightText: gplssm SPDX-FileCopyrightText: jnnr SPDX-FileCopyrightText: Julian Endres -SPDX-FileCopyrightText: Johannes Kochems (jokochems) +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT """ import itertools +from warnings import warn -from numpy import mean +import numpy as np +from oemof.tools import debugging +from oemof.tools import economics from pyomo.core.base.block import ScalarBlock from pyomo.environ import BuildAction from pyomo.environ import Constraint @@ -87,10 +90,10 @@ class SinkDSM(Sink): For investment modeling, it is advised to use the maximum of the demand timeseries and the cumulated (fixed) infeed time series for normalization, because the balancing potential may be determined by - both. Elsewhise, underinvestments may occur. - capacity_up: int or array + both. Else, underinvestments may occur. + capacity_up: int or iterable maximum DSM capacity that may be increased (normalized) - capacity_down: int or array + capacity_down: int or iterable maximum DSM capacity that may be reduced (normalized) approach: str, one of 'oemof', 'DIW', 'DLR' Choose one of the DSM modeling approaches. Read notes about which @@ -129,14 +132,15 @@ class SinkDSM(Sink): None. It's the interval in which between :math:`DSM_{t}^{up}` and :math:`DSM_{t}^{down}` have to be compensated. - delay_time: int - Only used when `approach` is set to "DIW" or "DLR". Otherwise, - can be None. + delay_time: int or iterable + Only used when :attr:`~approach` is set to "DIW" or "DLR". Otherwise, + can be None. Iterable only allowed in case approach "DLR" is used. Length of symmetrical time windows around :math:`t` in which :math:`DSM_{t}^{up}` and :math:`DSM_{t,tt}^{down}` have to be compensated. - Note: For approach 'DLR', an iterable is constructed in order - to model flexible delay times + Note: For approach 'DLR', if an integer is passed, + an iterable is constructed in order to model flexible delay times. + In case an iterable is passed, this will be used directly. shift_time: int Only used when `approach` is set to "DLR". Duration of a single upwards or downwards shift (half a shifting cycle @@ -145,26 +149,20 @@ class SinkDSM(Sink): Only used when `shed_eligibility` is set to True. Maximum length of a load shedding process at full capacity (used within energy limit constraint) - max_demand: numeric - Maximum demand prior to demand response + max_demand: numeric or iterable + Maximum demand prior to demand response (per period) max_capacity_down: numeric Maximum capacity eligible for downshifts - prior to demand response (used for dispatch mode) + prior to demand response (used only for dispatch mode) max_capacity_up: numeric Maximum capacity eligible for upshifts - prior to demand response (used for dispatch mode) - flex_share_down: float - Flexible share of installed capacity - eligible for downshifts (used for invest mode) - flex_share_up: float - Flexible share of installed capacity - eligible for upshifts (used for invest mode) - cost_dsm_up : int + prior to demand response (used only for dispatch mode) + cost_dsm_up : float Cost per unit of DSM activity that increases the demand - cost_dsm_down_shift : int + cost_dsm_down_shift : float Cost per unit of DSM activity that decreases the demand for load shifting - cost_dsm_down_shed : int + cost_dsm_down_shed : float Cost per unit of DSM activity that decreases the demand for load shedding efficiency : float @@ -213,16 +211,12 @@ class SinkDSM(Sink): shift_eligibility : boolean Boolean parameter indicating whether unit is eligible for load shifting + fixed_costs : numeric + Nominal value of fixed costs (per period) Note ---- - * When you set up a dispatch model, you have to specify `max_capacity_up`, - `max_capacity_down` and `max_demand`. Don't set `flex_share_up` - and `flex_share_down` which shall only used for investment modeling. - * When using the investment mode, you have to specify `flex_share_up` - and `flex_share_down` instead of `max_capacity_up`, - `max_capacity_down` and `max_demand`. * `method` has been renamed to `approach`. * As many constraints and dependencies are created in approach "DIW", computational cost might be high with a large `delay_time` and with model @@ -259,8 +253,6 @@ def __init__( max_demand=None, max_capacity_down=None, max_capacity_up=None, - flex_share_down=None, - flex_share_up=None, cost_dsm_up=0, cost_dsm_down_shift=0, cost_dsm_down_shed=0, @@ -276,6 +268,7 @@ def __init__( fixes=True, shed_eligibility=True, shift_eligibility=True, + fixed_costs=0, investment=None, custom_attributes=None, ): @@ -291,73 +284,29 @@ def __init__( self.approach = approach self.shift_interval = shift_interval if not approach == "DLR": + if approach == "DIW": + if not isinstance(delay_time, int): + raise ValueError( + "If approach 'DIW' is used, " + "delay time has to be of type int." + ) self.delay_time = delay_time else: - self.delay_time = [el for el in range(1, delay_time + 1)] + if isinstance(delay_time, int): + self.delay_time = [el for el in range(1, delay_time + 1)] + else: + self.delay_time = delay_time self.shift_time = shift_time self.shed_time = shed_time - - # Attributes are only needed if no investments occur self.max_capacity_down = max_capacity_down self.max_capacity_up = max_capacity_up - self.max_demand = max_demand - - # Attributes for investment modeling - if flex_share_down is not None: - if max_capacity_down is None and max_demand is None: - self.flex_share_down = flex_share_down - else: - e1 = ( - "Please determine either **flex_share_down " - "(investment modeling)\n or set " - "**max_demand and **max_capacity_down " - "(dispatch modeling).\n" - "Otherwise, overdetermination occurs." - ) - raise AttributeError(e1) - else: - if max_capacity_down is None or max_demand is None: - e2 = ( - "If you do not specify **flex_share_down\n" - "which should be used for investment modeling,\n" - "you have to specify **max_capacity_down " - "and **max_demand\n" - "instead which should be used for dispatch modeling." - ) - raise AttributeError(e2) - else: - self.flex_share_down = self.max_capacity_down / self.max_demand - - if flex_share_up is not None: - if max_capacity_up is None and max_demand is None: - self.flex_share_up = flex_share_up - else: - e3 = ( - "Please determine either flex_share_up " - "(investment modeling)\n or set " - "max_demand and max_capacity_up (dispatch modeling).\n" - "Otherwise, overdetermination occurs." - ) - raise AttributeError(e3) - else: - if max_capacity_up is None or max_demand is None: - e4 = ( - "If you do not specify **flex_share_up\n" - "which should be used for investment modeling,\n" - "you have to specify **max_capacity_up " - "and **max_demand\n" - "instead which should be used for dispatch modeling." - ) - raise AttributeError(e4) - else: - self.flex_share_up = self.max_capacity_up / self.max_demand - + self.max_demand = sequence(max_demand) self.cost_dsm_up = sequence(cost_dsm_up) self.cost_dsm_down_shift = sequence(cost_dsm_down_shift) self.cost_dsm_down_shed = sequence(cost_dsm_down_shed) self.efficiency = efficiency - self.capacity_down_mean = mean(capacity_down) - self.capacity_up_mean = mean(capacity_up) + self.capacity_down_mean = np.mean(capacity_down) + self.capacity_up_mean = np.mean(capacity_up) self.recovery_time_shift = recovery_time_shift self.recovery_time_shed = recovery_time_shed self.ActivateYearLimit = ActivateYearLimit @@ -369,68 +318,60 @@ def __init__( self.fixes = fixes self.shed_eligibility = shed_eligibility self.shift_eligibility = shift_eligibility + self.fixed_costs = sequence(fixed_costs) # Check whether investment mode is active or not self.investment = investment self._invest_group = isinstance(self.investment, Investment) if ( - self.max_demand is None - or self.max_capacity_up is None - or self.max_capacity_down is None + self.max_capacity_up is None or self.max_capacity_down is None ) and not self._invest_group: - e5 = ( - "If you are setting up a dispatch model, " - "you have to specify **max_demand**, **max_capacity_up** " - "and **max_capacity_down**.\n" - "The values you might have passed for **flex_share_up** " - "and **flex_share_down** will be ignored and only used in " - "an investment model." + e1 = ( + "If you are using the dispatch mode, " + "you have to specify `max_capacity_up` " + "and `max_capacity_down`." ) - raise AttributeError(e5) + raise AttributeError(e1) if self._invest_group: self._check_invest_attributes() def _check_invest_attributes(self): if ( - self.investment is not None - and ( - self.max_demand - or self.max_capacity_down - or self.max_capacity_up - ) - is not None - ): - e6 = ( - "If an investment object is defined, the invest variable " - "replaces the **max_demand, the **max_capacity_down " - "as well as\n" - "the **max_capacity_up values. Therefore, **max_demand,\n" - "**max_capacity_up and **max_capacity_down values should be " - "'None'.\n" + self.max_capacity_down or self.max_capacity_up + ) and self.investment is not None: + e2 = ( + "If you are using the investment mode, the invest variable " + "replaces the `max_capacity_down` " + "as well as the `max_capacity_up` values.\n" + "Therefore, `max_capacity_up` and `max_capacity_down` " + "values should be None (which is their default value)." ) - raise AttributeError(e6) + raise AttributeError(e2) def constraint_group(self): possible_approaches = ["DIW", "DLR", "oemof"] - if self.approach in [possible_approaches[0], possible_approaches[1]]: - if self.delay_time is None: + if not self.shed_eligibility and not self.shift_eligibility: + raise ValueError( + "At least one of shed_eligibility" + " and shift_eligibility must be True" + ) + if self.shed_eligibility: + if self.recovery_time_shed is None: raise ValueError( - "Please define: **delay_time" " is a mandatory parameter" + "If unit is eligible for load shedding," + " recovery_time_shed must be defined" ) - if not self.shed_eligibility and not self.shift_eligibility: + + if self.approach in [possible_approaches[0], possible_approaches[1]]: + if self.delay_time is None: raise ValueError( - "At least one of **shed_eligibility" - " and **shift_eligibility must be True" + f"Please define: delay_time.\n" + f"It is a mandatory parameter when using" + f" approach {self.approach}." ) - if self.shed_eligibility: - if self.recovery_time_shed is None: - raise ValueError( - "If unit is eligible for load shedding," - " **recovery_time_shed must be defined" - ) if self.approach == possible_approaches[0]: if self._invest_group is True: @@ -447,8 +388,9 @@ def constraint_group(self): elif self.approach == possible_approaches[2]: if self.shift_interval is None: raise ValueError( - "Please define: **shift_interval" - " is a mandatory parameter" + f"Please define: shift_interval.\n" + f"It is a mandatory parameter when using" + f" approach {self.approach}." ) if self._invest_group is True: return SinkDSMOemofInvestmentBlock @@ -511,8 +453,8 @@ class SinkDSMOemofBlock(ScalarBlock): **Table: Symbols and attribute names of variables and parameters** - .. table:: Variables (V) and Parameters (P) - :widths: 1, 1, 1, 1 + .. table:: Variables (V), Parameters (P) and Sets (S) + :widths: 25, 25, 10, 40 ================================= ======================== ==== ======================================= symbol attribute type explanation @@ -521,8 +463,8 @@ class SinkDSMOemofBlock(ScalarBlock): :math:`DSM_{t}^{do, shift}` `dsm_do_shift[g, t]` V DSM down shift (capacity shifted downwards) :math:`DSM_{t}^{do, shed}` `dsm_do_shed[g, t]` V DSM shedded (capacity shedded, i.e. not compensated for) :math:`\dot{E}_{t}` `SinkDSM.inputs` V Energy flowing in from (electrical) inflow bus - :math:`demand_{t}` `demand[t]` P (Electrical) demand series (normalized) - :math:`demand_{max}` `max_demand` P Maximum demand value + :math:`demand_{t}` `demand[t]` P (Electrical) demand series before shifting (normalized) + :math:`demand_{max}(p)` `max_demand` P Maximum demand value in period p :math:`E_{t}^{do}` `capacity_down[t]` P | Capacity allowed for a load adjustment downwards | (normalized; shifting + shedding) :math:`E_{t}^{up}` `capacity_up[t]` P Capacity allowed for a shift upwards (normalized) @@ -532,7 +474,7 @@ class SinkDSMOemofBlock(ScalarBlock): :math:`\tau` `shift_interval` P | interval (time within which the | energy balance must be levelled out) :math:`\eta` `efficiency` P Efficiency for load shifting processes - :math:`\mathbb{T}` P Time steps of the model + :math:`\mathbb{T}` S Time steps of the model :math:`e_{shift}` `shift_eligibility` P | Boolean parameter indicating if unit can be used | for load shifting :math:`e_{shed}` `shed_eligibility` P | Boolean parameter indicating if unit can be used @@ -611,24 +553,24 @@ def _input_output_relation_rule(block): The actual demand after DSM. Generator Production == Demand_el +- DSM """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # Inflow from bus - lhs = m.flow[g.inflow, g, t] + lhs = m.flow[g.inflow, g, p, t] # Demand + DSM_up - DSM_down rhs = ( - g.demand[t] * g.max_demand + g.demand[t] * g.max_demand[p] + self.dsm_up[g, t] - self.dsm_do_shift[g, t] - self.dsm_do_shed[g, t] ) # add constraint - block.input_output_relation.add((g, t), (lhs == rhs)) + block.input_output_relation.add((g, p, t), (lhs == rhs)) self.input_output_relation = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.input_output_relation_build = BuildAction( rule=_input_output_relation_rule @@ -684,12 +626,12 @@ def dsm_sum_constraint_rule(block): """ for g in group: intervals = range( - m.TIMESTEPS[1], m.TIMESTEPS[-1], g.shift_interval + m.TIMESTEPS.at(1), m.TIMESTEPS.at(-1), g.shift_interval ) for interval in intervals: - if (interval + g.shift_interval - 1) > m.TIMESTEPS[-1]: - timesteps = range(interval, m.TIMESTEPS[-1] + 1) + if (interval + g.shift_interval - 1) > m.TIMESTEPS.at(-1): + timesteps = range(interval, m.TIMESTEPS.at(-1) + 1) else: timesteps = range( interval, interval + g.shift_interval @@ -718,23 +660,53 @@ def _objective_expression(self): m = self.parent_block() - dsm_cost = 0 + variable_costs = 0 + fixed_costs = 0 + + if m.es.periods is None: + for t in m.TIMESTEPS: + for g in self.dsm: + variable_costs += ( + self.dsm_up[g, t] + * g.cost_dsm_up[t] + * m.objective_weighting[t] + ) + variable_costs += ( + self.dsm_do_shift[g, t] * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) * m.objective_weighting[t] - for t in m.TIMESTEPS: + else: for g in self.dsm: - dsm_cost += ( - self.dsm_up[g, t] - * g.cost_dsm_up[t] - * m.objective_weighting[t] - ) - dsm_cost += ( - self.dsm_do_shift[g, t] * g.cost_dsm_down_shift[t] - + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] - ) * m.objective_weighting[t] + for p, t in m.TIMEINDEX: + variable_costs += ( + self.dsm_up[g, t] + * m.objective_weighting[t] + * g.cost_dsm_up[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + variable_costs += ( + ( + self.dsm_do_shift[g, t] * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) - self.cost = Expression(expr=dsm_cost) + if g.fixed_costs[0] is not None: + for p in m.PERIODS: + fixed_costs += ( + max(g.max_capacity_up, g.max_capacity_down) + * g.fixed_costs[p] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + + self.variable_costs = Expression(expr=variable_costs) + self.fixed_costs = Expression(expr=fixed_costs) + self.costs = Expression(expr=variable_costs + fixed_costs) - return self.cost + return self.costs class SinkDSMOemofInvestmentBlock(ScalarBlock): @@ -748,7 +720,8 @@ class SinkDSMOemofInvestmentBlock(ScalarBlock): .. math:: & - (1) \quad invest_{min} \leq invest \leq invest_{max} \\ + (1) \quad invest_{min}(p) \leq invest(p) \leq invest_{max}(p) \\ + & \quad \quad \quad \quad \forall p \in \mathbb{P} & \\ & (2) \quad DSM_{t}^{up} = 0 \\ @@ -761,19 +734,19 @@ class SinkDSMOemofInvestmentBlock(ScalarBlock): \quad \textrm{if} \quad e_{shed} = \textrm{False} \\ & \\ & - (4) \quad \dot{E}_{t} = demand_{t} \cdot (invest + E_{exist}) - + DSM_{t}^{up} - DSM_{t}^{do, shift} - DSM_{t}^{do, shed} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + (4) \quad \dot{E}_{t} = demand_{t} \cdot demand_{max}(p) + + DSM_{t}^{up} + - DSM_{t}^{do, shift} - DSM_{t}^{do, shed} \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & - (5) \quad DSM_{t}^{up} \leq E_{t}^{up} \cdot (invest + E_{exist}) - \cdot s_{flex, up} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + (5) \quad DSM_{t}^{up} \leq E_{t}^{up} \cdot P_{total}(p) \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & (6) \quad DSM_{t}^{do, shift} + DSM_{t}^{do, shed} \leq - E_{t}^{do} \cdot (invest + E_{exist}) \cdot s_{flex, do} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + E_{t}^{do} \cdot P_{total}(p) \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & (7) \quad \sum_{t=t_s}^{t_s+\tau} DSM_{t}^{up} \cdot \eta = @@ -781,27 +754,73 @@ class SinkDSMOemofInvestmentBlock(ScalarBlock): & \quad \quad \quad \quad \forall t_s \in \{k \in \mathbb{T} \mid k \mod \tau = 0\} \\ + **The following parts of the objective function are created:** - * Investment annuity: + *Standard model* - .. math:: - & - invest \cdot costs_{invest} \\ + * Investment annuity: - * Variable costs: + .. math:: + P_{invest}(0) \cdot c_{invest}(0) - .. math:: - & - (DSM_{t}^{up} \cdot cost_{t}^{dsm, up} - + DSM_{t}^{do, shift} \cdot cost_{t}^{dsm, do, shift} - + DSM_{t}^{do, shed} \cdot cost_{t}^{dsm, do, shed}) - \cdot \omega_{t} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + * Variable costs: + + .. math:: + & + (DSM_{t}^{up} \cdot cost_{t}^{dsm, up} + + DSM_{t}^{do, shift} \cdot cost_{t}^{dsm, do, shift} \\ + & + DSM_{t}^{do, shed} \cdot cost_{t}^{dsm, do, shed}) + \cdot \omega_{t} \\ + & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + + *Multi-period model* + + * Investment annuity: + + .. math:: + & + P_{invest}(p) \cdot A(c_{invest}(p), l, ir) \cdot l + \cdot DF^{-p} \\ + &\\ + & + \forall p \in \mathbb{P} + + * :attr:`fixed_costs` not None for investments + + .. math:: + & + (\sum_{pp=year(p)}^{year(p)+l} + P_{invest}(p) \cdot c_{fixed}(pp) \cdot DF^{-pp}) + \cdot DF^{-p} \\ + &\\ + & + \forall p \in \mathbb{P} + + * Variable costs: + + .. math:: + & + (DSM_{t}^{up} \cdot cost_{t}^{dsm, up} + + DSM_{t}^{do, shift} \cdot cost_{t}^{dsm, do, shift} \\ + & + DSM_{t}^{do, shed} \cdot cost_{t}^{dsm, do, shed}) + \cdot \omega_{t} + \cdot DF^{-p} \\ + & \quad \quad \quad \quad + \forall p, t \in \textrm{TIMEINDEX} \\ + + whereby: + + * :math:`A(c_{invest,var}(p), l, ir)` A is the annuity for + investment expenses :math:`c_{invest}(p)` lifetime :math:`l` + and interest rate :math:`ir` + * :math:`DF=(1+dr)` is the discount factor with discount rate + :math:`dr` See remarks in :class:`oemof.solph.components.experimental._sink_dsm.SinkDSMOemofBlock`. + **Symbols and attribute names of variables and parameters** * Please refer to @@ -810,21 +829,21 @@ class SinkDSMOemofInvestmentBlock(ScalarBlock): * The following variables and parameters are exclusively used for investment modeling: - .. table:: Variables (V) and Parameters (P) - :widths: 1, 1, 1, 1 + .. table:: Variables (V), Parameters (P) and Sets (S) + :widths: 25, 25, 10, 40 ================================= ======================== ==== ======================================= symbol attribute type explanation ================================= ======================== ==== ======================================= - :math:`invest` `invest` V | DSM capacity invested in - | Equals to the additionally installed capacity. - | The capacity share eligible for a shift is determined by flex share(s). - :math:`invest_{min}` `investment.minimum` P minimum investment - :math:`invest_{max}` `investment.maximum` P maximum investment - :math:`E_{exist}` `investment.existing` P existing DSM capacity - :math:`s_{flex, up}` `flex_share_up` P share of invested capacity that may be shift upwards at maximum - :math:`s_{flex, do}` `flex_share_do` P share of invested capacity that may be shift downwards at maximum - :math:`costs_{invest}` `investment.ep_costs` P specific investment annuity + :math:`P_{invest}(p)` `invest[p]` V | DSM capacity invested into in period p. + | Equals to the additionally shiftable resp. sheddable capacity. + :math:`invest_{min}(p)` `investment.minimum[p]` P minimum investment in period p + :math:`invest_{max}(p)` `investment.maximum[p]` P maximum investment in period p + :math:`P_{total}` `investment.total[p]` P total DSM capacity + :math:`costs_{invest}(p)` `investment.ep_costs[p]` P | specific investment annuity (standard model) resp. + | specific investment expenses (multi-period model) + :math:`\mathbb{P}` S Periods of the model + :math:`\textrm{TIMEINDEX}` S Timeindex set of the model (periods, timesteps) ================================= ======================== ==== ======================================= """ # noqa: E501 @@ -848,22 +867,56 @@ def _create(self, group=None): # Set of DSM Components self.investdsm = Set(initialize=[n for n in group]) + self.OVERALL_MAXIMUM_INVESTDSM = Set( + initialize=[ + g for g in group if g.investment.overall_maximum is not None + ] + ) + + self.OVERALL_MINIMUM_INVESTDSM = Set( + initialize=[ + g for g in group if g.investment.overall_minimum is not None + ] + ) + + self.EXISTING_INVESTDSM = Set( + initialize=[g for g in group if g.investment.existing is not None] + ) + # ************* VARIABLES ***************************** # Define bounds for investments in demand response - def _dsm_investvar_bound_rule(block, g): + def _dsm_investvar_bound_rule(block, g, p): """Rule definition to bound the invested demand response capacity `invest`. """ - return g.investment.minimum, g.investment.maximum + return g.investment.minimum[p], g.investment.maximum[p] # Investment in DR capacity self.invest = Var( self.investdsm, + m.PERIODS, within=NonNegativeReals, bounds=_dsm_investvar_bound_rule, ) + # Total capacity + self.total = Var(self.investdsm, m.PERIODS, within=NonNegativeReals) + + if m.es.periods is not None: + # Old capacity to be decommissioned (due to lifetime) + self.old = Var(self.investdsm, m.PERIODS, within=NonNegativeReals) + + # Old endogenous capacity to be decommissioned (due to lifetime) + self.old_end = Var( + self.investdsm, m.PERIODS, within=NonNegativeReals + ) + + # Old exogenous capacity to be decommissioned (due to lifetime) + self.old_exo = Var( + self.investdsm, m.PERIODS, within=NonNegativeReals + ) + # Variable load shift down self.dsm_do_shift = Var( self.investdsm, m.TIMESTEPS, initialize=0, within=NonNegativeReals @@ -881,6 +934,185 @@ def _dsm_investvar_bound_rule(block, g): # ************* CONSTRAINTS ***************************** + # Handle unit lifetimes + def _total_dsm_capacity_rule(block): + """Rule definition for determining total installed + capacity (taking decommissioning into account) + """ + for g in group: + for p in m.PERIODS: + if p == 0: + expr = ( + self.total[g, p] + == self.invest[g, p] + g.investment.existing + ) + self.total_dsm_rule.add((g, p), expr) + else: + expr = ( + self.total[g, p] + == self.invest[g, p] + + self.total[g, p - 1] + - self.old[g, p] + ) + self.total_dsm_rule.add((g, p), expr) + + self.total_dsm_rule = Constraint(group, m.PERIODS, noruleinit=True) + self.total_dsm_rule_build = BuildAction(rule=_total_dsm_capacity_rule) + + if m.es.periods is not None: + + def _old_dsm_capacity_rule_end(block): + """Rule definition for determining old endogenously installed + capacity to be decommissioned due to reaching its lifetime. + Investment and decommissioning periods are linked within + the constraint. The respective decommissioning period is + determined for every investment period based on the components + lifetime and a matrix describing its age of each endogenous + investment. Decommissioning can only occur at the beginning of + each period. + + Note + ---- + For further information on the implementation check + PR#957 https://github.com/oemof/oemof-solph/pull/957 + """ + for g in group: + lifetime = g.investment.lifetime + if lifetime is None: + msg = ( + "You have to specify a lifetime " + "for a Flow with an associated " + "investment object in " + f"a multi-period model! Value for {(g)} " + "is missing." + ) + raise ValueError(msg) + + # get the period matrix describing the temporal distance + # between all period combinations. + periods_matrix = m.es.periods_matrix + + # get the index of the minimum value in each row greater + # equal than the lifetime. This value equals the + # decommissioning period if not zero. The index of this + # value represents the investment period. If np.where + # condition is not met in any row, min value will be zero + decomm_periods = np.argmin( + np.where( + (periods_matrix >= lifetime), + periods_matrix, + np.inf, + ), + axis=1, + ) + + # no decommissioning in first period + expr = self.old_end[g, 0] == 0 + self.old_dsm_rule_end.add((g, 0), expr) + + # all periods not in decomm_periods have no decommissioning + # zero is excluded + for p in m.PERIODS: + if p not in decomm_periods and p != 0: + expr = self.old_end[g, p] == 0 + self.old_dsm_rule_end.add((g, p), expr) + + # multiple invests can be decommissioned in the same period + # but only sequential ones, thus a bookkeeping is + # introduced andconstraints are added to equation one + # iteration later. + last_decomm_p = np.nan + # loop over invest periods (values are decomm_periods) + for invest_p, decomm_p in enumerate(decomm_periods): + # Add constraint of iteration before + # (skipped in first iteration by last_decomm_p = nan) + if (decomm_p != last_decomm_p) and ( + last_decomm_p is not np.nan + ): + expr = self.old_end[g, last_decomm_p] == expr + self.old_dsm_rule_end.add((g, last_decomm_p), expr) + + # no decommissioning if decomm_p is zero + if decomm_p == 0: + # overwrite decomm_p with zero to avoid + # chaining invest periods in next iteration + last_decomm_p = 0 + + # if decomm_p is the same as the last one chain invest + # period + elif decomm_p == last_decomm_p: + expr += self.invest[g, invest_p] + # overwrite decomm_p + last_decomm_p = decomm_p + + # if decomm_p is not zero, not the same as the last one + # and it's not the first period + else: + expr = self.invest[g, invest_p] + # overwrite decomm_p + last_decomm_p = decomm_p + + # Add constraint of very last iteration + if last_decomm_p != 0: + expr = self.old_end[g, last_decomm_p] == expr + self.old_dsm_rule_end.add((g, last_decomm_p), expr) + + self.old_dsm_rule_end = Constraint( + group, m.PERIODS, noruleinit=True + ) + self.old_dsm_rule_end_build = BuildAction( + rule=_old_dsm_capacity_rule_end + ) + + def _old_dsm_capacity_rule_exo(block): + """Rule definition for determining old exogenously given + capacity to be decommissioned due to reaching its lifetime + """ + for g in group: + age = g.investment.age + lifetime = g.investment.lifetime + is_decommissioned = False + for p in m.PERIODS: + # No shutdown in first period + if p == 0: + expr = self.old_exo[g, p] == 0 + self.old_dsm_rule_exo.add((g, p), expr) + elif lifetime - age <= m.es.periods_years[p]: + # Track decommissioning status + if not is_decommissioned: + expr = ( + self.old_exo[g, p] == g.investment.existing + ) + is_decommissioned = True + else: + expr = self.old_exo[g, p] == 0 + self.old_dsm_rule_exo.add((g, p), expr) + else: + expr = self.old_exo[g, p] == 0 + self.old_dsm_rule_exo.add((g, p), expr) + + self.old_dsm_rule_exo = Constraint( + group, m.PERIODS, noruleinit=True + ) + self.old_dsm_rule_exo_build = BuildAction( + rule=_old_dsm_capacity_rule_exo + ) + + def _old_dsm_capacity_rule(block): + """Rule definition for determining (overall) old capacity + to be decommissioned due to reaching its lifetime + """ + for g in group: + for p in m.PERIODS: + expr = ( + self.old[g, p] + == self.old_end[g, p] + self.old_exo[g, p] + ) + self.old_dsm_rule.add((g, p), expr) + + self.old_dsm_rule = Constraint(group, m.PERIODS, noruleinit=True) + self.old_dsm_rule_build = BuildAction(rule=_old_dsm_capacity_rule) + def _shift_shed_vars_rule(block): """Force shifting resp. shedding variables to zero dependent on how boolean parameters for shift resp. shed eligibility @@ -909,24 +1141,24 @@ def _input_output_relation_rule(block): The actual demand after DSM. Generator Production == Demand_el +- DSM """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # Inflow from bus - lhs = m.flow[g.inflow, g, t] + lhs = m.flow[g.inflow, g, p, t] # Demand + DSM_up - DSM_down rhs = ( - g.demand[t] * (self.invest[g] + g.investment.existing) + g.demand[t] * g.max_demand[p] + self.dsm_up[g, t] - self.dsm_do_shift[g, t] - self.dsm_do_shed[g, t] ) # add constraint - block.input_output_relation.add((g, t), (lhs == rhs)) + block.input_output_relation.add((g, p, t), (lhs == rhs)) self.input_output_relation = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.input_output_relation_build = BuildAction( rule=_input_output_relation_rule @@ -937,22 +1169,18 @@ def dsm_up_constraint_rule(block): """Realised upward load shift at time t has to be smaller than upward DSM capacity at time t. """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # DSM up lhs = self.dsm_up[g, t] # Capacity dsm_up - rhs = ( - g.capacity_up[t] - * (self.invest[g] + g.investment.existing) - * g.flex_share_up - ) + rhs = g.capacity_up[t] * self.total[g, p] # add constraint - block.dsm_up_constraint.add((g, t), (lhs <= rhs)) + block.dsm_up_constraint.add((g, p, t), (lhs <= rhs)) self.dsm_up_constraint = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.dsm_up_constraint_build = BuildAction(rule=dsm_up_constraint_rule) @@ -961,22 +1189,18 @@ def dsm_down_constraint_rule(block): """Realised downward load shift at time t has to be smaller than downward DSM capacity at time t. """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # DSM down lhs = self.dsm_do_shift[g, t] + self.dsm_do_shed[g, t] # Capacity dsm_down - rhs = ( - g.capacity_down[t] - * (self.invest[g] + g.investment.existing) - * g.flex_share_down - ) + rhs = g.capacity_down[t] * self.total[g, p] # add constraint - block.dsm_down_constraint.add((g, t), (lhs <= rhs)) + block.dsm_down_constraint.add((g, p, t), (lhs <= rhs)) self.dsm_down_constraint = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.dsm_down_constraint_build = BuildAction( rule=dsm_down_constraint_rule @@ -990,12 +1214,12 @@ def dsm_sum_constraint_rule(block): """ for g in group: intervals = range( - m.TIMESTEPS[1], m.TIMESTEPS[-1], g.shift_interval + m.TIMESTEPS.at(1), m.TIMESTEPS.at(-1), g.shift_interval ) for interval in intervals: - if (interval + g.shift_interval - 1) > m.TIMESTEPS[-1]: - timesteps = range(interval, m.TIMESTEPS[-1] + 1) + if (interval + g.shift_interval - 1) > m.TIMESTEPS.at(-1): + timesteps = range(interval, m.TIMESTEPS.at(-1) + 1) else: timesteps = range( interval, interval + g.shift_interval @@ -1019,33 +1243,163 @@ def dsm_sum_constraint_rule(block): rule=dsm_sum_constraint_rule ) + if m.es.periods is not None: + + def _overall_dsm_maximum_investflow_rule(block): + """Rule definition for maximum overall investment + in investment case. + """ + for g in self.OVERALL_MAXIMUM_INVESTDSM: + for p in m.PERIODS: + expr = self.total[g, p] <= g.investment.overall_maximum + self.overall_dsm_maximum.add((g, p), expr) + + self.overall_dsm_maximum = Constraint( + self.OVERALL_MAXIMUM_INVESTDSM, m.PERIODS, noruleinit=True + ) + + self.overall_maximum_build = BuildAction( + rule=_overall_dsm_maximum_investflow_rule + ) + + def _overall_minimum_dsm_investflow_rule(block): + """Rule definition for minimum overall investment + in investment case. + + Note: This is only applicable for the last period + """ + for g in self.OVERALL_MINIMUM_INVESTDSM: + expr = ( + g.investment.overall_minimum + <= self.total[g, m.PERIODS.at(-1)] + ) + self.overall_minimum.add(g, expr) + + self.overall_minimum = Constraint( + self.OVERALL_MINIMUM_INVESTDSM, noruleinit=True + ) + + self.overall_minimum_build = BuildAction( + rule=_overall_minimum_dsm_investflow_rule + ) + def _objective_expression(self): r"""Objective expression with variable and investment costs for DSM""" m = self.parent_block() investment_costs = 0 + period_investment_costs = {p: 0 for p in m.PERIODS} variable_costs = 0 + fixed_costs = 0 + + if m.es.periods is None: + for g in self.investdsm: + for p in m.PERIODS: + if g.investment.ep_costs is not None: + investment_costs += ( + self.invest[g, p] * g.investment.ep_costs[p] + ) + else: + raise ValueError("Missing value for investment costs!") - for g in self.investdsm: - if g.investment.ep_costs is not None: - investment_costs += self.invest[g] * g.investment.ep_costs - else: - raise ValueError("Missing value for investment costs!") - for t in m.TIMESTEPS: - variable_costs += ( - self.dsm_up[g, t] - * g.cost_dsm_up[t] - * m.objective_weighting[t] - ) - variable_costs += ( - self.dsm_do_shift[g, t] * g.cost_dsm_down_shift[t] - + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] - ) * m.objective_weighting[t] + for t in m.TIMESTEPS: + variable_costs += ( + self.dsm_up[g, t] + * g.cost_dsm_up[t] + * m.objective_weighting[t] + ) + variable_costs += ( + self.dsm_do_shift[g, t] * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) * m.objective_weighting[t] + + else: + msg = ( + "You did not specify an interest rate.\n" + "It will be set equal to the discount_rate of {} " + "of the model as a default.\nThis corresponds to a " + "social planner point of view and does not reflect " + "microeconomic interest requirements." + ) + for g in self.investdsm: + if g.investment.ep_costs is not None: + lifetime = g.investment.lifetime + interest = g.investment.interest_rate + if interest == 0: + warn( + msg.format(m.discount_rate), + debugging.SuspiciousUsageWarning, + ) + interest = m.discount_rate + for p in m.PERIODS: + annuity = economics.annuity( + capex=g.investment.ep_costs[p], + n=lifetime, + wacc=interest, + ) + investment_costs_increment = ( + self.invest[g, p] + * annuity + * lifetime + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + investment_costs += investment_costs_increment + period_investment_costs[ + p + ] += investment_costs_increment + else: + raise ValueError("Missing value for investment costs!") + + for p, t in m.TIMEINDEX: + variable_costs += ( + self.dsm_up[g, t] + * m.objective_weighting[t] + * g.cost_dsm_up[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + variable_costs += ( + ( + self.dsm_do_shift[g, t] * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + + if g.investment.fixed_costs[0] is not None: + lifetime = g.investment.lifetime + for p in m.PERIODS: + fixed_costs += sum( + self.invest[g, p] + * g.investment.fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range( + m.es.periods_years[p], + m.es.periods_years[p] + lifetime, + ) + ) * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + + for g in self.EXISTING_INVESTDSM: + if g.investment.fixed_costs[0] is not None: + lifetime = g.investment.lifetime + age = g.investment.age + fixed_costs += sum( + g.investment.existing + * g.investment.fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range(0, lifetime - age) + ) - self.cost = Expression(expr=investment_costs + variable_costs) + self.variable_costs = Expression(expr=variable_costs) + self.fixed_costs = Expression(expr=fixed_costs) + self.investment_costs = Expression(expr=investment_costs) + self.period_investment_costs = period_investment_costs + self.costs = Expression( + expr=investment_costs + variable_costs + fixed_costs + ) - return self.cost + return self.costs class SinkDSMDIWBlock(ScalarBlock): @@ -1118,8 +1472,8 @@ class SinkDSMDIWBlock(ScalarBlock): .. math:: & - (DSM_{t}^{up} \cdot cost_{t}^{dsm, up} - + \sum_{tt=0}^{T} DSM_{t, tt}^{do, shift} \cdot + DSM_{t}^{up} \cdot cost_{t}^{dsm, up} + + \sum_{tt=0}^{|T|} DSM_{tt, t}^{do, shift} \cdot cost_{t}^{dsm, do, shift} + DSM_{t}^{do, shed} \cdot cost_{t}^{dsm, do, shed}) \cdot \omega_{t} \\ @@ -1127,8 +1481,8 @@ class SinkDSMDIWBlock(ScalarBlock): **Table: Symbols and attribute names of variables and parameters** - .. table:: Variables (V) and Parameters (P) - :widths: 1, 1, 1, 1 + .. table:: Variables (V), Parameters (P) and Sets (S) + :widths: 25, 25, 10, 40 ================================= ======================== ==== ======================================= symbol attribute type explanation @@ -1152,7 +1506,7 @@ class SinkDSMDIWBlock(ScalarBlock): | (shifting + shedding) :math:`E_{up, max}` `max_capacity_up` P Maximum capacity allowed for a shift upwards :math:`\eta` `efficiency` P Efficiency for load shifting processes - :math:`\mathbb{T}` P Time steps of the model + :math:`\mathbb{T}` S Time steps of the model :math:`e_{shift}` `shift_eligibility` P | Boolean parameter indicating if unit can be used | for load shifting :math:`e_{shed}` `shed_eligibility` P | Boolean parameter indicating if unit can be used @@ -1241,15 +1595,15 @@ def _input_output_relation_rule(block): The actual demand after DSM. Sink Inflow == Demand +- DSM """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # first time steps: 0 + delay time if t <= g.delay_time: # Inflow from bus - lhs = m.flow[g.inflow, g, t] + lhs = m.flow[g.inflow, g, p, t] # Demand +- DSM rhs = ( - g.demand[t] * g.max_demand + g.demand[t] * g.max_demand[p] + self.dsm_up[g, t] - sum( self.dsm_do_shift[g, tt, t] @@ -1259,15 +1613,17 @@ def _input_output_relation_rule(block): ) # add constraint - block.input_output_relation.add((g, t), (lhs == rhs)) + block.input_output_relation.add( + (g, p, t), (lhs == rhs) + ) # main use case - elif g.delay_time < t <= m.TIMESTEPS[-1] - g.delay_time: + elif g.delay_time < t <= m.TIMESTEPS.at(-1) - g.delay_time: # Inflow from bus - lhs = m.flow[g.inflow, g, t] + lhs = m.flow[g.inflow, g, p, t] # Demand +- DSM rhs = ( - g.demand[t] * g.max_demand + g.demand[t] * g.max_demand[p] + self.dsm_up[g, t] - sum( self.dsm_do_shift[g, tt, t] @@ -1279,30 +1635,34 @@ def _input_output_relation_rule(block): ) # add constraint - block.input_output_relation.add((g, t), (lhs == rhs)) + block.input_output_relation.add( + (g, p, t), (lhs == rhs) + ) # last time steps: end - delay time else: # Inflow from bus - lhs = m.flow[g.inflow, g, t] + lhs = m.flow[g.inflow, g, p, t] # Demand +- DSM rhs = ( - g.demand[t] * g.max_demand + g.demand[t] * g.max_demand[p] + self.dsm_up[g, t] - sum( self.dsm_do_shift[g, tt, t] for tt in range( - t - g.delay_time, m.TIMESTEPS[-1] + 1 + t - g.delay_time, m.TIMESTEPS.at(-1) + 1 ) ) - self.dsm_do_shed[g, t] ) # add constraint - block.input_output_relation.add((g, t), (lhs == rhs)) + block.input_output_relation.add( + (g, p, t), (lhs == rhs) + ) self.input_output_relation = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.input_output_relation_build = BuildAction( rule=_input_output_relation_rule @@ -1333,7 +1693,7 @@ def dsm_up_down_constraint_rule(block): block.dsm_updo_constraint.add((g, t), (lhs == rhs)) # main use case - elif g.delay_time < t <= m.TIMESTEPS[-1] - g.delay_time: + elif g.delay_time < t <= m.TIMESTEPS.at(-1) - g.delay_time: # DSM up lhs = self.dsm_up[g, t] * g.efficiency # DSM down @@ -1355,7 +1715,7 @@ def dsm_up_down_constraint_rule(block): rhs = sum( self.dsm_do_shift[g, t, tt] for tt in range( - t - g.delay_time, m.TIMESTEPS[-1] + 1 + t - g.delay_time, m.TIMESTEPS.at(-1) + 1 ) ) @@ -1415,7 +1775,9 @@ def dsm_do_constraint_rule(block): block.dsm_do_constraint.add((g, tt), (lhs <= rhs)) # main use case - elif g.delay_time < tt <= m.TIMESTEPS[-1] - g.delay_time: + elif ( + g.delay_time < tt <= m.TIMESTEPS.at(-1) - g.delay_time + ): # DSM down lhs = ( sum( @@ -1439,7 +1801,7 @@ def dsm_do_constraint_rule(block): sum( self.dsm_do_shift[g, t, tt] for t in range( - tt - g.delay_time, m.TIMESTEPS[-1] + 1 + tt - g.delay_time, m.TIMESTEPS.at(-1) + 1 ) ) + self.dsm_do_shed[g, tt] @@ -1485,7 +1847,9 @@ def c2_constraint_rule(block): # add constraint block.C2_constraint.add((g, tt), (lhs <= rhs)) - elif g.delay_time < tt <= m.TIMESTEPS[-1] - g.delay_time: + elif ( + g.delay_time < tt <= m.TIMESTEPS.at(-1) - g.delay_time + ): # DSM up/down lhs = ( self.dsm_up[g, tt] @@ -1513,7 +1877,7 @@ def c2_constraint_rule(block): + sum( self.dsm_do_shift[g, t, tt] for t in range( - tt - g.delay_time, m.TIMESTEPS[-1] + 1 + tt - g.delay_time, m.TIMESTEPS.at(-1) + 1 ) ) + self.dsm_do_shed[g, tt] @@ -1543,7 +1907,7 @@ def recovery_constraint_rule(block): # time is defined. if g.recovery_time_shift not in [None, 0]: # main use case - if t <= m.TIMESTEPS[-1] - g.recovery_time_shift: + if t <= m.TIMESTEPS.at(-1) - g.recovery_time_shift: # DSM up lhs = sum( self.dsm_up[g, tt] @@ -1564,7 +1928,7 @@ def recovery_constraint_rule(block): # DSM up lhs = sum( self.dsm_up[g, tt] - for tt in range(t, m.TIMESTEPS[-1] + 1) + for tt in range(t, m.TIMESTEPS.at(-1) + 1) ) # max energy shift for shifting process rhs = ( @@ -1598,7 +1962,7 @@ def shed_limit_constraint_rule(block): # Only applicable for load shedding if g.shed_eligibility: # main use case - if t <= m.TIMESTEPS[-1] - g.recovery_time_shed: + if t <= m.TIMESTEPS.at(-1) - g.recovery_time_shed: # DSM up lhs = sum( self.dsm_do_shed[g, tt] @@ -1621,7 +1985,7 @@ def shed_limit_constraint_rule(block): # DSM up lhs = sum( self.dsm_do_shed[g, tt] - for tt in range(t, m.TIMESTEPS[-1] + 1) + for tt in range(t, m.TIMESTEPS.at(-1) + 1) ) # max energy shift for shifting process rhs = ( @@ -1650,24 +2014,58 @@ def _objective_expression(self): m = self.parent_block() - dsm_cost = 0 + variable_costs = 0 + fixed_costs = 0 + + if m.es.periods is None: + for t in m.TIMESTEPS: + for g in self.dsm: + variable_costs += ( + self.dsm_up[g, t] + * g.cost_dsm_up[t] + * m.objective_weighting[t] + ) + variable_costs += ( + sum(self.dsm_do_shift[g, tt, t] for tt in m.TIMESTEPS) + * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) * m.objective_weighting[t] - for t in m.TIMESTEPS: + else: for g in self.dsm: - dsm_cost += ( - self.dsm_up[g, t] - * g.cost_dsm_up[t] - * m.objective_weighting[t] - ) - dsm_cost += ( - sum(self.dsm_do_shift[g, tt, t] for tt in m.TIMESTEPS) - * g.cost_dsm_down_shift[t] - + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] - ) * m.objective_weighting[t] + for p, t in m.TIMEINDEX: + variable_costs += ( + self.dsm_up[g, t] + * m.objective_weighting[t] + * g.cost_dsm_up[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + variable_costs += ( + ( + sum( + self.dsm_do_shift[g, tt, t] + for tt in m.TIMESTEPS + ) + * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + + if g.fixed_costs[0] is not None: + for p in m.PERIODS: + fixed_costs += ( + max(g.max_capacity_up, g.max_capacity_down) + * g.fixed_costs[p] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) - self.cost = Expression(expr=dsm_cost) + self.variable_costs = Expression(expr=variable_costs) + self.fixed_costs = Expression(expr=fixed_costs) + self.costs = Expression(expr=variable_costs + fixed_costs) - return self.cost + return self.costs class SinkDSMDIWInvestmentBlock(ScalarBlock): @@ -1680,7 +2078,8 @@ class SinkDSMDIWInvestmentBlock(ScalarBlock): .. math:: & - (1) \quad invest_{min} \leq invest \leq invest_{max} \\ + (1) \quad invest_{min}(p) \leq invest(p) \leq invest_{max}(p) \\ + & \quad \quad \quad \quad \forall p \in \mathbb{P} & \\ & (2) \quad DSM_{t}^{up} = 0 \\ @@ -1693,10 +2092,10 @@ class SinkDSMDIWInvestmentBlock(ScalarBlock): \quad \textrm{if} \quad e_{shed} = \textrm{False} \\ & \\ & - (4) \quad \dot{E}_{t} = demand_{t} \cdot (invest + E_{exist}) + (4) \quad \dot{E}_{t} = demand_{t} \cdot demand_{max}(p) + DSM_{t}^{up} - \sum_{tt=t-L}^{t+L} DSM_{tt,t}^{do, shift} - DSM_{t}^{do, shed} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & (5) \quad DSM_{t}^{up} \cdot \eta = @@ -1704,36 +2103,34 @@ class SinkDSMDIWInvestmentBlock(ScalarBlock): & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ & \\ & - (6) \quad DSM_{t}^{up} \leq E_{t}^{up} \cdot (invest + E_{exist}) - \ s_{flex, up} \\ + (6) \quad DSM_{t}^{up} \leq E_{t}^{up} \cdot P_{total}(p) \\ & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ & \\ & (7) \quad \sum_{t=tt-L}^{tt+L} DSM_{t,tt}^{do, shift} - + DSM_{tt}^{do, shed} \leq E_{tt}^{do} \cdot (invest + E_{exist}) - \cdot s_{flex, do} \\ - & \quad \quad \quad \quad \forall tt \in \mathbb{T} \\ + + DSM_{tt}^{do, shed} \leq E_{tt}^{do} \cdot P_{total}(p) \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & (8) \quad DSM_{tt}^{up} + \sum_{t=tt-L}^{tt+L} DSM_{t,tt}^{do, shift} + DSM_{tt}^{do, shed} \\ - & \quad \quad \leq max \{ E_{tt}^{up} \cdot s_{flex, up}, - E_{tt}^{do} \cdot s_{flex, do} \} \cdot (invest + E_{exist}) \\ - & \quad \quad \quad \quad \forall tt \in \mathbb{T} \\ + & \quad \quad \leq max \{ E_{tt}^{up}, E_{tt}^{do} \} + \cdot P_{total}(p) \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & (9) \quad \sum_{tt=t}^{t+R-1} DSM_{tt}^{up} - \leq E_{t}^{up} \cdot (invest + E_{exist}) - \cdot s_{flex, up} \cdot L \cdot \Delta t \\ - & \quad \quad \quad \quad \forall tt \in \mathbb{T} \\ + \leq E_{t}^{up} \cdot P_{total}(p) + \cdot L \cdot \Delta t \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & (10) \quad \sum_{tt=t}^{t+R-1} DSM_{tt}^{do, shed} - \leq E_{t}^{do} \cdot (invest + E_{exist}) - \cdot s_{flex, do} \cdot t_{shed} + \leq E_{t}^{do} \cdot P_{total}(p) + \cdot t_{shed} \cdot \Delta t \\ - & \quad \quad \quad \quad \forall tt \in \mathbb{T} \\ - + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ Note ---- @@ -1748,22 +2145,67 @@ class SinkDSMDIWInvestmentBlock(ScalarBlock): **The following parts of the objective function are created:** - * Investment annuity: + *Standard model* - .. math:: - & - invest \cdot costs_{invest} \\ + * Investment annuity: - * Variable costs: + .. math:: + P_{invest}(0) \cdot c_{invest}(0) + + * Variable costs: + + .. math:: + & + (DSM_{t}^{up} \cdot cost_{t}^{dsm, up} + + DSM_{t}^{do, shift} \cdot cost_{t}^{dsm, do, shift} \\ + & + DSM_{t}^{do, shed} \cdot cost_{t}^{dsm, do, shed}) + \cdot \omega_{t} \\ + & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + + *Multi-period model* + + * Investment annuity: + + .. math:: + & + P_{invest}(p) \cdot A(c_{invest}(p), l, ir) \cdot l + \cdot DF^{-p} \\ + &\\ + & \quad \quad \quad \quad \forall p \in \mathbb{P} + + * :attr:`fixed_costs` not None for investments + + .. math:: + & + (\sum_{pp=year(p)}^{year(p)+l} + P_{invest}(p) \cdot c_{fixed}(pp) \cdot DF^{-pp}) + \cdot DF^{-p} \\ + &\\ + & \quad \quad \quad \quad \forall p \in \mathbb{P} + + * Variable costs: + + .. math:: + & + (DSM_{t}^{up} \cdot cost_{t}^{dsm, up} + + DSM_{t}^{do, shift} \cdot cost_{t}^{dsm, do, shift} \\ + & + DSM_{t}^{do, shed} \cdot cost_{t}^{dsm, do, shed}) + \cdot \omega_{t} + \cdot DF^{-p} \\ + & \quad \quad \quad \quad + \forall p, t \in \textrm{TIMEINDEX} \\ + + whereby: + + * :math:`A(c_{invest,var}(p), l, ir)` is the annuity for + investment expenses :math:`c_{invest}(p)` lifetime :math:`l` + and interest rate :math:`ir` + * :math:`DF=(1+dr)` is the discount factor with discount rate + :math:`dr` + + See remarks in + :class:`oemof.solph.components.experimental._sink_dsm.SinkDSMOemofBlock`. - .. math:: - & - (DSM_{t}^{up} \cdot cost_{t}^{dsm, up} - + \sum_{tt=0}^{T} DSM_{t, tt}^{do, shift} \cdot - cost_{t}^{dsm, do, shift} - + DSM_{t}^{do, shed} \cdot cost_{t}^{dsm, do, shed}) - \cdot \omega_{t} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ **Table: Symbols and attribute names of variables and parameters** @@ -1773,21 +2215,21 @@ class SinkDSMDIWInvestmentBlock(ScalarBlock): * The following variables and parameters are exclusively used for investment modeling: - .. table:: Variables (V) and Parameters (P) - :widths: 1, 1, 1, 1 + .. table:: Variables (V), Parameters (P) and Sets (S) + :widths: 25, 25, 10, 40 ================================= ======================== ==== ======================================= symbol attribute type explanation ================================= ======================== ==== ======================================= - :math:`invest` `invest` V | DSM capacity invested in - | Equals to the additionally installed capacity. - | The capacity share eligible for a shift is determined by flex share(s). - :math:`invest_{min}` `investment.minimum` P minimum investment - :math:`invest_{max}` `investment.maximum` P maximum investment - :math:`E_{exist}` `investment.existing` P existing DSM capacity - :math:`s_{flex, up}` `flex_share_up` P share of invested capacity that may be shift upwards at maximum - :math:`s_{flex, do}` `flex_share_do` P share of invested capacity that may be shift downwards at maximum - :math:`costs_{invest}` `investment.ep_costs` P specific investment annuity + :math:`P_{invest}(p)` `invest[p]` V | DSM capacity invested into in period p. + | Equals to the additionally shiftable resp. sheddable capacity. + :math:`invest_{min}(p)` `investment.minimum[p]` P minimum investment in period p + :math:`invest_{max}(p)` `investment.maximum[p]` P maximum investment in period p + :math:`P_{total}` `investment.total[p]` P total DSM capacity + :math:`costs_{invest}(p)` `investment.ep_costs[p]` P | specific investment annuity (standard model) resp. + | specific investment expenses (multi-period model) + :math:`\mathbb{P}` S Periods of the model + :math:`\textrm{TIMEINDEX}` S Timeindex set of the model (periods, timesteps) ================================= ======================== ==== ======================================= """ # noqa: E501 @@ -1811,22 +2253,57 @@ def _create(self, group=None): # Set of DSM Components self.investdsm = Set(initialize=[g for g in group]) + self.OVERALL_MAXIMUM_INVESTDSM = Set( + initialize=[ + g for g in group if g.investment.overall_maximum is not None + ] + ) + + self.OVERALL_MINIMUM_INVESTDSM = Set( + initialize=[ + g for g in group if g.investment.overall_minimum is not None + ] + ) + + self.EXISTING_INVESTDSM = Set( + initialize=[g for g in group if g.investment.existing is not None] + ) + # ************* VARIABLES ***************************** # Define bounds for investments in demand response - def _dsm_investvar_bound_rule(block, g): + def _dsm_investvar_bound_rule(block, g, p): """Rule definition to bound the demand response capacity invested in (`invest`). """ - return g.investment.minimum, g.investment.maximum + return g.investment.minimum[p], g.investment.maximum[p] # Investment in DR capacity self.invest = Var( self.investdsm, + m.PERIODS, within=NonNegativeReals, bounds=_dsm_investvar_bound_rule, ) + # Total capacity + self.total = Var(self.investdsm, m.PERIODS, within=NonNegativeReals) + + if m.es.periods is not None: + # Old capacity to be decommissioned (due to lifetime) + # Old capacity built out of old exogenous and endogenous capacities + self.old = Var(self.investdsm, m.PERIODS, within=NonNegativeReals) + + # Old endogenous capacity to be decommissioned (due to lifetime) + self.old_end = Var( + self.investdsm, m.PERIODS, within=NonNegativeReals + ) + + # Old exogenous capacity to be decommissioned (due to lifetime) + self.old_exo = Var( + self.investdsm, m.PERIODS, within=NonNegativeReals + ) + # Variable load shift down self.dsm_do_shift = Var( self.investdsm, @@ -1848,6 +2325,184 @@ def _dsm_investvar_bound_rule(block, g): # ************* CONSTRAINTS ***************************** + # Handle unit lifetimes + def _total_dsm_capacity_rule(block): + """Rule definition for determining total installed + capacity (taking decommissioning into account) + """ + for g in group: + for p in m.PERIODS: + if p == 0: + expr = ( + self.total[g, p] + == self.invest[g, p] + g.investment.existing + ) + self.total_dsm_rule.add((g, p), expr) + else: + expr = ( + self.total[g, p] + == self.invest[g, p] + + self.total[g, p - 1] + - self.old[g, p] + ) + self.total_dsm_rule.add((g, p), expr) + + self.total_dsm_rule = Constraint(group, m.PERIODS, noruleinit=True) + self.total_dsm_rule_build = BuildAction(rule=_total_dsm_capacity_rule) + + if m.es.periods is not None: + + def _old_dsm_capacity_rule_end(block): + """Rule definition for determining old endogenously installed + capacity to be decommissioned due to reaching its lifetime. + Investment and decommissioning periods are linked within + the constraint. The respective decommissioning period is + determined for every investment period based on the components + lifetime and a matrix describing its age of each endogenous + investment. Decommissioning can only occur at the beginning of + each period. + + Note + ---- + For further information on the implementation check + PR#957 https://github.com/oemof/oemof-solph/pull/957 + """ + for g in group: + lifetime = g.investment.lifetime + if lifetime is None: + msg = ( + "You have to specify a lifetime " + "for a Flow with an associated " + "investment object in " + f"a multi-period model! Value for {g} " + "is missing." + ) + raise ValueError(msg) + # get the period matrix describing the temporal distance + # between all period combinations. + periods_matrix = m.es.periods_matrix + + # get the index of the minimum value in each row greater + # equal than the lifetime. This value equals the + # decommissioning period if not zero. The index of this + # value represents the investment period. If np.where + # condition is not met in any row, min value will be zero + decomm_periods = np.argmin( + np.where( + (periods_matrix >= lifetime), + periods_matrix, + np.inf, + ), + axis=1, + ) + + # no decommissioning in first period + expr = self.old_end[g, 0] == 0 + self.old_dsm_rule_end.add((g, 0), expr) + + # all periods not in decomm_periods have no decommissioning + # zero is excluded + for p in m.PERIODS: + if p not in decomm_periods and p != 0: + expr = self.old_end[g, p] == 0 + self.old_dsm_rule_end.add((g, p), expr) + + # multiple invests can be decommissioned in the same period + # but only sequential ones, thus a bookkeeping is + # introduced andconstraints are added to equation one + # iteration later. + last_decomm_p = np.nan + # loop over invest periods (values are decomm_periods) + for invest_p, decomm_p in enumerate(decomm_periods): + # Add constraint of iteration before + # (skipped in first iteration by last_decomm_p = nan) + if (decomm_p != last_decomm_p) and ( + last_decomm_p is not np.nan + ): + expr = self.old_end[g, last_decomm_p] == expr + self.old_dsm_rule_end.add((g, last_decomm_p), expr) + + # no decommissioning if decomm_p is zero + if decomm_p == 0: + # overwrite decomm_p with zero to avoid + # chaining invest periods in next iteration + last_decomm_p = 0 + + # if decomm_p is the same as the last one chain invest + # period + elif decomm_p == last_decomm_p: + expr += self.invest[g, invest_p] + # overwrite decomm_p + last_decomm_p = decomm_p + + # if decomm_p is not zero, not the same as the last one + # and it's not the first period + else: + expr = self.invest[g, invest_p] + # overwrite decomm_p + last_decomm_p = decomm_p + + # Add constraint of very last iteration + if last_decomm_p != 0: + expr = self.old_end[g, last_decomm_p] == expr + self.old_dsm_rule_end.add((g, last_decomm_p), expr) + + self.old_dsm_rule_end = Constraint( + group, m.PERIODS, noruleinit=True + ) + self.old_dsm_rule_end_build = BuildAction( + rule=_old_dsm_capacity_rule_end + ) + + def _old_dsm_capacity_rule_exo(block): + """Rule definition for determining old exogenously given + capacity to be decommissioned due to reaching its lifetime + """ + for g in group: + age = g.investment.age + lifetime = g.investment.lifetime + is_decommissioned = False + for p in m.PERIODS: + # No shutdown in first period + if p == 0: + expr = self.old_exo[g, p] == 0 + self.old_dsm_rule_exo.add((g, p), expr) + elif lifetime - age <= m.es.periods_years[p]: + # Track decommissioning status + if not is_decommissioned: + expr = ( + self.old_exo[g, p] == g.investment.existing + ) + is_decommissioned = True + else: + expr = self.old_exo[g, p] == 0 + self.old_dsm_rule_exo.add((g, p), expr) + else: + expr = self.old_exo[g, p] == 0 + self.old_dsm_rule_exo.add((g, p), expr) + + self.old_dsm_rule_exo = Constraint( + group, m.PERIODS, noruleinit=True + ) + self.old_dsm_rule_exo_build = BuildAction( + rule=_old_dsm_capacity_rule_exo + ) + + def _old_dsm_capacity_rule(block): + """Rule definition for determining (overall) old capacity + to be decommissioned due to reaching its lifetime + """ + for g in group: + for p in m.PERIODS: + expr = ( + self.old[g, p] + == self.old_end[g, p] + self.old_exo[g, p] + ) + self.old_dsm_rule.add((g, p), expr) + + self.old_dsm_rule = Constraint(group, m.PERIODS, noruleinit=True) + self.old_dsm_rule_build = BuildAction(rule=_old_dsm_capacity_rule) + def _shift_shed_vars_rule(block): """Force shifting resp. shedding variables to zero dependent on how boolean parameters for shift resp. shed eligibility @@ -1876,16 +2531,15 @@ def _input_output_relation_rule(block): The actual demand after DSM. Sink Inflow == Demand +- DSM """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # first time steps: 0 + delay time if t <= g.delay_time: # Inflow from bus - lhs = m.flow[g.inflow, g, t] + lhs = m.flow[g.inflow, g, p, t] # Demand +- DSM rhs = ( - g.demand[t] - * (self.invest[g] + g.investment.existing) + g.demand[t] * g.max_demand[p] + self.dsm_up[g, t] - sum( self.dsm_do_shift[g, tt, t] @@ -1895,16 +2549,17 @@ def _input_output_relation_rule(block): ) # add constraint - block.input_output_relation.add((g, t), (lhs == rhs)) + block.input_output_relation.add( + (g, p, t), (lhs == rhs) + ) # main use case - elif g.delay_time < t <= m.TIMESTEPS[-1] - g.delay_time: + elif g.delay_time < t <= m.TIMESTEPS.at(-1) - g.delay_time: # Inflow from bus - lhs = m.flow[g.inflow, g, t] + lhs = m.flow[g.inflow, g, p, t] # Demand +- DSM rhs = ( - g.demand[t] - * (self.invest[g] + g.investment.existing) + g.demand[t] * g.max_demand[p] + self.dsm_up[g, t] - sum( self.dsm_do_shift[g, tt, t] @@ -1916,31 +2571,34 @@ def _input_output_relation_rule(block): ) # add constraint - block.input_output_relation.add((g, t), (lhs == rhs)) + block.input_output_relation.add( + (g, p, t), (lhs == rhs) + ) # last time steps: end - delay time else: # Inflow from bus - lhs = m.flow[g.inflow, g, t] + lhs = m.flow[g.inflow, g, p, t] # Demand +- DSM rhs = ( - g.demand[t] - * (self.invest[g] + g.investment.existing) + g.demand[t] * g.max_demand[p] + self.dsm_up[g, t] - sum( self.dsm_do_shift[g, tt, t] for tt in range( - t - g.delay_time, m.TIMESTEPS[-1] + 1 + t - g.delay_time, m.TIMESTEPS.at(-1) + 1 ) ) - self.dsm_do_shed[g, t] ) # add constraint - block.input_output_relation.add((g, t), (lhs == rhs)) + block.input_output_relation.add( + (g, p, t), (lhs == rhs) + ) self.input_output_relation = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.input_output_relation_build = BuildAction( rule=_input_output_relation_rule @@ -1971,7 +2629,7 @@ def dsm_up_down_constraint_rule(block): block.dsm_updo_constraint.add((g, t), (lhs == rhs)) # main use case - elif g.delay_time < t <= m.TIMESTEPS[-1] - g.delay_time: + elif g.delay_time < t <= m.TIMESTEPS.at(-1) - g.delay_time: # DSM up lhs = self.dsm_up[g, t] * g.efficiency # DSM down @@ -1993,7 +2651,7 @@ def dsm_up_down_constraint_rule(block): rhs = sum( self.dsm_do_shift[g, t, tt] for tt in range( - t - g.delay_time, m.TIMESTEPS[-1] + 1 + t - g.delay_time, m.TIMESTEPS.at(-1) + 1 ) ) @@ -2013,22 +2671,18 @@ def dsm_up_constraint_rule(block): Realised upward load shift at time t has to be smaller than upward DSM capacity at time t. """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # DSM up lhs = self.dsm_up[g, t] # Capacity dsm_up - rhs = ( - g.capacity_up[t] - * (self.invest[g] + g.investment.existing) - * g.flex_share_up - ) + rhs = g.capacity_up[t] * self.total[g, p] # add constraint - block.dsm_up_constraint.add((g, t), (lhs <= rhs)) + block.dsm_up_constraint.add((g, p, t), (lhs <= rhs)) self.dsm_up_constraint = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.dsm_up_constraint_build = BuildAction(rule=dsm_up_constraint_rule) @@ -2038,7 +2692,7 @@ def dsm_do_constraint_rule(block): Realised downward load shift at time t has to be smaller than downward DSM capacity at time t. """ - for tt in m.TIMESTEPS: + for p, tt in m.TIMEINDEX: for g in group: # first times steps: 0 + delay if tt <= g.delay_time: @@ -2051,17 +2705,15 @@ def dsm_do_constraint_rule(block): + self.dsm_do_shed[g, tt] ) # Capacity DSM down - rhs = ( - g.capacity_down[tt] - * (self.invest[g] + g.investment.existing) - * g.flex_share_down - ) + rhs = g.capacity_down[tt] * self.total[g, p] # add constraint - block.dsm_do_constraint.add((g, tt), (lhs <= rhs)) + block.dsm_do_constraint.add((g, p, tt), (lhs <= rhs)) # main use case - elif g.delay_time < tt <= m.TIMESTEPS[-1] - g.delay_time: + elif ( + g.delay_time < tt <= m.TIMESTEPS.at(-1) - g.delay_time + ): # DSM down lhs = ( sum( @@ -2073,14 +2725,10 @@ def dsm_do_constraint_rule(block): + self.dsm_do_shed[g, tt] ) # Capacity DSM down - rhs = ( - g.capacity_down[tt] - * (self.invest[g] + g.investment.existing) - * g.flex_share_down - ) + rhs = g.capacity_down[tt] * self.total[g, p] # add constraint - block.dsm_do_constraint.add((g, tt), (lhs <= rhs)) + block.dsm_do_constraint.add((g, p, tt), (lhs <= rhs)) # last time steps: end - delay time else: @@ -2089,23 +2737,19 @@ def dsm_do_constraint_rule(block): sum( self.dsm_do_shift[g, t, tt] for t in range( - tt - g.delay_time, m.TIMESTEPS[-1] + 1 + tt - g.delay_time, m.TIMESTEPS.at(-1) + 1 ) ) + self.dsm_do_shed[g, tt] ) # Capacity DSM down - rhs = ( - g.capacity_down[tt] - * (self.invest[g] + g.investment.existing) - * g.flex_share_down - ) + rhs = g.capacity_down[tt] * self.total[g, p] # add constraint - block.dsm_do_constraint.add((g, tt), (lhs <= rhs)) + block.dsm_do_constraint.add((g, p, tt), (lhs <= rhs)) self.dsm_do_constraint = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.dsm_do_constraint_build = BuildAction(rule=dsm_do_constraint_rule) @@ -2117,7 +2761,7 @@ def c2_constraint_rule(block): total each individual DSM unit within the modeled portfolio can only be shifted up OR down at a given time. """ - for tt in m.TIMESTEPS: + for p, tt in m.TIMEINDEX: for g in group: # first times steps: 0 + delay time if tt <= g.delay_time: @@ -2131,15 +2775,20 @@ def c2_constraint_rule(block): + self.dsm_do_shed[g, tt] ) # max capacity at tt - rhs = max( - g.capacity_up[tt] * g.flex_share_up, - g.capacity_down[tt] * g.flex_share_down, - ) * (self.invest[g] + g.investment.existing) + rhs = ( + max( + g.capacity_up[tt], + g.capacity_down[tt], + ) + * self.total[g, p] + ) # add constraint - block.C2_constraint.add((g, tt), (lhs <= rhs)) + block.C2_constraint.add((g, p, tt), (lhs <= rhs)) - elif g.delay_time < tt <= m.TIMESTEPS[-1] - g.delay_time: + elif ( + g.delay_time < tt <= m.TIMESTEPS.at(-1) - g.delay_time + ): # DSM up/down lhs = ( self.dsm_up[g, tt] @@ -2152,13 +2801,16 @@ def c2_constraint_rule(block): + self.dsm_do_shed[g, tt] ) # max capacity at tt - rhs = max( - g.capacity_up[tt] * g.flex_share_up, - g.capacity_down[tt] * g.flex_share_down, - ) * (self.invest[g] + g.investment.existing) + rhs = ( + max( + g.capacity_up[tt], + g.capacity_down[tt], + ) + * self.total[g, p] + ) # add constraint - block.C2_constraint.add((g, tt), (lhs <= rhs)) + block.C2_constraint.add((g, p, tt), (lhs <= rhs)) else: # DSM up/down @@ -2167,21 +2819,24 @@ def c2_constraint_rule(block): + sum( self.dsm_do_shift[g, t, tt] for t in range( - tt - g.delay_time, m.TIMESTEPS[-1] + 1 + tt - g.delay_time, m.TIMESTEPS.at(-1) + 1 ) ) + self.dsm_do_shed[g, tt] ) # max capacity at tt - rhs = max( - g.capacity_up[tt] * g.flex_share_up, - g.capacity_down[tt] * g.flex_share_down, - ) * (self.invest[g] + g.investment.existing) + rhs = ( + max( + g.capacity_up[tt], + g.capacity_down[tt], + ) + * self.total[g, p] + ) # add constraint - block.C2_constraint.add((g, tt), (lhs <= rhs)) + block.C2_constraint.add((g, p, tt), (lhs <= rhs)) - self.C2_constraint = Constraint(group, m.TIMESTEPS, noruleinit=True) + self.C2_constraint = Constraint(group, m.TIMEINDEX, noruleinit=True) self.C2_constraint_build = BuildAction(rule=c2_constraint_rule) def recovery_constraint_rule(block): @@ -2191,13 +2846,13 @@ def recovery_constraint_rule(block): may take place. Rule is only applicable if a recovery time is defined. """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # No need to build constraint if no recovery # time is defined. if g.recovery_time_shift not in [None, 0]: # main use case - if t <= m.TIMESTEPS[-1] - g.recovery_time_shift: + if t <= m.TIMESTEPS.at(-1) - g.recovery_time_shift: # DSM up lhs = sum( self.dsm_up[g, tt] @@ -2206,37 +2861,39 @@ def recovery_constraint_rule(block): # max energy shift for shifting process rhs = ( g.capacity_up[t] - * (self.invest[g] + g.investment.existing) - * g.flex_share_up + * self.total[g, p] * g.delay_time * m.timeincrement[t] ) # add constraint - block.recovery_constraint.add((g, t), (lhs <= rhs)) + block.recovery_constraint.add( + (g, p, t), (lhs <= rhs) + ) # last time steps: end - recovery time else: # DSM up lhs = sum( self.dsm_up[g, tt] - for tt in range(t, m.TIMESTEPS[-1] + 1) + for tt in range(t, m.TIMESTEPS.at(-1) + 1) ) # max energy shift for shifting process rhs = ( g.capacity_up[t] - * (self.invest[g] + g.investment.existing) - * g.flex_share_up + * self.total[g, p] * g.delay_time * m.timeincrement[t] ) # add constraint - block.recovery_constraint.add((g, t), (lhs <= rhs)) + block.recovery_constraint.add( + (g, p, t), (lhs <= rhs) + ) else: pass # return(Constraint.Skip) self.recovery_constraint = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.recovery_constraint_build = BuildAction( rule=recovery_constraint_rule @@ -2249,12 +2906,12 @@ def shed_limit_constraint_rule(block): shedding is introduced in order to limit the overall amount of shedded energy. """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # Only applicable for load shedding if g.shed_eligibility: # main use case - if t <= m.TIMESTEPS[-1] - g.recovery_time_shed: + if t <= m.TIMESTEPS.at(-1) - g.recovery_time_shed: # DSM up lhs = sum( self.dsm_do_shed[g, tt] @@ -2263,14 +2920,13 @@ def shed_limit_constraint_rule(block): # max energy shift for shifting process rhs = ( g.capacity_down[t] - * (self.invest[g] + g.investment.existing) - * g.flex_share_down + * self.total[g, p] * g.shed_time * m.timeincrement[t] ) # add constraint block.shed_limit_constraint.add( - (g, t), (lhs <= rhs) + (g, p, t), (lhs <= rhs) ) # last time steps: end - recovery time @@ -2278,60 +2934,192 @@ def shed_limit_constraint_rule(block): # DSM up lhs = sum( self.dsm_do_shed[g, tt] - for tt in range(t, m.TIMESTEPS[-1] + 1) + for tt in range(t, m.TIMESTEPS.at(-1) + 1) ) # max energy shift for shifting process rhs = ( g.capacity_down[t] - * (self.invest[g] + g.investment.existing) - * g.flex_share_down + * self.total[g, p] * g.shed_time * m.timeincrement[t] ) # add constraint block.shed_limit_constraint.add( - (g, t), (lhs <= rhs) + (g, p, t), (lhs <= rhs) ) else: pass # return(Constraint.Skip) self.shed_limit_constraint = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.shed_limit_constraint_build = BuildAction( rule=shed_limit_constraint_rule ) + if m.es.periods is not None: + + def _overall_dsm_maximum_investflow_rule(block): + """Rule definition for maximum overall investment + in investment case. + """ + for g in self.OVERALL_MAXIMUM_INVESTDSM: + for p in m.PERIODS: + expr = self.total[g, p] <= g.investment.overall_maximum + self.overall_dsm_maximum.add((g, p), expr) + + self.overall_dsm_maximum = Constraint( + self.OVERALL_MAXIMUM_INVESTDSM, m.PERIODS, noruleinit=True + ) + + self.overall_maximum_build = BuildAction( + rule=_overall_dsm_maximum_investflow_rule + ) + + def _overall_minimum_dsm_investflow_rule(block): + """Rule definition for minimum overall investment + in investment case. + + Note: This is only applicable for the last period + """ + for g in self.OVERALL_MINIMUM_INVESTDSM: + expr = ( + g.investment.overall_minimum + <= self.total[g, m.PERIODS.at(-1)] + ) + self.overall_minimum.add(g, expr) + + self.overall_minimum = Constraint( + self.OVERALL_MINIMUM_INVESTDSM, noruleinit=True + ) + + self.overall_minimum_build = BuildAction( + rule=_overall_minimum_dsm_investflow_rule + ) + def _objective_expression(self): r"""Objective expression with variable and investment costs for DSM""" m = self.parent_block() investment_costs = 0 + period_investment_costs = {p: 0 for p in m.PERIODS} variable_costs = 0 + fixed_costs = 0 + + if m.es.periods is None: + for g in self.investdsm: + for p in m.PERIODS: + if g.investment.ep_costs is not None: + investment_costs += ( + self.invest[g, p] * g.investment.ep_costs[p] + ) + else: + raise ValueError("Missing value for investment costs!") - for g in self.investdsm: - if g.investment.ep_costs is not None: - investment_costs += self.invest[g] * g.investment.ep_costs - else: - raise ValueError("Missing value for investment costs!") + for t in m.TIMESTEPS: + variable_costs += ( + self.dsm_up[g, t] + * g.cost_dsm_up[t] + * m.objective_weighting[t] + ) + variable_costs += ( + sum(self.dsm_do_shift[g, tt, t] for tt in m.TIMESTEPS) + * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) * m.objective_weighting[t] - for t in m.TIMESTEPS: - variable_costs += ( - self.dsm_up[g, t] - * g.cost_dsm_up[t] - * m.objective_weighting[t] - ) - variable_costs += ( - sum(self.dsm_do_shift[g, tt, t] for tt in m.TIMESTEPS) - * g.cost_dsm_down_shift[t] - + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] - ) * m.objective_weighting[t] + else: + msg = ( + "You did not specify an interest rate.\n" + "It will be set equal to the discount_rate of {} " + "of the model as a default.\nThis corresponds to a " + "social planner point of view and does not reflect " + "microeconomic interest requirements." + ) + for g in self.investdsm: + if g.investment.ep_costs is not None: + lifetime = g.investment.lifetime + interest = g.investment.interest_rate + if interest == 0: + warn( + msg.format(m.discount_rate), + debugging.SuspiciousUsageWarning, + ) + interest = m.discount_rate + for p in m.PERIODS: + annuity = economics.annuity( + capex=g.investment.ep_costs[p], + n=lifetime, + wacc=interest, + ) + investment_costs_increment = ( + self.invest[g, p] + * annuity + * lifetime + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + investment_costs += investment_costs_increment + period_investment_costs[ + p + ] += investment_costs_increment + else: + raise ValueError("Missing value for investment costs!") + + for p, t in m.TIMEINDEX: + variable_costs += ( + self.dsm_up[g, t] + * m.objective_weighting[t] + * g.cost_dsm_up[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + variable_costs += ( + ( + sum( + self.dsm_do_shift[g, tt, t] + for tt in m.TIMESTEPS + ) + * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + + if g.investment.fixed_costs[0] is not None: + lifetime = g.investment.lifetime + for p in m.PERIODS: + fixed_costs += sum( + self.invest[g, p] + * g.investment.fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range( + m.es.periods_years[p], + m.es.periods_years[p] + lifetime, + ) + ) * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + + for g in self.EXISTING_INVESTDSM: + if g.investment.fixed_costs[0] is not None: + lifetime = g.investment.lifetime + age = g.investment.age + fixed_costs += sum( + g.investment.existing + * g.investment.fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range(0, lifetime - age) + ) - self.cost = Expression(expr=investment_costs + variable_costs) + self.variable_costs = Expression(expr=variable_costs) + self.fixed_costs = Expression(expr=fixed_costs) + self.investment_costs = Expression(expr=investment_costs) + self.period_investment_costs = period_investment_costs + self.costs = Expression( + expr=investment_costs + variable_costs + fixed_costs + ) - return self.cost + return self.costs class SinkDSMDLRBlock(ScalarBlock): @@ -2488,13 +3276,13 @@ class SinkDSMDLRBlock(ScalarBlock): **Table: Symbols and attribute names of variables and parameters** - .. table:: Variables (V), Parameters (P) and additional Sets (S) - :widths: 1, 1, 1, 1 + .. table:: Variables (V), Parameters (P) and (additional) Sets (S) + :widths: 25, 25, 10, 40 =========================================== ================================= ==== ======================================= symbol attribute type explanation =========================================== ================================= ==== ======================================= - :math:`DSM_{h, t}^{up}` `dsm_up[g,h,t]` V DSM up shift (additional load) in hour t with delay time h + :math:`DSM_{h, t}^{up}` `dsm_up[g, h, t]` V DSM up shift (additional load) in hour t with delay time h :math:`DSM_{h, t}^{do, shift}` `dsm_do_shift[g, h, t]` V DSM down shift (less load) in hour t with delay time h :math:`DSM_{h, t}^{balanceUp}` `balance_dsm_up[g, h, t]` V | DSM down shift (less load) in hour t with delay time h | to balance previous upshift @@ -2522,7 +3310,7 @@ class SinkDSMDLRBlock(ScalarBlock): | (shifting + shedding) :math:`E_{up, max}` `max_capacity_up` P Maximum capacity allowed for a shift upwards :math:`\eta` `efficiency` P Efficiency for load shifting processes - :math:`\mathbb{T}` P Time steps of the model + :math:`\mathbb{T}` S Time steps of the model :math:`e_{shift}` `shift_eligibility` P | Boolean parameter indicating if unit can be used | for load shifting :math:`e_{shed}` `shed_eligibility` P | Boolean parameter indicating if unit can be used @@ -2650,14 +3438,14 @@ def _input_output_relation_rule(block): The actual demand after DR. BusBlock outflow == Demand +- DR (i.e. effective Sink consumption) """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # outflow from bus - lhs = m.flow[g.inflow, g, t] + lhs = m.flow[g.inflow, g, p, t] # Demand +- DR rhs = ( - g.demand[t] * g.max_demand + g.demand[t] * g.max_demand[p] + sum( self.dsm_up[g, h, t] + self.balance_dsm_do[g, h, t] @@ -2669,10 +3457,10 @@ def _input_output_relation_rule(block): ) # add constraint - block.input_output_relation.add((g, t), (lhs == rhs)) + block.input_output_relation.add((g, p, t), (lhs == rhs)) self.input_output_relation = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.input_output_relation_build = BuildAction( rule=_input_output_relation_rule @@ -2704,7 +3492,7 @@ def capacity_balance_red_rule(block): ) # no balancing for the first timestep - elif t == m.TIMESTEPS[1]: + elif t == m.TIMESTEPS.at(1): lhs = self.balance_dsm_do[g, h, t] rhs = 0 @@ -2754,7 +3542,7 @@ def capacity_balance_inc_rule(block): ) # no balancing for the first timestep - elif t == m.TIMESTEPS[1]: + elif t == m.TIMESTEPS.at(1): lhs = self.balance_dsm_up[g, h, t] rhs = 0 @@ -2790,7 +3578,7 @@ def no_comp_red_rule(block): for g in group: if g.fixes: for h in g.delay_time: - if t > m.TIMESTEPS[-1] - h: + if t > m.TIMESTEPS.at(-1) - h: # no load reduction anymore (dsm_do_shift = 0) lhs = self.dsm_do_shift[g, h, t] rhs = 0 @@ -2813,7 +3601,7 @@ def no_comp_inc_rule(block): for g in group: if g.fixes: for h in g.delay_time: - if t > m.TIMESTEPS[-1] - h: + if t > m.TIMESTEPS.at(-1) - h: # no load increase anymore (dsm_up = 0) lhs = self.dsm_up[g, h, t] rhs = 0 @@ -3019,24 +3807,31 @@ def dr_yearly_limit_shed_rule(block): """ for g in group: if g.shed_eligibility: - # sum of all load reductions - lhs = sum(self.dsm_do_shed[g, t] for t in m.TIMESTEPS) + for p in m.PERIODS: + # sum of all load reductions + lhs = sum( + self.dsm_do_shed[g, t] + for pp, t in m.TIMEINDEX + if pp == p + ) - # year limit - rhs = ( - g.capacity_down_mean - * g.max_capacity_down - * g.shed_time - * g.n_yearLimit_shed - ) + # year limit + rhs = ( + g.capacity_down_mean + * g.max_capacity_down + * g.shed_time + * g.n_yearLimit_shed + ) - # add constraint - block.dr_yearly_limit_shed.add(g, (lhs <= rhs)) + # add constraint + block.dr_yearly_limit_shed.add((g, p), (lhs <= rhs)) else: pass # return(Constraint.Skip) - self.dr_yearly_limit_shed = Constraint(group, noruleinit=True) + self.dr_yearly_limit_shed = Constraint( + group, m.PERIODS, noruleinit=True + ) self.dr_yearly_limit_shed_build = BuildAction( rule=dr_yearly_limit_shed_rule ) @@ -3050,27 +3845,34 @@ def dr_yearly_limit_red_rule(block): """ for g in group: if g.ActivateYearLimit: - # sum of all load reductions - lhs = sum( - sum(self.dsm_do_shift[g, h, t] for h in g.delay_time) - for t in m.TIMESTEPS - ) + for p in m.PERIODS: + # sum of all load reductions + lhs = sum( + sum( + self.dsm_do_shift[g, h, t] + for h in g.delay_time + ) + for pp, t in m.TIMEINDEX + if pp == p + ) - # year limit - rhs = ( - g.capacity_down_mean - * g.max_capacity_down - * g.shift_time - * g.n_yearLimit_shift - ) + # year limit + rhs = ( + g.capacity_down_mean + * g.max_capacity_down + * g.shift_time + * g.n_yearLimit_shift + ) - # add constraint - block.dr_yearly_limit_red.add(g, (lhs <= rhs)) + # add constraint + block.dr_yearly_limit_red.add((g, p), (lhs <= rhs)) else: pass # return(Constraint.Skip) - self.dr_yearly_limit_red = Constraint(group, noruleinit=True) + self.dr_yearly_limit_red = Constraint( + group, m.PERIODS, noruleinit=True + ) self.dr_yearly_limit_red_build = BuildAction( rule=dr_yearly_limit_red_rule ) @@ -3082,34 +3884,38 @@ def dr_yearly_limit_inc_rule(block): """ for g in group: if g.ActivateYearLimit: - # sum of all load increases - lhs = sum( - sum(self.dsm_up[g, h, t] for h in g.delay_time) - for t in m.TIMESTEPS - ) + for p in m.PERIODS: + # sum of all load increases + lhs = sum( + sum(self.dsm_up[g, h, t] for h in g.delay_time) + for pp, t in m.TIMEINDEX + if pp == p + ) - # year limit - rhs = ( - g.capacity_up_mean - * g.max_capacity_up - * g.shift_time - * g.n_yearLimit_shift - ) + # year limit + rhs = ( + g.capacity_up_mean + * g.max_capacity_up + * g.shift_time + * g.n_yearLimit_shift + ) - # add constraint - block.dr_yearly_limit_inc.add(g, (lhs <= rhs)) + # add constraint + block.dr_yearly_limit_inc.add((g, p), (lhs <= rhs)) else: pass # return(Constraint.Skip) - self.dr_yearly_limit_inc = Constraint(group, noruleinit=True) + self.dr_yearly_limit_inc = Constraint( + group, m.PERIODS, noruleinit=True + ) self.dr_yearly_limit_inc_build = BuildAction( rule=dr_yearly_limit_inc_rule ) # Equation 4.19 def dr_daily_limit_red_rule(block): - """ "Introduce rolling (energy) limit for load reductions + """Introduce rolling (energy) limit for load reductions This effectively limits DR utilization dependent on activations within previous hours. """ @@ -3251,31 +4057,72 @@ def _objective_expression(self): """ m = self.parent_block() - dr_cost = 0 + variable_costs = 0 + fixed_costs = 0 + + if m.es.periods is None: + for t in m.TIMESTEPS: + for g in self.DR: + variable_costs += ( + sum( + self.dsm_up[g, h, t] + self.balance_dsm_do[g, h, t] + for h in g.delay_time + ) + * g.cost_dsm_up[t] + * m.objective_weighting[t] + ) + variable_costs += ( + sum( + self.dsm_do_shift[g, h, t] + + self.balance_dsm_up[g, h, t] + for h in g.delay_time + ) + * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) * m.objective_weighting[t] - for t in m.TIMESTEPS: + else: for g in self.DR: - dr_cost += ( - sum( - self.dsm_up[g, h, t] + self.balance_dsm_do[g, h, t] - for h in g.delay_time + for p, t in m.TIMEINDEX: + variable_costs += ( + ( + sum( + self.dsm_up[g, h, t] + + self.balance_dsm_do[g, h, t] + for h in g.delay_time + ) + * g.cost_dsm_up[t] + ) + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) ) - * g.cost_dsm_up[t] - * m.objective_weighting[t] - ) - dr_cost += ( - sum( - self.dsm_do_shift[g, h, t] - + self.balance_dsm_up[g, h, t] - for h in g.delay_time + variable_costs += ( + ( + sum( + self.dsm_do_shift[g, h, t] + + self.balance_dsm_up[g, h, t] + for h in g.delay_time + ) + * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) ) - * g.cost_dsm_down_shift[t] - + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] - ) * m.objective_weighting[t] - self.cost = Expression(expr=dr_cost) + if g.fixed_costs[0] is not None: + for p in m.PERIODS: + fixed_costs += ( + max(g.max_capacity_up, g.max_capacity_down) + * g.fixed_costs[p] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + + self.variable_costs = Expression(expr=variable_costs) + self.fixed_costs = Expression(expr=fixed_costs) + self.costs = Expression(expr=variable_costs + fixed_costs) - return self.cost + return self.costs class SinkDSMDLRInvestmentBlock(ScalarBlock): @@ -3288,7 +4135,8 @@ class SinkDSMDLRInvestmentBlock(ScalarBlock): .. math:: & - (1) \quad invest_{min} \leq invest \leq invest_{max} \\ + (1) \quad invest_{min}(p) \leq invest(p) \leq invest_{max}(p) \\ + & \quad \quad \quad \quad \forall p \in \mathbb{P} & \\ & (2) \quad DSM_{h, t}^{up} = 0 \\ @@ -3300,12 +4148,11 @@ class SinkDSMDLRInvestmentBlock(ScalarBlock): \quad \textrm{if} \quad e_{shed} = \textrm{False} \\ & \\ & - (4) \quad \dot{E}_{t} = demand_{t} \cdot (invest + E_{exist}) \\ - & \quad \quad \quad \quad + \displaystyle\sum_{h=1}^{H_{DR}} - (DSM_{h, t}^{up} + (4) \quad \dot{E}_{t} = demand_{t} \cdot demand_{max}(p) \\ + & \displaystyle\sum_{h=1}^{H_{DR}} (DSM_{h, t}^{up} + DSM_{h, t}^{balanceDo} - DSM_{h, t}^{do, shift} - DSM_{h, t}^{balanceUp}) - DSM_{t}^{do, shed} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & (5) \quad DSM_{h, t}^{balanceDo} = @@ -3329,16 +4176,14 @@ class SinkDSMDLRInvestmentBlock(ScalarBlock): & (9) \quad \displaystyle\sum_{h=1}^{H_{DR}} (DSM_{h, t}^{do, shift} + DSM_{h, t}^{balanceUp}) + DSM_{t}^{do, shed} - \leq E_{t}^{do} \cdot (invest + E_{exist}) - \cdot s_{flex, do} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + \leq E_{t}^{do} \cdot P_{total}(p) \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & (10) \quad \displaystyle\sum_{h=1}^{H_{DR}} (DSM_{h, t}^{up} + DSM_{h, t}^{balanceDo}) - \leq E_{t}^{up} \cdot (invest + E_{exist}) - \cdot s_{flex, up} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + \leq E_{t}^{up} \cdot P_{total}(p) \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & (11) \quad \Delta t \cdot \displaystyle\sum_{h=1}^{H_{DR}} @@ -3354,28 +4199,25 @@ class SinkDSMDLRInvestmentBlock(ScalarBlock): & \\ & (13) \quad W_{t}^{levelDo} \leq \overline{E}_{t}^{do} - \cdot (invest + E_{exist}) - \cdot s_{flex, do} \cdot t_{shift} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + \cdot P_{total}(p) \cdot t_{shift} \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & (14) \quad W_{t}^{levelUp} \leq \overline{E}_{t}^{up} - \cdot (invest + E_{exist}) - \cdot s_{flex, up} \cdot t_{shift} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + \cdot P_{total}(p) \cdot t_{shift} \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \\ & (15) \quad \displaystyle\sum_{t=0}^{T} DSM_{t}^{do, shed} - \leq (invest + E_{exist}) - \cdot s_{flex, do} \cdot \overline{E}_{t}^{do} + \leq P_{total}(p) \cdot \overline{E}_{t}^{do} \cdot t_{shed} \cdot n^{yearLimitShed} \\ & \\ & (16) \quad \displaystyle\sum_{t=0}^{T} \sum_{h=1}^{H_{DR}} DSM_{h, t}^{do, shift} - \leq (invest + E_{exist}) - \cdot s_{flex, do} \cdot \overline{E}_{t}^{do} + \leq P_{total}(p) + \cdot \overline{E}_{t}^{do} \cdot t_{shift} \cdot n^{yearLimitShift} \\ & \quad \quad \textrm{(optional constraint)} \\ @@ -3383,15 +4225,15 @@ class SinkDSMDLRInvestmentBlock(ScalarBlock): & (17) \quad \displaystyle\sum_{t=0}^{T} \sum_{h=1}^{H_{DR}} DSM_{h, t}^{up} - \leq (invest + E_{exist}) - \cdot s_{flex, up} \cdot \overline{E}_{t}^{up} + \leq P_{total}(p) + \cdot \overline{E}_{t}^{up} \cdot t_{shift} \cdot n^{yearLimitShift} \\ & \quad \quad \textrm{(optional constraint)} \\ & (18) \quad \displaystyle\sum_{h=1}^{H_{DR}} DSM_{h, t}^{do, shift} - \leq (invest + E_{exist}) - \cdot s_{flex, do} \cdot \overline{E}_{t}^{do} + \leq P_{total}(p) + \cdot \overline{E}_{t}^{do} \cdot t_{shift} - \displaystyle\sum_{t'=1}^{t_{dayLimit}} \sum_{h=1}^{H_{DR}} DSM_{h, t - t'}^{do, shift} \\ @@ -3401,7 +4243,7 @@ class SinkDSMDLRInvestmentBlock(ScalarBlock): & (19) \quad \displaystyle\sum_{h=1}^{H_{DR}} DSM_{h, t}^{up} \leq (invest + E_{exist}) - \cdot s_{flex, up} \cdot \overline{E}_{t}^{up} + \cdot \overline{E}_{t}^{up} \cdot t_{shift} - \displaystyle\sum_{t'=1}^{t_{dayLimit}} \sum_{h=1}^{H_{DR}} DSM_{h, t - t'}^{up} \\ @@ -3411,13 +4253,12 @@ class SinkDSMDLRInvestmentBlock(ScalarBlock): & (20) \quad \displaystyle\sum_{h=1}^{H_{DR}} (DSM_{h, t}^{up} + DSM_{h, t}^{balanceDo} - + DSM_{h, t}^{do, shift} + DSM_{h, t}^{balanceUp}) - + DSM_{t}^{shed} \\ - & \quad \quad \leq \max \{E_{t}^{up} \cdot s_{flex, up}, - E_{t}^{do} \cdot s_{flex, do} \} \cdot (invest + E_{exist}) \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + + DSM_{h, t}^{do, shift} + DSM_{h, t}^{balanceUp}) \\ + & + DSM_{t}^{shed} + \leq \max \{E_{t}^{up}, E_{t}^{do} \} \cdot P_{total}(p) \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ & \quad \quad \textrm{(optional constraint)} \\ - + & Note ---- @@ -3432,24 +4273,73 @@ class SinkDSMDLRInvestmentBlock(ScalarBlock): **The following parts of the objective function are created:** - * Investment annuity: + *Standard model* + + * Investment annuity: + + .. math:: + P_{invest}(0) \cdot c_{invest}(0) + + * Variable costs: + + .. math:: + & + (\sum_{h=1}^{H_{DR}} (DSM_{h, t}^{up} + DSM_{h, t}^{balanceDo}) + \cdot cost_{t}^{dsm, up} \\ + & + \sum_{h=1}^{H_{DR}} (DSM_{h, t}^{do, shift} + + DSM_{h, t}^{balanceUp}) + \cdot cost_{t}^{dsm, do, shift} \\ + & + DSM_{t}^{do, shed} \cdot cost_{t}^{dsm, do, shed}) + \cdot \omega_{t} \\ + & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ + + *Multi-period model* + + * Investment annuity: + + .. math:: + & + P_{invest}(p) \cdot A(c_{invest}(p), l, ir) \cdot l + \cdot DF^{-p} \\ + &\\ + & + \forall p \in \mathbb{P} + + * :attr:`fixed_costs` not None for investments + + .. math:: + & + (\sum_{pp=year(p)}^{year(p)+l} + P_{invest}(p) \cdot c_{fixed}(pp) \cdot DF^{-pp}) + \cdot DF^{-p} \\ + &\\ + & + \forall p \in \mathbb{P} + + * Variable costs: + + .. math:: + & + (\sum_{h=1}^{H_{DR}} (DSM_{h, t}^{up} + DSM_{h, t}^{balanceDo}) + \cdot cost_{t}^{dsm, up} \\ + & + \sum_{h=1}^{H_{DR}} (DSM_{h, t}^{do, shift} + + DSM_{h, t}^{balanceUp}) + \cdot cost_{t}^{dsm, do, shift} \\ + & + DSM_{t}^{do, shed} \cdot cost_{t}^{dsm, do, shed}) + \cdot \omega_{t} \cdot DF^{-p} \\ + & \quad \quad \quad \quad \forall p, t \in \textrm{TIMEINDEX} \\ + + whereby: + + * :math:`A(c_{invest,var}(p), l, ir)` A is the annuity for + investment expenses :math:`c_{invest}(p)` lifetime :math:`l` + and interest rate :math:`ir` + * :math:`DF=(1+dr)` is the discount factor with discount rate + :math:`dr` - .. math:: - & - invest \cdot costs_{invest} \\ + See remarks in + :class:`oemof.solph.components.experimental._sink_dsm.SinkDSMOemofBlock`. - * Variable costs: - - .. math:: - & - (\sum_{h=1}^{H_{DR}} (DSM_{h, t}^{up} + DSM_{h, t}^{balanceDo}) - \cdot cost_{t}^{dsm, up} \\ - & + \sum_{h=1}^{H_{DR}} (DSM_{h, t}^{do, shift} - + DSM_{h, t}^{balanceUp}) - \cdot cost_{t}^{dsm, do, shift} \\ - & + DSM_{t}^{do, shed} \cdot cost_{t}^{dsm, do, shed}) - \cdot \omega_{t} \\ - & \quad \quad \quad \quad \forall t \in \mathbb{T} \\ **Table: Symbols and attribute names of variables and parameters** @@ -3458,22 +4348,22 @@ class SinkDSMDLRInvestmentBlock(ScalarBlock): * The following variables and parameters are exclusively used for investment modeling: - .. table:: Variables (V) and Parameters (P) - :widths: 1, 1, 1, 1 - - ================================= ======================== ==== ======================================= - symbol attribute type explanation - ================================= ======================== ==== ======================================= - :math:`invest` `invest` V | DSM capacity invested in - | Equals to the additionally installed capacity. - | The capacity share eligible for a shift is determined by flex share(s). - :math:`invest_{min}` `investment.minimum` P minimum investment - :math:`invest_{max}` `investment.maximum` P maximum investment - :math:`E_{exist}` `investment.existing` P existing DSM capacity - :math:`s_{flex, up}` `flex_share_up` P share of invested capacity that may be shift upwards at maximum - :math:`s_{flex, do}` `flex_share_do` P share of invested capacity that may be shift downwards at maximum - :math:`costs_{invest}` `investment.ep_costs` P specific investment annuity - ================================= ======================== ==== ======================================= + .. table:: Variables (V), Parameters (P) and Sets (S) + :widths: 25, 25, 10, 40 + + ================================= ======================== ==== ======================================= + symbol attribute type explanation + ================================= ======================== ==== ======================================= + :math:`P_{invest}(p)` `invest[p]` V | DSM capacity invested into in period p. + | Equals to the additionally shiftable resp. sheddable capacity. + :math:`invest_{min}(p)` `investment.minimum[p]` P minimum investment in period p + :math:`invest_{max}(p)` `investment.maximum[p]` P maximum investment in period p + :math:`P_{total}` `investment.total[p]` P total DSM capacity + :math:`costs_{invest}(p)` `investment.ep_costs[p]` P | specific investment annuity (standard model) resp. + | specific investment expenses (multi-period model) + :math:`\mathbb{P}` S Periods of the model + :math:`\textrm{TIMEINDEX}` S Timeindex set of the model (periods, timesteps) + ================================= ======================== ==== ======================================= """ # noqa: E501 CONSTRAINT_GROUP = True @@ -3513,22 +4403,56 @@ def _create(self, group=None): ], ) + self.OVERALL_MAXIMUM_INVESTDSM = Set( + initialize=[ + g for g in group if g.investment.overall_maximum is not None + ] + ) + + self.OVERALL_MINIMUM_INVESTDSM = Set( + initialize=[ + g for g in group if g.investment.overall_minimum is not None + ] + ) + + self.EXISTING_INVESTDSM = Set( + initialize=[g for g in group if g.investment.existing is not None] + ) + # ************* VARIABLES ***************************** # Define bounds for investments in demand response - def _dr_investvar_bound_rule(block, g): + def _dr_investvar_bound_rule(block, g, p): """Rule definition to bound the invested demand response capacity `invest`. """ - return g.investment.minimum, g.investment.maximum + return g.investment.minimum[p], g.investment.maximum[p] # Investment in DR capacity self.invest = Var( self.INVESTDR, + m.PERIODS, within=NonNegativeReals, bounds=_dr_investvar_bound_rule, ) + # Total capacity + self.total = Var(self.INVESTDR, m.PERIODS, within=NonNegativeReals) + + if m.es.periods is not None: + # Old capacity to be decommissioned (due to lifetime) + self.old = Var(self.INVESTDR, m.PERIODS, within=NonNegativeReals) + + # Old endogenous capacity to be decommissioned (due to lifetime) + self.old_end = Var( + self.INVESTDR, m.PERIODS, within=NonNegativeReals + ) + + # Old exogenous capacity to be decommissioned (due to lifetime) + self.old_exo = Var( + self.INVESTDR, m.PERIODS, within=NonNegativeReals + ) + # Variable load shift down (capacity) self.dsm_do_shift = Var( self.INVESTDR_H, m.TIMESTEPS, initialize=0, within=NonNegativeReals @@ -3566,6 +4490,185 @@ def _dr_investvar_bound_rule(block, g): # ************* CONSTRAINTS ***************************** + # Handle unit lifetimes + def _total_capacity_rule(block): + """Rule definition for determining total installed + capacity (taking decommissioning into account) + """ + for g in group: + for p in m.PERIODS: + if p == 0: + expr = ( + self.total[g, p] + == self.invest[g, p] + g.investment.existing + ) + self.total_dsm_rule.add((g, p), expr) + else: + expr = ( + self.total[g, p] + == self.invest[g, p] + + self.total[g, p - 1] + - self.old[g, p] + ) + self.total_dsm_rule.add((g, p), expr) + + self.total_dsm_rule = Constraint(group, m.PERIODS, noruleinit=True) + self.total_dsm_rule_build = BuildAction(rule=_total_capacity_rule) + + if m.es.periods is not None: + + def _old_dsm_capacity_rule_end(block): + """Rule definition for determining old endogenously installed + capacity to be decommissioned due to reaching its lifetime. + Investment and decommissioning periods are linked within + the constraint. The respective decommissioning period is + determined for every investment period based on the components + lifetime and a matrix describing its age of each endogenous + investment. Decommissioning can only occur at the beginning of + each period. + + Note + ---- + For further information on the implementation check + PR#957 https://github.com/oemof/oemof-solph/pull/957 + """ + for g in group: + lifetime = g.investment.lifetime + if lifetime is None: + msg = ( + "You have to specify a lifetime " + "for a Flow with an associated " + "investment object in " + f"a multi-period model! Value for {(g)} " + "is missing." + ) + raise ValueError(msg) + + # get the period matrix describing the temporal distance + # between all period combinations. + periods_matrix = m.es.periods_matrix + + # get the index of the minimum value in each row greater + # equal than the lifetime. This value equals the + # decommissioning period if not zero. The index of this + # value represents the investment period. If np.where + # condition is not met in any row, min value will be zero + decomm_periods = np.argmin( + np.where( + (periods_matrix >= lifetime), + periods_matrix, + np.inf, + ), + axis=1, + ) + + # no decommissioning in first period + expr = self.old_end[g, 0] == 0 + self.old_dsm_rule_end.add((g, 0), expr) + + # all periods not in decomm_periods have no decommissioning + # zero is excluded + for p in m.PERIODS: + if p not in decomm_periods and p != 0: + expr = self.old_end[g, p] == 0 + self.old_dsm_rule_end.add((g, p), expr) + + # multiple invests can be decommissioned in the same period + # but only sequential ones, thus a bookkeeping is + # introduced andconstraints are added to equation one + # iteration later. + last_decomm_p = np.nan + # loop over invest periods (values are decomm_periods) + for invest_p, decomm_p in enumerate(decomm_periods): + # Add constraint of iteration before + # (skipped in first iteration by last_decomm_p = nan) + if (decomm_p != last_decomm_p) and ( + last_decomm_p is not np.nan + ): + expr = self.old_end[g, last_decomm_p] == expr + self.old_dsm_rule_end.add((g, last_decomm_p), expr) + + # no decommissioning if decomm_p is zero + if decomm_p == 0: + # overwrite decomm_p with zero to avoid + # chaining invest periods in next iteration + last_decomm_p = 0 + + # if decomm_p is the same as the last one chain invest + # period + elif decomm_p == last_decomm_p: + expr += self.invest[g, invest_p] + # overwrite decomm_p + last_decomm_p = decomm_p + + # if decomm_p is not zero, not the same as the last one + # and it's not the first period + else: + expr = self.invest[g, invest_p] + # overwrite decomm_p + last_decomm_p = decomm_p + + # Add constraint of very last iteration + if last_decomm_p != 0: + expr = self.old_end[g, last_decomm_p] == expr + self.old_dsm_rule_end.add((g, last_decomm_p), expr) + + self.old_dsm_rule_end = Constraint( + group, m.PERIODS, noruleinit=True + ) + self.old_dsm_rule_end_build = BuildAction( + rule=_old_dsm_capacity_rule_end + ) + + def _old_dsm_capacity_rule_exo(block): + """Rule definition for determining old exogenously given + capacity to be decommissioned due to reaching its lifetime + """ + for g in group: + age = g.investment.age + lifetime = g.investment.lifetime + is_decommissioned = False + for p in m.PERIODS: + # No shutdown in first period + if p == 0: + expr = self.old_exo[g, p] == 0 + self.old_dsm_rule_exo.add((g, p), expr) + elif lifetime - age <= m.es.periods_years[p]: + # Track decommissioning status + if not is_decommissioned: + expr = ( + self.old_exo[g, p] == g.investment.existing + ) + is_decommissioned = True + else: + expr = self.old_exo[g, p] == 0 + self.old_dsm_rule_exo.add((g, p), expr) + else: + expr = self.old_exo[g, p] == 0 + self.old_dsm_rule_exo.add((g, p), expr) + + self.old_dsm_rule_exo = Constraint( + group, m.PERIODS, noruleinit=True + ) + self.old_dsm_rule_exo_build = BuildAction( + rule=_old_dsm_capacity_rule_exo + ) + + def _old_dsm_capacity_rule(block): + """Rule definition for determining (overall) old capacity + to be decommissioned due to reaching its lifetime + """ + for g in group: + for p in m.PERIODS: + expr = ( + self.old[g, p] + == self.old_end[g, p] + self.old_exo[g, p] + ) + self.old_dsm_rule.add((g, p), expr) + + self.old_dsm_rule = Constraint(group, m.PERIODS, noruleinit=True) + self.old_dsm_rule_build = BuildAction(rule=_old_dsm_capacity_rule) + def _shift_shed_vars_rule(block): """Force shifting resp. shedding variables to zero dependent on how boolean parameters for shift resp. shed eligibility @@ -3597,14 +4700,14 @@ def _input_output_relation_rule(block): The actual demand after DR. BusBlock outflow == Demand +- DR (i.e. effective Sink consumption) """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # outflow from bus - lhs = m.flow[g.inflow, g, t] + lhs = m.flow[g.inflow, g, p, t] # Demand +- DR rhs = ( - g.demand[t] * (self.invest[g] + g.investment.existing) + g.demand[t] * g.max_demand[p] + sum( self.dsm_up[g, h, t] + self.balance_dsm_do[g, h, t] @@ -3616,10 +4719,10 @@ def _input_output_relation_rule(block): ) # add constraint - block.input_output_relation.add((g, t), (lhs == rhs)) + block.input_output_relation.add((g, p, t), (lhs == rhs)) self.input_output_relation = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.input_output_relation_build = BuildAction( rule=_input_output_relation_rule @@ -3651,7 +4754,7 @@ def capacity_balance_red_rule(block): ) # no balancing for the first timestep - elif t == m.TIMESTEPS[1]: + elif t == m.TIMESTEPS.at(1): lhs = self.balance_dsm_do[g, h, t] rhs = 0 @@ -3701,7 +4804,7 @@ def capacity_balance_inc_rule(block): ) # no balancing for the first timestep - elif t == m.TIMESTEPS[1]: + elif t == m.TIMESTEPS.at(1): lhs = self.balance_dsm_up[g, h, t] rhs = 0 @@ -3737,7 +4840,7 @@ def no_comp_red_rule(block): for g in group: if g.fixes: for h in g.delay_time: - if t > m.TIMESTEPS[-1] - h: + if t > m.TIMESTEPS.at(-1) - h: # no load reduction anymore (dsm_do_shift = 0) lhs = self.dsm_do_shift[g, h, t] rhs = 0 @@ -3760,7 +4863,7 @@ def no_comp_inc_rule(block): for g in group: if g.fixes: for h in g.delay_time: - if t > m.TIMESTEPS[-1] - h: + if t > m.TIMESTEPS.at(-1) - h: # no load increase anymore (dsm_up = 0) lhs = self.dsm_up[g, h, t] rhs = 0 @@ -3779,7 +4882,7 @@ def availability_red_rule(block): """Load reduction must be smaller than or equal to the (time-dependent) capacity limit """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # load reduction lhs = ( @@ -3792,16 +4895,12 @@ def availability_red_rule(block): ) # upper bound - rhs = ( - g.capacity_down[t] - * (self.invest[g] + g.investment.existing) - * g.flex_share_down - ) + rhs = g.capacity_down[t] * self.total[g, p] # add constraint - block.availability_red.add((g, t), (lhs <= rhs)) + block.availability_red.add((g, p, t), (lhs <= rhs)) - self.availability_red = Constraint(group, m.TIMESTEPS, noruleinit=True) + self.availability_red = Constraint(group, m.TIMEINDEX, noruleinit=True) self.availability_red_build = BuildAction(rule=availability_red_rule) # Equation 4.12 @@ -3809,7 +4908,7 @@ def availability_inc_rule(block): """Load increase must be smaller than or equal to the (time-dependent) capacity limit """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: # load increase lhs = sum( @@ -3818,16 +4917,12 @@ def availability_inc_rule(block): ) # upper bound - rhs = ( - g.capacity_up[t] - * (self.invest[g] + g.investment.existing) - * g.flex_share_up - ) + rhs = g.capacity_up[t] * self.total[g, p] # add constraint - block.availability_inc.add((g, t), (lhs <= rhs)) + block.availability_inc.add((g, p, t), (lhs <= rhs)) - self.availability_inc = Constraint(group, m.TIMESTEPS, noruleinit=True) + self.availability_inc = Constraint(group, m.TIMEINDEX, noruleinit=True) self.availability_inc_build = BuildAction(rule=availability_inc_rule) # Equation 4.13 @@ -3911,7 +5006,7 @@ def dr_storage_limit_red_rule(block): """ Fictious demand response storage level for load reduction limit """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: if g.shift_eligibility: # fictious demand response load reduction storage level @@ -3920,13 +5015,12 @@ def dr_storage_limit_red_rule(block): # maximum (time-dependent) available shifting capacity rhs = ( g.capacity_down_mean - * (self.invest[g] + g.investment.existing) - * g.flex_share_down + * self.total[g, p] * g.shift_time ) # add constraint - block.dr_storage_limit_red.add((g, t), (lhs <= rhs)) + block.dr_storage_limit_red.add((g, p, t), (lhs <= rhs)) else: lhs = self.dsm_do_level[g, t] @@ -3934,10 +5028,10 @@ def dr_storage_limit_red_rule(block): rhs = 0 # add constraint - block.dr_storage_limit_red.add((g, t), (lhs <= rhs)) + block.dr_storage_limit_red.add((g, p, t), (lhs <= rhs)) self.dr_storage_limit_red = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.dr_storage_level_red_build = BuildAction( rule=dr_storage_limit_red_rule @@ -3945,27 +5039,21 @@ def dr_storage_limit_red_rule(block): # Equation 4.16 def dr_storage_limit_inc_rule(block): - """ - Fictious demand response storage level for load increase limit - """ - for t in m.TIMESTEPS: + """Fictious demand response storage level + for load increase limit""" + for p, t in m.TIMEINDEX: for g in group: # fictious demand response load reduction storage level lhs = self.dsm_up_level[g, t] # maximum (time-dependent) available shifting capacity - rhs = ( - g.capacity_up_mean - * (self.invest[g] + g.investment.existing) - * g.flex_share_up - * g.shift_time - ) + rhs = g.capacity_up_mean * self.total[g, p] * g.shift_time # add constraint - block.dr_storage_limit_inc.add((g, t), (lhs <= rhs)) + block.dr_storage_limit_inc.add((g, p, t), (lhs <= rhs)) self.dr_storage_limit_inc = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.dr_storage_level_inc_build = BuildAction( rule=dr_storage_limit_inc_rule @@ -3980,23 +5068,29 @@ def dr_yearly_limit_shed_rule(block): to the others. """ for g in group: - if g.shed_eligibility: - # sum of all load reductions - lhs = sum(self.dsm_do_shed[g, t] for t in m.TIMESTEPS) + for p in m.PERIODS: + if g.shed_eligibility: + # sum of all load reductions + lhs = sum( + self.dsm_do_shed[g, t] + for pp, t in m.TIMEINDEX + if pp == p + ) - # year limit - rhs = ( - g.capacity_down_mean - * (self.invest[g] + g.investment.existing) - * g.flex_share_down - * g.shed_time - * g.n_yearLimit_shed - ) + # year limit + rhs = ( + g.capacity_down_mean + * self.total[g, p] + * g.shed_time + * g.n_yearLimit_shed + ) - # add constraint - block.dr_yearly_limit_shed.add(g, (lhs <= rhs)) + # add constraint + block.dr_yearly_limit_shed.add((g, p), (lhs <= rhs)) - self.dr_yearly_limit_shed = Constraint(group, noruleinit=True) + self.dr_yearly_limit_shed = Constraint( + group, m.PERIODS, noruleinit=True + ) self.dr_yearly_limit_shed_build = BuildAction( rule=dr_yearly_limit_shed_rule ) @@ -4010,28 +5104,34 @@ def dr_yearly_limit_red_rule(block): """ for g in group: if g.ActivateYearLimit: - # sum of all load reductions - lhs = sum( - sum(self.dsm_do_shift[g, h, t] for h in g.delay_time) - for t in m.TIMESTEPS - ) + for p in m.PERIODS: + # sum of all load reductions + lhs = sum( + sum( + self.dsm_do_shift[g, h, t] + for h in g.delay_time + ) + for pp, t in m.TIMEINDEX + if pp == p + ) - # year limit - rhs = ( - g.capacity_down_mean - * (self.invest[g] + g.investment.existing) - * g.flex_share_down - * g.shift_time - * g.n_yearLimit_shift - ) + # year limit + rhs = ( + g.capacity_down_mean + * self.total[g, p] + * g.shift_time + * g.n_yearLimit_shift + ) - # add constraint - block.dr_yearly_limit_red.add(g, (lhs <= rhs)) + # add constraint + block.dr_yearly_limit_red.add((g, p), (lhs <= rhs)) else: pass # return(Constraint.Skip) - self.dr_yearly_limit_red = Constraint(group, noruleinit=True) + self.dr_yearly_limit_red = Constraint( + group, m.PERIODS, noruleinit=True + ) self.dr_yearly_limit_red_build = BuildAction( rule=dr_yearly_limit_red_rule ) @@ -4043,28 +5143,31 @@ def dr_yearly_limit_inc_rule(block): """ for g in group: if g.ActivateYearLimit: - # sum of all load increases - lhs = sum( - sum(self.dsm_up[g, h, t] for h in g.delay_time) - for t in m.TIMESTEPS - ) + for p in m.PERIODS: + # sum of all load increases + lhs = sum( + sum(self.dsm_up[g, h, t] for h in g.delay_time) + for pp, t in m.TIMEINDEX + if pp == p + ) - # year limit - rhs = ( - g.capacity_up_mean - * (self.invest[g] + g.investment.existing) - * g.flex_share_up - * g.shift_time - * g.n_yearLimit_shift - ) + # year limit + rhs = ( + g.capacity_up_mean + * self.total[g, p] + * g.shift_time + * g.n_yearLimit_shift + ) - # add constraint - block.dr_yearly_limit_inc.add(g, (lhs <= rhs)) + # add constraint + block.dr_yearly_limit_inc.add((g, p), (lhs <= rhs)) else: pass # return(Constraint.Skip) - self.dr_yearly_limit_inc = Constraint(group, noruleinit=True) + self.dr_yearly_limit_inc = Constraint( + group, m.PERIODS, noruleinit=True + ) self.dr_yearly_limit_inc_build = BuildAction( rule=dr_yearly_limit_inc_rule ) @@ -4075,7 +5178,7 @@ def dr_daily_limit_red_rule(block): This effectively limits DR utilization dependent on activations within previous hours. """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: if g.ActivateDayLimit: # main use case @@ -4087,9 +5190,9 @@ def dr_daily_limit_red_rule(block): ) # daily limit - rhs = g.capacity_down_mean * ( - self.invest[g] + g.investment.existing - ) * g.flex_share_down * g.shift_time - sum( + rhs = g.capacity_down_mean * self.total[ + g, p + ] * g.shift_time - sum( sum( self.dsm_do_shift[g, h, t - t_dash] for h in g.delay_time @@ -4098,7 +5201,9 @@ def dr_daily_limit_red_rule(block): ) # add constraint - block.dr_daily_limit_red.add((g, t), (lhs <= rhs)) + block.dr_daily_limit_red.add( + (g, p, t), (lhs <= rhs) + ) else: pass # return(Constraint.Skip) @@ -4107,7 +5212,7 @@ def dr_daily_limit_red_rule(block): pass # return(Constraint.Skip) self.dr_daily_limit_red = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.dr_daily_limit_red_build = BuildAction( rule=dr_daily_limit_red_rule @@ -4119,7 +5224,7 @@ def dr_daily_limit_inc_rule(block): This effectively limits DR utilization dependent on activations within previous hours. """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: if g.ActivateDayLimit: # main use case @@ -4130,9 +5235,9 @@ def dr_daily_limit_inc_rule(block): ) # daily limit - rhs = g.capacity_up_mean * ( - self.invest[g] + g.investment.existing - ) * g.flex_share_up * g.shift_time - sum( + rhs = g.capacity_up_mean * self.total[ + g, p + ] * g.shift_time - sum( sum( self.dsm_up[g, h, t - t_dash] for h in g.delay_time @@ -4141,7 +5246,9 @@ def dr_daily_limit_inc_rule(block): ) # add constraint - block.dr_daily_limit_inc.add((g, t), (lhs <= rhs)) + block.dr_daily_limit_inc.add( + (g, p, t), (lhs <= rhs) + ) else: pass # return(Constraint.Skip) @@ -4150,7 +5257,7 @@ def dr_daily_limit_inc_rule(block): pass # return(Constraint.Skip) self.dr_daily_limit_inc = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.dr_daily_limit_inc_build = BuildAction( rule=dr_daily_limit_inc_rule @@ -4162,7 +5269,7 @@ def dr_logical_constraint_rule(block): The sum of upwards and downwards shifts may not be greater than the (bigger) capacity limit. """ - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for g in group: if g.addition: # sum of load increases and reductions @@ -4178,24 +5285,69 @@ def dr_logical_constraint_rule(block): ) # maximum capacity eligibly for load shifting - rhs = max( - g.capacity_down[t] * g.flex_share_down, - g.capacity_up[t] * g.flex_share_up, - ) * (self.invest[g] + g.investment.existing) + rhs = ( + max( + g.capacity_down[t], + g.capacity_up[t], + ) + * self.total[g, p] + ) # add constraint - block.dr_logical_constraint.add((g, t), (lhs <= rhs)) + block.dr_logical_constraint.add( + (g, p, t), (lhs <= rhs) + ) else: pass # return(Constraint.Skip) self.dr_logical_constraint = Constraint( - group, m.TIMESTEPS, noruleinit=True + group, m.TIMEINDEX, noruleinit=True ) self.dr_logical_constraint_build = BuildAction( rule=dr_logical_constraint_rule ) + if m.es.periods is not None: + + def _overall_dsm_maximum_investflow_rule(block): + """Rule definition for maximum overall investment + in investment case. + """ + for g in self.OVERALL_MAXIMUM_INVESTDSM: + for p in m.PERIODS: + expr = self.total[g, p] <= g.investment.overall_maximum + self.overall_dsm_maximum.add((g, p), expr) + + self.overall_dsm_maximum = Constraint( + self.OVERALL_MAXIMUM_INVESTDSM, m.PERIODS, noruleinit=True + ) + + self.overall_maximum_build = BuildAction( + rule=_overall_dsm_maximum_investflow_rule + ) + + def _overall_minimum_dsm_investflow_rule(block): + """Rule definition for minimum overall investment + in investment case. + + Note: This is only applicable for the last period + """ + for g in self.OVERALL_MINIMUM_INVESTDSM: + expr = ( + g.investment.overall_minimum + <= self.total[g, m.PERIODS.at(-1)] + ) + self.overall_minimum.add(g, expr) + + self.overall_minimum = Constraint( + self.OVERALL_MINIMUM_INVESTDSM, noruleinit=True + ) + + self.overall_minimum_build = BuildAction( + rule=_overall_minimum_dsm_investflow_rule + ) + def _objective_expression(self): r"""Objective expression with variable and investment costs for DSM; Equation 4.23 from Gils (2015) @@ -4203,32 +5355,133 @@ def _objective_expression(self): m = self.parent_block() investment_costs = 0 + period_investment_costs = {p: 0 for p in m.PERIODS} variable_costs = 0 + fixed_costs = 0 + + if m.es.periods is None: + for g in self.INVESTDR: + for p in m.PERIODS: + if g.investment.ep_costs is not None: + investment_costs += ( + self.invest[g, p] * g.investment.ep_costs[p] + ) + else: + raise ValueError("Missing value for investment costs!") - for g in self.INVESTDR: - if g.investment.ep_costs is not None: - investment_costs += self.invest[g] * g.investment.ep_costs - else: - raise ValueError("Missing value for investment costs!") - for t in m.TIMESTEPS: - variable_costs += ( - sum( - self.dsm_up[g, h, t] + self.balance_dsm_do[g, h, t] - for h in g.delay_time + for t in m.TIMESTEPS: + variable_costs += ( + sum( + self.dsm_up[g, h, t] + self.balance_dsm_do[g, h, t] + for h in g.delay_time + ) + * g.cost_dsm_up[t] + * m.objective_weighting[t] ) - * g.cost_dsm_up[t] - * m.objective_weighting[t] - ) - variable_costs += ( - sum( - self.dsm_do_shift[g, h, t] - + self.balance_dsm_up[g, h, t] - for h in g.delay_time + variable_costs += ( + sum( + self.dsm_do_shift[g, h, t] + + self.balance_dsm_up[g, h, t] + for h in g.delay_time + ) + * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) * m.objective_weighting[t] + + else: + msg = ( + "You did not specify an interest rate.\n" + "It will be set equal to the discount_rate of {} " + "of the model as a default.\nThis corresponds to a " + "social planner point of view and does not reflect " + "microeconomic interest requirements." + ) + for g in self.INVESTDR: + if g.investment.ep_costs is not None: + lifetime = g.investment.lifetime + interest = g.investment.interest_rate + if interest == 0: + warn( + msg.format(m.discount_rate), + debugging.SuspiciousUsageWarning, + ) + interest = m.discount_rate + for p in m.PERIODS: + annuity = economics.annuity( + capex=g.investment.ep_costs[p], + n=lifetime, + wacc=interest, + ) + investment_costs_increment = ( + self.invest[g, p] + * annuity + * lifetime + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + investment_costs += investment_costs_increment + period_investment_costs[ + p + ] += investment_costs_increment + else: + raise ValueError("Missing value for investment costs!") + + for p, t in m.TIMEINDEX: + variable_costs += ( + ( + sum( + self.dsm_up[g, h, t] + + self.balance_dsm_do[g, h, t] + for h in g.delay_time + ) + * g.cost_dsm_up[t] + ) + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + variable_costs += ( + ( + sum( + self.dsm_do_shift[g, h, t] + + self.balance_dsm_up[g, h, t] + for h in g.delay_time + ) + * g.cost_dsm_down_shift[t] + + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] + ) + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) ) - * g.cost_dsm_down_shift[t] - + self.dsm_do_shed[g, t] * g.cost_dsm_down_shed[t] - ) * m.objective_weighting[t] - self.cost = Expression(expr=investment_costs + variable_costs) + if g.investment.fixed_costs[0] is not None: + lifetime = g.investment.lifetime + for p in m.PERIODS: + fixed_costs += sum( + self.invest[g, p] + * g.investment.fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range( + m.es.periods_years[p], + m.es.periods_years[p] + lifetime, + ) + ) * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + + for g in self.EXISTING_INVESTDSM: + if g.investment.fixed_costs[0] is not None: + lifetime = g.investment.lifetime + age = g.investment.age + fixed_costs += sum( + g.investment.existing + * g.investment.fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range(0, lifetime - age) + ) + + self.variable_costs = Expression(expr=variable_costs) + self.fixed_costs = Expression(expr=fixed_costs) + self.investment_costs = Expression(expr=investment_costs) + self.period_investment_costs = period_investment_costs + self.costs = Expression( + expr=investment_costs + variable_costs + fixed_costs + ) - return self.cost + return self.costs diff --git a/src/oemof/solph/constraints/__init__.py b/src/oemof/solph/constraints/__init__.py index 7f7704bf9..54a81f778 100644 --- a/src/oemof/solph/constraints/__init__.py +++ b/src/oemof/solph/constraints/__init__.py @@ -9,10 +9,14 @@ from .flow_count_limit import limit_active_flow_count from .flow_count_limit import limit_active_flow_count_by_keyword from .integral_limit import emission_limit +from .integral_limit import emission_limit_per_period from .integral_limit import generic_integral_limit +from .integral_limit import generic_periodical_integral_limit from .investment_limit import additional_investment_flow_limit from .investment_limit import investment_limit +from .investment_limit import investment_limit_per_period from .shared_limit import shared_limit +from .storage_level import storage_level_constraint __all__ = [ "equate_flows", @@ -21,8 +25,12 @@ "limit_active_flow_count", "limit_active_flow_count_by_keyword", "emission_limit", + "emission_limit_per_period", "generic_integral_limit", + "generic_periodical_integral_limit", "additional_investment_flow_limit", "investment_limit", + "investment_limit_per_period", "shared_limit", + "storage_level_constraint", ] diff --git a/src/oemof/solph/constraints/equate_flows.py b/src/oemof/solph/constraints/equate_flows.py index 286209cc3..bd9f3e725 100644 --- a/src/oemof/solph/constraints/equate_flows.py +++ b/src/oemof/solph/constraints/equate_flows.py @@ -43,17 +43,17 @@ def equate_flows(model, flows1, flows2, factor1=1, name="equate_flows"): """ def _equate_flow_groups_rule(m): - for ts in m.TIMESTEPS: - sum1_t = sum(m.flow[fi, fo, ts] for fi, fo in flows1) - sum2_t = sum(m.flow[fi, fo, ts] for fi, fo in flows2) + for p, ts in m.TIMEINDEX: + sum1_t = sum(m.flow[fi, fo, p, ts] for fi, fo in flows1) + sum2_t = sum(m.flow[fi, fo, p, ts] for fi, fo in flows2) expr = sum1_t * factor1 == sum2_t if expr is not True: - getattr(m, name).add(ts, expr) + getattr(m, name).add((p, ts), expr) setattr( model, name, - po.Constraint(model.TIMESTEPS, noruleinit=True), + po.Constraint(model.TIMEINDEX, noruleinit=True), ) setattr( model, diff --git a/src/oemof/solph/constraints/equate_variables.py b/src/oemof/solph/constraints/equate_variables.py index a9e7a983f..770062df1 100644 --- a/src/oemof/solph/constraints/equate_variables.py +++ b/src/oemof/solph/constraints/equate_variables.py @@ -67,12 +67,12 @@ def equate_variables(model, var1, var2, factor1=1, name=None): >>> bel1 = solph.buses.Bus(label='electricity1') >>> bel2 = solph.buses.Bus(label='electricity2') >>> energysystem.add(bel1, bel2) - >>> energysystem.add(solph.components.Transformer( + >>> energysystem.add(solph.components.Converter( ... label='powerline_1_2', ... inputs={bel1: solph.flows.Flow()}, ... outputs={bel2: solph.flows.Flow( ... investment=solph.Investment(ep_costs=20))})) - >>> energysystem.add(solph.components.Transformer( + >>> energysystem.add(solph.components.Converter( ... label='powerline_2_1', ... inputs={bel2: solph.flows.Flow()}, ... outputs={bel1: solph.flows.Flow( @@ -82,8 +82,8 @@ def equate_variables(model, var1, var2, factor1=1, name=None): >>> line21 = energysystem.groups['powerline_2_1'] >>> solph.constraints.equate_variables( ... om, - ... om.InvestmentFlowBlock.invest[line12, bel2], - ... om.InvestmentFlowBlock.invest[line21, bel1]) + ... om.InvestmentFlowBlock.invest[line12, bel2, 0], + ... om.InvestmentFlowBlock.invest[line21, bel1, 0]) """ # noqa: E501 if name is None: name = "_".join(["equate", str(var1), str(var2)]) diff --git a/src/oemof/solph/constraints/flow_count_limit.py b/src/oemof/solph/constraints/flow_count_limit.py index 5b9516835..07cc7ae9f 100644 --- a/src/oemof/solph/constraints/flow_count_limit.py +++ b/src/oemof/solph/constraints/flow_count_limit.py @@ -46,6 +46,7 @@ def limit_active_flow_count( ---- SimpleFlowBlock objects required to be NonConvex + **Constraint:** .. math:: N_{X,min} \le \sum_{n \in F} X_n(t) diff --git a/src/oemof/solph/constraints/integral_limit.py b/src/oemof/solph/constraints/integral_limit.py index 1c024af79..28fe427b6 100644 --- a/src/oemof/solph/constraints/integral_limit.py +++ b/src/oemof/solph/constraints/integral_limit.py @@ -6,6 +6,8 @@ SPDX-FileCopyrightText: Simon Hilpert SPDX-FileCopyrightText: Patrik Schönfeldt SPDX-FileCopyrightText: Johannes Röder +SPDX-FileCopyrightText: Johannes Kochems +SPDX-FileCopyrightText: Johannes Giehl SPDX-License-Identifier: MIT @@ -19,6 +21,7 @@ def emission_limit(om, flows=None, limit=None): r""" Short handle for generic_integral_limit() with keyword="emission_factor". + Can be used to impose an emissions budget limit in a multi-period model. Note ---- @@ -30,6 +33,22 @@ def emission_limit(om, flows=None, limit=None): ) +def emission_limit_per_period(om, flows=None, limit=None): + r""" + Short handle for generic_periodical_integral_limit() + with keyword="emission_factor". Only applicable for multi-period models. + Puts a limit on each period's emissions. + + Note + ---- + Flow objects required an attribute "emission_factor"! + + """ + generic_periodical_integral_limit( + om, keyword="emission_factor", flows=flows, limit=limit + ) + + def generic_integral_limit(om, keyword, flows=None, limit=None): r"""Set a global limit for flows weighted by attribute named keyword. The attribute named keyword has to be added @@ -57,9 +76,10 @@ def generic_integral_limit(om, keyword, flows=None, limit=None): ---- Flow objects require an attribute named like keyword! + **Constraint:** - .. math:: \sum_{i \in F_E} \sum_{t \in T} P_i(t) \cdot w_i(t) + .. math:: \sum_{i \in F_E} \sum_{t \in T} P_i(p, t) \cdot w_i(t) \cdot \tau(t) \leq M @@ -69,14 +89,14 @@ def generic_integral_limit(om, keyword, flows=None, limit=None): The symbols used are defined as follows (with Variables (V) and Parameters (P)): - ================ ==== ===================================================== - math. symbol type explanation - ================ ==== ===================================================== - :math:`P_n(t)` V power flow :math:`n` at time step :math:`t` - :math:`w_N(t)` P weight given to Flow named according to `keyword` - :math:`\tau(t)` P width of time step :math:`t` - :math:`L` P global limit given by keyword `limit` - ================ ==== ===================================================== + ================= ==== ==================================================== + math. symbol type explanation + ================= ==== ==================================================== + :math:`P_n(p, t)` V power flow :math:`n` at time index :math:`p, t` + :math:`w_N(t)` P weight given to Flow named according to `keyword` + :math:`\tau(t)` P width of time step :math:`t` + :math:`L` P global limit given by keyword `limit` + ================= ==== ==================================================== Examples -------- @@ -98,22 +118,7 @@ def generic_integral_limit(om, keyword, flows=None, limit=None): >>> model = solph.constraints.generic_integral_limit( ... model, "my_factor", flow_with_keyword, limit=777) """ - if flows is None: - flows = {} - for i, o in om.flows: - if hasattr(om.flows[i, o], keyword): - flows[(i, o)] = om.flows[i, o] - - else: - for i, o in flows: - if not hasattr(flows[i, o], keyword): - raise AttributeError( - ( - "Flow with source: {0} and target: {1} " - "has no attribute {2}." - ).format(i.label, o.label, keyword) - ) - + flows = _check_and_set_flows(om, flows, keyword) limit_name = "integral_limit_" + keyword setattr( @@ -121,11 +126,11 @@ def generic_integral_limit(om, keyword, flows=None, limit=None): limit_name, po.Expression( expr=sum( - om.flow[inflow, outflow, t] + om.flow[inflow, outflow, p, t] * om.timeincrement[t] * sequence(getattr(flows[inflow, outflow], keyword))[t] for (inflow, outflow) in flows - for t in om.TIMESTEPS + for p, t in om.TIMEINDEX ) ), ) @@ -137,3 +142,123 @@ def generic_integral_limit(om, keyword, flows=None, limit=None): ) return om + + +def generic_periodical_integral_limit(om, keyword, flows=None, limit=None): + r"""Set a global limit for flows for each period of a multi-period model + which is weighted by attribute called keyword. + The attribute named by keyword has to be added + to every flow you want to take into account. + + Total value of keyword attributes after optimization can be retrieved + calling the :attr:`om.oemof.solph.Model.integral_limit_${keyword}()`. + + Parameters + ---------- + om : oemof.solph.Model + Model to which constraints are added. + flows : dict + Dictionary holding the flows that should be considered in constraint. + Keys are (source, target) objects of the Flow. If no dictionary is + given all flows containing the keyword attribute will be + used. + keyword : string + attribute to consider + limit : sequence of float + Absolute limit of keyword attribute for the energy system. + + Note + ---- + Flow objects required an attribute named like keyword! + + + **Constraint:** + + .. math:: \sum_{i \in F_I} \sum_{t \in T} P_i(t) \cdot w_i(t) + \cdot \tau(t) \leq L(p) \forall p \in \textrm{PERIODS} + + + For the parameter and variable explanation, please refer to the docs + of generic_integral_limit. + + """ + flows = _check_and_set_flows(om, flows, keyword) + limit_name = "integral_limit_" + keyword + + if om.es.periods is None: + msg = ( + "generic_periodical_integral_limit is only applicable\n" + "for multi-period models.\nFor standard models, use " + "generic_integral_limit instead." + ) + raise ValueError(msg) + + if limit is not None: + limit = sequence(limit) + else: + msg = ( + "You have to provide a limit for each period!\n" + "If you provide a scalar value, this will be applied as a " + "limit for each period." + ) + raise ValueError(msg) + + def _periodical_integral_limit_rule(m, p): + expr = sum( + om.flow[inflow, outflow, p, t] + * om.timeincrement[t] + * sequence(getattr(flows[inflow, outflow], keyword))[t] + for (inflow, outflow) in flows + for t in m.TIMESTEPS_IN_PERIOD[p] + ) + + return expr <= limit[p] + + om.periodical_integral_limit = po.Constraint( + om.PERIODS, + rule=_periodical_integral_limit_rule, + name=limit_name + "_constraint", + ) + + return om + + +def _check_and_set_flows(om, flows, keyword): + """Checks and sets flows if needed + + Parameters + ---------- + om : oemof.solph.Model + Model to which constraints are added. + + flows : dict + Dictionary holding the flows that should be considered in constraint. + Keys are (source, target) objects of the Flow. If no dictionary is + given all flows containing the keyword attribute will be + used. + + keyword : string + attribute to consider + + Returns + ------- + flows : dict + the flows to be considered + """ + if flows is None: + flows = {} + for i, o in om.flows: + if hasattr(om.flows[i, o], keyword): + flows[(i, o)] = om.flows[i, o] + + else: + for i, o in flows: + if not hasattr(flows[i, o], keyword): + raise AttributeError( + ( + "Flow with source: {0} and target: {1} " + "has no attribute {2}." + ).format(i.label, o.label, keyword) + ) + + return flows diff --git a/src/oemof/solph/constraints/investment_limit.py b/src/oemof/solph/constraints/investment_limit.py index 819e9bdc6..cf6ea8d78 100644 --- a/src/oemof/solph/constraints/investment_limit.py +++ b/src/oemof/solph/constraints/investment_limit.py @@ -6,6 +6,8 @@ SPDX-FileCopyrightText: Simon Hilpert SPDX-FileCopyrightText: Patrik Schönfeldt SPDX-FileCopyrightText: Johannes Röder +SPDX-FileCopyrightText: Johannes Kochems +SPDX-FileCopyrightText: Johannes Giehl SPDX-License-Identifier: MIT @@ -13,10 +15,12 @@ from pyomo import environ as po +from oemof.solph._plumbing import sequence + def investment_limit(model, limit=None): r"""Set an absolute limit for the total investment costs of an investment - optimization problem: + optimization problem (over all periods in case of a multi-period model): .. math:: \sum_{investment\_costs} \leq limit @@ -36,6 +40,16 @@ def investment_rule(m): if hasattr(m, "GenericInvestmentStorageBlock"): expr += m.GenericInvestmentStorageBlock.investment_costs + + if hasattr(m, "SinkDSMOemofInvestmentBlock"): + expr += m.SinkDSMOemofInvestmentBlock.investment_costs + + if hasattr(m, "SinkDSMDIWInvestmentBlock"): + expr += m.SinkDSMDIWInvestmentBlock.investment_costs + + if hasattr(m, "SinkDSMDLRInvestmentBlock"): + expr += m.SinkDSMDLRInvestmentBlock.investment_costs + return expr <= limit model.investment_limit = po.Constraint(rule=investment_rule) @@ -43,6 +57,69 @@ def investment_rule(m): return model +def investment_limit_per_period(model, limit=None): + r"""Set an absolute limit for the total investment costs of a + investment optimization problem for each period + of the multi-period problem. + + .. math:: + \sum_{investment\_costs(p)} \leq limit(p) + \forall p \in \textrm{PERIODS} + + Parameters + ---------- + model : oemof.solph.Model + Model to which the constraint is added + limit : sequence of float, :math:`limit(p)` + Absolute limit of the investment for each period + (i.e. RHS of constraint) + """ + + if model.es.periods is None: + msg = ( + "investment_limit_per_period is only applicable " + "for multi-period models.\nIn order to create such a model, " + "explicitly set attribute `periods` of your energy system." + ) + raise ValueError(msg) + + if limit is not None: + limit = sequence(limit) + else: + msg = ( + "You have to provide an investment limit for each period!\n" + "If you provide a scalar value, this will be applied as a " + "limit for each period." + ) + raise ValueError(msg) + + def investment_period_rule(m, p): + expr = 0 + + if hasattr(m, "InvestmentFlowBlock"): + expr += m.InvestmentFlowBlock.period_investment_costs[p] + + if hasattr(m, "GenericInvestmentStorageBlock"): + expr += m.GenericInvestmentStorageBlock.period_investment_costs[p] + + if hasattr(m, "SinkDSMOemofInvestmentBlock"): + expr += m.SinkDSMOemofInvestmentBlock.period_investment_costs[p] + + if hasattr(m, "SinkDSMDIWInvestmentBlock"): + expr += m.SinkDSMDIWInvestmentBlock.period_investment_costs[p] + + if hasattr(m, "SinkDSMDLRInvestmentBlock"): + expr += m.SinkDSMDLRInvestmentBlock.period_investment_costs[p] + + return expr <= limit[p] + + model.investment_limit_per_period = po.Constraint( + model.PERIODS, rule=investment_period_rule + ) + + return model + + def additional_investment_flow_limit(model, keyword, limit=None): r""" Global limit for investment flows weighted by an attribute keyword. @@ -55,7 +132,9 @@ def additional_investment_flow_limit(model, keyword, limit=None): Total value of keyword attributes after optimization can be retrieved calling the `oemof.solph._models.Model.invest_limit_${keyword}()`. - .. math:: \sum_{i \in IF} P_i \cdot w_i \leq limit + .. math:: + \sum_{p \in \textrm{PERIODS}} + \sum_{i \in IF} P_{i}(p) \cdot w_i \leq limit With `IF` being the set of InvestmentFlows considered for the integral limit. @@ -63,15 +142,15 @@ def additional_investment_flow_limit(model, keyword, limit=None): The symbols used are defined as follows (with Variables (V) and Parameters (P)): - +---------------+------------------------------------+------+--------------------------------------------------------------+ - | symbol | attribute | type | explanation | - +===============+====================================+======+==============================================================+ - | :math:`P_{i}` | `InvestmentFlowBlock.invest[i, o]` | V | installed capacity of investment flow | - +---------------+------------------------------------+------+--------------------------------------------------------------+ - | :math:`w_i` | `keyword` | P | weight given to investment flow named according to `keyword` | - +---------------+------------------------------------+------+--------------------------------------------------------------+ - | :math:`limit` | `limit` | P | global limit given by keyword `limit` | - +---------------+------------------------------------+------+--------------------------------------------------------------+ + +------------------+---------------------------------------+------+--------------------------------------------------------------+ + | symbol | attribute | type | explanation | + +==================+=======================================+======+==============================================================+ + | :math:`P_{i}(p)` | `InvestmentFlowBlock.invest[i, o, p]` | V | invested capacity of investment flow in period p | + +------------------+---------------------------------------+------+--------------------------------------------------------------+ + | :math:`w_i` | `keyword` | P | weight given to investment flow named according to `keyword` | + +------------------+---------------------------------------+------+--------------------------------------------------------------+ + | :math:`limit` | `limit` | P | global limit given by keyword `limit` | + +------------------+---------------------------------------+------+--------------------------------------------------------------+ Parameters ---------- @@ -130,9 +209,10 @@ def additional_investment_flow_limit(model, keyword, limit=None): limit_name, po.Expression( expr=sum( - model.InvestmentFlowBlock.invest[inflow, outflow] + model.InvestmentFlowBlock.invest[inflow, outflow, p] * getattr(invest_flows[inflow, outflow], keyword) for (inflow, outflow) in invest_flows + for p in model.PERIODS ) ), ) diff --git a/src/oemof/solph/constraints/shared_limit.py b/src/oemof/solph/constraints/shared_limit.py index f3ba3aabf..4cf055b8b 100644 --- a/src/oemof/solph/constraints/shared_limit.py +++ b/src/oemof/solph/constraints/shared_limit.py @@ -33,7 +33,7 @@ def shared_limit( Parameters ---------- model : oemof.solph.Model - Model to which the constraint is added + Model to which the constraint is added. limit_name : string Name of the constraint to create quantity : pyomo.core.base.var.IndexedVar @@ -47,7 +47,7 @@ def shared_limit( lower_limit : numeric the lower limit (:math:`l_\mathrm{low}`) upper_limit : numeric - the lower limit (:math:`l_\mathrm{up}`) + the upper limit (:math:`l_\mathrm{up}`) Examples -------- diff --git a/src/oemof/solph/constraints/storage_level.py b/src/oemof/solph/constraints/storage_level.py new file mode 100644 index 000000000..15b13b017 --- /dev/null +++ b/src/oemof/solph/constraints/storage_level.py @@ -0,0 +1,173 @@ +"""A constraint to allow flows from to a storage based on the storage level. + +SPDX-FileCopyrightText: Patrik Schönfeldt +SPDX-FileCopyrightText: Johannes Kochems +SPDX-FileCopyrightText: Deutsches Zentrum für Luft- und Raumfahrt (DLR) + +SPDX-License-Identifier: MIT +""" + +from pyomo import environ as po + + +def storage_level_constraint( + model, + name, + storage_component, + multiplexer_bus, + input_levels, + output_levels, +): + r""" + Add constraints to implement storage content based access. + + As a GenericStorage just allows exactly one input and one output, + an additional bus, the multiplexer_bus, is used for the connections. + Note that all Flow objects connected to the multiplexer_bus have to have + a nominal_value. + + Parameters + ---------- + model : oemof.solph.Model + Model to which the constraint is added. + name : string + Name of the multiplexer. + storage_component : oemof.solph.components.GenericStorage + Storage component whose content should mandate + the possible inputs and outputs. + multiplexer_bus : oemof.solph.Bus + Bus which connects the input and output levels to the storage. + input_levels : dictionary with oemof.solph.Bus as keys and float as values + Dictionary of buses which act as inputs and corresponding levels + output_levels : dictionary with oemof.solph.Bus as keys and float as values + Dictionary of buses which act as outputs and corresponding level + + Verbose description can be found in https://arxiv.org/abs/2211.14080 + """ + + def _outputs(): + OUTPUTS = po.Set(initialize=output_levels.keys()) + setattr(model, f"{name}_OUTPUTS", OUTPUTS) + + active_output = po.Var( + OUTPUTS, model.TIMESTEPS, domain=po.Binary, bounds=(0, 1) + ) + setattr(model, f"{name}_active_output", active_output) + + constraint_name = f"{name}_output_active_constraint" + + def _output_active_rule(m): + r""" + .. math:: + y_n \le E(t) / E_n + """ + for t in m.TIMESTEPS: + for o in output_levels: + getattr(m, constraint_name).add( + (o, t), + m.GenericStorageBlock.storage_content[ + storage_component, t + 1 + ] + / storage_component.nominal_storage_capacity + >= active_output[o, t] * output_levels[o], + ) + + setattr( + model, + constraint_name, + po.Constraint( + OUTPUTS, + model.TIMESTEPS, + noruleinit=True, + ), + ) + setattr( + model, + constraint_name + "build", + po.BuildAction(rule=_output_active_rule), + ) + + # Define constraints on the output flows + def _constraint_output_rule(m, o, p, t): + return ( + m.flow[multiplexer_bus, o, p, t] + / m.flows[multiplexer_bus, o].nominal_value + <= active_output[o, t] + ) + + setattr( + model, + f"{name}_output_constraint", + po.Constraint( + OUTPUTS, + model.TIMEINDEX, + rule=_constraint_output_rule, + ), + ) + + _outputs() + + def _inputs(): + INPUTS = po.Set(initialize=input_levels.keys()) + setattr(model, f"{name}_INPUTS", INPUTS) + + inactive_input = po.Var( + INPUTS, model.TIMESTEPS, domain=po.Binary, bounds=(0, 1) + ) + setattr(model, f"{name}_active_input", inactive_input) + + constraint_name = f"{name}_input_active_constraint" + + def _input_active_rule(m): + r""" + .. math:: + \hat{y}_n \ge (E(t) - E_n) / E_{max} + """ + for t in m.TIMESTEPS: + for i in input_levels: + getattr(m, constraint_name).add( + (i, t), + ( + m.GenericStorageBlock.storage_content[ + storage_component, t + ] + / storage_component.nominal_storage_capacity + - input_levels[i] + ) + <= inactive_input[i, t], + ) + + setattr( + model, + constraint_name, + po.Constraint( + INPUTS, + model.TIMESTEPS, + noruleinit=True, + ), + ) + setattr( + model, + constraint_name + "build", + po.BuildAction(rule=_input_active_rule), + ) + + # Define constraints on the input flows + def _constraint_input_rule(m, i, p, t): + return ( + m.flow[i, multiplexer_bus, p, t] + / m.flows[i, multiplexer_bus].nominal_value + <= 1 - inactive_input[i, t] + ) + + setattr( + model, + f"{name}_input_constraint", + po.Constraint( + INPUTS, + model.TIMEINDEX, + rule=_constraint_input_rule, + ), + ) + + _inputs() diff --git a/src/oemof/solph/flows/_flow.py b/src/oemof/solph/flows/_flow.py index ffd699edb..03b929575 100644 --- a/src/oemof/solph/flows/_flow.py +++ b/src/oemof/solph/flows/_flow.py @@ -12,17 +12,21 @@ SPDX-FileCopyrightText: jmloenneberga SPDX-FileCopyrightText: Pierre-François Duc SPDX-FileCopyrightText: Saeed Sayadi +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT """ import math +import numbers from collections.abc import Iterable from warnings import warn import numpy as np from oemof.network import network as on +from oemof.tools import debugging +from oemof.solph._options import Investment from oemof.solph._plumbing import sequence @@ -33,14 +37,16 @@ class Flow(on.Edge): which are handled specially are noted below. For the case where a parameter can be either a scalar or an iterable, a scalar value will be converted to a sequence containing the scalar value at - every index. This sequence is then stored under the paramter's key. + every index. This sequence is then stored under the parameter's key. Parameters ---------- - nominal_value : numeric, :math:`P_{nom}` - The nominal value of the flow. If this value is set the corresponding - optimization variable of the flow object will be bounded by this value - multiplied with min(lower bound)/max(upper bound). + nominal_value : numeric, :math:`P_{nom}` or + :class:`Investment ` + The nominal value of the flow, either fixed or as an investement + optimisation. If this value is set the corresponding optimization + variable of the flow object will be bounded by this value + multiplied by min(lower bound)/max(upper bound). variable_costs : numeric (iterable or scalar), default: 0, :math:`c` The costs associated with one unit of the flow per hour. The costs for each timestep (:math:`P_t \cdot c \cdot \delta(t)`) @@ -59,7 +65,6 @@ class Flow(on.Edge): negative_gradient_limit : numeric (iterable, scalar or None) the normed *upper bound* on the negative difference (`flow[t-1] > flow[t]`) of two consecutive flow values. - full_load_time_max : numeric, :math:`t_{full\_load,max}` Upper bound on the summed flow expressed as the equivalent time that the flow would have to run at full capacity to yield the same sum. The @@ -72,11 +77,6 @@ class Flow(on.Edge): limit. integer : boolean Set True to bound the flow values to integers. - investment : :class:`Investment ` - Object indicating if a nominal_value of the flow is determined by - the optimization problem. Note: This will refer all attributes to an - investment variable rather than to the nominal_value. The nominal_value - should not be set (or set to None) if an investment object is used. nonconvex : :class:`NonConvex ` If a nonconvex flow object is added here, the flow constraints will be altered significantly as the mathematical model for the flow @@ -84,6 +84,19 @@ class Flow(on.Edge): :class:`~oemof.solph.flows._non_convex_flow_block.NonConvexFlowBlock` will be used instead of :class:`~oemof.solph.flows._simple_flow_block.SimpleFlowBlock`. + fixed_costs : numeric (iterable or scalar), :math:`c_{fixed}` + The fixed costs associated with a flow. + Note: These are only applicable for a multi-period model. + lifetime : int, :math:`l` + The lifetime of a flow (usually given in years); + once it reaches its lifetime (considering also + an initial age), the flow is forced to 0. + Note: Only applicable for a multi-period model. + age : int, :math:`a` + The initial age of a flow (usually given in years); + once it reaches its lifetime (considering also + an initial age), the flow is forced to 0. + Note: Only applicable for a multi-period model. Notes ----- @@ -121,9 +134,12 @@ def __init__( full_load_time_min=None, integer=False, bidirectional=False, - investment=None, nonconvex=None, + lifetime=None, + age=None, + fixed_costs=None, # --- BEGIN: To be removed for versions >= v0.6 --- + investment=None, summed_max=None, summed_min=None, # --- END --- @@ -136,16 +152,28 @@ def __init__( # populate with information afterwards when creating objects. # --- BEGIN: The following code can be removed for versions >= v0.6 --- + if investment is not None: + msg = ( + "For backward compatibility," + " the option investment overwrites the option nominal_value." + + " Both options cannot be set at the same time." + ) + if nominal_value is not None: + raise AttributeError(msg) + else: + warn(msg, FutureWarning) + nominal_value = investment + msg = ( - "\nThe parameter 'summed_{0}' is deprecated and will be removed " - "in version v0.6.\nRename the parameter to 'full_load_time_{0}', " - "to avoid this warning and future problems. " + "\nThe parameter '{0}' is deprecated and will be removed " + + "in version v0.6.\nUse the parameter '{1}', " + + "to avoid this warning and future problems. " ) if summed_max is not None: - warn(msg.format("max"), FutureWarning) + warn(msg.format("summed_max", "full_load_time_max"), FutureWarning) full_load_time_max = summed_max if summed_min is not None: - warn(msg.format("min"), FutureWarning) + warn(msg.format("summed_min", "full_load_time_min"), FutureWarning) full_load_time_min = summed_min # --- END --- @@ -155,23 +183,44 @@ def __init__( for attribute, value in custom_attributes.items(): setattr(self, attribute, value) + self.nominal_value = None + self.investment = None + infinite_error_msg = ( "{} must be a finite value. Passing an infinite " "value is not allowed." ) - if nominal_value is not None and not math.isfinite(nominal_value): - raise ValueError(infinite_error_msg.format("nominal_value")) - self.nominal_value = nominal_value + if isinstance(nominal_value, numbers.Real): + if not math.isfinite(nominal_value): + raise ValueError(infinite_error_msg.format("nominal_value")) + self.nominal_value = nominal_value + elif isinstance(nominal_value, Investment): + self.investment = nominal_value + + if fixed_costs is not None: + msg = ( + "Be aware that the fixed costs attribute is only\n" + "meant to be used for multi-period models.\n" + "If you wish to set up a multi-period model, explicitly " + "set the `periods` attribute of your energy system.\n" + "It has been decided to remove the `fixed_costs` " + "attribute with v0.2 for regular uses.\n" + "If you specify `fixed_costs` for a regular model, " + "it will simply be ignored." + ) + warn(msg, debugging.SuspiciousUsageWarning) + self.fixed_costs = sequence(fixed_costs) self.positive_gradient_limit = sequence(positive_gradient_limit) self.negative_gradient_limit = sequence(negative_gradient_limit) self.full_load_time_max = full_load_time_max self.full_load_time_min = full_load_time_min self.integer = integer - self.investment = investment self.nonconvex = nonconvex self.bidirectional = bidirectional + self.lifetime = lifetime + self.age = age # It is not allowed to define min or max if fix is defined. if fix is not None and (min is not None or max is not None): @@ -179,13 +228,6 @@ def __init__( "It is not allowed to define `min`/`max` if `fix` is defined." ) - # Checking for impossible attribute combinations - if self.investment and self.nominal_value is not None: - raise ValueError( - "Using the investment object the nominal_value" - " has to be set to None." - ) - need_nominal_value = [ "fix", "full_load_time_max", @@ -202,11 +244,11 @@ def __init__( the_attr = eval(attr) if the_attr is not None: raise AttributeError( - "If {} is set in a flow (except InvestmentFlow), " + f"If {attr} is set in a flow (except InvestmentFlow), " "nominal_value must be set as well.\n" - "Otherwise, it won't have any effect.".format(attr) + "Otherwise, it won't have any effect." ) - # minumum will be set even without nominal limit + # minimum will be set even without nominal limit # maximum and minimum (absolute values) should be always set, # as nominal_value or invest might be defined later diff --git a/src/oemof/solph/flows/_invest_non_convex_flow_block.py b/src/oemof/solph/flows/_invest_non_convex_flow_block.py index 1e5f1f9da..747c17f79 100644 --- a/src/oemof/solph/flows/_invest_non_convex_flow_block.py +++ b/src/oemof/solph/flows/_invest_non_convex_flow_block.py @@ -18,6 +18,7 @@ """ from pyomo.core import Binary +from pyomo.core import BuildAction from pyomo.core import Constraint from pyomo.core import Expression from pyomo.core import NonNegativeReals @@ -105,14 +106,15 @@ def _create_variables(self): # Investment-related variable similar to the # class. - def _investvar_bound_rule(block, i, o): + def _investvar_bound_rule(block, i, o, p): """Rule definition for bounds of the invest variable.""" if (i, o) in self.INVEST_NON_CONVEX_FLOWS: - return 0, m.flows[i, o].investment.maximum + return 0, m.flows[i, o].investment.maximum[p] # Create the `invest` variable for the nonconvex investment flow. self.invest = Var( self.INVEST_NON_CONVEX_FLOWS, + m.PERIODS, within=NonNegativeReals, bounds=_investvar_bound_rule, ) @@ -188,16 +190,16 @@ def _linearised_investment_constraint_1(self): """ m = self.parent_block() - def _linearization_rule_invest_non_convex_one(_, i, o, t): + def _linearization_rule_invest_non_convex_one(_, i, o, p, t): expr = ( - self.status[i, o, t] * m.flows[i, o].investment.maximum + self.status[i, o, t] * m.flows[i, o].investment.maximum[p] >= self.status_nominal[i, o, t] ) return expr return Constraint( self.MIN_FLOWS, - m.TIMESTEPS, + m.TIMEINDEX, rule=_linearization_rule_invest_non_convex_one, ) @@ -209,13 +211,13 @@ def _linearised_investment_constraint_2(self): m = self.parent_block() - def _linearization_rule_invest_non_convex_two(_, i, o, t): - expr = self.invest[i, o] >= self.status_nominal[i, o, t] + def _linearization_rule_invest_non_convex_two(_, i, o, p, t): + expr = self.invest[i, o, p] >= self.status_nominal[i, o, t] return expr return Constraint( self.MIN_FLOWS, - m.TIMESTEPS, + m.TIMEINDEX, rule=_linearization_rule_invest_non_convex_two, ) @@ -228,17 +230,18 @@ def _linearised_investment_constraint_3(self): m = self.parent_block() - def _linearization_rule_invest_non_convex_three(_, i, o, t): + def _linearization_rule_invest_non_convex_three(_, i, o, p, t): expr = ( - self.invest[i, o] - - (1 - self.status[i, o, t]) * m.flows[i, o].investment.maximum + self.invest[i, o, p] + - (1 - self.status[i, o, t]) + * m.flows[i, o].investment.maximum[p] <= self.status_nominal[i, o, t] ) return expr return Constraint( self.MIN_FLOWS, - m.TIMESTEPS, + m.TIMEINDEX, rule=_linearization_rule_invest_non_convex_three, ) @@ -270,10 +273,11 @@ def _objective_expression(self): investment_costs = 0 for i, o in self.INVEST_NON_CONVEX_FLOWS: - investment_costs += ( - self.invest[i, o] * m.flows[i, o].investment.ep_costs - + m.flows[i, o].investment.offset - ) + for p in m.PERIODS: + investment_costs += ( + self.invest[i, o, p] * m.flows[i, o].investment.ep_costs[p] + + m.flows[i, o].investment.offset[p] + ) self.investment_costs = Expression(expr=investment_costs) @@ -292,12 +296,22 @@ def _minimum_invest_constraint(self): """ m = self.parent_block() - def _min_invest_rule(_, i, o): + def _min_invest_rule(_): """Rule definition for applying a minimum investment""" - expr = m.flows[i, o].investment.minimum <= self.invest[i, o] - return expr + for i, o in self.INVEST_NON_CONVEX_FLOWS: + for p in m.PERIODS: + expr = ( + m.flows[i, o].investment.minimum[p] + <= self.invest[i, o, p] + ) + self.minimum_investment.add((i, o, p), expr) + + self.minimum_investment = Constraint( + self.INVEST_NON_CONVEX_FLOWS, m.PERIODS, noruleinit=True + ) + self.minimum_rule_build = BuildAction(rule=_min_invest_rule) - return Constraint(self.INVEST_NON_CONVEX_FLOWS, rule=_min_invest_rule) + return self.minimum_investment def _maximum_invest_constraint(self): r""" @@ -306,9 +320,19 @@ def _maximum_invest_constraint(self): """ m = self.parent_block() - def _max_invest_rule(_, i, o): + def _max_invest_rule(_): """Rule definition for applying a minimum investment""" - expr = self.invest[i, o] <= m.flows[i, o].investment.maximum - return expr + for i, o in self.INVEST_NON_CONVEX_FLOWS: + for p in m.PERIODS: + expr = ( + self.invest[i, o, p] + <= m.flows[i, o].investment.maximum[p] + ) + self.maximum_investment.add((i, o, p), expr) + + self.maximum_investment = Constraint( + self.INVEST_NON_CONVEX_FLOWS, m.PERIODS, noruleinit=True + ) + self.maximum_rule_build = BuildAction(rule=_max_invest_rule) - return Constraint(self.INVEST_NON_CONVEX_FLOWS, rule=_max_invest_rule) + return self.maximum_investment diff --git a/src/oemof/solph/flows/_investment_flow_block.py b/src/oemof/solph/flows/_investment_flow_block.py index f5ab52f51..9ee4122e3 100644 --- a/src/oemof/solph/flows/_investment_flow_block.py +++ b/src/oemof/solph/flows/_investment_flow_block.py @@ -10,12 +10,18 @@ SPDX-FileCopyrightText: Birgit Schachler SPDX-FileCopyrightText: jnnr SPDX-FileCopyrightText: jmloenneberga +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT """ +from warnings import warn +import numpy as np +from oemof.tools import debugging +from oemof.tools import economics from pyomo.core import Binary +from pyomo.core import BuildAction from pyomo.core import Constraint from pyomo.core import Expression from pyomo.core import NonNegativeReals @@ -36,11 +42,23 @@ class InvestmentFlowBlock(ScalarBlock): See :class:`oemof.solph.options.Investment` for all parameters of the *Investment* class. - See :class:`oemof.solph.network.SimpleFlowBlock` for all parameters of the *SimpleFlowBlock* - class. + See :class:`oemof.solph.flows._simple_flow_block.SimpleFlowBlock` + for all parameters of the *SimpleFlowBlock* class. - The total value of all costs of all *InvestmentFlowBlock* can be retrieved - calling :meth:`om.InvestmentFlowBlock.investment_costs.expr()`. + The overall summed cost expressions for all *InvestmentFlowBlock* objects + can be accessed by + + * :attr:`om.InvestmentFlowBlock.investment_costs`, + * :attr:`om.InvestmentFlowBlock.fixed_costs` and + * :attr:`om.InvestmentFlowBlock.costs`. + + Their values after optimization can be retrieved by + + * :meth:`om.InvestmentFlowBlock.investment_costs`, + * :attr:`om.InvestmentFlowBlock.period_investment_costs` (yielding a dict + keyed by periods); note: this is not a Pyomo expression, but calculated, + * :meth:`om.InvestmentFlowBlock.fixed_costs` and + * :meth:`om.InvestmentFlowBlock.costs`. Note ---- @@ -130,97 +148,253 @@ def _create_sets(self, group): ] ) + self.EXISTING_INVESTFLOWS = Set( + initialize=[ + (g[0], g[1]) + for g in group + if g[2].investment.existing is not None + ] + ) + + self.OVERALL_MAXIMUM_INVESTFLOWS = Set( + initialize=[ + (g[0], g[1]) + for g in group + if g[2].investment.overall_maximum is not None + ] + ) + + self.OVERALL_MINIMUM_INVESTFLOWS = Set( + initialize=[ + (g[0], g[1]) + for g in group + if g[2].investment.overall_minimum is not None + ] + ) + def _create_variables(self, _): r"""Creates all variables for investment flows. - All *InvestmentFlowBlock* are indexed by a starting and ending node - :math:`(i, o)`, which is omitted in the following for the sake - of convenience. The following variables are created: + All *InvestmentFlowBlock* objects are indexed by a starting and + ending node :math:`(i, o)`, which is omitted in the following + for the sake of convenience. The following variables are created: - * :math:`P(t)` + * :math:`P(p, t)` Actual flow value - (created in :class:`oemof.solph.models.BaseModel`). + (created in :class:`oemof.solph.models.BaseModel`), + indexed by tuple of periods p and timestep t + + * :math:`P_{invest}(p)` + + Value of the investment variable in period p, + equal to what is being invested and equivalent resp. similar to + the nominal value of the flows after optimization. + + * :math:`P_{total}(p)` + + Total installed capacity / energy in period p, + equivalent to the nominal value of the flows after optimization. + + * :math:`P_{old}(p)` - * :math:`P_{invest}` + Old capacity / energy to be decommissioned in period p + due to reaching its lifetime; applicable only + for multi-period models. - Value of the investment variable, i.e. equivalent to the nominal - value of the flows after optimization. + * :math:`P_{old,exo}(p)` - * :math:`Y_{invest}` + Old exogenous capacity / energy to be decommissioned in period p + due to reaching its lifetime, i.e. the amount that has + been specified by :attr:`existing` when it is decommisioned; + applicable only for multi-period models. - Binary variable for the status of the investment, if - :attr:`nonconvex` is `True`. + * :math:`P_{old,end}(p)` + + Old endogenous capacity / energy to be decommissioned in period p + due to reaching its lifetime, i.e. the amount that has been + invested in by the model itself that is decommissioned in + a later period because of reaching its lifetime; + applicable only for multi-period models. + + * :math:`Y_{invest}(p)` + + Binary variable for the status of the investment, if + :attr:`nonconvex` is `True`. """ m = self.parent_block() - def _investvar_bound_rule(block, i, o): + def _investvar_bound_rule(block, i, o, p): """Rule definition for bounds of invest variable.""" if (i, o) in self.CONVEX_INVESTFLOWS: return ( - m.flows[i, o].investment.minimum, - m.flows[i, o].investment.maximum, + m.flows[i, o].investment.minimum[p], + m.flows[i, o].investment.maximum[p], ) elif (i, o) in self.NON_CONVEX_INVESTFLOWS: - return 0, m.flows[i, o].investment.maximum + return 0, m.flows[i, o].investment.maximum[p] - # create invest variable for a investment flow + # create invest variable for an investment flow self.invest = Var( self.INVESTFLOWS, + m.PERIODS, within=NonNegativeReals, bounds=_investvar_bound_rule, ) + # Total capacity + self.total = Var(self.INVESTFLOWS, m.PERIODS, within=NonNegativeReals) + + if m.es.periods is not None: + self.old = Var( + self.INVESTFLOWS, m.PERIODS, within=NonNegativeReals + ) + + # Old endogenous capacity to be decommissioned (due to lifetime) + self.old_end = Var( + self.INVESTFLOWS, m.PERIODS, within=NonNegativeReals + ) + + # Old exogenous capacity to be decommissioned (due to lifetime) + self.old_exo = Var( + self.INVESTFLOWS, m.PERIODS, within=NonNegativeReals + ) + # create status variable for a non-convex investment flow - self.invest_status = Var(self.NON_CONVEX_INVESTFLOWS, within=Binary) + self.invest_status = Var( + self.NON_CONVEX_INVESTFLOWS, m.PERIODS, within=Binary + ) def _create_constraints(self): r"""Creates all constraints for standard flows. Depending on the attributes of the *InvestmentFlowBlock* and *SimpleFlowBlock*, different constraints are created. - The following constraint is created for all - *InvestmentFlowBlock*: + The following constraints are created + for all *InvestmentFlowBlock* objects:\ - Upper bound for the flow value + Total capacity / energy .. math:: - P(t) \le ( P_{invest} + P_{exist} ) \cdot f_{max}(t) + & + if \quad p=0:\\ + & + P_{total}(p) = P_{invest}(p) + P_{exist}(p) \\ + &\\ + & + else:\\ + & + P_{total}(p) = P_{total}(p-1) + P_{invest}(p) - P_{old}(p) \\ + &\\ + & + \forall p \in \textrm{PERIODS} + + Upper bound for the flow value + + .. math:: + & + P(p, t) \le ( P_{total}(p) ) \cdot f_{max}(t) \\ + & + \forall p, t \in \textrm{TIMEINDEX} + + For a multi-period model, the old capacity is defined as follows: + + .. math:: + & + P_{old}(p) = P_{old,exo}(p) + P_{old,end}(p)\\ + &\\ + & + if \quad p=0:\\ + & + P_{old,end}(p) = 0\\ + &\\ + & + else \quad if \quad l \leq year(p):\\ + & + P_{old,end}(p) = P_{invest}(p_{comm})\\ + &\\ + & + else:\\ + & + P_{old,end}(p)\\ + &\\ + & + if \quad p=0:\\ + & + P_{old,exo}(p) = 0\\ + &\\ + & + else \quad if \quad l - a \leq year(p):\\ + & + P_{old,exo}(p) = P_{exist} (*)\\ + &\\ + & + else:\\ + & + P_{old,exo}(p) = 0\\ + &\\ + & + \forall p \in \textrm{PERIODS} - Depeding on the attribute :attr:`nonconvex`, the constraints for - the bounds of the decision variable :math:`P_{invest}` are different: + whereby: + + * (*) is only performed for the first period the condition + is True. A decommissioning flag is then set to True + to prevent having falsely added old capacity in future periods. + * :math:`year(p)` is the year corresponding to period p + * :math:`p_{comm}` is the commissioning period of the flow + (which is determined by the model itself) + + Depending on the attribute :attr:`nonconvex`, the constraints for the + bounds of the decision variable :math:`P_{invest}(p)` are different:\ * :attr:`nonconvex = False` .. math:: - P_{invest, min} \le P_{invest} \le P_{invest, max} + & + P_{invest, min}(p) \le P_{invest}(p) \le P_{invest, max}(p) \\ + & + \forall p \in \textrm{PERIODS} * :attr:`nonconvex = True` .. math:: & - P_{invest, min} \cdot Y_{invest} \le P_{invest}\\ + P_{invest, min}(p) \cdot Y_{invest}(p) \le P_{invest}(p)\\ & - P_{invest} \le P_{invest, max} \cdot Y_{invest}\\ + P_{invest}(p) \le P_{invest, max}(p) \cdot Y_{invest}(p)\\ + &\\ + & + \forall p \in \textrm{PERIODS} - For all *InvestmentFlowBlock* (independent of the attribute - :attr:`nonconvex`), the following additional constraints are created, - if the appropriate attribute of the *SimpleFlowBlock* (see - :class:`oemof.solph.network.SimpleFlowBlock`) is set: + For all *InvestmentFlowBlock* objects + (independent of the attribute :attr:`nonconvex`), + the following additional constraints are created, if the appropriate + attribute of the *SimpleFlowBlock* + (see :class:`oemof.solph.flows._simple_flow_block.SimpleFlowBlock`) + is set: * :attr:`fix` is not None Actual value constraint for investments with fixed flow values .. math:: - P(t) = ( P_{invest} + P_{exist} ) \cdot f_{fix}(t) + & + P(p, t) = P_{total}(p) \cdot f_{fix}(t) \\ + &\\ + & + \forall p, t \in \textrm{TIMEINDEX} * :attr:`min != 0` Lower bound for the flow values .. math:: - P(t) \geq ( P_{invest} + P_{exist} ) \cdot f_{min}(t) + & + P(p, t) \geq P_{total}(p) \cdot f_{min}(t) \\ + &\\ + & + \forall p, t \in \textrm{TIMEINDEX} * :attr:`full_load_time_max is not None` @@ -228,7 +402,7 @@ def _create_constraints(self): (e.g. maximum full load hours) .. math:: - \sum_t P(t) \cdot \tau(t) \leq ( P_{invest} + P_{exist} ) + \sum_{p, t} P(p, t) \cdot \tau(t) \leq P_{total}(p) \cdot t_{full\_load, min} * :attr:`full_load_time_min is not None` @@ -237,65 +411,277 @@ def _create_constraints(self): (e.g. minimum full load hours) .. math:: - \sum_t P(t) \cdot \tau(t) \geq ( P_{invest} + P_{exist} ) + \sum_{p, t} P(t) \cdot \tau(t) \geq P_{total} \cdot t_{full\_load, min} + + * :attr:`overall_maximum` is not None + (for multi-period model only) + + Overall maximum of total installed capacity / energy for flow + + .. math:: + & + P_{total}(p) \leq P_{overall,max} \\ + &\\ + & + \forall p \in \textrm{PERIODS} + + * :attr:`overall_minimum` is not None + (for multi-period model only) + + Overall minimum of total installed capacity / energy for flow; + applicable only in last period + + .. math:: + P_{total}(p_{last}) \geq P_{overall,min} """ m = self.parent_block() self.minimum_rule = self._minimum_investment_constraint() self.maximum_rule = self._maximum_investment_constraint() - def _investflow_fixed_rule(block, i, o, t): - """Rule definition of constraint to fix flow variable - of investment flow to (normed) actual value + # Handle unit lifetimes + def _total_capacity_rule(block): + """Rule definition for determining total installed + capacity (taking decommissioning into account) """ - expr = m.flow[i, o, t] == ( - (m.flows[i, o].investment.existing + self.invest[i, o]) - * m.flows[i, o].fix[t] + for i, o in self.INVESTFLOWS: + for p in m.PERIODS: + if p == 0: + expr = ( + self.total[i, o, p] + == self.invest[i, o, p] + + m.flows[i, o].investment.existing + ) + self.total_rule.add((i, o, p), expr) + # applicable for multi-period model only + else: + expr = ( + self.total[i, o, p] + == self.invest[i, o, p] + + self.total[i, o, p - 1] + - self.old[i, o, p] + ) + self.total_rule.add((i, o, p), expr) + + self.total_rule = Constraint( + self.INVESTFLOWS, m.PERIODS, noruleinit=True + ) + self.total_rule_build = BuildAction(rule=_total_capacity_rule) + + if m.es.periods is not None: + + def _old_capacity_rule_end(block): + """Rule definition for determining old endogenously installed + capacity to be decommissioned due to reaching its lifetime. + Investment and decommissioning periods are linked within + the constraint. The respective decommissioning period is + determined for every investment period based on the components + lifetime and a matrix describing its age of each endogenous + investment. Decommissioning can only occur at the beginning of + each period. + + Note + ---- + For further information on the implementation check + PR#957 https://github.com/oemof/oemof-solph/pull/957 + """ + for i, o in self.INVESTFLOWS: + lifetime = m.flows[i, o].investment.lifetime + if lifetime is None: + msg = ( + "You have to specify a lifetime " + "for a Flow with an associated " + "investment object in " + f"a multi-period model! Value for {(i, o)} " + "is missing." + ) + raise ValueError(msg) + + # get the period matrix describing the temporal distance + # between all period combinations. + periods_matrix = m.es.periods_matrix + + # get the index of the minimum value in each row greater + # equal than the lifetime. This value equals the + # decommissioning period if not zero. The index of this + # value represents the investment period. If np.where + # condition is not met in any row, min value will be zero + decomm_periods = np.argmin( + np.where( + (periods_matrix >= lifetime), + periods_matrix, + np.inf, + ), + axis=1, + ) + + # no decommissioning in first period + expr = self.old_end[i, o, 0] == 0 + self.old_rule_end.add((i, o, 0), expr) + + # all periods not in decomm_periods have no decommissioning + # zero is excluded + for p in m.PERIODS: + if p not in decomm_periods and p != 0: + expr = self.old_end[i, o, p] == 0 + self.old_rule_end.add((i, o, p), expr) + + # multiple invests can be decommissioned in the same period + # but only sequential ones, thus a bookkeeping is + # introduced andconstraints are added to equation one + # iteration later. + last_decomm_p = np.nan + # loop over invest periods (values are decomm_periods) + for invest_p, decomm_p in enumerate(decomm_periods): + # Add constraint of iteration before + # (skipped in first iteration by last_decomm_p = nan) + if (decomm_p != last_decomm_p) and ( + last_decomm_p is not np.nan + ): + expr = self.old_end[i, o, last_decomm_p] == expr + self.old_rule_end.add((i, o, last_decomm_p), expr) + + # no decommissioning if decomm_p is zero + if decomm_p == 0: + # overwrite decomm_p with zero to avoid + # chaining invest periods in next iteration + last_decomm_p = 0 + + # if decomm_p is the same as the last one chain invest + # period + elif decomm_p == last_decomm_p: + expr += self.invest[i, o, invest_p] + # overwrite decomm_p + last_decomm_p = decomm_p + + # if decomm_p is not zero, not the same as the last one + # and it's not the first period + else: + expr = self.invest[i, o, invest_p] + # overwrite decomm_p + last_decomm_p = decomm_p + + # Add constraint of very last iteration + if last_decomm_p != 0: + expr = self.old_end[i, o, last_decomm_p] == expr + self.old_rule_end.add((i, o, last_decomm_p), expr) + + self.old_rule_end = Constraint( + self.INVESTFLOWS, m.PERIODS, noruleinit=True + ) + self.old_rule_end_build = BuildAction(rule=_old_capacity_rule_end) + + def _old_capacity_rule_exo(block): + """Rule definition for determining old exogenously given + capacity to be decommissioned due to reaching its lifetime + """ + for i, o in self.INVESTFLOWS: + age = m.flows[i, o].investment.age + lifetime = m.flows[i, o].investment.lifetime + is_decommissioned = False + for p in m.PERIODS: + # No shutdown in first period + if p == 0: + expr = self.old_exo[i, o, p] == 0 + self.old_rule_exo.add((i, o, p), expr) + elif lifetime - age <= m.es.periods_years[p]: + # Track decommissioning status + if not is_decommissioned: + expr = ( + self.old_exo[i, o, p] + == m.flows[i, o].investment.existing + ) + is_decommissioned = True + else: + expr = self.old_exo[i, o, p] == 0 + self.old_rule_exo.add((i, o, p), expr) + else: + expr = self.old_exo[i, o, p] == 0 + self.old_rule_exo.add((i, o, p), expr) + + self.old_rule_exo = Constraint( + self.INVESTFLOWS, m.PERIODS, noruleinit=True + ) + self.old_rule_exo_build = BuildAction(rule=_old_capacity_rule_exo) + + def _old_capacity_rule(block): + """Rule definition for determining (overall) old capacity + to be decommissioned due to reaching its lifetime + """ + for i, o in self.INVESTFLOWS: + for p in m.PERIODS: + expr = ( + self.old[i, o, p] + == self.old_end[i, o, p] + self.old_exo[i, o, p] + ) + self.old_rule.add((i, o, p), expr) + + self.old_rule = Constraint( + self.INVESTFLOWS, m.PERIODS, noruleinit=True ) + self.old_rule_build = BuildAction(rule=_old_capacity_rule) - return expr + def _investflow_fixed_rule(block): + """Rule definition of constraint to fix flow variable + of investment flow to (normed) actual value + """ + for i, o in self.FIXED_INVESTFLOWS: + for p, t in m.TIMEINDEX: + expr = ( + m.flow[i, o, p, t] + == self.total[i, o, p] * m.flows[i, o].fix[t] + ) + self.fixed.add((i, o, p, t), expr) self.fixed = Constraint( - self.FIXED_INVESTFLOWS, m.TIMESTEPS, rule=_investflow_fixed_rule + self.FIXED_INVESTFLOWS, m.TIMEINDEX, noruleinit=True ) + self.fixed_build = BuildAction(rule=_investflow_fixed_rule) - def _max_investflow_rule(block, i, o, t): + def _max_investflow_rule(block): """Rule definition of constraint setting an upper bound of flow variable in investment case. """ - expr = m.flow[i, o, t] <= ( - (m.flows[i, o].investment.existing + self.invest[i, o]) - * m.flows[i, o].max[t] - ) - return expr + for i, o in self.NON_FIXED_INVESTFLOWS: + for p, t in m.TIMEINDEX: + expr = ( + m.flow[i, o, p, t] + <= self.total[i, o, p] * m.flows[i, o].max[t] + ) + self.max.add((i, o, p, t), expr) self.max = Constraint( - self.NON_FIXED_INVESTFLOWS, m.TIMESTEPS, rule=_max_investflow_rule + self.NON_FIXED_INVESTFLOWS, m.TIMEINDEX, noruleinit=True ) + self.max_build = BuildAction(rule=_max_investflow_rule) - def _min_investflow_rule(block, i, o, t): + def _min_investflow_rule(block): """Rule definition of constraint setting a lower bound on flow variable in investment case. """ - expr = m.flow[i, o, t] >= ( - (m.flows[i, o].investment.existing + self.invest[i, o]) - * m.flows[i, o].min[t] - ) - return expr + for i, o in self.MIN_INVESTFLOWS: + for p, t in m.TIMEINDEX: + expr = ( + m.flow[i, o, p, t] + >= self.total[i, o, p] * m.flows[i, o].min[t] + ) + self.min.add((i, o, p, t), expr) self.min = Constraint( - self.MIN_INVESTFLOWS, m.TIMESTEPS, rule=_min_investflow_rule + self.MIN_INVESTFLOWS, m.TIMEINDEX, noruleinit=True ) + self.min_build = BuildAction(rule=_min_investflow_rule) def _full_load_time_max_investflow_rule(_, i, o): """Rule definition for build action of max. sum flow constraint in investment case. """ expr = sum( - m.flow[i, o, t] * m.timeincrement[t] for t in m.TIMESTEPS - ) <= m.flows[i, o].full_load_time_max * ( - self.invest[i, o] + m.flows[i, o].investment.existing + m.flow[i, o, p, t] * m.timeincrement[t] for p, t in m.TIMEINDEX + ) <= ( + m.flows[i, o].full_load_time_max + * sum(self.total[i, o, p] for p in m.PERIODS) ) return expr @@ -309,9 +695,9 @@ def _full_load_time_min_investflow_rule(_, i, o): in investment case. """ expr = sum( - m.flow[i, o, t] * m.timeincrement[t] for t in m.TIMESTEPS + m.flow[i, o, p, t] * m.timeincrement[t] for p, t in m.TIMEINDEX ) >= ( - (m.flows[i, o].investment.existing + self.invest[i, o]) + sum(self.total[i, o, p] for p in m.PERIODS) * m.flows[i, o].full_load_time_min ) return expr @@ -321,69 +707,283 @@ def _full_load_time_min_investflow_rule(_, i, o): rule=_full_load_time_min_investflow_rule, ) + if m.es.periods is not None: + + def _overall_maximum_investflow_rule(block): + """Rule definition for maximum overall investment + in investment case. + """ + for i, o in self.OVERALL_MAXIMUM_INVESTFLOWS: + for p in m.PERIODS: + expr = ( + self.total[i, o, p] + <= m.flows[i, o].investment.overall_maximum + ) + self.overall_maximum.add((i, o, p), expr) + + self.overall_maximum = Constraint( + self.OVERALL_MAXIMUM_INVESTFLOWS, m.PERIODS, noruleinit=True + ) + self.overall_maximum_build = BuildAction( + rule=_overall_maximum_investflow_rule + ) + + def _overall_minimum_investflow_rule(block, i, o): + """Rule definition for minimum overall investment + in investment case. + + Note: This is only applicable for the last period + """ + expr = ( + m.flows[i, o].investment.overall_minimum + <= self.total[i, o, m.PERIODS[-1]] + ) + return expr + + self.overall_minimum = Constraint( + self.OVERALL_MINIMUM_INVESTFLOWS, + rule=_overall_minimum_investflow_rule, + ) + def _objective_expression(self): r"""Objective expression for flows with investment attribute of type - class:`.Investment`. The returned costs are fixed, variable and - investment costs. + class:`.Investment`. The returned costs are fixed and + investment costs. Variable costs are added from the standard flow + objective expression. + + Objective terms for a standard model and a multi-period model differ + quite strongly. Besides, the part of the objective function added by + the *InvestmentFlowBlock* also depends on whether a convex + or nonconvex *InvestmentFlowBlock* is selected. + The following parts of the objective function are created: + + *Standard model* + + * :attr:`nonconvex = False` + + .. math:: + P_{invest}(0) \cdot c_{invest,var}(0) + + * :attr:`nonconvex = True` + + .. math:: + P_{invest}(0) \cdot c_{invest,var}(0) + + c_{invest,fix}(0) \cdot Y_{invest}(0) \\ + + Whereby 0 denotes the 0th (investment) period since + in a standard model, there is only this one period. + + *Multi-period model* + + * :attr:`nonconvex = False` + + .. math:: + & + P_{invest}(p) \cdot A(c_{invest,var}(p), l, ir) \cdot l + \cdot DF^{-p}\\ + &\\ + & + \forall p \in \textrm{PERIODS} + + * :attr:`nonconvex = True` - The part of the objective function added by the *InvestmentFlowBlock* - also depends on whether a convex or nonconvex - *InvestmentFlowBlock* is selected. The following parts of the - objective function are created: + .. math:: + & + (P_{invest}(p) \cdot A(c_{invest,var}(p), l, ir) \cdot l + + c_{invest,fix}(p) \cdot b_{invest}(p)) \cdot DF^{-p} \\ + &\\ + & + \forall p \in \textrm{PERIODS} - * :attr:`nonconvex = False` + * :attr:`fixed_costs` not None for investments + + .. math:: + & + (\sum_{pp=year(p)}^{year(p)+l} + P_{invest}(p) \cdot c_{fixed}(pp) \cdot DF^{-pp}) + \cdot DF^{-p}\\ + &\\ + & + \forall p \in \textrm{PERIODS} + + * :attr:`fixed_costs` not None for existing capacity + + .. math:: + \sum_{pp=0}^{l-a} P_{exist} \cdot c_{fixed}(pp) + \cdot DF^{-pp} + + + whereby: + + * :math:`A(c_{invest,var}(p), l, ir)` A is the annuity for + investment expenses :math:`c_{invest,var}(p)` lifetime :math:`l` + and interest rate :math:`ir` + * :math:`DF=(1+dr)` is the discount factor with discount rate + :math:`dr` + + The annuity hereby is: .. math:: - P_{invest} \cdot c_{invest,var} - * :attr:`nonconvex = True` + A(c_{invest,var}(p), l, ir) = c_{invest,var}(p) \cdot + \frac {(1+i)^l \cdot i} {(1+i)^l - 1} \cdot - .. math:: - P_{invest} \cdot c_{invest,var} - + c_{invest,fix} \cdot Y_{invest}\\ + It is retrieved, using oemof.tools.economics annuity function. The + interest rate is defined as a weighted average costs of capital (wacc) + and assumed constant over time. """ if not hasattr(self, "INVESTFLOWS"): return 0 m = self.parent_block() investment_costs = 0 - - for i, o in self.CONVEX_INVESTFLOWS: - investment_costs += ( - self.invest[i, o] * m.flows[i, o].investment.ep_costs - ) - for i, o in self.NON_CONVEX_INVESTFLOWS: - investment_costs += ( - self.invest[i, o] * m.flows[i, o].investment.ep_costs - + self.invest_status[i, o] * m.flows[i, o].investment.offset + period_investment_costs = {p: 0 for p in m.PERIODS} + fixed_costs = 0 + + if m.es.periods is None: + for i, o in self.CONVEX_INVESTFLOWS: + for p in m.PERIODS: + investment_costs += ( + self.invest[i, o, p] + * m.flows[i, o].investment.ep_costs[p] + ) + + for i, o in self.NON_CONVEX_INVESTFLOWS: + for p in m.PERIODS: + investment_costs += ( + self.invest[i, o, p] + * m.flows[i, o].investment.ep_costs[p] + + self.invest_status[i, o, p] + * m.flows[i, o].investment.offset[p] + ) + + else: + msg = ( + "You did not specify an interest rate.\n" + "It will be set equal to the discount_rate of {} " + "of the model as a default.\nThis corresponds to a " + "social planner point of view and does not reflect " + "microeconomic interest requirements." ) + for i, o in self.CONVEX_INVESTFLOWS: + lifetime = m.flows[i, o].investment.lifetime + interest = m.flows[i, o].investment.interest_rate + if interest == 0: + warn( + msg.format(m.discount_rate), + debugging.SuspiciousUsageWarning, + ) + interest = m.discount_rate + for p in m.PERIODS: + annuity = economics.annuity( + capex=m.flows[i, o].investment.ep_costs[p], + n=lifetime, + wacc=interest, + ) + investment_costs_increment = ( + self.invest[i, o, p] + * annuity + * lifetime + * ((1 + m.discount_rate) ** (-m.es.periods_years[p])) + ) + investment_costs += investment_costs_increment + period_investment_costs[p] += investment_costs_increment + + for i, o in self.NON_CONVEX_INVESTFLOWS: + lifetime = m.flows[i, o].investment.lifetime + interest = m.flows[i, o].investment.interest_rate + if interest == 0: + warn( + msg.format(m.discount_rate), + debugging.SuspiciousUsageWarning, + ) + interest = m.discount_rate + for p in m.PERIODS: + annuity = economics.annuity( + capex=m.flows[i, o].investment.ep_costs[p], + n=lifetime, + wacc=interest, + ) + investment_costs_increment = ( + self.invest[i, o, p] * annuity * lifetime + + self.invest_status[i, o, p] + * m.flows[i, o].investment.offset[p] + ) * ((1 + m.discount_rate) ** (-m.es.periods_years[p])) + investment_costs += investment_costs_increment + period_investment_costs[p] += investment_costs_increment + + for i, o in self.INVESTFLOWS: + if m.flows[i, o].investment.fixed_costs[0] is not None: + lifetime = m.flows[i, o].investment.lifetime + for p in m.PERIODS: + fixed_costs += sum( + self.invest[i, o, p] + * m.flows[i, o].investment.fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range( + m.es.periods_years[p], + m.es.periods_years[p] + lifetime, + ) + ) * ((1 + m.discount_rate) ** (-m.es.periods_years[p])) + + for i, o in self.EXISTING_INVESTFLOWS: + if m.flows[i, o].investment.fixed_costs[0] is not None: + lifetime = m.flows[i, o].investment.lifetime + age = m.flows[i, o].investment.age + fixed_costs += sum( + m.flows[i, o].investment.existing + * m.flows[i, o].investment.fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range(0, lifetime - age) + ) + self.investment_costs = Expression(expr=investment_costs) - return investment_costs + self.period_investment_costs = period_investment_costs + self.fixed_costs = Expression(expr=fixed_costs) + self.costs = Expression(expr=investment_costs + fixed_costs) + + return self.costs def _minimum_investment_constraint(self): """Constraint factory for a minimum investment""" m = self.parent_block() - def _min_invest_rule(_, i, o): + def _min_invest_rule(_): """Rule definition for applying a minimum investment""" - expr = ( - m.flows[i, o].investment.minimum * self.invest_status[i, o] - <= self.invest[i, o] - ) - return expr + for i, o in self.NON_CONVEX_INVESTFLOWS: + for p in m.PERIODS: + expr = ( + m.flows[i, o].investment.minimum[p] + * self.invest_status[i, o, p] + <= self.invest[i, o, p] + ) + self.minimum_rule.add((i, o, p), expr) + + self.minimum_rule = Constraint( + self.NON_CONVEX_INVESTFLOWS, m.PERIODS, noruleinit=True + ) + self.minimum_rule_build = BuildAction(rule=_min_invest_rule) - return Constraint(self.NON_CONVEX_INVESTFLOWS, rule=_min_invest_rule) + return self.minimum_rule def _maximum_investment_constraint(self): """Constraint factory for a maximum investment""" m = self.parent_block() - def _max_invest_rule(_, i, o): + def _max_invest_rule(_): """Rule definition for applying a minimum investment""" - expr = self.invest[i, o] <= ( - m.flows[i, o].investment.maximum * self.invest_status[i, o] - ) - return expr + for i, o in self.NON_CONVEX_INVESTFLOWS: + for p in m.PERIODS: + expr = self.invest[i, o, p] <= ( + m.flows[i, o].investment.maximum[p] + * self.invest_status[i, o, p] + ) + self.maximum_rule.add((i, o, p), expr) + + self.maximum_rule = Constraint( + self.NON_CONVEX_INVESTFLOWS, m.PERIODS, noruleinit=True + ) + self.maximum_rule_build = BuildAction(rule=_max_invest_rule) - return Constraint(self.NON_CONVEX_INVESTFLOWS, rule=_max_invest_rule) + return self.maximum_rule diff --git a/src/oemof/solph/flows/_non_convex_flow_block.py b/src/oemof/solph/flows/_non_convex_flow_block.py index 1dc7d60cf..ea5cec56c 100644 --- a/src/oemof/solph/flows/_non_convex_flow_block.py +++ b/src/oemof/solph/flows/_non_convex_flow_block.py @@ -10,7 +10,7 @@ SPDX-FileCopyrightText: Birgit Schachler SPDX-FileCopyrightText: jnnr SPDX-FileCopyrightText: jmloenneberga -SPDX-FileCopyrightText: Johannes Kochems (jokochems) +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT @@ -129,10 +129,22 @@ def _objective_expression(self): activity_costs = self._activity_costs() inactivity_costs = self._inactivity_costs() - return ( - startup_costs + shutdown_costs + activity_costs + inactivity_costs + self.activity_costs = Expression(expr=activity_costs) + self.inactivity_costs = Expression(expr=inactivity_costs) + self.startup_costs = Expression(expr=startup_costs) + self.shutdown_costs = Expression(expr=shutdown_costs) + + self.costs = Expression( + expr=( + startup_costs + + shutdown_costs + + activity_costs + + inactivity_costs + ) ) + return self.costs + def _sets_for_non_convex_flows(self, group): r"""Creates all sets for non-convex flows. @@ -281,12 +293,16 @@ def _variables_for_non_convex_flows(self): if self.POSITIVE_GRADIENT_FLOWS: self.positive_gradient = Var( - self.POSITIVE_GRADIENT_FLOWS, m.TIMESTEPS + self.POSITIVE_GRADIENT_FLOWS, + m.TIMESTEPS, + within=NonNegativeReals, ) if self.NEGATIVE_GRADIENT_FLOWS: self.negative_gradient = Var( - self.NEGATIVE_GRADIENT_FLOWS, m.TIMESTEPS + self.NEGATIVE_GRADIENT_FLOWS, + m.TIMESTEPS, + within=NonNegativeReals, ) def _startup_costs(self): @@ -300,13 +316,25 @@ def _startup_costs(self): if self.STARTUPFLOWS: m = self.parent_block() - for i, o in self.STARTUPFLOWS: - if m.flows[i, o].nonconvex.startup_costs[0] is not None: - startup_costs += sum( - self.startup[i, o, t] - * m.flows[i, o].nonconvex.startup_costs[t] - for t in m.TIMESTEPS - ) + if m.es.periods is None: + for i, o in self.STARTUPFLOWS: + if m.flows[i, o].nonconvex.startup_costs[0] is not None: + startup_costs += sum( + self.startup[i, o, t] + * m.flows[i, o].nonconvex.startup_costs[t] + for t in m.TIMESTEPS + ) + else: + for i, o in self.STARTUPFLOWS: + if m.flows[i, o].nonconvex.startup_costs[0] is not None: + startup_costs += sum( + self.startup[i, o, t] + * m.flows[i, o].nonconvex.startup_costs[t] + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + for p, t in m.TIMEINDEX + ) + self.startup_costs = Expression(expr=startup_costs) return startup_costs @@ -322,13 +350,25 @@ def _shutdown_costs(self): if self.SHUTDOWNFLOWS: m = self.parent_block() - for i, o in self.SHUTDOWNFLOWS: - if m.flows[i, o].nonconvex.shutdown_costs[0] is not None: - shutdown_costs += sum( - self.shutdown[i, o, t] - * m.flows[i, o].nonconvex.shutdown_costs[t] - for t in m.TIMESTEPS - ) + if m.es.periods is None: + for i, o in self.SHUTDOWNFLOWS: + if m.flows[i, o].nonconvex.shutdown_costs[0] is not None: + shutdown_costs += sum( + self.shutdown[i, o, t] + * m.flows[i, o].nonconvex.shutdown_costs[t] + for t in m.TIMESTEPS + ) + else: + for i, o in self.SHUTDOWNFLOWS: + if m.flows[i, o].nonconvex.shutdown_costs[0] is not None: + shutdown_costs += sum( + self.shutdown[i, o, t] + * m.flows[i, o].nonconvex.shutdown_costs[t] + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + for p, t in m.TIMEINDEX + ) + self.shutdown_costs = Expression(expr=shutdown_costs) return shutdown_costs @@ -344,13 +384,24 @@ def _activity_costs(self): if self.ACTIVITYCOSTFLOWS: m = self.parent_block() - for i, o in self.ACTIVITYCOSTFLOWS: - if m.flows[i, o].nonconvex.activity_costs[0] is not None: - activity_costs += sum( - self.status[i, o, t] - * m.flows[i, o].nonconvex.activity_costs[t] - for t in m.TIMESTEPS - ) + if m.es.periods is None: + for i, o in self.ACTIVITYCOSTFLOWS: + if m.flows[i, o].nonconvex.activity_costs[0] is not None: + activity_costs += sum( + self.status[i, o, t] + * m.flows[i, o].nonconvex.activity_costs[t] + for t in m.TIMESTEPS + ) + else: + for i, o in self.ACTIVITYCOSTFLOWS: + if m.flows[i, o].nonconvex.activity_costs[0] is not None: + activity_costs += sum( + self.status[i, o, t] + * m.flows[i, o].nonconvex.activity_costs[t] + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + for p, t in m.TIMEINDEX + ) self.activity_costs = Expression(expr=activity_costs) @@ -366,13 +417,25 @@ def _inactivity_costs(self): if self.INACTIVITYCOSTFLOWS: m = self.parent_block() - for i, o in self.INACTIVITYCOSTFLOWS: - if m.flows[i, o].nonconvex.inactivity_costs[0] is not None: - inactivity_costs += sum( - (1 - self.status[i, o, t]) - * m.flows[i, o].nonconvex.inactivity_costs[t] - for t in m.TIMESTEPS - ) + + if m.es.periods is None: + for i, o in self.INACTIVITYCOSTFLOWS: + if m.flows[i, o].nonconvex.inactivity_costs[0] is not None: + inactivity_costs += sum( + (1 - self.status[i, o, t]) + * m.flows[i, o].nonconvex.inactivity_costs[t] + for t in m.TIMESTEPS + ) + else: + for i, o in self.INACTIVITYCOSTFLOWS: + if m.flows[i, o].nonconvex.inactivity_costs[0] is not None: + inactivity_costs += sum( + (1 - self.status[i, o, t]) + * m.flows[i, o].nonconvex.inactivity_costs[t] + * m.objective_weighting[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + for p, t in m.TIMEINDEX + ) self.inactivity_costs = Expression(expr=inactivity_costs) @@ -407,7 +470,7 @@ def min_downtime_rule(_, i, o, t): Rule definition for min-downtime constraints of non-convex flows. """ if self._time_step_allows_flexibility( - t, m.flows[i, o].nonconvex.max_up_down, m.TIMESTEPS[-1] + t, m.flows[i, o].nonconvex.max_up_down, m.TIMESTEPS.at(-1) ): expr = 0 expr += ( @@ -452,7 +515,7 @@ def _min_uptime_rule(_, i, o, t): Rule definition for min-uptime constraints of non-convex flows. """ if self._time_step_allows_flexibility( - t, m.flows[i, o].nonconvex.max_up_down, m.TIMESTEPS[-1] + t, m.flows[i, o].nonconvex.max_up_down, m.TIMESTEPS.at(-1) ): expr = 0 expr += ( @@ -484,7 +547,7 @@ def _shutdown_constraint(self): def _shutdown_rule(_, i, o, t): """Rule definition for shutdown constraints of non-convex flows.""" - if t > m.TIMESTEPS[1]: + if t > m.TIMESTEPS.at(1): expr = ( self.shutdown[i, o, t] >= self.status[i, o, t - 1] - self.status[i, o, t] @@ -510,7 +573,7 @@ def _startup_constraint(self): def _startup_rule(_, i, o, t): """Rule definition for startup constraint of nonconvex flows.""" - if t > m.TIMESTEPS[1]: + if t > m.TIMESTEPS.at(1): expr = ( self.startup[i, o, t] >= self.status[i, o, t] - self.status[i, o, t - 1] @@ -567,15 +630,15 @@ def _maximum_flow_constraint(self): """ m = self.parent_block() - def _maximum_flow_rule(_, i, o, t): + def _maximum_flow_rule(_, i, o, p, t): """Rule definition for MILP maximum flow constraints.""" expr = ( self.status_nominal[i, o, t] * m.flows[i, o].max[t] - >= m.flow[i, o, t] + >= m.flow[i, o, p, t] ) return expr - return Constraint(self.MIN_FLOWS, m.TIMESTEPS, rule=_maximum_flow_rule) + return Constraint(self.MIN_FLOWS, m.TIMEINDEX, rule=_maximum_flow_rule) def _minimum_flow_constraint(self): r""" @@ -587,15 +650,15 @@ def _minimum_flow_constraint(self): """ m = self.parent_block() - def _minimum_flow_rule(_, i, o, t): + def _minimum_flow_rule(_, i, o, p, t): """Rule definition for MILP minimum flow constraints.""" expr = ( self.status_nominal[i, o, t] * m.flows[i, o].min[t] - <= m.flow[i, o, t] + <= m.flow[i, o, p, t] ) return expr - return Constraint(self.MIN_FLOWS, m.TIMESTEPS, rule=_minimum_flow_rule) + return Constraint(self.MIN_FLOWS, m.TIMEINDEX, rule=_minimum_flow_rule) def _status_nominal_constraint(self): r""" @@ -652,46 +715,106 @@ def _shared_constraints_for_non_convex_flows(self): self.min_downtime_constr = self._min_downtime_constraint() def _positive_gradient_flow_constraint(_): - r""" """ + r"""Rule definition for positive gradient constraint.""" for i, o in self.POSITIVE_GRADIENT_FLOWS: - for t in m.TIMESTEPS: - if t > 0: + for index in range(1, len(m.TIMEINDEX) + 1): + if m.TIMEINDEX[index][1] > 0: lhs = ( - m.flow[i, o, t] * self.status[i, o, t] - - m.flow[i, o, t - 1] * self.status[i, o, t - 1] + m.flow[ + i, + o, + m.TIMEINDEX[index][0], + m.TIMEINDEX[index][1], + ] + * self.status[i, o, m.TIMEINDEX[index][1]] + - m.flow[ + i, + o, + m.TIMEINDEX[index - 1][0], + m.TIMEINDEX[index - 1][1], + ] + * self.status[i, o, m.TIMEINDEX[index - 1][1]] ) - rhs = self.positive_gradient[i, o, t] + rhs = self.positive_gradient[ + i, o, m.TIMEINDEX[index][1] + ] self.positive_gradient_constr.add( - (i, o, t), lhs <= rhs + ( + i, + o, + m.TIMEINDEX[index][0], + m.TIMEINDEX[index][1], + ), + lhs <= rhs, ) else: - pass # return(Constraint.Skip) + lhs = self.positive_gradient[i, o, 0] + rhs = 0 + self.positive_gradient_constr.add( + ( + i, + o, + m.TIMEINDEX[index][0], + m.TIMEINDEX[index][1], + ), + lhs == rhs, + ) self.positive_gradient_constr = Constraint( - self.POSITIVE_GRADIENT_FLOWS, m.TIMESTEPS, noruleinit=True + self.POSITIVE_GRADIENT_FLOWS, m.TIMEINDEX, noruleinit=True ) self.positive_gradient_build = BuildAction( rule=_positive_gradient_flow_constraint ) def _negative_gradient_flow_constraint(_): - r""" """ + r"""Rule definition for negative gradient constraint.""" for i, o in self.NEGATIVE_GRADIENT_FLOWS: - for t in m.TIMESTEPS: - if t > 0: + for index in range(1, len(m.TIMEINDEX) + 1): + if m.TIMEINDEX[index][1] > 0: lhs = ( - m.flow[i, o, t - 1] * self.status[i, o, t - 1] - - m.flow[i, o, t] * self.status[i, o, t] + m.flow[ + i, + o, + m.TIMEINDEX[index - 1][0], + m.TIMEINDEX[index - 1][1], + ] + * self.status[i, o, m.TIMEINDEX[index - 1][1]] + - m.flow[ + i, + o, + m.TIMEINDEX[index][0], + m.TIMEINDEX[index][1], + ] + * self.status[i, o, m.TIMEINDEX[index][1]] ) - rhs = self.negative_gradient[i, o, t] + rhs = self.negative_gradient[ + i, o, m.TIMEINDEX[index][1] + ] self.negative_gradient_constr.add( - (i, o, t), lhs <= rhs + ( + i, + o, + m.TIMEINDEX[index][0], + m.TIMEINDEX[index][1], + ), + lhs <= rhs, ) else: - pass # return(Constraint.Skip) + lhs = self.negative_gradient[i, o, 0] + rhs = 0 + self.negative_gradient_constr.add( + ( + i, + o, + m.TIMEINDEX[index][0], + m.TIMEINDEX[index][1], + ), + lhs == rhs, + ) self.negative_gradient_constr = Constraint( - self.NEGATIVE_GRADIENT_FLOWS, m.TIMESTEPS, noruleinit=True + self.NEGATIVE_GRADIENT_FLOWS, m.TIMEINDEX, noruleinit=True ) self.negative_gradient_build = BuildAction( rule=_negative_gradient_flow_constraint diff --git a/src/oemof/solph/flows/_simple_flow_block.py b/src/oemof/solph/flows/_simple_flow_block.py index f4d0fb2a6..6df02bf70 100644 --- a/src/oemof/solph/flows/_simple_flow_block.py +++ b/src/oemof/solph/flows/_simple_flow_block.py @@ -12,13 +12,16 @@ SPDX-FileCopyrightText: jmloenneberga SPDX-FileCopyrightText: Pierre-François Duc SPDX-FileCopyrightText: Saeed Sayadi +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT """ from pyomo.core import BuildAction from pyomo.core import Constraint +from pyomo.core import Expression from pyomo.core import NonNegativeIntegers +from pyomo.core import NonNegativeReals from pyomo.core import Set from pyomo.core import Var from pyomo.core.base.block import ScalarBlock @@ -105,6 +108,22 @@ def _create_sets(self, group): initialize=[(g[0], g[1]) for g in group if g[2].integer] ) + self.LIFETIME_FLOWS = Set( + initialize=[ + (g[0], g[1]) + for g in group + if g[2].lifetime is not None and g[2].age is None + ] + ) + + self.LIFETIME_AGE_FLOWS = Set( + initialize=[ + (g[0], g[1]) + for g in group + if g[2].lifetime is not None and g[2].age is not None + ] + ) + def _create_variables(self, group): r"""Creates all variables for standard flows. @@ -113,29 +132,40 @@ def _create_variables(self, group): convenience. The creation of some variables depend on the values of *Flow* attributes. The following variables are created: - * :math:`P(t)` + * :math:`P(p, t)` Actual flow value (created in :class:`~oemof.solph._models.Model`). The variable is bound to: :math:`f_\mathrm{min}(t) \cdot P_\mathrm{nom} - \le P(t) + \le P(p, t) \le f_\mathrm{max}(t) \cdot P_\mathrm{nom}`. If `Flow.fix` is not None the variable is bound to - :math:`P(t) = f_\mathrm{fix}(t) \cdot P_\mathrm{nom}`. + :math:`P(p, t) = f_\mathrm{fix}(t) \cdot P_\mathrm{nom}`. - * :math:`\dot{P}_{down}` (`Flow.negative_gradient` is not `None`) + * :math:`ve_n` (`Flow.negative_gradient` is not `None`) Difference of a flow in consecutive timesteps if flow is reduced. The variable is bound to: :math:`0 \ge ve_n \ge ve_n^{max}`. - * :math:`\dot{P}_{up}` (`Flow.positive_gradient` is not `None`) + * :math:`ve_p` (`Flow.positive_gradient` is not `None`) Difference of a flow in consecutive timesteps if flow is increased. The variable is bound to: :math:`0 \ge ve_p \ge ve_p^{max}`. + + The following variable is build for Flows with the attribute + `integer_flows` being not None. + + * :math:`i` (`Flow.integer` is `True`) + All flow values are integers. Variable is bound to non-negative + integers. """ m = self.parent_block() - self.positive_gradient = Var(self.POSITIVE_GRADIENT_FLOWS, m.TIMESTEPS) + self.positive_gradient = Var( + self.POSITIVE_GRADIENT_FLOWS, m.TIMESTEPS, within=NonNegativeReals + ) - self.negative_gradient = Var(self.NEGATIVE_GRADIENT_FLOWS, m.TIMESTEPS) + self.negative_gradient = Var( + self.NEGATIVE_GRADIENT_FLOWS, m.TIMESTEPS, within=NonNegativeReals + ) self.integer_flow = Var( self.INTEGER_FLOWS, m.TIMESTEPS, within=NonNegativeIntegers @@ -167,7 +197,6 @@ def _create_constraints(self): .. math:: \sum_t P(t) \cdot \tau \geq F_{min} \cdot P_{nom} - * `Flow.negative_gradient` is not `None` (negative_gradient_constr): .. math:: P(t-1) - P(t) \geq ve_n(t) @@ -186,8 +215,8 @@ def _flow_full_load_time_max_rule(model): """Rule definition for build action of max. sum flow constraint.""" for inp, out in self.FULL_LOAD_TIME_MAX_FLOWS: lhs = sum( - m.flow[inp, out, ts] * m.timeincrement[ts] - for ts in m.TIMESTEPS + m.flow[inp, out, p, ts] * m.timeincrement[ts] + for p, ts in m.TIMEINDEX ) rhs = ( m.flows[inp, out].full_load_time_max @@ -206,8 +235,8 @@ def _flow_full_load_time_min_rule(model): """Rule definition for build action of min. sum flow constraint.""" for inp, out in self.FULL_LOAD_TIME_MIN_FLOWS: lhs = sum( - m.flow[inp, out, ts] * m.timeincrement[ts] - for ts in m.TIMESTEPS + m.flow[inp, out, p, ts] * m.timeincrement[ts] + for p, ts in m.TIMEINDEX ) rhs = ( m.flows[inp, out].full_load_time_min @@ -225,16 +254,49 @@ def _flow_full_load_time_min_rule(model): def _positive_gradient_flow_rule(model): """Rule definition for positive gradient constraint.""" for inp, out in self.POSITIVE_GRADIENT_FLOWS: - for ts in m.TIMESTEPS: - if ts > 0: - lhs = m.flow[inp, out, ts] - m.flow[inp, out, ts - 1] - rhs = self.positive_gradient[inp, out, ts] + for index in range(1, len(m.TIMEINDEX) + 1): + if m.TIMEINDEX.at(index)[1] > 0: + lhs = ( + m.flow[ + inp, + out, + m.TIMEINDEX.at(index)[0], + m.TIMEINDEX.at(index)[1], + ] + - m.flow[ + inp, + out, + m.TIMEINDEX.at(index - 1)[0], + m.TIMEINDEX.at(index - 1)[1], + ] + ) + rhs = self.positive_gradient[ + inp, out, m.TIMEINDEX.at(index)[1] + ] self.positive_gradient_constr.add( - (inp, out, ts), lhs <= rhs + ( + inp, + out, + m.TIMEINDEX.at(index)[0], + m.TIMEINDEX.at(index)[1], + ), + lhs <= rhs, + ) + else: + lhs = self.positive_gradient[inp, out, 0] + rhs = 0 + self.positive_gradient_constr.add( + ( + inp, + out, + m.TIMEINDEX.at(index)[0], + m.TIMEINDEX.at(index)[1], + ), + lhs == rhs, ) self.positive_gradient_constr = Constraint( - self.POSITIVE_GRADIENT_FLOWS, m.TIMESTEPS, noruleinit=True + self.POSITIVE_GRADIENT_FLOWS, m.TIMEINDEX, noruleinit=True ) self.positive_gradient_build = BuildAction( rule=_positive_gradient_flow_rule @@ -243,51 +305,211 @@ def _positive_gradient_flow_rule(model): def _negative_gradient_flow_rule(model): """Rule definition for negative gradient constraint.""" for inp, out in self.NEGATIVE_GRADIENT_FLOWS: - for ts in m.TIMESTEPS: - if ts > 0: - lhs = m.flow[inp, out, ts - 1] - m.flow[inp, out, ts] - rhs = self.negative_gradient[inp, out, ts] + for index in range(1, len(m.TIMEINDEX) + 1): + if m.TIMEINDEX.at(index)[1] > 0: + lhs = ( + m.flow[ + inp, + out, + m.TIMEINDEX.at(index - 1)[0], + m.TIMEINDEX.at(index - 1)[1], + ] + - m.flow[ + inp, + out, + m.TIMEINDEX.at(index)[0], + m.TIMEINDEX.at(index)[1], + ] + ) + rhs = self.negative_gradient[ + inp, out, m.TIMEINDEX.at(index)[1] + ] + self.negative_gradient_constr.add( + ( + inp, + out, + m.TIMEINDEX.at(index)[0], + m.TIMEINDEX.at(index)[1], + ), + lhs <= rhs, + ) + else: + lhs = self.negative_gradient[inp, out, 0] + rhs = 0 self.negative_gradient_constr.add( - (inp, out, ts), lhs <= rhs + ( + inp, + out, + m.TIMEINDEX.at(index)[0], + m.TIMEINDEX.at(index)[1], + ), + lhs == rhs, ) self.negative_gradient_constr = Constraint( - self.NEGATIVE_GRADIENT_FLOWS, m.TIMESTEPS, noruleinit=True + self.NEGATIVE_GRADIENT_FLOWS, m.TIMEINDEX, noruleinit=True ) self.negative_gradient_build = BuildAction( rule=_negative_gradient_flow_rule ) - def _integer_flow_rule(block, ii, oi, ti): + def _integer_flow_rule(block, ii, oi, pi, ti): """Force flow variable to NonNegativeInteger values.""" - return self.integer_flow[ii, oi, ti] == m.flow[ii, oi, ti] + return self.integer_flow[ii, oi, ti] == m.flow[ii, oi, pi, ti] self.integer_flow_constr = Constraint( - self.INTEGER_FLOWS, m.TIMESTEPS, rule=_integer_flow_rule + self.INTEGER_FLOWS, m.TIMEINDEX, rule=_integer_flow_rule ) + if m.es.periods is not None: + + def _lifetime_output_rule(block): + """Force flow value to zero when lifetime is reached""" + for inp, out in self.LIFETIME_FLOWS: + for p, ts in m.TIMEINDEX: + if m.flows[inp, out].lifetime <= m.es.periods_years[p]: + lhs = m.flow[inp, out, p, ts] + rhs = 0 + self.lifetime_output.add( + (inp, out, p, ts), (lhs == rhs) + ) + + self.lifetime_output = Constraint( + self.LIFETIME_FLOWS, m.TIMEINDEX, noruleinit=True + ) + self.lifetime_output_build = BuildAction( + rule=_lifetime_output_rule + ) + + def _lifetime_age_output_rule(block): + """Force flow value to zero when lifetime is reached + considering initial age + """ + for inp, out in self.LIFETIME_AGE_FLOWS: + for p, ts in m.TIMEINDEX: + if ( + m.flows[inp, out].lifetime - m.flows[inp, out].age + <= m.es.periods_years[p] + ): + lhs = m.flow[inp, out, p, ts] + rhs = 0 + self.lifetime_age_output.add( + (inp, out, p, ts), (lhs == rhs) + ) + + self.lifetime_age_output = Constraint( + self.LIFETIME_AGE_FLOWS, m.TIMEINDEX, noruleinit=True + ) + self.lifetime_age_output_build = BuildAction( + rule=_lifetime_age_output_rule + ) + def _objective_expression(self): r"""Objective expression for all standard flows with fixed costs and variable costs. Depending on the attributes of the `Flow` object the following parts of + the objective function are created for a standard model: + + * `Flow.variable_costs` is not `None`: + .. math:: + \sum_{(i,o)} \sum_t P(t) \cdot w(t) \cdot c_{var}(i, o, t) + + whereby :math:`w(t)` is the objective weighting. + + In a multi-period model, in contrast, the following following parts of the objective function are created: * `Flow.variable_costs` is not `None`: .. math:: - \sum_{(i,o)} \sum_t P(t) \cdot c_{var}(i, o, t) + \sum_{(i,o)} \sum_{p, t} P(p, t) \cdot w(t) + \cdot c_{var}(i, o, t) + + * `Flow.fixed_costs` is not `None` and flow has no lifetime limit + .. math:: + \sum_{(i,o)} \sum_p P_{nominal} \cdot c_{fixed}(i, o, p) + \cdot DF^{-p} + + * `Flow.fixed_costs` is not `None` and flow has a lifetime limit, + but not an initial age + .. math:: + \sum_{(i,o)} \sum_{p}^{p+n} P_{nominal} \cdot c_{fixed}(i, o, p) + \cdot DF^{-p} + + * `Flow.fixed_costs` is not `None` and flow has a lifetime limit, + and an initial age + .. math:: + \sum_{(i,o)} \sum_{p}^{p+n-a} P_{nominal} + \cdot c_{fixed}(i, o, p) \cdot DF^{-p} + + Hereby + * :math:`DF(p) = (1 + dr)` is the discount factor for period :math:`p` + and :math:`dr` is the discount rate. + * :math:`n` is the unit lifetime and :math:`a` is the initial age. """ m = self.parent_block() variable_costs = 0 + fixed_costs = 0 + + if m.es.periods is None: + for i, o in m.FLOWS: + if m.flows[i, o].variable_costs[0] is not None: + for p, t in m.TIMEINDEX: + variable_costs += ( + m.flow[i, o, p, t] + * m.objective_weighting[t] + * m.flows[i, o].variable_costs[t] + ) - for i, o in m.FLOWS: - if m.flows[i, o].variable_costs[0] is not None: - for t in m.TIMESTEPS: - variable_costs += ( - m.flow[i, o, t] - * m.objective_weighting[t] - * m.flows[i, o].variable_costs[t] + else: + for i, o in m.FLOWS: + if m.flows[i, o].variable_costs[0] is not None: + for p, t in m.TIMEINDEX: + variable_costs += ( + m.flow[i, o, p, t] + * m.objective_weighting[t] + * m.flows[i, o].variable_costs[t] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + + # Include fixed costs of units operating "forever" + if ( + m.flows[i, o].fixed_costs[0] is not None + and m.flows[i, o].nominal_value is not None + and (i, o) not in self.LIFETIME_FLOWS + and (i, o) not in self.LIFETIME_AGE_FLOWS + ): + for p in m.PERIODS: + fixed_costs += ( + m.flows[i, o].nominal_value + * m.flows[i, o].fixed_costs[p] + * ((1 + m.discount_rate) ** -m.es.periods_years[p]) + ) + + # Fixed costs for units with limited lifetime + for i, o in self.LIFETIME_FLOWS: + if m.flows[i, o].fixed_costs[0] is not None: + fixed_costs += sum( + m.flows[i, o].nominal_value + * m.flows[i, o].fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range(0, m.flows[i, o].lifetime) ) - return variable_costs + for i, o in self.LIFETIME_AGE_FLOWS: + if m.flows[i, o].fixed_costs[0] is not None: + fixed_costs += sum( + m.flows[i, o].nominal_value + * m.flows[i, o].fixed_costs[pp] + * ((1 + m.discount_rate) ** (-pp)) + for pp in range( + 0, m.flows[i, o].lifetime - m.flows[i, o].age + ) + ) + + self.variable_costs = Expression(expr=variable_costs) + self.fixed_costs = Expression(expr=fixed_costs) + self.costs = Expression(expr=variable_costs + fixed_costs) + + return self.costs diff --git a/src/oemof/solph/flows/experimental/_electrical_line.py b/src/oemof/solph/flows/experimental/_electrical_line.py index 280a3b872..e96f85de7 100644 --- a/src/oemof/solph/flows/experimental/_electrical_line.py +++ b/src/oemof/solph/flows/experimental/_electrical_line.py @@ -11,6 +11,7 @@ SPDX-FileCopyrightText: jakob-wo SPDX-FileCopyrightText: gplssm SPDX-FileCopyrightText: jnnr +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT @@ -106,10 +107,10 @@ class ElectricalLineBlock(ScalarBlock): Linear relation :attr:`om.ElectricalLine.electrical_flow[n,t]` .. math:: - flow(n, o, t) = 1 / reactance(n, t) \\cdot () - voltage_angle(i(n), t) - volatage_angle(o(n), t), \\ - \forall t \\in \\textrm{TIMESTEPS}, \\ - \forall n \\in \\textrm{ELECTRICAL\_LINES}. + flow(n, o, p, t) = 1 / reactance(n, t) \cdot + voltage\_angle(i(n), t) - voltage\_angle(o(n), t), \\ + \forall p, t \in \textrm{TIMEINDEX}, \\ + \forall n \in \textrm{ELECTRICAL\_LINES}. TODO: Add equate constraint of flows @@ -169,13 +170,13 @@ def _voltage_angle_bounds(block, b, t): bus.slack = True def _voltage_angle_relation(block): - for t in m.TIMESTEPS: + for p, t in m.TIMEINDEX: for n in group: if n.input.slack is True: self.voltage_angle[n.output, t].value = 0 self.voltage_angle[n.output, t].fix() try: - lhs = m.flow[n.input, n.output, t] + lhs = m.flow[n.input, n.output, p, t] rhs = ( 1 / n.reactance[t] @@ -189,8 +190,8 @@ def _voltage_angle_relation(block): "Error in constraint creation", "of node {}".format(n.label), ) - block.electrical_flow.add((n, t), (lhs == rhs)) + block.electrical_flow.add((n, p, t), (lhs == rhs)) - self.electrical_flow = Constraint(group, m.TIMESTEPS, noruleinit=True) + self.electrical_flow = Constraint(group, m.TIMEINDEX, noruleinit=True) self.electrical_flow_build = BuildAction(rule=_voltage_angle_relation) diff --git a/src/oemof/solph/processing.py b/src/oemof/solph/processing.py index f6270f376..f0da8ffc8 100644 --- a/src/oemof/solph/processing.py +++ b/src/oemof/solph/processing.py @@ -28,8 +28,7 @@ def get_tuple(x): - """ - Get oemof tuple within iterable or create it. + """Get oemof tuple within iterable or create it Tuples from Pyomo are of type `(n, n, int)`, `(n, n)` and `(n, int)`. For single nodes `n` a tuple with one object `(n,)` is created. @@ -46,8 +45,7 @@ def get_tuple(x): def get_timestep(x): - """ - Get the timestep from oemof tuples. + """Get the timestep from oemof tuples The timestep from tuples `(n, n, int)`, `(n, n)`, `(n, int)` and (n,) is fetched as the last element. For time-independent data (scalars) @@ -60,8 +58,7 @@ def get_timestep(x): def remove_timestep(x): - """ - Remove the timestep from oemof tuples. + """Remove the timestep from oemof tuples The timestep is removed from tuples of type `(n, n, int)` and `(n, int)`. """ @@ -72,12 +69,11 @@ def remove_timestep(x): def create_dataframe(om): - """ - Create a result dataframe with all optimization data. + """Create a result DataFrame with all optimization data - Results from Pyomo are written into pandas DataFrame where separate columns - are created for the variable index e.g. for tuples of the flows and - components or the timesteps. + Results from Pyomo are written into one common pandas.DataFrame where + separate columns are created for the variable index e.g. for tuples + of the flows and components or the timesteps. """ # get all pyomo variables including their block block_vars = list( @@ -111,6 +107,11 @@ def create_dataframe(om): df["timestep"] = df["oemof_tuple"].map(get_timestep) df["oemof_tuple"] = df["oemof_tuple"].map(remove_timestep) + # Use another call of remove timestep to get rid of period not needed + df.loc[df["variable_name"] == "flow", "oemof_tuple"] = df.loc[ + df["variable_name"] == "flow", "oemof_tuple" + ].map(remove_timestep) + # order the data by oemof tuple and timestep df = df.sort_values(["oemof_tuple", "timestep"], ascending=[True, True]) @@ -172,15 +173,45 @@ def set_result_index(df_dict, k, result_index): ).with_traceback(sys.exc_info()[2]) +def set_sequences_index(df, result_index): + try: + df.index = result_index + except ValueError: + try: + df = df[:-1] + df.index = result_index + except ValueError: + raise ValueError("Results extraction failed!") + + def results(model, remove_last_time_point=False): - """ - Create a result dictionary from the result DataFrame. + """Create a nested result dictionary from the result DataFrame - Results from Pyomo are written into a dictionary of pandas objects where - a Series holds all scalar values and a dataframe all sequences for nodes - and flows. - The dictionary is keyed by the nodes e.g. `results[idx]['scalars']` - and flows e.g. `results[n, n]['sequences']`. + The already rearranged results from Pyomo from the result DataFrame are + transferred into a nested dictionary of pandas objects. + The first level key of that dictionary is a node (denoting the respective + flow or component). + + The second level keys are "sequences" and "scalars" for a *standard model*: + + * A pd.DataFrame holds all results that are time-dependent, i.e. given as + a sequence and can be indexed with the energy system's timeindex. + * A pd.Series holds all scalar values which are applicable for timestep 0 + (i.e. investments). + + For a *multi-period model*, the second level key for "sequences" remains + the same while instead of "scalars", the key "period_scalars" is used: + + * For sequences, see standard model. + * Instead of a pd.Series, a pd.DataFrame holds scalar values indexed + by periods. These hold investment-related variables. + + Examples + -------- + * *Standard model*: `results[idx]['scalars']` + and flows `results[n, n]['sequences']`. + * *Multi-period model*: `results[idx]['period_scalars']` + and flows `results[n, n]['sequences']`. Parameters ---------- @@ -191,11 +222,12 @@ def results(model, remove_last_time_point=False): same length as the TIMESTEP (interval) variables without getting nan-values. By default, the last time point is removed if it has not been defined by the user in the EnergySystem but inferred. If all - time points has been defined explicitly by the user the last time point - will not be removed by default. In that case all interval variables - will get one row with nan-values to have the same index for all - variables. + time points have been defined explicitly by the user the last time + point will not be removed by default. In that case all interval + variables will get one row with nan-values to have the same index + for all variables. """ + # Extraction steps that are the same for both model types df = create_dataframe(model) # create a dict of dataframes keyed by oemof tuples @@ -215,7 +247,82 @@ def results(model, remove_last_time_point=False): # create final result dictionary by splitting up the dataframes in the # dataframe dict into a series for scalar data and dataframe for sequences result = {} - if remove_last_time_point is True: + + # Standard model results extraction + if model.es.periods is None: + result = _extract_standard_model_result( + df_dict, result, result_index, remove_last_time_point + ) + scalars_col = "scalars" + + # Results extraction for a multi-period model + else: + period_indexed = ["invest", "total", "old", "old_end", "old_exo"] + + result = _extract_multi_period_model_result( + model, + df_dict, + period_indexed, + result, + result_index, + remove_last_time_point, + ) + scalars_col = "period_scalars" + + # add dual variables for bus constraints + if model.dual is not None: + grouped = groupby( + sorted(model.BusBlock.balance.iterkeys()), lambda p: p[0] + ) + for bus, timeindex in grouped: + duals = [ + model.dual[model.BusBlock.balance[bus, p, t]] + for _, p, t in timeindex + ] + if model.es.periods is None: + df = pd.DataFrame({"duals": duals}, index=result_index[:-1]) + # TODO: Align with standard model + else: + df = pd.DataFrame({"duals": duals}, index=result_index) + if (bus, None) not in result.keys(): + result[(bus, None)] = { + "sequences": df, + scalars_col: pd.Series(dtype=float), + } + else: + result[(bus, None)]["sequences"]["duals"] = duals + + return result + + +def _extract_standard_model_result( + df_dict, result, result_index, remove_last_time_point +): + """Extract and return the results of a standard model + + * Optionally remove last time point or include it elsewise. + * Set index to timeindex and pivot results such that values are displayed + for the respective variables. Reindex with the energy system's timeindex. + * Filter for columns with nan values to retrieve scalar variables. Split + up the DataFrame into sequences and scalars and return it. + + Parameters + ---------- + df_dict : dict + dictionary of results DataFrames + result : dict + dictionary to store the results + result_index : pd.DatetimeIndex + timeindex to use for the results (derived from EnergySystem) + remove_last_time_point : bool + if True, remove the last time point + + Returns + ------- + result : dict + dictionary with results stored + """ + if remove_last_time_point: # The values of intervals belong to the time at the beginning of the # interval. for k in df_dict: @@ -237,24 +344,77 @@ def results(model, remove_last_time_point=False): set_result_index(df_dict, k, result_index) result[k] = divide_scalars_sequences(df_dict, k) - # add dual variables for bus constraints - if model.dual is not None: - grouped = groupby( - sorted(model.BusBlock.balance.iterkeys()), lambda p: p[0] - ) - for bus, timesteps in grouped: - duals = [ - model.dual[model.BusBlock.balance[bus, t]] - for _, t in timesteps - ] - df = pd.DataFrame({"duals": duals}, index=result_index[:-1]) - if (bus, None) not in result.keys(): - result[(bus, None)] = { - "sequences": df, - "scalars": pd.Series(dtype=float), - } - else: - result[(bus, None)]["sequences"]["duals"] = duals + return result + + +def _extract_multi_period_model_result( + model, + df_dict, + period_indexed=None, + result=None, + result_index=None, + remove_last_time_point=False, +): + """Extract and return the results of a multi-period model + + Difference to standard model is in the way, scalar values are extracted + since they now depend on periods. + + Parameters + ---------- + model : oemof.solph.models.Model + The optimization model + df_dict : dict + dictionary of results DataFrames + period_indexed : list + list of variables that are indexed by periods + result : dict + dictionary to store the results + result_index : pd.DatetimeIndex + timeindex to use for the results (derived from EnergySystem) + remove_last_time_point : bool + if True, remove the last time point + + Returns + ------- + result : dict + dictionary with results stored + """ + for k in df_dict: + df_dict[k].set_index("timestep", inplace=True) + df_dict[k] = df_dict[k].pivot(columns="variable_name", values="value") + # Split data set + period_cols = [ + col for col in df_dict[k].columns if col in period_indexed + ] + # map periods to their start years for displaying period results + d = { + key: val + model.es.periods[0].min().year + for key, val in enumerate(model.es.periods_years) + } + period_scalars = df_dict[k].loc[:, period_cols].dropna() + sequences = df_dict[k].loc[ + :, [col for col in df_dict[k].columns if col not in period_cols] + ] + if remove_last_time_point: + set_sequences_index(sequences, result_index[:-1]) + else: + set_sequences_index(sequences, result_index) + if period_scalars.empty: + period_scalars = pd.DataFrame(index=d.values()) + try: + period_scalars.rename(index=d, inplace=True) + period_scalars.index.name = "period" + result[k] = { + "period_scalars": period_scalars, + "sequences": sequences, + } + except IndexError: + error_message = ( + "Some indices seem to be not matching.\n" + "Cannot properly extract model results." + ) + raise IndexError(error_message) return result diff --git a/src/oemof/solph/views.py b/src/oemof/solph/views.py index 754176074..5719eb583 100644 --- a/src/oemof/solph/views.py +++ b/src/oemof/solph/views.py @@ -9,6 +9,7 @@ SPDX-FileCopyrightText: Cord Kaldemeyer SPDX-FileCopyrightText: Stephan Günther SPDX-FileCopyrightText: henhuy +SPDX-FileCopyrightText: Johannes Kochems SPDX-License-Identifier: MIT @@ -29,8 +30,10 @@ def node(results, node, multiindex=False, keep_none_type=False): Obtain results for a single node e.g. a Bus or Component. Either a node or its label string can be passed. - Results are written into a dictionary which is keyed by 'scalars' and - 'sequences' holding respective data in a pandas Series and DataFrame. + Results are written into a dictionary which is keyed by 'scalars' + (resp. 'periods_scalars' for a multi-period model) and + 'sequences' holding respective data in a pandas Series (resp. DataFrame) + and DataFrame. """ def replace_none(col_list, reverse=False): @@ -58,45 +61,50 @@ def replace_none(col_list, reverse=False): filtered = {} # create a series with tuples as index labels for scalars + scalars_col = "scalars" + # Check for multi-period model (different naming) + if "period_scalars" in list(list(results.values())[0].keys()): + scalars_col = "period_scalars" + scalars = { - k: v["scalars"] + k: v[scalars_col] for k, v in results.items() - if node in k and not v["scalars"].empty + if node in k and not v[scalars_col].empty } if scalars: # aggregate data - filtered["scalars"] = pd.concat(scalars.values(), axis=0) + filtered[scalars_col] = pd.concat(scalars.values(), axis=0) # assign index values idx = { - k: [c for c in v["scalars"].index] + k: [c for c in v[scalars_col].index] for k, v in results.items() - if node in k and not v["scalars"].empty + if node in k and not v[scalars_col].empty } idx = [tuple((k, m) for m in v) for k, v in idx.items()] idx = [i for sublist in idx for i in sublist] - filtered["scalars"].index = idx + filtered[scalars_col].index = idx # Sort index # (if Nones are present, they have to be replaced while sorting) if keep_none_type: - filtered["scalars"].index = replace_none( - filtered["scalars"].index.tolist() + filtered[scalars_col].index = replace_none( + filtered[scalars_col].index.tolist() ) - filtered["scalars"].sort_index(axis=0, inplace=True) + filtered[scalars_col].sort_index(axis=0, inplace=True) if keep_none_type: - filtered["scalars"].index = replace_none( - filtered["scalars"].index.tolist(), True + filtered[scalars_col].index = replace_none( + filtered[scalars_col].index.tolist(), True ) if multiindex: idx = pd.MultiIndex.from_tuples( [ tuple([row[0][0], row[0][1], row[1]]) - for row in filtered["scalars"].index + for row in filtered[scalars_col].index ] ) idx.set_names(["from", "to", "type"], inplace=True) - filtered["scalars"].index = idx + filtered[scalars_col].index = idx # create a dataframe with tuples as column labels for sequences sequences = { @@ -150,9 +158,9 @@ def filter_nodes(results, option=NodeOption.All, exclude_busses=False): * :attr:`NodeOption.All`: `'all'`: Returns all nodes * :attr:`NodeOption.HasOutputs`: `'has_outputs'`: - Returns nodes with an output flow (eg. Transformer, Source) + Returns nodes with an output flow (eg. Converter, Source) * :attr:`NodeOption.HasInputs`: `'has_inputs'`: - Returns nodes with an input flow (eg. Transformer, Sink) + Returns nodes with an input flow (eg. Converter, Sink) * :attr:`NodeOption.HasOnlyOutputs`: `'has_only_outputs'`: Returns nodes having only output flows (eg. Source) * :attr:`NodeOption.HasOnlyInputs`: `'has_only_inputs'`: @@ -225,6 +233,19 @@ def node_weight_by_type(results, node_type): node_type: oemof.solph class Specifies the type for which node weights should be collected, e.g. solph.components.GenericStorage + + Example + -------- + :: + + from oemof.solph import views + + # solve oemof model 'm' + # Then collect node weights + views.node_weight_by_type( + m.results(), + node_type=solph.components.GenericStorage + ) """ group = { @@ -256,6 +277,20 @@ def node_input_by_type(results, node_type, droplevel=None): Specifies the type of the node for that inputs are selected, e.g. solph.components.Sink droplevel: list + + Examples + ----- + :: + + from oemof import solph + from oemof.solph import views + + # solve oemof solph model 'm' + # Then collect node weights + views.node_input_by_type( + m.results(), + node_type=solph.components.Sink + ) """ if droplevel is None: droplevel = [] @@ -284,8 +319,22 @@ def node_output_by_type(results, node_type, droplevel=None): A result dictionary from a solved oemof.solph.Model object node_type: oemof.solph class Specifies the type of the node for that outputs are selected, - e.g. solph.components.Transformer + e.g. solph.components.Converter droplevel: list + + Examples + -------- + :: + + import oemof.solph as solph + from oemof.solph import views + + # solve oemof solph model 'm' + # Then collect node weights + views.node_output_by_type( + m.results(), + node_type=solph.components.Converter + ) """ if droplevel is None: droplevel = [] @@ -319,7 +368,21 @@ def net_storage_flow(results, node_type): Returns ------- pandas.DataFrame object with multiindex colums. Names of levels of columns - are: from, to, net_flow. + are: from, to, net_flow. + + Examples + -------- + :: + + import oemof.solph as solph + from oemof.solph import views + + # solve oemof solph model 'm' + # Then collect node weights + views.net_storage_flow( + m.results(), + node_type=solph.components.GenericStorage + ) """ group = { diff --git a/tests/constraint_tests.py b/tests/constraint_tests.py index 7501d448c..53a35936e 100644 --- a/tests/constraint_tests.py +++ b/tests/constraint_tests.py @@ -11,11 +11,11 @@ import logging import re -from difflib import unified_diff from os import path as ospath import pandas as pd import pytest +from pyomo.repn.tests.lp_diff import lp_diff from oemof import solph @@ -69,78 +69,37 @@ def compare_lp_files(self, filename, ignored=None, my_om=None): filename, ) ) as expected_file: - - def chop_trailing_whitespace(lines): - return [re.sub(r"\s*$", "", ln) for ln in lines] - - def remove(pattern, lines): - if not pattern: - return lines - return re.subn(pattern, "", "\n".join(lines))[0].split( - "\n" - ) - - expected = remove( - ignored, - chop_trailing_whitespace(expected_file.readlines()), - ) - generated = remove( - ignored, - chop_trailing_whitespace(generated_file.readlines()), - ) - - def normalize_to_positive_results(lines): - negative_result_indices = [ - n - for n, line in enumerate(lines) - if re.match("^= -", line) - ] - equation_start_indices = [ - [ - n - for n in reversed(range(0, nri)) - if re.match(".*:$", lines[n]) - ][0] - + 1 - for nri in negative_result_indices - ] - for start, end in zip( - equation_start_indices, negative_result_indices - ): - for n in range(start, end): - lines[n] = ( - "-" - if lines[n] and lines[n][0] == "+" - else "+" - if lines[n] - else lines[n] - ) + lines[n][1:] - lines[end] = "= " + lines[end][3:] - return lines - - expected = normalize_to_positive_results(expected) - generated = normalize_to_positive_results(generated) - - assert generated == expected, ( - "Failed matching expected with generated lp file:\n" - + "\n".join( - unified_diff( - expected, - generated, - fromfile=ospath.relpath(expected_file.name), - tofile=ospath.basename(generated_file.name), - lineterm="", - ) - ), - ) - - def test_linear_transformer(self): - """Constraint test of a Transformer without Investment.""" + exp = expected_file.read() + gen = generated_file.read() + + # lp_diff returns two arrays of strings with cleaned lp syntax + # It automatically prints the diff + exp_diff, gen_diff = lp_diff(exp, gen) + + # sometimes, 0.0 is printed, sometimes 0, harmonise that + exp_diff = [ + line + " ".replace(" 0.0 ", " 0 ") for line in exp_diff + ] + gen_diff = [ + line + " ".replace(" 0.0 ", " 0 ") for line in gen_diff + ] + + assert len(exp_diff) == len(gen_diff) + + # Created the LP files do not have a reproducible + # order of the lines. Thus, we sort the lines. + for exp, gen in zip(sorted(exp_diff), sorted(gen_diff)): + assert ( + exp == gen + ), "Failed matching expected with generated lp file." + + def test_linear_converter(self): + """Constraint test of a Converter without Investment.""" bgas = solph.buses.Bus(label="gas") bel = solph.buses.Bus(label="electricity") - transformer = solph.components.Transformer( + converter = solph.components.Converter( label="powerplantGas", inputs={bgas: solph.flows.Flow()}, outputs={ @@ -148,18 +107,18 @@ def test_linear_transformer(self): }, conversion_factors={bel: 0.58}, ) - self.energysystem.add(bgas, bel, transformer) + self.energysystem.add(bgas, bel, converter) - self.compare_lp_files("linear_transformer.lp") + self.compare_lp_files("linear_converter.lp") - def test_linear_transformer_invest(self): - """Constraint test of a Transformer with Investment.""" + def test_linear_converter_invest(self): + """Constraint test of a Converter with Investment.""" bgas = solph.buses.Bus(label="gas") bel = solph.buses.Bus(label="electricity") - transformer = solph.components.Transformer( + converter = solph.components.Converter( label="powerplant_gas", inputs={bgas: solph.flows.Flow()}, outputs={ @@ -170,17 +129,17 @@ def test_linear_transformer_invest(self): }, conversion_factors={bel: 0.58}, ) - self.energysystem.add(bgas, bel, transformer) + self.energysystem.add(bgas, bel, converter) - self.compare_lp_files("linear_transformer_invest.lp") + self.compare_lp_files("linear_converter_invest.lp") - def test_nonconvex_invest_transformer(self): + def test_nonconvex_invest_converter(self): """Non-convex invest flow with offset, without minimum.""" bfuel = solph.buses.Bus(label="fuelBus") bel = solph.buses.Bus(label="electricityBus") - transformer = solph.components.Transformer( - label="transformer_nonconvex_invest", + converter = solph.components.Converter( + label="converter_nonconvex_invest", inputs={bfuel: solph.flows.Flow()}, outputs={ bel: solph.flows.Flow( @@ -197,8 +156,8 @@ def test_nonconvex_invest_transformer(self): }, conversion_factors={bel: 0.5}, ) - self.energysystem.add(bfuel, bel, transformer) - self.compare_lp_files("flow_nonconvex_invest_bounded_transformer.lp") + self.energysystem.add(bfuel, bel, converter) + self.compare_lp_files("flow_nonconvex_invest_bounded_converter.lp") def test_max_source_min_sink(self): """ """ @@ -220,7 +179,6 @@ def test_max_source_min_sink(self): }, ) self.energysystem.add(bel, wind, demand) - self.compare_lp_files("max_source_min_sink.lp") def test_fixed_source_variable_sink(self): @@ -232,7 +190,7 @@ def test_fixed_source_variable_sink(self): label="wind", outputs={ bel: solph.flows.Flow( - fix=[0.43, 0.72, 0.29], nominal_value=10e5 + fix=[0.43, 0.72, 0.29], nominal_value=1e6 ) }, ) @@ -242,7 +200,6 @@ def test_fixed_source_variable_sink(self): ) self.energysystem.add(bel, wind, excess) - self.compare_lp_files("fixed_source_variable_sink.lp") def test_nominal_value_to_zero(self): @@ -266,7 +223,7 @@ def test_fixed_source_invest_sink(self): wind = solph.components.Source( label="wind", outputs={ - bel: solph.flows.Flow(fix=[12, 16, 14], nominal_value=1000000) + bel: solph.flows.Flow(fix=[12, 16, 14], nominal_value=1e6) }, ) @@ -278,13 +235,12 @@ def test_fixed_source_invest_sink(self): variable_costs=25, max=0.8, investment=solph.Investment( - ep_costs=500, maximum=10e5, existing=50 + ep_costs=500, maximum=1e6, existing=50 ), ) }, ) self.energysystem.add(bel, wind, excess) - self.compare_lp_files("fixed_source_invest_sink.lp") def test_invest_source_fixed_sink(self): @@ -306,11 +262,10 @@ def test_invest_source_fixed_sink(self): excess = solph.components.Sink( label="excess", inputs={ - bel: solph.flows.Flow(fix=[0.5, 0.8, 0.3], nominal_value=10e4) + bel: solph.flows.Flow(fix=[0.5, 0.8, 0.3], nominal_value=1e5) }, ) self.energysystem.add(bel, pv, excess) - self.compare_lp_files("invest_source_fixed_sink.lp") def test_storage(self): @@ -325,14 +280,14 @@ def test_storage(self): outputs={ bel: solph.flows.Flow(nominal_value=16667, variable_costs=24) }, - nominal_storage_capacity=10e4, + nominal_storage_capacity=1e5, loss_rate=0.13, + storage_costs=0.1, inflow_conversion_factor=0.97, outflow_conversion_factor=0.86, initial_storage_level=0.4, ) self.energysystem.add(bel, storage) - self.compare_lp_files("storage.lp") def test_storage_invest_1(self): @@ -356,7 +311,6 @@ def test_storage_invest_1(self): investment=solph.Investment(ep_costs=145, maximum=234), ) self.energysystem.add(bel, storage) - self.compare_lp_files("storage_invest_1.lp") def test_storage_invest_2(self): @@ -475,7 +429,6 @@ def test_storage_minimum_invest(self): ), ) self.energysystem.add(bel, storage) - self.compare_lp_files("storage_invest_minimum.lp") def test_storage_unbalanced(self): @@ -534,7 +487,6 @@ def test_storage_fixed_losses(self): initial_storage_level=0.4, ) self.energysystem.add(bel, storage) - self.compare_lp_files("storage_fixed_losses.lp") def test_storage_invest_1_fixed_losses(self): @@ -560,18 +512,17 @@ def test_storage_invest_1_fixed_losses(self): investment=solph.Investment(ep_costs=145, maximum=234), ) self.energysystem.add(bel, storage) - self.compare_lp_files("storage_invest_1_fixed_losses.lp") - def test_transformer(self): - """Constraint test of a LinearN1Transformer without Investment.""" + def test_converter(self): + """Constraint test of a LinearN1Converter without Investment.""" bgas = solph.buses.Bus(label="gasBus") bbms = solph.buses.Bus(label="biomassBus") bel = solph.buses.Bus(label="electricityBus") bth = solph.buses.Bus(label="thermalBus") - transformer = solph.components.Transformer( - label="powerplantGasCoal", + converter = solph.components.Converter( + label="powerplantGasBiomass", inputs={bbms: solph.flows.Flow(), bgas: solph.flows.Flow()}, outputs={ bel: solph.flows.Flow(variable_costs=50), @@ -580,19 +531,19 @@ def test_transformer(self): conversion_factors={bgas: 0.4, bbms: 0.1, bel: 0.3, bth: 0.5}, ) - self.energysystem.add(bgas, bbms, bel, bth, transformer) + self.energysystem.add(bgas, bbms, bel, bth, converter) - self.compare_lp_files("transformer.lp") + self.compare_lp_files("converter.lp") - def test_transformer_invest(self): - """Constraint test of a LinearN1Transformer with Investment.""" + def test_converter_invest(self): + """Constraint test of a LinearN1Converter with Investment.""" bgas = solph.buses.Bus(label="gasBus") bcoal = solph.buses.Bus(label="coalBus") bel = solph.buses.Bus(label="electricityBus") bth = solph.buses.Bus(label="thermalBus") - transformer = solph.components.Transformer( + converter = solph.components.Converter( label="powerplant_gas_coal", inputs={bgas: solph.flows.Flow(), bcoal: solph.flows.Flow()}, outputs={ @@ -604,19 +555,19 @@ def test_transformer_invest(self): }, conversion_factors={bgas: 0.58, bcoal: 0.2, bel: 0.3, bth: 0.5}, ) - self.energysystem.add(bgas, bcoal, bel, bth, transformer) + self.energysystem.add(bgas, bcoal, bel, bth, converter) - self.compare_lp_files("transformer_invest.lp") + self.compare_lp_files("converter_invest.lp") - def test_transformer_invest_with_existing(self): - """Constraint test of a LinearN1Transformer with Investment.""" + def test_converter_invest_with_existing(self): + """Constraint test of a LinearN1Converter with Investment.""" bgas = solph.buses.Bus(label="gasBus") bcoal = solph.buses.Bus(label="coalBus") bel = solph.buses.Bus(label="electricityBus") bth = solph.buses.Bus(label="thermalBus") - transformer = solph.components.Transformer( + converter = solph.components.Converter( label="powerplant_gas_coal", inputs={bgas: solph.flows.Flow(), bcoal: solph.flows.Flow()}, outputs={ @@ -630,38 +581,38 @@ def test_transformer_invest_with_existing(self): }, conversion_factors={bgas: 0.58, bcoal: 0.2, bel: 0.3, bth: 0.5}, ) - self.energysystem.add(bgas, bcoal, bel, bth, transformer) + self.energysystem.add(bgas, bcoal, bel, bth, converter) - self.compare_lp_files("transformer_invest_with_existing.lp") + self.compare_lp_files("converter_invest_with_existing.lp") - def test_linear_transformer_chp(self): + def test_linear_converter_chp(self): """ - Constraint test of a Transformer without Investment (two outputs). + Constraint test of a Converter without Investment (two outputs). """ bgas = solph.buses.Bus(label="gasBus") bheat = solph.buses.Bus(label="heatBus") bel = solph.buses.Bus(label="electricityBus") - transformer = solph.components.Transformer( + converter = solph.components.Converter( label="CHPpowerplantGas", inputs={ - bgas: solph.flows.Flow(nominal_value=10e10, variable_costs=50) + bgas: solph.flows.Flow(nominal_value=1e11, variable_costs=50) }, outputs={bel: solph.flows.Flow(), bheat: solph.flows.Flow()}, conversion_factors={bel: 0.4, bheat: 0.5}, ) - self.energysystem.add(bgas, bheat, bel, transformer) + self.energysystem.add(bgas, bheat, bel, converter) - self.compare_lp_files("linear_transformer_chp.lp") + self.compare_lp_files("linear_converter_chp.lp") - def test_linear_transformer_chp_invest(self): - """Constraint test of a Transformer with Investment (two outputs).""" + def test_linear_converter_chp_invest(self): + """Constraint test of a Converter with Investment (two outputs).""" bgas = solph.buses.Bus(label="gasBus") bheat = solph.buses.Bus(label="heatBus") bel = solph.buses.Bus(label="electricityBus") - transformer = solph.components.Transformer( + converter = solph.components.Converter( label="chp_powerplant_gas", inputs={ bgas: solph.flows.Flow( @@ -672,29 +623,35 @@ def test_linear_transformer_chp_invest(self): outputs={bel: solph.flows.Flow(), bheat: solph.flows.Flow()}, conversion_factors={bel: 0.4, bheat: 0.5}, ) - self.energysystem.add(bgas, bheat, bel, transformer) + self.energysystem.add(bgas, bheat, bel, converter) - self.compare_lp_files("linear_transformer_chp_invest.lp") + self.compare_lp_files("linear_converter_chp_invest.lp") def test_link(self): - bel0 = solph.buses.Bus(label="bel0") - bel1 = solph.buses.Bus(label="bel1") + """Constraint test of a Link.""" + bus_el_1 = solph.buses.Bus(label="el1") + bus_el_2 = solph.buses.Bus(label="el2") - link = solph.components.experimental.Link( + link = solph.components.Link( label="link", inputs={ - bel0: solph.Flow(nominal_value=4), - bel1: solph.Flow(nominal_value=2), + bus_el_1: solph.flows.Flow(nominal_value=4), + bus_el_2: solph.flows.Flow(nominal_value=2), + }, + outputs={ + bus_el_1: solph.flows.Flow(), + bus_el_2: solph.flows.Flow(), + }, + conversion_factors={ + (bus_el_1, bus_el_2): 0.75, + (bus_el_2, bus_el_1): 0.5, }, - outputs={bel0: solph.Flow(), bel1: solph.Flow()}, - conversion_factors={(bel0, bel1): 0.8, (bel1, bel0): 0.9}, ) - self.energysystem.add(bel0, bel1, link) - + self.energysystem.add(bus_el_1, bus_el_2, link) self.compare_lp_files("link.lp") def test_variable_chp(self): - """ """ + """Test ExctractionTurbineCHP basic functionality""" bel = solph.buses.Bus(label="electricityBus") bth = solph.buses.Bus(label="heatBus") bgas = solph.buses.Bus(label="commodityBus") @@ -715,11 +672,10 @@ def test_variable_chp(self): conversion_factor_full_condensation={bel: 0.5}, ) self.energysystem.add(bel, bth, bgas, chp1, chp2) - self.compare_lp_files("variable_chp.lp") def test_generic_invest_limit(self): - """ """ + """Test a generic keyword investment limit""" bus = solph.buses.Bus(label="bus_1") source_0 = solph.components.Source( @@ -763,7 +719,7 @@ def test_generic_invest_limit(self): self.compare_lp_files("generic_invest_limit.lp", my_om=om) def test_emission_constraints(self): - """ """ + """Test emissions constraint""" bel = solph.buses.Bus(label="electricityBus") source1 = solph.components.Source( @@ -799,7 +755,7 @@ def test_emission_constraints(self): self.compare_lp_files("emission_limit.lp", my_om=om) def test_flow_count_limit(self): - """ """ + """Test limiting the count of nonconvex flows""" bel = solph.buses.Bus(label="electricityBus") source1 = solph.components.Source( @@ -857,7 +813,7 @@ def test_flow_count_limit(self): self.compare_lp_files("flow_count_limit.lp", my_om=om) def test_shared_limit(self): - """ """ + """Test an overall limit shared among components""" b1 = solph.buses.Bus(label="bus") storage1 = solph.components.GenericStorage( @@ -891,7 +847,7 @@ def test_shared_limit(self): self.compare_lp_files("shared_limit.lp", my_om=model) def test_flow_without_emission_for_emission_constraint(self): - """ """ + """Test AttributeError if passed flow misses emission attribute""" with pytest.raises(AttributeError): bel = solph.buses.Bus(label="electricityBus") source1 = solph.components.Source( @@ -912,7 +868,7 @@ def test_flow_without_emission_for_emission_constraint(self): solph.constraints.emission_limit(om, om.flows, limit=777) def test_flow_without_emission_for_emission_constraint_no_error(self): - """ """ + """Test that no error is thrown if no flows are explicitly passed""" bel = solph.buses.Bus(label="electricityBus") source1 = solph.components.Source( label="source1", @@ -930,11 +886,13 @@ def test_flow_without_emission_for_emission_constraint_no_error(self): om = self.get_om() solph.constraints.emission_limit(om, limit=777) + self.compare_lp_files("emission_limit_no_error.lp", my_om=om) + def test_equate_variables_constraint(self): """Testing the equate_variables function in the constraint module.""" bus1 = solph.buses.Bus(label="Bus1") storage = solph.components.GenericStorage( - label="storage_constraint", + label="storage", invest_relation_input_capacity=0.2, invest_relation_output_capacity=0.2, inputs={bus1: solph.flows.Flow()}, @@ -961,14 +919,14 @@ def test_equate_variables_constraint(self): om = self.get_om() solph.constraints.equate_variables( om, - om.InvestmentFlowBlock.invest[source, bus1], - om.InvestmentFlowBlock.invest[bus1, sink], + om.InvestmentFlowBlock.invest[source, bus1, 0], + om.InvestmentFlowBlock.invest[bus1, sink, 0], 2, ) solph.constraints.equate_variables( om, - om.InvestmentFlowBlock.invest[source, bus1], - om.GenericInvestmentStorageBlock.invest[storage], + om.InvestmentFlowBlock.invest[source, bus1, 0], + om.GenericInvestmentStorageBlock.invest[storage, 0], ) self.compare_lp_files("connect_investment.lp", my_om=om) @@ -1017,7 +975,7 @@ def test_equate_flows_constraint(self): self.compare_lp_files("equate_flows.lp", my_om=om) def test_gradient(self): - """Testing gradient constraints and costs.""" + """Testing gradient constraints""" bel = solph.buses.Bus(label="electricityBus") pp = solph.components.Source( @@ -1032,11 +990,10 @@ def test_gradient(self): }, ) self.energysystem.add(bel, pp) - self.compare_lp_files("source_with_gradient.lp") def test_nonconvex_gradient(self): - """Testing gradient constraints and costs.""" + """Testing gradient constraints""" bel = solph.buses.Bus(label="electricityBus") pp = solph.components.Source( @@ -1053,7 +1010,6 @@ def test_nonconvex_gradient(self): }, ) self.energysystem.add(bel, pp) - self.compare_lp_files("source_with_nonconvex_gradient.lp") def test_nonconvex_positive_gradient_error(self): @@ -1113,6 +1069,136 @@ def test_investment_limit(self): self.compare_lp_files("investment_limit.lp", my_om=om) + def test_investment_limit_with_dsm1(self): + """Testing the investment_limit function in the constraint module.""" + bus1 = solph.buses.Bus(label="Bus1") + source = solph.components.Source( + label="Source", + outputs={ + bus1: solph.flows.Flow( + investment=solph.Investment(ep_costs=123) + ) + }, + ) + dsm = solph.components.experimental.SinkDSM( + label="sink_dsm_DIW", + approach="DIW", + inputs={bus1: solph.flows.Flow()}, + demand=[1] * 3, + capacity_up=[0.5] * 3, + capacity_down=[0.5] * 3, + max_demand=[1] * 3, + delay_time=1, + cost_dsm_down_shift=0.5, + cost_dsm_up=0.5, + shed_eligibility=False, + investment=solph.Investment( + ep_costs=100, existing=50, minimum=33, maximum=100 + ), + ) + self.energysystem.add(bus1, source, dsm) + om = self.get_om() + solph.constraints.investment_limit(om, limit=900) + + self.compare_lp_files("investment_limit_with_dsm_DIW.lp", my_om=om) + + def test_investment_limit_with_dsm2(self): + """Testing the investment_limit function in the constraint module.""" + bus1 = solph.buses.Bus(label="Bus1") + source = solph.components.Source( + label="Source", + outputs={ + bus1: solph.flows.Flow( + investment=solph.Investment(ep_costs=123) + ) + }, + ) + dsm = solph.components.experimental.SinkDSM( + label="sink_dsm_DLR", + approach="DLR", + inputs={bus1: solph.flows.Flow()}, + demand=[1] * 3, + capacity_up=[0.5] * 3, + capacity_down=[0.5] * 3, + max_demand=[1] * 3, + delay_time=1, + shift_time=1, + cost_dsm_down_shift=0.5, + cost_dsm_up=0.5, + shed_eligibility=False, + investment=solph.Investment( + ep_costs=100, existing=50, minimum=33, maximum=100 + ), + ) + self.energysystem.add(bus1, source, dsm) + om = self.get_om() + solph.constraints.investment_limit(om, limit=900) + + self.compare_lp_files("investment_limit_with_dsm_DLR.lp", my_om=om) + + def test_investment_limit_with_dsm3(self): + """Testing the investment_limit function in the constraint module.""" + bus1 = solph.buses.Bus(label="Bus1") + source = solph.components.Source( + label="Source", + outputs={ + bus1: solph.flows.Flow( + investment=solph.Investment(ep_costs=123) + ) + }, + ) + dsm = solph.components.experimental.SinkDSM( + label="sink_dsm_oemof", + approach="oemof", + inputs={bus1: solph.flows.Flow()}, + demand=[1] * 3, + capacity_up=[0.5] * 3, + capacity_down=[0.5] * 3, + max_demand=[1] * 3, + delay_time=1, + shift_interval=2, + cost_dsm_down_shift=0.5, + cost_dsm_up=0.5, + shed_eligibility=False, + investment=solph.Investment( + ep_costs=100, existing=50, minimum=33, maximum=100 + ), + ) + self.energysystem.add(bus1, source, dsm) + om = self.get_om() + solph.constraints.investment_limit(om, limit=900) + + self.compare_lp_files("investment_limit_with_dsm_oemof.lp", my_om=om) + + def test_investment_limit_per_period_error_no_multi_period(self): + """Test error being thrown if model is not a multi-period model""" + bus1 = solph.buses.Bus(label="Bus1") + solph.components.GenericStorage( + label="storage_invest_limit", + invest_relation_input_capacity=0.2, + invest_relation_output_capacity=0.2, + inputs={bus1: solph.flows.Flow()}, + outputs={bus1: solph.flows.Flow()}, + investment=solph.Investment(ep_costs=145), + ) + solph.components.Source( + label="Source", + outputs={ + bus1: solph.flows.Flow( + investment=solph.Investment(ep_costs=123) + ) + }, + ) + om = self.get_om() + + msg = ( + "investment_limit_per_period is only applicable " + "for multi-period models.\nIn order to create such a model, " + "explicitly set attribute `periods` of your energy system." + ) + with pytest.raises(ValueError, match=msg): + solph.constraints.investment_limit_per_period(om, limit=900) + def test_min_max_runtime(self): """Testing min and max runtimes for nonconvex flows.""" bus_t = solph.buses.Bus(label="Bus_T") @@ -1176,11 +1262,12 @@ def test_inactivity_costs(self): self.energysystem.add(bus_t, pp) self.compare_lp_files("inactivity_costs.lp") - def test_piecewise_linear_transformer_cc(self): - """Testing PiecewiseLinearTransformer using CC formulation.""" + def test_piecewise_linear_converter_cc(self): + """Testing PiecewiseLinearConverter using CC formulation.""" bgas = solph.buses.Bus(label="gasBus") bel = solph.buses.Bus(label="electricityBus") - plt = solph.components.experimental.PiecewiseLinearTransformer( + + pwlcw = solph.components.experimental.PiecewiseLinearConverter( label="pwltf", inputs={ bgas: solph.flows.Flow(nominal_value=100, variable_costs=1) @@ -1190,15 +1277,15 @@ def test_piecewise_linear_transformer_cc(self): conversion_function=lambda x: x**2, pw_repn="CC", ) + self.energysystem.add(bgas, bel, pwlcw) + self.compare_lp_files("piecewise_linear_converter_cc.lp") - self.energysystem.add(bgas, bel, plt) - self.compare_lp_files("piecewise_linear_transformer_cc.lp") - - def test_piecewise_linear_transformer_dcc(self): - """Testing PiecewiseLinearTransformer using DCC formulation.""" + def test_piecewise_linear_converter_dcc(self): + """Testing PiecewiseLinearConverter using DCC formulation.""" bgas = solph.buses.Bus(label="gasBus") bel = solph.buses.Bus(label="electricityBus") - plt = solph.components.experimental.PiecewiseLinearTransformer( + + pwlcw = solph.components.experimental.PiecewiseLinearConverter( label="pwltf", inputs={ bgas: solph.flows.Flow(nominal_value=100, variable_costs=1) @@ -1208,8 +1295,8 @@ def test_piecewise_linear_transformer_dcc(self): conversion_function=lambda x: x**2, pw_repn="DCC", ) - self.energysystem.add(bgas, bel, plt) - self.compare_lp_files("piecewise_linear_transformer_dcc.lp") + self.energysystem.add(bgas, bel, pwlcw) + self.compare_lp_files("piecewise_linear_converter_dcc.lp") def test_maximum_startups(self): """Testing maximum_startups attribute for nonconvex flows.""" @@ -1247,32 +1334,60 @@ def test_maximum_shutdowns(self): self.energysystem.add(bus_t, pp) self.compare_lp_files("maximum_shutdowns.lp") - def test_offsettransformer(self): - """Constraint test of a OffsetTransformer.""" - bgas = solph.buses.Bus(label="gasBus") - bth = solph.buses.Bus(label="thermalBus") + def test_offsetconverter_nonconvex(self): + """Constraint test of an OffsetConverter only with NonConvex + attribute.""" + b_diesel = solph.buses.Bus(label="bus_diesel") + b_el = solph.buses.Bus(label="bus_electricity") - transformer = solph.components.OffsetTransformer( - label="gasboiler", + diesel_genset = solph.components.OffsetConverter( + label="diesel_genset", inputs={ - bgas: solph.flows.Flow( + b_diesel: solph.flows.Flow(), + }, + outputs={ + b_el: solph.flows.Flow( nonconvex=solph.NonConvex(), nominal_value=100, - min=0.32, + min=0.2, ) }, - outputs={bth: solph.flows.Flow()}, - coefficients=[-17, 0.9], + coefficients=[2.5, 0.5], ) - self.energysystem.add(bgas, bth, transformer) + self.energysystem.add(b_diesel, b_el, diesel_genset) + + self.compare_lp_files("offsetconverter_nonconvex.lp") - self.compare_lp_files("offsettransformer.lp") + def test_offsetconverter_nonconvex_investment(self): + """Constraint test of an OffsetConverter with both NonConvex and + Investment attributes.""" + b_diesel = solph.buses.Bus(label="bus_diesel") + b_el = solph.buses.Bus(label="bus_electricity") + + diesel_genset = solph.components.OffsetConverter( + label="diesel_genset", + inputs={b_diesel: solph.flows.Flow()}, + outputs={ + b_el: solph.flows.Flow( + min=0.2, + nonconvex=solph.NonConvex(), + investment=solph.Investment( + ep_costs=100, + maximum=1234, + ), + ) + }, + coefficients=[2.5, 0.5], + ) + self.energysystem.add(b_diesel, b_el, diesel_genset) + + self.compare_lp_files("offsetconverter_nonconvex_investment.lp") def test_dsm_module_DIW(self): """Constraint test of SinkDSM with approach=DLR""" b_elec = solph.buses.Bus(label="bus_elec") - sink = solph.components.experimental.SinkDSM( + sinkdsm = solph.components.experimental.SinkDSM( label="demand_dsm", inputs={b_elec: solph.flows.Flow()}, demand=[1] * 3, @@ -1287,14 +1402,14 @@ def test_dsm_module_DIW(self): shed_eligibility=False, ) - self.energysystem.add(b_elec, sink) + self.energysystem.add(b_elec, sinkdsm) self.compare_lp_files("dsm_module_DIW.lp") def test_dsm_module_DLR(self): """Constraint test of SinkDSM with approach=DLR""" b_elec = solph.buses.Bus(label="bus_elec") - sink = solph.components.experimental.SinkDSM( + sinkdsm = solph.components.experimental.SinkDSM( label="demand_dsm", inputs={b_elec: solph.flows.Flow()}, demand=[1] * 3, @@ -1309,14 +1424,14 @@ def test_dsm_module_DLR(self): cost_dsm_down_shift=2, shed_eligibility=False, ) - self.energysystem.add(b_elec, sink) + self.energysystem.add(b_elec, sinkdsm) self.compare_lp_files("dsm_module_DLR.lp") def test_dsm_module_oemof(self): """Constraint test of SinkDSM with approach=oemof""" b_elec = solph.buses.Bus(label="bus_elec") - sink = solph.components.experimental.SinkDSM( + sinkdsm = solph.components.experimental.SinkDSM( label="demand_dsm", inputs={b_elec: solph.flows.Flow()}, demand=[1] * 3, @@ -1330,25 +1445,116 @@ def test_dsm_module_oemof(self): cost_dsm_down_shift=2, shed_eligibility=False, ) - self.energysystem.add(b_elec, sink) + self.energysystem.add(b_elec, sinkdsm) self.compare_lp_files("dsm_module_oemof.lp") + def test_dsm_module_DIW_extended(self): + """Constraint test of SinkDSM with approach=DLR + + Test all possible parameters and constraints + """ + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1, 0.9, 0.8], + capacity_up=[0.5, 0.4, 0.5], + capacity_down=[0.3, 0.3, 0.4], + approach="DIW", + max_demand=1, + max_capacity_up=1, + max_capacity_down=1, + delay_time=1, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + efficiency=0.99, + recovery_time_shift=2, + recovery_time_shed=2, + shed_time=2, + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_DIW_extended.lp") + + def test_dsm_module_DLR_extended(self): + """Constraint test of SinkDSM with approach=DLR""" + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1, 0.9, 0.8], + capacity_up=[0.5, 0.4, 0.5], + capacity_down=[0.3, 0.3, 0.4], + approach="DLR", + max_demand=1, + max_capacity_up=1, + max_capacity_down=1, + delay_time=2, + shift_time=1, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + efficiency=0.99, + recovery_time_shed=2, + ActivateYearLimit=True, + ActivateDayLimit=True, + n_yearLimit_shift=100, + n_yearLimit_shed=50, + t_dayLimit=3, + addition=False, + fixes=False, + shed_time=2, + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_DLR_extended.lp") + + def test_dsm_module_oemof_extended(self): + """Constraint test of SinkDSM with approach=oemof""" + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1, 0.9, 0.8], + capacity_up=[0.5, 0.4, 0.5], + capacity_down=[0.3, 0.3, 0.4], + approach="oemof", + shift_interval=2, + max_demand=1, + max_capacity_up=1, + max_capacity_down=1, + delay_time=2, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + efficiency=0.99, + recovery_time_shed=2, + shed_time=2, + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_oemof_extended.lp") + def test_dsm_module_DIW_invest(self): """Constraint test of SinkDSM with approach=DLR and investments""" b_elec = solph.buses.Bus(label="bus_elec") - sink = solph.components.experimental.SinkDSM( + sinkdsm = solph.components.experimental.SinkDSM( label="demand_dsm", inputs={b_elec: solph.flows.Flow()}, demand=[1] * 3, capacity_up=[0.5] * 3, capacity_down=[0.5] * 3, approach="DIW", - flex_share_up=1, - flex_share_down=1, + max_demand=1, delay_time=1, - cost_dsm_down_shift=2, - shed_eligibility=False, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + shed_eligibility=True, + recovery_time_shed=2, + shed_time=2, investment=solph.Investment( existing=50, minimum=33, @@ -1356,26 +1562,30 @@ def test_dsm_module_DIW_invest(self): custom_attributes={"ep_cost": 100}, ), ) - self.energysystem.add(b_elec, sink) + self.energysystem.add(b_elec, sinkdsm) self.compare_lp_files("dsm_module_DIW_invest.lp") def test_dsm_module_DLR_invest(self): """Constraint test of SinkDSM with approach=DLR and investments""" b_elec = solph.buses.Bus(label="bus_elec") - sink = solph.components.experimental.SinkDSM( + sinkdsm = solph.components.experimental.SinkDSM( label="demand_dsm", inputs={b_elec: solph.flows.Flow()}, demand=[1] * 3, capacity_up=[0.5] * 3, capacity_down=[0.5] * 3, approach="DLR", - flex_share_up=1, - flex_share_down=1, + max_demand=1, delay_time=2, shift_time=1, - cost_dsm_down_shift=2, - shed_eligibility=False, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + shed_eligibility=True, + recovery_time_shed=2, + shed_time=2, + n_yearLimit_shed=50, investment=solph.Investment( existing=50, minimum=33, @@ -1383,25 +1593,28 @@ def test_dsm_module_DLR_invest(self): custom_attributes={"ep_cost": 100}, ), ) - self.energysystem.add(b_elec, sink) + self.energysystem.add(b_elec, sinkdsm) self.compare_lp_files("dsm_module_DLR_invest.lp") def test_dsm_module_oemof_invest(self): """Constraint test of SinkDSM with approach=oemof and investments""" b_elec = solph.buses.Bus(label="bus_elec") - sink = solph.components.experimental.SinkDSM( + sinkdsm = solph.components.experimental.SinkDSM( label="demand_dsm", inputs={b_elec: solph.flows.Flow()}, demand=[1] * 3, capacity_up=[0.5, 0.4, 0.5], capacity_down=[0.5, 0.4, 0.5], approach="oemof", - flex_share_up=1, - flex_share_down=1, + max_demand=1, shift_interval=2, - cost_dsm_down_shift=2, - shed_eligibility=False, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + shed_eligibility=True, + recovery_time_shed=2, + shed_time=2, investment=solph.Investment( existing=50, minimum=33, @@ -1409,13 +1622,36 @@ def test_dsm_module_oemof_invest(self): custom_attributes={"ep_cost": 100}, ), ) - self.energysystem.add(b_elec, sink) + self.energysystem.add(b_elec, sinkdsm) self.compare_lp_files("dsm_module_oemof_invest.lp") + def test_dsm_module_DLR_delay_time(self): + """Constraint test of SinkDSM with approach=DLR; + testing for passing an iterable for delay_time""" + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1] * 3, + capacity_up=[0.5] * 3, + capacity_down=[0.5] * 3, + approach="DLR", + max_demand=1, + max_capacity_up=1, + max_capacity_down=1, + delay_time=[1, 3], + shift_time=1, + cost_dsm_down_shift=2, + shed_eligibility=False, + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_DLR_delay_time.lp") + def test_invest_non_convex_flow(self): """Invest into a non-convex Flow""" b1 = solph.buses.Bus(label="b1") - sink = solph.buses.Bus( + b2 = solph.buses.Bus( label="b2", inputs={ b1: solph.Flow( @@ -1432,7 +1668,7 @@ def test_invest_non_convex_flow(self): }, outputs={b1: solph.Flow()}, ) - self.energysystem.add(b1, sink) + self.energysystem.add(b1, b2) self.compare_lp_files("invest_non_convex_flow.lp") def test_nonconvex_investment_storage_without_offset(self): @@ -1458,7 +1694,6 @@ def test_nonconvex_investment_storage_without_offset(self): ), ) self.energysystem.add(bel, storage) - self.compare_lp_files("storage_invest_without_offset.lp") def test_nonconvex_investment_storage_with_offset(self): @@ -1468,7 +1703,7 @@ def test_nonconvex_investment_storage_with_offset(self): bel = solph.buses.Bus(label="electricityBus") storage = solph.components.GenericStorage( - label="storagenon_convex", + label="storage_non_convex", inputs={bel: solph.flows.Flow(variable_costs=56)}, outputs={bel: solph.flows.Flow(variable_costs=24)}, nominal_storage_capacity=None, @@ -1488,7 +1723,6 @@ def test_nonconvex_investment_storage_with_offset(self): ), ) self.energysystem.add(bel, storage) - self.compare_lp_files("storage_invest_with_offset.lp") def test_nonconvex_invest_storage_all_nonconvex(self): @@ -1524,7 +1758,6 @@ def test_nonconvex_invest_storage_all_nonconvex(self): ), ) self.energysystem.add(b1, storage) - self.compare_lp_files("storage_invest_all_nonconvex.lp") def test_nonconvex_invest_sink_without_offset(self): @@ -1591,6 +1824,68 @@ def test_nonconvex_invest_source_with_offset_no_minimum(self): self.energysystem.add(bel, source) self.compare_lp_files("flow_invest_with_offset_no_minimum.lp") + def test_integral_limit_error_no_multi_period(self): + """Test error being thrown if model is not a multi-period model""" + bel = solph.buses.Bus(label="electricityBus") + + source = solph.components.Source( + label="pv_source", + outputs={ + bel: solph.flows.Flow( + nominal_value=100, + variable_costs=20, + fix=[0.3, 0.5, 0.8], + custom_attributes={"space": 40}, + ) + }, + ) + self.energysystem.add(bel, source) + om = self.get_om() + msg = ( + "generic_periodical_integral_limit is only applicable\n" + "for multi-period models.\nFor standard models, use " + "generic_integral_limit instead." + ) + with pytest.raises(ValueError, match=msg): + solph.constraints.generic_periodical_integral_limit( + om, keyword="space" + ) + + def test_summed_min_max_source(self): + """Constraints test summed_min and summed_max attribute of flow""" + + bel = solph.buses.Bus(label="electricityBus") + + sink = solph.components.Sink( + label="excess", + inputs={ + bel: solph.flows.Flow( + summed_min=3, + summed_max=100, + variable_costs=25, + max=0.8, + nominal_value=10, + ) + }, + ) + self.energysystem.add(bel, sink) + self.compare_lp_files("summed_min_source.lp") + + def test_integer_flow_source(self): + """Test source with integer output""" + bel = solph.buses.Bus(label="electricityBus") + + sink = solph.components.Sink( + label="excess", + inputs={ + bel: solph.flows.Flow( + variable_costs=25, max=1, nominal_value=10, integer=True + ) + }, + ) + self.energysystem.add(bel, sink) + self.compare_lp_files("integer_source.lp") + def test_nonequidistant_storage(self): """Constraint test of an energy system with non-equidistant time index @@ -1602,7 +1897,7 @@ def test_nonequidistant_storage(self): es = solph.EnergySystem(timeindex=timeindex, infer_last_interval=False) b_gas = solph.Bus(label="gas") b_th = solph.Bus(label="heat") - boiler = solph.components.Transformer( + boiler = solph.components.Converter( label="boiler", inputs={b_gas: solph.Flow(variable_costs=100)}, outputs={b_th: solph.Flow(nominal_value=200)}, @@ -1618,3 +1913,74 @@ def test_nonequidistant_storage(self): es.add(b_gas, b_th, boiler, storage) om = solph.Model(es) self.compare_lp_files("nonequidistant_timeindex.lp", my_om=om) + + def test_storage_level_constraint(self): + """Constraint test of an energy system + with storage_level_constraint + """ + es = solph.EnergySystem( + timeindex=pd.date_range("2022-01-01", freq="1H", periods=2), + infer_last_interval=True, + ) + + multiplexer = solph.Bus( + label="multiplexer", + ) + + storage = solph.components.GenericStorage( + label="storage", + nominal_storage_capacity=4, + initial_storage_level=1, + balanced=True, + loss_rate=0.25, + inputs={multiplexer: solph.Flow()}, + outputs={multiplexer: solph.Flow()}, + ) + + es.add(multiplexer, storage) + + in_0 = solph.components.Source( + label="in_0", + outputs={ + multiplexer: solph.Flow(nominal_value=0.5, variable_costs=0.25) + }, + ) + es.add(in_0) + + in_1 = solph.components.Source( + label="in_1", + outputs={multiplexer: solph.Flow(nominal_value=0.125)}, + ) + es.add(in_1) + + out_0 = solph.components.Sink( + label="out_0", + inputs={ + multiplexer: solph.Flow( + nominal_value=0.25, variable_costs=-0.125 + ) + }, + ) + es.add(out_0) + + out_1 = solph.components.Sink( + label="out_1", + inputs={ + multiplexer: solph.Flow( + nominal_value=0.125, variable_costs=-0.125 + ) + }, + ) + es.add(out_1) + + om = solph.Model(es) + + solph.constraints.storage_level_constraint( + model=om, + name="multiplexer", + storage_component=storage, + multiplexer_bus=multiplexer, + input_levels={in_1: 1 / 4}, # in_0 is always active + output_levels={out_0: 1 / 8, out_1: 1 / 2}, + ) + self.compare_lp_files("storage_level_constraint.lp", my_om=om) diff --git a/tests/lp_files/activity_costs.lp b/tests/lp_files/activity_costs.lp index e9d9c020c..02f6420cf 100644 --- a/tests/lp_files/activity_costs.lp +++ b/tests/lp_files/activity_costs.lp @@ -1,26 +1,26 @@ \* Source Pyomo model name=Model *\ -min +min objective: ++10 flow(cheap_plant_activity_costs_Bus_C_0_0) ++10 flow(cheap_plant_activity_costs_Bus_C_0_1) ++10 flow(cheap_plant_activity_costs_Bus_C_0_2) +2 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_0) +2 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_1) +2 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_2) -+10 flow(cheap_plant_activity_costs_Bus_C_0) -+10 flow(cheap_plant_activity_costs_Bus_C_1) -+10 flow(cheap_plant_activity_costs_Bus_C_2) s.t. -c_e_BusBlock_balance(Bus_C_0)_: -+1 flow(cheap_plant_activity_costs_Bus_C_0) +c_e_BusBlock_balance(Bus_C_0_0)_: ++1 flow(cheap_plant_activity_costs_Bus_C_0_0) = 0 -c_e_BusBlock_balance(Bus_C_1)_: -+1 flow(cheap_plant_activity_costs_Bus_C_1) +c_e_BusBlock_balance(Bus_C_0_1)_: ++1 flow(cheap_plant_activity_costs_Bus_C_0_1) = 0 -c_e_BusBlock_balance(Bus_C_2)_: -+1 flow(cheap_plant_activity_costs_Bus_C_2) +c_e_BusBlock_balance(Bus_C_0_2)_: ++1 flow(cheap_plant_activity_costs_Bus_C_0_2) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_activity_costs_Bus_C_0)_: @@ -38,43 +38,40 @@ c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_activity_costs_Bus_ +1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_2) = 0 -c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_0)_: +c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_0_0)_: +-1 flow(cheap_plant_activity_costs_Bus_C_0_0) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_0) --1 flow(cheap_plant_activity_costs_Bus_C_0) <= 0 -c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_1)_: +c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_0_1)_: +-1 flow(cheap_plant_activity_costs_Bus_C_0_1) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_1) --1 flow(cheap_plant_activity_costs_Bus_C_1) <= 0 -c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_2)_: +c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_0_2)_: +-1 flow(cheap_plant_activity_costs_Bus_C_0_2) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_2) --1 flow(cheap_plant_activity_costs_Bus_C_2) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_0)_: +c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_0_0)_: ++1 flow(cheap_plant_activity_costs_Bus_C_0_0) -1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_0) -+1 flow(cheap_plant_activity_costs_Bus_C_0) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_1)_: +c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_0_1)_: ++1 flow(cheap_plant_activity_costs_Bus_C_0_1) -1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_1) -+1 flow(cheap_plant_activity_costs_Bus_C_1) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_2)_: +c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_0_2)_: ++1 flow(cheap_plant_activity_costs_Bus_C_0_2) -1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_2) -+1 flow(cheap_plant_activity_costs_Bus_C_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(cheap_plant_activity_costs_Bus_C_0) <= 10 - 0 <= flow(cheap_plant_activity_costs_Bus_C_1) <= 10 - 0 <= flow(cheap_plant_activity_costs_Bus_C_2) <= 10 + 0 <= flow(cheap_plant_activity_costs_Bus_C_0_0) <= 10.0 + 0 <= flow(cheap_plant_activity_costs_Bus_C_0_1) <= 10.0 + 0 <= flow(cheap_plant_activity_costs_Bus_C_0_2) <= 10.0 0 <= NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_0) <= 1 0 <= NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_1) <= 1 0 <= NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_2) <= 1 diff --git a/tests/lp_files/activity_costs_multi_period.lp b/tests/lp_files/activity_costs_multi_period.lp new file mode 100644 index 000000000..fd798fa7b --- /dev/null +++ b/tests/lp_files/activity_costs_multi_period.lp @@ -0,0 +1,160 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++10 flow(cheap_plant_activity_costs_Bus_C_0_0) ++10 flow(cheap_plant_activity_costs_Bus_C_0_1) ++9.80392156862745 flow(cheap_plant_activity_costs_Bus_C_1_2) ++9.80392156862745 flow(cheap_plant_activity_costs_Bus_C_1_3) ++9.611687812379854 flow(cheap_plant_activity_costs_Bus_C_2_4) ++9.611687812379854 flow(cheap_plant_activity_costs_Bus_C_2_5) ++2 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_0) ++2 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_1) ++1.9607843137254901 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_2) ++1.9607843137254901 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_3) ++1.9223375624759707 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_4) ++1.9223375624759707 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_5) + +s.t. + +c_e_BusBlock_balance(Bus_C_0_0)_: ++1 flow(cheap_plant_activity_costs_Bus_C_0_0) += 0 + +c_e_BusBlock_balance(Bus_C_0_1)_: ++1 flow(cheap_plant_activity_costs_Bus_C_0_1) += 0 + +c_e_BusBlock_balance(Bus_C_1_2)_: ++1 flow(cheap_plant_activity_costs_Bus_C_1_2) += 0 + +c_e_BusBlock_balance(Bus_C_1_3)_: ++1 flow(cheap_plant_activity_costs_Bus_C_1_3) += 0 + +c_e_BusBlock_balance(Bus_C_2_4)_: ++1 flow(cheap_plant_activity_costs_Bus_C_2_4) += 0 + +c_e_BusBlock_balance(Bus_C_2_5)_: ++1 flow(cheap_plant_activity_costs_Bus_C_2_5) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_activity_costs_Bus_C_0)_: +-10 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_0) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_activity_costs_Bus_C_1)_: +-10 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_1) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_activity_costs_Bus_C_2)_: +-10 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_2) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_activity_costs_Bus_C_3)_: +-10 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_3) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_3) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_activity_costs_Bus_C_4)_: +-10 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_4) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_4) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_activity_costs_Bus_C_5)_: +-10 NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_5) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_5) += 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_0_0)_: +-1 flow(cheap_plant_activity_costs_Bus_C_0_0) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_0) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_0_1)_: +-1 flow(cheap_plant_activity_costs_Bus_C_0_1) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_1) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_1_2)_: +-1 flow(cheap_plant_activity_costs_Bus_C_1_2) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_2) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_1_3)_: +-1 flow(cheap_plant_activity_costs_Bus_C_1_3) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_3) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_2_4)_: +-1 flow(cheap_plant_activity_costs_Bus_C_2_4) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_4) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_activity_costs_Bus_C_2_5)_: +-1 flow(cheap_plant_activity_costs_Bus_C_2_5) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_5) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_0_0)_: ++1 flow(cheap_plant_activity_costs_Bus_C_0_0) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_0) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_0_1)_: ++1 flow(cheap_plant_activity_costs_Bus_C_0_1) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_1) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_1_2)_: ++1 flow(cheap_plant_activity_costs_Bus_C_1_2) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_2) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_1_3)_: ++1 flow(cheap_plant_activity_costs_Bus_C_1_3) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_3) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_2_4)_: ++1 flow(cheap_plant_activity_costs_Bus_C_2_4) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_4) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_activity_costs_Bus_C_2_5)_: ++1 flow(cheap_plant_activity_costs_Bus_C_2_5) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_5) +<= 0 + +bounds + 0 <= flow(cheap_plant_activity_costs_Bus_C_0_0) <= 10.0 + 0 <= flow(cheap_plant_activity_costs_Bus_C_0_1) <= 10.0 + 0 <= flow(cheap_plant_activity_costs_Bus_C_1_2) <= 10.0 + 0 <= flow(cheap_plant_activity_costs_Bus_C_1_3) <= 10.0 + 0 <= flow(cheap_plant_activity_costs_Bus_C_2_4) <= 10.0 + 0 <= flow(cheap_plant_activity_costs_Bus_C_2_5) <= 10.0 + 0 <= NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_0) <= 1 + 0 <= NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_1) <= 1 + 0 <= NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_2) <= 1 + 0 <= NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_3) <= 1 + 0 <= NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_4) <= 1 + 0 <= NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_5) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_0) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_1) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_2) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_3) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_4) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_5) <= +inf +binary + NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_0) + NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_1) + NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_2) + NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_3) + NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_4) + NonConvexFlowBlock_status(cheap_plant_activity_costs_Bus_C_5) +end diff --git a/tests/lp_files/connect_investment.lp b/tests/lp_files/connect_investment.lp index 7d2513c9e..5573bd32f 100644 --- a/tests/lp_files/connect_investment.lp +++ b/tests/lp_files/connect_investment.lp @@ -2,182 +2,209 @@ min objective: -+145 GenericInvestmentStorageBlock_invest(storage_constraint) -+500 InvestmentFlowBlock_invest(Bus1_Sink) -+123 InvestmentFlowBlock_invest(Source_Bus1) ++500 InvestmentFlowBlock_invest(Bus1_Sink_0) ++123 InvestmentFlowBlock_invest(Source_Bus1_0) ++145 GenericInvestmentStorageBlock_invest(storage_0) s.t. -c_e__equate_InvestmentFlowBlock_invest(Source_Bus1)_InvestmentFlowBlock_invest(Bus1_Sink)__: --1 InvestmentFlowBlock_invest(Bus1_Sink) -+2 InvestmentFlowBlock_invest(Source_Bus1) +c_e__equate_InvestmentFlowBlock_invest(Source_Bus1_0)_InvestmentFlowBlock_invest(Bus1_Sink_0)__: +-1 InvestmentFlowBlock_invest(Bus1_Sink_0) ++2 InvestmentFlowBlock_invest(Source_Bus1_0) = 0 -c_e__equate_InvestmentFlowBlock_invest(Source_Bus1)_GenericInvestmentStorageBlock_invest(storage_constraint)__: --1 GenericInvestmentStorageBlock_invest(storage_constraint) -+1 InvestmentFlowBlock_invest(Source_Bus1) +c_e__equate_InvestmentFlowBlock_invest(Source_Bus1_0)_GenericInvestmentStorageBlock_invest(storage_0)__: ++1 InvestmentFlowBlock_invest(Source_Bus1_0) +-1 GenericInvestmentStorageBlock_invest(storage_0) = 0 -c_e_BusBlock_balance(Bus1_0)_: --1 flow(Bus1_Sink_0) --1 flow(Bus1_storage_constraint_0) -+1 flow(Source_Bus1_0) -+1 flow(storage_constraint_Bus1_0) +c_e_BusBlock_balance(Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) ++1 flow(storage_Bus1_0_0) +-1 flow(Bus1_storage_0_0) +-1 flow(Bus1_Sink_0_0) = 0 -c_e_BusBlock_balance(Bus1_1)_: --1 flow(Bus1_Sink_1) --1 flow(Bus1_storage_constraint_1) -+1 flow(Source_Bus1_1) -+1 flow(storage_constraint_Bus1_1) +c_e_BusBlock_balance(Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) ++1 flow(storage_Bus1_0_1) +-1 flow(Bus1_storage_0_1) +-1 flow(Bus1_Sink_0_1) = 0 -c_e_BusBlock_balance(Bus1_2)_: --1 flow(Bus1_Sink_2) --1 flow(Bus1_storage_constraint_2) -+1 flow(Source_Bus1_2) -+1 flow(storage_constraint_Bus1_2) +c_e_BusBlock_balance(Bus1_0_2)_: ++1 flow(Source_Bus1_0_2) ++1 flow(storage_Bus1_0_2) +-1 flow(Bus1_storage_0_2) +-1 flow(Bus1_Sink_0_2) = 0 -c_u_InvestmentFlowBlock_max(Bus1_Sink_0)_: --1 InvestmentFlowBlock_invest(Bus1_Sink) -+1 flow(Bus1_Sink_0) +c_e_InvestmentFlowBlock_total_rule(storage_Bus1_0)_: ++1 InvestmentFlowBlock_total(storage_Bus1_0) +-1 InvestmentFlowBlock_invest(storage_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Bus1_Sink_0)_: +-1 InvestmentFlowBlock_invest(Bus1_Sink_0) ++1 InvestmentFlowBlock_total(Bus1_Sink_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Bus1_storage_0)_: ++1 InvestmentFlowBlock_total(Bus1_storage_0) +-1 InvestmentFlowBlock_invest(Bus1_storage_0) += 0 + +c_u_InvestmentFlowBlock_max(storage_Bus1_0_0)_: ++1 flow(storage_Bus1_0_0) +-1 InvestmentFlowBlock_total(storage_Bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(Bus1_Sink_1)_: --1 InvestmentFlowBlock_invest(Bus1_Sink) -+1 flow(Bus1_Sink_1) +c_u_InvestmentFlowBlock_max(storage_Bus1_0_1)_: ++1 flow(storage_Bus1_0_1) +-1 InvestmentFlowBlock_total(storage_Bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(Bus1_Sink_2)_: --1 InvestmentFlowBlock_invest(Bus1_Sink) -+1 flow(Bus1_Sink_2) +c_u_InvestmentFlowBlock_max(storage_Bus1_0_2)_: ++1 flow(storage_Bus1_0_2) +-1 InvestmentFlowBlock_total(storage_Bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(Bus1_storage_constraint_0)_: --1 InvestmentFlowBlock_invest(Bus1_storage_constraint) -+1 flow(Bus1_storage_constraint_0) +c_u_InvestmentFlowBlock_max(Bus1_Sink_0_0)_: ++1 flow(Bus1_Sink_0_0) +-1 InvestmentFlowBlock_total(Bus1_Sink_0) <= 0 -c_u_InvestmentFlowBlock_max(Bus1_storage_constraint_1)_: --1 InvestmentFlowBlock_invest(Bus1_storage_constraint) -+1 flow(Bus1_storage_constraint_1) +c_u_InvestmentFlowBlock_max(Bus1_Sink_0_1)_: ++1 flow(Bus1_Sink_0_1) +-1 InvestmentFlowBlock_total(Bus1_Sink_0) <= 0 -c_u_InvestmentFlowBlock_max(Bus1_storage_constraint_2)_: --1 InvestmentFlowBlock_invest(Bus1_storage_constraint) -+1 flow(Bus1_storage_constraint_2) +c_u_InvestmentFlowBlock_max(Bus1_Sink_0_2)_: ++1 flow(Bus1_Sink_0_2) +-1 InvestmentFlowBlock_total(Bus1_Sink_0) <= 0 -c_u_InvestmentFlowBlock_max(Source_Bus1_0)_: --1 InvestmentFlowBlock_invest(Source_Bus1) -+1 flow(Source_Bus1_0) +c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 InvestmentFlowBlock_total(Source_Bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(Source_Bus1_1)_: --1 InvestmentFlowBlock_invest(Source_Bus1) -+1 flow(Source_Bus1_1) +c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(Source_Bus1_2)_: --1 InvestmentFlowBlock_invest(Source_Bus1) -+1 flow(Source_Bus1_2) +c_u_InvestmentFlowBlock_max(Source_Bus1_0_2)_: ++1 flow(Source_Bus1_0_2) +-1 InvestmentFlowBlock_total(Source_Bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_constraint_Bus1_0)_: --1 InvestmentFlowBlock_invest(storage_constraint_Bus1) -+1 flow(storage_constraint_Bus1_0) +c_u_InvestmentFlowBlock_max(Bus1_storage_0_0)_: ++1 flow(Bus1_storage_0_0) +-1 InvestmentFlowBlock_total(Bus1_storage_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_constraint_Bus1_1)_: --1 InvestmentFlowBlock_invest(storage_constraint_Bus1) -+1 flow(storage_constraint_Bus1_1) +c_u_InvestmentFlowBlock_max(Bus1_storage_0_1)_: ++1 flow(Bus1_storage_0_1) +-1 InvestmentFlowBlock_total(Bus1_storage_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_constraint_Bus1_2)_: --1 InvestmentFlowBlock_invest(storage_constraint_Bus1) -+1 flow(storage_constraint_Bus1_2) +c_u_InvestmentFlowBlock_max(Bus1_storage_0_2)_: ++1 flow(Bus1_storage_0_2) +-1 InvestmentFlowBlock_total(Bus1_storage_0) <= 0 -c_u_GenericInvestmentStorageBlock_init_content_limit(storage_constraint)_: -+1 GenericInvestmentStorageBlock_init_content(storage_constraint) --1 GenericInvestmentStorageBlock_invest(storage_constraint) +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_0) ++1 GenericInvestmentStorageBlock_total(storage_0) += 0 + +c_u_GenericInvestmentStorageBlock_init_content_limit(storage)_: +-1 GenericInvestmentStorageBlock_invest(storage_0) ++1 GenericInvestmentStorageBlock_init_content(storage) <= 0 -c_e_GenericInvestmentStorageBlock_balance_first(storage_constraint)_: --1 GenericInvestmentStorageBlock_init_content(storage_constraint) -+1 GenericInvestmentStorageBlock_storage_content(storage_constraint_0) --1 flow(Bus1_storage_constraint_0) -+1 flow(storage_constraint_Bus1_0) +c_e_GenericInvestmentStorageBlock_balance_first(storage)_: ++1 flow(storage_Bus1_0_0) +-1 flow(Bus1_storage_0_0) +-1 GenericInvestmentStorageBlock_init_content(storage) ++1 GenericInvestmentStorageBlock_storage_content(storage_0) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage_constraint_1)_: --1 GenericInvestmentStorageBlock_storage_content(storage_constraint_0) -+1 GenericInvestmentStorageBlock_storage_content(storage_constraint_1) --1 flow(Bus1_storage_constraint_1) -+1 flow(storage_constraint_Bus1_1) +c_e_GenericInvestmentStorageBlock_balance(storage_0_1)_: ++1 flow(storage_Bus1_0_1) +-1 flow(Bus1_storage_0_1) +-1 GenericInvestmentStorageBlock_storage_content(storage_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_1) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage_constraint_2)_: --1 GenericInvestmentStorageBlock_storage_content(storage_constraint_1) -+1 GenericInvestmentStorageBlock_storage_content(storage_constraint_2) --1 flow(Bus1_storage_constraint_2) -+1 flow(storage_constraint_Bus1_2) +c_e_GenericInvestmentStorageBlock_balance(storage_0_2)_: ++1 flow(storage_Bus1_0_2) +-1 flow(Bus1_storage_0_2) +-1 GenericInvestmentStorageBlock_storage_content(storage_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_2) = 0 -c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_constraint)_: --1 GenericInvestmentStorageBlock_init_content(storage_constraint) -+1 GenericInvestmentStorageBlock_storage_content(storage_constraint_2) +c_e_GenericInvestmentStorageBlock_balanced_cstr(storage)_: +-1 GenericInvestmentStorageBlock_init_content(storage) ++1 GenericInvestmentStorageBlock_storage_content(storage_2) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_constraint)_: --0.20000000000000001 GenericInvestmentStorageBlock_invest(storage_constraint) -+1 InvestmentFlowBlock_invest(Bus1_storage_constraint) +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_0)_: ++1 InvestmentFlowBlock_total(Bus1_storage_0) +-0.2 GenericInvestmentStorageBlock_total(storage_0) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_constraint)_: --0.20000000000000001 GenericInvestmentStorageBlock_invest(storage_constraint) -+1 InvestmentFlowBlock_invest(storage_constraint_Bus1) +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_0)_: ++1 InvestmentFlowBlock_total(storage_Bus1_0) +-0.2 GenericInvestmentStorageBlock_total(storage_0) = 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_constraint_0)_: --1 GenericInvestmentStorageBlock_invest(storage_constraint) -+1 GenericInvestmentStorageBlock_storage_content(storage_constraint_0) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_0) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_constraint_1)_: --1 GenericInvestmentStorageBlock_invest(storage_constraint) -+1 GenericInvestmentStorageBlock_storage_content(storage_constraint_1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_1) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_constraint_2)_: --1 GenericInvestmentStorageBlock_invest(storage_constraint) -+1 GenericInvestmentStorageBlock_storage_content(storage_constraint_2) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_2)_: +-1 GenericInvestmentStorageBlock_total(storage_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(Bus1_Sink_0) <= +inf - 0 <= flow(Bus1_Sink_1) <= +inf - 0 <= flow(Bus1_Sink_2) <= +inf - 0 <= flow(Bus1_storage_constraint_0) <= +inf - 0 <= flow(Bus1_storage_constraint_1) <= +inf - 0 <= flow(Bus1_storage_constraint_2) <= +inf - 0 <= flow(Source_Bus1_0) <= +inf - 0 <= flow(Source_Bus1_1) <= +inf - 0 <= flow(Source_Bus1_2) <= +inf - 0 <= flow(storage_constraint_Bus1_0) <= +inf - 0 <= flow(storage_constraint_Bus1_1) <= +inf - 0 <= flow(storage_constraint_Bus1_2) <= +inf - 0 <= InvestmentFlowBlock_invest(Bus1_Sink) <= +inf - 0 <= InvestmentFlowBlock_invest(Bus1_storage_constraint) <= +inf - 0 <= InvestmentFlowBlock_invest(Source_Bus1) <= +inf - 0 <= InvestmentFlowBlock_invest(storage_constraint_Bus1) <= +inf - 0 <= GenericInvestmentStorageBlock_storage_content(storage_constraint_0) <= +inf - 0 <= GenericInvestmentStorageBlock_storage_content(storage_constraint_1) <= +inf - 0 <= GenericInvestmentStorageBlock_storage_content(storage_constraint_2) <= +inf - 0 <= GenericInvestmentStorageBlock_invest(storage_constraint) <= +inf - 0 <= GenericInvestmentStorageBlock_init_content(storage_constraint) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_Sink_0) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_0) <= +inf + 0 <= flow(Source_Bus1_0_0) <= +inf + 0 <= flow(storage_Bus1_0_0) <= +inf + 0 <= flow(Bus1_storage_0_0) <= +inf + 0 <= flow(Bus1_Sink_0_0) <= +inf + 0 <= flow(Source_Bus1_0_1) <= +inf + 0 <= flow(storage_Bus1_0_1) <= +inf + 0 <= flow(Bus1_storage_0_1) <= +inf + 0 <= flow(Bus1_Sink_0_1) <= +inf + 0 <= flow(Source_Bus1_0_2) <= +inf + 0 <= flow(storage_Bus1_0_2) <= +inf + 0 <= flow(Bus1_storage_0_2) <= +inf + 0 <= flow(Bus1_Sink_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_Sink_0) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_storage_0) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_2) <= +inf end diff --git a/tests/lp_files/connect_investment_multi_period.lp b/tests/lp_files/connect_investment_multi_period.lp new file mode 100644 index 000000000..cc22c48bc --- /dev/null +++ b/tests/lp_files/connect_investment_multi_period.lp @@ -0,0 +1,699 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++127.95247418638057 InvestmentFlowBlock_invest(Source_Bus1_0) ++125.44360214351036 InvestmentFlowBlock_invest(Source_Bus1_1) ++122.9839236701082 InvestmentFlowBlock_invest(Source_Bus1_2) ++520.1320088877258 InvestmentFlowBlock_invest(Bus1_Sink_0) ++509.93334204678996 InvestmentFlowBlock_invest(Bus1_Sink_1) ++499.9346490654803 InvestmentFlowBlock_invest(Bus1_Sink_2) ++150.83828257744048 GenericInvestmentStorageBlock_invest(storage_0) ++147.8806691935691 GenericInvestmentStorageBlock_invest(storage_1) ++144.9810482289893 GenericInvestmentStorageBlock_invest(storage_2) + +s.t. + +c_e__equate_InvestmentFlowBlock_invest(Source_Bus1_0)_InvestmentFlowBlock_invest(Bus1_Sink_0)__: ++2 InvestmentFlowBlock_invest(Source_Bus1_0) +-1 InvestmentFlowBlock_invest(Bus1_Sink_0) += 0 + +c_e__equate_InvestmentFlowBlock_invest(Source_Bus1_0)_GenericInvestmentStorageBlock_invest(storage_0)__: ++1 InvestmentFlowBlock_invest(Source_Bus1_0) +-1 GenericInvestmentStorageBlock_invest(storage_0) += 0 + +c_e_BusBlock_balance(Bus1_0_0)_: ++1 flow(storage_Bus1_0_0) ++1 flow(Source_Bus1_0_0) +-1 flow(Bus1_storage_0_0) +-1 flow(Bus1_Sink_0_0) += 0 + +c_e_BusBlock_balance(Bus1_0_1)_: ++1 flow(storage_Bus1_0_1) ++1 flow(Source_Bus1_0_1) +-1 flow(Bus1_storage_0_1) +-1 flow(Bus1_Sink_0_1) += 0 + +c_e_BusBlock_balance(Bus1_1_2)_: ++1 flow(storage_Bus1_1_2) ++1 flow(Source_Bus1_1_2) +-1 flow(Bus1_storage_1_2) +-1 flow(Bus1_Sink_1_2) += 0 + +c_e_BusBlock_balance(Bus1_1_3)_: ++1 flow(storage_Bus1_1_3) ++1 flow(Source_Bus1_1_3) +-1 flow(Bus1_storage_1_3) +-1 flow(Bus1_Sink_1_3) += 0 + +c_e_BusBlock_balance(Bus1_2_4)_: ++1 flow(storage_Bus1_2_4) ++1 flow(Source_Bus1_2_4) +-1 flow(Bus1_storage_2_4) +-1 flow(Bus1_Sink_2_4) += 0 + +c_e_BusBlock_balance(Bus1_2_5)_: ++1 flow(storage_Bus1_2_5) ++1 flow(Source_Bus1_2_5) +-1 flow(Bus1_storage_2_5) +-1 flow(Bus1_Sink_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_1)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_1) ++1 InvestmentFlowBlock_old(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_2)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_2) +-1 InvestmentFlowBlock_total(Source_Bus1_1) ++1 InvestmentFlowBlock_total(Source_Bus1_2) ++1 InvestmentFlowBlock_old(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(Bus1_storage_0)_: ++1 InvestmentFlowBlock_total(Bus1_storage_0) +-1 InvestmentFlowBlock_invest(Bus1_storage_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Bus1_storage_1)_: +-1 InvestmentFlowBlock_total(Bus1_storage_0) ++1 InvestmentFlowBlock_total(Bus1_storage_1) +-1 InvestmentFlowBlock_invest(Bus1_storage_1) ++1 InvestmentFlowBlock_old(Bus1_storage_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(Bus1_storage_2)_: +-1 InvestmentFlowBlock_total(Bus1_storage_1) ++1 InvestmentFlowBlock_total(Bus1_storage_2) +-1 InvestmentFlowBlock_invest(Bus1_storage_2) ++1 InvestmentFlowBlock_old(Bus1_storage_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(Bus1_Sink_0)_: +-1 InvestmentFlowBlock_invest(Bus1_Sink_0) ++1 InvestmentFlowBlock_total(Bus1_Sink_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Bus1_Sink_1)_: +-1 InvestmentFlowBlock_invest(Bus1_Sink_1) +-1 InvestmentFlowBlock_total(Bus1_Sink_0) ++1 InvestmentFlowBlock_total(Bus1_Sink_1) ++1 InvestmentFlowBlock_old(Bus1_Sink_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(Bus1_Sink_2)_: +-1 InvestmentFlowBlock_invest(Bus1_Sink_2) +-1 InvestmentFlowBlock_total(Bus1_Sink_1) ++1 InvestmentFlowBlock_total(Bus1_Sink_2) ++1 InvestmentFlowBlock_old(Bus1_Sink_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_Bus1_0)_: ++1 InvestmentFlowBlock_total(storage_Bus1_0) +-1 InvestmentFlowBlock_invest(storage_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_Bus1_1)_: +-1 InvestmentFlowBlock_total(storage_Bus1_0) ++1 InvestmentFlowBlock_total(storage_Bus1_1) +-1 InvestmentFlowBlock_invest(storage_Bus1_1) ++1 InvestmentFlowBlock_old(storage_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_Bus1_2)_: +-1 InvestmentFlowBlock_total(storage_Bus1_1) ++1 InvestmentFlowBlock_total(storage_Bus1_2) +-1 InvestmentFlowBlock_invest(storage_Bus1_2) ++1 InvestmentFlowBlock_old(storage_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_0)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_0)_: ++1 InvestmentFlowBlock_old_end(Bus1_storage_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_1)_: ++1 InvestmentFlowBlock_old_end(Bus1_storage_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_2)_: ++1 InvestmentFlowBlock_old_end(Bus1_storage_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Bus1_Sink_0)_: ++1 InvestmentFlowBlock_old_end(Bus1_Sink_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Bus1_Sink_1)_: ++1 InvestmentFlowBlock_old_end(Bus1_Sink_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Bus1_Sink_2)_: ++1 InvestmentFlowBlock_old_end(Bus1_Sink_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_Bus1_0)_: ++1 InvestmentFlowBlock_old_end(storage_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_Bus1_1)_: ++1 InvestmentFlowBlock_old_end(storage_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_Bus1_2)_: ++1 InvestmentFlowBlock_old_end(storage_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_0)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_0)_: ++1 InvestmentFlowBlock_old_exo(Bus1_storage_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_1)_: ++1 InvestmentFlowBlock_old_exo(Bus1_storage_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_2)_: ++1 InvestmentFlowBlock_old_exo(Bus1_storage_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Bus1_Sink_0)_: ++1 InvestmentFlowBlock_old_exo(Bus1_Sink_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Bus1_Sink_1)_: ++1 InvestmentFlowBlock_old_exo(Bus1_Sink_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Bus1_Sink_2)_: ++1 InvestmentFlowBlock_old_exo(Bus1_Sink_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_Bus1_0)_: ++1 InvestmentFlowBlock_old_exo(storage_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_Bus1_1)_: ++1 InvestmentFlowBlock_old_exo(storage_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_Bus1_2)_: ++1 InvestmentFlowBlock_old_exo(storage_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_old_end(Source_Bus1_0) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_0) ++1 InvestmentFlowBlock_old(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old(Source_Bus1_1) +-1 InvestmentFlowBlock_old_end(Source_Bus1_1) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old(Source_Bus1_2) +-1 InvestmentFlowBlock_old_end(Source_Bus1_2) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(Bus1_storage_0)_: +-1 InvestmentFlowBlock_old_end(Bus1_storage_0) +-1 InvestmentFlowBlock_old_exo(Bus1_storage_0) ++1 InvestmentFlowBlock_old(Bus1_storage_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(Bus1_storage_1)_: ++1 InvestmentFlowBlock_old(Bus1_storage_1) +-1 InvestmentFlowBlock_old_end(Bus1_storage_1) +-1 InvestmentFlowBlock_old_exo(Bus1_storage_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(Bus1_storage_2)_: ++1 InvestmentFlowBlock_old(Bus1_storage_2) +-1 InvestmentFlowBlock_old_end(Bus1_storage_2) +-1 InvestmentFlowBlock_old_exo(Bus1_storage_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(Bus1_Sink_0)_: +-1 InvestmentFlowBlock_old_end(Bus1_Sink_0) +-1 InvestmentFlowBlock_old_exo(Bus1_Sink_0) ++1 InvestmentFlowBlock_old(Bus1_Sink_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(Bus1_Sink_1)_: ++1 InvestmentFlowBlock_old(Bus1_Sink_1) +-1 InvestmentFlowBlock_old_end(Bus1_Sink_1) +-1 InvestmentFlowBlock_old_exo(Bus1_Sink_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(Bus1_Sink_2)_: ++1 InvestmentFlowBlock_old(Bus1_Sink_2) +-1 InvestmentFlowBlock_old_end(Bus1_Sink_2) +-1 InvestmentFlowBlock_old_exo(Bus1_Sink_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_Bus1_0)_: +-1 InvestmentFlowBlock_old_end(storage_Bus1_0) +-1 InvestmentFlowBlock_old_exo(storage_Bus1_0) ++1 InvestmentFlowBlock_old(storage_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_Bus1_1)_: ++1 InvestmentFlowBlock_old(storage_Bus1_1) +-1 InvestmentFlowBlock_old_end(storage_Bus1_1) +-1 InvestmentFlowBlock_old_exo(storage_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_Bus1_2)_: ++1 InvestmentFlowBlock_old(storage_Bus1_2) +-1 InvestmentFlowBlock_old_end(storage_Bus1_2) +-1 InvestmentFlowBlock_old_exo(storage_Bus1_2) += 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_1_2)_: ++1 flow(Source_Bus1_1_2) +-1 InvestmentFlowBlock_total(Source_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_1_3)_: ++1 flow(Source_Bus1_1_3) +-1 InvestmentFlowBlock_total(Source_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_2_4)_: ++1 flow(Source_Bus1_2_4) +-1 InvestmentFlowBlock_total(Source_Bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_2_5)_: ++1 flow(Source_Bus1_2_5) +-1 InvestmentFlowBlock_total(Source_Bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_0_0)_: ++1 flow(Bus1_storage_0_0) +-1 InvestmentFlowBlock_total(Bus1_storage_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_0_1)_: ++1 flow(Bus1_storage_0_1) +-1 InvestmentFlowBlock_total(Bus1_storage_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_1_2)_: ++1 flow(Bus1_storage_1_2) +-1 InvestmentFlowBlock_total(Bus1_storage_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_1_3)_: ++1 flow(Bus1_storage_1_3) +-1 InvestmentFlowBlock_total(Bus1_storage_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_2_4)_: ++1 flow(Bus1_storage_2_4) +-1 InvestmentFlowBlock_total(Bus1_storage_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_2_5)_: ++1 flow(Bus1_storage_2_5) +-1 InvestmentFlowBlock_total(Bus1_storage_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_Sink_0_0)_: ++1 flow(Bus1_Sink_0_0) +-1 InvestmentFlowBlock_total(Bus1_Sink_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_Sink_0_1)_: ++1 flow(Bus1_Sink_0_1) +-1 InvestmentFlowBlock_total(Bus1_Sink_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_Sink_1_2)_: ++1 flow(Bus1_Sink_1_2) +-1 InvestmentFlowBlock_total(Bus1_Sink_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_Sink_1_3)_: ++1 flow(Bus1_Sink_1_3) +-1 InvestmentFlowBlock_total(Bus1_Sink_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_Sink_2_4)_: ++1 flow(Bus1_Sink_2_4) +-1 InvestmentFlowBlock_total(Bus1_Sink_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_Sink_2_5)_: ++1 flow(Bus1_Sink_2_5) +-1 InvestmentFlowBlock_total(Bus1_Sink_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_Bus1_0_0)_: ++1 flow(storage_Bus1_0_0) +-1 InvestmentFlowBlock_total(storage_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_Bus1_0_1)_: ++1 flow(storage_Bus1_0_1) +-1 InvestmentFlowBlock_total(storage_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_Bus1_1_2)_: ++1 flow(storage_Bus1_1_2) +-1 InvestmentFlowBlock_total(storage_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_Bus1_1_3)_: ++1 flow(storage_Bus1_1_3) +-1 InvestmentFlowBlock_total(storage_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_Bus1_2_4)_: ++1 flow(storage_Bus1_2_4) +-1 InvestmentFlowBlock_total(storage_Bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_Bus1_2_5)_: ++1 flow(storage_Bus1_2_5) +-1 InvestmentFlowBlock_total(storage_Bus1_2) +<= 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_0) ++1 GenericInvestmentStorageBlock_total(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_1)_: +-1 GenericInvestmentStorageBlock_invest(storage_1) +-1 GenericInvestmentStorageBlock_total(storage_0) ++1 GenericInvestmentStorageBlock_total(storage_1) ++1 GenericInvestmentStorageBlock_old(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_2)_: +-1 GenericInvestmentStorageBlock_invest(storage_2) +-1 GenericInvestmentStorageBlock_total(storage_1) ++1 GenericInvestmentStorageBlock_total(storage_2) ++1 GenericInvestmentStorageBlock_old(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_1)_: ++1 GenericInvestmentStorageBlock_old_end(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_2)_: ++1 GenericInvestmentStorageBlock_old_end(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage_0) +-1 GenericInvestmentStorageBlock_old_exo(storage_0) ++1 GenericInvestmentStorageBlock_old(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_1)_: ++1 GenericInvestmentStorageBlock_old(storage_1) +-1 GenericInvestmentStorageBlock_old_end(storage_1) +-1 GenericInvestmentStorageBlock_old_exo(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_2)_: ++1 GenericInvestmentStorageBlock_old(storage_2) +-1 GenericInvestmentStorageBlock_old_end(storage_2) +-1 GenericInvestmentStorageBlock_old_exo(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage_0)_: ++1 GenericInvestmentStorageBlock_storage_content(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_0_1)_: ++1 flow(storage_Bus1_0_1) +-1 flow(Bus1_storage_0_1) +-1 GenericInvestmentStorageBlock_storage_content(storage_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_1_2)_: ++1 flow(storage_Bus1_1_2) +-1 flow(Bus1_storage_1_2) +-1 GenericInvestmentStorageBlock_storage_content(storage_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_1_3)_: ++1 flow(storage_Bus1_1_3) +-1 flow(Bus1_storage_1_3) +-1 GenericInvestmentStorageBlock_storage_content(storage_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_2_4)_: ++1 flow(storage_Bus1_2_4) +-1 flow(Bus1_storage_2_4) +-1 GenericInvestmentStorageBlock_storage_content(storage_3) ++1 GenericInvestmentStorageBlock_storage_content(storage_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_2_5)_: ++1 flow(storage_Bus1_2_5) +-1 flow(Bus1_storage_2_5) +-1 GenericInvestmentStorageBlock_storage_content(storage_4) ++1 GenericInvestmentStorageBlock_storage_content(storage_5) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_0)_: ++1 InvestmentFlowBlock_total(Bus1_storage_0) +-0.2 GenericInvestmentStorageBlock_total(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_1)_: ++1 InvestmentFlowBlock_total(Bus1_storage_1) +-0.2 GenericInvestmentStorageBlock_total(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_2)_: ++1 InvestmentFlowBlock_total(Bus1_storage_2) +-0.2 GenericInvestmentStorageBlock_total(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_0)_: ++1 InvestmentFlowBlock_total(storage_Bus1_0) +-0.2 GenericInvestmentStorageBlock_total(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_1)_: ++1 InvestmentFlowBlock_total(storage_Bus1_1) +-0.2 GenericInvestmentStorageBlock_total(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_2)_: ++1 InvestmentFlowBlock_total(storage_Bus1_2) +-0.2 GenericInvestmentStorageBlock_total(storage_2) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_1_2)_: +-1 GenericInvestmentStorageBlock_total(storage_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_1_3)_: +-1 GenericInvestmentStorageBlock_total(storage_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_2_4)_: +-1 GenericInvestmentStorageBlock_total(storage_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_2_5)_: +-1 GenericInvestmentStorageBlock_total(storage_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_5) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_Sink_0) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_Sink_1) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_Sink_2) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_2) <= +inf + 0 <= flow(storage_Bus1_0_0) <= +inf + 0 <= flow(Source_Bus1_0_0) <= +inf + 0 <= flow(Bus1_storage_0_0) <= +inf + 0 <= flow(Bus1_Sink_0_0) <= +inf + 0 <= flow(storage_Bus1_0_1) <= +inf + 0 <= flow(Source_Bus1_0_1) <= +inf + 0 <= flow(Bus1_storage_0_1) <= +inf + 0 <= flow(Bus1_Sink_0_1) <= +inf + 0 <= flow(storage_Bus1_1_2) <= +inf + 0 <= flow(Source_Bus1_1_2) <= +inf + 0 <= flow(Bus1_storage_1_2) <= +inf + 0 <= flow(Bus1_Sink_1_2) <= +inf + 0 <= flow(storage_Bus1_1_3) <= +inf + 0 <= flow(Source_Bus1_1_3) <= +inf + 0 <= flow(Bus1_storage_1_3) <= +inf + 0 <= flow(Bus1_Sink_1_3) <= +inf + 0 <= flow(storage_Bus1_2_4) <= +inf + 0 <= flow(Source_Bus1_2_4) <= +inf + 0 <= flow(Bus1_storage_2_4) <= +inf + 0 <= flow(Bus1_Sink_2_4) <= +inf + 0 <= flow(storage_Bus1_2_5) <= +inf + 0 <= flow(Source_Bus1_2_5) <= +inf + 0 <= flow(Bus1_storage_2_5) <= +inf + 0 <= flow(Bus1_Sink_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_storage_0) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_storage_0) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_storage_1) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_storage_1) <= +inf + 0 <= InvestmentFlowBlock_old(Bus1_storage_1) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_storage_2) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_storage_2) <= +inf + 0 <= InvestmentFlowBlock_old(Bus1_storage_2) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_Sink_0) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_Sink_1) <= +inf + 0 <= InvestmentFlowBlock_old(Bus1_Sink_1) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_Sink_2) <= +inf + 0 <= InvestmentFlowBlock_old(Bus1_Sink_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old(storage_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_total(storage_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(Bus1_storage_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(Bus1_storage_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(Bus1_storage_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(Bus1_Sink_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(Bus1_Sink_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(Bus1_Sink_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Bus1_storage_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Bus1_storage_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Bus1_storage_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Bus1_Sink_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Bus1_Sink_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Bus1_Sink_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old(Bus1_storage_0) <= +inf + 0 <= InvestmentFlowBlock_old(Bus1_Sink_0) <= +inf + 0 <= InvestmentFlowBlock_old(storage_Bus1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_5) <= +inf +end diff --git a/tests/lp_files/converter.lp b/tests/lp_files/converter.lp new file mode 100644 index 000000000..e91691132 --- /dev/null +++ b/tests/lp_files/converter.lp @@ -0,0 +1,135 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++50 flow(powerplantGasBiomass_electricityBus_0_0) ++50 flow(powerplantGasBiomass_electricityBus_0_1) ++50 flow(powerplantGasBiomass_electricityBus_0_2) ++20 flow(powerplantGasBiomass_thermalBus_0_0) ++20 flow(powerplantGasBiomass_thermalBus_0_1) ++20 flow(powerplantGasBiomass_thermalBus_0_2) + +s.t. + +c_e_BusBlock_balance(biomassBus_0_0)_: ++1 flow(biomassBus_powerplantGasBiomass_0_0) += 0 + +c_e_BusBlock_balance(biomassBus_0_1)_: ++1 flow(biomassBus_powerplantGasBiomass_0_1) += 0 + +c_e_BusBlock_balance(biomassBus_0_2)_: ++1 flow(biomassBus_powerplantGasBiomass_0_2) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(powerplantGasBiomass_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(powerplantGasBiomass_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(powerplantGasBiomass_electricityBus_0_2) += 0 + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_powerplantGasBiomass_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_powerplantGasBiomass_0_1) += 0 + +c_e_BusBlock_balance(gasBus_0_2)_: ++1 flow(gasBus_powerplantGasBiomass_0_2) += 0 + +c_e_BusBlock_balance(thermalBus_0_0)_: ++1 flow(powerplantGasBiomass_thermalBus_0_0) += 0 + +c_e_BusBlock_balance(thermalBus_0_1)_: ++1 flow(powerplantGasBiomass_thermalBus_0_1) += 0 + +c_e_BusBlock_balance(thermalBus_0_2)_: ++1 flow(powerplantGasBiomass_thermalBus_0_2) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_0)_: +-0.1 flow(powerplantGasBiomass_electricityBus_0_0) ++0.3 flow(biomassBus_powerplantGasBiomass_0_0) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_0)_: +-0.4 flow(powerplantGasBiomass_electricityBus_0_0) ++0.3 flow(gasBus_powerplantGasBiomass_0_0) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_0)_: +-0.1 flow(powerplantGasBiomass_thermalBus_0_0) ++0.5 flow(biomassBus_powerplantGasBiomass_0_0) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_0)_: +-0.4 flow(powerplantGasBiomass_thermalBus_0_0) ++0.5 flow(gasBus_powerplantGasBiomass_0_0) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_1)_: +-0.1 flow(powerplantGasBiomass_electricityBus_0_1) ++0.3 flow(biomassBus_powerplantGasBiomass_0_1) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_1)_: +-0.4 flow(powerplantGasBiomass_electricityBus_0_1) ++0.3 flow(gasBus_powerplantGasBiomass_0_1) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_1)_: +-0.1 flow(powerplantGasBiomass_thermalBus_0_1) ++0.5 flow(biomassBus_powerplantGasBiomass_0_1) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_1)_: +-0.4 flow(powerplantGasBiomass_thermalBus_0_1) ++0.5 flow(gasBus_powerplantGasBiomass_0_1) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_2)_: +-0.1 flow(powerplantGasBiomass_electricityBus_0_2) ++0.3 flow(biomassBus_powerplantGasBiomass_0_2) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_2)_: +-0.4 flow(powerplantGasBiomass_electricityBus_0_2) ++0.3 flow(gasBus_powerplantGasBiomass_0_2) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_2)_: +-0.1 flow(powerplantGasBiomass_thermalBus_0_2) ++0.5 flow(biomassBus_powerplantGasBiomass_0_2) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_2)_: +-0.4 flow(powerplantGasBiomass_thermalBus_0_2) ++0.5 flow(gasBus_powerplantGasBiomass_0_2) += 0 + +bounds + 0 <= flow(powerplantGasBiomass_electricityBus_0_0) <= +inf + 0 <= flow(powerplantGasBiomass_electricityBus_0_1) <= +inf + 0 <= flow(powerplantGasBiomass_electricityBus_0_2) <= +inf + 0.0 <= flow(powerplantGasBiomass_thermalBus_0_0) <= 50000000000.0 + 0.0 <= flow(powerplantGasBiomass_thermalBus_0_1) <= 50000000000.0 + 0.0 <= flow(powerplantGasBiomass_thermalBus_0_2) <= 50000000000.0 + 0 <= flow(biomassBus_powerplantGasBiomass_0_0) <= +inf + 0 <= flow(biomassBus_powerplantGasBiomass_0_1) <= +inf + 0 <= flow(biomassBus_powerplantGasBiomass_0_2) <= +inf + 0 <= flow(gasBus_powerplantGasBiomass_0_0) <= +inf + 0 <= flow(gasBus_powerplantGasBiomass_0_1) <= +inf + 0 <= flow(gasBus_powerplantGasBiomass_0_2) <= +inf +end diff --git a/tests/lp_files/converter_invest.lp b/tests/lp_files/converter_invest.lp new file mode 100644 index 000000000..bbcc7ff59 --- /dev/null +++ b/tests/lp_files/converter_invest.lp @@ -0,0 +1,158 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++20 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) ++50 flow(powerplant_gas_coal_electricityBus_0_0) ++50 flow(powerplant_gas_coal_electricityBus_0_1) ++50 flow(powerplant_gas_coal_electricityBus_0_2) ++20 flow(powerplant_gas_coal_thermalBus_0_0) ++20 flow(powerplant_gas_coal_thermalBus_0_1) ++20 flow(powerplant_gas_coal_thermalBus_0_2) + +s.t. + +c_e_BusBlock_balance(coalBus_0_0)_: ++1 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_BusBlock_balance(coalBus_0_1)_: ++1 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_BusBlock_balance(coalBus_0_2)_: ++1 flow(coalBus_powerplant_gas_coal_0_2) += 0 + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_BusBlock_balance(gasBus_0_2)_: ++1 flow(gasBus_powerplant_gas_coal_0_2) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(powerplant_gas_coal_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(powerplant_gas_coal_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(powerplant_gas_coal_electricityBus_0_2) += 0 + +c_e_BusBlock_balance(thermalBus_0_0)_: ++1 flow(powerplant_gas_coal_thermalBus_0_0) += 0 + +c_e_BusBlock_balance(thermalBus_0_1)_: ++1 flow(powerplant_gas_coal_thermalBus_0_1) += 0 + +c_e_BusBlock_balance(thermalBus_0_2)_: ++1 flow(powerplant_gas_coal_thermalBus_0_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_0)_: +-0.2 flow(powerplant_gas_coal_electricityBus_0_0) ++0.3 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_0)_: +-0.58 flow(powerplant_gas_coal_electricityBus_0_0) ++0.3 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_0)_: +-0.2 flow(powerplant_gas_coal_thermalBus_0_0) ++0.5 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_0)_: +-0.58 flow(powerplant_gas_coal_thermalBus_0_0) ++0.5 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_1)_: +-0.2 flow(powerplant_gas_coal_electricityBus_0_1) ++0.3 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_1)_: +-0.58 flow(powerplant_gas_coal_electricityBus_0_1) ++0.3 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_1)_: +-0.2 flow(powerplant_gas_coal_thermalBus_0_1) ++0.5 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_1)_: +-0.58 flow(powerplant_gas_coal_thermalBus_0_1) ++0.5 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_2)_: +-0.2 flow(powerplant_gas_coal_electricityBus_0_2) ++0.3 flow(coalBus_powerplant_gas_coal_0_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_2)_: +-0.58 flow(powerplant_gas_coal_electricityBus_0_2) ++0.3 flow(gasBus_powerplant_gas_coal_0_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_2)_: +-0.2 flow(powerplant_gas_coal_thermalBus_0_2) ++0.5 flow(coalBus_powerplant_gas_coal_0_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_2)_: +-0.58 flow(powerplant_gas_coal_thermalBus_0_2) ++0.5 flow(gasBus_powerplant_gas_coal_0_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) ++1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) += 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_0)_: ++1 flow(powerplant_gas_coal_electricityBus_0_0) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_1)_: ++1 flow(powerplant_gas_coal_electricityBus_0_1) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_2)_: ++1 flow(powerplant_gas_coal_electricityBus_0_2) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) <= 1000 + 0 <= flow(powerplant_gas_coal_electricityBus_0_0) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_0_1) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_0_2) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_0_0) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_0_1) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_0_2) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_0_0) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_0_1) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_0_2) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_0_0) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_0_1) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) <= +inf +end diff --git a/tests/lp_files/converter_invest_multi_period.lp b/tests/lp_files/converter_invest_multi_period.lp new file mode 100644 index 000000000..38337e8ac --- /dev/null +++ b/tests/lp_files/converter_invest_multi_period.lp @@ -0,0 +1,370 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++24.462687250116133 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) ++23.98302671580013 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_1) ++23.512771290000128 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_2) ++50 flow(powerplant_gas_coal_electricityBus_0_0) ++50 flow(powerplant_gas_coal_electricityBus_0_1) ++49.01960784313725 flow(powerplant_gas_coal_electricityBus_1_2) ++49.01960784313725 flow(powerplant_gas_coal_electricityBus_1_3) ++48.058439061899264 flow(powerplant_gas_coal_electricityBus_2_4) ++48.058439061899264 flow(powerplant_gas_coal_electricityBus_2_5) ++20 flow(powerplant_gas_coal_thermalBus_0_0) ++20 flow(powerplant_gas_coal_thermalBus_0_1) ++19.6078431372549 flow(powerplant_gas_coal_thermalBus_1_2) ++19.6078431372549 flow(powerplant_gas_coal_thermalBus_1_3) ++19.223375624759708 flow(powerplant_gas_coal_thermalBus_2_4) ++19.223375624759708 flow(powerplant_gas_coal_thermalBus_2_5) + +s.t. + +c_e_BusBlock_balance(coalBus_0_0)_: ++1 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_BusBlock_balance(coalBus_0_1)_: ++1 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_BusBlock_balance(coalBus_1_2)_: ++1 flow(coalBus_powerplant_gas_coal_1_2) += 0 + +c_e_BusBlock_balance(coalBus_1_3)_: ++1 flow(coalBus_powerplant_gas_coal_1_3) += 0 + +c_e_BusBlock_balance(coalBus_2_4)_: ++1 flow(coalBus_powerplant_gas_coal_2_4) += 0 + +c_e_BusBlock_balance(coalBus_2_5)_: ++1 flow(coalBus_powerplant_gas_coal_2_5) += 0 + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_BusBlock_balance(gasBus_1_2)_: ++1 flow(gasBus_powerplant_gas_coal_1_2) += 0 + +c_e_BusBlock_balance(gasBus_1_3)_: ++1 flow(gasBus_powerplant_gas_coal_1_3) += 0 + +c_e_BusBlock_balance(gasBus_2_4)_: ++1 flow(gasBus_powerplant_gas_coal_2_4) += 0 + +c_e_BusBlock_balance(gasBus_2_5)_: ++1 flow(gasBus_powerplant_gas_coal_2_5) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(powerplant_gas_coal_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(powerplant_gas_coal_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(powerplant_gas_coal_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(powerplant_gas_coal_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(powerplant_gas_coal_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(powerplant_gas_coal_electricityBus_2_5) += 0 + +c_e_BusBlock_balance(thermalBus_0_0)_: ++1 flow(powerplant_gas_coal_thermalBus_0_0) += 0 + +c_e_BusBlock_balance(thermalBus_0_1)_: ++1 flow(powerplant_gas_coal_thermalBus_0_1) += 0 + +c_e_BusBlock_balance(thermalBus_1_2)_: ++1 flow(powerplant_gas_coal_thermalBus_1_2) += 0 + +c_e_BusBlock_balance(thermalBus_1_3)_: ++1 flow(powerplant_gas_coal_thermalBus_1_3) += 0 + +c_e_BusBlock_balance(thermalBus_2_4)_: ++1 flow(powerplant_gas_coal_thermalBus_2_4) += 0 + +c_e_BusBlock_balance(thermalBus_2_5)_: ++1 flow(powerplant_gas_coal_thermalBus_2_5) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_0)_: +-0.2 flow(powerplant_gas_coal_electricityBus_0_0) ++0.3 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_0)_: +-0.58 flow(powerplant_gas_coal_electricityBus_0_0) ++0.3 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_0)_: +-0.2 flow(powerplant_gas_coal_thermalBus_0_0) ++0.5 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_0)_: +-0.58 flow(powerplant_gas_coal_thermalBus_0_0) ++0.5 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_1)_: +-0.2 flow(powerplant_gas_coal_electricityBus_0_1) ++0.3 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_1)_: +-0.58 flow(powerplant_gas_coal_electricityBus_0_1) ++0.3 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_1)_: +-0.2 flow(powerplant_gas_coal_thermalBus_0_1) ++0.5 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_1)_: +-0.58 flow(powerplant_gas_coal_thermalBus_0_1) ++0.5 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_1_2)_: +-0.2 flow(powerplant_gas_coal_electricityBus_1_2) ++0.3 flow(coalBus_powerplant_gas_coal_1_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_1_2)_: +-0.58 flow(powerplant_gas_coal_electricityBus_1_2) ++0.3 flow(gasBus_powerplant_gas_coal_1_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_1_2)_: +-0.2 flow(powerplant_gas_coal_thermalBus_1_2) ++0.5 flow(coalBus_powerplant_gas_coal_1_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_1_2)_: +-0.58 flow(powerplant_gas_coal_thermalBus_1_2) ++0.5 flow(gasBus_powerplant_gas_coal_1_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_1_3)_: +-0.2 flow(powerplant_gas_coal_electricityBus_1_3) ++0.3 flow(coalBus_powerplant_gas_coal_1_3) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_1_3)_: +-0.58 flow(powerplant_gas_coal_electricityBus_1_3) ++0.3 flow(gasBus_powerplant_gas_coal_1_3) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_1_3)_: +-0.2 flow(powerplant_gas_coal_thermalBus_1_3) ++0.5 flow(coalBus_powerplant_gas_coal_1_3) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_1_3)_: +-0.58 flow(powerplant_gas_coal_thermalBus_1_3) ++0.5 flow(gasBus_powerplant_gas_coal_1_3) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_2_4)_: +-0.2 flow(powerplant_gas_coal_electricityBus_2_4) ++0.3 flow(coalBus_powerplant_gas_coal_2_4) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_2_4)_: +-0.58 flow(powerplant_gas_coal_electricityBus_2_4) ++0.3 flow(gasBus_powerplant_gas_coal_2_4) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_2_4)_: +-0.2 flow(powerplant_gas_coal_thermalBus_2_4) ++0.5 flow(coalBus_powerplant_gas_coal_2_4) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_2_4)_: +-0.58 flow(powerplant_gas_coal_thermalBus_2_4) ++0.5 flow(gasBus_powerplant_gas_coal_2_4) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_2_5)_: +-0.2 flow(powerplant_gas_coal_electricityBus_2_5) ++0.3 flow(coalBus_powerplant_gas_coal_2_5) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_2_5)_: +-0.58 flow(powerplant_gas_coal_electricityBus_2_5) ++0.3 flow(gasBus_powerplant_gas_coal_2_5) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_2_5)_: +-0.2 flow(powerplant_gas_coal_thermalBus_2_5) ++0.5 flow(coalBus_powerplant_gas_coal_2_5) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_2_5)_: +-0.58 flow(powerplant_gas_coal_thermalBus_2_5) ++0.5 flow(gasBus_powerplant_gas_coal_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) ++1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_1)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_1) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) ++1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1) ++1 InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_2)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_2) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1) ++1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2) ++1 InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_coal_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_coal_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_coal_electricityBus_2)_: ++1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_coal_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_coal_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_coal_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_coal_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_0) ++1 InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_coal_electricityBus_1)_: ++1 InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_1) +-1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_coal_electricityBus_2)_: ++1 InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_2) +-1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_2) += 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_0)_: ++1 flow(powerplant_gas_coal_electricityBus_0_0) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_1)_: ++1 flow(powerplant_gas_coal_electricityBus_0_1) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_1_2)_: ++1 flow(powerplant_gas_coal_electricityBus_1_2) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_1_3)_: ++1 flow(powerplant_gas_coal_electricityBus_1_3) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_2_4)_: ++1 flow(powerplant_gas_coal_electricityBus_2_4) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_2_5)_: ++1 flow(powerplant_gas_coal_electricityBus_2_5) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) <= 1000 + 0 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_1) <= 1000 + 0 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_2) <= 1000 + 0 <= flow(powerplant_gas_coal_electricityBus_0_0) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_0_1) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_1_2) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_1_3) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_2_4) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_2_5) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_0_0) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_0_1) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_1_2) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_1_3) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_2_4) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_2_5) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_0_0) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_0_1) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_1_2) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_1_3) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_2_4) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_2_5) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_0_0) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_0_1) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_1_2) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_1_3) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_2_4) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_0) <= +inf +end diff --git a/tests/lp_files/converter_invest_with_existing.lp b/tests/lp_files/converter_invest_with_existing.lp new file mode 100644 index 000000000..b7d4e5de5 --- /dev/null +++ b/tests/lp_files/converter_invest_with_existing.lp @@ -0,0 +1,158 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++20 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) ++50 flow(powerplant_gas_coal_electricityBus_0_0) ++50 flow(powerplant_gas_coal_electricityBus_0_1) ++50 flow(powerplant_gas_coal_electricityBus_0_2) ++20 flow(powerplant_gas_coal_thermalBus_0_0) ++20 flow(powerplant_gas_coal_thermalBus_0_1) ++20 flow(powerplant_gas_coal_thermalBus_0_2) + +s.t. + +c_e_BusBlock_balance(coalBus_0_0)_: ++1 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_BusBlock_balance(coalBus_0_1)_: ++1 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_BusBlock_balance(coalBus_0_2)_: ++1 flow(coalBus_powerplant_gas_coal_0_2) += 0 + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_BusBlock_balance(gasBus_0_2)_: ++1 flow(gasBus_powerplant_gas_coal_0_2) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(powerplant_gas_coal_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(powerplant_gas_coal_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(powerplant_gas_coal_electricityBus_0_2) += 0 + +c_e_BusBlock_balance(thermalBus_0_0)_: ++1 flow(powerplant_gas_coal_thermalBus_0_0) += 0 + +c_e_BusBlock_balance(thermalBus_0_1)_: ++1 flow(powerplant_gas_coal_thermalBus_0_1) += 0 + +c_e_BusBlock_balance(thermalBus_0_2)_: ++1 flow(powerplant_gas_coal_thermalBus_0_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_0)_: +-0.2 flow(powerplant_gas_coal_electricityBus_0_0) ++0.3 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_0)_: +-0.58 flow(powerplant_gas_coal_electricityBus_0_0) ++0.3 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_0)_: +-0.2 flow(powerplant_gas_coal_thermalBus_0_0) ++0.5 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_0)_: +-0.58 flow(powerplant_gas_coal_thermalBus_0_0) ++0.5 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_1)_: +-0.2 flow(powerplant_gas_coal_electricityBus_0_1) ++0.3 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_1)_: +-0.58 flow(powerplant_gas_coal_electricityBus_0_1) ++0.3 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_1)_: +-0.2 flow(powerplant_gas_coal_thermalBus_0_1) ++0.5 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_1)_: +-0.58 flow(powerplant_gas_coal_thermalBus_0_1) ++0.5 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_2)_: +-0.2 flow(powerplant_gas_coal_electricityBus_0_2) ++0.3 flow(coalBus_powerplant_gas_coal_0_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_2)_: +-0.58 flow(powerplant_gas_coal_electricityBus_0_2) ++0.3 flow(gasBus_powerplant_gas_coal_0_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_2)_: +-0.2 flow(powerplant_gas_coal_thermalBus_0_2) ++0.5 flow(coalBus_powerplant_gas_coal_0_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_2)_: +-0.58 flow(powerplant_gas_coal_thermalBus_0_2) ++0.5 flow(gasBus_powerplant_gas_coal_0_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) ++1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) += 200 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_0)_: ++1 flow(powerplant_gas_coal_electricityBus_0_0) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_1)_: ++1 flow(powerplant_gas_coal_electricityBus_0_1) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_2)_: ++1 flow(powerplant_gas_coal_electricityBus_0_2) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) <= 1000 + 0 <= flow(powerplant_gas_coal_electricityBus_0_0) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_0_1) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_0_2) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_0_0) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_0_1) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_0_2) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_0_0) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_0_1) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_0_2) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_0_0) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_0_1) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) <= +inf +end diff --git a/tests/lp_files/converter_invest_with_existing_multi_period.lp b/tests/lp_files/converter_invest_with_existing_multi_period.lp new file mode 100644 index 000000000..1ef5b303f --- /dev/null +++ b/tests/lp_files/converter_invest_with_existing_multi_period.lp @@ -0,0 +1,371 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++20.601980198019806 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) ++20.1980198019802 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_1) ++19.801980198019805 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_2) ++50 flow(powerplant_gas_coal_electricityBus_0_0) ++50 flow(powerplant_gas_coal_electricityBus_0_1) ++49.01960784313725 flow(powerplant_gas_coal_electricityBus_1_2) ++49.01960784313725 flow(powerplant_gas_coal_electricityBus_1_3) ++48.058439061899264 flow(powerplant_gas_coal_electricityBus_2_4) ++48.058439061899264 flow(powerplant_gas_coal_electricityBus_2_5) ++20 flow(powerplant_gas_coal_thermalBus_0_0) ++20 flow(powerplant_gas_coal_thermalBus_0_1) ++19.6078431372549 flow(powerplant_gas_coal_thermalBus_1_2) ++19.6078431372549 flow(powerplant_gas_coal_thermalBus_1_3) ++19.223375624759708 flow(powerplant_gas_coal_thermalBus_2_4) ++19.223375624759708 flow(powerplant_gas_coal_thermalBus_2_5) + +s.t. + +c_e_BusBlock_balance(coalBus_0_0)_: ++1 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_BusBlock_balance(coalBus_0_1)_: ++1 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_BusBlock_balance(coalBus_1_2)_: ++1 flow(coalBus_powerplant_gas_coal_1_2) += 0 + +c_e_BusBlock_balance(coalBus_1_3)_: ++1 flow(coalBus_powerplant_gas_coal_1_3) += 0 + +c_e_BusBlock_balance(coalBus_2_4)_: ++1 flow(coalBus_powerplant_gas_coal_2_4) += 0 + +c_e_BusBlock_balance(coalBus_2_5)_: ++1 flow(coalBus_powerplant_gas_coal_2_5) += 0 + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_BusBlock_balance(gasBus_1_2)_: ++1 flow(gasBus_powerplant_gas_coal_1_2) += 0 + +c_e_BusBlock_balance(gasBus_1_3)_: ++1 flow(gasBus_powerplant_gas_coal_1_3) += 0 + +c_e_BusBlock_balance(gasBus_2_4)_: ++1 flow(gasBus_powerplant_gas_coal_2_4) += 0 + +c_e_BusBlock_balance(gasBus_2_5)_: ++1 flow(gasBus_powerplant_gas_coal_2_5) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(powerplant_gas_coal_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(powerplant_gas_coal_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(powerplant_gas_coal_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(powerplant_gas_coal_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(powerplant_gas_coal_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(powerplant_gas_coal_electricityBus_2_5) += 0 + +c_e_BusBlock_balance(thermalBus_0_0)_: ++1 flow(powerplant_gas_coal_thermalBus_0_0) += 0 + +c_e_BusBlock_balance(thermalBus_0_1)_: ++1 flow(powerplant_gas_coal_thermalBus_0_1) += 0 + +c_e_BusBlock_balance(thermalBus_1_2)_: ++1 flow(powerplant_gas_coal_thermalBus_1_2) += 0 + +c_e_BusBlock_balance(thermalBus_1_3)_: ++1 flow(powerplant_gas_coal_thermalBus_1_3) += 0 + +c_e_BusBlock_balance(thermalBus_2_4)_: ++1 flow(powerplant_gas_coal_thermalBus_2_4) += 0 + +c_e_BusBlock_balance(thermalBus_2_5)_: ++1 flow(powerplant_gas_coal_thermalBus_2_5) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_0)_: +-0.2 flow(powerplant_gas_coal_electricityBus_0_0) ++0.3 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_0)_: +-0.58 flow(powerplant_gas_coal_electricityBus_0_0) ++0.3 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_0)_: +-0.2 flow(powerplant_gas_coal_thermalBus_0_0) ++0.5 flow(coalBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_0)_: +-0.58 flow(powerplant_gas_coal_thermalBus_0_0) ++0.5 flow(gasBus_powerplant_gas_coal_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_1)_: +-0.2 flow(powerplant_gas_coal_electricityBus_0_1) ++0.3 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_1)_: +-0.58 flow(powerplant_gas_coal_electricityBus_0_1) ++0.3 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_1)_: +-0.2 flow(powerplant_gas_coal_thermalBus_0_1) ++0.5 flow(coalBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_1)_: +-0.58 flow(powerplant_gas_coal_thermalBus_0_1) ++0.5 flow(gasBus_powerplant_gas_coal_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_1_2)_: +-0.2 flow(powerplant_gas_coal_electricityBus_1_2) ++0.3 flow(coalBus_powerplant_gas_coal_1_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_1_2)_: +-0.58 flow(powerplant_gas_coal_electricityBus_1_2) ++0.3 flow(gasBus_powerplant_gas_coal_1_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_1_2)_: +-0.2 flow(powerplant_gas_coal_thermalBus_1_2) ++0.5 flow(coalBus_powerplant_gas_coal_1_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_1_2)_: +-0.58 flow(powerplant_gas_coal_thermalBus_1_2) ++0.5 flow(gasBus_powerplant_gas_coal_1_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_1_3)_: +-0.2 flow(powerplant_gas_coal_electricityBus_1_3) ++0.3 flow(coalBus_powerplant_gas_coal_1_3) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_1_3)_: +-0.58 flow(powerplant_gas_coal_electricityBus_1_3) ++0.3 flow(gasBus_powerplant_gas_coal_1_3) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_1_3)_: +-0.2 flow(powerplant_gas_coal_thermalBus_1_3) ++0.5 flow(coalBus_powerplant_gas_coal_1_3) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_1_3)_: +-0.58 flow(powerplant_gas_coal_thermalBus_1_3) ++0.5 flow(gasBus_powerplant_gas_coal_1_3) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_2_4)_: +-0.2 flow(powerplant_gas_coal_electricityBus_2_4) ++0.3 flow(coalBus_powerplant_gas_coal_2_4) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_2_4)_: +-0.58 flow(powerplant_gas_coal_electricityBus_2_4) ++0.3 flow(gasBus_powerplant_gas_coal_2_4) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_2_4)_: +-0.2 flow(powerplant_gas_coal_thermalBus_2_4) ++0.5 flow(coalBus_powerplant_gas_coal_2_4) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_2_4)_: +-0.58 flow(powerplant_gas_coal_thermalBus_2_4) ++0.5 flow(gasBus_powerplant_gas_coal_2_4) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_electricityBus_2_5)_: +-0.2 flow(powerplant_gas_coal_electricityBus_2_5) ++0.3 flow(coalBus_powerplant_gas_coal_2_5) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_electricityBus_2_5)_: +-0.58 flow(powerplant_gas_coal_electricityBus_2_5) ++0.3 flow(gasBus_powerplant_gas_coal_2_5) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_coalBus_thermalBus_2_5)_: +-0.2 flow(powerplant_gas_coal_thermalBus_2_5) ++0.5 flow(coalBus_powerplant_gas_coal_2_5) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_coal_gasBus_thermalBus_2_5)_: +-0.58 flow(powerplant_gas_coal_thermalBus_2_5) ++0.5 flow(gasBus_powerplant_gas_coal_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) ++1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) += 200 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_1)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_1) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) ++1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1) ++1 InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_2)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_2) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1) ++1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2) ++1 InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_coal_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_coal_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_coal_electricityBus_2)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) ++1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_coal_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_coal_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_1) += 200 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_coal_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_coal_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_0) ++1 InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_coal_electricityBus_1)_: ++1 InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_1) +-1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_coal_electricityBus_2)_: ++1 InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_2) +-1 InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_2) += 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_0)_: ++1 flow(powerplant_gas_coal_electricityBus_0_0) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_1)_: ++1 flow(powerplant_gas_coal_electricityBus_0_1) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_1_2)_: ++1 flow(powerplant_gas_coal_electricityBus_1_2) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_1_3)_: ++1 flow(powerplant_gas_coal_electricityBus_1_3) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_2_4)_: ++1 flow(powerplant_gas_coal_electricityBus_2_4) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_2_5)_: ++1 flow(powerplant_gas_coal_electricityBus_2_5) +-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) <= 1000 + 0 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_1) <= 1000 + 0 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_2) <= 1000 + 0 <= flow(powerplant_gas_coal_electricityBus_0_0) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_0_1) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_1_2) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_1_3) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_2_4) <= +inf + 0 <= flow(powerplant_gas_coal_electricityBus_2_5) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_0_0) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_0_1) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_1_2) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_1_3) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_2_4) <= +inf + 0 <= flow(powerplant_gas_coal_thermalBus_2_5) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_0_0) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_0_1) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_1_2) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_1_3) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_2_4) <= +inf + 0 <= flow(coalBus_powerplant_gas_coal_2_5) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_0_0) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_0_1) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_1_2) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_1_3) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_2_4) <= +inf + 0 <= flow(gasBus_powerplant_gas_coal_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_coal_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_coal_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_0) <= +inf +end diff --git a/tests/lp_files/converter_multi_period.lp b/tests/lp_files/converter_multi_period.lp new file mode 100644 index 000000000..0a63e9490 --- /dev/null +++ b/tests/lp_files/converter_multi_period.lp @@ -0,0 +1,261 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++50 flow(powerplantGasBiomass_electricityBus_0_0) ++50 flow(powerplantGasBiomass_electricityBus_0_1) ++49.01960784313725 flow(powerplantGasBiomass_electricityBus_1_2) ++49.01960784313725 flow(powerplantGasBiomass_electricityBus_1_3) ++48.058439061899264 flow(powerplantGasBiomass_electricityBus_2_4) ++48.058439061899264 flow(powerplantGasBiomass_electricityBus_2_5) ++20 flow(powerplantGasBiomass_thermalBus_0_0) ++20 flow(powerplantGasBiomass_thermalBus_0_1) ++19.6078431372549 flow(powerplantGasBiomass_thermalBus_1_2) ++19.6078431372549 flow(powerplantGasBiomass_thermalBus_1_3) ++19.223375624759708 flow(powerplantGasBiomass_thermalBus_2_4) ++19.223375624759708 flow(powerplantGasBiomass_thermalBus_2_5) + +s.t. + +c_e_BusBlock_balance(biomassBus_0_0)_: ++1 flow(biomassBus_powerplantGasBiomass_0_0) += 0 + +c_e_BusBlock_balance(biomassBus_0_1)_: ++1 flow(biomassBus_powerplantGasBiomass_0_1) += 0 + +c_e_BusBlock_balance(biomassBus_1_2)_: ++1 flow(biomassBus_powerplantGasBiomass_1_2) += 0 + +c_e_BusBlock_balance(biomassBus_1_3)_: ++1 flow(biomassBus_powerplantGasBiomass_1_3) += 0 + +c_e_BusBlock_balance(biomassBus_2_4)_: ++1 flow(biomassBus_powerplantGasBiomass_2_4) += 0 + +c_e_BusBlock_balance(biomassBus_2_5)_: ++1 flow(biomassBus_powerplantGasBiomass_2_5) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(powerplantGasBiomass_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(powerplantGasBiomass_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(powerplantGasBiomass_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(powerplantGasBiomass_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(powerplantGasBiomass_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(powerplantGasBiomass_electricityBus_2_5) += 0 + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_powerplantGasBiomass_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_powerplantGasBiomass_0_1) += 0 + +c_e_BusBlock_balance(gasBus_1_2)_: ++1 flow(gasBus_powerplantGasBiomass_1_2) += 0 + +c_e_BusBlock_balance(gasBus_1_3)_: ++1 flow(gasBus_powerplantGasBiomass_1_3) += 0 + +c_e_BusBlock_balance(gasBus_2_4)_: ++1 flow(gasBus_powerplantGasBiomass_2_4) += 0 + +c_e_BusBlock_balance(gasBus_2_5)_: ++1 flow(gasBus_powerplantGasBiomass_2_5) += 0 + +c_e_BusBlock_balance(thermalBus_0_0)_: ++1 flow(powerplantGasBiomass_thermalBus_0_0) += 0 + +c_e_BusBlock_balance(thermalBus_0_1)_: ++1 flow(powerplantGasBiomass_thermalBus_0_1) += 0 + +c_e_BusBlock_balance(thermalBus_1_2)_: ++1 flow(powerplantGasBiomass_thermalBus_1_2) += 0 + +c_e_BusBlock_balance(thermalBus_1_3)_: ++1 flow(powerplantGasBiomass_thermalBus_1_3) += 0 + +c_e_BusBlock_balance(thermalBus_2_4)_: ++1 flow(powerplantGasBiomass_thermalBus_2_4) += 0 + +c_e_BusBlock_balance(thermalBus_2_5)_: ++1 flow(powerplantGasBiomass_thermalBus_2_5) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_0)_: +-0.1 flow(powerplantGasBiomass_electricityBus_0_0) ++0.3 flow(biomassBus_powerplantGasBiomass_0_0) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_0)_: +-0.4 flow(powerplantGasBiomass_electricityBus_0_0) ++0.3 flow(gasBus_powerplantGasBiomass_0_0) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_0)_: +-0.1 flow(powerplantGasBiomass_thermalBus_0_0) ++0.5 flow(biomassBus_powerplantGasBiomass_0_0) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_0)_: +-0.4 flow(powerplantGasBiomass_thermalBus_0_0) ++0.5 flow(gasBus_powerplantGasBiomass_0_0) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_1)_: +-0.1 flow(powerplantGasBiomass_electricityBus_0_1) ++0.3 flow(biomassBus_powerplantGasBiomass_0_1) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_1)_: +-0.4 flow(powerplantGasBiomass_electricityBus_0_1) ++0.3 flow(gasBus_powerplantGasBiomass_0_1) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_1)_: +-0.1 flow(powerplantGasBiomass_thermalBus_0_1) ++0.5 flow(biomassBus_powerplantGasBiomass_0_1) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_1)_: +-0.4 flow(powerplantGasBiomass_thermalBus_0_1) ++0.5 flow(gasBus_powerplantGasBiomass_0_1) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_1_2)_: +-0.1 flow(powerplantGasBiomass_electricityBus_1_2) ++0.3 flow(biomassBus_powerplantGasBiomass_1_2) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_electricityBus_1_2)_: +-0.4 flow(powerplantGasBiomass_electricityBus_1_2) ++0.3 flow(gasBus_powerplantGasBiomass_1_2) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_1_2)_: +-0.1 flow(powerplantGasBiomass_thermalBus_1_2) ++0.5 flow(biomassBus_powerplantGasBiomass_1_2) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_thermalBus_1_2)_: +-0.4 flow(powerplantGasBiomass_thermalBus_1_2) ++0.5 flow(gasBus_powerplantGasBiomass_1_2) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_1_3)_: +-0.1 flow(powerplantGasBiomass_electricityBus_1_3) ++0.3 flow(biomassBus_powerplantGasBiomass_1_3) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_electricityBus_1_3)_: +-0.4 flow(powerplantGasBiomass_electricityBus_1_3) ++0.3 flow(gasBus_powerplantGasBiomass_1_3) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_1_3)_: +-0.1 flow(powerplantGasBiomass_thermalBus_1_3) ++0.5 flow(biomassBus_powerplantGasBiomass_1_3) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_thermalBus_1_3)_: +-0.4 flow(powerplantGasBiomass_thermalBus_1_3) ++0.5 flow(gasBus_powerplantGasBiomass_1_3) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_2_4)_: +-0.1 flow(powerplantGasBiomass_electricityBus_2_4) ++0.3 flow(biomassBus_powerplantGasBiomass_2_4) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_electricityBus_2_4)_: +-0.4 flow(powerplantGasBiomass_electricityBus_2_4) ++0.3 flow(gasBus_powerplantGasBiomass_2_4) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_2_4)_: +-0.1 flow(powerplantGasBiomass_thermalBus_2_4) ++0.5 flow(biomassBus_powerplantGasBiomass_2_4) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_thermalBus_2_4)_: +-0.4 flow(powerplantGasBiomass_thermalBus_2_4) ++0.5 flow(gasBus_powerplantGasBiomass_2_4) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_2_5)_: +-0.1 flow(powerplantGasBiomass_electricityBus_2_5) ++0.3 flow(biomassBus_powerplantGasBiomass_2_5) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_electricityBus_2_5)_: +-0.4 flow(powerplantGasBiomass_electricityBus_2_5) ++0.3 flow(gasBus_powerplantGasBiomass_2_5) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_2_5)_: +-0.1 flow(powerplantGasBiomass_thermalBus_2_5) ++0.5 flow(biomassBus_powerplantGasBiomass_2_5) += 0 + +c_e_ConverterBlock_relation(powerplantGasBiomass_gasBus_thermalBus_2_5)_: +-0.4 flow(powerplantGasBiomass_thermalBus_2_5) ++0.5 flow(gasBus_powerplantGasBiomass_2_5) += 0 + +bounds + 0 <= flow(powerplantGasBiomass_electricityBus_0_0) <= +inf + 0 <= flow(powerplantGasBiomass_electricityBus_0_1) <= +inf + 0 <= flow(powerplantGasBiomass_electricityBus_1_2) <= +inf + 0 <= flow(powerplantGasBiomass_electricityBus_1_3) <= +inf + 0 <= flow(powerplantGasBiomass_electricityBus_2_4) <= +inf + 0 <= flow(powerplantGasBiomass_electricityBus_2_5) <= +inf + 0.0 <= flow(powerplantGasBiomass_thermalBus_0_0) <= 50000000000.0 + 0.0 <= flow(powerplantGasBiomass_thermalBus_0_1) <= 50000000000.0 + 0.0 <= flow(powerplantGasBiomass_thermalBus_1_2) <= 50000000000.0 + 0.0 <= flow(powerplantGasBiomass_thermalBus_1_3) <= 50000000000.0 + 0.0 <= flow(powerplantGasBiomass_thermalBus_2_4) <= 50000000000.0 + 0.0 <= flow(powerplantGasBiomass_thermalBus_2_5) <= 50000000000.0 + 0 <= flow(biomassBus_powerplantGasBiomass_0_0) <= +inf + 0 <= flow(biomassBus_powerplantGasBiomass_0_1) <= +inf + 0 <= flow(biomassBus_powerplantGasBiomass_1_2) <= +inf + 0 <= flow(biomassBus_powerplantGasBiomass_1_3) <= +inf + 0 <= flow(biomassBus_powerplantGasBiomass_2_4) <= +inf + 0 <= flow(biomassBus_powerplantGasBiomass_2_5) <= +inf + 0 <= flow(gasBus_powerplantGasBiomass_0_0) <= +inf + 0 <= flow(gasBus_powerplantGasBiomass_0_1) <= +inf + 0 <= flow(gasBus_powerplantGasBiomass_1_2) <= +inf + 0 <= flow(gasBus_powerplantGasBiomass_1_3) <= +inf + 0 <= flow(gasBus_powerplantGasBiomass_2_4) <= +inf + 0 <= flow(gasBus_powerplantGasBiomass_2_5) <= +inf +end diff --git a/tests/lp_files/dsm_module_DIW.lp b/tests/lp_files/dsm_module_DIW.lp index 1d2a6824b..337238871 100644 --- a/tests/lp_files/dsm_module_DIW.lp +++ b/tests/lp_files/dsm_module_DIW.lp @@ -1,29 +1,29 @@ \* Source Pyomo model name=Model *\ -min +min objective: +2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) -+2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) -+2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2) +2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) -+2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) -+2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) +2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) +2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) +2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) s.t. -c_e_BusBlock_balance(bus_elec_0)_: -+1 flow(bus_elec_demand_dsm_0) +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) = 0 -c_e_BusBlock_balance(bus_elec_1)_: -+1 flow(bus_elec_demand_dsm_1) +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) = 0 -c_e_BusBlock_balance(bus_elec_2)_: -+1 flow(bus_elec_demand_dsm_2) +c_e_BusBlock_balance(bus_elec_0_2)_: ++1 flow(bus_elec_demand_dsm_0_2) = 0 c_e_SinkDSMDIWBlock_shift_shed_vars(demand_dsm_0)_: @@ -38,29 +38,29 @@ c_e_SinkDSMDIWBlock_shift_shed_vars(demand_dsm_2)_: +1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) = 0 -c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0)_: -+1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_0)_: +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 flow(bus_elec_demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) -1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) -+1 flow(bus_elec_demand_dsm_0) = 1 -c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_1)_: -+1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_1)_: +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 flow(bus_elec_demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) -1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) -+1 flow(bus_elec_demand_dsm_1) = 1 -c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_2)_: -+1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_2)_: +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 flow(bus_elec_demand_dsm_0_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) -1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) -+1 flow(bus_elec_demand_dsm_2) = 1 c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_0)_: @@ -95,62 +95,59 @@ c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_2)_: <= 0.5 c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_0)_: -+1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) <= 0.5 c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_1)_: -+1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) <= 0.5 c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_2)_: -+1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) <= 0.5 c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_0)_: -+1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) +1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) <= 0.5 c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_1)_: -+1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) <= 0.5 c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_2)_: -+1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) <= 0.5 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(bus_elec_demand_dsm_0) <= +inf - 0 <= flow(bus_elec_demand_dsm_1) <= +inf - 0 <= flow(bus_elec_demand_dsm_2) <= +inf 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) <= +inf - 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) <= +inf - 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2) <= +inf 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) <= +inf - 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) <= +inf - 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) <= +inf 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) <= +inf 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) <= +inf 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_2) <= +inf 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) <= +inf 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) <= +inf 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) <= +inf diff --git a/tests/lp_files/dsm_module_DIW_extended.lp b/tests/lp_files/dsm_module_DIW_extended.lp new file mode 100644 index 000000000..92ce70c7e --- /dev/null +++ b/tests/lp_files/dsm_module_DIW_extended.lp @@ -0,0 +1,179 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0) ++100 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++100 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++100 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_0_2)_: ++1 flow(bus_elec_demand_dsm_0_2) += 0 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_0)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) ++1 flow(bus_elec_demand_dsm_0_0) += 1 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) += 0.9 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_2)_: +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_0_2) += 0.8 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_0)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++0.99 SinkDSMDIWBlock_dsm_up(demand_dsm_0) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_1)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++0.99 SinkDSMDIWBlock_dsm_up(demand_dsm_1) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_2)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++0.99 SinkDSMDIWBlock_dsm_up(demand_dsm_2) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) += 0 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) +<= 0.4 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) +<= 0.3 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +<= 0.3 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +<= 0.4 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +<= 0.4 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) +<= 0.4 + +c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDIWBlock_shed_limit_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +<= 0.6 + +c_u_SinkDSMDIWBlock_shed_limit_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +<= 0.6 + +c_u_SinkDSMDIWBlock_shed_limit_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +<= 0.8 + +bounds + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_2) <= +inf +end diff --git a/tests/lp_files/dsm_module_DIW_extended_multi_period.lp b/tests/lp_files/dsm_module_DIW_extended_multi_period.lp new file mode 100644 index 000000000..e247e622e --- /dev/null +++ b/tests/lp_files/dsm_module_DIW_extended_multi_period.lp @@ -0,0 +1,395 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_0) ++100 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_1) ++100 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) ++0.9803921568627451 SinkDSMDIWBlock_dsm_up(demand_dsm_2) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_2) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_2) ++98.0392156862745 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) ++0.9803921568627451 SinkDSMDIWBlock_dsm_up(demand_dsm_3) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_3) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_3) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) ++0.9803921568627451 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_3) ++98.0392156862745 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) ++0.9611687812379853 SinkDSMDIWBlock_dsm_up(demand_dsm_4) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_4) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_4) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_4) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) ++96.11687812379853 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) ++0.9611687812379853 SinkDSMDIWBlock_dsm_up(demand_dsm_5) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_5) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_5) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_5) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_5) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) ++0.9611687812379853 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) ++96.11687812379853 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_1_2)_: ++1 flow(bus_elec_demand_dsm_1_2) += 0 + +c_e_BusBlock_balance(bus_elec_1_3)_: ++1 flow(bus_elec_demand_dsm_1_3) += 0 + +c_e_BusBlock_balance(bus_elec_2_4)_: ++1 flow(bus_elec_demand_dsm_2_4) += 0 + +c_e_BusBlock_balance(bus_elec_2_5)_: ++1 flow(bus_elec_demand_dsm_2_5) += 0 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_0)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) ++1 flow(bus_elec_demand_dsm_0_0) += 1 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) += 0.9 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_1_2)_: +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_1_2) += 0.8 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_1_3)_: +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) ++1 flow(bus_elec_demand_dsm_1_3) += 0.7 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_2_4)_: +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) ++1 flow(bus_elec_demand_dsm_2_4) += 0.7 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_2_5)_: +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_5) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) ++1 flow(bus_elec_demand_dsm_2_5) += 0.7 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_0)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++0.99 SinkDSMDIWBlock_dsm_up(demand_dsm_0) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_1)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++0.99 SinkDSMDIWBlock_dsm_up(demand_dsm_1) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_2)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++0.99 SinkDSMDIWBlock_dsm_up(demand_dsm_2) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_3)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) ++0.99 SinkDSMDIWBlock_dsm_up(demand_dsm_3) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_4)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) ++0.99 SinkDSMDIWBlock_dsm_up(demand_dsm_4) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_5)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) ++0.99 SinkDSMDIWBlock_dsm_up(demand_dsm_5) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) += 0 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) +<= 0.4 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_3)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_3) +<= 0.3 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_4)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_4) +<= 0.3 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_5)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_5) +<= 0.3 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) +<= 0.3 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +<= 0.3 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +<= 0.4 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_3)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) +<= 0.3 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_4)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) +<= 0.3 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_5)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) +<= 0.3 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +<= 0.4 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_3)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) +<= 0.3 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_4)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) +<= 0.3 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_5)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_5) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) +<= 0.3 + +c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) +<= 0.4 + +c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_3) +<= 0.5 + +c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_3)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_3) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_4) +<= 0.3 + +c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_4)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_4) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_5) +<= 0.3 + +c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_5)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_5) +<= 0.3 + +c_u_SinkDSMDIWBlock_shed_limit_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +<= 0.6 + +c_u_SinkDSMDIWBlock_shed_limit_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +<= 0.6 + +c_u_SinkDSMDIWBlock_shed_limit_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) +<= 0.8 + +c_u_SinkDSMDIWBlock_shed_limit_constraint(demand_dsm_3)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) +<= 0.6 + +c_u_SinkDSMDIWBlock_shed_limit_constraint(demand_dsm_4)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) +<= 0.6 + +c_u_SinkDSMDIWBlock_shed_limit_constraint(demand_dsm_5)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) +<= 0.6 + +bounds + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_3) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_4) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_5) <= +inf +end diff --git a/tests/lp_files/dsm_module_DIW_invest.lp b/tests/lp_files/dsm_module_DIW_invest.lp index d60242058..ee3ccfb2a 100644 --- a/tests/lp_files/dsm_module_DIW_invest.lp +++ b/tests/lp_files/dsm_module_DIW_invest.lp @@ -1,173 +1,184 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+2 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) -+2 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) -+2 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_2) -+2 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) -+2 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) -+2 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) -+2 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_0) -+2 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) -+2 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_0) ++100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) s.t. -c_e_BusBlock_balance(bus_elec_0)_: -+1 flow(bus_elec_demand_dsm_0) +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) = 0 -c_e_BusBlock_balance(bus_elec_1)_: -+1 flow(bus_elec_demand_dsm_1) +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) = 0 -c_e_BusBlock_balance(bus_elec_2)_: -+1 flow(bus_elec_demand_dsm_2) +c_e_BusBlock_balance(bus_elec_0_2)_: ++1 flow(bus_elec_demand_dsm_0_2) = 0 -c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(demand_dsm_0)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) -= 0 - -c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(demand_dsm_1)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) -= 0 - -c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(demand_dsm_2)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) -= 0 +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_0)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_0) += 50 -c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_0)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_0_0)_: +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) -1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) --1 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -+1 flow(bus_elec_demand_dsm_0) -= 50 ++1 flow(bus_elec_demand_dsm_0_0) += 1 -c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_1)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) --1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) --1 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -+1 flow(bus_elec_demand_dsm_1) -= 50 ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) += 1 -c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_2)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_0_2)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) --1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) --1 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -+1 flow(bus_elec_demand_dsm_2) -= 50 ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_0_2) += 1 c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_0)_: -1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) --1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) +1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) = 0 c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_1)_: -1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) -1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) -1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) -+1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) = 0 c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_2)_: -1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) --1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) +1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) = 0 -c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_0)_: +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_0_0)_: +1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) --0.5 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -<= 25 +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_1)_: +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_0_1)_: +1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) --0.5 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -<= 25 +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_2)_: +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_0_2)_: +1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) --0.5 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -<= 25 +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_0)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_0_0)_: +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) --0.5 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -<= 25 ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_1)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_0_1)_: +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) --0.5 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -<= 25 ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_2)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_0_2)_: +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) --0.5 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -<= 25 ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_0)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_0_0)_: +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) +1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) --0.5 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -<= 25 +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_1)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) -+1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) --0.5 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -<= 25 ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_2)_: -+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_0_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) -+1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) --0.5 SinkDSMDIWInvestmentBlock_invest(demand_dsm) -<= 25 ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_0_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 bounds - 0 <= flow(bus_elec_demand_dsm_0) <= +inf - 0 <= flow(bus_elec_demand_dsm_1) <= +inf - 0 <= flow(bus_elec_demand_dsm_2) <= +inf - 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm) <= 100 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) <= +inf - 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) <= +inf - 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_2) <= +inf 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) <= +inf - 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) <= +inf - 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) <= +inf 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_0) <= +inf - 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) <= +inf - 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) <= +inf 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) <= +inf - 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) <= +inf - 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) <= +inf 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) <= +inf 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) <= +inf 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_0) <= +inf + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_0) <= 100 end diff --git a/tests/lp_files/dsm_module_DIW_invest_multi_period.lp b/tests/lp_files/dsm_module_DIW_invest_multi_period.lp new file mode 100644 index 000000000..a03022363 --- /dev/null +++ b/tests/lp_files/dsm_module_DIW_invest_multi_period.lp @@ -0,0 +1,487 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++15992.031251718836 ONE_VAR_CONSTANT ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_0) ++100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_1) ++100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_2) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_2) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_2) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_2) ++98.0392156862745 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_3) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_3) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_3) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_3) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_3) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_3) ++0.9803921568627451 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_3) ++98.0392156862745 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_3) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_4) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_4) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_4) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_4) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_4) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_4) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_4) ++96.11687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_4) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_5) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_5) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_5) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_5) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_5) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_5) ++0.9611687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_5) ++96.11687812379853 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_5) ++455.88267648036174 SinkDSMDIWInvestmentBlock_invest(demand_dsm_0) ++440.53147366914004 SinkDSMDIWInvestmentBlock_invest(demand_dsm_1) ++425.7302732994234 SinkDSMDIWInvestmentBlock_invest(demand_dsm_2) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_1_2)_: ++1 flow(bus_elec_demand_dsm_1_2) += 0 + +c_e_BusBlock_balance(bus_elec_1_3)_: ++1 flow(bus_elec_demand_dsm_1_3) += 0 + +c_e_BusBlock_balance(bus_elec_2_4)_: ++1 flow(bus_elec_demand_dsm_2_4) += 0 + +c_e_BusBlock_balance(bus_elec_2_5)_: ++1 flow(bus_elec_demand_dsm_2_5) += 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_0)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_0) ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) += 50 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_1)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_1) +-1 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_1) ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_2)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_2) +-1 SinkDSMDIWInvestmentBlock_total(demand_dsm_1) ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_2) ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(demand_dsm_0)_: ++1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(demand_dsm_1)_: ++1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(demand_dsm_2)_: ++1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_0)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_1)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_2)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_0)_: +-1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_0) +-1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_0) ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_1)_: ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_1) +-1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_1) +-1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_2)_: ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_2) +-1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_2) +-1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) ++1 flow(bus_elec_demand_dsm_0_0) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_1_2)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_1_2) += 2 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_1_3)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_3) ++1 flow(bus_elec_demand_dsm_1_3) += 2 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_2_4)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_4) ++1 flow(bus_elec_demand_dsm_2_4) += 3 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_2_5)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_5) ++1 flow(bus_elec_demand_dsm_2_5) += 3 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_0)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_1)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_2)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_3) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_3)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_3) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_3) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_4) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_4)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_3) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_4) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_4) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_5) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_5)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_4) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_5) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_5) += 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_1_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_1_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_3) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_2_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_4) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_2_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_5) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_1_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_1_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_3) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_2_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_4) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_2_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_5) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_1_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_1_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_3) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_2_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_4) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_2_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_5) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_1_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_3) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_1_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_4) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_2_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_5) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_2_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_5) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_0)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_0) +<= 1000 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_1)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_1) +<= 1000 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_2)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_2) +<= 1000 + +c_l_SinkDSMDIWInvestmentBlock_overall_minimum(demand_dsm)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_2) +>= 5 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_5) <= +inf + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_0) <= 100 + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_1) <= 100 + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_2) <= 100 + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_3) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_4) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(demand_dsm_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_0) <= +inf +end diff --git a/tests/lp_files/dsm_module_DIW_multi_period.lp b/tests/lp_files/dsm_module_DIW_multi_period.lp new file mode 100644 index 000000000..a1be324b6 --- /dev/null +++ b/tests/lp_files/dsm_module_DIW_multi_period.lp @@ -0,0 +1,349 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_0) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_0) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_0) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_1) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_1) ++2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_1) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_2) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_2) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_3) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_3) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) ++1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_3) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_4) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_4) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_4) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_5) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_5) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_5) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_5) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) ++1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_1_2)_: ++1 flow(bus_elec_demand_dsm_1_2) += 0 + +c_e_BusBlock_balance(bus_elec_1_3)_: ++1 flow(bus_elec_demand_dsm_1_3) += 0 + +c_e_BusBlock_balance(bus_elec_2_4)_: ++1 flow(bus_elec_demand_dsm_2_4) += 0 + +c_e_BusBlock_balance(bus_elec_2_5)_: ++1 flow(bus_elec_demand_dsm_2_5) += 0 + +c_e_SinkDSMDIWBlock_shift_shed_vars(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) += 0 + +c_e_SinkDSMDIWBlock_shift_shed_vars(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) += 0 + +c_e_SinkDSMDIWBlock_shift_shed_vars(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) += 0 + +c_e_SinkDSMDIWBlock_shift_shed_vars(demand_dsm_3)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) += 0 + +c_e_SinkDSMDIWBlock_shift_shed_vars(demand_dsm_4)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) += 0 + +c_e_SinkDSMDIWBlock_shift_shed_vars(demand_dsm_5)_: ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) += 0 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_0)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 flow(bus_elec_demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) += 1 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_1)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 flow(bus_elec_demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) += 1 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_1_2)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) ++1 flow(bus_elec_demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) += 1 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_1_3)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) ++1 flow(bus_elec_demand_dsm_1_3) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_3) += 1 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_2_4)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) ++1 flow(bus_elec_demand_dsm_2_4) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_4) += 1 + +c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_2_5)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) ++1 flow(bus_elec_demand_dsm_2_5) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) +-1 SinkDSMDIWBlock_dsm_up(demand_dsm_5) += 1 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_0)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_1)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_2)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_3)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_3) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_4)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_4) += 0 + +c_e_SinkDSMDIWBlock_dsm_updo_constraint(demand_dsm_5)_: +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) +-1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_5) += 0 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_3)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_3) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_4)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_4) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_5)_: ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_5) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_3)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_4)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) +<= 0.5 + +c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_5)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) +<= 0.5 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_0)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_1)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_2)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_3)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_3) +<= 0.5 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_4)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_4) +<= 0.5 + +c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_5)_: ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) ++1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) ++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) ++1 SinkDSMDIWBlock_dsm_up(demand_dsm_5) +<= 0.5 + +bounds + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_3) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_4) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_0) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_1) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_2) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_3) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_4) <= +inf + 0 <= SinkDSMDIWBlock_dsm_up(demand_dsm_5) <= +inf +end diff --git a/tests/lp_files/dsm_module_DLR.lp b/tests/lp_files/dsm_module_DLR.lp index ae9a63e16..e6aa3475a 100644 --- a/tests/lp_files/dsm_module_DLR.lp +++ b/tests/lp_files/dsm_module_DLR.lp @@ -1,32 +1,32 @@ \* Source Pyomo model name=Model *\ -min +min objective: ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) +2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) -+2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) -+2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) +2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) -+2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) -+2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) -+2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) +2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) -+2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) -+2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) +2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) +2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) s.t. -c_e_BusBlock_balance(bus_elec_0)_: -+1 flow(bus_elec_demand_dsm_0) +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) = 0 -c_e_BusBlock_balance(bus_elec_1)_: -+1 flow(bus_elec_demand_dsm_1) +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) = 0 -c_e_BusBlock_balance(bus_elec_2)_: -+1 flow(bus_elec_demand_dsm_2) +c_e_BusBlock_balance(bus_elec_0_2)_: ++1 flow(bus_elec_demand_dsm_0_2) = 0 c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_1_0)_: @@ -53,43 +53,43 @@ c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_2_2)_: +1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) = 0 -c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0)_: --1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) --1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) -+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) -+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) -+1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_0)_: +1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) +1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) -1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) -1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) -+1 flow(bus_elec_demand_dsm_0) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) ++1 flow(bus_elec_demand_dsm_0_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) = 1 -c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_1)_: +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) -1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) -1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1 flow(bus_elec_demand_dsm_0_1) +1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) --1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) --1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) -+1 flow(bus_elec_demand_dsm_1) = 1 -c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_2)_: +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_2)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) -1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) -1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1 flow(bus_elec_demand_dsm_0_2) +1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) --1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) --1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) -+1 flow(bus_elec_demand_dsm_2) = 1 c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_0)_: @@ -97,13 +97,13 @@ c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_0)_: = 0 c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_1)_: -+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) -1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) = 0 c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_2)_: -+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) -1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) = 0 c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_0)_: @@ -111,8 +111,8 @@ c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_0)_: = 0 c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_2)_: -+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) -1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) = 0 c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_0)_: @@ -120,13 +120,13 @@ c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_0)_: = 0 c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_1)_: -+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) -1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) = 0 c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_2)_: -+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) -1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) = 0 c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_0)_: @@ -134,8 +134,8 @@ c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_0)_: = 0 c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_2)_: -+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) -1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) = 0 c_e_SinkDSMDLRBlock_no_comp_red(demand_dsm_1_2)_: @@ -163,72 +163,72 @@ c_e_SinkDSMDLRBlock_no_comp_inc(demand_dsm_2_2)_: = 0 c_u_SinkDSMDLRBlock_availability_red(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) +1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) <= 0.5 c_u_SinkDSMDLRBlock_availability_red(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) +1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) <= 0.5 c_u_SinkDSMDLRBlock_availability_red(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) +1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) <= 0.5 c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_0)_: -+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) -+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) <= 0.5 c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_1)_: -+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) -+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) <= 0.5 c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_2)_: -+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) -+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) <= 0.5 c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_0)_: -+1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) -1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) -1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) = 0 c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_1)_: -1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) -1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) -+1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) --1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) +1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) = 0 c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_2)_: -1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) -1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) -+1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) --1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) +1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) = 0 c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_0)_: @@ -238,19 +238,19 @@ c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_0)_: = 0 c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_1)_: --1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) --1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) +1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) -1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) = 0 c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_2)_: --1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) --1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) +1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) -1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) = 0 @@ -280,75 +280,72 @@ c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_2)_: <= 0.5 c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_0)_: -+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) -+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) -+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) -+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) -+1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) +1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) +1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) +1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) <= 0.5 c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) +1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) +1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) +1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) -+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) -+1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) <= 0.5 c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) +1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) +1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) +1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) -+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) -+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) -+1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) <= 0.5 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(bus_elec_demand_dsm_0) <= +inf - 0 <= flow(bus_elec_demand_dsm_1) <= +inf - 0 <= flow(bus_elec_demand_dsm_2) <= +inf 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) <= +inf - 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) <= +inf - 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) <= +inf 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) <= +inf - 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) <= +inf - 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) <= +inf - 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) <= +inf - 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) <= +inf - 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) <= +inf 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) <= +inf - 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) <= +inf - 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) <= +inf - 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) <= +inf - 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) <= +inf - 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) <= +inf 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) <= +inf - 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) <= +inf - 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) <= +inf 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) <= +inf 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) <= +inf - 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) <= +inf - 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) <= +inf 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) <= +inf - 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) <= +inf - 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) <= +inf 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) <= +inf 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) <= +inf 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) <= +inf 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) <= +inf 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) <= +inf diff --git a/tests/lp_files/dsm_module_DLR_delay_time.lp b/tests/lp_files/dsm_module_DLR_delay_time.lp new file mode 100644 index 000000000..21997cf82 --- /dev/null +++ b/tests/lp_files/dsm_module_DLR_delay_time.lp @@ -0,0 +1,353 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_0) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_0) ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_1) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_1) ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_2) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_2) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_0_2)_: ++1 flow(bus_elec_demand_dsm_0_2) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_1_0)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_1_1)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_1_2)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_3_0)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_3_1)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_3_2)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) += 0 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_0) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_0) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_0) ++1 flow(bus_elec_demand_dsm_0_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) += 1 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_1) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_1) ++1 flow(bus_elec_demand_dsm_0_1) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) += 1 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_2)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_2) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_2) ++1 flow(bus_elec_demand_dsm_0_2) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) += 1 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_0)_: ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_1)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_2)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_3_0)_: ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_0)_: ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_1)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_2)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_3_0)_: ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_0) += 0 + +c_e_SinkDSMDLRBlock_no_comp_red(demand_dsm_1_2)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRBlock_no_comp_red(demand_dsm_3_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_0) += 0 + +c_e_SinkDSMDLRBlock_no_comp_red(demand_dsm_3_1)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_1) += 0 + +c_e_SinkDSMDLRBlock_no_comp_red(demand_dsm_3_2)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_2) += 0 + +c_e_SinkDSMDLRBlock_no_comp_inc(demand_dsm_1_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRBlock_no_comp_inc(demand_dsm_3_0)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_0) += 0 + +c_e_SinkDSMDLRBlock_no_comp_inc(demand_dsm_3_1)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_1) += 0 + +c_e_SinkDSMDLRBlock_no_comp_inc(demand_dsm_3_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_2) += 0 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_1) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_2) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_1) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_2) +<= 0.5 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_0)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_0) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_1)_: +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_1) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_2)_: +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_0)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_0) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_1) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_1) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_2) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_2) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) += 0 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_1) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_2) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) +<= 0.5 + +bounds + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_3_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_3_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_3_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) <= +inf +end diff --git a/tests/lp_files/dsm_module_DLR_extended.lp b/tests/lp_files/dsm_module_DLR_extended.lp new file mode 100644 index 000000000..3c09f5fe8 --- /dev/null +++ b/tests/lp_files/dsm_module_DLR_extended.lp @@ -0,0 +1,310 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) ++100 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++100 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++100 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_0_2)_: ++1 flow(bus_elec_demand_dsm_0_2) += 0 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_0)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) ++1 flow(bus_elec_demand_dsm_0_0) += 1 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) += 0.9 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_2)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_0_2) += 0.8 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_0)_: ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_1)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_2)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_0)_: ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_2)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_0)_: ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_1)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_2)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_0)_: ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_2)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) += 0 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) +<= 0.3 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) +<= 0.3 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) +<= 0.4 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) +<= 0.4 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) +<= 0.5 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_0)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_1)_: +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_2)_: +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_0)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_1)_: ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_2)_: ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) += 0 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) +<= 0.3333333333333333 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) +<= 0.3333333333333333 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) +<= 0.3333333333333333 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) +<= 0.4666666666666666 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) +<= 0.4666666666666666 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) +<= 0.4666666666666666 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_shed(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) +<= 33.33333333333333 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_red(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) +<= 33.33333333333333 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_inc(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) +<= 46.666666666666664 + +bounds + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) <= +inf +end diff --git a/tests/lp_files/dsm_module_DLR_extended_multi_period.lp b/tests/lp_files/dsm_module_DLR_extended_multi_period.lp new file mode 100644 index 000000000..1626a1bfd --- /dev/null +++ b/tests/lp_files/dsm_module_DLR_extended_multi_period.lp @@ -0,0 +1,706 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) ++100 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++100 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) ++0.9803921568627451 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++0.9803921568627451 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) ++0.9803921568627451 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++0.9803921568627451 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) ++0.9803921568627451 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++0.9803921568627451 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++0.9803921568627451 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++0.9803921568627451 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++98.0392156862745 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) ++0.9803921568627451 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++0.9803921568627451 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) ++0.9803921568627451 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) ++0.9803921568627451 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) ++0.9803921568627451 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++0.9803921568627451 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) ++0.9803921568627451 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++0.9803921568627451 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) ++98.0392156862745 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3) ++0.9611687812379853 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) ++0.9611687812379853 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) ++0.9611687812379853 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) ++0.9611687812379853 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) ++0.9611687812379853 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++0.9611687812379853 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) ++0.9611687812379853 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) ++0.9611687812379853 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) ++96.11687812379853 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4) ++0.9611687812379853 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) ++0.9611687812379853 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) ++0.9611687812379853 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) ++0.9611687812379853 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) ++0.9611687812379853 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) ++0.9611687812379853 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) ++0.9611687812379853 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) ++0.9611687812379853 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) ++96.11687812379853 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_1_2)_: ++1 flow(bus_elec_demand_dsm_1_2) += 0 + +c_e_BusBlock_balance(bus_elec_1_3)_: ++1 flow(bus_elec_demand_dsm_1_3) += 0 + +c_e_BusBlock_balance(bus_elec_2_4)_: ++1 flow(bus_elec_demand_dsm_2_4) += 0 + +c_e_BusBlock_balance(bus_elec_2_5)_: ++1 flow(bus_elec_demand_dsm_2_5) += 0 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_0)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) ++1 flow(bus_elec_demand_dsm_0_0) += 1 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) += 0.9 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_1_2)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_1_2) += 0.8 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_1_3)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3) ++1 flow(bus_elec_demand_dsm_1_3) += 0.7 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_2_4)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4) ++1 flow(bus_elec_demand_dsm_2_4) += 0.7 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_2_5)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5) ++1 flow(bus_elec_demand_dsm_2_5) += 0.7 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_0)_: ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_1)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_2)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_3)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_4)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_5)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_0)_: ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_2)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_3)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_4)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_5)_: +-1.0101010101010102 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_0)_: ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_1)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_2)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_3)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_4)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_5)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_0)_: ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_2)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_3)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_4)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_5)_: +-0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) += 0 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) +<= 0.3 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) +<= 0.3 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) +<= 0.4 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3) +<= 0.3 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4) +<= 0.3 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5) +<= 0.3 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) +<= 0.4 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) +<= 0.3 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) +<= 0.3 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) +<= 0.3 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_0)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_1)_: +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_2)_: +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_3)_: +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_3) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_4)_: +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_3) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_4) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_5)_: +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) +-0.99 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_4) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_5) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_0)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_1)_: ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_2)_: ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_3)_: ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_3) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_4)_: ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_3) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_4) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_5)_: ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) ++0.99 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_4) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_5) += 0 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) +<= 0.3166666666666667 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) +<= 0.3166666666666667 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) +<= 0.3166666666666667 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_3) +<= 0.3166666666666667 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_4) +<= 0.3166666666666667 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_5) +<= 0.3166666666666667 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) +<= 0.3833333333333333 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) +<= 0.3833333333333333 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) +<= 0.3833333333333333 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_3) +<= 0.3833333333333333 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_4) +<= 0.3833333333333333 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_5) +<= 0.3833333333333333 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_shed(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) +<= 31.66666666666667 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_shed(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3) +<= 31.66666666666667 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_shed(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5) +<= 31.66666666666667 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_red(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) +<= 31.66666666666667 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_red(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) +<= 31.66666666666667 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_red(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) +<= 31.66666666666667 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_inc(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) +<= 38.33333333333333 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_inc(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) +<= 38.33333333333333 + +c_u_SinkDSMDLRBlock_dr_yearly_limit_inc(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) +<= 38.33333333333333 + +c_u_SinkDSMDLRBlock_dr_daily_limit_red(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) +<= 0.3166666666666667 + +c_u_SinkDSMDLRBlock_dr_daily_limit_red(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) +<= 0.3166666666666667 + +c_u_SinkDSMDLRBlock_dr_daily_limit_red(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) +<= 0.3166666666666667 + +c_u_SinkDSMDLRBlock_dr_daily_limit_inc(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) +<= 0.3833333333333333 + +c_u_SinkDSMDLRBlock_dr_daily_limit_inc(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) +<= 0.3833333333333333 + +c_u_SinkDSMDLRBlock_dr_daily_limit_inc(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) +<= 0.3833333333333333 + +bounds + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_3) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_4) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_5) <= +inf +end diff --git a/tests/lp_files/dsm_module_DLR_invest.lp b/tests/lp_files/dsm_module_DLR_invest.lp index c5cd600b2..c7404697f 100644 --- a/tests/lp_files/dsm_module_DLR_invest.lp +++ b/tests/lp_files/dsm_module_DLR_invest.lp @@ -1,112 +1,105 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+2 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) -+2 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) -+2 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) -+2 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) -+2 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) -+2 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) -+2 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) -+2 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) -+2 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) -+2 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) -+2 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) -+2 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) ++100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) ++100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) ++100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) s.t. -c_e_BusBlock_balance(bus_elec_0)_: -+1 flow(bus_elec_demand_dsm_0) +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) = 0 -c_e_BusBlock_balance(bus_elec_1)_: -+1 flow(bus_elec_demand_dsm_1) +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) = 0 -c_e_BusBlock_balance(bus_elec_2)_: -+1 flow(bus_elec_demand_dsm_2) +c_e_BusBlock_balance(bus_elec_0_2)_: ++1 flow(bus_elec_demand_dsm_0_2) = 0 -c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(demand_dsm_1_0)_: -+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) -= 0 - -c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(demand_dsm_1_1)_: -+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) -= 0 - -c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(demand_dsm_1_2)_: -+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) -= 0 - -c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(demand_dsm_2_0)_: -+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) -= 0 - -c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(demand_dsm_2_1)_: -+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) -= 0 - -c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(demand_dsm_2_2)_: -+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) -= 0 +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_0)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_0) += 50 -c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_0)_: +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_0_0)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) -1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) -1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) --1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) --1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) --1 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -+1 flow(bus_elec_demand_dsm_0) -= 50 ++1 flow(bus_elec_demand_dsm_0_0) += 1 -c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_1)_: +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) -1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) -1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) --1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) --1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) --1 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -+1 flow(bus_elec_demand_dsm_1) -= 50 ++1 flow(bus_elec_demand_dsm_0_1) += 1 -c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_2)_: +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_0_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) -1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) -1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) --1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) --1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) --1 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -+1 flow(bus_elec_demand_dsm_2) -= 50 ++1 flow(bus_elec_demand_dsm_0_2) += 1 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_1_0)_: +1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) = 0 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_1_1)_: -+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) -1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) = 0 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_1_2)_: -+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) -1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) = 0 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_2_0)_: @@ -114,8 +107,8 @@ c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_2_0)_: = 0 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_2_2)_: -+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) -1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) = 0 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_1_0)_: @@ -123,13 +116,13 @@ c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_1_0)_: = 0 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_1_1)_: -+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) -1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) = 0 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_1_2)_: -+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) -1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) = 0 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_2_0)_: @@ -137,8 +130,8 @@ c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_2_0)_: = 0 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_2_2)_: -+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) -1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) = 0 c_e_SinkDSMDLRInvestmentBlock_no_comp_red(demand_dsm_1_2)_: @@ -165,79 +158,79 @@ c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(demand_dsm_2_2)_: +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) = 0 -c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_0)_: +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_1)_: +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_2)_: +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_0_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_0)_: -+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) -+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_0_0)_: +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_1)_: -+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) -+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_0_1)_: +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_2)_: -+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) -+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_0_2)_: +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_0)_: -+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_0) -1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) -1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_0) = 0 c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_1)_: -1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) -1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) -+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_0) --1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_1) +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_0) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_1) = 0 c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_2)_: -1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) -1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) -+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_1) --1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_2) +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_1) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_2) = 0 c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_0)_: @@ -247,127 +240,132 @@ c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_0)_: = 0 c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_1)_: --1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) --1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) +1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_0) -1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_1) = 0 c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_2)_: --1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) --1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) +1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_1) -1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_2) = 0 -c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_0)_: +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_0_0)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_0) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 +<= 0 -c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_1)_: +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_0_1)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_1) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 +<= 0 -c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_2)_: +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_0_2)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_2) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 +<= 0 -c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_0)_: +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_0_0)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_0) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 +<= 0 -c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_1)_: +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_0_1)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_1) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 +<= 0 -c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_2)_: +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_0_2)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_2) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) +-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_0)_: +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) +1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) +1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) -+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) -+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_1)_: +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) +1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) +1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) -+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) -+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_2)_: +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_0_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) +1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) +1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) -+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) -+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) -+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) --0.5 SinkDSMDLRInvestmentBlock_invest(demand_dsm) -<= 25 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 bounds - 0 <= flow(bus_elec_demand_dsm_0) <= +inf - 0 <= flow(bus_elec_demand_dsm_1) <= +inf - 0 <= flow(bus_elec_demand_dsm_2) <= +inf - 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm) <= 100 + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) <= +inf 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) <= +inf 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) <= +inf 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) <= +inf 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) <= +inf 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) <= +inf 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) <= +inf 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) <= +inf - 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) <= +inf 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) <= +inf 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_0) <= +inf + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_0) <= 100 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_0) <= +inf 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_1) <= +inf 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_2) <= +inf diff --git a/tests/lp_files/dsm_module_DLR_invest_multi_period.lp b/tests/lp_files/dsm_module_DLR_invest_multi_period.lp new file mode 100644 index 000000000..ff00f7ab2 --- /dev/null +++ b/tests/lp_files/dsm_module_DLR_invest_multi_period.lp @@ -0,0 +1,824 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++15992.031251718836 ONE_VAR_CONSTANT ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) ++100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) ++100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) ++98.0392156862745 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_3) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_3) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_3) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_3) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_3) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_3) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_3) ++0.9803921568627451 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_3) ++98.0392156862745 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_3) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_4) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_4) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_4) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_4) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_4) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_4) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_4) ++96.11687812379853 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_4) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_5) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_5) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_5) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_5) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_5) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5) ++0.9611687812379853 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_5) ++96.11687812379853 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_5) ++455.88267648036174 SinkDSMDLRInvestmentBlock_invest(demand_dsm_0) ++440.53147366914004 SinkDSMDLRInvestmentBlock_invest(demand_dsm_1) ++425.7302732994234 SinkDSMDLRInvestmentBlock_invest(demand_dsm_2) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_1_2)_: ++1 flow(bus_elec_demand_dsm_1_2) += 0 + +c_e_BusBlock_balance(bus_elec_1_3)_: ++1 flow(bus_elec_demand_dsm_1_3) += 0 + +c_e_BusBlock_balance(bus_elec_2_4)_: ++1 flow(bus_elec_demand_dsm_2_4) += 0 + +c_e_BusBlock_balance(bus_elec_2_5)_: ++1 flow(bus_elec_demand_dsm_2_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_0)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_0) ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) += 50 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_1)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_1) +-1 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_2)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_2) +-1 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(demand_dsm_0)_: ++1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(demand_dsm_1)_: ++1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(demand_dsm_2)_: ++1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_0)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_1)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_2)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_0)_: +-1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_0) +-1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_0) ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_1)_: ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_1) +-1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_1) +-1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_2)_: ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_2) +-1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_2) +-1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_0_0)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 flow(bus_elec_demand_dsm_0_0) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_1_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_1_2) += 2 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_1_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_3) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_3) ++1 flow(bus_elec_demand_dsm_1_3) += 2 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_2_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_4) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_4) ++1 flow(bus_elec_demand_dsm_2_4) += 3 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_2_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_5) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_5) ++1 flow(bus_elec_demand_dsm_2_5) += 3 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_1_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_1_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_1_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_1_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_1_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_1_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_2_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_2_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_2_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_2_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_2_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_1_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_1_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_1_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_1_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_1_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_1_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_2_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_2_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_2_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_2_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_2_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_red(demand_dsm_1_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_red(demand_dsm_2_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_red(demand_dsm_2_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(demand_dsm_1_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(demand_dsm_2_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(demand_dsm_2_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_5) += 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_1_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_1_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_3) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_2_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_4) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_2_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_5) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_1_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_1_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_3) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_2_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_4) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_2_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_5) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_0)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_1)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_0) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_2)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_1) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_3)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_2) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_4)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_3) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_5)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_4) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_0)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_0) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_1) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_2) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_3) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_4) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_5) += 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_0_0)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_0_1)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_1_2)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_1_3)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_2_4)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_2_5)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_0_0)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_0_1)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_1_2)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_1_3)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_2_4)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_2_5)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) +-50 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_3) +-50 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_5) +-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_1_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_1_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_3) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_2_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_4) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_2_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_5) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(demand_dsm_0)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_0) +<= 1000 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(demand_dsm_1)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_1) +<= 1000 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(demand_dsm_2)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) +<= 1000 + +c_l_SinkDSMDLRInvestmentBlock_overall_minimum(demand_dsm)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_2) +>= 5 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_5) <= +inf + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_0) <= 100 + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_1) <= 100 + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_2) <= 100 + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_3) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_4) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_5) <= +inf +end diff --git a/tests/lp_files/dsm_module_DLR_multi_period.lp b/tests/lp_files/dsm_module_DLR_multi_period.lp new file mode 100644 index 000000000..c9ff2e694 --- /dev/null +++ b/tests/lp_files/dsm_module_DLR_multi_period.lp @@ -0,0 +1,697 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1.9607843137254901 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1.9607843137254901 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1.9607843137254901 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1.9607843137254901 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1.9607843137254901 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1.9607843137254901 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) ++1.9607843137254901 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1.9607843137254901 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) ++1.9223375624759707 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1.9223375624759707 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) ++1.9223375624759707 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) ++1.9223375624759707 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) ++1.9223375624759707 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) ++1.9223375624759707 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) ++1.9223375624759707 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) ++1.9223375624759707 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_1_2)_: ++1 flow(bus_elec_demand_dsm_1_2) += 0 + +c_e_BusBlock_balance(bus_elec_1_3)_: ++1 flow(bus_elec_demand_dsm_1_3) += 0 + +c_e_BusBlock_balance(bus_elec_2_4)_: ++1 flow(bus_elec_demand_dsm_2_4) += 0 + +c_e_BusBlock_balance(bus_elec_2_5)_: ++1 flow(bus_elec_demand_dsm_2_5) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_1_0)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_1_1)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_1_2)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_1_3)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_1_4)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_1_5)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_2_0)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_2_1)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_2_2)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_2_3)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_2_4)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4) += 0 + +c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_2_5)_: ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5) += 0 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) ++1 flow(bus_elec_demand_dsm_0_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) += 1 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1 flow(bus_elec_demand_dsm_0_1) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) += 1 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_1_2)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1 flow(bus_elec_demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) += 1 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_1_3)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) ++1 flow(bus_elec_demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3) += 1 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_2_4)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) ++1 flow(bus_elec_demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4) += 1 + +c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_2_5)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) ++1 flow(bus_elec_demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5) += 1 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_0)_: ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_1)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_2)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_3)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_4)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_1_5)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_0)_: ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_2)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_3)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_4)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_red(demand_dsm_2_5)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_0)_: ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_1)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_2)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_3)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_4)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_1_5)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_0)_: ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_2)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_3)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_4)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) += 0 + +c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_5)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) += 0 + +c_e_SinkDSMDLRBlock_no_comp_red(demand_dsm_1_5)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) += 0 + +c_e_SinkDSMDLRBlock_no_comp_red(demand_dsm_2_4)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) += 0 + +c_e_SinkDSMDLRBlock_no_comp_red(demand_dsm_2_5)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) += 0 + +c_e_SinkDSMDLRBlock_no_comp_inc(demand_dsm_1_5)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) += 0 + +c_e_SinkDSMDLRBlock_no_comp_inc(demand_dsm_2_4)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) += 0 + +c_e_SinkDSMDLRBlock_no_comp_inc(demand_dsm_2_5)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) += 0 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_red(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) +<= 0.5 + +c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) +<= 0.5 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_0)_: +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_1)_: +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_2)_: +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_3)_: +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_3) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_4)_: +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_3) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_4) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_red(demand_dsm_5)_: +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) +-1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_4) +-1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_5) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_0)_: +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) +-1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_3) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_3) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_4) += 0 + +c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) +-1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_4) +-1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_5) += 0 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_3) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_4) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_5) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_3) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_4) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_5) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_0)_: ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_1)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_2)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_3)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_4)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4) +<= 0.5 + +c_u_SinkDSMDLRBlock_dr_logical_constraint(demand_dsm_5)_: ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) ++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) ++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) ++1 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5) +<= 0.5 + +bounds + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_3) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_4) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_do_level(demand_dsm_5) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_0) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_1) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_2) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_3) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_4) <= +inf + 0 <= SinkDSMDLRBlock_dsm_up_level(demand_dsm_5) <= +inf +end diff --git a/tests/lp_files/dsm_module_oemof.lp b/tests/lp_files/dsm_module_oemof.lp index 1f6375107..416c4ee1b 100644 --- a/tests/lp_files/dsm_module_oemof.lp +++ b/tests/lp_files/dsm_module_oemof.lp @@ -1,6 +1,6 @@ \* Source Pyomo model name=Model *\ -min +min objective: +2 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) +2 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) @@ -8,16 +8,16 @@ objective: s.t. -c_e_BusBlock_balance(bus_elec_0)_: -+1 flow(bus_elec_demand_dsm_0) +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) = 0 -c_e_BusBlock_balance(bus_elec_1)_: -+1 flow(bus_elec_demand_dsm_1) +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) = 0 -c_e_BusBlock_balance(bus_elec_2)_: -+1 flow(bus_elec_demand_dsm_2) +c_e_BusBlock_balance(bus_elec_0_2)_: ++1 flow(bus_elec_demand_dsm_0_2) = 0 c_e_SinkDSMOemofBlock_shift_shed_vars(demand_dsm_0)_: @@ -32,25 +32,25 @@ c_e_SinkDSMOemofBlock_shift_shed_vars(demand_dsm_2)_: +1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) = 0 -c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0)_: -+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_0)_: +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++1 flow(bus_elec_demand_dsm_0_0) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) -1 SinkDSMOemofBlock_dsm_up(demand_dsm_0) -+1 flow(bus_elec_demand_dsm_0) = 1 -c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_1)_: -+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_1)_: +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) -1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) -+1 flow(bus_elec_demand_dsm_1) = 1 -c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_2)_: -+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_2)_: +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_0_2) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) -1 SinkDSMOemofBlock_dsm_up(demand_dsm_2) -+1 flow(bus_elec_demand_dsm_2) = 1 c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_0)_: @@ -59,25 +59,25 @@ c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_0)_: c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_1)_: +1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) -<= 0.40000000000000002 +<= 0.4 c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_2)_: +1 SinkDSMOemofBlock_dsm_up(demand_dsm_2) <= 0.5 c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_0)_: -+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) <= 0.5 c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_1)_: -+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) -<= 0.40000000000000002 ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) +<= 0.4 c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_2)_: -+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) <= 0.5 c_e_SinkDSMOemofBlock_dsm_sum_constraint(demand_dsm_0)_: @@ -87,16 +87,13 @@ c_e_SinkDSMOemofBlock_dsm_sum_constraint(demand_dsm_0)_: +1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) = 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(bus_elec_demand_dsm_0) <= +inf - 0 <= flow(bus_elec_demand_dsm_1) <= +inf - 0 <= flow(bus_elec_demand_dsm_2) <= +inf 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) <= +inf 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) <= +inf 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_2) <= +inf 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) <= +inf 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) <= +inf 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) <= +inf diff --git a/tests/lp_files/dsm_module_oemof_extended.lp b/tests/lp_files/dsm_module_oemof_extended.lp new file mode 100644 index 000000000..3ebe9b458 --- /dev/null +++ b/tests/lp_files/dsm_module_oemof_extended.lp @@ -0,0 +1,97 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++100 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_0) ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) ++100 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_2) ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++100 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_0_2)_: ++1 flow(bus_elec_demand_dsm_0_2) += 0 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_0)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_0) ++1 flow(bus_elec_demand_dsm_0_0) += 1 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) += 0.9 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_2)_: +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_2) ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_0_2) += 0.8 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_0)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_1)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) +<= 0.4 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_2)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_0)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_1)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_2)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) +<= 0.4 + +c_e_SinkDSMOemofBlock_dsm_sum_constraint(demand_dsm_0)_: +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++0.99 SinkDSMOemofBlock_dsm_up(demand_dsm_0) ++0.99 SinkDSMOemofBlock_dsm_up(demand_dsm_1) +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) += 0.0 + +bounds + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_2) <= +inf +end diff --git a/tests/lp_files/dsm_module_oemof_extended_multi_period.lp b/tests/lp_files/dsm_module_oemof_extended_multi_period.lp new file mode 100644 index 000000000..745854ca7 --- /dev/null +++ b/tests/lp_files/dsm_module_oemof_extended_multi_period.lp @@ -0,0 +1,192 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++100 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_0) ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) ++100 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) ++0.9803921568627451 SinkDSMOemofBlock_dsm_up(demand_dsm_2) ++0.9803921568627451 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++98.0392156862745 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) ++0.9803921568627451 SinkDSMOemofBlock_dsm_up(demand_dsm_3) ++0.9803921568627451 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3) ++98.0392156862745 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3) ++0.9611687812379853 SinkDSMOemofBlock_dsm_up(demand_dsm_4) ++0.9611687812379853 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4) ++96.11687812379853 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4) ++0.9611687812379853 SinkDSMOemofBlock_dsm_up(demand_dsm_5) ++0.9611687812379853 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5) ++96.11687812379853 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_1_2)_: ++1 flow(bus_elec_demand_dsm_1_2) += 0 + +c_e_BusBlock_balance(bus_elec_1_3)_: ++1 flow(bus_elec_demand_dsm_1_3) += 0 + +c_e_BusBlock_balance(bus_elec_2_4)_: ++1 flow(bus_elec_demand_dsm_2_4) += 0 + +c_e_BusBlock_balance(bus_elec_2_5)_: ++1 flow(bus_elec_demand_dsm_2_5) += 0 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_0)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_0) ++1 flow(bus_elec_demand_dsm_0_0) += 1 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) += 0.9 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_1_2)_: +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_2) ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_1_2) += 0.8 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_1_3)_: +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_3) ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3) ++1 flow(bus_elec_demand_dsm_1_3) += 0.7 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_2_4)_: +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_4) ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4) ++1 flow(bus_elec_demand_dsm_2_4) += 0.7 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_2_5)_: +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_5) ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5) ++1 flow(bus_elec_demand_dsm_2_5) += 0.7 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_0)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_1)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) +<= 0.4 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_2)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_3)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_3) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_4)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_4) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_5)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_5) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_0)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_1)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_2)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) +<= 0.4 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_3)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_4)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_5)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5) +<= 0.3 + +c_e_SinkDSMOemofBlock_dsm_sum_constraint(demand_dsm_0)_: +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++0.99 SinkDSMOemofBlock_dsm_up(demand_dsm_0) ++0.99 SinkDSMOemofBlock_dsm_up(demand_dsm_1) +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) += 0.0 + +c_e_SinkDSMOemofBlock_dsm_sum_constraint(demand_dsm_2)_: ++0.99 SinkDSMOemofBlock_dsm_up(demand_dsm_2) +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++0.99 SinkDSMOemofBlock_dsm_up(demand_dsm_3) +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3) += 0.0 + +c_e_SinkDSMOemofBlock_dsm_sum_constraint(demand_dsm_4)_: ++0.99 SinkDSMOemofBlock_dsm_up(demand_dsm_4) +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4) ++0.99 SinkDSMOemofBlock_dsm_up(demand_dsm_5) +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5) += 0.0 + +bounds + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_3) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_4) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_5) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_3) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_4) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_5) <= +inf +end diff --git a/tests/lp_files/dsm_module_oemof_invest.lp b/tests/lp_files/dsm_module_oemof_invest.lp index 438163537..ca2a89296 100644 --- a/tests/lp_files/dsm_module_oemof_invest.lp +++ b/tests/lp_files/dsm_module_oemof_invest.lp @@ -1,116 +1,110 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+2 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0) -+2 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) -+2 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0) ++100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) ++100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) ++100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) s.t. -c_e_BusBlock_balance(bus_elec_0)_: -+1 flow(bus_elec_demand_dsm_0) +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) = 0 -c_e_BusBlock_balance(bus_elec_1)_: -+1 flow(bus_elec_demand_dsm_1) +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) = 0 -c_e_BusBlock_balance(bus_elec_2)_: -+1 flow(bus_elec_demand_dsm_2) -= 0 - -c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(demand_dsm_0)_: -+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0) -= 0 - -c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(demand_dsm_1)_: -+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) +c_e_BusBlock_balance(bus_elec_0_2)_: ++1 flow(bus_elec_demand_dsm_0_2) = 0 -c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(demand_dsm_2)_: -+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) -= 0 +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_0)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_0) += 50 -c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_0)_: -+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0) +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_0_0)_: +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0) -1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0) --1 SinkDSMOemofInvestmentBlock_invest(demand_dsm) -+1 flow(bus_elec_demand_dsm_0) -= 50 ++1 flow(bus_elec_demand_dsm_0_0) += 1 -c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_1)_: -+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) -+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_0_1)_: -1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1) --1 SinkDSMOemofInvestmentBlock_invest(demand_dsm) -+1 flow(bus_elec_demand_dsm_1) -= 50 ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) += 1 -c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_2)_: -+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) -+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_0_2)_: -1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_2) --1 SinkDSMOemofInvestmentBlock_invest(demand_dsm) -+1 flow(bus_elec_demand_dsm_2) -= 50 ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_0_2) += 1 -c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0)_: +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0_0)_: +1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0) --0.5 SinkDSMOemofInvestmentBlock_invest(demand_dsm) -<= 25 +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_1)_: +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0_1)_: +1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1) --0.40000000000000002 SinkDSMOemofInvestmentBlock_invest(demand_dsm) -<= 20 +-0.4 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_2)_: +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0_2)_: +1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_2) --0.5 SinkDSMOemofInvestmentBlock_invest(demand_dsm) -<= 25 +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_0)_: -+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0) +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_0_0)_: +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0) --0.5 SinkDSMOemofInvestmentBlock_invest(demand_dsm) -<= 25 ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_1)_: -+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_0_1)_: +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) --0.40000000000000002 SinkDSMOemofInvestmentBlock_invest(demand_dsm) -<= 20 ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) +-0.4 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +<= 0 -c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_2)_: -+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_0_2)_: +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) --0.5 SinkDSMOemofInvestmentBlock_invest(demand_dsm) -<= 25 ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +<= 0 c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_0)_: -1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0) --1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) +1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0) +1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) = 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(bus_elec_demand_dsm_0) <= +inf - 0 <= flow(bus_elec_demand_dsm_1) <= +inf - 0 <= flow(bus_elec_demand_dsm_2) <= +inf - 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm) <= 100 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0) <= +inf - 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) <= +inf - 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) <= +inf 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0) <= +inf - 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) <= +inf - 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) <= +inf 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0) <= +inf 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) <= +inf 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_0) <= +inf + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_0) <= 100 end diff --git a/tests/lp_files/dsm_module_oemof_invest_multi_period.lp b/tests/lp_files/dsm_module_oemof_invest_multi_period.lp new file mode 100644 index 000000000..016b262d0 --- /dev/null +++ b/tests/lp_files/dsm_module_oemof_invest_multi_period.lp @@ -0,0 +1,301 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++15992.031251718836 ONE_VAR_CONSTANT ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0) ++100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) ++100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) ++0.9803921568627451 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_2) ++0.9803921568627451 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) ++98.0392156862745 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) ++0.9803921568627451 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_3) ++0.9803921568627451 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_3) ++98.0392156862745 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_3) ++0.9611687812379853 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_4) ++0.9611687812379853 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_4) ++96.11687812379853 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_4) ++0.9611687812379853 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_5) ++0.9611687812379853 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_5) ++96.11687812379853 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_5) ++455.88267648036174 SinkDSMOemofInvestmentBlock_invest(demand_dsm_0) ++440.53147366914004 SinkDSMOemofInvestmentBlock_invest(demand_dsm_1) ++425.7302732994234 SinkDSMOemofInvestmentBlock_invest(demand_dsm_2) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_1_2)_: ++1 flow(bus_elec_demand_dsm_1_2) += 0 + +c_e_BusBlock_balance(bus_elec_1_3)_: ++1 flow(bus_elec_demand_dsm_1_3) += 0 + +c_e_BusBlock_balance(bus_elec_2_4)_: ++1 flow(bus_elec_demand_dsm_2_4) += 0 + +c_e_BusBlock_balance(bus_elec_2_5)_: ++1 flow(bus_elec_demand_dsm_2_5) += 0 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_0)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) += 50 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_1)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_1) +-1 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_1) ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_2)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_2) +-1 SinkDSMOemofInvestmentBlock_total(demand_dsm_1) ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_2) ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(demand_dsm_0)_: ++1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_0) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(demand_dsm_1)_: ++1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(demand_dsm_2)_: ++1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_0)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_0) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_1)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_2)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_0)_: +-1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_0) +-1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_0) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_1)_: ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_1) +-1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_1) +-1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_2)_: ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_2) +-1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_2) +-1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0) +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0) ++1 flow(bus_elec_demand_dsm_0_0) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_0_1)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_1_2)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_1_2) += 2 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_1_3)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_3) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_3) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_3) ++1 flow(bus_elec_demand_dsm_1_3) += 2 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_2_4)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_4) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_4) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_4) ++1 flow(bus_elec_demand_dsm_2_4) += 3 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_2_5)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_5) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_5) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_5) ++1 flow(bus_elec_demand_dsm_2_5) += 3 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0_1)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1) +-0.4 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_1_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_2) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_1_3)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_3) +-0.3 SinkDSMOemofInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_2_4)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_4) +-0.3 SinkDSMOemofInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_2_5)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_5) +-0.3 SinkDSMOemofInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_0_1)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) +-0.4 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_1_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_1_3)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_3) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_3) +-0.3 SinkDSMOemofInvestmentBlock_total(demand_dsm_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_2_4)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_4) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_4) +-0.3 SinkDSMOemofInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_2_5)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_5) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_5) +-0.3 SinkDSMOemofInvestmentBlock_total(demand_dsm_2) +<= 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_0)_: +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_2) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_3) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_3) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_4)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_4) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_4) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_5) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_5) += 0 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(demand_dsm_0)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_0) +<= 1000 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(demand_dsm_1)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_1) +<= 1000 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(demand_dsm_2)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_2) +<= 1000 + +c_l_SinkDSMOemofInvestmentBlock_overall_minimum(demand_dsm)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_2) +>= 5 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_5) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_5) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_5) <= +inf + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_0) <= 100 + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_1) <= 100 + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_2) <= 100 + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_3) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_4) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_5) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_0) <= +inf +end diff --git a/tests/lp_files/dsm_module_oemof_multi_period.lp b/tests/lp_files/dsm_module_oemof_multi_period.lp new file mode 100644 index 000000000..225e20da6 --- /dev/null +++ b/tests/lp_files/dsm_module_oemof_multi_period.lp @@ -0,0 +1,204 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++2 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++2 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) ++1.9607843137254901 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++1.9607843137254901 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3) ++1.9223375624759707 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4) ++1.9223375624759707 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5) + +s.t. + +c_e_BusBlock_balance(bus_elec_0_0)_: ++1 flow(bus_elec_demand_dsm_0_0) += 0 + +c_e_BusBlock_balance(bus_elec_0_1)_: ++1 flow(bus_elec_demand_dsm_0_1) += 0 + +c_e_BusBlock_balance(bus_elec_1_2)_: ++1 flow(bus_elec_demand_dsm_1_2) += 0 + +c_e_BusBlock_balance(bus_elec_1_3)_: ++1 flow(bus_elec_demand_dsm_1_3) += 0 + +c_e_BusBlock_balance(bus_elec_2_4)_: ++1 flow(bus_elec_demand_dsm_2_4) += 0 + +c_e_BusBlock_balance(bus_elec_2_5)_: ++1 flow(bus_elec_demand_dsm_2_5) += 0 + +c_e_SinkDSMOemofBlock_shift_shed_vars(demand_dsm_0)_: ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) += 0 + +c_e_SinkDSMOemofBlock_shift_shed_vars(demand_dsm_1)_: ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) += 0 + +c_e_SinkDSMOemofBlock_shift_shed_vars(demand_dsm_2)_: ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) += 0 + +c_e_SinkDSMOemofBlock_shift_shed_vars(demand_dsm_3)_: ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3) += 0 + +c_e_SinkDSMOemofBlock_shift_shed_vars(demand_dsm_4)_: ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4) += 0 + +c_e_SinkDSMOemofBlock_shift_shed_vars(demand_dsm_5)_: ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5) += 0 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_0)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++1 flow(bus_elec_demand_dsm_0_0) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_0) += 1 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_1)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) ++1 flow(bus_elec_demand_dsm_0_1) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) += 1 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_1_2)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++1 flow(bus_elec_demand_dsm_1_2) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_2) += 1 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_1_3)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3) ++1 flow(bus_elec_demand_dsm_1_3) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3) +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_3) += 1 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_2_4)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4) ++1 flow(bus_elec_demand_dsm_2_4) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4) +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_4) += 1 + +c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_2_5)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5) ++1 flow(bus_elec_demand_dsm_2_5) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5) +-1 SinkDSMOemofBlock_dsm_up(demand_dsm_5) += 1 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_0)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_1)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) +<= 0.4 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_2)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_3)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_3) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_4)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_4) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_5)_: ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_5) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_0)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) +<= 0.5 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_1)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) +<= 0.4 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_2)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) +<= 0.5 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_3)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_4)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4) +<= 0.3 + +c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_5)_: ++1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5) ++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5) +<= 0.3 + +c_e_SinkDSMOemofBlock_dsm_sum_constraint(demand_dsm_0)_: +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_0) ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_1) += 0 + +c_e_SinkDSMOemofBlock_dsm_sum_constraint(demand_dsm_2)_: +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3) ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_2) ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_3) += 0 + +c_e_SinkDSMOemofBlock_dsm_sum_constraint(demand_dsm_4)_: +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4) +-1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5) ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_4) ++1 SinkDSMOemofBlock_dsm_up(demand_dsm_5) += 0 + +bounds + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_0) <= +inf + 0 <= flow(bus_elec_demand_dsm_0_1) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_2) <= +inf + 0 <= flow(bus_elec_demand_dsm_1_3) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_4) <= +inf + 0 <= flow(bus_elec_demand_dsm_2_5) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4) <= +inf + 0 <= SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_0) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_1) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_2) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_3) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_4) <= +inf + 0 <= SinkDSMOemofBlock_dsm_up(demand_dsm_5) <= +inf +end diff --git a/tests/lp_files/emission_budget_limit.lp b/tests/lp_files/emission_budget_limit.lp new file mode 100644 index 000000000..cbe106b68 --- /dev/null +++ b/tests/lp_files/emission_budget_limit.lp @@ -0,0 +1,38 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++0 ONE_VAR_CONSTANT + +s.t. + +c_u_integral_limit_emission_factor_constraint_: ++0.5 flow(source1_electricityBus_0_0) +-1.0 flow(source1_electricityBus_0_1) ++2.0 flow(source1_electricityBus_1_2) ++1 flow(source1_electricityBus_1_3) ++0.5 flow(source1_electricityBus_2_4) ++0.5 flow(source1_electricityBus_2_5) ++3.5 flow(source2_electricityBus_0_0) ++3.5 flow(source2_electricityBus_0_1) ++3.5 flow(source2_electricityBus_1_2) ++3.5 flow(source2_electricityBus_1_3) ++3.5 flow(source2_electricityBus_2_4) ++3.5 flow(source2_electricityBus_2_5) +<= 777 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(source1_electricityBus_0_0) <= 100 + 0 <= flow(source1_electricityBus_0_1) <= 100 + 0 <= flow(source1_electricityBus_1_2) <= 100 + 0 <= flow(source1_electricityBus_1_3) <= 100 + 0 <= flow(source1_electricityBus_2_4) <= 100 + 0 <= flow(source1_electricityBus_2_5) <= 100 + 0 <= flow(source2_electricityBus_0_0) <= 100 + 0 <= flow(source2_electricityBus_0_1) <= 100 + 0 <= flow(source2_electricityBus_1_2) <= 100 + 0 <= flow(source2_electricityBus_1_3) <= 100 + 0 <= flow(source2_electricityBus_2_4) <= 100 + 0 <= flow(source2_electricityBus_2_5) <= 100 +end diff --git a/tests/lp_files/emission_limit.lp b/tests/lp_files/emission_limit.lp index f0d01e52a..8d00d7c36 100644 --- a/tests/lp_files/emission_limit.lp +++ b/tests/lp_files/emission_limit.lp @@ -1,49 +1,47 @@ \* Source Pyomo model name=Model *\ -min +min objective: +0 ONE_VAR_CONSTANT s.t. c_u_integral_limit_emission_factor_constraint_: -+0.5 flow(source1_electricityBus_0) --1 flow(source1_electricityBus_1) -+2 flow(source1_electricityBus_2) -+3.5 flow(source2_electricityBus_0) -+3.5 flow(source2_electricityBus_1) -+3.5 flow(source2_electricityBus_2) ++0.5 flow(source1_electricityBus_0_0) +-1.0 flow(source1_electricityBus_0_1) ++2.0 flow(source1_electricityBus_0_2) ++3.5 flow(source2_electricityBus_0_0) ++3.5 flow(source2_electricityBus_0_1) ++3.5 flow(source2_electricityBus_0_2) <= 777 -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(source1_electricityBus_0) -+1 flow(source2_electricityBus_0) -+1 flow(source3_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(source1_electricityBus_0_0) ++1 flow(source2_electricityBus_0_0) ++1 flow(source3_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(source1_electricityBus_1) -+1 flow(source2_electricityBus_1) -+1 flow(source3_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(source1_electricityBus_0_1) ++1 flow(source2_electricityBus_0_1) ++1 flow(source3_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(source1_electricityBus_2) -+1 flow(source2_electricityBus_2) -+1 flow(source3_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(source1_electricityBus_0_2) ++1 flow(source2_electricityBus_0_2) ++1 flow(source3_electricityBus_0_2) = 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(source1_electricityBus_0) <= 100 - 0 <= flow(source1_electricityBus_1) <= 100 - 0 <= flow(source1_electricityBus_2) <= 100 - 0 <= flow(source2_electricityBus_0) <= 100 - 0 <= flow(source2_electricityBus_1) <= 100 - 0 <= flow(source2_electricityBus_2) <= 100 - 0 <= flow(source3_electricityBus_0) <= 100 - 0 <= flow(source3_electricityBus_1) <= 100 - 0 <= flow(source3_electricityBus_2) <= 100 + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(source1_electricityBus_0_0) <= 100 + 0 <= flow(source1_electricityBus_0_1) <= 100 + 0 <= flow(source1_electricityBus_0_2) <= 100 + 0 <= flow(source2_electricityBus_0_0) <= 100 + 0 <= flow(source2_electricityBus_0_1) <= 100 + 0 <= flow(source2_electricityBus_0_2) <= 100 + 0 <= flow(source3_electricityBus_0_0) <= 100 + 0 <= flow(source3_electricityBus_0_1) <= 100 + 0 <= flow(source3_electricityBus_0_2) <= 100 end diff --git a/tests/lp_files/emission_limit_no_error.lp b/tests/lp_files/emission_limit_no_error.lp new file mode 100644 index 000000000..564aadb05 --- /dev/null +++ b/tests/lp_files/emission_limit_no_error.lp @@ -0,0 +1,38 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++0 ONE_VAR_CONSTANT + +s.t. + +c_u_integral_limit_emission_factor_constraint_: ++0.8 flow(source1_electricityBus_0_0) ++0.8 flow(source1_electricityBus_0_1) ++0.8 flow(source1_electricityBus_0_2) +<= 777 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(source1_electricityBus_0_0) ++1 flow(source2_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(source1_electricityBus_0_1) ++1 flow(source2_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(source1_electricityBus_0_2) ++1 flow(source2_electricityBus_0_2) += 0 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(source1_electricityBus_0_0) <= 100 + 0 <= flow(source1_electricityBus_0_1) <= 100 + 0 <= flow(source1_electricityBus_0_2) <= 100 + 0 <= flow(source2_electricityBus_0_0) <= 100 + 0 <= flow(source2_electricityBus_0_1) <= 100 + 0 <= flow(source2_electricityBus_0_2) <= 100 +end diff --git a/tests/lp_files/equate_flows.lp b/tests/lp_files/equate_flows.lp index 8a84f844c..950d932e8 100644 --- a/tests/lp_files/equate_flows.lp +++ b/tests/lp_files/equate_flows.lp @@ -2,65 +2,62 @@ min objective: -+2 flow(Bus1_Sink_0) -+2 flow(Bus1_Sink_1) -+2 flow(Bus1_Sink_2) -+2 flow(Source1_Bus1_0) -+2 flow(Source1_Bus1_1) -+2 flow(Source1_Bus1_2) -+10 flow(Source2_Bus1_0) -+10 flow(Source2_Bus1_1) -+10 flow(Source2_Bus1_2) ++2 flow(Bus1_Sink_0_0) ++2 flow(Bus1_Sink_0_1) ++2 flow(Bus1_Sink_0_2) ++2 flow(Source1_Bus1_0_0) ++2 flow(Source1_Bus1_0_1) ++2 flow(Source1_Bus1_0_2) ++10 flow(Source2_Bus1_0_0) ++10 flow(Source2_Bus1_0_1) ++10 flow(Source2_Bus1_0_2) s.t. -c_e_equate_flows(0)_: --1 flow(Bus1_Sink_0) -+2 flow(Source1_Bus1_0) -+2 flow(Source2_Bus1_0) +c_e_equate_flows(0_0)_: +-1 flow(Bus1_Sink_0_0) ++2 flow(Source1_Bus1_0_0) ++2 flow(Source2_Bus1_0_0) = 0 -c_e_equate_flows(1)_: --1 flow(Bus1_Sink_1) -+2 flow(Source1_Bus1_1) -+2 flow(Source2_Bus1_1) +c_e_equate_flows(0_1)_: +-1 flow(Bus1_Sink_0_1) ++2 flow(Source1_Bus1_0_1) ++2 flow(Source2_Bus1_0_1) = 0 -c_e_equate_flows(2)_: --1 flow(Bus1_Sink_2) -+2 flow(Source1_Bus1_2) -+2 flow(Source2_Bus1_2) +c_e_equate_flows(0_2)_: +-1 flow(Bus1_Sink_0_2) ++2 flow(Source1_Bus1_0_2) ++2 flow(Source2_Bus1_0_2) = 0 -c_e_BusBlock_balance(Bus1_0)_: --1 flow(Bus1_Sink_0) -+1 flow(Source1_Bus1_0) -+1 flow(Source2_Bus1_0) +c_e_BusBlock_balance(Bus1_0_0)_: +-1 flow(Bus1_Sink_0_0) ++1 flow(Source1_Bus1_0_0) ++1 flow(Source2_Bus1_0_0) = 0 -c_e_BusBlock_balance(Bus1_1)_: --1 flow(Bus1_Sink_1) -+1 flow(Source1_Bus1_1) -+1 flow(Source2_Bus1_1) +c_e_BusBlock_balance(Bus1_0_1)_: +-1 flow(Bus1_Sink_0_1) ++1 flow(Source1_Bus1_0_1) ++1 flow(Source2_Bus1_0_1) = 0 -c_e_BusBlock_balance(Bus1_2)_: --1 flow(Bus1_Sink_2) -+1 flow(Source1_Bus1_2) -+1 flow(Source2_Bus1_2) +c_e_BusBlock_balance(Bus1_0_2)_: +-1 flow(Bus1_Sink_0_2) ++1 flow(Source1_Bus1_0_2) ++1 flow(Source2_Bus1_0_2) = 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(Bus1_Sink_0) <= 300 - 0 <= flow(Bus1_Sink_1) <= 300 - 0 <= flow(Bus1_Sink_2) <= 300 - 0 <= flow(Source1_Bus1_0) <= 400 - 0 <= flow(Source1_Bus1_1) <= 400 - 0 <= flow(Source1_Bus1_2) <= 400 - 0 <= flow(Source2_Bus1_0) <= 200 - 0 <= flow(Source2_Bus1_1) <= 200 - 0 <= flow(Source2_Bus1_2) <= 200 + 0 <= flow(Bus1_Sink_0_0) <= 300 + 0 <= flow(Bus1_Sink_0_1) <= 300 + 0 <= flow(Bus1_Sink_0_2) <= 300 + 0 <= flow(Source1_Bus1_0_0) <= 400 + 0 <= flow(Source1_Bus1_0_1) <= 400 + 0 <= flow(Source1_Bus1_0_2) <= 400 + 0 <= flow(Source2_Bus1_0_0) <= 200 + 0 <= flow(Source2_Bus1_0_1) <= 200 + 0 <= flow(Source2_Bus1_0_2) <= 200 end diff --git a/tests/lp_files/fixed_costs_sources.lp b/tests/lp_files/fixed_costs_sources.lp new file mode 100644 index 000000000..7a025ff5e --- /dev/null +++ b/tests/lp_files/fixed_costs_sources.lp @@ -0,0 +1,91 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++648.0124531935758 ONE_VAR_CONSTANT ++25 flow(pv_forever_electricityBus_0_0) ++25 flow(pv_forever_electricityBus_0_1) ++24.509803921568626 flow(pv_forever_electricityBus_1_2) ++24.509803921568626 flow(pv_forever_electricityBus_1_3) ++24.029219530949632 flow(pv_forever_electricityBus_2_4) ++24.029219530949632 flow(pv_forever_electricityBus_2_5) ++25 flow(pv_with_lifetime_electricityBus_0_0) ++25 flow(pv_with_lifetime_electricityBus_0_1) ++24.509803921568626 flow(pv_with_lifetime_electricityBus_1_2) ++24.509803921568626 flow(pv_with_lifetime_electricityBus_1_3) ++24.029219530949632 flow(pv_with_lifetime_electricityBus_2_4) ++24.029219530949632 flow(pv_with_lifetime_electricityBus_2_5) ++25 flow(pv_with_lifetime_and_age_electricityBus_0_0) ++25 flow(pv_with_lifetime_and_age_electricityBus_0_1) ++24.509803921568626 flow(pv_with_lifetime_and_age_electricityBus_1_2) ++24.509803921568626 flow(pv_with_lifetime_and_age_electricityBus_1_3) ++24.029219530949632 flow(pv_with_lifetime_and_age_electricityBus_2_4) ++24.029219530949632 flow(pv_with_lifetime_and_age_electricityBus_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(pv_forever_electricityBus_0_0) ++1 flow(pv_with_lifetime_electricityBus_0_0) ++1 flow(pv_with_lifetime_and_age_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(pv_forever_electricityBus_0_1) ++1 flow(pv_with_lifetime_electricityBus_0_1) ++1 flow(pv_with_lifetime_and_age_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(pv_forever_electricityBus_1_2) ++1 flow(pv_with_lifetime_electricityBus_1_2) ++1 flow(pv_with_lifetime_and_age_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(pv_forever_electricityBus_1_3) ++1 flow(pv_with_lifetime_electricityBus_1_3) ++1 flow(pv_with_lifetime_and_age_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(pv_forever_electricityBus_2_4) ++1 flow(pv_with_lifetime_electricityBus_2_4) ++1 flow(pv_with_lifetime_and_age_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(pv_forever_electricityBus_2_5) ++1 flow(pv_with_lifetime_electricityBus_2_5) ++1 flow(pv_with_lifetime_and_age_electricityBus_2_5) += 0 + +c_e_SimpleFlowBlock_lifetime_age_output(pv_with_lifetime_and_age_electricityBus_2_4)_: ++1 flow(pv_with_lifetime_and_age_electricityBus_2_4) += 0 + +c_e_SimpleFlowBlock_lifetime_age_output(pv_with_lifetime_and_age_electricityBus_2_5)_: ++1 flow(pv_with_lifetime_and_age_electricityBus_2_5) += 0 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(pv_forever_electricityBus_0_0) <= 8.0 + 0 <= flow(pv_forever_electricityBus_0_1) <= 8.0 + 0 <= flow(pv_forever_electricityBus_1_2) <= 8.0 + 0 <= flow(pv_forever_electricityBus_1_3) <= 8.0 + 0 <= flow(pv_forever_electricityBus_2_4) <= 8.0 + 0 <= flow(pv_forever_electricityBus_2_5) <= 8.0 + 0 <= flow(pv_with_lifetime_electricityBus_0_0) <= 8.0 + 0 <= flow(pv_with_lifetime_electricityBus_0_1) <= 8.0 + 0 <= flow(pv_with_lifetime_electricityBus_1_2) <= 8.0 + 0 <= flow(pv_with_lifetime_electricityBus_1_3) <= 8.0 + 0 <= flow(pv_with_lifetime_electricityBus_2_4) <= 8.0 + 0 <= flow(pv_with_lifetime_electricityBus_2_5) <= 8.0 + 0 <= flow(pv_with_lifetime_and_age_electricityBus_0_0) <= 8.0 + 0 <= flow(pv_with_lifetime_and_age_electricityBus_0_1) <= 8.0 + 0 <= flow(pv_with_lifetime_and_age_electricityBus_1_2) <= 8.0 + 0 <= flow(pv_with_lifetime_and_age_electricityBus_1_3) <= 8.0 + 0 <= flow(pv_with_lifetime_and_age_electricityBus_2_4) <= 8.0 + 0 <= flow(pv_with_lifetime_and_age_electricityBus_2_5) <= 8.0 +end diff --git a/tests/lp_files/fixed_source_invest_sink.lp b/tests/lp_files/fixed_source_invest_sink.lp index 225bacc9c..7e36eb90b 100644 --- a/tests/lp_files/fixed_source_invest_sink.lp +++ b/tests/lp_files/fixed_source_invest_sink.lp @@ -2,53 +2,56 @@ min objective: -+500 InvestmentFlowBlock_invest(electricityBus_excess) -+25 flow(electricityBus_excess_0) -+25 flow(electricityBus_excess_1) -+25 flow(electricityBus_excess_2) ++500 InvestmentFlowBlock_invest(electricityBus_excess_0) ++25 flow(electricityBus_excess_0_0) ++25 flow(electricityBus_excess_0_1) ++25 flow(electricityBus_excess_0_2) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_excess_0) -= -12000000 +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_excess_0_0) += -12000000.0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_excess_1) -= -16000000 +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_excess_0_1) += -16000000.0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_excess_2) -= -14000000 +c_e_BusBlock_balance(electricityBus_0_2)_: +-1 flow(electricityBus_excess_0_2) += -14000000.0 -c_u_InvestmentFlowBlock_max(electricityBus_excess_0)_: --0.80000000000000004 InvestmentFlowBlock_invest(electricityBus_excess) -+1 flow(electricityBus_excess_0) -<= 40 +c_e_InvestmentFlowBlock_total_rule(electricityBus_excess_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_excess_0) ++1 InvestmentFlowBlock_total(electricityBus_excess_0) += 50 -c_u_InvestmentFlowBlock_max(electricityBus_excess_1)_: --0.80000000000000004 InvestmentFlowBlock_invest(electricityBus_excess) -+1 flow(electricityBus_excess_1) -<= 40 +c_u_InvestmentFlowBlock_max(electricityBus_excess_0_0)_: ++1 flow(electricityBus_excess_0_0) +-0.8 InvestmentFlowBlock_total(electricityBus_excess_0) +<= 0 -c_u_InvestmentFlowBlock_max(electricityBus_excess_2)_: --0.80000000000000004 InvestmentFlowBlock_invest(electricityBus_excess) -+1 flow(electricityBus_excess_2) -<= 40 +c_u_InvestmentFlowBlock_max(electricityBus_excess_0_1)_: ++1 flow(electricityBus_excess_0_1) +-0.8 InvestmentFlowBlock_total(electricityBus_excess_0) +<= 0 -c_u_InvestmentFlowBlock_full_load_time_max(electricityBus_excess)_: --2.2999999999999998 InvestmentFlowBlock_invest(electricityBus_excess) -+1 flow(electricityBus_excess_0) -+1 flow(electricityBus_excess_1) -+1 flow(electricityBus_excess_2) -<= 114.99999999999999 +c_u_InvestmentFlowBlock_max(electricityBus_excess_0_2)_: ++1 flow(electricityBus_excess_0_2) +-0.8 InvestmentFlowBlock_total(electricityBus_excess_0) +<= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 +c_u_InvestmentFlowBlock_full_load_time_max(electricityBus_excess)_: ++1 flow(electricityBus_excess_0_0) ++1 flow(electricityBus_excess_0_1) ++1 flow(electricityBus_excess_0_2) +-2.3 InvestmentFlowBlock_total(electricityBus_excess_0) +<= 0 bounds - 0 <= flow(electricityBus_excess_0) <= +inf - 0 <= flow(electricityBus_excess_1) <= +inf - 0 <= flow(electricityBus_excess_2) <= +inf - 0 <= InvestmentFlowBlock_invest(electricityBus_excess) <= 1000000 + 0 <= InvestmentFlowBlock_invest(electricityBus_excess_0) <= 1000000.0 + 0 <= flow(electricityBus_excess_0_0) <= +inf + 0 <= flow(electricityBus_excess_0_1) <= +inf + 0 <= flow(electricityBus_excess_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_excess_0) <= +inf end diff --git a/tests/lp_files/fixed_source_invest_sink_multi_period.lp b/tests/lp_files/fixed_source_invest_sink_multi_period.lp new file mode 100644 index 000000000..bbfaa46fb --- /dev/null +++ b/tests/lp_files/fixed_source_invest_sink_multi_period.lp @@ -0,0 +1,166 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++611.5671812529034 InvestmentFlowBlock_invest(electricityBus_excess_0) ++599.5756678950033 InvestmentFlowBlock_invest(electricityBus_excess_1) ++587.8192822500032 InvestmentFlowBlock_invest(electricityBus_excess_2) ++25 flow(electricityBus_excess_0_0) ++25 flow(electricityBus_excess_0_1) ++24.509803921568626 flow(electricityBus_excess_1_2) ++24.509803921568626 flow(electricityBus_excess_1_3) ++24.029219530949632 flow(electricityBus_excess_2_4) ++24.029219530949632 flow(electricityBus_excess_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_excess_0_0) += -12000000.0 + +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_excess_0_1) += -16000000.0 + +c_e_BusBlock_balance(electricityBus_1_2)_: +-1 flow(electricityBus_excess_1_2) += -14000000.0 + +c_e_BusBlock_balance(electricityBus_1_3)_: +-1 flow(electricityBus_excess_1_3) += -18000000.0 + +c_e_BusBlock_balance(electricityBus_2_4)_: +-1 flow(electricityBus_excess_2_4) += -18000000.0 + +c_e_BusBlock_balance(electricityBus_2_5)_: +-1 flow(electricityBus_excess_2_5) += -18000000.0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_excess_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_excess_0) ++1 InvestmentFlowBlock_total(electricityBus_excess_0) += 50 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_excess_1)_: +-1 InvestmentFlowBlock_invest(electricityBus_excess_1) +-1 InvestmentFlowBlock_total(electricityBus_excess_0) ++1 InvestmentFlowBlock_total(electricityBus_excess_1) ++1 InvestmentFlowBlock_old(electricityBus_excess_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_excess_2)_: +-1 InvestmentFlowBlock_invest(electricityBus_excess_2) +-1 InvestmentFlowBlock_total(electricityBus_excess_1) ++1 InvestmentFlowBlock_total(electricityBus_excess_2) ++1 InvestmentFlowBlock_old(electricityBus_excess_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_excess_0)_: ++1 InvestmentFlowBlock_old_end(electricityBus_excess_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_excess_1)_: ++1 InvestmentFlowBlock_old_end(electricityBus_excess_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_excess_2)_: ++1 InvestmentFlowBlock_old_end(electricityBus_excess_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_excess_0)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_excess_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_excess_1)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_excess_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_excess_2)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_excess_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_excess_0)_: +-1 InvestmentFlowBlock_old_end(electricityBus_excess_0) +-1 InvestmentFlowBlock_old_exo(electricityBus_excess_0) ++1 InvestmentFlowBlock_old(electricityBus_excess_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_excess_1)_: ++1 InvestmentFlowBlock_old(electricityBus_excess_1) +-1 InvestmentFlowBlock_old_end(electricityBus_excess_1) +-1 InvestmentFlowBlock_old_exo(electricityBus_excess_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_excess_2)_: ++1 InvestmentFlowBlock_old(electricityBus_excess_2) +-1 InvestmentFlowBlock_old_end(electricityBus_excess_2) +-1 InvestmentFlowBlock_old_exo(electricityBus_excess_2) += 0 + +c_u_InvestmentFlowBlock_max(electricityBus_excess_0_0)_: ++1 flow(electricityBus_excess_0_0) +-0.8 InvestmentFlowBlock_total(electricityBus_excess_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_excess_0_1)_: ++1 flow(electricityBus_excess_0_1) +-0.8 InvestmentFlowBlock_total(electricityBus_excess_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_excess_1_2)_: ++1 flow(electricityBus_excess_1_2) +-0.8 InvestmentFlowBlock_total(electricityBus_excess_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_excess_1_3)_: ++1 flow(electricityBus_excess_1_3) +-0.8 InvestmentFlowBlock_total(electricityBus_excess_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_excess_2_4)_: ++1 flow(electricityBus_excess_2_4) +-0.8 InvestmentFlowBlock_total(electricityBus_excess_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_excess_2_5)_: ++1 flow(electricityBus_excess_2_5) +-0.8 InvestmentFlowBlock_total(electricityBus_excess_2) +<= 0 + +c_u_InvestmentFlowBlock_full_load_time_max(electricityBus_excess)_: ++1 flow(electricityBus_excess_0_0) ++1 flow(electricityBus_excess_0_1) ++1 flow(electricityBus_excess_1_2) ++1 flow(electricityBus_excess_1_3) ++1 flow(electricityBus_excess_2_4) ++1 flow(electricityBus_excess_2_5) +-2.3 InvestmentFlowBlock_total(electricityBus_excess_0) +-2.3 InvestmentFlowBlock_total(electricityBus_excess_1) +-2.3 InvestmentFlowBlock_total(electricityBus_excess_2) +<= 0.0 + +bounds + 0 <= InvestmentFlowBlock_invest(electricityBus_excess_0) <= 1000000.0 + 0 <= InvestmentFlowBlock_invest(electricityBus_excess_1) <= 1000000.0 + 0 <= InvestmentFlowBlock_invest(electricityBus_excess_2) <= 1000000.0 + 0 <= flow(electricityBus_excess_0_0) <= +inf + 0 <= flow(electricityBus_excess_0_1) <= +inf + 0 <= flow(electricityBus_excess_1_2) <= +inf + 0 <= flow(electricityBus_excess_1_3) <= +inf + 0 <= flow(electricityBus_excess_2_4) <= +inf + 0 <= flow(electricityBus_excess_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_excess_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_excess_1) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_excess_1) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_excess_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_excess_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_excess_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_excess_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_excess_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_excess_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_excess_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_excess_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_excess_0) <= +inf +end diff --git a/tests/lp_files/fixed_source_variable_sink.lp b/tests/lp_files/fixed_source_variable_sink.lp index 18a3dc979..064e7f06a 100644 --- a/tests/lp_files/fixed_source_variable_sink.lp +++ b/tests/lp_files/fixed_source_variable_sink.lp @@ -1,30 +1,27 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+40 flow(electricityBus_excess_0) -+40 flow(electricityBus_excess_1) -+40 flow(electricityBus_excess_2) ++40 flow(electricityBus_excess_0_0) ++40 flow(electricityBus_excess_0_1) ++40 flow(electricityBus_excess_0_2) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_excess_0) -= -430000 +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_excess_0_0) += -430000.0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_excess_1) -= -720000 +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_excess_0_1) += -720000.0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_excess_2) -= -290000 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 +c_e_BusBlock_balance(electricityBus_0_2)_: +-1 flow(electricityBus_excess_0_2) += -290000.0 bounds - 0 <= flow(electricityBus_excess_0) <= +inf - 0 <= flow(electricityBus_excess_1) <= +inf - 0 <= flow(electricityBus_excess_2) <= +inf + 0 <= flow(electricityBus_excess_0_0) <= +inf + 0 <= flow(electricityBus_excess_0_1) <= +inf + 0 <= flow(electricityBus_excess_0_2) <= +inf end diff --git a/tests/lp_files/fixed_source_variable_sink_multi_period.lp b/tests/lp_files/fixed_source_variable_sink_multi_period.lp new file mode 100644 index 000000000..f86665232 --- /dev/null +++ b/tests/lp_files/fixed_source_variable_sink_multi_period.lp @@ -0,0 +1,45 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++40 flow(electricityBus_excess_0_0) ++40 flow(electricityBus_excess_0_1) ++39.2156862745098 flow(electricityBus_excess_1_2) ++39.2156862745098 flow(electricityBus_excess_1_3) ++38.446751249519416 flow(electricityBus_excess_2_4) ++38.446751249519416 flow(electricityBus_excess_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_excess_0_0) += -430000.0 + +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_excess_0_1) += -720000.0 + +c_e_BusBlock_balance(electricityBus_1_2)_: +-1 flow(electricityBus_excess_1_2) += -290000.0 + +c_e_BusBlock_balance(electricityBus_1_3)_: +-1 flow(electricityBus_excess_1_3) += -330000.0 + +c_e_BusBlock_balance(electricityBus_2_4)_: +-1 flow(electricityBus_excess_2_4) += -330000.0 + +c_e_BusBlock_balance(electricityBus_2_5)_: +-1 flow(electricityBus_excess_2_5) += -330000.0 + +bounds + 0 <= flow(electricityBus_excess_0_0) <= +inf + 0 <= flow(electricityBus_excess_0_1) <= +inf + 0 <= flow(electricityBus_excess_1_2) <= +inf + 0 <= flow(electricityBus_excess_1_3) <= +inf + 0 <= flow(electricityBus_excess_2_4) <= +inf + 0 <= flow(electricityBus_excess_2_5) <= +inf +end diff --git a/tests/lp_files/flow_count_limit.lp b/tests/lp_files/flow_count_limit.lp index 65eebeb0d..b4e80d20e 100644 --- a/tests/lp_files/flow_count_limit.lp +++ b/tests/lp_files/flow_count_limit.lp @@ -1,6 +1,6 @@ \* Source Pyomo model name=Model *\ -min +min objective: +0 ONE_VAR_CONSTANT @@ -24,25 +24,25 @@ c_e_emission_factor_constraint(2)_: -1 emission_factor(2) = 0 -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(source1_electricityBus_0) -+1 flow(source2_electricityBus_0) -+1 flow(source3_electricityBus_0) -+1 flow(source4_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(source4_electricityBus_0_0) ++1 flow(source2_electricityBus_0_0) ++1 flow(source1_electricityBus_0_0) ++1 flow(source3_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(source1_electricityBus_1) -+1 flow(source2_electricityBus_1) -+1 flow(source3_electricityBus_1) -+1 flow(source4_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(source4_electricityBus_0_1) ++1 flow(source2_electricityBus_0_1) ++1 flow(source1_electricityBus_0_1) ++1 flow(source3_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(source1_electricityBus_2) -+1 flow(source2_electricityBus_2) -+1 flow(source3_electricityBus_2) -+1 flow(source4_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(source4_electricityBus_0_2) ++1 flow(source2_electricityBus_0_2) ++1 flow(source1_electricityBus_0_2) ++1 flow(source3_electricityBus_0_2) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(source1_electricityBus_0)_: @@ -60,6 +60,21 @@ c_e_NonConvexFlowBlock_status_nominal_constraint(source1_electricityBus_2)_: +1 NonConvexFlowBlock_status_nominal(source1_electricityBus_2) = 0 +c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_0)_: ++1 NonConvexFlowBlock_status_nominal(source3_electricityBus_0) +-100 NonConvexFlowBlock_status(source3_electricityBus_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_1)_: ++1 NonConvexFlowBlock_status_nominal(source3_electricityBus_1) +-100 NonConvexFlowBlock_status(source3_electricityBus_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_2)_: ++1 NonConvexFlowBlock_status_nominal(source3_electricityBus_2) +-100 NonConvexFlowBlock_status(source3_electricityBus_2) += 0 + c_e_NonConvexFlowBlock_status_nominal_constraint(source2_electricityBus_0)_: -100 NonConvexFlowBlock_status(source2_electricityBus_0) +1 NonConvexFlowBlock_status_nominal(source2_electricityBus_0) @@ -75,145 +90,128 @@ c_e_NonConvexFlowBlock_status_nominal_constraint(source2_electricityBus_2)_: +1 NonConvexFlowBlock_status_nominal(source2_electricityBus_2) = 0 -c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_0)_: --100 NonConvexFlowBlock_status(source3_electricityBus_0) -+1 NonConvexFlowBlock_status_nominal(source3_electricityBus_0) -= 0 - -c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_1)_: --100 NonConvexFlowBlock_status(source3_electricityBus_1) -+1 NonConvexFlowBlock_status_nominal(source3_electricityBus_1) -= 0 - -c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_2)_: --100 NonConvexFlowBlock_status(source3_electricityBus_2) -+1 NonConvexFlowBlock_status_nominal(source3_electricityBus_2) -= 0 - -c_l_NonConvexFlowBlock_min(source1_electricityBus_0)_: -+1 flow(source1_electricityBus_0) ->= 0 +c_u_NonConvexFlowBlock_min(source1_electricityBus_0_0)_: +-1 flow(source1_electricityBus_0_0) +<= 0 -c_l_NonConvexFlowBlock_min(source1_electricityBus_1)_: -+1 flow(source1_electricityBus_1) ->= 0 +c_u_NonConvexFlowBlock_min(source1_electricityBus_0_1)_: +-1 flow(source1_electricityBus_0_1) +<= 0 -c_l_NonConvexFlowBlock_min(source1_electricityBus_2)_: -+1 flow(source1_electricityBus_2) ->= 0 +c_u_NonConvexFlowBlock_min(source1_electricityBus_0_2)_: +-1 flow(source1_electricityBus_0_2) +<= 0 -c_l_NonConvexFlowBlock_min(source2_electricityBus_0)_: -+1 flow(source2_electricityBus_0) ->= 0 +c_u_NonConvexFlowBlock_min(source3_electricityBus_0_0)_: +-1 flow(source3_electricityBus_0_0) +<= 0 -c_l_NonConvexFlowBlock_min(source2_electricityBus_1)_: -+1 flow(source2_electricityBus_1) ->= 0 +c_u_NonConvexFlowBlock_min(source3_electricityBus_0_1)_: +-1 flow(source3_electricityBus_0_1) +<= 0 -c_l_NonConvexFlowBlock_min(source2_electricityBus_2)_: -+1 flow(source2_electricityBus_2) ->= 0 +c_u_NonConvexFlowBlock_min(source3_electricityBus_0_2)_: +-1 flow(source3_electricityBus_0_2) +<= 0 -c_l_NonConvexFlowBlock_min(source3_electricityBus_0)_: -+1 flow(source3_electricityBus_0) ->= 0 +c_u_NonConvexFlowBlock_min(source2_electricityBus_0_0)_: +-1 flow(source2_electricityBus_0_0) +<= 0 -c_l_NonConvexFlowBlock_min(source3_electricityBus_1)_: -+1 flow(source3_electricityBus_1) ->= 0 +c_u_NonConvexFlowBlock_min(source2_electricityBus_0_1)_: +-1 flow(source2_electricityBus_0_1) +<= 0 -c_l_NonConvexFlowBlock_min(source3_electricityBus_2)_: -+1 flow(source3_electricityBus_2) ->= 0 +c_u_NonConvexFlowBlock_min(source2_electricityBus_0_2)_: +-1 flow(source2_electricityBus_0_2) +<= 0 -c_u_NonConvexFlowBlock_max(source1_electricityBus_0)_: +c_u_NonConvexFlowBlock_max(source1_electricityBus_0_0)_: ++1 flow(source1_electricityBus_0_0) -1 NonConvexFlowBlock_status_nominal(source1_electricityBus_0) -+1 flow(source1_electricityBus_0) <= 0 -c_u_NonConvexFlowBlock_max(source1_electricityBus_1)_: +c_u_NonConvexFlowBlock_max(source1_electricityBus_0_1)_: ++1 flow(source1_electricityBus_0_1) -1 NonConvexFlowBlock_status_nominal(source1_electricityBus_1) -+1 flow(source1_electricityBus_1) <= 0 -c_u_NonConvexFlowBlock_max(source1_electricityBus_2)_: +c_u_NonConvexFlowBlock_max(source1_electricityBus_0_2)_: ++1 flow(source1_electricityBus_0_2) -1 NonConvexFlowBlock_status_nominal(source1_electricityBus_2) -+1 flow(source1_electricityBus_2) <= 0 -c_u_NonConvexFlowBlock_max(source2_electricityBus_0)_: --1 NonConvexFlowBlock_status_nominal(source2_electricityBus_0) -+1 flow(source2_electricityBus_0) +c_u_NonConvexFlowBlock_max(source3_electricityBus_0_0)_: ++1 flow(source3_electricityBus_0_0) +-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_0) <= 0 -c_u_NonConvexFlowBlock_max(source2_electricityBus_1)_: --1 NonConvexFlowBlock_status_nominal(source2_electricityBus_1) -+1 flow(source2_electricityBus_1) +c_u_NonConvexFlowBlock_max(source3_electricityBus_0_1)_: ++1 flow(source3_electricityBus_0_1) +-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_1) <= 0 -c_u_NonConvexFlowBlock_max(source2_electricityBus_2)_: --1 NonConvexFlowBlock_status_nominal(source2_electricityBus_2) -+1 flow(source2_electricityBus_2) +c_u_NonConvexFlowBlock_max(source3_electricityBus_0_2)_: ++1 flow(source3_electricityBus_0_2) +-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_2) <= 0 -c_u_NonConvexFlowBlock_max(source3_electricityBus_0)_: --1 NonConvexFlowBlock_status_nominal(source3_electricityBus_0) -+1 flow(source3_electricityBus_0) +c_u_NonConvexFlowBlock_max(source2_electricityBus_0_0)_: ++1 flow(source2_electricityBus_0_0) +-1 NonConvexFlowBlock_status_nominal(source2_electricityBus_0) <= 0 -c_u_NonConvexFlowBlock_max(source3_electricityBus_1)_: --1 NonConvexFlowBlock_status_nominal(source3_electricityBus_1) -+1 flow(source3_electricityBus_1) +c_u_NonConvexFlowBlock_max(source2_electricityBus_0_1)_: ++1 flow(source2_electricityBus_0_1) +-1 NonConvexFlowBlock_status_nominal(source2_electricityBus_1) <= 0 -c_u_NonConvexFlowBlock_max(source3_electricityBus_2)_: --1 NonConvexFlowBlock_status_nominal(source3_electricityBus_2) -+1 flow(source3_electricityBus_2) +c_u_NonConvexFlowBlock_max(source2_electricityBus_0_2)_: ++1 flow(source2_electricityBus_0_2) +-1 NonConvexFlowBlock_status_nominal(source2_electricityBus_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(source1_electricityBus_0) <= 100 - 0 <= flow(source1_electricityBus_1) <= 100 - 0 <= flow(source1_electricityBus_2) <= 100 - 0 <= flow(source2_electricityBus_0) <= 100 - 0 <= flow(source2_electricityBus_1) <= 100 - 0 <= flow(source2_electricityBus_2) <= 100 - 0 <= flow(source3_electricityBus_0) <= 100 - 0 <= flow(source3_electricityBus_1) <= 100 - 0 <= flow(source3_electricityBus_2) <= 100 - 30 <= flow(source4_electricityBus_0) <= 100 - 30 <= flow(source4_electricityBus_1) <= 100 - 30 <= flow(source4_electricityBus_2) <= 100 - 1 <= emission_factor(0) <= 2 - 1 <= emission_factor(1) <= 2 - 1 <= emission_factor(2) <= 2 + 1 <= ONE_VAR_CONSTANT <= 1 0 <= NonConvexFlowBlock_status(source1_electricityBus_0) <= 1 - 0 <= NonConvexFlowBlock_status(source1_electricityBus_1) <= 1 - 0 <= NonConvexFlowBlock_status(source1_electricityBus_2) <= 1 0 <= NonConvexFlowBlock_status(source2_electricityBus_0) <= 1 + 1 <= emission_factor(0) <= 2 + 0 <= NonConvexFlowBlock_status(source1_electricityBus_1) <= 1 0 <= NonConvexFlowBlock_status(source2_electricityBus_1) <= 1 + 1 <= emission_factor(1) <= 2 + 0 <= NonConvexFlowBlock_status(source1_electricityBus_2) <= 1 0 <= NonConvexFlowBlock_status(source2_electricityBus_2) <= 1 - 0 <= NonConvexFlowBlock_status(source3_electricityBus_0) <= 1 - 0 <= NonConvexFlowBlock_status(source3_electricityBus_1) <= 1 - 0 <= NonConvexFlowBlock_status(source3_electricityBus_2) <= 1 + 1 <= emission_factor(2) <= 2 + 30.0 <= flow(source4_electricityBus_0_0) <= 100 + 0 <= flow(source2_electricityBus_0_0) <= 100 + 0 <= flow(source1_electricityBus_0_0) <= 100 + 0 <= flow(source3_electricityBus_0_0) <= 100 + 30.0 <= flow(source4_electricityBus_0_1) <= 100 + 0 <= flow(source2_electricityBus_0_1) <= 100 + 0 <= flow(source1_electricityBus_0_1) <= 100 + 0 <= flow(source3_electricityBus_0_1) <= 100 + 30.0 <= flow(source4_electricityBus_0_2) <= 100 + 0 <= flow(source2_electricityBus_0_2) <= 100 + 0 <= flow(source1_electricityBus_0_2) <= 100 + 0 <= flow(source3_electricityBus_0_2) <= 100 0 <= NonConvexFlowBlock_status_nominal(source1_electricityBus_0) <= +inf 0 <= NonConvexFlowBlock_status_nominal(source1_electricityBus_1) <= +inf 0 <= NonConvexFlowBlock_status_nominal(source1_electricityBus_2) <= +inf - 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_0) <= +inf - 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_1) <= +inf - 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_2) <= +inf 0 <= NonConvexFlowBlock_status_nominal(source3_electricityBus_0) <= +inf + 0 <= NonConvexFlowBlock_status(source3_electricityBus_0) <= 1 0 <= NonConvexFlowBlock_status_nominal(source3_electricityBus_1) <= +inf + 0 <= NonConvexFlowBlock_status(source3_electricityBus_1) <= 1 0 <= NonConvexFlowBlock_status_nominal(source3_electricityBus_2) <= +inf + 0 <= NonConvexFlowBlock_status(source3_electricityBus_2) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_0) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_1) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_2) <= +inf binary NonConvexFlowBlock_status(source1_electricityBus_0) - NonConvexFlowBlock_status(source1_electricityBus_1) - NonConvexFlowBlock_status(source1_electricityBus_2) NonConvexFlowBlock_status(source2_electricityBus_0) + NonConvexFlowBlock_status(source1_electricityBus_1) NonConvexFlowBlock_status(source2_electricityBus_1) + NonConvexFlowBlock_status(source1_electricityBus_2) NonConvexFlowBlock_status(source2_electricityBus_2) NonConvexFlowBlock_status(source3_electricityBus_0) NonConvexFlowBlock_status(source3_electricityBus_1) diff --git a/tests/lp_files/flow_count_limit_multi_period.lp b/tests/lp_files/flow_count_limit_multi_period.lp new file mode 100644 index 000000000..3532a0b18 --- /dev/null +++ b/tests/lp_files/flow_count_limit_multi_period.lp @@ -0,0 +1,378 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++0 ONE_VAR_CONSTANT + +s.t. + +c_e_emission_factor_constraint(0)_: ++1 NonConvexFlowBlock_status(source1_electricityBus_0) ++1 NonConvexFlowBlock_status(source2_electricityBus_0) +-1 emission_factor(0) += 0 + +c_e_emission_factor_constraint(1)_: ++1 NonConvexFlowBlock_status(source1_electricityBus_1) ++1 NonConvexFlowBlock_status(source2_electricityBus_1) +-1 emission_factor(1) += 0 + +c_e_emission_factor_constraint(2)_: ++1 NonConvexFlowBlock_status(source1_electricityBus_2) ++1 NonConvexFlowBlock_status(source2_electricityBus_2) +-1 emission_factor(2) += 0 + +c_e_emission_factor_constraint(3)_: ++1 NonConvexFlowBlock_status(source1_electricityBus_3) ++1 NonConvexFlowBlock_status(source2_electricityBus_3) +-1 emission_factor(3) += 0 + +c_e_emission_factor_constraint(4)_: ++1 NonConvexFlowBlock_status(source1_electricityBus_4) ++1 NonConvexFlowBlock_status(source2_electricityBus_4) +-1 emission_factor(4) += 0 + +c_e_emission_factor_constraint(5)_: ++1 NonConvexFlowBlock_status(source1_electricityBus_5) ++1 NonConvexFlowBlock_status(source2_electricityBus_5) +-1 emission_factor(5) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source1_electricityBus_0)_: +-100 NonConvexFlowBlock_status(source1_electricityBus_0) ++1 NonConvexFlowBlock_status_nominal(source1_electricityBus_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source1_electricityBus_1)_: +-100 NonConvexFlowBlock_status(source1_electricityBus_1) ++1 NonConvexFlowBlock_status_nominal(source1_electricityBus_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source1_electricityBus_2)_: +-100 NonConvexFlowBlock_status(source1_electricityBus_2) ++1 NonConvexFlowBlock_status_nominal(source1_electricityBus_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source1_electricityBus_3)_: +-100 NonConvexFlowBlock_status(source1_electricityBus_3) ++1 NonConvexFlowBlock_status_nominal(source1_electricityBus_3) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source1_electricityBus_4)_: +-100 NonConvexFlowBlock_status(source1_electricityBus_4) ++1 NonConvexFlowBlock_status_nominal(source1_electricityBus_4) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source1_electricityBus_5)_: +-100 NonConvexFlowBlock_status(source1_electricityBus_5) ++1 NonConvexFlowBlock_status_nominal(source1_electricityBus_5) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_0)_: ++1 NonConvexFlowBlock_status_nominal(source3_electricityBus_0) +-100 NonConvexFlowBlock_status(source3_electricityBus_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_1)_: ++1 NonConvexFlowBlock_status_nominal(source3_electricityBus_1) +-100 NonConvexFlowBlock_status(source3_electricityBus_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_2)_: ++1 NonConvexFlowBlock_status_nominal(source3_electricityBus_2) +-100 NonConvexFlowBlock_status(source3_electricityBus_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_3)_: ++1 NonConvexFlowBlock_status_nominal(source3_electricityBus_3) +-100 NonConvexFlowBlock_status(source3_electricityBus_3) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_4)_: ++1 NonConvexFlowBlock_status_nominal(source3_electricityBus_4) +-100 NonConvexFlowBlock_status(source3_electricityBus_4) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_5)_: ++1 NonConvexFlowBlock_status_nominal(source3_electricityBus_5) +-100 NonConvexFlowBlock_status(source3_electricityBus_5) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source2_electricityBus_0)_: +-100 NonConvexFlowBlock_status(source2_electricityBus_0) ++1 NonConvexFlowBlock_status_nominal(source2_electricityBus_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source2_electricityBus_1)_: +-100 NonConvexFlowBlock_status(source2_electricityBus_1) ++1 NonConvexFlowBlock_status_nominal(source2_electricityBus_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source2_electricityBus_2)_: +-100 NonConvexFlowBlock_status(source2_electricityBus_2) ++1 NonConvexFlowBlock_status_nominal(source2_electricityBus_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source2_electricityBus_3)_: +-100 NonConvexFlowBlock_status(source2_electricityBus_3) ++1 NonConvexFlowBlock_status_nominal(source2_electricityBus_3) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source2_electricityBus_4)_: +-100 NonConvexFlowBlock_status(source2_electricityBus_4) ++1 NonConvexFlowBlock_status_nominal(source2_electricityBus_4) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(source2_electricityBus_5)_: +-100 NonConvexFlowBlock_status(source2_electricityBus_5) ++1 NonConvexFlowBlock_status_nominal(source2_electricityBus_5) += 0 + +c_u_NonConvexFlowBlock_min(source1_electricityBus_0_0)_: +-1 flow(source1_electricityBus_0_0) +<= 0 + +c_u_NonConvexFlowBlock_min(source1_electricityBus_0_1)_: +-1 flow(source1_electricityBus_0_1) +<= 0 + +c_u_NonConvexFlowBlock_min(source1_electricityBus_1_2)_: +-1 flow(source1_electricityBus_1_2) +<= 0 + +c_u_NonConvexFlowBlock_min(source1_electricityBus_1_3)_: +-1 flow(source1_electricityBus_1_3) +<= 0 + +c_u_NonConvexFlowBlock_min(source1_electricityBus_2_4)_: +-1 flow(source1_electricityBus_2_4) +<= 0 + +c_u_NonConvexFlowBlock_min(source1_electricityBus_2_5)_: +-1 flow(source1_electricityBus_2_5) +<= 0 + +c_u_NonConvexFlowBlock_min(source3_electricityBus_0_0)_: +-1 flow(source3_electricityBus_0_0) +<= 0 + +c_u_NonConvexFlowBlock_min(source3_electricityBus_0_1)_: +-1 flow(source3_electricityBus_0_1) +<= 0 + +c_u_NonConvexFlowBlock_min(source3_electricityBus_1_2)_: +-1 flow(source3_electricityBus_1_2) +<= 0 + +c_u_NonConvexFlowBlock_min(source3_electricityBus_1_3)_: +-1 flow(source3_electricityBus_1_3) +<= 0 + +c_u_NonConvexFlowBlock_min(source3_electricityBus_2_4)_: +-1 flow(source3_electricityBus_2_4) +<= 0 + +c_u_NonConvexFlowBlock_min(source3_electricityBus_2_5)_: +-1 flow(source3_electricityBus_2_5) +<= 0 + +c_u_NonConvexFlowBlock_min(source2_electricityBus_0_0)_: +-1 flow(source2_electricityBus_0_0) +<= 0 + +c_u_NonConvexFlowBlock_min(source2_electricityBus_0_1)_: +-1 flow(source2_electricityBus_0_1) +<= 0 + +c_u_NonConvexFlowBlock_min(source2_electricityBus_1_2)_: +-1 flow(source2_electricityBus_1_2) +<= 0 + +c_u_NonConvexFlowBlock_min(source2_electricityBus_1_3)_: +-1 flow(source2_electricityBus_1_3) +<= 0 + +c_u_NonConvexFlowBlock_min(source2_electricityBus_2_4)_: +-1 flow(source2_electricityBus_2_4) +<= 0 + +c_u_NonConvexFlowBlock_min(source2_electricityBus_2_5)_: +-1 flow(source2_electricityBus_2_5) +<= 0 + +c_u_NonConvexFlowBlock_max(source1_electricityBus_0_0)_: +-1 NonConvexFlowBlock_status_nominal(source1_electricityBus_0) ++1 flow(source1_electricityBus_0_0) +<= 0 + +c_u_NonConvexFlowBlock_max(source1_electricityBus_0_1)_: +-1 NonConvexFlowBlock_status_nominal(source1_electricityBus_1) ++1 flow(source1_electricityBus_0_1) +<= 0 + +c_u_NonConvexFlowBlock_max(source1_electricityBus_1_2)_: +-1 NonConvexFlowBlock_status_nominal(source1_electricityBus_2) ++1 flow(source1_electricityBus_1_2) +<= 0 + +c_u_NonConvexFlowBlock_max(source1_electricityBus_1_3)_: +-1 NonConvexFlowBlock_status_nominal(source1_electricityBus_3) ++1 flow(source1_electricityBus_1_3) +<= 0 + +c_u_NonConvexFlowBlock_max(source1_electricityBus_2_4)_: +-1 NonConvexFlowBlock_status_nominal(source1_electricityBus_4) ++1 flow(source1_electricityBus_2_4) +<= 0 + +c_u_NonConvexFlowBlock_max(source1_electricityBus_2_5)_: +-1 NonConvexFlowBlock_status_nominal(source1_electricityBus_5) ++1 flow(source1_electricityBus_2_5) +<= 0 + +c_u_NonConvexFlowBlock_max(source3_electricityBus_0_0)_: +-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_0) ++1 flow(source3_electricityBus_0_0) +<= 0 + +c_u_NonConvexFlowBlock_max(source3_electricityBus_0_1)_: +-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_1) ++1 flow(source3_electricityBus_0_1) +<= 0 + +c_u_NonConvexFlowBlock_max(source3_electricityBus_1_2)_: +-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_2) ++1 flow(source3_electricityBus_1_2) +<= 0 + +c_u_NonConvexFlowBlock_max(source3_electricityBus_1_3)_: +-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_3) ++1 flow(source3_electricityBus_1_3) +<= 0 + +c_u_NonConvexFlowBlock_max(source3_electricityBus_2_4)_: +-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_4) ++1 flow(source3_electricityBus_2_4) +<= 0 + +c_u_NonConvexFlowBlock_max(source3_electricityBus_2_5)_: +-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_5) ++1 flow(source3_electricityBus_2_5) +<= 0 + +c_u_NonConvexFlowBlock_max(source2_electricityBus_0_0)_: +-1 NonConvexFlowBlock_status_nominal(source2_electricityBus_0) ++1 flow(source2_electricityBus_0_0) +<= 0 + +c_u_NonConvexFlowBlock_max(source2_electricityBus_0_1)_: +-1 NonConvexFlowBlock_status_nominal(source2_electricityBus_1) ++1 flow(source2_electricityBus_0_1) +<= 0 + +c_u_NonConvexFlowBlock_max(source2_electricityBus_1_2)_: +-1 NonConvexFlowBlock_status_nominal(source2_electricityBus_2) ++1 flow(source2_electricityBus_1_2) +<= 0 + +c_u_NonConvexFlowBlock_max(source2_electricityBus_1_3)_: +-1 NonConvexFlowBlock_status_nominal(source2_electricityBus_3) ++1 flow(source2_electricityBus_1_3) +<= 0 + +c_u_NonConvexFlowBlock_max(source2_electricityBus_2_4)_: +-1 NonConvexFlowBlock_status_nominal(source2_electricityBus_4) ++1 flow(source2_electricityBus_2_4) +<= 0 + +c_u_NonConvexFlowBlock_max(source2_electricityBus_2_5)_: +-1 NonConvexFlowBlock_status_nominal(source2_electricityBus_5) ++1 flow(source2_electricityBus_2_5) +<= 0 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= NonConvexFlowBlock_status(source1_electricityBus_0) <= 1 + 0 <= NonConvexFlowBlock_status(source2_electricityBus_0) <= 1 + 1 <= emission_factor(0) <= 2 + 0 <= NonConvexFlowBlock_status(source1_electricityBus_1) <= 1 + 0 <= NonConvexFlowBlock_status(source2_electricityBus_1) <= 1 + 1 <= emission_factor(1) <= 2 + 0 <= NonConvexFlowBlock_status(source1_electricityBus_2) <= 1 + 0 <= NonConvexFlowBlock_status(source2_electricityBus_2) <= 1 + 1 <= emission_factor(2) <= 2 + 0 <= NonConvexFlowBlock_status(source1_electricityBus_3) <= 1 + 0 <= NonConvexFlowBlock_status(source2_electricityBus_3) <= 1 + 1 <= emission_factor(3) <= 2 + 0 <= NonConvexFlowBlock_status(source1_electricityBus_4) <= 1 + 0 <= NonConvexFlowBlock_status(source2_electricityBus_4) <= 1 + 1 <= emission_factor(4) <= 2 + 0 <= NonConvexFlowBlock_status(source1_electricityBus_5) <= 1 + 0 <= NonConvexFlowBlock_status(source2_electricityBus_5) <= 1 + 1 <= emission_factor(5) <= 2 + 0 <= NonConvexFlowBlock_status_nominal(source1_electricityBus_0) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source1_electricityBus_1) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source1_electricityBus_2) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source1_electricityBus_3) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source1_electricityBus_4) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source1_electricityBus_5) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source3_electricityBus_0) <= +inf + 0 <= NonConvexFlowBlock_status(source3_electricityBus_0) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(source3_electricityBus_1) <= +inf + 0 <= NonConvexFlowBlock_status(source3_electricityBus_1) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(source3_electricityBus_2) <= +inf + 0 <= NonConvexFlowBlock_status(source3_electricityBus_2) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(source3_electricityBus_3) <= +inf + 0 <= NonConvexFlowBlock_status(source3_electricityBus_3) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(source3_electricityBus_4) <= +inf + 0 <= NonConvexFlowBlock_status(source3_electricityBus_4) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(source3_electricityBus_5) <= +inf + 0 <= NonConvexFlowBlock_status(source3_electricityBus_5) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_0) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_1) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_2) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_3) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_4) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(source2_electricityBus_5) <= +inf + 0 <= flow(source1_electricityBus_0_0) <= 100 + 0 <= flow(source1_electricityBus_0_1) <= 100 + 0 <= flow(source1_electricityBus_1_2) <= 100 + 0 <= flow(source1_electricityBus_1_3) <= 100 + 0 <= flow(source1_electricityBus_2_4) <= 100 + 0 <= flow(source1_electricityBus_2_5) <= 100 + 0 <= flow(source3_electricityBus_0_0) <= 100 + 0 <= flow(source3_electricityBus_0_1) <= 100 + 0 <= flow(source3_electricityBus_1_2) <= 100 + 0 <= flow(source3_electricityBus_1_3) <= 100 + 0 <= flow(source3_electricityBus_2_4) <= 100 + 0 <= flow(source3_electricityBus_2_5) <= 100 + 0 <= flow(source2_electricityBus_0_0) <= 100 + 0 <= flow(source2_electricityBus_0_1) <= 100 + 0 <= flow(source2_electricityBus_1_2) <= 100 + 0 <= flow(source2_electricityBus_1_3) <= 100 + 0 <= flow(source2_electricityBus_2_4) <= 100 + 0 <= flow(source2_electricityBus_2_5) <= 100 +binary + NonConvexFlowBlock_status(source1_electricityBus_0) + NonConvexFlowBlock_status(source2_electricityBus_0) + NonConvexFlowBlock_status(source1_electricityBus_1) + NonConvexFlowBlock_status(source2_electricityBus_1) + NonConvexFlowBlock_status(source1_electricityBus_2) + NonConvexFlowBlock_status(source2_electricityBus_2) + NonConvexFlowBlock_status(source1_electricityBus_3) + NonConvexFlowBlock_status(source2_electricityBus_3) + NonConvexFlowBlock_status(source1_electricityBus_4) + NonConvexFlowBlock_status(source2_electricityBus_4) + NonConvexFlowBlock_status(source1_electricityBus_5) + NonConvexFlowBlock_status(source2_electricityBus_5) + NonConvexFlowBlock_status(source3_electricityBus_0) + NonConvexFlowBlock_status(source3_electricityBus_1) + NonConvexFlowBlock_status(source3_electricityBus_2) + NonConvexFlowBlock_status(source3_electricityBus_3) + NonConvexFlowBlock_status(source3_electricityBus_4) + NonConvexFlowBlock_status(source3_electricityBus_5) +end diff --git a/tests/lp_files/flow_invest_with_offset.lp b/tests/lp_files/flow_invest_with_offset.lp index 91bf91f7e..168b31a8a 100644 --- a/tests/lp_files/flow_invest_with_offset.lp +++ b/tests/lp_files/flow_invest_with_offset.lp @@ -2,67 +2,70 @@ min objective: -+500 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) -+34 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus) -+25 flow(source_nonconvex_invest_electricityBus_0) -+25 flow(source_nonconvex_invest_electricityBus_1) -+25 flow(source_nonconvex_invest_electricityBus_2) ++500 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) ++34 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) ++25 flow(source_nonconvex_invest_electricityBus_0_0) ++25 flow(source_nonconvex_invest_electricityBus_0_1) ++25 flow(source_nonconvex_invest_electricityBus_0_2) s.t. -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(source_nonconvex_invest_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(source_nonconvex_invest_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(source_nonconvex_invest_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(source_nonconvex_invest_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(source_nonconvex_invest_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(source_nonconvex_invest_electricityBus_0_2) = 0 -c_u_InvestmentFlowBlock_minimum_rule(source_nonconvex_invest_electricityBus)_: --1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) -+15 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus) +c_u_InvestmentFlowBlock_minimum_rule(source_nonconvex_invest_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) ++15 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_maximum_rule(source_nonconvex_invest_electricityBus)_: -+1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) --20 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus) +c_u_InvestmentFlowBlock_maximum_rule(source_nonconvex_invest_electricityBus_0)_: ++1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) +-20 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0)_: --0.80000000000000004 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) -+1 flow(source_nonconvex_invest_electricityBus_0) +c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) ++1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) += 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_0)_: ++1 flow(source_nonconvex_invest_electricityBus_0_0) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_1)_: --0.80000000000000004 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) -+1 flow(source_nonconvex_invest_electricityBus_1) +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_1)_: ++1 flow(source_nonconvex_invest_electricityBus_0_1) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_2)_: --0.80000000000000004 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) -+1 flow(source_nonconvex_invest_electricityBus_2) +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_2)_: ++1 flow(source_nonconvex_invest_electricityBus_0_2) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= 0 c_u_InvestmentFlowBlock_full_load_time_max(source_nonconvex_invest_electricityBus)_: --2.2999999999999998 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) -+1 flow(source_nonconvex_invest_electricityBus_0) -+1 flow(source_nonconvex_invest_electricityBus_1) -+1 flow(source_nonconvex_invest_electricityBus_2) ++1 flow(source_nonconvex_invest_electricityBus_0_0) ++1 flow(source_nonconvex_invest_electricityBus_0_1) ++1 flow(source_nonconvex_invest_electricityBus_0_2) +-2.3 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(source_nonconvex_invest_electricityBus_0) <= +inf - 0 <= flow(source_nonconvex_invest_electricityBus_1) <= +inf - 0 <= flow(source_nonconvex_invest_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) <= 20 - 0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus) <= 1 + 0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) <= 20 + 0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) <= 1 + 0 <= flow(source_nonconvex_invest_electricityBus_0_0) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_0_1) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= +inf binary - InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus) + InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) end diff --git a/tests/lp_files/flow_invest_with_offset_multi_period.lp b/tests/lp_files/flow_invest_with_offset_multi_period.lp new file mode 100644 index 000000000..1954c450c --- /dev/null +++ b/tests/lp_files/flow_invest_with_offset_multi_period.lp @@ -0,0 +1,206 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++611.5671812529034 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) ++34 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) ++599.5756678950033 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) ++33.33333333333333 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1) ++587.8192822500032 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) ++32.6797385620915 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2) ++25 flow(source_nonconvex_invest_electricityBus_0_0) ++25 flow(source_nonconvex_invest_electricityBus_0_1) ++24.509803921568626 flow(source_nonconvex_invest_electricityBus_1_2) ++24.509803921568626 flow(source_nonconvex_invest_electricityBus_1_3) ++24.029219530949632 flow(source_nonconvex_invest_electricityBus_2_4) ++24.029219530949632 flow(source_nonconvex_invest_electricityBus_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(source_nonconvex_invest_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(source_nonconvex_invest_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(source_nonconvex_invest_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(source_nonconvex_invest_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(source_nonconvex_invest_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(source_nonconvex_invest_electricityBus_2_5) += 0 + +c_u_InvestmentFlowBlock_minimum_rule(source_nonconvex_invest_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) ++15 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_minimum_rule(source_nonconvex_invest_electricityBus_1)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) ++15 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_minimum_rule(source_nonconvex_invest_electricityBus_2)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) ++15 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(source_nonconvex_invest_electricityBus_0)_: ++1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) +-20 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(source_nonconvex_invest_electricityBus_1)_: ++1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) +-20 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(source_nonconvex_invest_electricityBus_2)_: ++1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) +-20 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2) +<= 0 + +c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) ++1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_1)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) +-1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) ++1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) ++1 InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_2)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) +-1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) ++1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) ++1 InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(source_nonconvex_invest_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(source_nonconvex_invest_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(source_nonconvex_invest_electricityBus_2)_: ++1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(source_nonconvex_invest_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(source_nonconvex_invest_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(source_nonconvex_invest_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(source_nonconvex_invest_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_0) ++1 InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(source_nonconvex_invest_electricityBus_1)_: ++1 InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_1) +-1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(source_nonconvex_invest_electricityBus_2)_: ++1 InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_2) +-1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_2) += 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_0)_: ++1 flow(source_nonconvex_invest_electricityBus_0_0) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_1)_: ++1 flow(source_nonconvex_invest_electricityBus_0_1) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_1_2)_: ++1 flow(source_nonconvex_invest_electricityBus_1_2) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_1_3)_: ++1 flow(source_nonconvex_invest_electricityBus_1_3) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_2_4)_: ++1 flow(source_nonconvex_invest_electricityBus_2_4) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_2_5)_: ++1 flow(source_nonconvex_invest_electricityBus_2_5) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_full_load_time_max(source_nonconvex_invest_electricityBus)_: ++1 flow(source_nonconvex_invest_electricityBus_0_0) ++1 flow(source_nonconvex_invest_electricityBus_0_1) ++1 flow(source_nonconvex_invest_electricityBus_1_2) ++1 flow(source_nonconvex_invest_electricityBus_1_3) ++1 flow(source_nonconvex_invest_electricityBus_2_4) ++1 flow(source_nonconvex_invest_electricityBus_2_5) +-2.3 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) +-2.3 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) +-2.3 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) +<= 0.0 + +bounds + 0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) <= 20 + 0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) <= 1 + 0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) <= 20 + 0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1) <= 1 + 0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) <= 20 + 0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2) <= 1 + 0 <= flow(source_nonconvex_invest_electricityBus_0_0) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_0_1) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_1_2) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_1_3) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_2_4) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_0) <= +inf +binary + InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) + InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1) + InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2) +end diff --git a/tests/lp_files/flow_invest_with_offset_no_minimum.lp b/tests/lp_files/flow_invest_with_offset_no_minimum.lp index 79d598a0b..ead5cfa51 100644 --- a/tests/lp_files/flow_invest_with_offset_no_minimum.lp +++ b/tests/lp_files/flow_invest_with_offset_no_minimum.lp @@ -2,66 +2,69 @@ min objective: -+500 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) -+34 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus) -+25 flow(source_nonconvex_invest_electricityBus_0) -+25 flow(source_nonconvex_invest_electricityBus_1) -+25 flow(source_nonconvex_invest_electricityBus_2) ++500 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) ++34 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) ++25 flow(source_nonconvex_invest_electricityBus_0_0) ++25 flow(source_nonconvex_invest_electricityBus_0_1) ++25 flow(source_nonconvex_invest_electricityBus_0_2) s.t. -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(source_nonconvex_invest_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(source_nonconvex_invest_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(source_nonconvex_invest_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(source_nonconvex_invest_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(source_nonconvex_invest_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(source_nonconvex_invest_electricityBus_0_2) = 0 -c_l_InvestmentFlowBlock_minimum_rule(source_nonconvex_invest_electricityBus)_: -+1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) ->= 0 +c_u_InvestmentFlowBlock_minimum_rule(source_nonconvex_invest_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) +<= 0 -c_u_InvestmentFlowBlock_maximum_rule(source_nonconvex_invest_electricityBus)_: -+1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) --1234 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus) +c_u_InvestmentFlowBlock_maximum_rule(source_nonconvex_invest_electricityBus_0)_: ++1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) +-1234 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0)_: --0.80000000000000004 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) -+1 flow(source_nonconvex_invest_electricityBus_0) +c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) ++1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) += 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_0)_: ++1 flow(source_nonconvex_invest_electricityBus_0_0) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_1)_: --0.80000000000000004 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) -+1 flow(source_nonconvex_invest_electricityBus_1) +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_1)_: ++1 flow(source_nonconvex_invest_electricityBus_0_1) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_2)_: --0.80000000000000004 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) -+1 flow(source_nonconvex_invest_electricityBus_2) +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_2)_: ++1 flow(source_nonconvex_invest_electricityBus_0_2) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= 0 c_u_InvestmentFlowBlock_full_load_time_max(source_nonconvex_invest_electricityBus)_: --2.2999999999999998 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) -+1 flow(source_nonconvex_invest_electricityBus_0) -+1 flow(source_nonconvex_invest_electricityBus_1) -+1 flow(source_nonconvex_invest_electricityBus_2) ++1 flow(source_nonconvex_invest_electricityBus_0_0) ++1 flow(source_nonconvex_invest_electricityBus_0_1) ++1 flow(source_nonconvex_invest_electricityBus_0_2) +-2.3 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(source_nonconvex_invest_electricityBus_0) <= +inf - 0 <= flow(source_nonconvex_invest_electricityBus_1) <= +inf - 0 <= flow(source_nonconvex_invest_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus) <= 1234 - 0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus) <= 1 + 0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) <= 1234 + 0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) <= 1 + 0 <= flow(source_nonconvex_invest_electricityBus_0_0) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_0_1) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= +inf binary - InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus) + InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) end diff --git a/tests/lp_files/flow_invest_with_offset_no_minimum_multi_period.lp b/tests/lp_files/flow_invest_with_offset_no_minimum_multi_period.lp new file mode 100644 index 000000000..462f594da --- /dev/null +++ b/tests/lp_files/flow_invest_with_offset_no_minimum_multi_period.lp @@ -0,0 +1,203 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++611.5671812529034 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) ++34 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) ++599.5756678950033 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) ++33.33333333333333 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1) ++587.8192822500032 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) ++32.6797385620915 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2) ++25 flow(source_nonconvex_invest_electricityBus_0_0) ++25 flow(source_nonconvex_invest_electricityBus_0_1) ++24.509803921568626 flow(source_nonconvex_invest_electricityBus_1_2) ++24.509803921568626 flow(source_nonconvex_invest_electricityBus_1_3) ++24.029219530949632 flow(source_nonconvex_invest_electricityBus_2_4) ++24.029219530949632 flow(source_nonconvex_invest_electricityBus_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(source_nonconvex_invest_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(source_nonconvex_invest_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(source_nonconvex_invest_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(source_nonconvex_invest_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(source_nonconvex_invest_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(source_nonconvex_invest_electricityBus_2_5) += 0 + +c_u_InvestmentFlowBlock_minimum_rule(source_nonconvex_invest_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_minimum_rule(source_nonconvex_invest_electricityBus_1)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_minimum_rule(source_nonconvex_invest_electricityBus_2)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(source_nonconvex_invest_electricityBus_0)_: ++1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) +-1234 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(source_nonconvex_invest_electricityBus_1)_: ++1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) +-1234 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(source_nonconvex_invest_electricityBus_2)_: ++1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) +-1234 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2) +<= 0 + +c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) ++1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_1)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) +-1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) ++1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) ++1 InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_2)_: +-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) +-1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) ++1 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) ++1 InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(source_nonconvex_invest_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(source_nonconvex_invest_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(source_nonconvex_invest_electricityBus_2)_: ++1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(source_nonconvex_invest_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(source_nonconvex_invest_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(source_nonconvex_invest_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(source_nonconvex_invest_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_0) ++1 InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(source_nonconvex_invest_electricityBus_1)_: ++1 InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_1) +-1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(source_nonconvex_invest_electricityBus_2)_: ++1 InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_2) +-1 InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_2) += 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_0)_: ++1 flow(source_nonconvex_invest_electricityBus_0_0) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_1)_: ++1 flow(source_nonconvex_invest_electricityBus_0_1) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_1_2)_: ++1 flow(source_nonconvex_invest_electricityBus_1_2) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_1_3)_: ++1 flow(source_nonconvex_invest_electricityBus_1_3) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_2_4)_: ++1 flow(source_nonconvex_invest_electricityBus_2_4) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_2_5)_: ++1 flow(source_nonconvex_invest_electricityBus_2_5) +-0.8 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_full_load_time_max(source_nonconvex_invest_electricityBus)_: ++1 flow(source_nonconvex_invest_electricityBus_0_0) ++1 flow(source_nonconvex_invest_electricityBus_0_1) ++1 flow(source_nonconvex_invest_electricityBus_1_2) ++1 flow(source_nonconvex_invest_electricityBus_1_3) ++1 flow(source_nonconvex_invest_electricityBus_2_4) ++1 flow(source_nonconvex_invest_electricityBus_2_5) +-2.3 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) +-2.3 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) +-2.3 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) +<= 0.0 + +bounds + 0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0) <= 1234 + 0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) <= 1 + 0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) <= 1234 + 0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1) <= 1 + 0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) <= 1234 + 0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2) <= 1 + 0 <= flow(source_nonconvex_invest_electricityBus_0_0) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_0_1) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_1_2) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_1_3) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_2_4) <= +inf + 0 <= flow(source_nonconvex_invest_electricityBus_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(source_nonconvex_invest_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(source_nonconvex_invest_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_0) <= +inf +binary + InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) + InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1) + InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2) +end diff --git a/tests/lp_files/flow_invest_without_offset.lp b/tests/lp_files/flow_invest_without_offset.lp index e2c80ee0e..0e52141d3 100644 --- a/tests/lp_files/flow_invest_without_offset.lp +++ b/tests/lp_files/flow_invest_without_offset.lp @@ -2,66 +2,69 @@ min objective: -+500 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest) -+25 flow(electricityBus_sink_nonconvex_invest_0) -+25 flow(electricityBus_sink_nonconvex_invest_1) -+25 flow(electricityBus_sink_nonconvex_invest_2) ++500 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_0) ++25 flow(electricityBus_sink_nonconvex_invest_0_0) ++25 flow(electricityBus_sink_nonconvex_invest_0_1) ++25 flow(electricityBus_sink_nonconvex_invest_0_2) s.t. -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(electricityBus_sink_nonconvex_invest_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(electricityBus_sink_nonconvex_invest_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(electricityBus_sink_nonconvex_invest_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(electricityBus_sink_nonconvex_invest_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(electricityBus_sink_nonconvex_invest_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(electricityBus_sink_nonconvex_invest_0_2) = 0 -c_u_InvestmentFlowBlock_minimum_rule(electricityBus_sink_nonconvex_invest)_: --1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest) -+15 InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest) +c_u_InvestmentFlowBlock_minimum_rule(electricityBus_sink_nonconvex_invest_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_0) ++15 InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_0) <= 0 -c_u_InvestmentFlowBlock_maximum_rule(electricityBus_sink_nonconvex_invest)_: -+1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest) --172 InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest) +c_u_InvestmentFlowBlock_maximum_rule(electricityBus_sink_nonconvex_invest_0)_: ++1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_0) +-172 InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_0)_: --0.80000000000000004 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest) -+1 flow(electricityBus_sink_nonconvex_invest_0) +c_e_InvestmentFlowBlock_total_rule(electricityBus_sink_nonconvex_invest_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_0) ++1 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) += 0 + +c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_0_0)_: ++1 flow(electricityBus_sink_nonconvex_invest_0_0) +-0.8 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_1)_: --0.80000000000000004 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest) -+1 flow(electricityBus_sink_nonconvex_invest_1) +c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_0_1)_: ++1 flow(electricityBus_sink_nonconvex_invest_0_1) +-0.8 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_2)_: --0.80000000000000004 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest) -+1 flow(electricityBus_sink_nonconvex_invest_2) +c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_0_2)_: ++1 flow(electricityBus_sink_nonconvex_invest_0_2) +-0.8 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) <= 0 c_u_InvestmentFlowBlock_full_load_time_max(electricityBus_sink_nonconvex_invest)_: --2.2999999999999998 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest) -+1 flow(electricityBus_sink_nonconvex_invest_0) -+1 flow(electricityBus_sink_nonconvex_invest_1) -+1 flow(electricityBus_sink_nonconvex_invest_2) ++1 flow(electricityBus_sink_nonconvex_invest_0_0) ++1 flow(electricityBus_sink_nonconvex_invest_0_1) ++1 flow(electricityBus_sink_nonconvex_invest_0_2) +-2.3 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(electricityBus_sink_nonconvex_invest_0) <= +inf - 0 <= flow(electricityBus_sink_nonconvex_invest_1) <= +inf - 0 <= flow(electricityBus_sink_nonconvex_invest_2) <= +inf - 0 <= InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest) <= 172 - 0 <= InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest) <= 1 + 0 <= InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_0) <= 172 + 0 <= flow(electricityBus_sink_nonconvex_invest_0_0) <= +inf + 0 <= flow(electricityBus_sink_nonconvex_invest_0_1) <= +inf + 0 <= flow(electricityBus_sink_nonconvex_invest_0_2) <= +inf + 0 <= InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_0) <= 1 + 0 <= InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) <= +inf binary - InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest) + InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_0) end diff --git a/tests/lp_files/flow_invest_without_offset_multi_period.lp b/tests/lp_files/flow_invest_without_offset_multi_period.lp new file mode 100644 index 000000000..4ce5cd340 --- /dev/null +++ b/tests/lp_files/flow_invest_without_offset_multi_period.lp @@ -0,0 +1,203 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++611.5671812529034 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_0) ++599.5756678950033 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_1) ++587.8192822500032 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_2) ++25 flow(electricityBus_sink_nonconvex_invest_0_0) ++25 flow(electricityBus_sink_nonconvex_invest_0_1) ++24.509803921568626 flow(electricityBus_sink_nonconvex_invest_1_2) ++24.509803921568626 flow(electricityBus_sink_nonconvex_invest_1_3) ++24.029219530949632 flow(electricityBus_sink_nonconvex_invest_2_4) ++24.029219530949632 flow(electricityBus_sink_nonconvex_invest_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(electricityBus_sink_nonconvex_invest_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(electricityBus_sink_nonconvex_invest_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(electricityBus_sink_nonconvex_invest_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(electricityBus_sink_nonconvex_invest_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(electricityBus_sink_nonconvex_invest_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(electricityBus_sink_nonconvex_invest_2_5) += 0 + +c_u_InvestmentFlowBlock_minimum_rule(electricityBus_sink_nonconvex_invest_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_0) ++15 InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_0) +<= 0 + +c_u_InvestmentFlowBlock_minimum_rule(electricityBus_sink_nonconvex_invest_1)_: +-1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_1) ++15 InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_1) +<= 0 + +c_u_InvestmentFlowBlock_minimum_rule(electricityBus_sink_nonconvex_invest_2)_: +-1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_2) ++15 InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_2) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(electricityBus_sink_nonconvex_invest_0)_: ++1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_0) +-172 InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_0) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(electricityBus_sink_nonconvex_invest_1)_: ++1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_1) +-172 InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_1) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(electricityBus_sink_nonconvex_invest_2)_: ++1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_2) +-172 InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_2) +<= 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_sink_nonconvex_invest_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_0) ++1 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_sink_nonconvex_invest_1)_: +-1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_1) +-1 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) ++1 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_1) ++1 InvestmentFlowBlock_old(electricityBus_sink_nonconvex_invest_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_sink_nonconvex_invest_2)_: +-1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_2) +-1 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_1) ++1 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_2) ++1 InvestmentFlowBlock_old(electricityBus_sink_nonconvex_invest_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_sink_nonconvex_invest_0)_: ++1 InvestmentFlowBlock_old_end(electricityBus_sink_nonconvex_invest_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_sink_nonconvex_invest_1)_: ++1 InvestmentFlowBlock_old_end(electricityBus_sink_nonconvex_invest_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_sink_nonconvex_invest_2)_: ++1 InvestmentFlowBlock_old_end(electricityBus_sink_nonconvex_invest_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_sink_nonconvex_invest_0)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_sink_nonconvex_invest_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_sink_nonconvex_invest_1)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_sink_nonconvex_invest_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_sink_nonconvex_invest_2)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_sink_nonconvex_invest_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_sink_nonconvex_invest_0)_: +-1 InvestmentFlowBlock_old_end(electricityBus_sink_nonconvex_invest_0) +-1 InvestmentFlowBlock_old_exo(electricityBus_sink_nonconvex_invest_0) ++1 InvestmentFlowBlock_old(electricityBus_sink_nonconvex_invest_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_sink_nonconvex_invest_1)_: ++1 InvestmentFlowBlock_old(electricityBus_sink_nonconvex_invest_1) +-1 InvestmentFlowBlock_old_end(electricityBus_sink_nonconvex_invest_1) +-1 InvestmentFlowBlock_old_exo(electricityBus_sink_nonconvex_invest_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_sink_nonconvex_invest_2)_: ++1 InvestmentFlowBlock_old(electricityBus_sink_nonconvex_invest_2) +-1 InvestmentFlowBlock_old_end(electricityBus_sink_nonconvex_invest_2) +-1 InvestmentFlowBlock_old_exo(electricityBus_sink_nonconvex_invest_2) += 0 + +c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_0_0)_: ++1 flow(electricityBus_sink_nonconvex_invest_0_0) +-0.8 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_0_1)_: ++1 flow(electricityBus_sink_nonconvex_invest_0_1) +-0.8 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_1_2)_: ++1 flow(electricityBus_sink_nonconvex_invest_1_2) +-0.8 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_1_3)_: ++1 flow(electricityBus_sink_nonconvex_invest_1_3) +-0.8 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_2_4)_: ++1 flow(electricityBus_sink_nonconvex_invest_2_4) +-0.8 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_2_5)_: ++1 flow(electricityBus_sink_nonconvex_invest_2_5) +-0.8 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_2) +<= 0 + +c_u_InvestmentFlowBlock_full_load_time_max(electricityBus_sink_nonconvex_invest)_: ++1 flow(electricityBus_sink_nonconvex_invest_0_0) ++1 flow(electricityBus_sink_nonconvex_invest_0_1) ++1 flow(electricityBus_sink_nonconvex_invest_1_2) ++1 flow(electricityBus_sink_nonconvex_invest_1_3) ++1 flow(electricityBus_sink_nonconvex_invest_2_4) ++1 flow(electricityBus_sink_nonconvex_invest_2_5) +-2.3 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) +-2.3 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_1) +-2.3 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_2) +<= 0.0 + +bounds + 0 <= InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_0) <= 172 + 0 <= InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_1) <= 172 + 0 <= InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_2) <= 172 + 0 <= flow(electricityBus_sink_nonconvex_invest_0_0) <= +inf + 0 <= flow(electricityBus_sink_nonconvex_invest_0_1) <= +inf + 0 <= flow(electricityBus_sink_nonconvex_invest_1_2) <= +inf + 0 <= flow(electricityBus_sink_nonconvex_invest_1_3) <= +inf + 0 <= flow(electricityBus_sink_nonconvex_invest_2_4) <= +inf + 0 <= flow(electricityBus_sink_nonconvex_invest_2_5) <= +inf + 0 <= InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_0) <= 1 + 0 <= InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_1) <= 1 + 0 <= InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_2) <= 1 + 0 <= InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_1) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_sink_nonconvex_invest_1) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_sink_nonconvex_invest_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_sink_nonconvex_invest_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_sink_nonconvex_invest_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_sink_nonconvex_invest_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_sink_nonconvex_invest_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_sink_nonconvex_invest_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_sink_nonconvex_invest_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_sink_nonconvex_invest_0) <= +inf +binary + InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_0) + InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_1) + InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_2) +end diff --git a/tests/lp_files/flow_nonconvex_invest_bounded_converter.lp b/tests/lp_files/flow_nonconvex_invest_bounded_converter.lp new file mode 100644 index 000000000..7e8e1e56d --- /dev/null +++ b/tests/lp_files/flow_nonconvex_invest_bounded_converter.lp @@ -0,0 +1,155 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++25 flow(converter_nonconvex_invest_electricityBus_0_0) ++25 flow(converter_nonconvex_invest_electricityBus_0_1) ++25 flow(converter_nonconvex_invest_electricityBus_0_2) ++500 InvestNonConvexFlowBlock_invest(converter_nonconvex_invest_electricityBus_0) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(converter_nonconvex_invest_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(converter_nonconvex_invest_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(converter_nonconvex_invest_electricityBus_0_2) += 0 + +c_e_BusBlock_balance(fuelBus_0_0)_: ++1 flow(fuelBus_converter_nonconvex_invest_0_0) += 0 + +c_e_BusBlock_balance(fuelBus_0_1)_: ++1 flow(fuelBus_converter_nonconvex_invest_0_1) += 0 + +c_e_BusBlock_balance(fuelBus_0_2)_: ++1 flow(fuelBus_converter_nonconvex_invest_0_2) += 0 + +c_e_ConverterBlock_relation(converter_nonconvex_invest_fuelBus_electricityBus_0_0)_: +-1 flow(converter_nonconvex_invest_electricityBus_0_0) ++0.5 flow(fuelBus_converter_nonconvex_invest_0_0) += 0 + +c_e_ConverterBlock_relation(converter_nonconvex_invest_fuelBus_electricityBus_0_1)_: +-1 flow(converter_nonconvex_invest_electricityBus_0_1) ++0.5 flow(fuelBus_converter_nonconvex_invest_0_1) += 0 + +c_e_ConverterBlock_relation(converter_nonconvex_invest_fuelBus_electricityBus_0_2)_: +-1 flow(converter_nonconvex_invest_electricityBus_0_2) ++0.5 flow(fuelBus_converter_nonconvex_invest_0_2) += 0 + +c_l_InvestNonConvexFlowBlock_minimum_investment(converter_nonconvex_invest_electricityBus_0)_: ++1 InvestNonConvexFlowBlock_invest(converter_nonconvex_invest_electricityBus_0) +>= 0 + +c_u_InvestNonConvexFlowBlock_maximum_investment(converter_nonconvex_invest_electricityBus_0)_: ++1 InvestNonConvexFlowBlock_invest(converter_nonconvex_invest_electricityBus_0) +<= 1234 + +c_u_InvestNonConvexFlowBlock_min(converter_nonconvex_invest_electricityBus_0_0)_: +-1 flow(converter_nonconvex_invest_electricityBus_0_0) ++0.25 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestNonConvexFlowBlock_min(converter_nonconvex_invest_electricityBus_0_1)_: +-1 flow(converter_nonconvex_invest_electricityBus_0_1) ++0.25 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestNonConvexFlowBlock_min(converter_nonconvex_invest_electricityBus_0_2)_: +-1 flow(converter_nonconvex_invest_electricityBus_0_2) ++0.25 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_2) +<= 0 + +c_u_InvestNonConvexFlowBlock_max(converter_nonconvex_invest_electricityBus_0_0)_: ++1 flow(converter_nonconvex_invest_electricityBus_0_0) +-0.5 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestNonConvexFlowBlock_max(converter_nonconvex_invest_electricityBus_0_1)_: ++1 flow(converter_nonconvex_invest_electricityBus_0_1) +-0.5 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestNonConvexFlowBlock_max(converter_nonconvex_invest_electricityBus_0_2)_: ++1 flow(converter_nonconvex_invest_electricityBus_0_2) +-0.5 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_2) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_one(converter_nonconvex_invest_electricityBus_0_0)_: ++1 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_0) +-1234 InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_one(converter_nonconvex_invest_electricityBus_0_1)_: ++1 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_1) +-1234 InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_one(converter_nonconvex_invest_electricityBus_0_2)_: ++1 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_2) +-1234 InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_2) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_two(converter_nonconvex_invest_electricityBus_0_0)_: +-1 InvestNonConvexFlowBlock_invest(converter_nonconvex_invest_electricityBus_0) ++1 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_0) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_two(converter_nonconvex_invest_electricityBus_0_1)_: +-1 InvestNonConvexFlowBlock_invest(converter_nonconvex_invest_electricityBus_0) ++1 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_1) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_two(converter_nonconvex_invest_electricityBus_0_2)_: +-1 InvestNonConvexFlowBlock_invest(converter_nonconvex_invest_electricityBus_0) ++1 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_2) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_three(converter_nonconvex_invest_electricityBus_0_0)_: ++1 InvestNonConvexFlowBlock_invest(converter_nonconvex_invest_electricityBus_0) +-1 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_0) ++1234 InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_0) +<= 1234 + +c_u_InvestNonConvexFlowBlock_invest_nc_three(converter_nonconvex_invest_electricityBus_0_1)_: ++1 InvestNonConvexFlowBlock_invest(converter_nonconvex_invest_electricityBus_0) +-1 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_1) ++1234 InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_1) +<= 1234 + +c_u_InvestNonConvexFlowBlock_invest_nc_three(converter_nonconvex_invest_electricityBus_0_2)_: ++1 InvestNonConvexFlowBlock_invest(converter_nonconvex_invest_electricityBus_0) +-1 InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_2) ++1234 InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_2) +<= 1234 + +bounds + 0 <= flow(converter_nonconvex_invest_electricityBus_0_0) <= +inf + 0 <= flow(converter_nonconvex_invest_electricityBus_0_1) <= +inf + 0 <= flow(converter_nonconvex_invest_electricityBus_0_2) <= +inf + 0 <= InvestNonConvexFlowBlock_invest(converter_nonconvex_invest_electricityBus_0) <= 1234 + 0 <= flow(fuelBus_converter_nonconvex_invest_0_0) <= +inf + 0 <= flow(fuelBus_converter_nonconvex_invest_0_1) <= +inf + 0 <= flow(fuelBus_converter_nonconvex_invest_0_2) <= +inf + 0 <= InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_0) <= +inf + 0 <= InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_1) <= +inf + 0 <= InvestNonConvexFlowBlock_status_nominal(converter_nonconvex_invest_electricityBus_2) <= +inf + 0 <= InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_0) <= 1 + 0 <= InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_1) <= 1 + 0 <= InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_2) <= 1 +binary + InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_0) + InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_1) + InvestNonConvexFlowBlock_status(converter_nonconvex_invest_electricityBus_2) +end diff --git a/tests/lp_files/flow_nonconvex_invest_bounded_transformer.lp b/tests/lp_files/flow_nonconvex_invest_bounded_transformer.lp deleted file mode 100644 index cdeb7b1d0..000000000 --- a/tests/lp_files/flow_nonconvex_invest_bounded_transformer.lp +++ /dev/null @@ -1,158 +0,0 @@ -\* Source Pyomo model name=Model *\ - -min -objective: -+500 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus) -+25 flow(transformer_nonconvex_invest_electricityBus_0) -+25 flow(transformer_nonconvex_invest_electricityBus_1) -+25 flow(transformer_nonconvex_invest_electricityBus_2) - -s.t. - -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(transformer_nonconvex_invest_electricityBus_0) -= 0 - -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(transformer_nonconvex_invest_electricityBus_1) -= 0 - -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(transformer_nonconvex_invest_electricityBus_2) -= 0 - -c_e_BusBlock_balance(fuelBus_0)_: -+1 flow(fuelBus_transformer_nonconvex_invest_0) -= 0 - -c_e_BusBlock_balance(fuelBus_1)_: -+1 flow(fuelBus_transformer_nonconvex_invest_1) -= 0 - -c_e_BusBlock_balance(fuelBus_2)_: -+1 flow(fuelBus_transformer_nonconvex_invest_2) -= 0 - -c_e_TransformerBlock_relation(transformer_nonconvex_invest_fuelBus_electricityBus_0)_: -+0.5 flow(fuelBus_transformer_nonconvex_invest_0) --1 flow(transformer_nonconvex_invest_electricityBus_0) -= 0 - -c_e_TransformerBlock_relation(transformer_nonconvex_invest_fuelBus_electricityBus_1)_: -+0.5 flow(fuelBus_transformer_nonconvex_invest_1) --1 flow(transformer_nonconvex_invest_electricityBus_1) -= 0 - -c_e_TransformerBlock_relation(transformer_nonconvex_invest_fuelBus_electricityBus_2)_: -+0.5 flow(fuelBus_transformer_nonconvex_invest_2) --1 flow(transformer_nonconvex_invest_electricityBus_2) -= 0 - -c_l_InvestNonConvexFlowBlock_minimum_investment(transformer_nonconvex_invest_electricityBus)_: -+1 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus) ->= 0 - -c_u_InvestNonConvexFlowBlock_maximum_investment(transformer_nonconvex_invest_electricityBus)_: -+1 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus) -<= 1234 - -c_u_InvestNonConvexFlowBlock_min(transformer_nonconvex_invest_electricityBus_0)_: -+0.25 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0) --1 flow(transformer_nonconvex_invest_electricityBus_0) -<= 0 - -c_u_InvestNonConvexFlowBlock_min(transformer_nonconvex_invest_electricityBus_1)_: -+0.25 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1) --1 flow(transformer_nonconvex_invest_electricityBus_1) -<= 0 - -c_u_InvestNonConvexFlowBlock_min(transformer_nonconvex_invest_electricityBus_2)_: -+0.25 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2) --1 flow(transformer_nonconvex_invest_electricityBus_2) -<= 0 - -c_u_InvestNonConvexFlowBlock_max(transformer_nonconvex_invest_electricityBus_0)_: --0.5 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0) -+1 flow(transformer_nonconvex_invest_electricityBus_0) -<= 0 - -c_u_InvestNonConvexFlowBlock_max(transformer_nonconvex_invest_electricityBus_1)_: --0.5 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1) -+1 flow(transformer_nonconvex_invest_electricityBus_1) -<= 0 - -c_u_InvestNonConvexFlowBlock_max(transformer_nonconvex_invest_electricityBus_2)_: --0.5 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2) -+1 flow(transformer_nonconvex_invest_electricityBus_2) -<= 0 - -c_u_InvestNonConvexFlowBlock_invest_nc_one(transformer_nonconvex_invest_electricityBus_0)_: --1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_0) -+1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0) -<= 0 - -c_u_InvestNonConvexFlowBlock_invest_nc_one(transformer_nonconvex_invest_electricityBus_1)_: --1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_1) -+1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1) -<= 0 - -c_u_InvestNonConvexFlowBlock_invest_nc_one(transformer_nonconvex_invest_electricityBus_2)_: --1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_2) -+1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2) -<= 0 - -c_u_InvestNonConvexFlowBlock_invest_nc_two(transformer_nonconvex_invest_electricityBus_0)_: --1 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus) -+1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0) -<= 0 - -c_u_InvestNonConvexFlowBlock_invest_nc_two(transformer_nonconvex_invest_electricityBus_1)_: --1 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus) -+1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1) -<= 0 - -c_u_InvestNonConvexFlowBlock_invest_nc_two(transformer_nonconvex_invest_electricityBus_2)_: --1 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus) -+1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2) -<= 0 - -c_u_InvestNonConvexFlowBlock_invest_nc_three(transformer_nonconvex_invest_electricityBus_0)_: -+1 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus) -+1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_0) --1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0) -<= 1234 - -c_u_InvestNonConvexFlowBlock_invest_nc_three(transformer_nonconvex_invest_electricityBus_1)_: -+1 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus) -+1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_1) --1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1) -<= 1234 - -c_u_InvestNonConvexFlowBlock_invest_nc_three(transformer_nonconvex_invest_electricityBus_2)_: -+1 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus) -+1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_2) --1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2) -<= 1234 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - -bounds - 0 <= flow(fuelBus_transformer_nonconvex_invest_0) <= +inf - 0 <= flow(fuelBus_transformer_nonconvex_invest_1) <= +inf - 0 <= flow(fuelBus_transformer_nonconvex_invest_2) <= +inf - 0 <= flow(transformer_nonconvex_invest_electricityBus_0) <= +inf - 0 <= flow(transformer_nonconvex_invest_electricityBus_1) <= +inf - 0 <= flow(transformer_nonconvex_invest_electricityBus_2) <= +inf - 0 <= InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_0) <= 1 - 0 <= InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_1) <= 1 - 0 <= InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_2) <= 1 - 0 <= InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus) <= 1234 - 0 <= InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0) <= +inf - 0 <= InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1) <= +inf - 0 <= InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2) <= +inf -binary - InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_0) - InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_1) - InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_2) -end diff --git a/tests/lp_files/flow_reaching_lifetime.lp b/tests/lp_files/flow_reaching_lifetime.lp new file mode 100644 index 000000000..e4b063214 --- /dev/null +++ b/tests/lp_files/flow_reaching_lifetime.lp @@ -0,0 +1,53 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++25 flow(electricityBus_excess_0_0) ++25 flow(electricityBus_excess_0_1) ++24.509803921568626 flow(electricityBus_excess_1_2) ++24.509803921568626 flow(electricityBus_excess_1_3) ++24.029219530949632 flow(electricityBus_excess_2_4) ++24.029219530949632 flow(electricityBus_excess_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(electricityBus_excess_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(electricityBus_excess_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(electricityBus_excess_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(electricityBus_excess_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(electricityBus_excess_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(electricityBus_excess_2_5) += 0 + +c_e_SimpleFlowBlock_lifetime_output(electricityBus_excess_2_4)_: ++1 flow(electricityBus_excess_2_4) += 0 + +c_e_SimpleFlowBlock_lifetime_output(electricityBus_excess_2_5)_: ++1 flow(electricityBus_excess_2_5) += 0 + +bounds + 0 <= flow(electricityBus_excess_0_0) <= 8.0 + 0 <= flow(electricityBus_excess_0_1) <= 8.0 + 0 <= flow(electricityBus_excess_1_2) <= 8.0 + 0 <= flow(electricityBus_excess_1_3) <= 8.0 + 0 <= flow(electricityBus_excess_2_4) <= 8.0 + 0 <= flow(electricityBus_excess_2_5) <= 8.0 +end diff --git a/tests/lp_files/flow_reaching_lifetime_initial_age.lp b/tests/lp_files/flow_reaching_lifetime_initial_age.lp new file mode 100644 index 000000000..61f0a0a7a --- /dev/null +++ b/tests/lp_files/flow_reaching_lifetime_initial_age.lp @@ -0,0 +1,61 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++25 flow(electricityBus_excess_0_0) ++25 flow(electricityBus_excess_0_1) ++24.509803921568626 flow(electricityBus_excess_1_2) ++24.509803921568626 flow(electricityBus_excess_1_3) ++24.029219530949632 flow(electricityBus_excess_2_4) ++24.029219530949632 flow(electricityBus_excess_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(electricityBus_excess_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(electricityBus_excess_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(electricityBus_excess_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(electricityBus_excess_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(electricityBus_excess_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(electricityBus_excess_2_5) += 0 + +c_e_SimpleFlowBlock_lifetime_age_output(electricityBus_excess_1_2)_: ++1 flow(electricityBus_excess_1_2) += 0 + +c_e_SimpleFlowBlock_lifetime_age_output(electricityBus_excess_1_3)_: ++1 flow(electricityBus_excess_1_3) += 0 + +c_e_SimpleFlowBlock_lifetime_age_output(electricityBus_excess_2_4)_: ++1 flow(electricityBus_excess_2_4) += 0 + +c_e_SimpleFlowBlock_lifetime_age_output(electricityBus_excess_2_5)_: ++1 flow(electricityBus_excess_2_5) += 0 + +bounds + 0 <= flow(electricityBus_excess_0_0) <= 8.0 + 0 <= flow(electricityBus_excess_0_1) <= 8.0 + 0 <= flow(electricityBus_excess_1_2) <= 8.0 + 0 <= flow(electricityBus_excess_1_3) <= 8.0 + 0 <= flow(electricityBus_excess_2_4) <= 8.0 + 0 <= flow(electricityBus_excess_2_5) <= 8.0 +end diff --git a/tests/lp_files/generic_invest_limit.lp b/tests/lp_files/generic_invest_limit.lp index 184058e0f..f8598642b 100644 --- a/tests/lp_files/generic_invest_limit.lp +++ b/tests/lp_files/generic_invest_limit.lp @@ -1,95 +1,110 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+50 InvestmentFlowBlock_invest(source_0_bus_1) -+100 InvestmentFlowBlock_invest(source_1_bus_1) -+75 InvestmentFlowBlock_invest(source_2_bus_1) ++100 InvestmentFlowBlock_invest(source_1_bus_1_0) ++75 InvestmentFlowBlock_invest(source_2_bus_1_0) ++50 InvestmentFlowBlock_invest(source_0_bus_1_0) s.t. c_u_invest_limit_space_constraint_: -+4 InvestmentFlowBlock_invest(source_0_bus_1) -+1 InvestmentFlowBlock_invest(source_1_bus_1) ++1 InvestmentFlowBlock_invest(source_1_bus_1_0) ++4 InvestmentFlowBlock_invest(source_0_bus_1_0) <= 20 -c_e_BusBlock_balance(bus_1_0)_: -+1 flow(source_0_bus_1_0) -+1 flow(source_1_bus_1_0) -+1 flow(source_2_bus_1_0) +c_e_BusBlock_balance(bus_1_0_0)_: ++1 flow(source_0_bus_1_0_0) ++1 flow(source_2_bus_1_0_0) ++1 flow(source_1_bus_1_0_0) = 0 -c_e_BusBlock_balance(bus_1_1)_: -+1 flow(source_0_bus_1_1) -+1 flow(source_1_bus_1_1) -+1 flow(source_2_bus_1_1) +c_e_BusBlock_balance(bus_1_0_1)_: ++1 flow(source_0_bus_1_0_1) ++1 flow(source_2_bus_1_0_1) ++1 flow(source_1_bus_1_0_1) = 0 -c_e_BusBlock_balance(bus_1_2)_: -+1 flow(source_0_bus_1_2) -+1 flow(source_1_bus_1_2) -+1 flow(source_2_bus_1_2) +c_e_BusBlock_balance(bus_1_0_2)_: ++1 flow(source_0_bus_1_0_2) ++1 flow(source_2_bus_1_0_2) ++1 flow(source_1_bus_1_0_2) = 0 -c_u_InvestmentFlowBlock_max(source_0_bus_1_0)_: --1 InvestmentFlowBlock_invest(source_0_bus_1) -+1 flow(source_0_bus_1_0) -<= 0 +c_e_InvestmentFlowBlock_total_rule(source_1_bus_1_0)_: +-1 InvestmentFlowBlock_invest(source_1_bus_1_0) ++1 InvestmentFlowBlock_total(source_1_bus_1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(source_2_bus_1_0)_: +-1 InvestmentFlowBlock_invest(source_2_bus_1_0) ++1 InvestmentFlowBlock_total(source_2_bus_1_0) += 0 -c_u_InvestmentFlowBlock_max(source_0_bus_1_1)_: --1 InvestmentFlowBlock_invest(source_0_bus_1) -+1 flow(source_0_bus_1_1) +c_e_InvestmentFlowBlock_total_rule(source_0_bus_1_0)_: +-1 InvestmentFlowBlock_invest(source_0_bus_1_0) ++1 InvestmentFlowBlock_total(source_0_bus_1_0) += 0 + +c_u_InvestmentFlowBlock_max(source_1_bus_1_0_0)_: ++1 flow(source_1_bus_1_0_0) +-1 InvestmentFlowBlock_total(source_1_bus_1_0) <= 0 -c_u_InvestmentFlowBlock_max(source_0_bus_1_2)_: --1 InvestmentFlowBlock_invest(source_0_bus_1) -+1 flow(source_0_bus_1_2) +c_u_InvestmentFlowBlock_max(source_1_bus_1_0_1)_: ++1 flow(source_1_bus_1_0_1) +-1 InvestmentFlowBlock_total(source_1_bus_1_0) <= 0 -c_u_InvestmentFlowBlock_max(source_1_bus_1_0)_: --1 InvestmentFlowBlock_invest(source_1_bus_1) -+1 flow(source_1_bus_1_0) +c_u_InvestmentFlowBlock_max(source_1_bus_1_0_2)_: ++1 flow(source_1_bus_1_0_2) +-1 InvestmentFlowBlock_total(source_1_bus_1_0) <= 0 -c_u_InvestmentFlowBlock_max(source_1_bus_1_1)_: --1 InvestmentFlowBlock_invest(source_1_bus_1) -+1 flow(source_1_bus_1_1) +c_u_InvestmentFlowBlock_max(source_2_bus_1_0_0)_: ++1 flow(source_2_bus_1_0_0) +-1 InvestmentFlowBlock_total(source_2_bus_1_0) <= 0 -c_u_InvestmentFlowBlock_max(source_1_bus_1_2)_: --1 InvestmentFlowBlock_invest(source_1_bus_1) -+1 flow(source_1_bus_1_2) +c_u_InvestmentFlowBlock_max(source_2_bus_1_0_1)_: ++1 flow(source_2_bus_1_0_1) +-1 InvestmentFlowBlock_total(source_2_bus_1_0) <= 0 -c_u_InvestmentFlowBlock_max(source_2_bus_1_0)_: --1 InvestmentFlowBlock_invest(source_2_bus_1) -+1 flow(source_2_bus_1_0) +c_u_InvestmentFlowBlock_max(source_2_bus_1_0_2)_: ++1 flow(source_2_bus_1_0_2) +-1 InvestmentFlowBlock_total(source_2_bus_1_0) <= 0 -c_u_InvestmentFlowBlock_max(source_2_bus_1_1)_: --1 InvestmentFlowBlock_invest(source_2_bus_1) -+1 flow(source_2_bus_1_1) +c_u_InvestmentFlowBlock_max(source_0_bus_1_0_0)_: ++1 flow(source_0_bus_1_0_0) +-1 InvestmentFlowBlock_total(source_0_bus_1_0) <= 0 -c_u_InvestmentFlowBlock_max(source_2_bus_1_2)_: --1 InvestmentFlowBlock_invest(source_2_bus_1) -+1 flow(source_2_bus_1_2) +c_u_InvestmentFlowBlock_max(source_0_bus_1_0_1)_: ++1 flow(source_0_bus_1_0_1) +-1 InvestmentFlowBlock_total(source_0_bus_1_0) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 +c_u_InvestmentFlowBlock_max(source_0_bus_1_0_2)_: ++1 flow(source_0_bus_1_0_2) +-1 InvestmentFlowBlock_total(source_0_bus_1_0) +<= 0 bounds - 0 <= flow(source_0_bus_1_0) <= +inf - 0 <= flow(source_0_bus_1_1) <= +inf - 0 <= flow(source_0_bus_1_2) <= +inf - 0 <= flow(source_1_bus_1_0) <= +inf - 0 <= flow(source_1_bus_1_1) <= +inf - 0 <= flow(source_1_bus_1_2) <= +inf - 0 <= flow(source_2_bus_1_0) <= +inf - 0 <= flow(source_2_bus_1_1) <= +inf - 0 <= flow(source_2_bus_1_2) <= +inf - 0 <= InvestmentFlowBlock_invest(source_0_bus_1) <= +inf - 0 <= InvestmentFlowBlock_invest(source_1_bus_1) <= +inf - 0 <= InvestmentFlowBlock_invest(source_2_bus_1) <= +inf + 0 <= InvestmentFlowBlock_invest(source_1_bus_1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(source_2_bus_1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(source_0_bus_1_0) <= +inf + 0 <= flow(source_0_bus_1_0_0) <= +inf + 0 <= flow(source_2_bus_1_0_0) <= +inf + 0 <= flow(source_1_bus_1_0_0) <= +inf + 0 <= flow(source_0_bus_1_0_1) <= +inf + 0 <= flow(source_2_bus_1_0_1) <= +inf + 0 <= flow(source_1_bus_1_0_1) <= +inf + 0 <= flow(source_0_bus_1_0_2) <= +inf + 0 <= flow(source_2_bus_1_0_2) <= +inf + 0 <= flow(source_1_bus_1_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(source_1_bus_1_0) <= +inf + 0 <= InvestmentFlowBlock_total(source_2_bus_1_0) <= +inf + 0 <= InvestmentFlowBlock_total(source_0_bus_1_0) <= +inf end diff --git a/tests/lp_files/inactivity_costs.lp b/tests/lp_files/inactivity_costs.lp index c7e48a3ea..16ed152a4 100644 --- a/tests/lp_files/inactivity_costs.lp +++ b/tests/lp_files/inactivity_costs.lp @@ -1,27 +1,27 @@ \* Source Pyomo model name=Model *\ -min +min objective: ++6 ONE_VAR_CONSTANT ++10 flow(cheap_plant_inactivity_costs_Bus_C_0_0) ++10 flow(cheap_plant_inactivity_costs_Bus_C_0_1) ++10 flow(cheap_plant_inactivity_costs_Bus_C_0_2) -2 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_0) -2 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_1) -2 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_2) -+10 flow(cheap_plant_inactivity_costs_Bus_C_0) -+10 flow(cheap_plant_inactivity_costs_Bus_C_1) -+10 flow(cheap_plant_inactivity_costs_Bus_C_2) -+6 ONE_VAR_CONSTANT s.t. -c_e_BusBlock_balance(Bus_C_0)_: -+1 flow(cheap_plant_inactivity_costs_Bus_C_0) +c_e_BusBlock_balance(Bus_C_0_0)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_0_0) = 0 -c_e_BusBlock_balance(Bus_C_1)_: -+1 flow(cheap_plant_inactivity_costs_Bus_C_1) +c_e_BusBlock_balance(Bus_C_0_1)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_0_1) = 0 -c_e_BusBlock_balance(Bus_C_2)_: -+1 flow(cheap_plant_inactivity_costs_Bus_C_2) +c_e_BusBlock_balance(Bus_C_0_2)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_0_2) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_inactivity_costs_Bus_C_0)_: @@ -39,43 +39,41 @@ c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_inactivity_costs_Bu +1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_2) = 0 -c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_0)_: +c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_0_0)_: +-1 flow(cheap_plant_inactivity_costs_Bus_C_0_0) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_0) --1 flow(cheap_plant_inactivity_costs_Bus_C_0) <= 0 -c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_1)_: +c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_0_1)_: +-1 flow(cheap_plant_inactivity_costs_Bus_C_0_1) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_1) --1 flow(cheap_plant_inactivity_costs_Bus_C_1) <= 0 -c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_2)_: +c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_0_2)_: +-1 flow(cheap_plant_inactivity_costs_Bus_C_0_2) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_2) --1 flow(cheap_plant_inactivity_costs_Bus_C_2) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_0)_: +c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_0_0)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_0_0) -1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_0) -+1 flow(cheap_plant_inactivity_costs_Bus_C_0) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_1)_: +c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_0_1)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_0_1) -1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_1) -+1 flow(cheap_plant_inactivity_costs_Bus_C_1) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_2)_: +c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_0_2)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_0_2) -1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_2) -+1 flow(cheap_plant_inactivity_costs_Bus_C_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(cheap_plant_inactivity_costs_Bus_C_0) <= 10 - 0 <= flow(cheap_plant_inactivity_costs_Bus_C_1) <= 10 - 0 <= flow(cheap_plant_inactivity_costs_Bus_C_2) <= 10 + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(cheap_plant_inactivity_costs_Bus_C_0_0) <= 10.0 + 0 <= flow(cheap_plant_inactivity_costs_Bus_C_0_1) <= 10.0 + 0 <= flow(cheap_plant_inactivity_costs_Bus_C_0_2) <= 10.0 0 <= NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_0) <= 1 0 <= NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_1) <= 1 0 <= NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_2) <= 1 diff --git a/tests/lp_files/inactivity_costs_multi_period.lp b/tests/lp_files/inactivity_costs_multi_period.lp new file mode 100644 index 000000000..b9a6b5800 --- /dev/null +++ b/tests/lp_files/inactivity_costs_multi_period.lp @@ -0,0 +1,162 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++11.766243752402922 ONE_VAR_CONSTANT ++10 flow(cheap_plant_inactivity_costs_Bus_C_0_0) ++10 flow(cheap_plant_inactivity_costs_Bus_C_0_1) ++9.80392156862745 flow(cheap_plant_inactivity_costs_Bus_C_1_2) ++9.80392156862745 flow(cheap_plant_inactivity_costs_Bus_C_1_3) ++9.611687812379854 flow(cheap_plant_inactivity_costs_Bus_C_2_4) ++9.611687812379854 flow(cheap_plant_inactivity_costs_Bus_C_2_5) +-2 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_0) +-2 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_1) +-1.9607843137254901 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_2) +-1.9607843137254901 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_3) +-1.9223375624759707 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_4) +-1.9223375624759707 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_5) + +s.t. + +c_e_BusBlock_balance(Bus_C_0_0)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_0_0) += 0 + +c_e_BusBlock_balance(Bus_C_0_1)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_0_1) += 0 + +c_e_BusBlock_balance(Bus_C_1_2)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_1_2) += 0 + +c_e_BusBlock_balance(Bus_C_1_3)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_1_3) += 0 + +c_e_BusBlock_balance(Bus_C_2_4)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_2_4) += 0 + +c_e_BusBlock_balance(Bus_C_2_5)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_2_5) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_inactivity_costs_Bus_C_0)_: +-10 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_0) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_inactivity_costs_Bus_C_1)_: +-10 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_1) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_inactivity_costs_Bus_C_2)_: +-10 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_2) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_inactivity_costs_Bus_C_3)_: +-10 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_3) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_3) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_inactivity_costs_Bus_C_4)_: +-10 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_4) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_4) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_inactivity_costs_Bus_C_5)_: +-10 NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_5) ++1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_5) += 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_0_0)_: +-1 flow(cheap_plant_inactivity_costs_Bus_C_0_0) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_0) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_0_1)_: +-1 flow(cheap_plant_inactivity_costs_Bus_C_0_1) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_1) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_1_2)_: +-1 flow(cheap_plant_inactivity_costs_Bus_C_1_2) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_2) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_1_3)_: +-1 flow(cheap_plant_inactivity_costs_Bus_C_1_3) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_3) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_2_4)_: +-1 flow(cheap_plant_inactivity_costs_Bus_C_2_4) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_4) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_inactivity_costs_Bus_C_2_5)_: +-1 flow(cheap_plant_inactivity_costs_Bus_C_2_5) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_5) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_0_0)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_0_0) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_0) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_0_1)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_0_1) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_1) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_1_2)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_1_2) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_2) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_1_3)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_1_3) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_3) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_2_4)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_2_4) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_4) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_inactivity_costs_Bus_C_2_5)_: ++1 flow(cheap_plant_inactivity_costs_Bus_C_2_5) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_5) +<= 0 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(cheap_plant_inactivity_costs_Bus_C_0_0) <= 10.0 + 0 <= flow(cheap_plant_inactivity_costs_Bus_C_0_1) <= 10.0 + 0 <= flow(cheap_plant_inactivity_costs_Bus_C_1_2) <= 10.0 + 0 <= flow(cheap_plant_inactivity_costs_Bus_C_1_3) <= 10.0 + 0 <= flow(cheap_plant_inactivity_costs_Bus_C_2_4) <= 10.0 + 0 <= flow(cheap_plant_inactivity_costs_Bus_C_2_5) <= 10.0 + 0 <= NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_0) <= 1 + 0 <= NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_1) <= 1 + 0 <= NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_2) <= 1 + 0 <= NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_3) <= 1 + 0 <= NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_4) <= 1 + 0 <= NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_5) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_0) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_1) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_2) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_3) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_4) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_5) <= +inf +binary + NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_0) + NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_1) + NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_2) + NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_3) + NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_4) + NonConvexFlowBlock_status(cheap_plant_inactivity_costs_Bus_C_5) +end diff --git a/tests/lp_files/integer_source.lp b/tests/lp_files/integer_source.lp new file mode 100644 index 000000000..7a28ce404 --- /dev/null +++ b/tests/lp_files/integer_source.lp @@ -0,0 +1,49 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++25 flow(electricityBus_excess_0_0) ++25 flow(electricityBus_excess_0_1) ++25 flow(electricityBus_excess_0_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(electricityBus_excess_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(electricityBus_excess_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(electricityBus_excess_0_2) += 0 + +c_e_SimpleFlowBlock_integer_flow_constr(electricityBus_excess_0_0)_: +-1 flow(electricityBus_excess_0_0) ++1 SimpleFlowBlock_integer_flow(electricityBus_excess_0) += 0 + +c_e_SimpleFlowBlock_integer_flow_constr(electricityBus_excess_0_1)_: +-1 flow(electricityBus_excess_0_1) ++1 SimpleFlowBlock_integer_flow(electricityBus_excess_1) += 0 + +c_e_SimpleFlowBlock_integer_flow_constr(electricityBus_excess_0_2)_: +-1 flow(electricityBus_excess_0_2) ++1 SimpleFlowBlock_integer_flow(electricityBus_excess_2) += 0 + +bounds + 0 <= flow(electricityBus_excess_0_0) <= 10 + 0 <= flow(electricityBus_excess_0_1) <= 10 + 0 <= flow(electricityBus_excess_0_2) <= 10 + 0 <= SimpleFlowBlock_integer_flow(electricityBus_excess_0) <= +inf + 0 <= SimpleFlowBlock_integer_flow(electricityBus_excess_1) <= +inf + 0 <= SimpleFlowBlock_integer_flow(electricityBus_excess_2) <= +inf +general + SimpleFlowBlock_integer_flow(electricityBus_excess_0) + SimpleFlowBlock_integer_flow(electricityBus_excess_1) + SimpleFlowBlock_integer_flow(electricityBus_excess_2) +end diff --git a/tests/lp_files/invest_non_convex_flow.lp b/tests/lp_files/invest_non_convex_flow.lp index cdbe718e4..17d43149a 100644 --- a/tests/lp_files/invest_non_convex_flow.lp +++ b/tests/lp_files/invest_non_convex_flow.lp @@ -1,147 +1,144 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+0.75 InvestNonConvexFlowBlock_invest(b1_b2) -+8 flow(b1_b2_0) -+8 flow(b1_b2_1) -+8 flow(b1_b2_2) ++8 flow(b1_b2_0_0) ++8 flow(b1_b2_0_1) ++8 flow(b1_b2_0_2) ++0.75 InvestNonConvexFlowBlock_invest(b1_b2_0) s.t. -c_e_BusBlock_balance(b1_0)_: --1 flow(b1_b2_0) -+1 flow(b2_b1_0) +c_e_BusBlock_balance(b2_0_0)_: ++1 flow(b1_b2_0_0) +-1 flow(b2_b1_0_0) = 0 -c_e_BusBlock_balance(b1_1)_: --1 flow(b1_b2_1) -+1 flow(b2_b1_1) +c_e_BusBlock_balance(b2_0_1)_: ++1 flow(b1_b2_0_1) +-1 flow(b2_b1_0_1) = 0 -c_e_BusBlock_balance(b1_2)_: --1 flow(b1_b2_2) -+1 flow(b2_b1_2) +c_e_BusBlock_balance(b2_0_2)_: ++1 flow(b1_b2_0_2) +-1 flow(b2_b1_0_2) = 0 -c_e_BusBlock_balance(b2_0)_: -+1 flow(b1_b2_0) --1 flow(b2_b1_0) +c_e_BusBlock_balance(b1_0_0)_: +-1 flow(b1_b2_0_0) ++1 flow(b2_b1_0_0) = 0 -c_e_BusBlock_balance(b2_1)_: -+1 flow(b1_b2_1) --1 flow(b2_b1_1) +c_e_BusBlock_balance(b1_0_1)_: +-1 flow(b1_b2_0_1) ++1 flow(b2_b1_0_1) = 0 -c_e_BusBlock_balance(b2_2)_: -+1 flow(b1_b2_2) --1 flow(b2_b1_2) +c_e_BusBlock_balance(b1_0_2)_: +-1 flow(b1_b2_0_2) ++1 flow(b2_b1_0_2) = 0 -c_l_InvestNonConvexFlowBlock_minimum_investment(b1_b2)_: -+1 InvestNonConvexFlowBlock_invest(b1_b2) +c_l_InvestNonConvexFlowBlock_minimum_investment(b1_b2_0)_: ++1 InvestNonConvexFlowBlock_invest(b1_b2_0) >= 0 -c_u_InvestNonConvexFlowBlock_maximum_investment(b1_b2)_: -+1 InvestNonConvexFlowBlock_invest(b1_b2) +c_u_InvestNonConvexFlowBlock_maximum_investment(b1_b2_0)_: ++1 InvestNonConvexFlowBlock_invest(b1_b2_0) <= 10 -c_u_InvestNonConvexFlowBlock_min(b1_b2_0)_: +c_u_InvestNonConvexFlowBlock_min(b1_b2_0_0)_: +-1 flow(b1_b2_0_0) +0.25 InvestNonConvexFlowBlock_status_nominal(b1_b2_0) --1 flow(b1_b2_0) <= 0 -c_u_InvestNonConvexFlowBlock_min(b1_b2_1)_: +c_u_InvestNonConvexFlowBlock_min(b1_b2_0_1)_: +-1 flow(b1_b2_0_1) +0.25 InvestNonConvexFlowBlock_status_nominal(b1_b2_1) --1 flow(b1_b2_1) <= 0 -c_u_InvestNonConvexFlowBlock_min(b1_b2_2)_: +c_u_InvestNonConvexFlowBlock_min(b1_b2_0_2)_: +-1 flow(b1_b2_0_2) +0.25 InvestNonConvexFlowBlock_status_nominal(b1_b2_2) --1 flow(b1_b2_2) <= 0 -c_u_InvestNonConvexFlowBlock_max(b1_b2_0)_: +c_u_InvestNonConvexFlowBlock_max(b1_b2_0_0)_: ++1 flow(b1_b2_0_0) -0.5 InvestNonConvexFlowBlock_status_nominal(b1_b2_0) -+1 flow(b1_b2_0) <= 0 -c_u_InvestNonConvexFlowBlock_max(b1_b2_1)_: +c_u_InvestNonConvexFlowBlock_max(b1_b2_0_1)_: ++1 flow(b1_b2_0_1) -0.5 InvestNonConvexFlowBlock_status_nominal(b1_b2_1) -+1 flow(b1_b2_1) <= 0 -c_u_InvestNonConvexFlowBlock_max(b1_b2_2)_: +c_u_InvestNonConvexFlowBlock_max(b1_b2_0_2)_: ++1 flow(b1_b2_0_2) -0.5 InvestNonConvexFlowBlock_status_nominal(b1_b2_2) -+1 flow(b1_b2_2) <= 0 -c_u_InvestNonConvexFlowBlock_invest_nc_one(b1_b2_0)_: --10 InvestNonConvexFlowBlock_status(b1_b2_0) +c_u_InvestNonConvexFlowBlock_invest_nc_one(b1_b2_0_0)_: +1 InvestNonConvexFlowBlock_status_nominal(b1_b2_0) +-10 InvestNonConvexFlowBlock_status(b1_b2_0) <= 0 -c_u_InvestNonConvexFlowBlock_invest_nc_one(b1_b2_1)_: --10 InvestNonConvexFlowBlock_status(b1_b2_1) +c_u_InvestNonConvexFlowBlock_invest_nc_one(b1_b2_0_1)_: +1 InvestNonConvexFlowBlock_status_nominal(b1_b2_1) +-10 InvestNonConvexFlowBlock_status(b1_b2_1) <= 0 -c_u_InvestNonConvexFlowBlock_invest_nc_one(b1_b2_2)_: --10 InvestNonConvexFlowBlock_status(b1_b2_2) +c_u_InvestNonConvexFlowBlock_invest_nc_one(b1_b2_0_2)_: +1 InvestNonConvexFlowBlock_status_nominal(b1_b2_2) +-10 InvestNonConvexFlowBlock_status(b1_b2_2) <= 0 -c_u_InvestNonConvexFlowBlock_invest_nc_two(b1_b2_0)_: --1 InvestNonConvexFlowBlock_invest(b1_b2) +c_u_InvestNonConvexFlowBlock_invest_nc_two(b1_b2_0_0)_: +-1 InvestNonConvexFlowBlock_invest(b1_b2_0) +1 InvestNonConvexFlowBlock_status_nominal(b1_b2_0) <= 0 -c_u_InvestNonConvexFlowBlock_invest_nc_two(b1_b2_1)_: --1 InvestNonConvexFlowBlock_invest(b1_b2) +c_u_InvestNonConvexFlowBlock_invest_nc_two(b1_b2_0_1)_: +-1 InvestNonConvexFlowBlock_invest(b1_b2_0) +1 InvestNonConvexFlowBlock_status_nominal(b1_b2_1) <= 0 -c_u_InvestNonConvexFlowBlock_invest_nc_two(b1_b2_2)_: --1 InvestNonConvexFlowBlock_invest(b1_b2) +c_u_InvestNonConvexFlowBlock_invest_nc_two(b1_b2_0_2)_: +-1 InvestNonConvexFlowBlock_invest(b1_b2_0) +1 InvestNonConvexFlowBlock_status_nominal(b1_b2_2) <= 0 -c_u_InvestNonConvexFlowBlock_invest_nc_three(b1_b2_0)_: -+1 InvestNonConvexFlowBlock_invest(b1_b2) -+10 InvestNonConvexFlowBlock_status(b1_b2_0) +c_u_InvestNonConvexFlowBlock_invest_nc_three(b1_b2_0_0)_: ++1 InvestNonConvexFlowBlock_invest(b1_b2_0) -1 InvestNonConvexFlowBlock_status_nominal(b1_b2_0) ++10 InvestNonConvexFlowBlock_status(b1_b2_0) <= 10 -c_u_InvestNonConvexFlowBlock_invest_nc_three(b1_b2_1)_: -+1 InvestNonConvexFlowBlock_invest(b1_b2) -+10 InvestNonConvexFlowBlock_status(b1_b2_1) +c_u_InvestNonConvexFlowBlock_invest_nc_three(b1_b2_0_1)_: ++1 InvestNonConvexFlowBlock_invest(b1_b2_0) -1 InvestNonConvexFlowBlock_status_nominal(b1_b2_1) ++10 InvestNonConvexFlowBlock_status(b1_b2_1) <= 10 -c_u_InvestNonConvexFlowBlock_invest_nc_three(b1_b2_2)_: -+1 InvestNonConvexFlowBlock_invest(b1_b2) -+10 InvestNonConvexFlowBlock_status(b1_b2_2) +c_u_InvestNonConvexFlowBlock_invest_nc_three(b1_b2_0_2)_: ++1 InvestNonConvexFlowBlock_invest(b1_b2_0) -1 InvestNonConvexFlowBlock_status_nominal(b1_b2_2) ++10 InvestNonConvexFlowBlock_status(b1_b2_2) <= 10 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(b1_b2_0) <= +inf - 0 <= flow(b1_b2_1) <= +inf - 0 <= flow(b1_b2_2) <= +inf - 0 <= flow(b2_b1_0) <= +inf - 0 <= flow(b2_b1_1) <= +inf - 0 <= flow(b2_b1_2) <= +inf - 0 <= InvestNonConvexFlowBlock_status(b1_b2_0) <= 1 - 0 <= InvestNonConvexFlowBlock_status(b1_b2_1) <= 1 - 0 <= InvestNonConvexFlowBlock_status(b1_b2_2) <= 1 - 0 <= InvestNonConvexFlowBlock_invest(b1_b2) <= 10 + 0 <= flow(b1_b2_0_0) <= +inf + 0 <= flow(b1_b2_0_1) <= +inf + 0 <= flow(b1_b2_0_2) <= +inf + 0 <= InvestNonConvexFlowBlock_invest(b1_b2_0) <= 10 + 0 <= flow(b2_b1_0_0) <= +inf + 0 <= flow(b2_b1_0_1) <= +inf + 0 <= flow(b2_b1_0_2) <= +inf 0 <= InvestNonConvexFlowBlock_status_nominal(b1_b2_0) <= +inf 0 <= InvestNonConvexFlowBlock_status_nominal(b1_b2_1) <= +inf 0 <= InvestNonConvexFlowBlock_status_nominal(b1_b2_2) <= +inf + 0 <= InvestNonConvexFlowBlock_status(b1_b2_0) <= 1 + 0 <= InvestNonConvexFlowBlock_status(b1_b2_1) <= 1 + 0 <= InvestNonConvexFlowBlock_status(b1_b2_2) <= 1 binary InvestNonConvexFlowBlock_status(b1_b2_0) InvestNonConvexFlowBlock_status(b1_b2_1) diff --git a/tests/lp_files/invest_source_fixed_sink.lp b/tests/lp_files/invest_source_fixed_sink.lp index b6eff5d02..f7749fb18 100644 --- a/tests/lp_files/invest_source_fixed_sink.lp +++ b/tests/lp_files/invest_source_fixed_sink.lp @@ -1,47 +1,50 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+123 InvestmentFlowBlock_invest(pv_electricityBus) -+13 flow(pv_electricityBus_0) -+13 flow(pv_electricityBus_1) -+13 flow(pv_electricityBus_2) ++123 InvestmentFlowBlock_invest(pv_electricityBus_0) ++13 flow(pv_electricityBus_0_0) ++13 flow(pv_electricityBus_0_1) ++13 flow(pv_electricityBus_0_2) s.t. -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(pv_electricityBus_0) -= 50000 +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(pv_electricityBus_0_0) += 50000.0 -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(pv_electricityBus_1) -= 80000 +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(pv_electricityBus_0_1) += 80000.0 -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(pv_electricityBus_2) -= 30000 +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(pv_electricityBus_0_2) += 30000.0 -c_u_InvestmentFlowBlock_max(pv_electricityBus_0)_: --45 InvestmentFlowBlock_invest(pv_electricityBus) -+1 flow(pv_electricityBus_0) -<= 0 +c_e_InvestmentFlowBlock_total_rule(pv_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(pv_electricityBus_0) ++1 InvestmentFlowBlock_total(pv_electricityBus_0) += 0 -c_u_InvestmentFlowBlock_max(pv_electricityBus_1)_: --83 InvestmentFlowBlock_invest(pv_electricityBus) -+1 flow(pv_electricityBus_1) +c_u_InvestmentFlowBlock_max(pv_electricityBus_0_0)_: ++1 flow(pv_electricityBus_0_0) +-45 InvestmentFlowBlock_total(pv_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(pv_electricityBus_2)_: --65 InvestmentFlowBlock_invest(pv_electricityBus) -+1 flow(pv_electricityBus_2) +c_u_InvestmentFlowBlock_max(pv_electricityBus_0_1)_: ++1 flow(pv_electricityBus_0_1) +-83 InvestmentFlowBlock_total(pv_electricityBus_0) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 +c_u_InvestmentFlowBlock_max(pv_electricityBus_0_2)_: ++1 flow(pv_electricityBus_0_2) +-65 InvestmentFlowBlock_total(pv_electricityBus_0) +<= 0 bounds - 0 <= flow(pv_electricityBus_0) <= +inf - 0 <= flow(pv_electricityBus_1) <= +inf - 0 <= flow(pv_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(pv_electricityBus) <= +inf + 0 <= InvestmentFlowBlock_invest(pv_electricityBus_0) <= +inf + 0 <= flow(pv_electricityBus_0_0) <= +inf + 0 <= flow(pv_electricityBus_0_1) <= +inf + 0 <= flow(pv_electricityBus_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(pv_electricityBus_0) <= +inf end diff --git a/tests/lp_files/invest_source_fixed_sink_multi_period.lp b/tests/lp_files/invest_source_fixed_sink_multi_period.lp new file mode 100644 index 000000000..b0f28add1 --- /dev/null +++ b/tests/lp_files/invest_source_fixed_sink_multi_period.lp @@ -0,0 +1,154 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++157.5028481334886 InvestmentFlowBlock_invest(pv_electricityBus_0) ++154.4145569936163 InvestmentFlowBlock_invest(pv_electricityBus_1) ++151.38682058197674 InvestmentFlowBlock_invest(pv_electricityBus_2) ++13 flow(pv_electricityBus_0_0) ++13 flow(pv_electricityBus_0_1) ++12.745098039215685 flow(pv_electricityBus_1_2) ++12.745098039215685 flow(pv_electricityBus_1_3) ++12.49519415609381 flow(pv_electricityBus_2_4) ++12.49519415609381 flow(pv_electricityBus_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(pv_electricityBus_0_0) += 50000.0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(pv_electricityBus_0_1) += 80000.0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(pv_electricityBus_1_2) += 30000.0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(pv_electricityBus_1_3) += 60000.0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(pv_electricityBus_2_4) += 70000.0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(pv_electricityBus_2_5) += 20000.0 + +c_e_InvestmentFlowBlock_total_rule(pv_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(pv_electricityBus_0) ++1 InvestmentFlowBlock_total(pv_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(pv_electricityBus_1)_: +-1 InvestmentFlowBlock_invest(pv_electricityBus_1) +-1 InvestmentFlowBlock_total(pv_electricityBus_0) ++1 InvestmentFlowBlock_total(pv_electricityBus_1) ++1 InvestmentFlowBlock_old(pv_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(pv_electricityBus_2)_: +-1 InvestmentFlowBlock_invest(pv_electricityBus_2) +-1 InvestmentFlowBlock_total(pv_electricityBus_1) ++1 InvestmentFlowBlock_total(pv_electricityBus_2) ++1 InvestmentFlowBlock_old(pv_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(pv_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(pv_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(pv_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(pv_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(pv_electricityBus_2)_: ++1 InvestmentFlowBlock_old_end(pv_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(pv_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(pv_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(pv_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(pv_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(pv_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(pv_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(pv_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(pv_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(pv_electricityBus_0) ++1 InvestmentFlowBlock_old(pv_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(pv_electricityBus_1)_: ++1 InvestmentFlowBlock_old(pv_electricityBus_1) +-1 InvestmentFlowBlock_old_end(pv_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(pv_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(pv_electricityBus_2)_: ++1 InvestmentFlowBlock_old(pv_electricityBus_2) +-1 InvestmentFlowBlock_old_end(pv_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(pv_electricityBus_2) += 0 + +c_u_InvestmentFlowBlock_max(pv_electricityBus_0_0)_: ++1 flow(pv_electricityBus_0_0) +-45 InvestmentFlowBlock_total(pv_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(pv_electricityBus_0_1)_: ++1 flow(pv_electricityBus_0_1) +-83 InvestmentFlowBlock_total(pv_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(pv_electricityBus_1_2)_: ++1 flow(pv_electricityBus_1_2) +-65 InvestmentFlowBlock_total(pv_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(pv_electricityBus_1_3)_: ++1 flow(pv_electricityBus_1_3) +-67 InvestmentFlowBlock_total(pv_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(pv_electricityBus_2_4)_: ++1 flow(pv_electricityBus_2_4) +-33 InvestmentFlowBlock_total(pv_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(pv_electricityBus_2_5)_: ++1 flow(pv_electricityBus_2_5) +-96 InvestmentFlowBlock_total(pv_electricityBus_2) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(pv_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(pv_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_invest(pv_electricityBus_2) <= +inf + 0 <= flow(pv_electricityBus_0_0) <= +inf + 0 <= flow(pv_electricityBus_0_1) <= +inf + 0 <= flow(pv_electricityBus_1_2) <= +inf + 0 <= flow(pv_electricityBus_1_3) <= +inf + 0 <= flow(pv_electricityBus_2_4) <= +inf + 0 <= flow(pv_electricityBus_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(pv_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(pv_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(pv_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(pv_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(pv_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(pv_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(pv_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(pv_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(pv_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(pv_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(pv_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(pv_electricityBus_0) <= +inf +end diff --git a/tests/lp_files/investment_limit.lp b/tests/lp_files/investment_limit.lp index bcdfec4d0..c52f8973b 100644 --- a/tests/lp_files/investment_limit.lp +++ b/tests/lp_files/investment_limit.lp @@ -1,104 +1,124 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+145 GenericInvestmentStorageBlock_invest(storage_invest_limit) -+123 InvestmentFlowBlock_invest(Source_Bus1) ++123 InvestmentFlowBlock_invest(Source_Bus1_0) ++145 GenericInvestmentStorageBlock_invest(storage_invest_limit_0) s.t. c_u_investment_limit_: -+145 GenericInvestmentStorageBlock_invest(storage_invest_limit) -+123 InvestmentFlowBlock_invest(Source_Bus1) ++123 InvestmentFlowBlock_invest(Source_Bus1_0) ++145 GenericInvestmentStorageBlock_invest(storage_invest_limit_0) <= 900 -c_e_BusBlock_balance(Bus1_0)_: --1 flow(Bus1_storage_invest_limit_0) -+1 flow(Source_Bus1_0) -+1 flow(storage_invest_limit_Bus1_0) +c_e_BusBlock_balance(Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) ++1 flow(storage_invest_limit_Bus1_0_0) +-1 flow(Bus1_storage_invest_limit_0_0) = 0 -c_e_BusBlock_balance(Bus1_1)_: --1 flow(Bus1_storage_invest_limit_1) -+1 flow(Source_Bus1_1) -+1 flow(storage_invest_limit_Bus1_1) +c_e_BusBlock_balance(Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) ++1 flow(storage_invest_limit_Bus1_0_1) +-1 flow(Bus1_storage_invest_limit_0_1) = 0 -c_e_BusBlock_balance(Bus1_2)_: --1 flow(Bus1_storage_invest_limit_2) -+1 flow(Source_Bus1_2) -+1 flow(storage_invest_limit_Bus1_2) +c_e_BusBlock_balance(Bus1_0_2)_: ++1 flow(Source_Bus1_0_2) ++1 flow(storage_invest_limit_Bus1_0_2) +-1 flow(Bus1_storage_invest_limit_0_2) = 0 -c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_0)_: --1 InvestmentFlowBlock_invest(Bus1_storage_invest_limit) -+1 flow(Bus1_storage_invest_limit_0) +c_e_InvestmentFlowBlock_total_rule(Bus1_storage_invest_limit_0)_: ++1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) +-1 InvestmentFlowBlock_invest(Bus1_storage_invest_limit_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_invest_limit_Bus1_0)_: ++1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) +-1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_0) += 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_0_0)_: ++1 flow(Bus1_storage_invest_limit_0_0) +-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) <= 0 -c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_1)_: --1 InvestmentFlowBlock_invest(Bus1_storage_invest_limit) -+1 flow(Bus1_storage_invest_limit_1) +c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_0_1)_: ++1 flow(Bus1_storage_invest_limit_0_1) +-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) <= 0 -c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_2)_: --1 InvestmentFlowBlock_invest(Bus1_storage_invest_limit) -+1 flow(Bus1_storage_invest_limit_2) +c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_0_2)_: ++1 flow(Bus1_storage_invest_limit_0_2) +-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) <= 0 -c_u_InvestmentFlowBlock_max(Source_Bus1_0)_: --1 InvestmentFlowBlock_invest(Source_Bus1) -+1 flow(Source_Bus1_0) +c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_0_0)_: ++1 flow(storage_invest_limit_Bus1_0_0) +-1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(Source_Bus1_1)_: --1 InvestmentFlowBlock_invest(Source_Bus1) -+1 flow(Source_Bus1_1) +c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_0_1)_: ++1 flow(storage_invest_limit_Bus1_0_1) +-1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(Source_Bus1_2)_: --1 InvestmentFlowBlock_invest(Source_Bus1) -+1 flow(Source_Bus1_2) +c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_0_2)_: ++1 flow(storage_invest_limit_Bus1_0_2) +-1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_0)_: --1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1) -+1 flow(storage_invest_limit_Bus1_0) +c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 InvestmentFlowBlock_total(Source_Bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_1)_: --1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1) -+1 flow(storage_invest_limit_Bus1_1) +c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_2)_: --1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1) -+1 flow(storage_invest_limit_Bus1_2) +c_u_InvestmentFlowBlock_max(Source_Bus1_0_2)_: ++1 flow(Source_Bus1_0_2) +-1 InvestmentFlowBlock_total(Source_Bus1_0) <= 0 +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_invest_limit_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_invest_limit_0) ++1 GenericInvestmentStorageBlock_total(storage_invest_limit_0) += 0 + c_u_GenericInvestmentStorageBlock_init_content_limit(storage_invest_limit)_: +-1 GenericInvestmentStorageBlock_invest(storage_invest_limit_0) +1 GenericInvestmentStorageBlock_init_content(storage_invest_limit) --1 GenericInvestmentStorageBlock_invest(storage_invest_limit) <= 0 c_e_GenericInvestmentStorageBlock_balance_first(storage_invest_limit)_: ++1 flow(storage_invest_limit_Bus1_0_0) +-1 flow(Bus1_storage_invest_limit_0_0) -1 GenericInvestmentStorageBlock_init_content(storage_invest_limit) +1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_0) --1 flow(Bus1_storage_invest_limit_0) -+1 flow(storage_invest_limit_Bus1_0) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage_invest_limit_1)_: +c_e_GenericInvestmentStorageBlock_balance(storage_invest_limit_0_1)_: ++1 flow(storage_invest_limit_Bus1_0_1) +-1 flow(Bus1_storage_invest_limit_0_1) -1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_0) +1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_1) --1 flow(Bus1_storage_invest_limit_1) -+1 flow(storage_invest_limit_Bus1_1) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage_invest_limit_2)_: +c_e_GenericInvestmentStorageBlock_balance(storage_invest_limit_0_2)_: ++1 flow(storage_invest_limit_Bus1_0_2) +-1 flow(Bus1_storage_invest_limit_0_2) -1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_1) +1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_2) --1 flow(Bus1_storage_invest_limit_2) -+1 flow(storage_invest_limit_Bus1_2) = 0 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_invest_limit)_: @@ -106,50 +126,51 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_invest_limit)_: +1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_2) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_invest_limit)_: --0.20000000000000001 GenericInvestmentStorageBlock_invest(storage_invest_limit) -+1 InvestmentFlowBlock_invest(Bus1_storage_invest_limit) +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_invest_limit_0)_: ++1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) +-0.2 GenericInvestmentStorageBlock_total(storage_invest_limit_0) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_invest_limit)_: --0.20000000000000001 GenericInvestmentStorageBlock_invest(storage_invest_limit) -+1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1) +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_invest_limit_0)_: ++1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) +-0.2 GenericInvestmentStorageBlock_total(storage_invest_limit_0) = 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_0)_: --1 GenericInvestmentStorageBlock_invest(storage_invest_limit) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage_invest_limit_0) +1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_0) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_1)_: --1 GenericInvestmentStorageBlock_invest(storage_invest_limit) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage_invest_limit_0) +1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_1) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_2)_: --1 GenericInvestmentStorageBlock_invest(storage_invest_limit) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_0_2)_: +-1 GenericInvestmentStorageBlock_total(storage_invest_limit_0) +1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(Bus1_storage_invest_limit_0) <= +inf - 0 <= flow(Bus1_storage_invest_limit_1) <= +inf - 0 <= flow(Bus1_storage_invest_limit_2) <= +inf - 0 <= flow(Source_Bus1_0) <= +inf - 0 <= flow(Source_Bus1_1) <= +inf - 0 <= flow(Source_Bus1_2) <= +inf - 0 <= flow(storage_invest_limit_Bus1_0) <= +inf - 0 <= flow(storage_invest_limit_Bus1_1) <= +inf - 0 <= flow(storage_invest_limit_Bus1_2) <= +inf - 0 <= InvestmentFlowBlock_invest(Bus1_storage_invest_limit) <= +inf - 0 <= InvestmentFlowBlock_invest(Source_Bus1) <= +inf - 0 <= InvestmentFlowBlock_invest(storage_invest_limit_Bus1) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_invest_limit_0) <= +inf + 0 <= flow(Source_Bus1_0_0) <= +inf + 0 <= flow(storage_invest_limit_Bus1_0_0) <= +inf + 0 <= flow(Bus1_storage_invest_limit_0_0) <= +inf + 0 <= flow(Source_Bus1_0_1) <= +inf + 0 <= flow(storage_invest_limit_Bus1_0_1) <= +inf + 0 <= flow(Bus1_storage_invest_limit_0_1) <= +inf + 0 <= flow(Source_Bus1_0_2) <= +inf + 0 <= flow(storage_invest_limit_Bus1_0_2) <= +inf + 0 <= flow(Bus1_storage_invest_limit_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_storage_invest_limit_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_invest_limit_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_invest_limit_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage_invest_limit) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage_invest_limit_0) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage_invest_limit_1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage_invest_limit_2) <= +inf - 0 <= GenericInvestmentStorageBlock_invest(storage_invest_limit) <= +inf - 0 <= GenericInvestmentStorageBlock_init_content(storage_invest_limit) <= +inf end diff --git a/tests/lp_files/investment_limit_with_dsm_DIW.lp b/tests/lp_files/investment_limit_with_dsm_DIW.lp new file mode 100644 index 000000000..2f1f88c0f --- /dev/null +++ b/tests/lp_files/investment_limit_with_dsm_DIW.lp @@ -0,0 +1,211 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++123 InvestmentFlowBlock_invest(Source_Bus1_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) ++0.5 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_2) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) ++100 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_0) + +s.t. + +c_u_investment_limit_: ++123 InvestmentFlowBlock_invest(Source_Bus1_0) ++100 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_0) +<= 900 + +c_e_BusBlock_balance(Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 flow(Bus1_sink_dsm_DIW_0_0) += 0 + +c_e_BusBlock_balance(Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 flow(Bus1_sink_dsm_DIW_0_1) += 0 + +c_e_BusBlock_balance(Bus1_0_2)_: ++1 flow(Source_Bus1_0_2) +-1 flow(Bus1_sink_dsm_DIW_0_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_0) += 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_2)_: ++1 flow(Source_Bus1_0_2) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(sink_dsm_DIW_0)_: +-1 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) += 50 + +c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(sink_dsm_DIW_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(sink_dsm_DIW_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(sink_dsm_DIW_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(sink_dsm_DIW_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) +-1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) ++1 flow(Bus1_sink_dsm_DIW_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_0) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(sink_dsm_DIW_0_1)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) ++1 flow(Bus1_sink_dsm_DIW_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_1) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(sink_dsm_DIW_0_2)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) ++1 flow(Bus1_sink_dsm_DIW_0_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_2) += 1 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(sink_dsm_DIW_0)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(sink_dsm_DIW_1)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(sink_dsm_DIW_2)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) += 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(sink_dsm_DIW_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(sink_dsm_DIW_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(sink_dsm_DIW_0_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(sink_dsm_DIW_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(sink_dsm_DIW_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(sink_dsm_DIW_0_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(sink_dsm_DIW_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(sink_dsm_DIW_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(sink_dsm_DIW_0_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_2) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) <= +inf + 33 <= SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_0) <= 100 + 0 <= flow(Source_Bus1_0_0) <= +inf + 0 <= flow(Bus1_sink_dsm_DIW_0_0) <= +inf + 0 <= flow(Source_Bus1_0_1) <= +inf + 0 <= flow(Bus1_sink_dsm_DIW_0_1) <= +inf + 0 <= flow(Source_Bus1_0_2) <= +inf + 0 <= flow(Bus1_sink_dsm_DIW_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_2) <= +inf +end diff --git a/tests/lp_files/investment_limit_with_dsm_DLR.lp b/tests/lp_files/investment_limit_with_dsm_DLR.lp new file mode 100644 index 000000000..d6d74c5de --- /dev/null +++ b/tests/lp_files/investment_limit_with_dsm_DLR.lp @@ -0,0 +1,308 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++123 InvestmentFlowBlock_invest(Source_Bus1_0) ++0.5 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++0.5 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) ++0.5 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) ++0.5 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) ++0.5 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) ++0.5 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) ++0.5 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++0.5 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) ++0.5 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) ++0.5 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) ++0.5 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) ++0.5 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) ++100 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_0) + +s.t. + +c_u_investment_limit_: ++123 InvestmentFlowBlock_invest(Source_Bus1_0) ++100 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_0) +<= 900 + +c_e_BusBlock_balance(Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 flow(Bus1_sink_dsm_DLR_0_0) += 0 + +c_e_BusBlock_balance(Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 flow(Bus1_sink_dsm_DLR_0_1) += 0 + +c_e_BusBlock_balance(Bus1_0_2)_: ++1 flow(Source_Bus1_0_2) +-1 flow(Bus1_sink_dsm_DLR_0_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_0) += 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_2)_: ++1 flow(Source_Bus1_0_2) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(sink_dsm_DLR_0)_: +-1 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) += 50 + +c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(sink_dsm_DLR_1_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(sink_dsm_DLR_1_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(sink_dsm_DLR_1_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(sink_dsm_DLR_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) ++1 flow(Bus1_sink_dsm_DLR_0_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_0) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(sink_dsm_DLR_0_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) ++1 flow(Bus1_sink_dsm_DLR_0_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(sink_dsm_DLR_0_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) ++1 flow(Bus1_sink_dsm_DLR_0_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2) += 1 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_red(sink_dsm_DLR_1_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(sink_dsm_DLR_1_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) += 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(sink_dsm_DLR_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(sink_dsm_DLR_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(sink_dsm_DLR_0_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(sink_dsm_DLR_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(sink_dsm_DLR_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(sink_dsm_DLR_0_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) +<= 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(sink_dsm_DLR_0)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(sink_dsm_DLR_1)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_0) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(sink_dsm_DLR_2)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_1) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_0)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_0) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_1) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_2) += 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(sink_dsm_DLR_0_0)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(sink_dsm_DLR_0_1)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(sink_dsm_DLR_0_2)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(sink_dsm_DLR_0_0)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(sink_dsm_DLR_0_1)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(sink_dsm_DLR_0_2)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(sink_dsm_DLR_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(sink_dsm_DLR_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(sink_dsm_DLR_0_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) <= +inf + 33 <= SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_0) <= 100 + 0 <= flow(Source_Bus1_0_0) <= +inf + 0 <= flow(Bus1_sink_dsm_DLR_0_0) <= +inf + 0 <= flow(Source_Bus1_0_1) <= +inf + 0 <= flow(Bus1_sink_dsm_DLR_0_1) <= +inf + 0 <= flow(Source_Bus1_0_2) <= +inf + 0 <= flow(Bus1_sink_dsm_DLR_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_2) <= +inf +end diff --git a/tests/lp_files/investment_limit_with_dsm_oemof.lp b/tests/lp_files/investment_limit_with_dsm_oemof.lp new file mode 100644 index 000000000..ecfc14250 --- /dev/null +++ b/tests/lp_files/investment_limit_with_dsm_oemof.lp @@ -0,0 +1,154 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++123 InvestmentFlowBlock_invest(Source_Bus1_0) ++0.5 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0) ++0.5 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_0) ++0.5 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) ++0.5 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) ++0.5 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_2) ++0.5 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2) ++100 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_0) + +s.t. + +c_u_investment_limit_: ++123 InvestmentFlowBlock_invest(Source_Bus1_0) ++100 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_0) +<= 900 + +c_e_BusBlock_balance(Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 flow(Bus1_sink_dsm_oemof_0_0) += 0 + +c_e_BusBlock_balance(Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 flow(Bus1_sink_dsm_oemof_0_1) += 0 + +c_e_BusBlock_balance(Bus1_0_2)_: ++1 flow(Source_Bus1_0_2) +-1 flow(Bus1_sink_dsm_oemof_0_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_0) += 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_2)_: ++1 flow(Source_Bus1_0_2) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(sink_dsm_oemof_0)_: +-1 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) += 50 + +c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(sink_dsm_oemof_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_0) += 0 + +c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(sink_dsm_oemof_1)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(sink_dsm_oemof_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(sink_dsm_oemof_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0) +-1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_0) ++1 flow(Bus1_sink_dsm_oemof_0_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_0) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(sink_dsm_oemof_0_1)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) ++1 flow(Bus1_sink_dsm_oemof_0_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_1) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(sink_dsm_oemof_0_2)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2) ++1 flow(Bus1_sink_dsm_oemof_0_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_2) += 1 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(sink_dsm_oemof_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_0) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(sink_dsm_oemof_0_1)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(sink_dsm_oemof_0_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_2) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(sink_dsm_oemof_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(sink_dsm_oemof_0_1)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(sink_dsm_oemof_0_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_2) +<= 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(sink_dsm_oemof_0)_: +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) += 0 + +bounds + 0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2) <= +inf + 33 <= SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_0) <= 100 + 0 <= flow(Source_Bus1_0_0) <= +inf + 0 <= flow(Bus1_sink_dsm_oemof_0_0) <= +inf + 0 <= flow(Source_Bus1_0_1) <= +inf + 0 <= flow(Bus1_sink_dsm_oemof_0_1) <= +inf + 0 <= flow(Source_Bus1_0_2) <= +inf + 0 <= flow(Bus1_sink_dsm_oemof_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_2) <= +inf +end diff --git a/tests/lp_files/linear_converter.lp b/tests/lp_files/linear_converter.lp new file mode 100644 index 000000000..86eddb60f --- /dev/null +++ b/tests/lp_files/linear_converter.lp @@ -0,0 +1,57 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++50 flow(powerplantGas_electricity_0_0) ++50 flow(powerplantGas_electricity_0_1) ++50 flow(powerplantGas_electricity_0_2) + +s.t. + +c_e_BusBlock_balance(gas_0_0)_: ++1 flow(gas_powerplantGas_0_0) += 0 + +c_e_BusBlock_balance(gas_0_1)_: ++1 flow(gas_powerplantGas_0_1) += 0 + +c_e_BusBlock_balance(gas_0_2)_: ++1 flow(gas_powerplantGas_0_2) += 0 + +c_e_BusBlock_balance(electricity_0_0)_: ++1 flow(powerplantGas_electricity_0_0) += 0 + +c_e_BusBlock_balance(electricity_0_1)_: ++1 flow(powerplantGas_electricity_0_1) += 0 + +c_e_BusBlock_balance(electricity_0_2)_: ++1 flow(powerplantGas_electricity_0_2) += 0 + +c_e_ConverterBlock_relation(powerplantGas_gas_electricity_0_0)_: +-1 flow(powerplantGas_electricity_0_0) ++0.58 flow(gas_powerplantGas_0_0) += 0 + +c_e_ConverterBlock_relation(powerplantGas_gas_electricity_0_1)_: +-1 flow(powerplantGas_electricity_0_1) ++0.58 flow(gas_powerplantGas_0_1) += 0 + +c_e_ConverterBlock_relation(powerplantGas_gas_electricity_0_2)_: +-1 flow(powerplantGas_electricity_0_2) ++0.58 flow(gas_powerplantGas_0_2) += 0 + +bounds + 0.0 <= flow(powerplantGas_electricity_0_0) <= 100000000000.0 + 0.0 <= flow(powerplantGas_electricity_0_1) <= 100000000000.0 + 0.0 <= flow(powerplantGas_electricity_0_2) <= 100000000000.0 + 0 <= flow(gas_powerplantGas_0_0) <= +inf + 0 <= flow(gas_powerplantGas_0_1) <= +inf + 0 <= flow(gas_powerplantGas_0_2) <= +inf +end diff --git a/tests/lp_files/linear_converter_chp.lp b/tests/lp_files/linear_converter_chp.lp new file mode 100644 index 000000000..adf6125be --- /dev/null +++ b/tests/lp_files/linear_converter_chp.lp @@ -0,0 +1,87 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++50 flow(gasBus_CHPpowerplantGas_0_0) ++50 flow(gasBus_CHPpowerplantGas_0_1) ++50 flow(gasBus_CHPpowerplantGas_0_2) + +s.t. + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_CHPpowerplantGas_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_CHPpowerplantGas_0_1) += 0 + +c_e_BusBlock_balance(gasBus_0_2)_: ++1 flow(gasBus_CHPpowerplantGas_0_2) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(CHPpowerplantGas_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(CHPpowerplantGas_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(CHPpowerplantGas_electricityBus_0_2) += 0 + +c_e_BusBlock_balance(heatBus_0_0)_: ++1 flow(CHPpowerplantGas_heatBus_0_0) += 0 + +c_e_BusBlock_balance(heatBus_0_1)_: ++1 flow(CHPpowerplantGas_heatBus_0_1) += 0 + +c_e_BusBlock_balance(heatBus_0_2)_: ++1 flow(CHPpowerplantGas_heatBus_0_2) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_0)_: ++0.4 flow(gasBus_CHPpowerplantGas_0_0) +-1 flow(CHPpowerplantGas_electricityBus_0_0) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_heatBus_0_0)_: ++0.5 flow(gasBus_CHPpowerplantGas_0_0) +-1 flow(CHPpowerplantGas_heatBus_0_0) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_1)_: ++0.4 flow(gasBus_CHPpowerplantGas_0_1) +-1 flow(CHPpowerplantGas_electricityBus_0_1) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_heatBus_0_1)_: ++0.5 flow(gasBus_CHPpowerplantGas_0_1) +-1 flow(CHPpowerplantGas_heatBus_0_1) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_2)_: ++0.4 flow(gasBus_CHPpowerplantGas_0_2) +-1 flow(CHPpowerplantGas_electricityBus_0_2) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_heatBus_0_2)_: ++0.5 flow(gasBus_CHPpowerplantGas_0_2) +-1 flow(CHPpowerplantGas_heatBus_0_2) += 0 + +bounds + 0.0 <= flow(gasBus_CHPpowerplantGas_0_0) <= 100000000000.0 + 0.0 <= flow(gasBus_CHPpowerplantGas_0_1) <= 100000000000.0 + 0.0 <= flow(gasBus_CHPpowerplantGas_0_2) <= 100000000000.0 + 0 <= flow(CHPpowerplantGas_electricityBus_0_0) <= +inf + 0 <= flow(CHPpowerplantGas_electricityBus_0_1) <= +inf + 0 <= flow(CHPpowerplantGas_electricityBus_0_2) <= +inf + 0 <= flow(CHPpowerplantGas_heatBus_0_0) <= +inf + 0 <= flow(CHPpowerplantGas_heatBus_0_1) <= +inf + 0 <= flow(CHPpowerplantGas_heatBus_0_2) <= +inf +end diff --git a/tests/lp_files/linear_converter_chp_invest.lp b/tests/lp_files/linear_converter_chp_invest.lp new file mode 100644 index 000000000..5043bc0be --- /dev/null +++ b/tests/lp_files/linear_converter_chp_invest.lp @@ -0,0 +1,110 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++20 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_0) ++50 flow(gasBus_chp_powerplant_gas_0_0) ++50 flow(gasBus_chp_powerplant_gas_0_1) ++50 flow(gasBus_chp_powerplant_gas_0_2) + +s.t. + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_chp_powerplant_gas_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_chp_powerplant_gas_0_1) += 0 + +c_e_BusBlock_balance(gasBus_0_2)_: ++1 flow(gasBus_chp_powerplant_gas_0_2) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(chp_powerplant_gas_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(chp_powerplant_gas_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(chp_powerplant_gas_electricityBus_0_2) += 0 + +c_e_BusBlock_balance(heatBus_0_0)_: ++1 flow(chp_powerplant_gas_heatBus_0_0) += 0 + +c_e_BusBlock_balance(heatBus_0_1)_: ++1 flow(chp_powerplant_gas_heatBus_0_1) += 0 + +c_e_BusBlock_balance(heatBus_0_2)_: ++1 flow(chp_powerplant_gas_heatBus_0_2) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_electricityBus_0_0)_: ++0.4 flow(gasBus_chp_powerplant_gas_0_0) +-1 flow(chp_powerplant_gas_electricityBus_0_0) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_heatBus_0_0)_: ++0.5 flow(gasBus_chp_powerplant_gas_0_0) +-1 flow(chp_powerplant_gas_heatBus_0_0) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_electricityBus_0_1)_: ++0.4 flow(gasBus_chp_powerplant_gas_0_1) +-1 flow(chp_powerplant_gas_electricityBus_0_1) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_heatBus_0_1)_: ++0.5 flow(gasBus_chp_powerplant_gas_0_1) +-1 flow(chp_powerplant_gas_heatBus_0_1) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_electricityBus_0_2)_: ++0.4 flow(gasBus_chp_powerplant_gas_0_2) +-1 flow(chp_powerplant_gas_electricityBus_0_2) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_heatBus_0_2)_: ++0.5 flow(gasBus_chp_powerplant_gas_0_2) +-1 flow(chp_powerplant_gas_heatBus_0_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(gasBus_chp_powerplant_gas_0)_: +-1 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_0) ++1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) += 0 + +c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_0_0)_: ++1 flow(gasBus_chp_powerplant_gas_0_0) +-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) +<= 0 + +c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_0_1)_: ++1 flow(gasBus_chp_powerplant_gas_0_1) +-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) +<= 0 + +c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_0_2)_: ++1 flow(gasBus_chp_powerplant_gas_0_2) +-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_0) <= 1000 + 0 <= flow(gasBus_chp_powerplant_gas_0_0) <= +inf + 0 <= flow(gasBus_chp_powerplant_gas_0_1) <= +inf + 0 <= flow(gasBus_chp_powerplant_gas_0_2) <= +inf + 0 <= flow(chp_powerplant_gas_electricityBus_0_0) <= +inf + 0 <= flow(chp_powerplant_gas_electricityBus_0_1) <= +inf + 0 <= flow(chp_powerplant_gas_electricityBus_0_2) <= +inf + 0 <= flow(chp_powerplant_gas_heatBus_0_0) <= +inf + 0 <= flow(chp_powerplant_gas_heatBus_0_1) <= +inf + 0 <= flow(chp_powerplant_gas_heatBus_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) <= +inf +end diff --git a/tests/lp_files/linear_converter_chp_invest_multi_period.lp b/tests/lp_files/linear_converter_chp_invest_multi_period.lp new file mode 100644 index 000000000..5b4da4858 --- /dev/null +++ b/tests/lp_files/linear_converter_chp_invest_multi_period.lp @@ -0,0 +1,274 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++31.82320970369655 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_0) ++31.199225199702497 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_1) ++30.587475685982838 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_2) ++50 flow(gasBus_chp_powerplant_gas_0_0) ++50 flow(gasBus_chp_powerplant_gas_0_1) ++49.01960784313725 flow(gasBus_chp_powerplant_gas_1_2) ++49.01960784313725 flow(gasBus_chp_powerplant_gas_1_3) ++48.058439061899264 flow(gasBus_chp_powerplant_gas_2_4) ++48.058439061899264 flow(gasBus_chp_powerplant_gas_2_5) + +s.t. + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_chp_powerplant_gas_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_chp_powerplant_gas_0_1) += 0 + +c_e_BusBlock_balance(gasBus_1_2)_: ++1 flow(gasBus_chp_powerplant_gas_1_2) += 0 + +c_e_BusBlock_balance(gasBus_1_3)_: ++1 flow(gasBus_chp_powerplant_gas_1_3) += 0 + +c_e_BusBlock_balance(gasBus_2_4)_: ++1 flow(gasBus_chp_powerplant_gas_2_4) += 0 + +c_e_BusBlock_balance(gasBus_2_5)_: ++1 flow(gasBus_chp_powerplant_gas_2_5) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(chp_powerplant_gas_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(chp_powerplant_gas_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(chp_powerplant_gas_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(chp_powerplant_gas_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(chp_powerplant_gas_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(chp_powerplant_gas_electricityBus_2_5) += 0 + +c_e_BusBlock_balance(heatBus_0_0)_: ++1 flow(chp_powerplant_gas_heatBus_0_0) += 0 + +c_e_BusBlock_balance(heatBus_0_1)_: ++1 flow(chp_powerplant_gas_heatBus_0_1) += 0 + +c_e_BusBlock_balance(heatBus_1_2)_: ++1 flow(chp_powerplant_gas_heatBus_1_2) += 0 + +c_e_BusBlock_balance(heatBus_1_3)_: ++1 flow(chp_powerplant_gas_heatBus_1_3) += 0 + +c_e_BusBlock_balance(heatBus_2_4)_: ++1 flow(chp_powerplant_gas_heatBus_2_4) += 0 + +c_e_BusBlock_balance(heatBus_2_5)_: ++1 flow(chp_powerplant_gas_heatBus_2_5) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_electricityBus_0_0)_: ++0.4 flow(gasBus_chp_powerplant_gas_0_0) +-1 flow(chp_powerplant_gas_electricityBus_0_0) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_heatBus_0_0)_: ++0.5 flow(gasBus_chp_powerplant_gas_0_0) +-1 flow(chp_powerplant_gas_heatBus_0_0) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_electricityBus_0_1)_: ++0.4 flow(gasBus_chp_powerplant_gas_0_1) +-1 flow(chp_powerplant_gas_electricityBus_0_1) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_heatBus_0_1)_: ++0.5 flow(gasBus_chp_powerplant_gas_0_1) +-1 flow(chp_powerplant_gas_heatBus_0_1) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_electricityBus_1_2)_: ++0.4 flow(gasBus_chp_powerplant_gas_1_2) +-1 flow(chp_powerplant_gas_electricityBus_1_2) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_heatBus_1_2)_: ++0.5 flow(gasBus_chp_powerplant_gas_1_2) +-1 flow(chp_powerplant_gas_heatBus_1_2) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_electricityBus_1_3)_: ++0.4 flow(gasBus_chp_powerplant_gas_1_3) +-1 flow(chp_powerplant_gas_electricityBus_1_3) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_heatBus_1_3)_: ++0.5 flow(gasBus_chp_powerplant_gas_1_3) +-1 flow(chp_powerplant_gas_heatBus_1_3) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_electricityBus_2_4)_: ++0.4 flow(gasBus_chp_powerplant_gas_2_4) +-1 flow(chp_powerplant_gas_electricityBus_2_4) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_heatBus_2_4)_: ++0.5 flow(gasBus_chp_powerplant_gas_2_4) +-1 flow(chp_powerplant_gas_heatBus_2_4) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_electricityBus_2_5)_: ++0.4 flow(gasBus_chp_powerplant_gas_2_5) +-1 flow(chp_powerplant_gas_electricityBus_2_5) += 0 + +c_e_ConverterBlock_relation(chp_powerplant_gas_gasBus_heatBus_2_5)_: ++0.5 flow(gasBus_chp_powerplant_gas_2_5) +-1 flow(chp_powerplant_gas_heatBus_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(gasBus_chp_powerplant_gas_0)_: +-1 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_0) ++1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(gasBus_chp_powerplant_gas_1)_: +-1 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_1) +-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) ++1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_1) ++1 InvestmentFlowBlock_old(gasBus_chp_powerplant_gas_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(gasBus_chp_powerplant_gas_2)_: +-1 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_2) +-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_1) ++1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_2) ++1 InvestmentFlowBlock_old(gasBus_chp_powerplant_gas_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(gasBus_chp_powerplant_gas_0)_: ++1 InvestmentFlowBlock_old_end(gasBus_chp_powerplant_gas_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(gasBus_chp_powerplant_gas_1)_: ++1 InvestmentFlowBlock_old_end(gasBus_chp_powerplant_gas_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(gasBus_chp_powerplant_gas_2)_: ++1 InvestmentFlowBlock_old_end(gasBus_chp_powerplant_gas_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(gasBus_chp_powerplant_gas_0)_: ++1 InvestmentFlowBlock_old_exo(gasBus_chp_powerplant_gas_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(gasBus_chp_powerplant_gas_1)_: ++1 InvestmentFlowBlock_old_exo(gasBus_chp_powerplant_gas_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(gasBus_chp_powerplant_gas_2)_: ++1 InvestmentFlowBlock_old_exo(gasBus_chp_powerplant_gas_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(gasBus_chp_powerplant_gas_0)_: +-1 InvestmentFlowBlock_old_end(gasBus_chp_powerplant_gas_0) +-1 InvestmentFlowBlock_old_exo(gasBus_chp_powerplant_gas_0) ++1 InvestmentFlowBlock_old(gasBus_chp_powerplant_gas_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(gasBus_chp_powerplant_gas_1)_: ++1 InvestmentFlowBlock_old(gasBus_chp_powerplant_gas_1) +-1 InvestmentFlowBlock_old_end(gasBus_chp_powerplant_gas_1) +-1 InvestmentFlowBlock_old_exo(gasBus_chp_powerplant_gas_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(gasBus_chp_powerplant_gas_2)_: ++1 InvestmentFlowBlock_old(gasBus_chp_powerplant_gas_2) +-1 InvestmentFlowBlock_old_end(gasBus_chp_powerplant_gas_2) +-1 InvestmentFlowBlock_old_exo(gasBus_chp_powerplant_gas_2) += 0 + +c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_0_0)_: ++1 flow(gasBus_chp_powerplant_gas_0_0) +-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) +<= 0 + +c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_0_1)_: ++1 flow(gasBus_chp_powerplant_gas_0_1) +-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) +<= 0 + +c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_1_2)_: ++1 flow(gasBus_chp_powerplant_gas_1_2) +-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_1) +<= 0 + +c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_1_3)_: ++1 flow(gasBus_chp_powerplant_gas_1_3) +-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_1) +<= 0 + +c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_2_4)_: ++1 flow(gasBus_chp_powerplant_gas_2_4) +-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_2) +<= 0 + +c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_2_5)_: ++1 flow(gasBus_chp_powerplant_gas_2_5) +-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_2) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_0) <= 1000 + 0 <= InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_1) <= 1000 + 0 <= InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_2) <= 1000 + 0 <= flow(gasBus_chp_powerplant_gas_0_0) <= +inf + 0 <= flow(gasBus_chp_powerplant_gas_0_1) <= +inf + 0 <= flow(gasBus_chp_powerplant_gas_1_2) <= +inf + 0 <= flow(gasBus_chp_powerplant_gas_1_3) <= +inf + 0 <= flow(gasBus_chp_powerplant_gas_2_4) <= +inf + 0 <= flow(gasBus_chp_powerplant_gas_2_5) <= +inf + 0 <= flow(chp_powerplant_gas_electricityBus_0_0) <= +inf + 0 <= flow(chp_powerplant_gas_electricityBus_0_1) <= +inf + 0 <= flow(chp_powerplant_gas_electricityBus_1_2) <= +inf + 0 <= flow(chp_powerplant_gas_electricityBus_1_3) <= +inf + 0 <= flow(chp_powerplant_gas_electricityBus_2_4) <= +inf + 0 <= flow(chp_powerplant_gas_electricityBus_2_5) <= +inf + 0 <= flow(chp_powerplant_gas_heatBus_0_0) <= +inf + 0 <= flow(chp_powerplant_gas_heatBus_0_1) <= +inf + 0 <= flow(chp_powerplant_gas_heatBus_1_2) <= +inf + 0 <= flow(chp_powerplant_gas_heatBus_1_3) <= +inf + 0 <= flow(chp_powerplant_gas_heatBus_2_4) <= +inf + 0 <= flow(chp_powerplant_gas_heatBus_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) <= +inf + 0 <= InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_1) <= +inf + 0 <= InvestmentFlowBlock_old(gasBus_chp_powerplant_gas_1) <= +inf + 0 <= InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_2) <= +inf + 0 <= InvestmentFlowBlock_old(gasBus_chp_powerplant_gas_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(gasBus_chp_powerplant_gas_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(gasBus_chp_powerplant_gas_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(gasBus_chp_powerplant_gas_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(gasBus_chp_powerplant_gas_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(gasBus_chp_powerplant_gas_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(gasBus_chp_powerplant_gas_2) <= +inf + 0 <= InvestmentFlowBlock_old(gasBus_chp_powerplant_gas_0) <= +inf +end diff --git a/tests/lp_files/linear_converter_chp_multi_period.lp b/tests/lp_files/linear_converter_chp_multi_period.lp new file mode 100644 index 000000000..a79705ef9 --- /dev/null +++ b/tests/lp_files/linear_converter_chp_multi_period.lp @@ -0,0 +1,165 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++50 flow(gasBus_CHPpowerplantGas_0_0) ++50 flow(gasBus_CHPpowerplantGas_0_1) ++49.01960784313725 flow(gasBus_CHPpowerplantGas_1_2) ++49.01960784313725 flow(gasBus_CHPpowerplantGas_1_3) ++48.058439061899264 flow(gasBus_CHPpowerplantGas_2_4) ++48.058439061899264 flow(gasBus_CHPpowerplantGas_2_5) + +s.t. + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_CHPpowerplantGas_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_CHPpowerplantGas_0_1) += 0 + +c_e_BusBlock_balance(gasBus_1_2)_: ++1 flow(gasBus_CHPpowerplantGas_1_2) += 0 + +c_e_BusBlock_balance(gasBus_1_3)_: ++1 flow(gasBus_CHPpowerplantGas_1_3) += 0 + +c_e_BusBlock_balance(gasBus_2_4)_: ++1 flow(gasBus_CHPpowerplantGas_2_4) += 0 + +c_e_BusBlock_balance(gasBus_2_5)_: ++1 flow(gasBus_CHPpowerplantGas_2_5) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(CHPpowerplantGas_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(CHPpowerplantGas_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(CHPpowerplantGas_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(CHPpowerplantGas_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(CHPpowerplantGas_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(CHPpowerplantGas_electricityBus_2_5) += 0 + +c_e_BusBlock_balance(heatBus_0_0)_: ++1 flow(CHPpowerplantGas_heatBus_0_0) += 0 + +c_e_BusBlock_balance(heatBus_0_1)_: ++1 flow(CHPpowerplantGas_heatBus_0_1) += 0 + +c_e_BusBlock_balance(heatBus_1_2)_: ++1 flow(CHPpowerplantGas_heatBus_1_2) += 0 + +c_e_BusBlock_balance(heatBus_1_3)_: ++1 flow(CHPpowerplantGas_heatBus_1_3) += 0 + +c_e_BusBlock_balance(heatBus_2_4)_: ++1 flow(CHPpowerplantGas_heatBus_2_4) += 0 + +c_e_BusBlock_balance(heatBus_2_5)_: ++1 flow(CHPpowerplantGas_heatBus_2_5) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_0)_: ++0.4 flow(gasBus_CHPpowerplantGas_0_0) +-1 flow(CHPpowerplantGas_electricityBus_0_0) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_heatBus_0_0)_: ++0.5 flow(gasBus_CHPpowerplantGas_0_0) +-1 flow(CHPpowerplantGas_heatBus_0_0) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_1)_: ++0.4 flow(gasBus_CHPpowerplantGas_0_1) +-1 flow(CHPpowerplantGas_electricityBus_0_1) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_heatBus_0_1)_: ++0.5 flow(gasBus_CHPpowerplantGas_0_1) +-1 flow(CHPpowerplantGas_heatBus_0_1) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_electricityBus_1_2)_: ++0.4 flow(gasBus_CHPpowerplantGas_1_2) +-1 flow(CHPpowerplantGas_electricityBus_1_2) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_heatBus_1_2)_: ++0.5 flow(gasBus_CHPpowerplantGas_1_2) +-1 flow(CHPpowerplantGas_heatBus_1_2) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_electricityBus_1_3)_: ++0.4 flow(gasBus_CHPpowerplantGas_1_3) +-1 flow(CHPpowerplantGas_electricityBus_1_3) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_heatBus_1_3)_: ++0.5 flow(gasBus_CHPpowerplantGas_1_3) +-1 flow(CHPpowerplantGas_heatBus_1_3) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_electricityBus_2_4)_: ++0.4 flow(gasBus_CHPpowerplantGas_2_4) +-1 flow(CHPpowerplantGas_electricityBus_2_4) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_heatBus_2_4)_: ++0.5 flow(gasBus_CHPpowerplantGas_2_4) +-1 flow(CHPpowerplantGas_heatBus_2_4) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_electricityBus_2_5)_: ++0.4 flow(gasBus_CHPpowerplantGas_2_5) +-1 flow(CHPpowerplantGas_electricityBus_2_5) += 0 + +c_e_ConverterBlock_relation(CHPpowerplantGas_gasBus_heatBus_2_5)_: ++0.5 flow(gasBus_CHPpowerplantGas_2_5) +-1 flow(CHPpowerplantGas_heatBus_2_5) += 0 + +bounds + 0.0 <= flow(gasBus_CHPpowerplantGas_0_0) <= 100000000000.0 + 0.0 <= flow(gasBus_CHPpowerplantGas_0_1) <= 100000000000.0 + 0.0 <= flow(gasBus_CHPpowerplantGas_1_2) <= 100000000000.0 + 0.0 <= flow(gasBus_CHPpowerplantGas_1_3) <= 100000000000.0 + 0.0 <= flow(gasBus_CHPpowerplantGas_2_4) <= 100000000000.0 + 0.0 <= flow(gasBus_CHPpowerplantGas_2_5) <= 100000000000.0 + 0 <= flow(CHPpowerplantGas_electricityBus_0_0) <= +inf + 0 <= flow(CHPpowerplantGas_electricityBus_0_1) <= +inf + 0 <= flow(CHPpowerplantGas_electricityBus_1_2) <= +inf + 0 <= flow(CHPpowerplantGas_electricityBus_1_3) <= +inf + 0 <= flow(CHPpowerplantGas_electricityBus_2_4) <= +inf + 0 <= flow(CHPpowerplantGas_electricityBus_2_5) <= +inf + 0 <= flow(CHPpowerplantGas_heatBus_0_0) <= +inf + 0 <= flow(CHPpowerplantGas_heatBus_0_1) <= +inf + 0 <= flow(CHPpowerplantGas_heatBus_1_2) <= +inf + 0 <= flow(CHPpowerplantGas_heatBus_1_3) <= +inf + 0 <= flow(CHPpowerplantGas_heatBus_2_4) <= +inf + 0 <= flow(CHPpowerplantGas_heatBus_2_5) <= +inf +end diff --git a/tests/lp_files/linear_converter_invest.lp b/tests/lp_files/linear_converter_invest.lp new file mode 100644 index 000000000..f8eee0a23 --- /dev/null +++ b/tests/lp_files/linear_converter_invest.lp @@ -0,0 +1,80 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++20 InvestmentFlowBlock_invest(powerplant_gas_electricity_0) ++50 flow(powerplant_gas_electricity_0_0) ++50 flow(powerplant_gas_electricity_0_1) ++50 flow(powerplant_gas_electricity_0_2) + +s.t. + +c_e_BusBlock_balance(gas_0_0)_: ++1 flow(gas_powerplant_gas_0_0) += 0 + +c_e_BusBlock_balance(gas_0_1)_: ++1 flow(gas_powerplant_gas_0_1) += 0 + +c_e_BusBlock_balance(gas_0_2)_: ++1 flow(gas_powerplant_gas_0_2) += 0 + +c_e_BusBlock_balance(electricity_0_0)_: ++1 flow(powerplant_gas_electricity_0_0) += 0 + +c_e_BusBlock_balance(electricity_0_1)_: ++1 flow(powerplant_gas_electricity_0_1) += 0 + +c_e_BusBlock_balance(electricity_0_2)_: ++1 flow(powerplant_gas_electricity_0_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_0_0)_: +-1 flow(powerplant_gas_electricity_0_0) ++0.58 flow(gas_powerplant_gas_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_0_1)_: +-1 flow(powerplant_gas_electricity_0_1) ++0.58 flow(gas_powerplant_gas_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_0_2)_: +-1 flow(powerplant_gas_electricity_0_2) ++0.58 flow(gas_powerplant_gas_0_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_0)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_electricity_0) ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) += 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_0_0)_: ++1 flow(powerplant_gas_electricity_0_0) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_0_1)_: ++1 flow(powerplant_gas_electricity_0_1) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_0_2)_: ++1 flow(powerplant_gas_electricity_0_2) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(powerplant_gas_electricity_0) <= 1000 + 0 <= flow(powerplant_gas_electricity_0_0) <= +inf + 0 <= flow(powerplant_gas_electricity_0_1) <= +inf + 0 <= flow(powerplant_gas_electricity_0_2) <= +inf + 0 <= flow(gas_powerplant_gas_0_0) <= +inf + 0 <= flow(gas_powerplant_gas_0_1) <= +inf + 0 <= flow(gas_powerplant_gas_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_electricity_0) <= +inf +end diff --git a/tests/lp_files/linear_converter_invest_multi_period.lp b/tests/lp_files/linear_converter_invest_multi_period.lp new file mode 100644 index 000000000..61139ae3d --- /dev/null +++ b/tests/lp_files/linear_converter_invest_multi_period.lp @@ -0,0 +1,230 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++29.24459823787798 InvestmentFlowBlock_invest(powerplant_gas_electricity_0) ++28.671174743017627 InvestmentFlowBlock_invest(powerplant_gas_electricity_1) ++28.10899484609571 InvestmentFlowBlock_invest(powerplant_gas_electricity_2) ++50 flow(powerplant_gas_electricity_0_0) ++50 flow(powerplant_gas_electricity_0_1) ++49.01960784313725 flow(powerplant_gas_electricity_1_2) ++49.01960784313725 flow(powerplant_gas_electricity_1_3) ++48.058439061899264 flow(powerplant_gas_electricity_2_4) ++48.058439061899264 flow(powerplant_gas_electricity_2_5) + +s.t. + +c_e_BusBlock_balance(gas_0_0)_: ++1 flow(gas_powerplant_gas_0_0) += 0 + +c_e_BusBlock_balance(gas_0_1)_: ++1 flow(gas_powerplant_gas_0_1) += 0 + +c_e_BusBlock_balance(gas_1_2)_: ++1 flow(gas_powerplant_gas_1_2) += 0 + +c_e_BusBlock_balance(gas_1_3)_: ++1 flow(gas_powerplant_gas_1_3) += 0 + +c_e_BusBlock_balance(gas_2_4)_: ++1 flow(gas_powerplant_gas_2_4) += 0 + +c_e_BusBlock_balance(gas_2_5)_: ++1 flow(gas_powerplant_gas_2_5) += 0 + +c_e_BusBlock_balance(electricity_0_0)_: ++1 flow(powerplant_gas_electricity_0_0) += 0 + +c_e_BusBlock_balance(electricity_0_1)_: ++1 flow(powerplant_gas_electricity_0_1) += 0 + +c_e_BusBlock_balance(electricity_1_2)_: ++1 flow(powerplant_gas_electricity_1_2) += 0 + +c_e_BusBlock_balance(electricity_1_3)_: ++1 flow(powerplant_gas_electricity_1_3) += 0 + +c_e_BusBlock_balance(electricity_2_4)_: ++1 flow(powerplant_gas_electricity_2_4) += 0 + +c_e_BusBlock_balance(electricity_2_5)_: ++1 flow(powerplant_gas_electricity_2_5) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_0_0)_: +-1 flow(powerplant_gas_electricity_0_0) ++0.58 flow(gas_powerplant_gas_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_0_1)_: +-1 flow(powerplant_gas_electricity_0_1) ++0.58 flow(gas_powerplant_gas_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_1_2)_: +-1 flow(powerplant_gas_electricity_1_2) ++0.58 flow(gas_powerplant_gas_1_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_1_3)_: +-1 flow(powerplant_gas_electricity_1_3) ++0.58 flow(gas_powerplant_gas_1_3) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_2_4)_: +-1 flow(powerplant_gas_electricity_2_4) ++0.58 flow(gas_powerplant_gas_2_4) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_2_5)_: +-1 flow(powerplant_gas_electricity_2_5) ++0.58 flow(gas_powerplant_gas_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_0)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_electricity_0) ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) += 50 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_1)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_electricity_1) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_1) ++1 InvestmentFlowBlock_old(powerplant_gas_electricity_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_2)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_electricity_2) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_1) ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_2) ++1 InvestmentFlowBlock_old(powerplant_gas_electricity_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_electricity_0)_: ++1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_electricity_1)_: ++1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_electricity_2)_: ++1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_electricity_0)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_electricity_1)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_electricity_2)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_electricity_0)_: +-1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_0) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_0) ++1 InvestmentFlowBlock_old(powerplant_gas_electricity_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_electricity_1)_: ++1 InvestmentFlowBlock_old(powerplant_gas_electricity_1) +-1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_1) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_electricity_2)_: ++1 InvestmentFlowBlock_old(powerplant_gas_electricity_2) +-1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_2) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_2) += 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_0_0)_: ++1 flow(powerplant_gas_electricity_0_0) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_0_1)_: ++1 flow(powerplant_gas_electricity_0_1) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_1_2)_: ++1 flow(powerplant_gas_electricity_1_2) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_1) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_1_3)_: ++1 flow(powerplant_gas_electricity_1_3) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_1) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_2_4)_: ++1 flow(powerplant_gas_electricity_2_4) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_2) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_2_5)_: ++1 flow(powerplant_gas_electricity_2_5) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_2) +<= 0 + +c_u_InvestmentFlowBlock_overall_maximum(powerplant_gas_electricity_0)_: ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) +<= 10000 + +c_u_InvestmentFlowBlock_overall_maximum(powerplant_gas_electricity_1)_: ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_1) +<= 10000 + +c_u_InvestmentFlowBlock_overall_maximum(powerplant_gas_electricity_2)_: ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_2) +<= 10000 + +c_l_InvestmentFlowBlock_overall_minimum(powerplant_gas_electricity)_: ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_2) +>= 200 + +bounds + 0 <= InvestmentFlowBlock_invest(powerplant_gas_electricity_0) <= 1000 + 0 <= InvestmentFlowBlock_invest(powerplant_gas_electricity_1) <= 1000 + 0 <= InvestmentFlowBlock_invest(powerplant_gas_electricity_2) <= 1000 + 0 <= flow(powerplant_gas_electricity_0_0) <= +inf + 0 <= flow(powerplant_gas_electricity_0_1) <= +inf + 0 <= flow(powerplant_gas_electricity_1_2) <= +inf + 0 <= flow(powerplant_gas_electricity_1_3) <= +inf + 0 <= flow(powerplant_gas_electricity_2_4) <= +inf + 0 <= flow(powerplant_gas_electricity_2_5) <= +inf + 0 <= flow(gas_powerplant_gas_0_0) <= +inf + 0 <= flow(gas_powerplant_gas_0_1) <= +inf + 0 <= flow(gas_powerplant_gas_1_2) <= +inf + 0 <= flow(gas_powerplant_gas_1_3) <= +inf + 0 <= flow(gas_powerplant_gas_2_4) <= +inf + 0 <= flow(gas_powerplant_gas_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_electricity_0) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_electricity_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_electricity_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_electricity_0) <= +inf +end diff --git a/tests/lp_files/linear_converter_invest_multi_period_old.lp b/tests/lp_files/linear_converter_invest_multi_period_old.lp new file mode 100644 index 000000000..dc0921e45 --- /dev/null +++ b/tests/lp_files/linear_converter_invest_multi_period_old.lp @@ -0,0 +1,231 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++20.601980198019806 InvestmentFlowBlock_invest(powerplant_gas_electricity_0) ++20.1980198019802 InvestmentFlowBlock_invest(powerplant_gas_electricity_1) ++19.801980198019805 InvestmentFlowBlock_invest(powerplant_gas_electricity_2) ++50 flow(powerplant_gas_electricity_0_0) ++50 flow(powerplant_gas_electricity_0_1) ++49.01960784313725 flow(powerplant_gas_electricity_1_2) ++49.01960784313725 flow(powerplant_gas_electricity_1_3) ++48.058439061899264 flow(powerplant_gas_electricity_2_4) ++48.058439061899264 flow(powerplant_gas_electricity_2_5) + +s.t. + +c_e_BusBlock_balance(gas_0_0)_: ++1 flow(gas_powerplant_gas_0_0) += 0 + +c_e_BusBlock_balance(gas_0_1)_: ++1 flow(gas_powerplant_gas_0_1) += 0 + +c_e_BusBlock_balance(gas_1_2)_: ++1 flow(gas_powerplant_gas_1_2) += 0 + +c_e_BusBlock_balance(gas_1_3)_: ++1 flow(gas_powerplant_gas_1_3) += 0 + +c_e_BusBlock_balance(gas_2_4)_: ++1 flow(gas_powerplant_gas_2_4) += 0 + +c_e_BusBlock_balance(gas_2_5)_: ++1 flow(gas_powerplant_gas_2_5) += 0 + +c_e_BusBlock_balance(electricity_0_0)_: ++1 flow(powerplant_gas_electricity_0_0) += 0 + +c_e_BusBlock_balance(electricity_0_1)_: ++1 flow(powerplant_gas_electricity_0_1) += 0 + +c_e_BusBlock_balance(electricity_1_2)_: ++1 flow(powerplant_gas_electricity_1_2) += 0 + +c_e_BusBlock_balance(electricity_1_3)_: ++1 flow(powerplant_gas_electricity_1_3) += 0 + +c_e_BusBlock_balance(electricity_2_4)_: ++1 flow(powerplant_gas_electricity_2_4) += 0 + +c_e_BusBlock_balance(electricity_2_5)_: ++1 flow(powerplant_gas_electricity_2_5) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_0_0)_: +-1 flow(powerplant_gas_electricity_0_0) ++0.58 flow(gas_powerplant_gas_0_0) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_0_1)_: +-1 flow(powerplant_gas_electricity_0_1) ++0.58 flow(gas_powerplant_gas_0_1) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_1_2)_: +-1 flow(powerplant_gas_electricity_1_2) ++0.58 flow(gas_powerplant_gas_1_2) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_1_3)_: +-1 flow(powerplant_gas_electricity_1_3) ++0.58 flow(gas_powerplant_gas_1_3) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_2_4)_: +-1 flow(powerplant_gas_electricity_2_4) ++0.58 flow(gas_powerplant_gas_2_4) += 0 + +c_e_ConverterBlock_relation(powerplant_gas_gas_electricity_2_5)_: +-1 flow(powerplant_gas_electricity_2_5) ++0.58 flow(gas_powerplant_gas_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_0)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_electricity_0) ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) += 50 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_1)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_electricity_1) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_1) ++1 InvestmentFlowBlock_old(powerplant_gas_electricity_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_2)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_electricity_2) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_1) ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_2) ++1 InvestmentFlowBlock_old(powerplant_gas_electricity_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_electricity_0)_: ++1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_electricity_1)_: ++1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(powerplant_gas_electricity_2)_: +-1 InvestmentFlowBlock_invest(powerplant_gas_electricity_0) ++1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_electricity_0)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_electricity_1)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_1) += 50 + +c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_electricity_2)_: ++1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_electricity_0)_: +-1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_0) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_0) ++1 InvestmentFlowBlock_old(powerplant_gas_electricity_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_electricity_1)_: ++1 InvestmentFlowBlock_old(powerplant_gas_electricity_1) +-1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_1) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(powerplant_gas_electricity_2)_: ++1 InvestmentFlowBlock_old(powerplant_gas_electricity_2) +-1 InvestmentFlowBlock_old_end(powerplant_gas_electricity_2) +-1 InvestmentFlowBlock_old_exo(powerplant_gas_electricity_2) += 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_0_0)_: ++1 flow(powerplant_gas_electricity_0_0) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_0_1)_: ++1 flow(powerplant_gas_electricity_0_1) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_1_2)_: ++1 flow(powerplant_gas_electricity_1_2) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_1) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_1_3)_: ++1 flow(powerplant_gas_electricity_1_3) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_1) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_2_4)_: ++1 flow(powerplant_gas_electricity_2_4) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_2) +<= 0 + +c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_2_5)_: ++1 flow(powerplant_gas_electricity_2_5) +-1 InvestmentFlowBlock_total(powerplant_gas_electricity_2) +<= 0 + +c_u_InvestmentFlowBlock_overall_maximum(powerplant_gas_electricity_0)_: ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_0) +<= 10000 + +c_u_InvestmentFlowBlock_overall_maximum(powerplant_gas_electricity_1)_: ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_1) +<= 10000 + +c_u_InvestmentFlowBlock_overall_maximum(powerplant_gas_electricity_2)_: ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_2) +<= 10000 + +c_l_InvestmentFlowBlock_overall_minimum(powerplant_gas_electricity)_: ++1 InvestmentFlowBlock_total(powerplant_gas_electricity_2) +>= 200 + +bounds + 0 <= InvestmentFlowBlock_invest(powerplant_gas_electricity_0) <= 1000 + 0 <= InvestmentFlowBlock_invest(powerplant_gas_electricity_1) <= 1000 + 0 <= InvestmentFlowBlock_invest(powerplant_gas_electricity_2) <= 1000 + 0 <= flow(powerplant_gas_electricity_0_0) <= +inf + 0 <= flow(powerplant_gas_electricity_0_1) <= +inf + 0 <= flow(powerplant_gas_electricity_1_2) <= +inf + 0 <= flow(powerplant_gas_electricity_1_3) <= +inf + 0 <= flow(powerplant_gas_electricity_2_4) <= +inf + 0 <= flow(powerplant_gas_electricity_2_5) <= +inf + 0 <= flow(gas_powerplant_gas_0_0) <= +inf + 0 <= flow(gas_powerplant_gas_0_1) <= +inf + 0 <= flow(gas_powerplant_gas_1_2) <= +inf + 0 <= flow(gas_powerplant_gas_1_3) <= +inf + 0 <= flow(gas_powerplant_gas_2_4) <= +inf + 0 <= flow(gas_powerplant_gas_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_electricity_0) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_total(powerplant_gas_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_electricity_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(powerplant_gas_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_electricity_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(powerplant_gas_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_old(powerplant_gas_electricity_0) <= +inf +end diff --git a/tests/lp_files/linear_converter_multi_period.lp b/tests/lp_files/linear_converter_multi_period.lp new file mode 100644 index 000000000..0f7933422 --- /dev/null +++ b/tests/lp_files/linear_converter_multi_period.lp @@ -0,0 +1,105 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++50 flow(powerplantGas_electricity_0_0) ++50 flow(powerplantGas_electricity_0_1) ++49.01960784313725 flow(powerplantGas_electricity_1_2) ++49.01960784313725 flow(powerplantGas_electricity_1_3) ++48.058439061899264 flow(powerplantGas_electricity_2_4) ++48.058439061899264 flow(powerplantGas_electricity_2_5) + +s.t. + +c_e_BusBlock_balance(gas_0_0)_: ++1 flow(gas_powerplantGas_0_0) += 0 + +c_e_BusBlock_balance(gas_0_1)_: ++1 flow(gas_powerplantGas_0_1) += 0 + +c_e_BusBlock_balance(gas_1_2)_: ++1 flow(gas_powerplantGas_1_2) += 0 + +c_e_BusBlock_balance(gas_1_3)_: ++1 flow(gas_powerplantGas_1_3) += 0 + +c_e_BusBlock_balance(gas_2_4)_: ++1 flow(gas_powerplantGas_2_4) += 0 + +c_e_BusBlock_balance(gas_2_5)_: ++1 flow(gas_powerplantGas_2_5) += 0 + +c_e_BusBlock_balance(electricity_0_0)_: ++1 flow(powerplantGas_electricity_0_0) += 0 + +c_e_BusBlock_balance(electricity_0_1)_: ++1 flow(powerplantGas_electricity_0_1) += 0 + +c_e_BusBlock_balance(electricity_1_2)_: ++1 flow(powerplantGas_electricity_1_2) += 0 + +c_e_BusBlock_balance(electricity_1_3)_: ++1 flow(powerplantGas_electricity_1_3) += 0 + +c_e_BusBlock_balance(electricity_2_4)_: ++1 flow(powerplantGas_electricity_2_4) += 0 + +c_e_BusBlock_balance(electricity_2_5)_: ++1 flow(powerplantGas_electricity_2_5) += 0 + +c_e_ConverterBlock_relation(powerplantGas_gas_electricity_0_0)_: +-1 flow(powerplantGas_electricity_0_0) ++0.58 flow(gas_powerplantGas_0_0) += 0 + +c_e_ConverterBlock_relation(powerplantGas_gas_electricity_0_1)_: +-1 flow(powerplantGas_electricity_0_1) ++0.58 flow(gas_powerplantGas_0_1) += 0 + +c_e_ConverterBlock_relation(powerplantGas_gas_electricity_1_2)_: +-1 flow(powerplantGas_electricity_1_2) ++0.58 flow(gas_powerplantGas_1_2) += 0 + +c_e_ConverterBlock_relation(powerplantGas_gas_electricity_1_3)_: +-1 flow(powerplantGas_electricity_1_3) ++0.58 flow(gas_powerplantGas_1_3) += 0 + +c_e_ConverterBlock_relation(powerplantGas_gas_electricity_2_4)_: +-1 flow(powerplantGas_electricity_2_4) ++0.58 flow(gas_powerplantGas_2_4) += 0 + +c_e_ConverterBlock_relation(powerplantGas_gas_electricity_2_5)_: +-1 flow(powerplantGas_electricity_2_5) ++0.58 flow(gas_powerplantGas_2_5) += 0 + +bounds + 0.0 <= flow(powerplantGas_electricity_0_0) <= 100000000000.0 + 0.0 <= flow(powerplantGas_electricity_0_1) <= 100000000000.0 + 0.0 <= flow(powerplantGas_electricity_1_2) <= 100000000000.0 + 0.0 <= flow(powerplantGas_electricity_1_3) <= 100000000000.0 + 0.0 <= flow(powerplantGas_electricity_2_4) <= 100000000000.0 + 0.0 <= flow(powerplantGas_electricity_2_5) <= 100000000000.0 + 0 <= flow(gas_powerplantGas_0_0) <= +inf + 0 <= flow(gas_powerplantGas_0_1) <= +inf + 0 <= flow(gas_powerplantGas_1_2) <= +inf + 0 <= flow(gas_powerplantGas_1_3) <= +inf + 0 <= flow(gas_powerplantGas_2_4) <= +inf + 0 <= flow(gas_powerplantGas_2_5) <= +inf +end diff --git a/tests/lp_files/linear_transformer.lp b/tests/lp_files/linear_transformer.lp deleted file mode 100644 index 53e15cc28..000000000 --- a/tests/lp_files/linear_transformer.lp +++ /dev/null @@ -1,60 +0,0 @@ -\* Source Pyomo model name=Model *\ - -min -objective: -+50 flow(powerplantGas_electricity_0) -+50 flow(powerplantGas_electricity_1) -+50 flow(powerplantGas_electricity_2) - -s.t. - -c_e_BusBlock_balance(electricity_0)_: -+1 flow(powerplantGas_electricity_0) -= 0 - -c_e_BusBlock_balance(electricity_1)_: -+1 flow(powerplantGas_electricity_1) -= 0 - -c_e_BusBlock_balance(electricity_2)_: -+1 flow(powerplantGas_electricity_2) -= 0 - -c_e_BusBlock_balance(gas_0)_: -+1 flow(gas_powerplantGas_0) -= 0 - -c_e_BusBlock_balance(gas_1)_: -+1 flow(gas_powerplantGas_1) -= 0 - -c_e_BusBlock_balance(gas_2)_: -+1 flow(gas_powerplantGas_2) -= 0 - -c_e_TransformerBlock_relation(powerplantGas_gas_electricity_0)_: -+0.57999999999999996 flow(gas_powerplantGas_0) --1 flow(powerplantGas_electricity_0) -= 0 - -c_e_TransformerBlock_relation(powerplantGas_gas_electricity_1)_: -+0.57999999999999996 flow(gas_powerplantGas_1) --1 flow(powerplantGas_electricity_1) -= 0 - -c_e_TransformerBlock_relation(powerplantGas_gas_electricity_2)_: -+0.57999999999999996 flow(gas_powerplantGas_2) --1 flow(powerplantGas_electricity_2) -= 0 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - -bounds - 0 <= flow(gas_powerplantGas_0) <= +inf - 0 <= flow(gas_powerplantGas_1) <= +inf - 0 <= flow(gas_powerplantGas_2) <= +inf - 0 <= flow(powerplantGas_electricity_0) <= 100000000000 - 0 <= flow(powerplantGas_electricity_1) <= 100000000000 - 0 <= flow(powerplantGas_electricity_2) <= 100000000000 -end diff --git a/tests/lp_files/linear_transformer_chp.lp b/tests/lp_files/linear_transformer_chp.lp deleted file mode 100644 index 132868fca..000000000 --- a/tests/lp_files/linear_transformer_chp.lp +++ /dev/null @@ -1,90 +0,0 @@ -\* Source Pyomo model name=Model *\ - -min -objective: -+50 flow(gasBus_CHPpowerplantGas_0) -+50 flow(gasBus_CHPpowerplantGas_1) -+50 flow(gasBus_CHPpowerplantGas_2) - -s.t. - -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(CHPpowerplantGas_electricityBus_0) -= 0 - -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(CHPpowerplantGas_electricityBus_1) -= 0 - -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(CHPpowerplantGas_electricityBus_2) -= 0 - -c_e_BusBlock_balance(gasBus_0)_: -+1 flow(gasBus_CHPpowerplantGas_0) -= 0 - -c_e_BusBlock_balance(gasBus_1)_: -+1 flow(gasBus_CHPpowerplantGas_1) -= 0 - -c_e_BusBlock_balance(gasBus_2)_: -+1 flow(gasBus_CHPpowerplantGas_2) -= 0 - -c_e_BusBlock_balance(heatBus_0)_: -+1 flow(CHPpowerplantGas_heatBus_0) -= 0 - -c_e_BusBlock_balance(heatBus_1)_: -+1 flow(CHPpowerplantGas_heatBus_1) -= 0 - -c_e_BusBlock_balance(heatBus_2)_: -+1 flow(CHPpowerplantGas_heatBus_2) -= 0 - -c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0)_: --1 flow(CHPpowerplantGas_electricityBus_0) -+0.40000000000000002 flow(gasBus_CHPpowerplantGas_0) -= 0 - -c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_1)_: --1 flow(CHPpowerplantGas_electricityBus_1) -+0.40000000000000002 flow(gasBus_CHPpowerplantGas_1) -= 0 - -c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_2)_: --1 flow(CHPpowerplantGas_electricityBus_2) -+0.40000000000000002 flow(gasBus_CHPpowerplantGas_2) -= 0 - -c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_0)_: --1 flow(CHPpowerplantGas_heatBus_0) -+0.5 flow(gasBus_CHPpowerplantGas_0) -= 0 - -c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_1)_: --1 flow(CHPpowerplantGas_heatBus_1) -+0.5 flow(gasBus_CHPpowerplantGas_1) -= 0 - -c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_2)_: --1 flow(CHPpowerplantGas_heatBus_2) -+0.5 flow(gasBus_CHPpowerplantGas_2) -= 0 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - -bounds - 0 <= flow(CHPpowerplantGas_electricityBus_0) <= +inf - 0 <= flow(CHPpowerplantGas_electricityBus_1) <= +inf - 0 <= flow(CHPpowerplantGas_electricityBus_2) <= +inf - 0 <= flow(CHPpowerplantGas_heatBus_0) <= +inf - 0 <= flow(CHPpowerplantGas_heatBus_1) <= +inf - 0 <= flow(CHPpowerplantGas_heatBus_2) <= +inf - 0 <= flow(gasBus_CHPpowerplantGas_0) <= 100000000000 - 0 <= flow(gasBus_CHPpowerplantGas_1) <= 100000000000 - 0 <= flow(gasBus_CHPpowerplantGas_2) <= 100000000000 -end diff --git a/tests/lp_files/linear_transformer_chp_invest.lp b/tests/lp_files/linear_transformer_chp_invest.lp deleted file mode 100644 index 57f39b400..000000000 --- a/tests/lp_files/linear_transformer_chp_invest.lp +++ /dev/null @@ -1,107 +0,0 @@ -\* Source Pyomo model name=Model *\ - -min -objective: -+20 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas) -+50 flow(gasBus_chp_powerplant_gas_0) -+50 flow(gasBus_chp_powerplant_gas_1) -+50 flow(gasBus_chp_powerplant_gas_2) - -s.t. - -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(chp_powerplant_gas_electricityBus_0) -= 0 - -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(chp_powerplant_gas_electricityBus_1) -= 0 - -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(chp_powerplant_gas_electricityBus_2) -= 0 - -c_e_BusBlock_balance(gasBus_0)_: -+1 flow(gasBus_chp_powerplant_gas_0) -= 0 - -c_e_BusBlock_balance(gasBus_1)_: -+1 flow(gasBus_chp_powerplant_gas_1) -= 0 - -c_e_BusBlock_balance(gasBus_2)_: -+1 flow(gasBus_chp_powerplant_gas_2) -= 0 - -c_e_BusBlock_balance(heatBus_0)_: -+1 flow(chp_powerplant_gas_heatBus_0) -= 0 - -c_e_BusBlock_balance(heatBus_1)_: -+1 flow(chp_powerplant_gas_heatBus_1) -= 0 - -c_e_BusBlock_balance(heatBus_2)_: -+1 flow(chp_powerplant_gas_heatBus_2) -= 0 - -c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_electricityBus_0)_: --1 flow(chp_powerplant_gas_electricityBus_0) -+0.40000000000000002 flow(gasBus_chp_powerplant_gas_0) -= 0 - -c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_electricityBus_1)_: --1 flow(chp_powerplant_gas_electricityBus_1) -+0.40000000000000002 flow(gasBus_chp_powerplant_gas_1) -= 0 - -c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_electricityBus_2)_: --1 flow(chp_powerplant_gas_electricityBus_2) -+0.40000000000000002 flow(gasBus_chp_powerplant_gas_2) -= 0 - -c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_0)_: --1 flow(chp_powerplant_gas_heatBus_0) -+0.5 flow(gasBus_chp_powerplant_gas_0) -= 0 - -c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_1)_: --1 flow(chp_powerplant_gas_heatBus_1) -+0.5 flow(gasBus_chp_powerplant_gas_1) -= 0 - -c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_2)_: --1 flow(chp_powerplant_gas_heatBus_2) -+0.5 flow(gasBus_chp_powerplant_gas_2) -= 0 - -c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_0)_: --1 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas) -+1 flow(gasBus_chp_powerplant_gas_0) -<= 0 - -c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_1)_: --1 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas) -+1 flow(gasBus_chp_powerplant_gas_1) -<= 0 - -c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_2)_: --1 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas) -+1 flow(gasBus_chp_powerplant_gas_2) -<= 0 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - -bounds - 0 <= flow(chp_powerplant_gas_electricityBus_0) <= +inf - 0 <= flow(chp_powerplant_gas_electricityBus_1) <= +inf - 0 <= flow(chp_powerplant_gas_electricityBus_2) <= +inf - 0 <= flow(chp_powerplant_gas_heatBus_0) <= +inf - 0 <= flow(chp_powerplant_gas_heatBus_1) <= +inf - 0 <= flow(chp_powerplant_gas_heatBus_2) <= +inf - 0 <= flow(gasBus_chp_powerplant_gas_0) <= +inf - 0 <= flow(gasBus_chp_powerplant_gas_1) <= +inf - 0 <= flow(gasBus_chp_powerplant_gas_2) <= +inf - 0 <= InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas) <= 1000 -end diff --git a/tests/lp_files/linear_transformer_invest.lp b/tests/lp_files/linear_transformer_invest.lp deleted file mode 100644 index 6b1f2b06f..000000000 --- a/tests/lp_files/linear_transformer_invest.lp +++ /dev/null @@ -1,77 +0,0 @@ -\* Source Pyomo model name=Model *\ - -min -objective: -+20 InvestmentFlowBlock_invest(powerplant_gas_electricity) -+50 flow(powerplant_gas_electricity_0) -+50 flow(powerplant_gas_electricity_1) -+50 flow(powerplant_gas_electricity_2) - -s.t. - -c_e_BusBlock_balance(electricity_0)_: -+1 flow(powerplant_gas_electricity_0) -= 0 - -c_e_BusBlock_balance(electricity_1)_: -+1 flow(powerplant_gas_electricity_1) -= 0 - -c_e_BusBlock_balance(electricity_2)_: -+1 flow(powerplant_gas_electricity_2) -= 0 - -c_e_BusBlock_balance(gas_0)_: -+1 flow(gas_powerplant_gas_0) -= 0 - -c_e_BusBlock_balance(gas_1)_: -+1 flow(gas_powerplant_gas_1) -= 0 - -c_e_BusBlock_balance(gas_2)_: -+1 flow(gas_powerplant_gas_2) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_0)_: -+0.57999999999999996 flow(gas_powerplant_gas_0) --1 flow(powerplant_gas_electricity_0) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_1)_: -+0.57999999999999996 flow(gas_powerplant_gas_1) --1 flow(powerplant_gas_electricity_1) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_2)_: -+0.57999999999999996 flow(gas_powerplant_gas_2) --1 flow(powerplant_gas_electricity_2) -= 0 - -c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_0)_: --1 InvestmentFlowBlock_invest(powerplant_gas_electricity) -+1 flow(powerplant_gas_electricity_0) -<= 0 - -c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_1)_: --1 InvestmentFlowBlock_invest(powerplant_gas_electricity) -+1 flow(powerplant_gas_electricity_1) -<= 0 - -c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_2)_: --1 InvestmentFlowBlock_invest(powerplant_gas_electricity) -+1 flow(powerplant_gas_electricity_2) -<= 0 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - -bounds - 0 <= flow(gas_powerplant_gas_0) <= +inf - 0 <= flow(gas_powerplant_gas_1) <= +inf - 0 <= flow(gas_powerplant_gas_2) <= +inf - 0 <= flow(powerplant_gas_electricity_0) <= +inf - 0 <= flow(powerplant_gas_electricity_1) <= +inf - 0 <= flow(powerplant_gas_electricity_2) <= +inf - 0 <= InvestmentFlowBlock_invest(powerplant_gas_electricity) <= 1000 -end diff --git a/tests/lp_files/link.lp b/tests/lp_files/link.lp index 8415b87d7..7abe6bd3e 100644 --- a/tests/lp_files/link.lp +++ b/tests/lp_files/link.lp @@ -6,80 +6,78 @@ objective: s.t. -c_e_BusBlock_balance(bel0_0)_: --1 flow(bel0_link_0) -+1 flow(link_bel0_0) +c_e_BusBlock_balance(el1_0_0)_: +-1 flow(el1_link_0_0) ++1 flow(link_el1_0_0) = 0 -c_e_BusBlock_balance(bel0_1)_: --1 flow(bel0_link_1) -+1 flow(link_bel0_1) +c_e_BusBlock_balance(el1_0_1)_: +-1 flow(el1_link_0_1) ++1 flow(link_el1_0_1) = 0 -c_e_BusBlock_balance(bel0_2)_: --1 flow(bel0_link_2) -+1 flow(link_bel0_2) +c_e_BusBlock_balance(el1_0_2)_: +-1 flow(el1_link_0_2) ++1 flow(link_el1_0_2) = 0 -c_e_BusBlock_balance(bel1_0)_: --1 flow(bel1_link_0) -+1 flow(link_bel1_0) +c_e_BusBlock_balance(el2_0_0)_: +-1 flow(el2_link_0_0) ++1 flow(link_el2_0_0) = 0 -c_e_BusBlock_balance(bel1_1)_: --1 flow(bel1_link_1) -+1 flow(link_bel1_1) +c_e_BusBlock_balance(el2_0_1)_: +-1 flow(el2_link_0_1) ++1 flow(link_el2_0_1) = 0 -c_e_BusBlock_balance(bel1_2)_: --1 flow(bel1_link_2) -+1 flow(link_bel1_2) +c_e_BusBlock_balance(el2_0_2)_: +-1 flow(el2_link_0_2) ++1 flow(link_el2_0_2) = 0 -c_e_LinkBlock_relation(link_bel0_bel1_0)_: --0.80000000000000004 flow(bel0_link_0) -+1 flow(link_bel1_0) +c_e_LinkBlock_relation(link_el1_el2_0_0)_: +-0.75 flow(el1_link_0_0) ++1 flow(link_el2_0_0) = 0 -c_e_LinkBlock_relation(link_bel0_bel1_1)_: --0.80000000000000004 flow(bel0_link_1) -+1 flow(link_bel1_1) +c_e_LinkBlock_relation(link_el1_el2_0_1)_: +-0.75 flow(el1_link_0_1) ++1 flow(link_el2_0_1) = 0 -c_e_LinkBlock_relation(link_bel0_bel1_2)_: --0.80000000000000004 flow(bel0_link_2) -+1 flow(link_bel1_2) +c_e_LinkBlock_relation(link_el1_el2_0_2)_: +-0.75 flow(el1_link_0_2) ++1 flow(link_el2_0_2) = 0 -c_e_LinkBlock_relation(link_bel1_bel0_0)_: --0.90000000000000002 flow(bel1_link_0) -+1 flow(link_bel0_0) +c_e_LinkBlock_relation(link_el2_el1_0_0)_: +-0.5 flow(el2_link_0_0) ++1 flow(link_el1_0_0) = 0 -c_e_LinkBlock_relation(link_bel1_bel0_1)_: --0.90000000000000002 flow(bel1_link_1) -+1 flow(link_bel0_1) +c_e_LinkBlock_relation(link_el2_el1_0_1)_: +-0.5 flow(el2_link_0_1) ++1 flow(link_el1_0_1) = 0 -c_e_LinkBlock_relation(link_bel1_bel0_2)_: --0.90000000000000002 flow(bel1_link_2) -+1 flow(link_bel0_2) +c_e_LinkBlock_relation(link_el2_el1_0_2)_: +-0.5 flow(el2_link_0_2) ++1 flow(link_el1_0_2) = 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(bel0_link_0) <= 4 - 0 <= flow(bel0_link_1) <= 4 - 0 <= flow(bel0_link_2) <= 4 - 0 <= flow(bel1_link_0) <= 2 - 0 <= flow(bel1_link_1) <= 2 - 0 <= flow(bel1_link_2) <= 2 - 0 <= flow(link_bel0_0) <= +inf - 0 <= flow(link_bel0_1) <= +inf - 0 <= flow(link_bel0_2) <= +inf - 0 <= flow(link_bel1_0) <= +inf - 0 <= flow(link_bel1_1) <= +inf - 0 <= flow(link_bel1_2) <= +inf + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(el1_link_0_0) <= 4 + 0 <= flow(el1_link_0_1) <= 4 + 0 <= flow(el1_link_0_2) <= 4 + 0 <= flow(el2_link_0_0) <= 2 + 0 <= flow(el2_link_0_1) <= 2 + 0 <= flow(el2_link_0_2) <= 2 + 0 <= flow(link_el1_0_0) <= +inf + 0 <= flow(link_el1_0_1) <= +inf + 0 <= flow(link_el1_0_2) <= +inf + 0 <= flow(link_el2_0_0) <= +inf + 0 <= flow(link_el2_0_1) <= +inf + 0 <= flow(link_el2_0_2) <= +inf end diff --git a/tests/lp_files/max_source_min_sink.lp b/tests/lp_files/max_source_min_sink.lp index 9006641bc..21c940c64 100644 --- a/tests/lp_files/max_source_min_sink.lp +++ b/tests/lp_files/max_source_min_sink.lp @@ -1,36 +1,33 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+14 flow(electricityBus_minDemand_0) -+14 flow(electricityBus_minDemand_1) -+14 flow(electricityBus_minDemand_2) ++14 flow(electricityBus_minDemand_0_0) ++14 flow(electricityBus_minDemand_0_1) ++14 flow(electricityBus_minDemand_0_2) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_minDemand_0) -+1 flow(wind_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_minDemand_0_0) ++1 flow(wind_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_minDemand_1) -+1 flow(wind_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_minDemand_0_1) ++1 flow(wind_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_minDemand_2) -+1 flow(wind_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: +-1 flow(electricityBus_minDemand_0_2) ++1 flow(wind_electricityBus_0_2) = 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 45.359999999999999 <= flow(electricityBus_minDemand_0) <= 54 - 50.759999999999998 <= flow(electricityBus_minDemand_1) <= 54 - 31.859999999999999 <= flow(electricityBus_minDemand_2) <= 54 - 0 <= flow(wind_electricityBus_0) <= 45.899999999999999 - 0 <= flow(wind_electricityBus_1) <= 51.299999999999997 - 0 <= flow(wind_electricityBus_2) <= 32.939999999999998 + 45.36 <= flow(electricityBus_minDemand_0_0) <= 54 + 50.76 <= flow(electricityBus_minDemand_0_1) <= 54 + 31.86 <= flow(electricityBus_minDemand_0_2) <= 54 + 0 <= flow(wind_electricityBus_0_0) <= 45.9 + 0 <= flow(wind_electricityBus_0_1) <= 51.3 + 0 <= flow(wind_electricityBus_0_2) <= 32.94 end diff --git a/tests/lp_files/max_source_min_sink_multi_period.lp b/tests/lp_files/max_source_min_sink_multi_period.lp new file mode 100644 index 000000000..db3e1ab0e --- /dev/null +++ b/tests/lp_files/max_source_min_sink_multi_period.lp @@ -0,0 +1,57 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++14 flow(electricityBus_minDemand_0_0) ++14 flow(electricityBus_minDemand_0_1) ++13.72549019607843 flow(electricityBus_minDemand_1_2) ++13.72549019607843 flow(electricityBus_minDemand_1_3) ++13.456362937331795 flow(electricityBus_minDemand_2_4) ++13.456362937331795 flow(electricityBus_minDemand_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_minDemand_0_0) ++1 flow(wind_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_minDemand_0_1) ++1 flow(wind_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: +-1 flow(electricityBus_minDemand_1_2) ++1 flow(wind_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: +-1 flow(electricityBus_minDemand_1_3) ++1 flow(wind_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: +-1 flow(electricityBus_minDemand_2_4) ++1 flow(wind_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: +-1 flow(electricityBus_minDemand_2_5) ++1 flow(wind_electricityBus_2_5) += 0 + +bounds + 45.36 <= flow(electricityBus_minDemand_0_0) <= 54 + 50.76 <= flow(electricityBus_minDemand_0_1) <= 54 + 31.86 <= flow(electricityBus_minDemand_1_2) <= 54 + 37.8 <= flow(electricityBus_minDemand_1_3) <= 54 + 52.379999999999995 <= flow(electricityBus_minDemand_2_4) <= 54 + 4.859999999999999 <= flow(electricityBus_minDemand_2_5) <= 54 + 0 <= flow(wind_electricityBus_0_0) <= 45.9 + 0 <= flow(wind_electricityBus_0_1) <= 51.3 + 0 <= flow(wind_electricityBus_1_2) <= 32.94 + 0 <= flow(wind_electricityBus_1_3) <= 38.879999999999995 + 0 <= flow(wind_electricityBus_2_4) <= 53.46 + 0 <= flow(wind_electricityBus_2_5) <= 5.4 +end diff --git a/tests/lp_files/maximum_shutdowns.lp b/tests/lp_files/maximum_shutdowns.lp index 48f5de4e2..6887f17d0 100644 --- a/tests/lp_files/maximum_shutdowns.lp +++ b/tests/lp_files/maximum_shutdowns.lp @@ -1,85 +1,85 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+10 flow(cheap_plant_maximum_shutdowns_Bus_C_0) -+10 flow(cheap_plant_maximum_shutdowns_Bus_C_1) -+10 flow(cheap_plant_maximum_shutdowns_Bus_C_2) ++10 flow(cheap_plant_maximum_shutdowns_Bus_C_0_0) ++10 flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) ++10 flow(cheap_plant_maximum_shutdowns_Bus_C_0_2) s.t. -c_e_BusBlock_balance(Bus_C_0)_: -+1 flow(cheap_plant_maximum_shutdowns_Bus_C_0) +c_e_BusBlock_balance(Bus_C_0_0)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_0) = 0 -c_e_BusBlock_balance(Bus_C_1)_: -+1 flow(cheap_plant_maximum_shutdowns_Bus_C_1) +c_e_BusBlock_balance(Bus_C_0_1)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) = 0 -c_e_BusBlock_balance(Bus_C_2)_: -+1 flow(cheap_plant_maximum_shutdowns_Bus_C_2) +c_e_BusBlock_balance(Bus_C_0_2)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_2) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_shutdowns_Bus_C_0)_: --10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_0) +1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_0) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_0) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_shutdowns_Bus_C_1)_: --10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_1) +1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_1) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_1) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_shutdowns_Bus_C_2)_: --10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_2) +1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_2) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_2) = 0 -c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_0)_: +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_0_0)_: +-1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_0) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_0) --1 flow(cheap_plant_maximum_shutdowns_Bus_C_0) <= 0 -c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_1)_: +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_0_1)_: +-1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_1) --1 flow(cheap_plant_maximum_shutdowns_Bus_C_1) <= 0 -c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_2)_: +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_0_2)_: +-1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_2) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_2) --1 flow(cheap_plant_maximum_shutdowns_Bus_C_2) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_0)_: +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_0_0)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_0) -1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_0) -+1 flow(cheap_plant_maximum_shutdowns_Bus_C_0) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_1)_: +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_0_1)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) -1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_1) -+1 flow(cheap_plant_maximum_shutdowns_Bus_C_1) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_2)_: +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_0_2)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_2) -1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_2) -+1 flow(cheap_plant_maximum_shutdowns_Bus_C_2) <= 0 c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C_0)_: --1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_0) -1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_0) +-1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_0) <= 0 c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C_1)_: --1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_1) +1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_0) -1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_1) +-1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_1) <= 0 c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C_2)_: --1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_2) +1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_1) -1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_2) +-1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_2) <= 0 c_u_NonConvexFlowBlock_max_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C)_: @@ -88,19 +88,16 @@ c_u_NonConvexFlowBlock_max_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C)_ +1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_2) <= 2 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_0) <= 10 - 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_1) <= 10 - 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_2) <= 10 - 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_0) <= 1 - 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_1) <= 1 - 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_2) <= 1 + 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_0_0) <= 10.0 + 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) <= 10.0 + 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_0_2) <= 10.0 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_0) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_0) <= 1 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_1) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_1) <= 1 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_2) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_2) <= 1 0 <= NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_0) <= 1 0 <= NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_1) <= 1 0 <= NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_2) <= 1 diff --git a/tests/lp_files/maximum_shutdowns_multi_period.lp b/tests/lp_files/maximum_shutdowns_multi_period.lp new file mode 100644 index 000000000..f7f280121 --- /dev/null +++ b/tests/lp_files/maximum_shutdowns_multi_period.lp @@ -0,0 +1,210 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++10 flow(cheap_plant_maximum_shutdowns_Bus_C_0_0) ++10 flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) ++9.80392156862745 flow(cheap_plant_maximum_shutdowns_Bus_C_1_2) ++9.80392156862745 flow(cheap_plant_maximum_shutdowns_Bus_C_1_3) ++9.611687812379854 flow(cheap_plant_maximum_shutdowns_Bus_C_2_4) ++9.611687812379854 flow(cheap_plant_maximum_shutdowns_Bus_C_2_5) + +s.t. + +c_e_BusBlock_balance(Bus_C_0_0)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_0) += 0 + +c_e_BusBlock_balance(Bus_C_0_1)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) += 0 + +c_e_BusBlock_balance(Bus_C_1_2)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_1_2) += 0 + +c_e_BusBlock_balance(Bus_C_1_3)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_1_3) += 0 + +c_e_BusBlock_balance(Bus_C_2_4)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_2_4) += 0 + +c_e_BusBlock_balance(Bus_C_2_5)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_2_5) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_shutdowns_Bus_C_0)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_0) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_shutdowns_Bus_C_1)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_1) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_shutdowns_Bus_C_2)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_2) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_shutdowns_Bus_C_3)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_3) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_3) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_shutdowns_Bus_C_4)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_4) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_4) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_shutdowns_Bus_C_5)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_5) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_5) += 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_0_0)_: +-1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_0) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_0) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_0_1)_: +-1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_1) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_1_2)_: +-1 flow(cheap_plant_maximum_shutdowns_Bus_C_1_2) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_2) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_1_3)_: +-1 flow(cheap_plant_maximum_shutdowns_Bus_C_1_3) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_3) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_2_4)_: +-1 flow(cheap_plant_maximum_shutdowns_Bus_C_2_4) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_4) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_shutdowns_Bus_C_2_5)_: +-1 flow(cheap_plant_maximum_shutdowns_Bus_C_2_5) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_5) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_0_0)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_0) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_0) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_0_1)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_1) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_1_2)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_1_2) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_2) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_1_3)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_1_3) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_3) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_2_4)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_2_4) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_4) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_shutdowns_Bus_C_2_5)_: ++1 flow(cheap_plant_maximum_shutdowns_Bus_C_2_5) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_5) +<= 0 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C_0)_: +-1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_0) +-1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_0) +<= 0 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C_1)_: ++1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_0) +-1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_1) +-1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_1) +<= 0 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C_2)_: ++1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_1) +-1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_2) +-1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_2) +<= 0 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C_3)_: ++1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_2) +-1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_3) +-1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_3) +<= 0 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C_4)_: ++1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_3) +-1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_4) +-1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_4) +<= 0 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C_5)_: ++1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_4) +-1 NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_5) +-1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_5) +<= 0 + +c_u_NonConvexFlowBlock_max_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C)_: ++1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_0) ++1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_1) ++1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_2) ++1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_3) ++1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_4) ++1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_5) +<= 2 + +bounds + 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_0_0) <= 10.0 + 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) <= 10.0 + 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_1_2) <= 10.0 + 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_1_3) <= 10.0 + 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_2_4) <= 10.0 + 0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_2_5) <= 10.0 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_0) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_0) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_1) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_1) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_2) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_2) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_3) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_3) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_4) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_4) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_5) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_5) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_0) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_1) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_2) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_3) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_4) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_5) <= 1 +binary + NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_0) + NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_1) + NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_2) + NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_3) + NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_4) + NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_5) + NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_0) + NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_1) + NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_2) + NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_3) + NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_4) + NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_5) +end diff --git a/tests/lp_files/maximum_startups.lp b/tests/lp_files/maximum_startups.lp index 95d9691d2..984e780c8 100644 --- a/tests/lp_files/maximum_startups.lp +++ b/tests/lp_files/maximum_startups.lp @@ -1,85 +1,85 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+10 flow(cheap_plant_maximum_startups_Bus_C_0) -+10 flow(cheap_plant_maximum_startups_Bus_C_1) -+10 flow(cheap_plant_maximum_startups_Bus_C_2) ++10 flow(cheap_plant_maximum_startups_Bus_C_0_0) ++10 flow(cheap_plant_maximum_startups_Bus_C_0_1) ++10 flow(cheap_plant_maximum_startups_Bus_C_0_2) s.t. -c_e_BusBlock_balance(Bus_C_0)_: -+1 flow(cheap_plant_maximum_startups_Bus_C_0) +c_e_BusBlock_balance(Bus_C_0_0)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_0_0) = 0 -c_e_BusBlock_balance(Bus_C_1)_: -+1 flow(cheap_plant_maximum_startups_Bus_C_1) +c_e_BusBlock_balance(Bus_C_0_1)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_0_1) = 0 -c_e_BusBlock_balance(Bus_C_2)_: -+1 flow(cheap_plant_maximum_startups_Bus_C_2) +c_e_BusBlock_balance(Bus_C_0_2)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_0_2) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_startups_Bus_C_0)_: --10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_0) +1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_0) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_0) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_startups_Bus_C_1)_: --10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_1) +1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_1) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_1) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_startups_Bus_C_2)_: --10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_2) +1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_2) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_2) = 0 -c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_0)_: +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_0_0)_: +-1 flow(cheap_plant_maximum_startups_Bus_C_0_0) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_0) --1 flow(cheap_plant_maximum_startups_Bus_C_0) <= 0 -c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_1)_: +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_0_1)_: +-1 flow(cheap_plant_maximum_startups_Bus_C_0_1) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_1) --1 flow(cheap_plant_maximum_startups_Bus_C_1) <= 0 -c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_2)_: +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_0_2)_: +-1 flow(cheap_plant_maximum_startups_Bus_C_0_2) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_2) --1 flow(cheap_plant_maximum_startups_Bus_C_2) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_0)_: +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_0_0)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_0_0) -1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_0) -+1 flow(cheap_plant_maximum_startups_Bus_C_0) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_1)_: +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_0_1)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_0_1) -1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_1) -+1 flow(cheap_plant_maximum_startups_Bus_C_1) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_2)_: +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_0_2)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_0_2) -1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_2) -+1 flow(cheap_plant_maximum_startups_Bus_C_2) <= 0 c_u_NonConvexFlowBlock_startup_constr(cheap_plant_maximum_startups_Bus_C_0)_: --1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_0) +1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_0) +-1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_0) <= 0 c_u_NonConvexFlowBlock_startup_constr(cheap_plant_maximum_startups_Bus_C_1)_: --1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_1) -1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_0) +1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_1) +-1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_1) <= 0 c_u_NonConvexFlowBlock_startup_constr(cheap_plant_maximum_startups_Bus_C_2)_: --1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_2) -1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_1) +1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_2) +-1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_2) <= 0 c_u_NonConvexFlowBlock_max_startup_constr(cheap_plant_maximum_startups_Bus_C)_: @@ -88,19 +88,16 @@ c_u_NonConvexFlowBlock_max_startup_constr(cheap_plant_maximum_startups_Bus_C)_: +1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_2) <= 2 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(cheap_plant_maximum_startups_Bus_C_0) <= 10 - 0 <= flow(cheap_plant_maximum_startups_Bus_C_1) <= 10 - 0 <= flow(cheap_plant_maximum_startups_Bus_C_2) <= 10 - 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_0) <= 1 - 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_1) <= 1 - 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_2) <= 1 + 0 <= flow(cheap_plant_maximum_startups_Bus_C_0_0) <= 10.0 + 0 <= flow(cheap_plant_maximum_startups_Bus_C_0_1) <= 10.0 + 0 <= flow(cheap_plant_maximum_startups_Bus_C_0_2) <= 10.0 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_0) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_0) <= 1 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_1) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_1) <= 1 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_2) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_2) <= 1 0 <= NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_0) <= 1 0 <= NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_1) <= 1 0 <= NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_2) <= 1 diff --git a/tests/lp_files/maximum_startups_multi_period.lp b/tests/lp_files/maximum_startups_multi_period.lp new file mode 100644 index 000000000..c51cf0d79 --- /dev/null +++ b/tests/lp_files/maximum_startups_multi_period.lp @@ -0,0 +1,210 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++10 flow(cheap_plant_maximum_startups_Bus_C_0_0) ++10 flow(cheap_plant_maximum_startups_Bus_C_0_1) ++9.80392156862745 flow(cheap_plant_maximum_startups_Bus_C_1_2) ++9.80392156862745 flow(cheap_plant_maximum_startups_Bus_C_1_3) ++9.611687812379854 flow(cheap_plant_maximum_startups_Bus_C_2_4) ++9.611687812379854 flow(cheap_plant_maximum_startups_Bus_C_2_5) + +s.t. + +c_e_BusBlock_balance(Bus_C_0_0)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_0_0) += 0 + +c_e_BusBlock_balance(Bus_C_0_1)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_0_1) += 0 + +c_e_BusBlock_balance(Bus_C_1_2)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_1_2) += 0 + +c_e_BusBlock_balance(Bus_C_1_3)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_1_3) += 0 + +c_e_BusBlock_balance(Bus_C_2_4)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_2_4) += 0 + +c_e_BusBlock_balance(Bus_C_2_5)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_2_5) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_startups_Bus_C_0)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_0) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_startups_Bus_C_1)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_1) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_startups_Bus_C_2)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_2) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_startups_Bus_C_3)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_3) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_3) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_startups_Bus_C_4)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_4) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_4) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_startups_Bus_C_5)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_5) +-10 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_5) += 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_0_0)_: +-1 flow(cheap_plant_maximum_startups_Bus_C_0_0) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_0) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_0_1)_: +-1 flow(cheap_plant_maximum_startups_Bus_C_0_1) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_1) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_1_2)_: +-1 flow(cheap_plant_maximum_startups_Bus_C_1_2) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_2) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_1_3)_: +-1 flow(cheap_plant_maximum_startups_Bus_C_1_3) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_3) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_2_4)_: +-1 flow(cheap_plant_maximum_startups_Bus_C_2_4) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_4) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_maximum_startups_Bus_C_2_5)_: +-1 flow(cheap_plant_maximum_startups_Bus_C_2_5) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_5) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_0_0)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_0_0) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_0) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_0_1)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_0_1) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_1) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_1_2)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_1_2) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_2) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_1_3)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_1_3) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_3) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_2_4)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_2_4) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_4) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_maximum_startups_Bus_C_2_5)_: ++1 flow(cheap_plant_maximum_startups_Bus_C_2_5) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_5) +<= 0 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_maximum_startups_Bus_C_0)_: ++1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_0) +-1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_0) +<= 0 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_maximum_startups_Bus_C_1)_: +-1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_0) ++1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_1) +-1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_1) +<= 0 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_maximum_startups_Bus_C_2)_: +-1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_1) ++1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_2) +-1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_2) +<= 0 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_maximum_startups_Bus_C_3)_: +-1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_2) ++1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_3) +-1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_3) +<= 0 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_maximum_startups_Bus_C_4)_: +-1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_3) ++1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_4) +-1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_4) +<= 0 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_maximum_startups_Bus_C_5)_: +-1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_4) ++1 NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_5) +-1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_5) +<= 0 + +c_u_NonConvexFlowBlock_max_startup_constr(cheap_plant_maximum_startups_Bus_C)_: ++1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_0) ++1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_1) ++1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_2) ++1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_3) ++1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_4) ++1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_5) +<= 2 + +bounds + 0 <= flow(cheap_plant_maximum_startups_Bus_C_0_0) <= 10.0 + 0 <= flow(cheap_plant_maximum_startups_Bus_C_0_1) <= 10.0 + 0 <= flow(cheap_plant_maximum_startups_Bus_C_1_2) <= 10.0 + 0 <= flow(cheap_plant_maximum_startups_Bus_C_1_3) <= 10.0 + 0 <= flow(cheap_plant_maximum_startups_Bus_C_2_4) <= 10.0 + 0 <= flow(cheap_plant_maximum_startups_Bus_C_2_5) <= 10.0 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_0) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_0) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_1) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_1) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_2) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_2) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_3) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_3) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_4) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_4) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_5) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_5) <= 1 + 0 <= NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_0) <= 1 + 0 <= NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_1) <= 1 + 0 <= NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_2) <= 1 + 0 <= NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_3) <= 1 + 0 <= NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_4) <= 1 + 0 <= NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_5) <= 1 +binary + NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_0) + NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_1) + NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_2) + NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_3) + NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_4) + NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_5) + NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_0) + NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_1) + NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_2) + NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_3) + NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_4) + NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_5) +end diff --git a/tests/lp_files/min_max_runtime.lp b/tests/lp_files/min_max_runtime.lp index 0416b93d0..5bd20f147 100644 --- a/tests/lp_files/min_max_runtime.lp +++ b/tests/lp_files/min_max_runtime.lp @@ -1,74 +1,74 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+7 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_0) -+7 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_1) -+7 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_2) ++10 flow(cheap_plant_min_down_constraints_Bus_T_0_0) ++10 flow(cheap_plant_min_down_constraints_Bus_T_0_1) ++10 flow(cheap_plant_min_down_constraints_Bus_T_0_2) +5 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_0) +5 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_1) +5 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_2) -+10 flow(cheap_plant_min_down_constraints_Bus_T_0) -+10 flow(cheap_plant_min_down_constraints_Bus_T_1) -+10 flow(cheap_plant_min_down_constraints_Bus_T_2) ++7 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_0) ++7 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_1) ++7 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_2) s.t. -c_e_BusBlock_balance(Bus_T_0)_: -+1 flow(cheap_plant_min_down_constraints_Bus_T_0) +c_e_BusBlock_balance(Bus_T_0_0)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_0_0) = 0 -c_e_BusBlock_balance(Bus_T_1)_: -+1 flow(cheap_plant_min_down_constraints_Bus_T_1) +c_e_BusBlock_balance(Bus_T_0_1)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_0_1) = 0 -c_e_BusBlock_balance(Bus_T_2)_: -+1 flow(cheap_plant_min_down_constraints_Bus_T_2) +c_e_BusBlock_balance(Bus_T_0_2)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_0_2) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_min_down_constraints_Bus_T_0)_: --10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) +1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_0) +-10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_min_down_constraints_Bus_T_1)_: --10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) +1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_1) +-10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_min_down_constraints_Bus_T_2)_: --10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) +1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_2) +-10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) = 0 -c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_0)_: +c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_0_0)_: +-1 flow(cheap_plant_min_down_constraints_Bus_T_0_0) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_0) --1 flow(cheap_plant_min_down_constraints_Bus_T_0) <= 0 -c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_1)_: +c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_0_1)_: +-1 flow(cheap_plant_min_down_constraints_Bus_T_0_1) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_1) --1 flow(cheap_plant_min_down_constraints_Bus_T_1) <= 0 -c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_2)_: +c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_0_2)_: +-1 flow(cheap_plant_min_down_constraints_Bus_T_0_2) +0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_2) --1 flow(cheap_plant_min_down_constraints_Bus_T_2) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_0)_: +c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_0_0)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_0_0) -1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_0) -+1 flow(cheap_plant_min_down_constraints_Bus_T_0) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_1)_: +c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_0_1)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_0_1) -1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_1) -+1 flow(cheap_plant_min_down_constraints_Bus_T_1) <= 0 -c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_2)_: +c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_0_2)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_0_2) -1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_2) -+1 flow(cheap_plant_min_down_constraints_Bus_T_2) <= 0 c_u_NonConvexFlowBlock_startup_constr(cheap_plant_min_down_constraints_Bus_T_0)_: @@ -129,33 +129,30 @@ c_e_NonConvexFlowBlock_min_downtime_constr(cheap_plant_min_down_constraints_Bus_ +1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) = 2 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(cheap_plant_min_down_constraints_Bus_T_0) <= 10 - 0 <= flow(cheap_plant_min_down_constraints_Bus_T_1) <= 10 - 0 <= flow(cheap_plant_min_down_constraints_Bus_T_2) <= 10 - 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) <= 1 - 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) <= 1 - 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) <= 1 - 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_0) <= +inf - 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_1) <= +inf - 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_2) <= +inf + 0 <= flow(cheap_plant_min_down_constraints_Bus_T_0_0) <= 10.0 + 0 <= flow(cheap_plant_min_down_constraints_Bus_T_0_1) <= 10.0 + 0 <= flow(cheap_plant_min_down_constraints_Bus_T_0_2) <= 10.0 0 <= NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_0) <= 1 0 <= NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_1) <= 1 0 <= NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_2) <= 1 0 <= NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_0) <= 1 0 <= NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_1) <= 1 0 <= NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_2) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_0) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_1) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_2) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) <= 1 binary - NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) - NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) - NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_0) NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_1) NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_2) NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_0) NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_1) NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_2) + NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) + NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) + NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) end diff --git a/tests/lp_files/min_max_runtime_multi_period.lp b/tests/lp_files/min_max_runtime_multi_period.lp new file mode 100644 index 000000000..922976d9e --- /dev/null +++ b/tests/lp_files/min_max_runtime_multi_period.lp @@ -0,0 +1,308 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++10 flow(cheap_plant_min_down_constraints_Bus_T_0_0) ++10 flow(cheap_plant_min_down_constraints_Bus_T_0_1) ++9.80392156862745 flow(cheap_plant_min_down_constraints_Bus_T_1_2) ++9.80392156862745 flow(cheap_plant_min_down_constraints_Bus_T_1_3) ++9.611687812379854 flow(cheap_plant_min_down_constraints_Bus_T_2_4) ++9.611687812379854 flow(cheap_plant_min_down_constraints_Bus_T_2_5) ++5 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_0) ++5 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_1) ++4.901960784313725 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_2) ++4.901960784313725 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_3) ++4.805843906189927 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_4) ++4.805843906189927 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_5) ++7 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_0) ++7 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_1) ++6.862745098039215 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_2) ++6.862745098039215 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_3) ++6.728181468665897 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_4) ++6.728181468665897 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_5) + +s.t. + +c_e_BusBlock_balance(Bus_T_0_0)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_0_0) += 0 + +c_e_BusBlock_balance(Bus_T_0_1)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_0_1) += 0 + +c_e_BusBlock_balance(Bus_T_1_2)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_1_2) += 0 + +c_e_BusBlock_balance(Bus_T_1_3)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_1_3) += 0 + +c_e_BusBlock_balance(Bus_T_2_4)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_2_4) += 0 + +c_e_BusBlock_balance(Bus_T_2_5)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_2_5) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_min_down_constraints_Bus_T_0)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_0) +-10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_min_down_constraints_Bus_T_1)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_1) +-10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_min_down_constraints_Bus_T_2)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_2) +-10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_min_down_constraints_Bus_T_3)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_3) +-10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_3) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_min_down_constraints_Bus_T_4)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_4) +-10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_4) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_min_down_constraints_Bus_T_5)_: ++1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_5) +-10 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_5) += 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_0_0)_: +-1 flow(cheap_plant_min_down_constraints_Bus_T_0_0) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_0) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_0_1)_: +-1 flow(cheap_plant_min_down_constraints_Bus_T_0_1) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_1) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_1_2)_: +-1 flow(cheap_plant_min_down_constraints_Bus_T_1_2) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_2) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_1_3)_: +-1 flow(cheap_plant_min_down_constraints_Bus_T_1_3) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_3) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_2_4)_: +-1 flow(cheap_plant_min_down_constraints_Bus_T_2_4) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_4) +<= 0 + +c_u_NonConvexFlowBlock_min(cheap_plant_min_down_constraints_Bus_T_2_5)_: +-1 flow(cheap_plant_min_down_constraints_Bus_T_2_5) ++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_5) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_0_0)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_0_0) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_0) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_0_1)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_0_1) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_1) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_1_2)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_1_2) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_2) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_1_3)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_1_3) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_3) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_2_4)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_2_4) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_4) +<= 0 + +c_u_NonConvexFlowBlock_max(cheap_plant_min_down_constraints_Bus_T_2_5)_: ++1 flow(cheap_plant_min_down_constraints_Bus_T_2_5) +-1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_5) +<= 0 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_min_down_constraints_Bus_T_0)_: +-1 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_0) ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) +<= 1 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_min_down_constraints_Bus_T_1)_: +-1 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_1) +-1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) +<= 0 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_min_down_constraints_Bus_T_2)_: +-1 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_2) +-1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) +<= 0 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_min_down_constraints_Bus_T_3)_: +-1 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_3) +-1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_3) +<= 0 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_min_down_constraints_Bus_T_4)_: +-1 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_4) +-1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_3) ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_4) +<= 0 + +c_u_NonConvexFlowBlock_startup_constr(cheap_plant_min_down_constraints_Bus_T_5)_: +-1 NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_5) +-1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_4) ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_5) +<= 0 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_min_down_constraints_Bus_T_0)_: +-1 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_0) +-1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) +<= -1 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_min_down_constraints_Bus_T_1)_: +-1 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_1) ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) +-1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) +<= 0 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_min_down_constraints_Bus_T_2)_: +-1 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_2) ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) +-1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) +<= 0 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_min_down_constraints_Bus_T_3)_: +-1 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_3) ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) +-1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_3) +<= 0 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_min_down_constraints_Bus_T_4)_: +-1 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_4) ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_3) +-1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_4) +<= 0 + +c_u_NonConvexFlowBlock_shutdown_constr(cheap_plant_min_down_constraints_Bus_T_5)_: +-1 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_5) ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_4) +-1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_5) +<= 0 + +c_e_NonConvexFlowBlock_min_uptime_constr(cheap_plant_min_down_constraints_Bus_T_0)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) += 1 + +c_e_NonConvexFlowBlock_min_uptime_constr(cheap_plant_min_down_constraints_Bus_T_1)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) += 1 + +c_e_NonConvexFlowBlock_min_uptime_constr(cheap_plant_min_down_constraints_Bus_T_2)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) += 1 + +c_e_NonConvexFlowBlock_min_uptime_constr(cheap_plant_min_down_constraints_Bus_T_3)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_3) += 1 + +c_e_NonConvexFlowBlock_min_uptime_constr(cheap_plant_min_down_constraints_Bus_T_4)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_4) += 1 + +c_e_NonConvexFlowBlock_min_uptime_constr(cheap_plant_min_down_constraints_Bus_T_5)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_5) += 1 + +c_e_NonConvexFlowBlock_min_downtime_constr(cheap_plant_min_down_constraints_Bus_T_0)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) += 1 + +c_e_NonConvexFlowBlock_min_downtime_constr(cheap_plant_min_down_constraints_Bus_T_1)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) += 1 + +c_e_NonConvexFlowBlock_min_downtime_constr(cheap_plant_min_down_constraints_Bus_T_2)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) += 1 + +c_e_NonConvexFlowBlock_min_downtime_constr(cheap_plant_min_down_constraints_Bus_T_3)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_3) += 1 + +c_e_NonConvexFlowBlock_min_downtime_constr(cheap_plant_min_down_constraints_Bus_T_4)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_4) += 1 + +c_e_NonConvexFlowBlock_min_downtime_constr(cheap_plant_min_down_constraints_Bus_T_5)_: ++1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_5) += 1 + +bounds + 0 <= flow(cheap_plant_min_down_constraints_Bus_T_0_0) <= 10.0 + 0 <= flow(cheap_plant_min_down_constraints_Bus_T_0_1) <= 10.0 + 0 <= flow(cheap_plant_min_down_constraints_Bus_T_1_2) <= 10.0 + 0 <= flow(cheap_plant_min_down_constraints_Bus_T_1_3) <= 10.0 + 0 <= flow(cheap_plant_min_down_constraints_Bus_T_2_4) <= 10.0 + 0 <= flow(cheap_plant_min_down_constraints_Bus_T_2_5) <= 10.0 + 0 <= NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_0) <= 1 + 0 <= NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_1) <= 1 + 0 <= NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_2) <= 1 + 0 <= NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_3) <= 1 + 0 <= NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_4) <= 1 + 0 <= NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_5) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_0) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_1) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_2) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_3) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_4) <= 1 + 0 <= NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_5) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_0) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_1) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_2) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_3) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_3) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_4) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_4) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_5) <= +inf + 0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_5) <= 1 +binary + NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_0) + NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_1) + NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_2) + NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_3) + NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_4) + NonConvexFlowBlock_startup(cheap_plant_min_down_constraints_Bus_T_5) + NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_0) + NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_1) + NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_2) + NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_3) + NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_4) + NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_5) + NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_0) + NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_1) + NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_2) + NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_3) + NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_4) + NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_5) +end diff --git a/tests/lp_files/multi_period_period_length.lp b/tests/lp_files/multi_period_period_length.lp new file mode 100644 index 000000000..66c20689e --- /dev/null +++ b/tests/lp_files/multi_period_period_length.lp @@ -0,0 +1,8065 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++15992.031251718836 ONE_VAR_CONSTANT ++12.231343625058066 InvestmentFlowBlock_invest(storage_electricity_0) ++8.231343625058066 InvestmentFlowBlock_invest(storage_electricity_1) ++6.116009561015236 InvestmentFlowBlock_invest(storage_electricity_2) ++5.017258045399043 InvestmentFlowBlock_invest(storage_electricity_3) ++4.544285192584936 InvestmentFlowBlock_invest(storage_electricity_4) ++3.7278966318848936 InvestmentFlowBlock_invest(storage_electricity_5) ++2.769882109365063 InvestmentFlowBlock_invest(storage_electricity_6) ++1.864051255691565 InvestmentFlowBlock_invest(storage_electricity_7) ++12.231343625058066 InvestmentFlowBlock_invest(electricity_storage_0) ++8.231343625058066 InvestmentFlowBlock_invest(electricity_storage_1) ++6.116009561015236 InvestmentFlowBlock_invest(electricity_storage_2) ++5.017258045399043 InvestmentFlowBlock_invest(electricity_storage_3) ++4.544285192584936 InvestmentFlowBlock_invest(electricity_storage_4) ++3.7278966318848936 InvestmentFlowBlock_invest(electricity_storage_5) ++2.769882109365063 InvestmentFlowBlock_invest(electricity_storage_6) ++1.864051255691565 InvestmentFlowBlock_invest(electricity_storage_7) ++12.231343625058066 GenericInvestmentStorageBlock_invest(storage_0) ++8.231343625058066 GenericInvestmentStorageBlock_invest(storage_1) ++6.116009561015236 GenericInvestmentStorageBlock_invest(storage_2) ++5.017258045399043 GenericInvestmentStorageBlock_invest(storage_3) ++4.544285192584936 GenericInvestmentStorageBlock_invest(storage_4) ++3.7278966318848936 GenericInvestmentStorageBlock_invest(storage_5) ++2.769882109365063 GenericInvestmentStorageBlock_invest(storage_6) ++1.864051255691565 GenericInvestmentStorageBlock_invest(storage_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_0) ++100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_1) ++100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_1) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_2) ++100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_2) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_3) ++67.29713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_3) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_4) ++67.29713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_4) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_5) ++0.6729713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_5) ++67.29713331080575 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_5) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_6) ++50.00276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_6) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_7) ++50.00276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_7) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_8) ++0.5000276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_8) ++50.00276133592969 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_8) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_9) ++41.01968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_9) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_10) ++41.01968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_10) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_11) ++0.4101968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_11) ++41.01968025099306 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_11) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_12) ++37.15278821269615 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_12) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_13) ++37.15278821269615 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_13) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_14) ++0.37152788212696153 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_14) ++37.15278821269615 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_14) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_15) ++30.478226645906993 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_15) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_16) ++30.478226645906993 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_16) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_17) ++0.3047822664590699 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_17) ++30.478226645906993 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_17) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_18) ++22.645771341837463 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_18) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_19) ++22.645771341837463 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_19) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_20) ++0.22645771341837465 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_20) ++22.645771341837463 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_20) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_21) ++15.239954929176601 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_21) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_22) ++15.239954929176601 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_22) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_23) ++0.15239954929176602 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_23) ++15.239954929176601 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_23) ++455.88267648036174 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_0) ++233.38374795126995 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_1) ++144.56161688922427 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_2) ++106.29941341240747 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_3) ++91.48640392066359 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_4) ++68.26495688582924 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_5) ++44.80528445188661 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_6) ++26.387865849578166 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_7) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_0) ++100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_1) ++100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_2) ++100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_2) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_3) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_3) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_3) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_3) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_3) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_3) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_3) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_3) ++67.29713331080575 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_3) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_4) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_4) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_4) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_4) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_4) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_4) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_4) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_4) ++67.29713331080575 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_4) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_5) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_5) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_5) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_5) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_5) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_5) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_5) ++0.6729713331080575 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_5) ++67.29713331080575 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_5) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_6) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_6) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_6) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_6) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_6) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_6) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_6) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_6) ++50.00276133592969 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_6) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_7) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_7) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_7) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_7) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_7) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_7) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_7) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_7) ++50.00276133592969 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_7) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_8) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_8) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_8) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_8) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_8) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_8) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_8) ++0.5000276133592969 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_8) ++50.00276133592969 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_8) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_9) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_9) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_9) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_9) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_9) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_9) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_9) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_9) ++41.01968025099306 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_9) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_10) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_10) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_10) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_10) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_10) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_10) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_10) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_10) ++41.01968025099306 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_10) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_11) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_11) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_11) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_11) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_11) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_11) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_11) ++0.4101968025099306 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_11) ++41.01968025099306 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_11) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_12) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_12) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_12) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_12) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_12) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_12) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_12) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_12) ++37.15278821269615 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_12) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_13) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_13) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_13) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_13) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_13) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_13) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_13) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_13) ++37.15278821269615 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_13) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_14) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_14) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_14) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_14) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_14) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_14) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_14) ++0.37152788212696153 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_14) ++37.15278821269615 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_14) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_15) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_15) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_15) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_15) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_15) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_15) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_15) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_15) ++30.478226645906993 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_15) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_16) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_16) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_16) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_16) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_16) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_16) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_16) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_16) ++30.478226645906993 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_16) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_17) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_17) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_17) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_17) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_17) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_17) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_17) ++0.3047822664590699 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_17) ++30.478226645906993 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_17) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_18) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_18) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_18) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_18) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_18) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_18) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_18) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_18) ++22.645771341837463 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_18) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_19) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_19) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_19) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_19) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_19) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_19) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_19) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_19) ++22.645771341837463 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_19) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_20) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_20) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_20) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_20) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_20) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_20) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_20) ++0.22645771341837465 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_20) ++22.645771341837463 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_20) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_21) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_21) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_21) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_21) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_21) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_21) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_21) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_21) ++15.239954929176601 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_21) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_22) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_22) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_22) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_22) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_22) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_22) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_22) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_22) ++15.239954929176601 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_22) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_23) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_23) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_23) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_23) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_23) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_23) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_23) ++0.15239954929176602 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_23) ++15.239954929176601 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_23) ++455.88267648036174 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_0) ++233.38374795126995 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_1) ++144.56161688922427 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_2) ++106.29941341240747 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_3) ++91.48640392066359 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_4) ++68.26495688582924 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_5) ++44.80528445188661 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_6) ++26.387865849578166 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_7) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_0) ++100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_1) ++100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_2) ++100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_2) ++0.6729713331080575 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_3) ++0.6729713331080575 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_3) ++67.29713331080575 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_3) ++0.6729713331080575 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_4) ++0.6729713331080575 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_4) ++67.29713331080575 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_4) ++0.6729713331080575 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_5) ++0.6729713331080575 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_5) ++67.29713331080575 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_5) ++0.5000276133592969 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_6) ++0.5000276133592969 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_6) ++50.00276133592969 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_6) ++0.5000276133592969 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_7) ++0.5000276133592969 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_7) ++50.00276133592969 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_7) ++0.5000276133592969 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_8) ++0.5000276133592969 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_8) ++50.00276133592969 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_8) ++0.4101968025099306 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_9) ++0.4101968025099306 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_9) ++41.01968025099306 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_9) ++0.4101968025099306 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_10) ++0.4101968025099306 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_10) ++41.01968025099306 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_10) ++0.4101968025099306 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_11) ++0.4101968025099306 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_11) ++41.01968025099306 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_11) ++0.37152788212696153 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_12) ++0.37152788212696153 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_12) ++37.15278821269615 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_12) ++0.37152788212696153 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_13) ++0.37152788212696153 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_13) ++37.15278821269615 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_13) ++0.37152788212696153 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_14) ++0.37152788212696153 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_14) ++37.15278821269615 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_14) ++0.3047822664590699 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_15) ++0.3047822664590699 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_15) ++30.478226645906993 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_15) ++0.3047822664590699 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_16) ++0.3047822664590699 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_16) ++30.478226645906993 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_16) ++0.3047822664590699 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_17) ++0.3047822664590699 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_17) ++30.478226645906993 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_17) ++0.22645771341837465 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_18) ++0.22645771341837465 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_18) ++22.645771341837463 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_18) ++0.22645771341837465 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_19) ++0.22645771341837465 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_19) ++22.645771341837463 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_19) ++0.22645771341837465 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_20) ++0.22645771341837465 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_20) ++22.645771341837463 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_20) ++0.15239954929176602 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_21) ++0.15239954929176602 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_21) ++15.239954929176601 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_21) ++0.15239954929176602 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_22) ++0.15239954929176602 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_22) ++15.239954929176601 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_22) ++0.15239954929176602 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_23) ++0.15239954929176602 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_23) ++15.239954929176601 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_23) ++455.88267648036174 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_0) ++233.38374795126995 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_1) ++144.56161688922427 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_2) ++106.29941341240747 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_3) ++91.48640392066359 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_4) ++68.26495688582924 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_5) ++44.80528445188661 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_6) ++26.387865849578166 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_7) + +s.t. + +c_e_BusBlock_balance(electricity_0_0)_: ++1 flow(storage_electricity_0_0) +-1 flow(electricity_storage_0_0) +-1 flow(electricity_demand_dsm_diw_0_0) +-1 flow(electricity_demand_dsm_dlr_0_0) +-1 flow(electricity_demand_dsm_oemof_0_0) += 0 + +c_e_BusBlock_balance(electricity_0_1)_: ++1 flow(storage_electricity_0_1) +-1 flow(electricity_storage_0_1) +-1 flow(electricity_demand_dsm_diw_0_1) +-1 flow(electricity_demand_dsm_dlr_0_1) +-1 flow(electricity_demand_dsm_oemof_0_1) += 0 + +c_e_BusBlock_balance(electricity_0_2)_: ++1 flow(storage_electricity_0_2) +-1 flow(electricity_storage_0_2) +-1 flow(electricity_demand_dsm_diw_0_2) +-1 flow(electricity_demand_dsm_dlr_0_2) +-1 flow(electricity_demand_dsm_oemof_0_2) += 0 + +c_e_BusBlock_balance(electricity_1_3)_: ++1 flow(storage_electricity_1_3) +-1 flow(electricity_storage_1_3) +-1 flow(electricity_demand_dsm_diw_1_3) +-1 flow(electricity_demand_dsm_dlr_1_3) +-1 flow(electricity_demand_dsm_oemof_1_3) += 0 + +c_e_BusBlock_balance(electricity_1_4)_: ++1 flow(storage_electricity_1_4) +-1 flow(electricity_storage_1_4) +-1 flow(electricity_demand_dsm_diw_1_4) +-1 flow(electricity_demand_dsm_dlr_1_4) +-1 flow(electricity_demand_dsm_oemof_1_4) += 0 + +c_e_BusBlock_balance(electricity_1_5)_: ++1 flow(storage_electricity_1_5) +-1 flow(electricity_storage_1_5) +-1 flow(electricity_demand_dsm_diw_1_5) +-1 flow(electricity_demand_dsm_dlr_1_5) +-1 flow(electricity_demand_dsm_oemof_1_5) += 0 + +c_e_BusBlock_balance(electricity_2_6)_: ++1 flow(storage_electricity_2_6) +-1 flow(electricity_storage_2_6) +-1 flow(electricity_demand_dsm_diw_2_6) +-1 flow(electricity_demand_dsm_dlr_2_6) +-1 flow(electricity_demand_dsm_oemof_2_6) += 0 + +c_e_BusBlock_balance(electricity_2_7)_: ++1 flow(storage_electricity_2_7) +-1 flow(electricity_storage_2_7) +-1 flow(electricity_demand_dsm_diw_2_7) +-1 flow(electricity_demand_dsm_dlr_2_7) +-1 flow(electricity_demand_dsm_oemof_2_7) += 0 + +c_e_BusBlock_balance(electricity_2_8)_: ++1 flow(storage_electricity_2_8) +-1 flow(electricity_storage_2_8) +-1 flow(electricity_demand_dsm_diw_2_8) +-1 flow(electricity_demand_dsm_dlr_2_8) +-1 flow(electricity_demand_dsm_oemof_2_8) += 0 + +c_e_BusBlock_balance(electricity_3_9)_: ++1 flow(storage_electricity_3_9) +-1 flow(electricity_storage_3_9) +-1 flow(electricity_demand_dsm_diw_3_9) +-1 flow(electricity_demand_dsm_dlr_3_9) +-1 flow(electricity_demand_dsm_oemof_3_9) += 0 + +c_e_BusBlock_balance(electricity_3_10)_: ++1 flow(storage_electricity_3_10) +-1 flow(electricity_storage_3_10) +-1 flow(electricity_demand_dsm_diw_3_10) +-1 flow(electricity_demand_dsm_dlr_3_10) +-1 flow(electricity_demand_dsm_oemof_3_10) += 0 + +c_e_BusBlock_balance(electricity_3_11)_: ++1 flow(storage_electricity_3_11) +-1 flow(electricity_storage_3_11) +-1 flow(electricity_demand_dsm_diw_3_11) +-1 flow(electricity_demand_dsm_dlr_3_11) +-1 flow(electricity_demand_dsm_oemof_3_11) += 0 + +c_e_BusBlock_balance(electricity_4_12)_: ++1 flow(storage_electricity_4_12) +-1 flow(electricity_storage_4_12) +-1 flow(electricity_demand_dsm_diw_4_12) +-1 flow(electricity_demand_dsm_dlr_4_12) +-1 flow(electricity_demand_dsm_oemof_4_12) += 0 + +c_e_BusBlock_balance(electricity_4_13)_: ++1 flow(storage_electricity_4_13) +-1 flow(electricity_storage_4_13) +-1 flow(electricity_demand_dsm_diw_4_13) +-1 flow(electricity_demand_dsm_dlr_4_13) +-1 flow(electricity_demand_dsm_oemof_4_13) += 0 + +c_e_BusBlock_balance(electricity_4_14)_: ++1 flow(storage_electricity_4_14) +-1 flow(electricity_storage_4_14) +-1 flow(electricity_demand_dsm_diw_4_14) +-1 flow(electricity_demand_dsm_dlr_4_14) +-1 flow(electricity_demand_dsm_oemof_4_14) += 0 + +c_e_BusBlock_balance(electricity_5_15)_: ++1 flow(storage_electricity_5_15) +-1 flow(electricity_storage_5_15) +-1 flow(electricity_demand_dsm_diw_5_15) +-1 flow(electricity_demand_dsm_dlr_5_15) +-1 flow(electricity_demand_dsm_oemof_5_15) += 0 + +c_e_BusBlock_balance(electricity_5_16)_: ++1 flow(storage_electricity_5_16) +-1 flow(electricity_storage_5_16) +-1 flow(electricity_demand_dsm_diw_5_16) +-1 flow(electricity_demand_dsm_dlr_5_16) +-1 flow(electricity_demand_dsm_oemof_5_16) += 0 + +c_e_BusBlock_balance(electricity_5_17)_: ++1 flow(storage_electricity_5_17) +-1 flow(electricity_storage_5_17) +-1 flow(electricity_demand_dsm_diw_5_17) +-1 flow(electricity_demand_dsm_dlr_5_17) +-1 flow(electricity_demand_dsm_oemof_5_17) += 0 + +c_e_BusBlock_balance(electricity_6_18)_: ++1 flow(storage_electricity_6_18) +-1 flow(electricity_storage_6_18) +-1 flow(electricity_demand_dsm_diw_6_18) +-1 flow(electricity_demand_dsm_dlr_6_18) +-1 flow(electricity_demand_dsm_oemof_6_18) += 0 + +c_e_BusBlock_balance(electricity_6_19)_: ++1 flow(storage_electricity_6_19) +-1 flow(electricity_storage_6_19) +-1 flow(electricity_demand_dsm_diw_6_19) +-1 flow(electricity_demand_dsm_dlr_6_19) +-1 flow(electricity_demand_dsm_oemof_6_19) += 0 + +c_e_BusBlock_balance(electricity_6_20)_: ++1 flow(storage_electricity_6_20) +-1 flow(electricity_storage_6_20) +-1 flow(electricity_demand_dsm_diw_6_20) +-1 flow(electricity_demand_dsm_dlr_6_20) +-1 flow(electricity_demand_dsm_oemof_6_20) += 0 + +c_e_BusBlock_balance(electricity_7_21)_: ++1 flow(storage_electricity_7_21) +-1 flow(electricity_storage_7_21) +-1 flow(electricity_demand_dsm_diw_7_21) +-1 flow(electricity_demand_dsm_dlr_7_21) +-1 flow(electricity_demand_dsm_oemof_7_21) += 0 + +c_e_BusBlock_balance(electricity_7_22)_: ++1 flow(storage_electricity_7_22) +-1 flow(electricity_storage_7_22) +-1 flow(electricity_demand_dsm_diw_7_22) +-1 flow(electricity_demand_dsm_dlr_7_22) +-1 flow(electricity_demand_dsm_oemof_7_22) += 0 + +c_e_BusBlock_balance(electricity_7_23)_: ++1 flow(storage_electricity_7_23) +-1 flow(electricity_storage_7_23) +-1 flow(electricity_demand_dsm_diw_7_23) +-1 flow(electricity_demand_dsm_dlr_7_23) +-1 flow(electricity_demand_dsm_oemof_7_23) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_electricity_0)_: +-1 InvestmentFlowBlock_invest(storage_electricity_0) ++1 InvestmentFlowBlock_total(storage_electricity_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_electricity_1)_: +-1 InvestmentFlowBlock_invest(storage_electricity_1) +-1 InvestmentFlowBlock_total(storage_electricity_0) ++1 InvestmentFlowBlock_total(storage_electricity_1) ++1 InvestmentFlowBlock_old(storage_electricity_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_electricity_2)_: +-1 InvestmentFlowBlock_invest(storage_electricity_2) +-1 InvestmentFlowBlock_total(storage_electricity_1) ++1 InvestmentFlowBlock_total(storage_electricity_2) ++1 InvestmentFlowBlock_old(storage_electricity_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_electricity_3)_: +-1 InvestmentFlowBlock_invest(storage_electricity_3) +-1 InvestmentFlowBlock_total(storage_electricity_2) ++1 InvestmentFlowBlock_total(storage_electricity_3) ++1 InvestmentFlowBlock_old(storage_electricity_3) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_electricity_4)_: +-1 InvestmentFlowBlock_invest(storage_electricity_4) +-1 InvestmentFlowBlock_total(storage_electricity_3) ++1 InvestmentFlowBlock_total(storage_electricity_4) ++1 InvestmentFlowBlock_old(storage_electricity_4) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_electricity_5)_: +-1 InvestmentFlowBlock_invest(storage_electricity_5) +-1 InvestmentFlowBlock_total(storage_electricity_4) ++1 InvestmentFlowBlock_total(storage_electricity_5) ++1 InvestmentFlowBlock_old(storage_electricity_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_electricity_6)_: +-1 InvestmentFlowBlock_invest(storage_electricity_6) +-1 InvestmentFlowBlock_total(storage_electricity_5) ++1 InvestmentFlowBlock_total(storage_electricity_6) ++1 InvestmentFlowBlock_old(storage_electricity_6) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_electricity_7)_: +-1 InvestmentFlowBlock_invest(storage_electricity_7) +-1 InvestmentFlowBlock_total(storage_electricity_6) ++1 InvestmentFlowBlock_total(storage_electricity_7) ++1 InvestmentFlowBlock_old(storage_electricity_7) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricity_storage_0)_: +-1 InvestmentFlowBlock_invest(electricity_storage_0) ++1 InvestmentFlowBlock_total(electricity_storage_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricity_storage_1)_: +-1 InvestmentFlowBlock_invest(electricity_storage_1) +-1 InvestmentFlowBlock_total(electricity_storage_0) ++1 InvestmentFlowBlock_total(electricity_storage_1) ++1 InvestmentFlowBlock_old(electricity_storage_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricity_storage_2)_: +-1 InvestmentFlowBlock_invest(electricity_storage_2) +-1 InvestmentFlowBlock_total(electricity_storage_1) ++1 InvestmentFlowBlock_total(electricity_storage_2) ++1 InvestmentFlowBlock_old(electricity_storage_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricity_storage_3)_: +-1 InvestmentFlowBlock_invest(electricity_storage_3) +-1 InvestmentFlowBlock_total(electricity_storage_2) ++1 InvestmentFlowBlock_total(electricity_storage_3) ++1 InvestmentFlowBlock_old(electricity_storage_3) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricity_storage_4)_: +-1 InvestmentFlowBlock_invest(electricity_storage_4) +-1 InvestmentFlowBlock_total(electricity_storage_3) ++1 InvestmentFlowBlock_total(electricity_storage_4) ++1 InvestmentFlowBlock_old(electricity_storage_4) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricity_storage_5)_: +-1 InvestmentFlowBlock_invest(electricity_storage_5) +-1 InvestmentFlowBlock_total(electricity_storage_4) ++1 InvestmentFlowBlock_total(electricity_storage_5) ++1 InvestmentFlowBlock_old(electricity_storage_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricity_storage_6)_: +-1 InvestmentFlowBlock_invest(electricity_storage_6) +-1 InvestmentFlowBlock_total(electricity_storage_5) ++1 InvestmentFlowBlock_total(electricity_storage_6) ++1 InvestmentFlowBlock_old(electricity_storage_6) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricity_storage_7)_: +-1 InvestmentFlowBlock_invest(electricity_storage_7) +-1 InvestmentFlowBlock_total(electricity_storage_6) ++1 InvestmentFlowBlock_total(electricity_storage_7) ++1 InvestmentFlowBlock_old(electricity_storage_7) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_electricity_0)_: ++1 InvestmentFlowBlock_old_end(storage_electricity_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_electricity_1)_: +-1 InvestmentFlowBlock_invest(storage_electricity_0) ++1 InvestmentFlowBlock_old_end(storage_electricity_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_electricity_2)_: ++1 InvestmentFlowBlock_old_end(storage_electricity_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_electricity_3)_: +-1 InvestmentFlowBlock_invest(storage_electricity_1) ++1 InvestmentFlowBlock_old_end(storage_electricity_3) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_electricity_4)_: ++1 InvestmentFlowBlock_old_end(storage_electricity_4) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_electricity_5)_: +-1 InvestmentFlowBlock_invest(storage_electricity_2) ++1 InvestmentFlowBlock_old_end(storage_electricity_5) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_electricity_6)_: +-1 InvestmentFlowBlock_invest(storage_electricity_3) +-1 InvestmentFlowBlock_invest(storage_electricity_4) ++1 InvestmentFlowBlock_old_end(storage_electricity_6) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_electricity_7)_: +-1 InvestmentFlowBlock_invest(storage_electricity_5) +-1 InvestmentFlowBlock_invest(storage_electricity_6) ++1 InvestmentFlowBlock_old_end(storage_electricity_7) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricity_storage_0)_: ++1 InvestmentFlowBlock_old_end(electricity_storage_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricity_storage_1)_: +-1 InvestmentFlowBlock_invest(electricity_storage_0) ++1 InvestmentFlowBlock_old_end(electricity_storage_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricity_storage_2)_: ++1 InvestmentFlowBlock_old_end(electricity_storage_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricity_storage_3)_: +-1 InvestmentFlowBlock_invest(electricity_storage_1) ++1 InvestmentFlowBlock_old_end(electricity_storage_3) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricity_storage_4)_: ++1 InvestmentFlowBlock_old_end(electricity_storage_4) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricity_storage_5)_: +-1 InvestmentFlowBlock_invest(electricity_storage_2) ++1 InvestmentFlowBlock_old_end(electricity_storage_5) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricity_storage_6)_: +-1 InvestmentFlowBlock_invest(electricity_storage_3) +-1 InvestmentFlowBlock_invest(electricity_storage_4) ++1 InvestmentFlowBlock_old_end(electricity_storage_6) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricity_storage_7)_: +-1 InvestmentFlowBlock_invest(electricity_storage_5) +-1 InvestmentFlowBlock_invest(electricity_storage_6) ++1 InvestmentFlowBlock_old_end(electricity_storage_7) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_electricity_0)_: ++1 InvestmentFlowBlock_old_exo(storage_electricity_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_electricity_1)_: ++1 InvestmentFlowBlock_old_exo(storage_electricity_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_electricity_2)_: ++1 InvestmentFlowBlock_old_exo(storage_electricity_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_electricity_3)_: ++1 InvestmentFlowBlock_old_exo(storage_electricity_3) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_electricity_4)_: ++1 InvestmentFlowBlock_old_exo(storage_electricity_4) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_electricity_5)_: ++1 InvestmentFlowBlock_old_exo(storage_electricity_5) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_electricity_6)_: ++1 InvestmentFlowBlock_old_exo(storage_electricity_6) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_electricity_7)_: ++1 InvestmentFlowBlock_old_exo(storage_electricity_7) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricity_storage_0)_: ++1 InvestmentFlowBlock_old_exo(electricity_storage_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricity_storage_1)_: ++1 InvestmentFlowBlock_old_exo(electricity_storage_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricity_storage_2)_: ++1 InvestmentFlowBlock_old_exo(electricity_storage_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricity_storage_3)_: ++1 InvestmentFlowBlock_old_exo(electricity_storage_3) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricity_storage_4)_: ++1 InvestmentFlowBlock_old_exo(electricity_storage_4) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricity_storage_5)_: ++1 InvestmentFlowBlock_old_exo(electricity_storage_5) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricity_storage_6)_: ++1 InvestmentFlowBlock_old_exo(electricity_storage_6) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricity_storage_7)_: ++1 InvestmentFlowBlock_old_exo(electricity_storage_7) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_electricity_0)_: +-1 InvestmentFlowBlock_old_end(storage_electricity_0) +-1 InvestmentFlowBlock_old_exo(storage_electricity_0) ++1 InvestmentFlowBlock_old(storage_electricity_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_electricity_1)_: ++1 InvestmentFlowBlock_old(storage_electricity_1) +-1 InvestmentFlowBlock_old_end(storage_electricity_1) +-1 InvestmentFlowBlock_old_exo(storage_electricity_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_electricity_2)_: ++1 InvestmentFlowBlock_old(storage_electricity_2) +-1 InvestmentFlowBlock_old_end(storage_electricity_2) +-1 InvestmentFlowBlock_old_exo(storage_electricity_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_electricity_3)_: ++1 InvestmentFlowBlock_old(storage_electricity_3) +-1 InvestmentFlowBlock_old_end(storage_electricity_3) +-1 InvestmentFlowBlock_old_exo(storage_electricity_3) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_electricity_4)_: ++1 InvestmentFlowBlock_old(storage_electricity_4) +-1 InvestmentFlowBlock_old_end(storage_electricity_4) +-1 InvestmentFlowBlock_old_exo(storage_electricity_4) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_electricity_5)_: ++1 InvestmentFlowBlock_old(storage_electricity_5) +-1 InvestmentFlowBlock_old_end(storage_electricity_5) +-1 InvestmentFlowBlock_old_exo(storage_electricity_5) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_electricity_6)_: ++1 InvestmentFlowBlock_old(storage_electricity_6) +-1 InvestmentFlowBlock_old_end(storage_electricity_6) +-1 InvestmentFlowBlock_old_exo(storage_electricity_6) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_electricity_7)_: ++1 InvestmentFlowBlock_old(storage_electricity_7) +-1 InvestmentFlowBlock_old_end(storage_electricity_7) +-1 InvestmentFlowBlock_old_exo(storage_electricity_7) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricity_storage_0)_: +-1 InvestmentFlowBlock_old_end(electricity_storage_0) +-1 InvestmentFlowBlock_old_exo(electricity_storage_0) ++1 InvestmentFlowBlock_old(electricity_storage_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricity_storage_1)_: ++1 InvestmentFlowBlock_old(electricity_storage_1) +-1 InvestmentFlowBlock_old_end(electricity_storage_1) +-1 InvestmentFlowBlock_old_exo(electricity_storage_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricity_storage_2)_: ++1 InvestmentFlowBlock_old(electricity_storage_2) +-1 InvestmentFlowBlock_old_end(electricity_storage_2) +-1 InvestmentFlowBlock_old_exo(electricity_storage_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricity_storage_3)_: ++1 InvestmentFlowBlock_old(electricity_storage_3) +-1 InvestmentFlowBlock_old_end(electricity_storage_3) +-1 InvestmentFlowBlock_old_exo(electricity_storage_3) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricity_storage_4)_: ++1 InvestmentFlowBlock_old(electricity_storage_4) +-1 InvestmentFlowBlock_old_end(electricity_storage_4) +-1 InvestmentFlowBlock_old_exo(electricity_storage_4) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricity_storage_5)_: ++1 InvestmentFlowBlock_old(electricity_storage_5) +-1 InvestmentFlowBlock_old_end(electricity_storage_5) +-1 InvestmentFlowBlock_old_exo(electricity_storage_5) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricity_storage_6)_: ++1 InvestmentFlowBlock_old(electricity_storage_6) +-1 InvestmentFlowBlock_old_end(electricity_storage_6) +-1 InvestmentFlowBlock_old_exo(electricity_storage_6) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricity_storage_7)_: ++1 InvestmentFlowBlock_old(electricity_storage_7) +-1 InvestmentFlowBlock_old_end(electricity_storage_7) +-1 InvestmentFlowBlock_old_exo(electricity_storage_7) += 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_0_0)_: ++1 flow(storage_electricity_0_0) +-1 InvestmentFlowBlock_total(storage_electricity_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_0_1)_: ++1 flow(storage_electricity_0_1) +-1 InvestmentFlowBlock_total(storage_electricity_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_0_2)_: ++1 flow(storage_electricity_0_2) +-1 InvestmentFlowBlock_total(storage_electricity_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_1_3)_: ++1 flow(storage_electricity_1_3) +-1 InvestmentFlowBlock_total(storage_electricity_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_1_4)_: ++1 flow(storage_electricity_1_4) +-1 InvestmentFlowBlock_total(storage_electricity_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_1_5)_: ++1 flow(storage_electricity_1_5) +-1 InvestmentFlowBlock_total(storage_electricity_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_2_6)_: ++1 flow(storage_electricity_2_6) +-1 InvestmentFlowBlock_total(storage_electricity_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_2_7)_: ++1 flow(storage_electricity_2_7) +-1 InvestmentFlowBlock_total(storage_electricity_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_2_8)_: ++1 flow(storage_electricity_2_8) +-1 InvestmentFlowBlock_total(storage_electricity_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_3_9)_: ++1 flow(storage_electricity_3_9) +-1 InvestmentFlowBlock_total(storage_electricity_3) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_3_10)_: ++1 flow(storage_electricity_3_10) +-1 InvestmentFlowBlock_total(storage_electricity_3) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_3_11)_: ++1 flow(storage_electricity_3_11) +-1 InvestmentFlowBlock_total(storage_electricity_3) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_4_12)_: ++1 flow(storage_electricity_4_12) +-1 InvestmentFlowBlock_total(storage_electricity_4) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_4_13)_: ++1 flow(storage_electricity_4_13) +-1 InvestmentFlowBlock_total(storage_electricity_4) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_4_14)_: ++1 flow(storage_electricity_4_14) +-1 InvestmentFlowBlock_total(storage_electricity_4) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_5_15)_: ++1 flow(storage_electricity_5_15) +-1 InvestmentFlowBlock_total(storage_electricity_5) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_5_16)_: ++1 flow(storage_electricity_5_16) +-1 InvestmentFlowBlock_total(storage_electricity_5) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_5_17)_: ++1 flow(storage_electricity_5_17) +-1 InvestmentFlowBlock_total(storage_electricity_5) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_6_18)_: ++1 flow(storage_electricity_6_18) +-1 InvestmentFlowBlock_total(storage_electricity_6) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_6_19)_: ++1 flow(storage_electricity_6_19) +-1 InvestmentFlowBlock_total(storage_electricity_6) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_6_20)_: ++1 flow(storage_electricity_6_20) +-1 InvestmentFlowBlock_total(storage_electricity_6) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_7_21)_: ++1 flow(storage_electricity_7_21) +-1 InvestmentFlowBlock_total(storage_electricity_7) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_7_22)_: ++1 flow(storage_electricity_7_22) +-1 InvestmentFlowBlock_total(storage_electricity_7) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_electricity_7_23)_: ++1 flow(storage_electricity_7_23) +-1 InvestmentFlowBlock_total(storage_electricity_7) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_0_0)_: ++1 flow(electricity_storage_0_0) +-1 InvestmentFlowBlock_total(electricity_storage_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_0_1)_: ++1 flow(electricity_storage_0_1) +-1 InvestmentFlowBlock_total(electricity_storage_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_0_2)_: ++1 flow(electricity_storage_0_2) +-1 InvestmentFlowBlock_total(electricity_storage_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_1_3)_: ++1 flow(electricity_storage_1_3) +-1 InvestmentFlowBlock_total(electricity_storage_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_1_4)_: ++1 flow(electricity_storage_1_4) +-1 InvestmentFlowBlock_total(electricity_storage_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_1_5)_: ++1 flow(electricity_storage_1_5) +-1 InvestmentFlowBlock_total(electricity_storage_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_2_6)_: ++1 flow(electricity_storage_2_6) +-1 InvestmentFlowBlock_total(electricity_storage_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_2_7)_: ++1 flow(electricity_storage_2_7) +-1 InvestmentFlowBlock_total(electricity_storage_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_2_8)_: ++1 flow(electricity_storage_2_8) +-1 InvestmentFlowBlock_total(electricity_storage_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_3_9)_: ++1 flow(electricity_storage_3_9) +-1 InvestmentFlowBlock_total(electricity_storage_3) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_3_10)_: ++1 flow(electricity_storage_3_10) +-1 InvestmentFlowBlock_total(electricity_storage_3) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_3_11)_: ++1 flow(electricity_storage_3_11) +-1 InvestmentFlowBlock_total(electricity_storage_3) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_4_12)_: ++1 flow(electricity_storage_4_12) +-1 InvestmentFlowBlock_total(electricity_storage_4) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_4_13)_: ++1 flow(electricity_storage_4_13) +-1 InvestmentFlowBlock_total(electricity_storage_4) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_4_14)_: ++1 flow(electricity_storage_4_14) +-1 InvestmentFlowBlock_total(electricity_storage_4) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_5_15)_: ++1 flow(electricity_storage_5_15) +-1 InvestmentFlowBlock_total(electricity_storage_5) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_5_16)_: ++1 flow(electricity_storage_5_16) +-1 InvestmentFlowBlock_total(electricity_storage_5) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_5_17)_: ++1 flow(electricity_storage_5_17) +-1 InvestmentFlowBlock_total(electricity_storage_5) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_6_18)_: ++1 flow(electricity_storage_6_18) +-1 InvestmentFlowBlock_total(electricity_storage_6) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_6_19)_: ++1 flow(electricity_storage_6_19) +-1 InvestmentFlowBlock_total(electricity_storage_6) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_6_20)_: ++1 flow(electricity_storage_6_20) +-1 InvestmentFlowBlock_total(electricity_storage_6) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_7_21)_: ++1 flow(electricity_storage_7_21) +-1 InvestmentFlowBlock_total(electricity_storage_7) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_7_22)_: ++1 flow(electricity_storage_7_22) +-1 InvestmentFlowBlock_total(electricity_storage_7) +<= 0 + +c_u_InvestmentFlowBlock_max(electricity_storage_7_23)_: ++1 flow(electricity_storage_7_23) +-1 InvestmentFlowBlock_total(electricity_storage_7) +<= 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_0) ++1 GenericInvestmentStorageBlock_total(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_1)_: +-1 GenericInvestmentStorageBlock_invest(storage_1) +-1 GenericInvestmentStorageBlock_total(storage_0) ++1 GenericInvestmentStorageBlock_total(storage_1) ++1 GenericInvestmentStorageBlock_old(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_2)_: +-1 GenericInvestmentStorageBlock_invest(storage_2) +-1 GenericInvestmentStorageBlock_total(storage_1) ++1 GenericInvestmentStorageBlock_total(storage_2) ++1 GenericInvestmentStorageBlock_old(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_3)_: +-1 GenericInvestmentStorageBlock_invest(storage_3) +-1 GenericInvestmentStorageBlock_total(storage_2) ++1 GenericInvestmentStorageBlock_total(storage_3) ++1 GenericInvestmentStorageBlock_old(storage_3) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_4)_: +-1 GenericInvestmentStorageBlock_invest(storage_4) +-1 GenericInvestmentStorageBlock_total(storage_3) ++1 GenericInvestmentStorageBlock_total(storage_4) ++1 GenericInvestmentStorageBlock_old(storage_4) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_5)_: +-1 GenericInvestmentStorageBlock_invest(storage_5) +-1 GenericInvestmentStorageBlock_total(storage_4) ++1 GenericInvestmentStorageBlock_total(storage_5) ++1 GenericInvestmentStorageBlock_old(storage_5) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_6)_: +-1 GenericInvestmentStorageBlock_invest(storage_6) +-1 GenericInvestmentStorageBlock_total(storage_5) ++1 GenericInvestmentStorageBlock_total(storage_6) ++1 GenericInvestmentStorageBlock_old(storage_6) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_7)_: +-1 GenericInvestmentStorageBlock_invest(storage_7) +-1 GenericInvestmentStorageBlock_total(storage_6) ++1 GenericInvestmentStorageBlock_total(storage_7) ++1 GenericInvestmentStorageBlock_old(storage_7) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_1)_: +-1 GenericInvestmentStorageBlock_invest(storage_0) ++1 GenericInvestmentStorageBlock_old_end(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_2)_: ++1 GenericInvestmentStorageBlock_old_end(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_3)_: +-1 GenericInvestmentStorageBlock_invest(storage_1) ++1 GenericInvestmentStorageBlock_old_end(storage_3) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_4)_: ++1 GenericInvestmentStorageBlock_old_end(storage_4) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_5)_: +-1 GenericInvestmentStorageBlock_invest(storage_2) ++1 GenericInvestmentStorageBlock_old_end(storage_5) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_6)_: +-1 GenericInvestmentStorageBlock_invest(storage_3) +-1 GenericInvestmentStorageBlock_invest(storage_4) ++1 GenericInvestmentStorageBlock_old_end(storage_6) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_7)_: +-1 GenericInvestmentStorageBlock_invest(storage_5) +-1 GenericInvestmentStorageBlock_invest(storage_6) ++1 GenericInvestmentStorageBlock_old_end(storage_7) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_3)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_3) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_4)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_4) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_5)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_5) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_6)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_6) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_7)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_7) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage_0) +-1 GenericInvestmentStorageBlock_old_exo(storage_0) ++1 GenericInvestmentStorageBlock_old(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_1)_: ++1 GenericInvestmentStorageBlock_old(storage_1) +-1 GenericInvestmentStorageBlock_old_end(storage_1) +-1 GenericInvestmentStorageBlock_old_exo(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_2)_: ++1 GenericInvestmentStorageBlock_old(storage_2) +-1 GenericInvestmentStorageBlock_old_end(storage_2) +-1 GenericInvestmentStorageBlock_old_exo(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_3)_: ++1 GenericInvestmentStorageBlock_old(storage_3) +-1 GenericInvestmentStorageBlock_old_end(storage_3) +-1 GenericInvestmentStorageBlock_old_exo(storage_3) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_4)_: ++1 GenericInvestmentStorageBlock_old(storage_4) +-1 GenericInvestmentStorageBlock_old_end(storage_4) +-1 GenericInvestmentStorageBlock_old_exo(storage_4) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_5)_: ++1 GenericInvestmentStorageBlock_old(storage_5) +-1 GenericInvestmentStorageBlock_old_end(storage_5) +-1 GenericInvestmentStorageBlock_old_exo(storage_5) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_6)_: ++1 GenericInvestmentStorageBlock_old(storage_6) +-1 GenericInvestmentStorageBlock_old_end(storage_6) +-1 GenericInvestmentStorageBlock_old_exo(storage_6) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_7)_: ++1 GenericInvestmentStorageBlock_old(storage_7) +-1 GenericInvestmentStorageBlock_old_end(storage_7) +-1 GenericInvestmentStorageBlock_old_exo(storage_7) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage_0)_: +1 GenericInvestmentStorageBlock_storage_content(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_0_1)_: ++1 flow(storage_electricity_0_1) +-1 flow(electricity_storage_0_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_1) +-1 GenericInvestmentStorageBlock_storage_content(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_0_2)_: ++1 flow(storage_electricity_0_2) +-1 flow(electricity_storage_0_2) +-1 GenericInvestmentStorageBlock_storage_content(storage_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_1_3)_: ++1 flow(storage_electricity_1_3) +-1 flow(electricity_storage_1_3) +-1 GenericInvestmentStorageBlock_storage_content(storage_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_1_4)_: ++1 flow(storage_electricity_1_4) +-1 flow(electricity_storage_1_4) +-1 GenericInvestmentStorageBlock_storage_content(storage_3) ++1 GenericInvestmentStorageBlock_storage_content(storage_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_1_5)_: ++1 flow(storage_electricity_1_5) +-1 flow(electricity_storage_1_5) +-1 GenericInvestmentStorageBlock_storage_content(storage_4) ++1 GenericInvestmentStorageBlock_storage_content(storage_5) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_2_6)_: ++1 flow(storage_electricity_2_6) +-1 flow(electricity_storage_2_6) +-1 GenericInvestmentStorageBlock_storage_content(storage_5) ++1 GenericInvestmentStorageBlock_storage_content(storage_6) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_2_7)_: ++1 flow(storage_electricity_2_7) +-1 flow(electricity_storage_2_7) +-1 GenericInvestmentStorageBlock_storage_content(storage_6) ++1 GenericInvestmentStorageBlock_storage_content(storage_7) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_2_8)_: ++1 flow(storage_electricity_2_8) +-1 flow(electricity_storage_2_8) +-1 GenericInvestmentStorageBlock_storage_content(storage_7) ++1 GenericInvestmentStorageBlock_storage_content(storage_8) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_3_9)_: ++1 flow(storage_electricity_3_9) +-1 flow(electricity_storage_3_9) +-1 GenericInvestmentStorageBlock_storage_content(storage_8) ++1 GenericInvestmentStorageBlock_storage_content(storage_9) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_3_10)_: ++1 flow(storage_electricity_3_10) +-1 flow(electricity_storage_3_10) +-1 GenericInvestmentStorageBlock_storage_content(storage_9) ++1 GenericInvestmentStorageBlock_storage_content(storage_10) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_3_11)_: ++1 flow(storage_electricity_3_11) +-1 flow(electricity_storage_3_11) +-1 GenericInvestmentStorageBlock_storage_content(storage_10) ++1 GenericInvestmentStorageBlock_storage_content(storage_11) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_4_12)_: ++1 flow(storage_electricity_4_12) +-1 flow(electricity_storage_4_12) +-1 GenericInvestmentStorageBlock_storage_content(storage_11) ++1 GenericInvestmentStorageBlock_storage_content(storage_12) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_4_13)_: ++1 flow(storage_electricity_4_13) +-1 flow(electricity_storage_4_13) +-1 GenericInvestmentStorageBlock_storage_content(storage_12) ++1 GenericInvestmentStorageBlock_storage_content(storage_13) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_4_14)_: ++1 flow(storage_electricity_4_14) +-1 flow(electricity_storage_4_14) +-1 GenericInvestmentStorageBlock_storage_content(storage_13) ++1 GenericInvestmentStorageBlock_storage_content(storage_14) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_5_15)_: ++1 flow(storage_electricity_5_15) +-1 flow(electricity_storage_5_15) +-1 GenericInvestmentStorageBlock_storage_content(storage_14) ++1 GenericInvestmentStorageBlock_storage_content(storage_15) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_5_16)_: ++1 flow(storage_electricity_5_16) +-1 flow(electricity_storage_5_16) +-1 GenericInvestmentStorageBlock_storage_content(storage_15) ++1 GenericInvestmentStorageBlock_storage_content(storage_16) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_5_17)_: ++1 flow(storage_electricity_5_17) +-1 flow(electricity_storage_5_17) +-1 GenericInvestmentStorageBlock_storage_content(storage_16) ++1 GenericInvestmentStorageBlock_storage_content(storage_17) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_6_18)_: ++1 flow(storage_electricity_6_18) +-1 flow(electricity_storage_6_18) +-1 GenericInvestmentStorageBlock_storage_content(storage_17) ++1 GenericInvestmentStorageBlock_storage_content(storage_18) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_6_19)_: ++1 flow(storage_electricity_6_19) +-1 flow(electricity_storage_6_19) +-1 GenericInvestmentStorageBlock_storage_content(storage_18) ++1 GenericInvestmentStorageBlock_storage_content(storage_19) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_6_20)_: ++1 flow(storage_electricity_6_20) +-1 flow(electricity_storage_6_20) +-1 GenericInvestmentStorageBlock_storage_content(storage_19) ++1 GenericInvestmentStorageBlock_storage_content(storage_20) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_7_21)_: ++1 flow(storage_electricity_7_21) +-1 flow(electricity_storage_7_21) +-1 GenericInvestmentStorageBlock_storage_content(storage_20) ++1 GenericInvestmentStorageBlock_storage_content(storage_21) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_7_22)_: ++1 flow(storage_electricity_7_22) +-1 flow(electricity_storage_7_22) +-1 GenericInvestmentStorageBlock_storage_content(storage_21) ++1 GenericInvestmentStorageBlock_storage_content(storage_22) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_7_23)_: ++1 flow(storage_electricity_7_23) +-1 flow(electricity_storage_7_23) +-1 GenericInvestmentStorageBlock_storage_content(storage_22) ++1 GenericInvestmentStorageBlock_storage_content(storage_23) += 0 + +c_e_GenericInvestmentStorageBlock_power_coupled(storage_0)_: ++1 InvestmentFlowBlock_total(storage_electricity_0) +-1 InvestmentFlowBlock_total(electricity_storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_power_coupled(storage_1)_: ++1 InvestmentFlowBlock_total(storage_electricity_1) +-1 InvestmentFlowBlock_total(electricity_storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_power_coupled(storage_2)_: ++1 InvestmentFlowBlock_total(storage_electricity_2) +-1 InvestmentFlowBlock_total(electricity_storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_power_coupled(storage_3)_: ++1 InvestmentFlowBlock_total(storage_electricity_3) +-1 InvestmentFlowBlock_total(electricity_storage_3) += 0 + +c_e_GenericInvestmentStorageBlock_power_coupled(storage_4)_: ++1 InvestmentFlowBlock_total(storage_electricity_4) +-1 InvestmentFlowBlock_total(electricity_storage_4) += 0 + +c_e_GenericInvestmentStorageBlock_power_coupled(storage_5)_: ++1 InvestmentFlowBlock_total(storage_electricity_5) +-1 InvestmentFlowBlock_total(electricity_storage_5) += 0 + +c_e_GenericInvestmentStorageBlock_power_coupled(storage_6)_: ++1 InvestmentFlowBlock_total(storage_electricity_6) +-1 InvestmentFlowBlock_total(electricity_storage_6) += 0 + +c_e_GenericInvestmentStorageBlock_power_coupled(storage_7)_: ++1 InvestmentFlowBlock_total(storage_electricity_7) +-1 InvestmentFlowBlock_total(electricity_storage_7) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_0)_: ++1 InvestmentFlowBlock_total(storage_electricity_0) +-0.2 GenericInvestmentStorageBlock_total(storage_0) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_1)_: ++1 InvestmentFlowBlock_total(storage_electricity_1) +-0.2 GenericInvestmentStorageBlock_total(storage_1) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_2)_: ++1 InvestmentFlowBlock_total(storage_electricity_2) +-0.2 GenericInvestmentStorageBlock_total(storage_2) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_3)_: ++1 InvestmentFlowBlock_total(storage_electricity_3) +-0.2 GenericInvestmentStorageBlock_total(storage_3) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_4)_: ++1 InvestmentFlowBlock_total(storage_electricity_4) +-0.2 GenericInvestmentStorageBlock_total(storage_4) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_5)_: ++1 InvestmentFlowBlock_total(storage_electricity_5) +-0.2 GenericInvestmentStorageBlock_total(storage_5) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_6)_: ++1 InvestmentFlowBlock_total(storage_electricity_6) +-0.2 GenericInvestmentStorageBlock_total(storage_6) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_7)_: ++1 InvestmentFlowBlock_total(storage_electricity_7) +-0.2 GenericInvestmentStorageBlock_total(storage_7) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_2)_: +-1 GenericInvestmentStorageBlock_total(storage_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_1_3)_: +-1 GenericInvestmentStorageBlock_total(storage_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_1_4)_: +-1 GenericInvestmentStorageBlock_total(storage_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_1_5)_: +-1 GenericInvestmentStorageBlock_total(storage_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_5) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_2_6)_: +-1 GenericInvestmentStorageBlock_total(storage_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_6) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_2_7)_: +-1 GenericInvestmentStorageBlock_total(storage_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_7) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_2_8)_: +-1 GenericInvestmentStorageBlock_total(storage_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_8) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_3_9)_: +-1 GenericInvestmentStorageBlock_total(storage_3) ++1 GenericInvestmentStorageBlock_storage_content(storage_9) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_3_10)_: +-1 GenericInvestmentStorageBlock_total(storage_3) ++1 GenericInvestmentStorageBlock_storage_content(storage_10) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_3_11)_: +-1 GenericInvestmentStorageBlock_total(storage_3) ++1 GenericInvestmentStorageBlock_storage_content(storage_11) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_4_12)_: +-1 GenericInvestmentStorageBlock_total(storage_4) ++1 GenericInvestmentStorageBlock_storage_content(storage_12) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_4_13)_: +-1 GenericInvestmentStorageBlock_total(storage_4) ++1 GenericInvestmentStorageBlock_storage_content(storage_13) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_4_14)_: +-1 GenericInvestmentStorageBlock_total(storage_4) ++1 GenericInvestmentStorageBlock_storage_content(storage_14) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_5_15)_: +-1 GenericInvestmentStorageBlock_total(storage_5) ++1 GenericInvestmentStorageBlock_storage_content(storage_15) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_5_16)_: +-1 GenericInvestmentStorageBlock_total(storage_5) ++1 GenericInvestmentStorageBlock_storage_content(storage_16) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_5_17)_: +-1 GenericInvestmentStorageBlock_total(storage_5) ++1 GenericInvestmentStorageBlock_storage_content(storage_17) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_6_18)_: +-1 GenericInvestmentStorageBlock_total(storage_6) ++1 GenericInvestmentStorageBlock_storage_content(storage_18) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_6_19)_: +-1 GenericInvestmentStorageBlock_total(storage_6) ++1 GenericInvestmentStorageBlock_storage_content(storage_19) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_6_20)_: +-1 GenericInvestmentStorageBlock_total(storage_6) ++1 GenericInvestmentStorageBlock_storage_content(storage_20) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_7_21)_: +-1 GenericInvestmentStorageBlock_total(storage_7) ++1 GenericInvestmentStorageBlock_storage_content(storage_21) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_7_22)_: +-1 GenericInvestmentStorageBlock_total(storage_7) ++1 GenericInvestmentStorageBlock_storage_content(storage_22) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_7_23)_: +-1 GenericInvestmentStorageBlock_total(storage_7) ++1 GenericInvestmentStorageBlock_storage_content(storage_23) +<= 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_diw_0)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_0) ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_diw_1)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_1) +-1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_diw_2)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_2) +-1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_diw_3)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_3) +-1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_3) += 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_diw_4)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_4) +-1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_4) += 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_diw_5)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_5) +-1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_5) += 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_diw_6)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_6) +-1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_6) += 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_diw_7)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_7) +-1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_7) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(demand_dsm_diw_0)_: ++1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(demand_dsm_diw_1)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_0) ++1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(demand_dsm_diw_2)_: ++1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(demand_dsm_diw_3)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_1) ++1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_3) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(demand_dsm_diw_4)_: ++1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_4) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(demand_dsm_diw_5)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_2) ++1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_5) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(demand_dsm_diw_6)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_3) +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_4) ++1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_6) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(demand_dsm_diw_7)_: +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_5) +-1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_6) ++1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_7) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_diw_0)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_diw_1)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_diw_2)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_diw_3)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_3) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_diw_4)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_4) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_diw_5)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_5) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_diw_6)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_6) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_diw_7)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_7) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_diw_0)_: +-1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_0) +-1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_0) ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_diw_1)_: ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_1) +-1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_1) +-1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_diw_2)_: ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_2) +-1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_2) +-1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_diw_3)_: ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_3) +-1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_3) +-1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_3) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_diw_4)_: ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_4) +-1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_4) +-1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_4) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_diw_5)_: ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_5) +-1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_5) +-1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_5) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_diw_6)_: ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_6) +-1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_6) +-1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_6) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_diw_7)_: ++1 SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_7) +-1 SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_7) +-1 SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_7) += 0 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_0) +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_0) ++1 flow(electricity_demand_dsm_diw_0_0) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_0_1)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_1) ++1 flow(electricity_demand_dsm_diw_0_1) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_0_2)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_2) ++1 flow(electricity_demand_dsm_diw_0_2) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_1_3)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_3) ++1 flow(electricity_demand_dsm_diw_1_3) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_1_4)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_4) ++1 flow(electricity_demand_dsm_diw_1_4) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_1_5)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_5) ++1 flow(electricity_demand_dsm_diw_1_5) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_2_6)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_6) ++1 flow(electricity_demand_dsm_diw_2_6) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_2_7)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_7) ++1 flow(electricity_demand_dsm_diw_2_7) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_2_8)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_8) ++1 flow(electricity_demand_dsm_diw_2_8) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_3_9)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_9) ++1 flow(electricity_demand_dsm_diw_3_9) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_3_10)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_10) ++1 flow(electricity_demand_dsm_diw_3_10) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_3_11)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_11) ++1 flow(electricity_demand_dsm_diw_3_11) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_4_12)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_12) ++1 flow(electricity_demand_dsm_diw_4_12) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_4_13)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_13) ++1 flow(electricity_demand_dsm_diw_4_13) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_4_14)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_14) ++1 flow(electricity_demand_dsm_diw_4_14) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_5_15)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_15) ++1 flow(electricity_demand_dsm_diw_5_15) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_5_16)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_16) ++1 flow(electricity_demand_dsm_diw_5_16) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_5_17)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_17) ++1 flow(electricity_demand_dsm_diw_5_17) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_6_18)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_18) ++1 flow(electricity_demand_dsm_diw_6_18) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_6_19)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_19) ++1 flow(electricity_demand_dsm_diw_6_19) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_6_20)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_20) ++1 flow(electricity_demand_dsm_diw_6_20) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_7_21)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_21) ++1 flow(electricity_demand_dsm_diw_7_21) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_7_22)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_22) ++1 flow(electricity_demand_dsm_diw_7_22) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_diw_7_23)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_23) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_23) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_23) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_23) ++1 flow(electricity_demand_dsm_diw_7_23) += 1 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_0)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_0) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_1)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_1) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_1) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_2)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_2) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_2) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_3) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_3)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_2) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_3) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_3) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_4) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_4)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_3) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_4) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_4) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_5) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_5)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_4) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_5) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_5) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_6) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_6)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_5) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_6) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_6) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_7) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_7)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_6) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_7) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_7) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_8) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_8)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_7) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_8) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_8) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_9) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_9)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_8) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_9) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_9) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_10) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_10)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_9) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_10) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_10) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_11) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_11)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_10) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_11) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_11) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_12) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_12)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_11) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_12) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_12) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_13) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_13)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_12) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_13) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_13) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_14) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_14)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_13) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_14) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_14) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_15) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_15)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_14) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_15) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_15) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_16) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_16)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_15) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_16) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_16) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_17) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_17)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_16) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_17) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_17) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_18) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_18)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_17) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_18) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_18) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_19) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_19)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_18) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_19) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_19) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_20) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_20)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_19) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_20) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_20) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_21) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_21)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_20) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_21) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_21) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_22) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_22)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_21) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_22) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_22) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_23) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_diw_23)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_22) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_23) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_23) += 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_0) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_1) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_0_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_2) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_1_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_3) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_1_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_4) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_1_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_5) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_2_6)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_6) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_2_7)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_7) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_2_8)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_8) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_3_9)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_9) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_3_10)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_10) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_3_11)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_11) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_4_12)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_12) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_4_13)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_13) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_4_14)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_14) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_5_15)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_15) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_5_16)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_16) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_5_17)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_17) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_6_18)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_18) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_6_19)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_19) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_6_20)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_20) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_7_21)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_21) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_7_22)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_22) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_diw_7_23)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_23) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_0) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_1) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_0_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_2) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_1_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_3) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_1_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_4) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_1_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_5) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_2_6)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_6) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_2_7)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_7) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_2_8)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_8) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_3_9)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_9) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_3_10)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_10) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_3_11)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_11) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_4_12)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_12) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_4_13)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_13) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_4_14)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_14) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_5_15)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_15) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_5_16)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_16) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_5_17)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_17) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_6_18)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_18) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_6_19)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_19) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_6_20)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_20) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_7_21)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_21) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_7_22)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_22) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_diw_7_23)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_23) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_23) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_23) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_0) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_1) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_0_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_2) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_1_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_3) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_1_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_4) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_1_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_5) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_2_6)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_6) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_2_7)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_7) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_2_8)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_8) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_3_9)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_9) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_3_10)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_10) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_3_11)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_11) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_4_12)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_12) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_4_13)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_13) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_4_14)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_14) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_5_15)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_15) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_5_16)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_16) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_5_17)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_17) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_6_18)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_18) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_6_19)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_19) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_6_20)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_20) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_7_21)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_21) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_7_22)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_22) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_diw_7_23)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_23) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_23) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_23) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_23) +-0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_1) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_2) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_0_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_3) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_1_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_4) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_1_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_5) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_1_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_6) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_2_6)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_6) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_7) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_2_7)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_7) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_8) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_2_8)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_8) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_9) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_3_9)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_9) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_10) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_3_10)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_10) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_11) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_3_11)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_11) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_12) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_4_12)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_12) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_13) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_4_13)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_13) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_14) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_4_14)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_14) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_15) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_5_15)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_15) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_16) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_5_16)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_16) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_17) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_5_17)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_17) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_18) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_6_18)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_18) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_19) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_6_19)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_19) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_20) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_6_20)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_20) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_21) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_7_21)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_21) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_22) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_7_22)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_22) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_23) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_diw_7_23)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_23) +-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_diw_0)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) +<= 1000 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_diw_1)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) +<= 1000 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_diw_2)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) +<= 1000 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_diw_3)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) +<= 1000 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_diw_4)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) +<= 1000 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_diw_5)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) +<= 1000 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_diw_6)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) +<= 1000 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_diw_7)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +<= 1000 + +c_l_SinkDSMDIWInvestmentBlock_overall_minimum(demand_dsm_diw)_: ++1 SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) +>= 5 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_dlr_0)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_dlr_1)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_1) +-1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_dlr_2)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_2) +-1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_dlr_3)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_3) +-1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_dlr_4)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_4) +-1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_dlr_5)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_5) +-1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_dlr_6)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_6) +-1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_6) += 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_dlr_7)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_7) +-1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_7) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(demand_dsm_dlr_0)_: ++1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(demand_dsm_dlr_1)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(demand_dsm_dlr_2)_: ++1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(demand_dsm_dlr_3)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_1) ++1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(demand_dsm_dlr_4)_: ++1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(demand_dsm_dlr_5)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_2) ++1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(demand_dsm_dlr_6)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_3) +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_4) ++1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_6) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(demand_dsm_dlr_7)_: +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_5) +-1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_6) ++1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_7) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_dlr_0)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_dlr_1)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_dlr_2)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_dlr_3)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_dlr_4)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_dlr_5)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_dlr_6)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_6) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_dlr_7)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_7) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_dlr_0)_: +-1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_0) +-1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_dlr_1)_: ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_1) +-1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_1) +-1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_dlr_2)_: ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_2) +-1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_2) +-1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_dlr_3)_: ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_3) +-1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_3) +-1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_dlr_4)_: ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_4) +-1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_4) +-1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_dlr_5)_: ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_5) +-1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_5) +-1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_dlr_6)_: ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_6) +-1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_6) +-1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_6) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_dlr_7)_: ++1 SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_7) +-1 SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_7) +-1 SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_7) += 0 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_0_0)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_0) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_0) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_0) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_0) ++1 flow(electricity_demand_dsm_dlr_0_0) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_0_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_1) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_1) ++1 flow(electricity_demand_dsm_dlr_0_1) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_0_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_2) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_2) ++1 flow(electricity_demand_dsm_dlr_0_2) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_1_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_3) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_3) ++1 flow(electricity_demand_dsm_dlr_1_3) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_1_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_4) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_4) ++1 flow(electricity_demand_dsm_dlr_1_4) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_1_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_5) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_5) ++1 flow(electricity_demand_dsm_dlr_1_5) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_2_6)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_6) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_6) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_6) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_6) ++1 flow(electricity_demand_dsm_dlr_2_6) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_2_7)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_7) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_7) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_7) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_7) ++1 flow(electricity_demand_dsm_dlr_2_7) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_2_8)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_8) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_8) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_8) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_8) ++1 flow(electricity_demand_dsm_dlr_2_8) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_3_9)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_9) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_9) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_9) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_9) ++1 flow(electricity_demand_dsm_dlr_3_9) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_3_10)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_10) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_10) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_10) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_10) ++1 flow(electricity_demand_dsm_dlr_3_10) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_3_11)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_11) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_11) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_11) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_11) ++1 flow(electricity_demand_dsm_dlr_3_11) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_4_12)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_12) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_12) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_12) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_12) ++1 flow(electricity_demand_dsm_dlr_4_12) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_4_13)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_13) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_13) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_13) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_13) ++1 flow(electricity_demand_dsm_dlr_4_13) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_4_14)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_14) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_14) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_14) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_14) ++1 flow(electricity_demand_dsm_dlr_4_14) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_5_15)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_15) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_15) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_15) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_15) ++1 flow(electricity_demand_dsm_dlr_5_15) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_5_16)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_16) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_16) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_16) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_16) ++1 flow(electricity_demand_dsm_dlr_5_16) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_5_17)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_17) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_17) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_17) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_17) ++1 flow(electricity_demand_dsm_dlr_5_17) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_6_18)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_18) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_18) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_18) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_18) ++1 flow(electricity_demand_dsm_dlr_6_18) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_6_19)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_19) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_19) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_19) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_19) ++1 flow(electricity_demand_dsm_dlr_6_19) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_6_20)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_20) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_20) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_20) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_20) ++1 flow(electricity_demand_dsm_dlr_6_20) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_7_21)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_21) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_21) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_21) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_21) ++1 flow(electricity_demand_dsm_dlr_7_21) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_7_22)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_22) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_22) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_22) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_22) ++1 flow(electricity_demand_dsm_dlr_7_22) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(demand_dsm_dlr_7_23)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_23) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_23) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_23) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_23) ++1 flow(electricity_demand_dsm_dlr_7_23) += 1 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_6)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_6) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_7)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_7) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_8)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_8) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_9)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_9) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_10)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_10) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_11)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_11) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_12)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_12) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_13)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_13) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_14)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_14) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_15)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_15) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_16)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_16) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_17)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_17) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_18)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_18) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_19)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_19) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_20)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_20) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_21)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_21) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_22)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_22) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_1_23)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_23) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_6)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_6) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_7)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_7) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_8)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_8) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_9)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_9) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_10)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_10) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_11)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_11) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_12)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_12) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_13)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_13) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_14)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_14) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_15)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_15) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_16)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_16) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_17)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_17) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_18)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_18) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_19)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_19) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_20)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_20) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_21)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_21) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_22)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_22) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(demand_dsm_dlr_2_23)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_23) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_6)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_6) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_7)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_7) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_8)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_8) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_9)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_9) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_10)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_10) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_11)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_11) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_12)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_12) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_13)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_13) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_14)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_14) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_15)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_15) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_16)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_16) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_17)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_17) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_18)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_18) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_19)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_19) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_20)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_20) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_21)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_21) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_22)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_22) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_1_23)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_23) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_6)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_6) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_7)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_7) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_8)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_8) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_9)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_9) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_10)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_10) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_11)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_11) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_12)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_12) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_13)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_13) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_14)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_14) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_15)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_15) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_16)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_16) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_17)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_17) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_18)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_18) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_19)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_19) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_20)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_20) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_21)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_21) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_22)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_22) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(demand_dsm_dlr_2_23)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_23) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_red(demand_dsm_dlr_1_23)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_23) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_red(demand_dsm_dlr_2_22)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_22) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_red(demand_dsm_dlr_2_23)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_23) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(demand_dsm_dlr_1_23)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_23) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(demand_dsm_dlr_2_22)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_22) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(demand_dsm_dlr_2_23)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_23) += 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_0) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_1) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_0_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_2) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_1_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_3) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_1_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_4) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_1_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_5) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_2_6)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_6) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_2_7)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_7) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_2_8)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_8) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_3_9)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_9) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_3_10)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_10) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_3_11)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_11) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_4_12)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_12) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_4_13)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_13) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_4_14)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_14) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_5_15)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_15) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_5_16)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_16) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_5_17)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_17) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_6_18)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_18) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_6_19)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_19) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_6_20)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_20) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_7_21)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_21) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_7_22)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_22) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(demand_dsm_dlr_7_23)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_23) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_0) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_1) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_0_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_2) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_1_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_3) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_1_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_4) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_1_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_5) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_2_6)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_6) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_2_7)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_7) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_2_8)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_8) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_3_9)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_9) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_3_10)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_10) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_3_11)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_11) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_4_12)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_12) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_4_13)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_13) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_4_14)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_14) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_5_15)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_15) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_5_16)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_16) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_5_17)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_17) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_6_18)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_18) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_6_19)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_19) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_6_20)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_20) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_7_21)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_21) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_7_22)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_22) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_dlr_7_23)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_23) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +<= 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_0)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_0) +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_1)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_0) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_2)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_1) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_3)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_2) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_4)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_3) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_5)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_4) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_6)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_6) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_5) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_6) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_7)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_7) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_6) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_7) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_8)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_8) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_7) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_8) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_9)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_9) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_8) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_9) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_10)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_10) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_9) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_10) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_11)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_11) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_10) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_11) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_12)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_12) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_11) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_12) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_13)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_13) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_12) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_13) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_14)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_14) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_13) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_14) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_15)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_15) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_14) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_15) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_16)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_16) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_15) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_16) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_17)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_17) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_16) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_17) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_18)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_18) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_17) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_18) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_19)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_19) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_18) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_19) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_20)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_20) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_19) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_20) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_21)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_21) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_20) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_21) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_22)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_22) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_21) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_22) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(demand_dsm_dlr_23)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_23) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_22) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_23) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_0)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_0) +-1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_0) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_1) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_2) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_3) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_4) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_6)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_6) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_6) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_5) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_6) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_7)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_7) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_7) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_6) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_7) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_8)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_8) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_8) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_7) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_8) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_9)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_9) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_9) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_8) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_9) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_10)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_10) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_10) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_9) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_10) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_11)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_11) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_11) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_10) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_11) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_12)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_12) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_12) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_11) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_12) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_13)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_13) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_13) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_12) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_13) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_14)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_14) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_14) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_13) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_14) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_15)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_15) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_15) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_14) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_15) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_16)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_16) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_16) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_15) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_16) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_17)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_17) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_17) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_16) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_17) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_18)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_18) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_18) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_17) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_18) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_19)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_19) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_19) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_18) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_19) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_20)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_20) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_20) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_19) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_20) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_21)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_21) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_21) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_20) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_21) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_22)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_22) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_22) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_21) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_22) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_dlr_23)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_23) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_23) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_22) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_23) += 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_0_0)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_0_1)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_0_2)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_1_3)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_1_4)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_1_5)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_2_6)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_2_7)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_7) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_2_8)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_8) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_3_9)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_9) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_3_10)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_10) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_3_11)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_11) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_4_12)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_12) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_4_13)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_13) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_4_14)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_14) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_5_15)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_15) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_5_16)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_16) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_5_17)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_17) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_6_18)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_18) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_6_19)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_19) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_6_20)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_20) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_7_21)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_21) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_7_22)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_22) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(demand_dsm_dlr_7_23)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_23) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_0_0)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_0_1)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_0_2)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_1_3)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_1_4)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_1_5)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_2_6)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_2_7)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_7) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_2_8)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_8) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_3_9)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_9) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_3_10)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_10) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_3_11)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_11) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_4_12)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_12) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_4_13)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_13) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_4_14)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_14) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_5_15)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_15) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_5_16)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_16) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_5_17)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_17) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_6_18)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_18) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_6_19)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_19) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_6_20)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_20) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_7_21)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_21) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_7_22)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_22) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_dlr_7_23)_: +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_23) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_dlr_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_2) +-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_dlr_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_5) +-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_dlr_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_8) +-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_dlr_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_11) +-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_dlr_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_14) +-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_dlr_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_17) +-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_dlr_6)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_20) +-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_dlr_7)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_23) +-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_0) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_1) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_0_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_2) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_1_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_3) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_1_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_4) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_1_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_5) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_2_6)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_6) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_6) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_2_7)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_7) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_7) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_2_8)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_8) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_8) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_8) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_3_9)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_9) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_9) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_3_10)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_10) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_10) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_3_11)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_11) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_11) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_11) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_4_12)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_12) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_12) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_4_13)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_13) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_13) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_4_14)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_14) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_14) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_14) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_5_15)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_15) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_15) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_5_16)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_16) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_16) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_5_17)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_17) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_17) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_17) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_6_18)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_18) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_18) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_6_19)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_19) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_19) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_6_20)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_20) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_20) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_20) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_7_21)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_21) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_21) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_7_22)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_22) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_22) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(demand_dsm_dlr_7_23)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_23) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_23) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_23) +-0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(demand_dsm_dlr_0)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) +<= 1000 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(demand_dsm_dlr_1)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) +<= 1000 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(demand_dsm_dlr_2)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) +<= 1000 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(demand_dsm_dlr_3)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) +<= 1000 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(demand_dsm_dlr_4)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) +<= 1000 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(demand_dsm_dlr_5)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) +<= 1000 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(demand_dsm_dlr_6)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) +<= 1000 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(demand_dsm_dlr_7)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +<= 1000 + +c_l_SinkDSMDLRInvestmentBlock_overall_minimum(demand_dsm_dlr)_: ++1 SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) +>= 5 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_oemof_0)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_0) += 50 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_oemof_1)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_1) +-1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_oemof_2)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_2) +-1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_oemof_3)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_3) +-1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_3) ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_3) += 0 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_oemof_4)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_4) +-1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_3) ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_4) ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_4) += 0 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_oemof_5)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_5) +-1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_4) ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_5) ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_5) += 0 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_oemof_6)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_6) +-1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_5) ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_6) ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_6) += 0 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_oemof_7)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_7) +-1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_6) ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_7) ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_7) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(demand_dsm_oemof_0)_: ++1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_0) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(demand_dsm_oemof_1)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(demand_dsm_oemof_2)_: ++1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(demand_dsm_oemof_3)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_3) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(demand_dsm_oemof_4)_: ++1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_4) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(demand_dsm_oemof_5)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_5) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(demand_dsm_oemof_6)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_3) +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_4) ++1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_6) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(demand_dsm_oemof_7)_: +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_5) +-1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_6) ++1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_7) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_oemof_0)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_0) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_oemof_1)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_1) += 50 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_oemof_2)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_oemof_3)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_3) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_oemof_4)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_4) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_oemof_5)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_5) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_oemof_6)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_6) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_oemof_7)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_7) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_oemof_0)_: +-1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_0) +-1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_0) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_oemof_1)_: ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_1) +-1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_1) +-1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_oemof_2)_: ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_2) +-1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_2) +-1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_oemof_3)_: ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_3) +-1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_3) +-1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_3) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_oemof_4)_: ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_4) +-1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_4) +-1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_4) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_oemof_5)_: ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_5) +-1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_5) +-1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_5) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_oemof_6)_: ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_6) +-1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_6) +-1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_6) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_oemof_7)_: ++1 SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_7) +-1 SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_7) +-1 SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_7) += 0 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_0) +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_0) ++1 flow(electricity_demand_dsm_oemof_0_0) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_0_1)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_1) ++1 flow(electricity_demand_dsm_oemof_0_1) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_0_2)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_2) ++1 flow(electricity_demand_dsm_oemof_0_2) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_1_3)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_3) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_3) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_3) ++1 flow(electricity_demand_dsm_oemof_1_3) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_1_4)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_4) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_4) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_4) ++1 flow(electricity_demand_dsm_oemof_1_4) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_1_5)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_5) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_5) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_5) ++1 flow(electricity_demand_dsm_oemof_1_5) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_2_6)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_6) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_6) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_6) ++1 flow(electricity_demand_dsm_oemof_2_6) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_2_7)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_7) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_7) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_7) ++1 flow(electricity_demand_dsm_oemof_2_7) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_2_8)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_8) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_8) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_8) ++1 flow(electricity_demand_dsm_oemof_2_8) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_3_9)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_9) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_9) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_9) ++1 flow(electricity_demand_dsm_oemof_3_9) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_3_10)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_10) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_10) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_10) ++1 flow(electricity_demand_dsm_oemof_3_10) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_3_11)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_11) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_11) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_11) ++1 flow(electricity_demand_dsm_oemof_3_11) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_4_12)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_12) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_12) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_12) ++1 flow(electricity_demand_dsm_oemof_4_12) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_4_13)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_13) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_13) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_13) ++1 flow(electricity_demand_dsm_oemof_4_13) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_4_14)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_14) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_14) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_14) ++1 flow(electricity_demand_dsm_oemof_4_14) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_5_15)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_15) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_15) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_15) ++1 flow(electricity_demand_dsm_oemof_5_15) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_5_16)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_16) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_16) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_16) ++1 flow(electricity_demand_dsm_oemof_5_16) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_5_17)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_17) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_17) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_17) ++1 flow(electricity_demand_dsm_oemof_5_17) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_6_18)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_18) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_18) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_18) ++1 flow(electricity_demand_dsm_oemof_6_18) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_6_19)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_19) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_19) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_19) ++1 flow(electricity_demand_dsm_oemof_6_19) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_6_20)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_20) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_20) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_20) ++1 flow(electricity_demand_dsm_oemof_6_20) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_7_21)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_21) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_21) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_21) ++1 flow(electricity_demand_dsm_oemof_7_21) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_7_22)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_22) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_22) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_22) ++1 flow(electricity_demand_dsm_oemof_7_22) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_oemof_7_23)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_23) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_23) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_23) ++1 flow(electricity_demand_dsm_oemof_7_23) += 1 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_0) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_0_1)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_1) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_0_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_2) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_1_3)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_3) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_1_4)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_4) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_1_5)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_5) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_2_6)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_6) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_2_7)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_7) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_2_8)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_8) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_3_9)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_9) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_3) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_3_10)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_10) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_3) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_3_11)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_11) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_3) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_4_12)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_12) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_4) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_4_13)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_13) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_4) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_4_14)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_14) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_4) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_5_15)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_15) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_5) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_5_16)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_16) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_5) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_5_17)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_17) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_5) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_6_18)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_18) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_6) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_6_19)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_19) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_6) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_6_20)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_20) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_6) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_7_21)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_21) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_7) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_7_22)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_22) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_7) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_oemof_7_23)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_23) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_7) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_0) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_0_1)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_1) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_0_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_2) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_1_3)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_3) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_3) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_1_4)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_4) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_4) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_1_5)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_5) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_5) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_2_6)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_6) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_6) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_2_7)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_7) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_7) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_2_8)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_8) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_8) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_3_9)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_9) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_9) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_3) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_3_10)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_10) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_10) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_3) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_3_11)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_11) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_11) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_3) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_4_12)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_12) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_12) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_4) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_4_13)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_13) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_13) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_4) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_4_14)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_14) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_14) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_4) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_5_15)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_15) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_15) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_5) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_5_16)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_16) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_16) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_5) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_5_17)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_17) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_17) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_5) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_6_18)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_18) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_18) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_6) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_6_19)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_19) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_19) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_6) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_6_20)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_20) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_20) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_6) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_7_21)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_21) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_21) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_7) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_7_22)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_22) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_22) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_7) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_oemof_7_23)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_23) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_23) +-0.5 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_7) +<= 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_0)_: +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_1) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_2) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_3) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_3) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_4)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_4) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_4) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_5) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_5) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_6)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_6) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_6) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_7) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_7) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_8)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_8) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_8) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_9) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_9) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_10)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_10) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_10) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_11) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_11) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_12)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_12) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_12) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_13) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_13) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_14)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_14) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_14) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_15) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_15) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_16)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_16) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_16) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_17) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_17) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_18)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_18) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_18) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_19) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_19) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_20)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_20) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_20) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_21) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_21) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_oemof_22)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_22) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_22) ++1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_23) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_23) += 0 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(demand_dsm_oemof_0)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_0) +<= 1000 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(demand_dsm_oemof_1)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_1) +<= 1000 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(demand_dsm_oemof_2)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_2) +<= 1000 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(demand_dsm_oemof_3)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_3) +<= 1000 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(demand_dsm_oemof_4)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_4) +<= 1000 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(demand_dsm_oemof_5)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_5) +<= 1000 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(demand_dsm_oemof_6)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_6) +<= 1000 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(demand_dsm_oemof_7)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_7) +<= 1000 + +c_l_SinkDSMOemofInvestmentBlock_overall_minimum(demand_dsm_oemof)_: ++1 SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_7) +>= 5 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= InvestmentFlowBlock_invest(storage_electricity_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_electricity_3) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_electricity_4) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_electricity_5) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_electricity_6) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_electricity_7) <= +inf + 0 <= InvestmentFlowBlock_invest(electricity_storage_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricity_storage_1) <= +inf + 0 <= InvestmentFlowBlock_invest(electricity_storage_2) <= +inf + 0 <= InvestmentFlowBlock_invest(electricity_storage_3) <= +inf + 0 <= InvestmentFlowBlock_invest(electricity_storage_4) <= +inf + 0 <= InvestmentFlowBlock_invest(electricity_storage_5) <= +inf + 0 <= InvestmentFlowBlock_invest(electricity_storage_6) <= +inf + 0 <= InvestmentFlowBlock_invest(electricity_storage_7) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_2) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_3) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_4) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_5) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_6) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_8) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_9) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_10) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_11) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_12) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_13) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_14) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_15) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_16) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_17) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_18) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_19) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_20) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_21) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_22) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_diw_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_0_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_1_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_2_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_3_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_4_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_5_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_6_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_7_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_8_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_9_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_10_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_11_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_12_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_13_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_14_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_15_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_16_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_17_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_18_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_19_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_20_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_21_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_22_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_diw_23_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_diw_23) <= +inf + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_0) <= 100 + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_1) <= 100 + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_2) <= 100 + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_3) <= 100 + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_4) <= 100 + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_5) <= 100 + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_6) <= 100 + 33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_diw_7) <= 100 + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_8) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_8) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_8) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_8) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_8) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_8) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_8) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_8) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_8) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_9) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_9) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_9) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_9) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_9) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_9) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_9) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_9) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_9) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_10) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_10) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_10) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_10) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_10) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_10) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_10) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_10) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_10) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_11) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_11) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_11) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_11) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_11) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_11) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_11) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_11) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_11) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_12) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_12) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_12) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_12) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_12) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_12) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_12) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_12) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_12) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_13) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_13) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_13) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_13) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_13) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_13) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_13) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_13) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_13) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_14) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_14) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_14) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_14) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_14) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_14) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_14) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_14) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_14) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_15) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_15) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_15) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_15) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_15) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_15) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_15) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_15) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_15) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_16) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_16) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_16) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_16) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_16) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_16) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_16) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_16) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_16) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_17) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_17) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_17) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_17) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_17) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_17) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_17) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_17) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_17) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_18) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_18) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_18) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_18) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_18) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_18) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_18) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_18) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_18) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_19) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_19) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_19) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_19) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_19) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_19) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_19) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_19) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_19) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_20) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_20) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_20) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_20) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_20) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_20) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_20) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_20) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_20) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_21) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_21) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_21) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_21) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_21) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_21) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_21) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_21) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_21) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_22) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_22) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_22) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_22) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_22) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_22) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_22) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_22) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_22) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_1_23) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_1_23) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_dlr_2_23) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_dlr_2_23) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_1_23) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_1_23) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_dlr_2_23) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_dlr_2_23) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_dlr_23) <= +inf + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_0) <= 100 + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_1) <= 100 + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_2) <= 100 + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_3) <= 100 + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_4) <= 100 + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_5) <= 100 + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_6) <= 100 + 33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_dlr_7) <= 100 + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_5) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_5) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_5) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_6) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_6) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_6) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_7) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_7) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_7) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_8) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_8) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_8) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_9) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_9) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_9) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_10) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_10) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_10) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_11) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_11) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_11) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_12) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_12) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_12) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_13) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_13) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_13) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_14) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_14) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_14) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_15) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_15) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_15) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_16) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_16) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_16) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_17) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_17) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_17) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_18) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_18) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_18) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_19) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_19) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_19) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_20) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_20) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_20) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_21) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_21) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_21) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_22) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_22) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_22) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_oemof_23) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_oemof_23) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_oemof_23) <= +inf + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_0) <= 100 + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_1) <= 100 + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_2) <= 100 + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_3) <= 100 + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_4) <= 100 + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_5) <= 100 + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_6) <= 100 + 33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_oemof_7) <= 100 + 0 <= flow(storage_electricity_0_0) <= +inf + 0 <= flow(electricity_storage_0_0) <= +inf + 0 <= flow(electricity_demand_dsm_diw_0_0) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_0_0) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_0_0) <= +inf + 0 <= flow(storage_electricity_0_1) <= +inf + 0 <= flow(electricity_storage_0_1) <= +inf + 0 <= flow(electricity_demand_dsm_diw_0_1) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_0_1) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_0_1) <= +inf + 0 <= flow(storage_electricity_0_2) <= +inf + 0 <= flow(electricity_storage_0_2) <= +inf + 0 <= flow(electricity_demand_dsm_diw_0_2) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_0_2) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_0_2) <= +inf + 0 <= flow(storage_electricity_1_3) <= +inf + 0 <= flow(electricity_storage_1_3) <= +inf + 0 <= flow(electricity_demand_dsm_diw_1_3) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_1_3) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_1_3) <= +inf + 0 <= flow(storage_electricity_1_4) <= +inf + 0 <= flow(electricity_storage_1_4) <= +inf + 0 <= flow(electricity_demand_dsm_diw_1_4) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_1_4) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_1_4) <= +inf + 0 <= flow(storage_electricity_1_5) <= +inf + 0 <= flow(electricity_storage_1_5) <= +inf + 0 <= flow(electricity_demand_dsm_diw_1_5) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_1_5) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_1_5) <= +inf + 0 <= flow(storage_electricity_2_6) <= +inf + 0 <= flow(electricity_storage_2_6) <= +inf + 0 <= flow(electricity_demand_dsm_diw_2_6) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_2_6) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_2_6) <= +inf + 0 <= flow(storage_electricity_2_7) <= +inf + 0 <= flow(electricity_storage_2_7) <= +inf + 0 <= flow(electricity_demand_dsm_diw_2_7) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_2_7) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_2_7) <= +inf + 0 <= flow(storage_electricity_2_8) <= +inf + 0 <= flow(electricity_storage_2_8) <= +inf + 0 <= flow(electricity_demand_dsm_diw_2_8) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_2_8) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_2_8) <= +inf + 0 <= flow(storage_electricity_3_9) <= +inf + 0 <= flow(electricity_storage_3_9) <= +inf + 0 <= flow(electricity_demand_dsm_diw_3_9) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_3_9) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_3_9) <= +inf + 0 <= flow(storage_electricity_3_10) <= +inf + 0 <= flow(electricity_storage_3_10) <= +inf + 0 <= flow(electricity_demand_dsm_diw_3_10) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_3_10) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_3_10) <= +inf + 0 <= flow(storage_electricity_3_11) <= +inf + 0 <= flow(electricity_storage_3_11) <= +inf + 0 <= flow(electricity_demand_dsm_diw_3_11) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_3_11) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_3_11) <= +inf + 0 <= flow(storage_electricity_4_12) <= +inf + 0 <= flow(electricity_storage_4_12) <= +inf + 0 <= flow(electricity_demand_dsm_diw_4_12) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_4_12) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_4_12) <= +inf + 0 <= flow(storage_electricity_4_13) <= +inf + 0 <= flow(electricity_storage_4_13) <= +inf + 0 <= flow(electricity_demand_dsm_diw_4_13) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_4_13) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_4_13) <= +inf + 0 <= flow(storage_electricity_4_14) <= +inf + 0 <= flow(electricity_storage_4_14) <= +inf + 0 <= flow(electricity_demand_dsm_diw_4_14) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_4_14) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_4_14) <= +inf + 0 <= flow(storage_electricity_5_15) <= +inf + 0 <= flow(electricity_storage_5_15) <= +inf + 0 <= flow(electricity_demand_dsm_diw_5_15) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_5_15) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_5_15) <= +inf + 0 <= flow(storage_electricity_5_16) <= +inf + 0 <= flow(electricity_storage_5_16) <= +inf + 0 <= flow(electricity_demand_dsm_diw_5_16) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_5_16) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_5_16) <= +inf + 0 <= flow(storage_electricity_5_17) <= +inf + 0 <= flow(electricity_storage_5_17) <= +inf + 0 <= flow(electricity_demand_dsm_diw_5_17) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_5_17) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_5_17) <= +inf + 0 <= flow(storage_electricity_6_18) <= +inf + 0 <= flow(electricity_storage_6_18) <= +inf + 0 <= flow(electricity_demand_dsm_diw_6_18) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_6_18) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_6_18) <= +inf + 0 <= flow(storage_electricity_6_19) <= +inf + 0 <= flow(electricity_storage_6_19) <= +inf + 0 <= flow(electricity_demand_dsm_diw_6_19) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_6_19) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_6_19) <= +inf + 0 <= flow(storage_electricity_6_20) <= +inf + 0 <= flow(electricity_storage_6_20) <= +inf + 0 <= flow(electricity_demand_dsm_diw_6_20) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_6_20) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_6_20) <= +inf + 0 <= flow(storage_electricity_7_21) <= +inf + 0 <= flow(electricity_storage_7_21) <= +inf + 0 <= flow(electricity_demand_dsm_diw_7_21) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_7_21) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_7_21) <= +inf + 0 <= flow(storage_electricity_7_22) <= +inf + 0 <= flow(electricity_storage_7_22) <= +inf + 0 <= flow(electricity_demand_dsm_diw_7_22) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_7_22) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_7_22) <= +inf + 0 <= flow(storage_electricity_7_23) <= +inf + 0 <= flow(electricity_storage_7_23) <= +inf + 0 <= flow(electricity_demand_dsm_diw_7_23) <= +inf + 0 <= flow(electricity_demand_dsm_dlr_7_23) <= +inf + 0 <= flow(electricity_demand_dsm_oemof_7_23) <= +inf + 0 <= InvestmentFlowBlock_total(storage_electricity_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_old(storage_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_total(storage_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage_electricity_3) <= +inf + 0 <= InvestmentFlowBlock_old(storage_electricity_3) <= +inf + 0 <= InvestmentFlowBlock_total(storage_electricity_4) <= +inf + 0 <= InvestmentFlowBlock_old(storage_electricity_4) <= +inf + 0 <= InvestmentFlowBlock_total(storage_electricity_5) <= +inf + 0 <= InvestmentFlowBlock_old(storage_electricity_5) <= +inf + 0 <= InvestmentFlowBlock_total(storage_electricity_6) <= +inf + 0 <= InvestmentFlowBlock_old(storage_electricity_6) <= +inf + 0 <= InvestmentFlowBlock_total(storage_electricity_7) <= +inf + 0 <= InvestmentFlowBlock_old(storage_electricity_7) <= +inf + 0 <= InvestmentFlowBlock_total(electricity_storage_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricity_storage_1) <= +inf + 0 <= InvestmentFlowBlock_old(electricity_storage_1) <= +inf + 0 <= InvestmentFlowBlock_total(electricity_storage_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricity_storage_2) <= +inf + 0 <= InvestmentFlowBlock_total(electricity_storage_3) <= +inf + 0 <= InvestmentFlowBlock_old(electricity_storage_3) <= +inf + 0 <= InvestmentFlowBlock_total(electricity_storage_4) <= +inf + 0 <= InvestmentFlowBlock_old(electricity_storage_4) <= +inf + 0 <= InvestmentFlowBlock_total(electricity_storage_5) <= +inf + 0 <= InvestmentFlowBlock_old(electricity_storage_5) <= +inf + 0 <= InvestmentFlowBlock_total(electricity_storage_6) <= +inf + 0 <= InvestmentFlowBlock_old(electricity_storage_6) <= +inf + 0 <= InvestmentFlowBlock_total(electricity_storage_7) <= +inf + 0 <= InvestmentFlowBlock_old(electricity_storage_7) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_electricity_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_electricity_3) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_electricity_4) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_electricity_5) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_electricity_6) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_electricity_7) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricity_storage_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricity_storage_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricity_storage_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricity_storage_3) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricity_storage_4) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricity_storage_5) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricity_storage_6) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricity_storage_7) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_electricity_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_electricity_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_electricity_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_electricity_3) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_electricity_4) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_electricity_5) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_electricity_6) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_electricity_7) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricity_storage_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricity_storage_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricity_storage_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricity_storage_3) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricity_storage_4) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricity_storage_5) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricity_storage_6) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricity_storage_7) <= +inf + 0 <= InvestmentFlowBlock_old(storage_electricity_0) <= +inf + 0 <= InvestmentFlowBlock_old(electricity_storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_2) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_3) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_3) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_4) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_4) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_5) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_5) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_6) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_6) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_7) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_7) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_3) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_4) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_5) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_6) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_7) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_3) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_4) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_5) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_6) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_7) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_5) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_6) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_7) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_8) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_9) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_10) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_11) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_12) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_13) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_14) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_15) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_16) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_17) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_18) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_19) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_20) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_21) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_22) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_23) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_diw_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(demand_dsm_diw_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_6) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(demand_dsm_diw_7) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_diw_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_dlr_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(demand_dsm_dlr_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(demand_dsm_dlr_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_dlr_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_8) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_9) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_10) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_11) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_12) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_13) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_14) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_15) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_16) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_17) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_18) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_19) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_20) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_21) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_22) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_dlr_23) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_6) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_7) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_8) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_9) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_10) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_11) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_12) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_13) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_14) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_15) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_16) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_17) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_18) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_19) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_20) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_21) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_22) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_dlr_23) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_5) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_5) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_6) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_6) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_oemof_7) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_7) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_5) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_6) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(demand_dsm_oemof_7) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_5) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_6) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(demand_dsm_oemof_7) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_oemof_0) <= +inf +end diff --git a/tests/lp_files/nominal_value_to_zero.lp b/tests/lp_files/nominal_value_to_zero.lp index 624c2a239..82cf4daeb 100644 --- a/tests/lp_files/nominal_value_to_zero.lp +++ b/tests/lp_files/nominal_value_to_zero.lp @@ -1,28 +1,26 @@ \* Source Pyomo model name=Model *\ -min +min objective: +0 ONE_VAR_CONSTANT s.t. -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(s1_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(s1_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(s1_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(s1_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(s1_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(s1_electricityBus_0_2) = 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(s1_electricityBus_0) <= 0 - 0 <= flow(s1_electricityBus_1) <= 0 - 0 <= flow(s1_electricityBus_2) <= 0 + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(s1_electricityBus_0_0) <= 0 + 0 <= flow(s1_electricityBus_0_1) <= 0 + 0 <= flow(s1_electricityBus_0_2) <= 0 end diff --git a/tests/lp_files/nominal_value_to_zero_multi_period.lp b/tests/lp_files/nominal_value_to_zero_multi_period.lp new file mode 100644 index 000000000..11db58e67 --- /dev/null +++ b/tests/lp_files/nominal_value_to_zero_multi_period.lp @@ -0,0 +1,41 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++0 ONE_VAR_CONSTANT + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(s1_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(s1_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(s1_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(s1_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(s1_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(s1_electricityBus_2_5) += 0 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(s1_electricityBus_0_0) <= 0 + 0 <= flow(s1_electricityBus_0_1) <= 0 + 0 <= flow(s1_electricityBus_1_2) <= 0 + 0 <= flow(s1_electricityBus_1_3) <= 0 + 0 <= flow(s1_electricityBus_2_4) <= 0 + 0 <= flow(s1_electricityBus_2_5) <= 0 +end diff --git a/tests/lp_files/nonequidistant_timeindex.lp b/tests/lp_files/nonequidistant_timeindex.lp index a66f5d5de..9fd54c5bf 100644 --- a/tests/lp_files/nonequidistant_timeindex.lp +++ b/tests/lp_files/nonequidistant_timeindex.lp @@ -1,249 +1,246 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+100 flow(gas_boiler_0) -+100 flow(gas_boiler_1) -+100 flow(gas_boiler_2) -+200 flow(gas_boiler_3) -+200 flow(gas_boiler_4) -+50 flow(gas_boiler_5) -+50 flow(gas_boiler_6) -+50 flow(gas_boiler_7) -+56 flow(heat_storage_0) -+56 flow(heat_storage_1) -+56 flow(heat_storage_2) -+112 flow(heat_storage_3) -+112 flow(heat_storage_4) -+28 flow(heat_storage_5) -+28 flow(heat_storage_6) -+28 flow(heat_storage_7) -+24 flow(storage_heat_0) -+24 flow(storage_heat_1) -+24 flow(storage_heat_2) -+48 flow(storage_heat_3) -+48 flow(storage_heat_4) -+12 flow(storage_heat_5) -+12 flow(storage_heat_6) -+12 flow(storage_heat_7) ++100 flow(gas_boiler_0_0) ++100 flow(gas_boiler_0_1) ++100 flow(gas_boiler_0_2) ++200.0 flow(gas_boiler_0_3) ++200.0 flow(gas_boiler_0_4) ++50.0 flow(gas_boiler_0_5) ++50.0 flow(gas_boiler_0_6) ++50.0 flow(gas_boiler_0_7) ++56 flow(heat_storage_0_0) ++56 flow(heat_storage_0_1) ++56 flow(heat_storage_0_2) ++112.0 flow(heat_storage_0_3) ++112.0 flow(heat_storage_0_4) ++28.0 flow(heat_storage_0_5) ++28.0 flow(heat_storage_0_6) ++28.0 flow(heat_storage_0_7) ++24 flow(storage_heat_0_0) ++24 flow(storage_heat_0_1) ++24 flow(storage_heat_0_2) ++48.0 flow(storage_heat_0_3) ++48.0 flow(storage_heat_0_4) ++12.0 flow(storage_heat_0_5) ++12.0 flow(storage_heat_0_6) ++12.0 flow(storage_heat_0_7) s.t. -c_e_BusBlock_balance(gas_0)_: -+1 flow(gas_boiler_0) +c_e_BusBlock_balance(heat_0_0)_: +-1 flow(heat_storage_0_0) ++1 flow(storage_heat_0_0) ++1 flow(boiler_heat_0_0) = 0 -c_e_BusBlock_balance(gas_1)_: -+1 flow(gas_boiler_1) +c_e_BusBlock_balance(heat_0_1)_: +-1 flow(heat_storage_0_1) ++1 flow(storage_heat_0_1) ++1 flow(boiler_heat_0_1) = 0 -c_e_BusBlock_balance(gas_2)_: -+1 flow(gas_boiler_2) +c_e_BusBlock_balance(heat_0_2)_: +-1 flow(heat_storage_0_2) ++1 flow(storage_heat_0_2) ++1 flow(boiler_heat_0_2) = 0 -c_e_BusBlock_balance(gas_3)_: -+1 flow(gas_boiler_3) +c_e_BusBlock_balance(heat_0_3)_: +-1 flow(heat_storage_0_3) ++1 flow(storage_heat_0_3) ++1 flow(boiler_heat_0_3) = 0 -c_e_BusBlock_balance(gas_4)_: -+1 flow(gas_boiler_4) +c_e_BusBlock_balance(heat_0_4)_: +-1 flow(heat_storage_0_4) ++1 flow(storage_heat_0_4) ++1 flow(boiler_heat_0_4) = 0 -c_e_BusBlock_balance(gas_5)_: -+1 flow(gas_boiler_5) +c_e_BusBlock_balance(heat_0_5)_: +-1 flow(heat_storage_0_5) ++1 flow(storage_heat_0_5) ++1 flow(boiler_heat_0_5) = 0 -c_e_BusBlock_balance(gas_6)_: -+1 flow(gas_boiler_6) +c_e_BusBlock_balance(heat_0_6)_: +-1 flow(heat_storage_0_6) ++1 flow(storage_heat_0_6) ++1 flow(boiler_heat_0_6) = 0 -c_e_BusBlock_balance(gas_7)_: -+1 flow(gas_boiler_7) +c_e_BusBlock_balance(heat_0_7)_: +-1 flow(heat_storage_0_7) ++1 flow(storage_heat_0_7) ++1 flow(boiler_heat_0_7) = 0 -c_e_BusBlock_balance(heat_0)_: -+1 flow(boiler_heat_0) --1 flow(heat_storage_0) -+1 flow(storage_heat_0) +c_e_BusBlock_balance(gas_0_0)_: ++1 flow(gas_boiler_0_0) = 0 -c_e_BusBlock_balance(heat_1)_: -+1 flow(boiler_heat_1) --1 flow(heat_storage_1) -+1 flow(storage_heat_1) +c_e_BusBlock_balance(gas_0_1)_: ++1 flow(gas_boiler_0_1) = 0 -c_e_BusBlock_balance(heat_2)_: -+1 flow(boiler_heat_2) --1 flow(heat_storage_2) -+1 flow(storage_heat_2) +c_e_BusBlock_balance(gas_0_2)_: ++1 flow(gas_boiler_0_2) = 0 -c_e_BusBlock_balance(heat_3)_: -+1 flow(boiler_heat_3) --1 flow(heat_storage_3) -+1 flow(storage_heat_3) +c_e_BusBlock_balance(gas_0_3)_: ++1 flow(gas_boiler_0_3) = 0 -c_e_BusBlock_balance(heat_4)_: -+1 flow(boiler_heat_4) --1 flow(heat_storage_4) -+1 flow(storage_heat_4) +c_e_BusBlock_balance(gas_0_4)_: ++1 flow(gas_boiler_0_4) = 0 -c_e_BusBlock_balance(heat_5)_: -+1 flow(boiler_heat_5) --1 flow(heat_storage_5) -+1 flow(storage_heat_5) +c_e_BusBlock_balance(gas_0_5)_: ++1 flow(gas_boiler_0_5) = 0 -c_e_BusBlock_balance(heat_6)_: -+1 flow(boiler_heat_6) --1 flow(heat_storage_6) -+1 flow(storage_heat_6) +c_e_BusBlock_balance(gas_0_6)_: ++1 flow(gas_boiler_0_6) = 0 -c_e_BusBlock_balance(heat_7)_: -+1 flow(boiler_heat_7) --1 flow(heat_storage_7) -+1 flow(storage_heat_7) +c_e_BusBlock_balance(gas_0_7)_: ++1 flow(gas_boiler_0_7) = 0 -c_e_TransformerBlock_relation(boiler_gas_heat_0)_: --1 flow(boiler_heat_0) -+1 flow(gas_boiler_0) +c_e_ConverterBlock_relation(boiler_gas_heat_0_0)_: ++1 flow(gas_boiler_0_0) +-1 flow(boiler_heat_0_0) = 0 -c_e_TransformerBlock_relation(boiler_gas_heat_1)_: --1 flow(boiler_heat_1) -+1 flow(gas_boiler_1) +c_e_ConverterBlock_relation(boiler_gas_heat_0_1)_: ++1 flow(gas_boiler_0_1) +-1 flow(boiler_heat_0_1) = 0 -c_e_TransformerBlock_relation(boiler_gas_heat_2)_: --1 flow(boiler_heat_2) -+1 flow(gas_boiler_2) +c_e_ConverterBlock_relation(boiler_gas_heat_0_2)_: ++1 flow(gas_boiler_0_2) +-1 flow(boiler_heat_0_2) = 0 -c_e_TransformerBlock_relation(boiler_gas_heat_3)_: --1 flow(boiler_heat_3) -+1 flow(gas_boiler_3) +c_e_ConverterBlock_relation(boiler_gas_heat_0_3)_: ++1 flow(gas_boiler_0_3) +-1 flow(boiler_heat_0_3) = 0 -c_e_TransformerBlock_relation(boiler_gas_heat_4)_: --1 flow(boiler_heat_4) -+1 flow(gas_boiler_4) +c_e_ConverterBlock_relation(boiler_gas_heat_0_4)_: ++1 flow(gas_boiler_0_4) +-1 flow(boiler_heat_0_4) = 0 -c_e_TransformerBlock_relation(boiler_gas_heat_5)_: --1 flow(boiler_heat_5) -+1 flow(gas_boiler_5) +c_e_ConverterBlock_relation(boiler_gas_heat_0_5)_: ++1 flow(gas_boiler_0_5) +-1 flow(boiler_heat_0_5) = 0 -c_e_TransformerBlock_relation(boiler_gas_heat_6)_: --1 flow(boiler_heat_6) -+1 flow(gas_boiler_6) +c_e_ConverterBlock_relation(boiler_gas_heat_0_6)_: ++1 flow(gas_boiler_0_6) +-1 flow(boiler_heat_0_6) = 0 -c_e_TransformerBlock_relation(boiler_gas_heat_7)_: --1 flow(boiler_heat_7) -+1 flow(gas_boiler_7) +c_e_ConverterBlock_relation(boiler_gas_heat_0_7)_: ++1 flow(gas_boiler_0_7) +-1 flow(boiler_heat_0_7) = 0 -c_e_GenericStorageBlock_balance(storage_0)_: +c_e_GenericStorageBlock_balance(storage_0_0)_: +-1 flow(heat_storage_0_0) ++1 flow(storage_heat_0_0) +1 GenericStorageBlock_storage_content(storage_1) --1 flow(heat_storage_0) -+1 flow(storage_heat_0) -= 270 += 270.0 -c_e_GenericStorageBlock_balance(storage_1)_: --0.90000000000000002 GenericStorageBlock_storage_content(storage_1) +c_e_GenericStorageBlock_balance(storage_0_1)_: +-1 flow(heat_storage_0_1) ++1 flow(storage_heat_0_1) +-0.9 GenericStorageBlock_storage_content(storage_1) +1 GenericStorageBlock_storage_content(storage_2) --1 flow(heat_storage_1) -+1 flow(storage_heat_1) = 0 -c_e_GenericStorageBlock_balance(storage_2)_: --0.90000000000000002 GenericStorageBlock_storage_content(storage_2) +c_e_GenericStorageBlock_balance(storage_0_2)_: +-1 flow(heat_storage_0_2) ++1 flow(storage_heat_0_2) +-0.9 GenericStorageBlock_storage_content(storage_2) +1 GenericStorageBlock_storage_content(storage_3) --1 flow(heat_storage_2) -+1 flow(storage_heat_2) = 0 -c_e_GenericStorageBlock_balance(storage_3)_: --0.81000000000000005 GenericStorageBlock_storage_content(storage_3) +c_e_GenericStorageBlock_balance(storage_0_3)_: +-2.0 flow(heat_storage_0_3) ++2.0 flow(storage_heat_0_3) +-0.81 GenericStorageBlock_storage_content(storage_3) +1 GenericStorageBlock_storage_content(storage_4) --2 flow(heat_storage_3) -+2 flow(storage_heat_3) = 0 -c_e_GenericStorageBlock_balance(storage_4)_: --0.81000000000000005 GenericStorageBlock_storage_content(storage_4) +c_e_GenericStorageBlock_balance(storage_0_4)_: +-2.0 flow(heat_storage_0_4) ++2.0 flow(storage_heat_0_4) +-0.81 GenericStorageBlock_storage_content(storage_4) +1 GenericStorageBlock_storage_content(storage_5) --2 flow(heat_storage_4) -+2 flow(storage_heat_4) = 0 -c_e_GenericStorageBlock_balance(storage_5)_: --0.94868329805051377 GenericStorageBlock_storage_content(storage_5) +c_e_GenericStorageBlock_balance(storage_0_5)_: +-0.5 flow(heat_storage_0_5) ++0.5 flow(storage_heat_0_5) +-0.9486832980505138 GenericStorageBlock_storage_content(storage_5) +1 GenericStorageBlock_storage_content(storage_6) --0.5 flow(heat_storage_5) -+0.5 flow(storage_heat_5) = 0 -c_e_GenericStorageBlock_balance(storage_6)_: --0.94868329805051377 GenericStorageBlock_storage_content(storage_6) +c_e_GenericStorageBlock_balance(storage_0_6)_: +-0.5 flow(heat_storage_0_6) ++0.5 flow(storage_heat_0_6) +-0.9486832980505138 GenericStorageBlock_storage_content(storage_6) +1 GenericStorageBlock_storage_content(storage_7) --0.5 flow(heat_storage_6) -+0.5 flow(storage_heat_6) = 0 -c_e_GenericStorageBlock_balance(storage_7)_: --0.94868329805051377 GenericStorageBlock_storage_content(storage_7) +c_e_GenericStorageBlock_balance(storage_0_7)_: +-0.5 flow(heat_storage_0_7) ++0.5 flow(storage_heat_0_7) +-0.9486832980505138 GenericStorageBlock_storage_content(storage_7) +1 GenericStorageBlock_storage_content(storage_8) --0.5 flow(heat_storage_7) -+0.5 flow(storage_heat_7) = 0 c_e_GenericStorageBlock_balanced_cstr(storage)_: +1 GenericStorageBlock_storage_content(storage_8) = 300 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(boiler_heat_0) <= 200 - 0 <= flow(boiler_heat_1) <= 200 - 0 <= flow(boiler_heat_2) <= 200 - 0 <= flow(boiler_heat_3) <= 200 - 0 <= flow(boiler_heat_4) <= 200 - 0 <= flow(boiler_heat_5) <= 200 - 0 <= flow(boiler_heat_6) <= 200 - 0 <= flow(boiler_heat_7) <= 200 - 0 <= flow(gas_boiler_0) <= +inf - 0 <= flow(gas_boiler_1) <= +inf - 0 <= flow(gas_boiler_2) <= +inf - 0 <= flow(gas_boiler_3) <= +inf - 0 <= flow(gas_boiler_4) <= +inf - 0 <= flow(gas_boiler_5) <= +inf - 0 <= flow(gas_boiler_6) <= +inf - 0 <= flow(gas_boiler_7) <= +inf - 0 <= flow(heat_storage_0) <= 100 - 0 <= flow(heat_storage_1) <= 100 - 0 <= flow(heat_storage_2) <= 100 - 0 <= flow(heat_storage_3) <= 100 - 0 <= flow(heat_storage_4) <= 100 - 0 <= flow(heat_storage_5) <= 100 - 0 <= flow(heat_storage_6) <= 100 - 0 <= flow(heat_storage_7) <= 100 - 0 <= flow(storage_heat_0) <= 100 - 0 <= flow(storage_heat_1) <= 100 - 0 <= flow(storage_heat_2) <= 100 - 0 <= flow(storage_heat_3) <= 100 - 0 <= flow(storage_heat_4) <= 100 - 0 <= flow(storage_heat_5) <= 100 - 0 <= flow(storage_heat_6) <= 100 - 0 <= flow(storage_heat_7) <= 100 + 0 <= flow(gas_boiler_0_0) <= +inf + 0 <= flow(gas_boiler_0_1) <= +inf + 0 <= flow(gas_boiler_0_2) <= +inf + 0 <= flow(gas_boiler_0_3) <= +inf + 0 <= flow(gas_boiler_0_4) <= +inf + 0 <= flow(gas_boiler_0_5) <= +inf + 0 <= flow(gas_boiler_0_6) <= +inf + 0 <= flow(gas_boiler_0_7) <= +inf + 0 <= flow(heat_storage_0_0) <= 100 + 0 <= flow(heat_storage_0_1) <= 100 + 0 <= flow(heat_storage_0_2) <= 100 + 0 <= flow(heat_storage_0_3) <= 100 + 0 <= flow(heat_storage_0_4) <= 100 + 0 <= flow(heat_storage_0_5) <= 100 + 0 <= flow(heat_storage_0_6) <= 100 + 0 <= flow(heat_storage_0_7) <= 100 + 0 <= flow(storage_heat_0_0) <= 100 + 0 <= flow(storage_heat_0_1) <= 100 + 0 <= flow(storage_heat_0_2) <= 100 + 0 <= flow(storage_heat_0_3) <= 100 + 0 <= flow(storage_heat_0_4) <= 100 + 0 <= flow(storage_heat_0_5) <= 100 + 0 <= flow(storage_heat_0_6) <= 100 + 0 <= flow(storage_heat_0_7) <= 100 + 0 <= flow(boiler_heat_0_0) <= 200 + 0 <= flow(boiler_heat_0_1) <= 200 + 0 <= flow(boiler_heat_0_2) <= 200 + 0 <= flow(boiler_heat_0_3) <= 200 + 0 <= flow(boiler_heat_0_4) <= 200 + 0 <= flow(boiler_heat_0_5) <= 200 + 0 <= flow(boiler_heat_0_6) <= 200 + 0 <= flow(boiler_heat_0_7) <= 200 0 <= GenericStorageBlock_storage_content(storage_1) <= 300 0 <= GenericStorageBlock_storage_content(storage_2) <= 300 0 <= GenericStorageBlock_storage_content(storage_3) <= 300 diff --git a/tests/lp_files/offsetconverter.lp b/tests/lp_files/offsetconverter.lp new file mode 100644 index 000000000..59b7c425e --- /dev/null +++ b/tests/lp_files/offsetconverter.lp @@ -0,0 +1,114 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++0 ONE_VAR_CONSTANT + +s.t. + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_gasboiler_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_gasboiler_0_1) += 0 + +c_e_BusBlock_balance(gasBus_0_2)_: ++1 flow(gasBus_gasboiler_0_2) += 0 + +c_e_BusBlock_balance(thermalBus_0_0)_: ++1 flow(gasboiler_thermalBus_0_0) += 0 + +c_e_BusBlock_balance(thermalBus_0_1)_: ++1 flow(gasboiler_thermalBus_0_1) += 0 + +c_e_BusBlock_balance(thermalBus_0_2)_: ++1 flow(gasboiler_thermalBus_0_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(gasBus_gasboiler_0)_: ++1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0) +-100 NonConvexFlowBlock_status(gasBus_gasboiler_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(gasBus_gasboiler_1)_: ++1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1) +-100 NonConvexFlowBlock_status(gasBus_gasboiler_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(gasBus_gasboiler_2)_: ++1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2) +-100 NonConvexFlowBlock_status(gasBus_gasboiler_2) += 0 + +c_u_NonConvexFlowBlock_min(gasBus_gasboiler_0_0)_: +-1 flow(gasBus_gasboiler_0_0) ++0.32 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0) +<= 0 + +c_u_NonConvexFlowBlock_min(gasBus_gasboiler_0_1)_: +-1 flow(gasBus_gasboiler_0_1) ++0.32 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1) +<= 0 + +c_u_NonConvexFlowBlock_min(gasBus_gasboiler_0_2)_: +-1 flow(gasBus_gasboiler_0_2) ++0.32 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2) +<= 0 + +c_u_NonConvexFlowBlock_max(gasBus_gasboiler_0_0)_: ++1 flow(gasBus_gasboiler_0_0) +-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0) +<= 0 + +c_u_NonConvexFlowBlock_max(gasBus_gasboiler_0_1)_: ++1 flow(gasBus_gasboiler_0_1) +-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1) +<= 0 + +c_u_NonConvexFlowBlock_max(gasBus_gasboiler_0_2)_: ++1 flow(gasBus_gasboiler_0_2) +-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2) +<= 0 + +c_e_OffsetConverterBlock_relation(gasboiler_0_0)_: ++0.9 flow(gasBus_gasboiler_0_0) +-1 flow(gasboiler_thermalBus_0_0) +-17 NonConvexFlowBlock_status(gasBus_gasboiler_0) += 0 + +c_e_OffsetConverterBlock_relation(gasboiler_0_1)_: ++0.9 flow(gasBus_gasboiler_0_1) +-1 flow(gasboiler_thermalBus_0_1) +-17 NonConvexFlowBlock_status(gasBus_gasboiler_1) += 0 + +c_e_OffsetConverterBlock_relation(gasboiler_0_2)_: ++0.9 flow(gasBus_gasboiler_0_2) +-1 flow(gasboiler_thermalBus_0_2) +-17 NonConvexFlowBlock_status(gasBus_gasboiler_2) += 0 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(gasBus_gasboiler_0_0) <= 100 + 0 <= flow(gasBus_gasboiler_0_1) <= 100 + 0 <= flow(gasBus_gasboiler_0_2) <= 100 + 0 <= flow(gasboiler_thermalBus_0_0) <= +inf + 0 <= flow(gasboiler_thermalBus_0_1) <= +inf + 0 <= flow(gasboiler_thermalBus_0_2) <= +inf + 0 <= NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0) <= +inf + 0 <= NonConvexFlowBlock_status(gasBus_gasboiler_0) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1) <= +inf + 0 <= NonConvexFlowBlock_status(gasBus_gasboiler_1) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2) <= +inf + 0 <= NonConvexFlowBlock_status(gasBus_gasboiler_2) <= 1 +binary + NonConvexFlowBlock_status(gasBus_gasboiler_0) + NonConvexFlowBlock_status(gasBus_gasboiler_1) + NonConvexFlowBlock_status(gasBus_gasboiler_2) +end diff --git a/tests/lp_files/offsetconverter_multi_period.lp b/tests/lp_files/offsetconverter_multi_period.lp new file mode 100644 index 000000000..2f29944f2 --- /dev/null +++ b/tests/lp_files/offsetconverter_multi_period.lp @@ -0,0 +1,216 @@ +\* Source Pyomo model name=Model *\ + +min +objective: +0 ONE_VAR_CONSTANT + +s.t. + +c_e_BusBlock_balance(thermalBus_0_0)_: +1 flow(gasboiler_thermalBus_0_0) += 0 + +c_e_BusBlock_balance(thermalBus_0_1)_: +1 flow(gasboiler_thermalBus_0_1) += 0 + +c_e_BusBlock_balance(thermalBus_1_2)_: +1 flow(gasboiler_thermalBus_1_2) += 0 + +c_e_BusBlock_balance(thermalBus_1_3)_: +1 flow(gasboiler_thermalBus_1_3) += 0 + +c_e_BusBlock_balance(thermalBus_2_4)_: +1 flow(gasboiler_thermalBus_2_4) += 0 + +c_e_BusBlock_balance(thermalBus_2_5)_: +1 flow(gasboiler_thermalBus_2_5) += 0 + +c_e_BusBlock_balance(gasBus_0_0)_: +1 flow(gasBus_gasboiler_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: +1 flow(gasBus_gasboiler_0_1) += 0 + +c_e_BusBlock_balance(gasBus_1_2)_: +1 flow(gasBus_gasboiler_1_2) += 0 + +c_e_BusBlock_balance(gasBus_1_3)_: +1 flow(gasBus_gasboiler_1_3) += 0 + +c_e_BusBlock_balance(gasBus_2_4)_: +1 flow(gasBus_gasboiler_2_4) += 0 + +c_e_BusBlock_balance(gasBus_2_5)_: +1 flow(gasBus_gasboiler_2_5) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(gasboiler_thermalBus_0)_: +1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_0) +-100 NonConvexFlowBlock_status(gasboiler_thermalBus_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(gasboiler_thermalBus_1)_: +1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_1) +-100 NonConvexFlowBlock_status(gasboiler_thermalBus_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(gasboiler_thermalBus_2)_: +1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_2) +-100 NonConvexFlowBlock_status(gasboiler_thermalBus_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(gasboiler_thermalBus_3)_: +1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_3) +-100 NonConvexFlowBlock_status(gasboiler_thermalBus_3) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(gasboiler_thermalBus_4)_: +1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_4) +-100 NonConvexFlowBlock_status(gasboiler_thermalBus_4) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(gasboiler_thermalBus_5)_: +1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_5) +-100 NonConvexFlowBlock_status(gasboiler_thermalBus_5) += 0 + +c_u_NonConvexFlowBlock_min(gasboiler_thermalBus_0_0)_: +-1 flow(gasboiler_thermalBus_0_0) ++0.32 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_0) +<= 0 + +c_u_NonConvexFlowBlock_min(gasboiler_thermalBus_0_1)_: +-1 flow(gasboiler_thermalBus_0_1) ++0.32 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_1) +<= 0 + +c_u_NonConvexFlowBlock_min(gasboiler_thermalBus_1_2)_: +-1 flow(gasboiler_thermalBus_1_2) ++0.32 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_2) +<= 0 + +c_u_NonConvexFlowBlock_min(gasboiler_thermalBus_1_3)_: +-1 flow(gasboiler_thermalBus_1_3) ++0.32 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_3) +<= 0 + +c_u_NonConvexFlowBlock_min(gasboiler_thermalBus_2_4)_: +-1 flow(gasboiler_thermalBus_2_4) ++0.32 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_4) +<= 0 + +c_u_NonConvexFlowBlock_min(gasboiler_thermalBus_2_5)_: +-1 flow(gasboiler_thermalBus_2_5) ++0.32 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_5) +<= 0 + +c_u_NonConvexFlowBlock_max(gasboiler_thermalBus_0_0)_: +1 flow(gasboiler_thermalBus_0_0) +-1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_0) +<= 0 + +c_u_NonConvexFlowBlock_max(gasboiler_thermalBus_0_1)_: +1 flow(gasboiler_thermalBus_0_1) +-1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_1) +<= 0 + +c_u_NonConvexFlowBlock_max(gasboiler_thermalBus_1_2)_: +1 flow(gasboiler_thermalBus_1_2) +-1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_2) +<= 0 + +c_u_NonConvexFlowBlock_max(gasboiler_thermalBus_1_3)_: +1 flow(gasboiler_thermalBus_1_3) +-1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_3) +<= 0 + +c_u_NonConvexFlowBlock_max(gasboiler_thermalBus_2_4)_: +1 flow(gasboiler_thermalBus_2_4) +-1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_4) +<= 0 + +c_u_NonConvexFlowBlock_max(gasboiler_thermalBus_2_5)_: +1 flow(gasboiler_thermalBus_2_5) +-1 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_5) +<= 0 + +c_e_OffsetConverterBlock_relation(gasboiler_gasBus_thermalBus_0_0)_: ++0.9 flow(gasBus_gasboiler_0_0) +-1 flow(gasboiler_thermalBus_0_0) +-17 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_0) += 0 + +c_e_OffsetConverterBlock_relation(gasboiler_gasBus_thermalBus_0_1)_: ++0.9 flow(gasBus_gasboiler_0_1) +-1 flow(gasboiler_thermalBus_0_1) +-17 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_1) += 0 + +c_e_OffsetConverterBlock_relation(gasboiler_gasBus_thermalBus_1_2)_: ++0.9 flow(gasBus_gasboiler_1_2) +-1 flow(gasboiler_thermalBus_1_2) +-17 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_2) += 0 + +c_e_OffsetConverterBlock_relation(gasboiler_gasBus_thermalBus_1_3)_: ++0.9 flow(gasBus_gasboiler_1_3) +-1 flow(gasboiler_thermalBus_1_3) +-17 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_3) += 0 + +c_e_OffsetConverterBlock_relation(gasboiler_gasBus_thermalBus_2_4)_: ++0.9 flow(gasBus_gasboiler_2_4) +-1 flow(gasboiler_thermalBus_2_4) +-17 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_4) += 0 + +c_e_OffsetConverterBlock_relation(gasboiler_gasBus_thermalBus_2_5)_: ++0.9 flow(gasBus_gasboiler_2_5) +-1 flow(gasboiler_thermalBus_2_5) +-17 NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_5) += 0 + +bounds +1 <= ONE_VAR_CONSTANT <= 1 +0 <= flow(gasboiler_thermalBus_0_0) <= 100 +0 <= flow(gasboiler_thermalBus_0_1) <= 100 +0 <= flow(gasboiler_thermalBus_1_2) <= 100 +0 <= flow(gasboiler_thermalBus_1_3) <= 100 +0 <= flow(gasboiler_thermalBus_2_4) <= 100 +0 <= flow(gasboiler_thermalBus_2_5) <= 100 +0 <= flow(gasBus_gasboiler_0_0) <= +inf +0 <= flow(gasBus_gasboiler_0_1) <= +inf +0 <= flow(gasBus_gasboiler_1_2) <= +inf +0 <= flow(gasBus_gasboiler_1_3) <= +inf +0 <= flow(gasBus_gasboiler_2_4) <= +inf +0 <= flow(gasBus_gasboiler_2_5) <= +inf +0 <= NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_0) <= +inf +0 <= NonConvexFlowBlock_status(gasboiler_thermalBus_0) <= 1 +0 <= NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_1) <= +inf +0 <= NonConvexFlowBlock_status(gasboiler_thermalBus_1) <= 1 +0 <= NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_2) <= +inf +0 <= NonConvexFlowBlock_status(gasboiler_thermalBus_2) <= 1 +0 <= NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_3) <= +inf +0 <= NonConvexFlowBlock_status(gasboiler_thermalBus_3) <= 1 +0 <= NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_4) <= +inf +0 <= NonConvexFlowBlock_status(gasboiler_thermalBus_4) <= 1 +0 <= NonConvexFlowBlock_status_nominal(gasboiler_thermalBus_5) <= +inf +0 <= NonConvexFlowBlock_status(gasboiler_thermalBus_5) <= 1 +binary +NonConvexFlowBlock_status(gasboiler_thermalBus_0) +NonConvexFlowBlock_status(gasboiler_thermalBus_1) +NonConvexFlowBlock_status(gasboiler_thermalBus_2) +NonConvexFlowBlock_status(gasboiler_thermalBus_3) +NonConvexFlowBlock_status(gasboiler_thermalBus_4) +NonConvexFlowBlock_status(gasboiler_thermalBus_5) +end diff --git a/tests/lp_files/offsetconverter_nonconvex.lp b/tests/lp_files/offsetconverter_nonconvex.lp new file mode 100644 index 000000000..98ff1f1c0 --- /dev/null +++ b/tests/lp_files/offsetconverter_nonconvex.lp @@ -0,0 +1,114 @@ +\* Source Pyomo model name=Model *\ + +min +objective: +0 ONE_VAR_CONSTANT + +s.t. + +c_e_BusBlock_balance(bus_electricity_0_0)_: +1 flow(diesel_genset_bus_electricity_0_0) += 0 + +c_e_BusBlock_balance(bus_electricity_0_1)_: +1 flow(diesel_genset_bus_electricity_0_1) += 0 + +c_e_BusBlock_balance(bus_electricity_0_2)_: +1 flow(diesel_genset_bus_electricity_0_2) += 0 + +c_e_BusBlock_balance(bus_diesel_0_0)_: +1 flow(bus_diesel_diesel_genset_0_0) += 0 + +c_e_BusBlock_balance(bus_diesel_0_1)_: +1 flow(bus_diesel_diesel_genset_0_1) += 0 + +c_e_BusBlock_balance(bus_diesel_0_2)_: +1 flow(bus_diesel_diesel_genset_0_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(diesel_genset_bus_electricity_0)_: +1 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) +-100 NonConvexFlowBlock_status(diesel_genset_bus_electricity_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(diesel_genset_bus_electricity_1)_: +1 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) +-100 NonConvexFlowBlock_status(diesel_genset_bus_electricity_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(diesel_genset_bus_electricity_2)_: +1 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) +-100 NonConvexFlowBlock_status(diesel_genset_bus_electricity_2) += 0 + +c_u_NonConvexFlowBlock_min(diesel_genset_bus_electricity_0_0)_: +-1 flow(diesel_genset_bus_electricity_0_0) ++0.2 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) +<= 0 + +c_u_NonConvexFlowBlock_min(diesel_genset_bus_electricity_0_1)_: +-1 flow(diesel_genset_bus_electricity_0_1) ++0.2 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) +<= 0 + +c_u_NonConvexFlowBlock_min(diesel_genset_bus_electricity_0_2)_: +-1 flow(diesel_genset_bus_electricity_0_2) ++0.2 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) +<= 0 + +c_u_NonConvexFlowBlock_max(diesel_genset_bus_electricity_0_0)_: +1 flow(diesel_genset_bus_electricity_0_0) +-1 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) +<= 0 + +c_u_NonConvexFlowBlock_max(diesel_genset_bus_electricity_0_1)_: +1 flow(diesel_genset_bus_electricity_0_1) +-1 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) +<= 0 + +c_u_NonConvexFlowBlock_max(diesel_genset_bus_electricity_0_2)_: +1 flow(diesel_genset_bus_electricity_0_2) +-1 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) +<= 0 + +c_e_OffsetConverterBlock_relation(diesel_genset_bus_diesel_bus_electricity_0_0)_: ++0.5 flow(bus_diesel_diesel_genset_0_0) +-1 flow(diesel_genset_bus_electricity_0_0) ++2.5 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) += 0 + +c_e_OffsetConverterBlock_relation(diesel_genset_bus_diesel_bus_electricity_0_1)_: ++0.5 flow(bus_diesel_diesel_genset_0_1) +-1 flow(diesel_genset_bus_electricity_0_1) ++2.5 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) += 0 + +c_e_OffsetConverterBlock_relation(diesel_genset_bus_diesel_bus_electricity_0_2)_: ++0.5 flow(bus_diesel_diesel_genset_0_2) +-1 flow(diesel_genset_bus_electricity_0_2) ++2.5 NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) += 0 + +bounds +1 <= ONE_VAR_CONSTANT <= 1 +0 <= flow(diesel_genset_bus_electricity_0_0) <= 100 +0 <= flow(diesel_genset_bus_electricity_0_1) <= 100 +0 <= flow(diesel_genset_bus_electricity_0_2) <= 100 +0 <= flow(bus_diesel_diesel_genset_0_0) <= +inf +0 <= flow(bus_diesel_diesel_genset_0_1) <= +inf +0 <= flow(bus_diesel_diesel_genset_0_2) <= +inf +0 <= NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) <= +inf +0 <= NonConvexFlowBlock_status(diesel_genset_bus_electricity_0) <= 1 +0 <= NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) <= +inf +0 <= NonConvexFlowBlock_status(diesel_genset_bus_electricity_1) <= 1 +0 <= NonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) <= +inf +0 <= NonConvexFlowBlock_status(diesel_genset_bus_electricity_2) <= 1 +binary +NonConvexFlowBlock_status(diesel_genset_bus_electricity_0) +NonConvexFlowBlock_status(diesel_genset_bus_electricity_1) +NonConvexFlowBlock_status(diesel_genset_bus_electricity_2) +end diff --git a/tests/lp_files/offsetconverter_nonconvex_investment.lp b/tests/lp_files/offsetconverter_nonconvex_investment.lp new file mode 100644 index 000000000..4b9755dd5 --- /dev/null +++ b/tests/lp_files/offsetconverter_nonconvex_investment.lp @@ -0,0 +1,155 @@ +\* Source Pyomo model name=Model *\ + +min +objective: +100 InvestNonConvexFlowBlock_invest(diesel_genset_bus_electricity_0) + +s.t. + +c_e_BusBlock_balance(bus_diesel_0_0)_: +1 flow(bus_diesel_diesel_genset_0_0) += 0 + +c_e_BusBlock_balance(bus_diesel_0_1)_: +1 flow(bus_diesel_diesel_genset_0_1) += 0 + +c_e_BusBlock_balance(bus_diesel_0_2)_: +1 flow(bus_diesel_diesel_genset_0_2) += 0 + +c_e_BusBlock_balance(bus_electricity_0_0)_: +1 flow(diesel_genset_bus_electricity_0_0) += 0 + +c_e_BusBlock_balance(bus_electricity_0_1)_: +1 flow(diesel_genset_bus_electricity_0_1) += 0 + +c_e_BusBlock_balance(bus_electricity_0_2)_: +1 flow(diesel_genset_bus_electricity_0_2) += 0 + +c_l_InvestNonConvexFlowBlock_minimum_investment(diesel_genset_bus_electricity_0)_: +1 InvestNonConvexFlowBlock_invest(diesel_genset_bus_electricity_0) +>= 0 + +c_u_InvestNonConvexFlowBlock_maximum_investment(diesel_genset_bus_electricity_0)_: +1 InvestNonConvexFlowBlock_invest(diesel_genset_bus_electricity_0) +<= 1234 + +c_u_InvestNonConvexFlowBlock_min(diesel_genset_bus_electricity_0_0)_: +-1 flow(diesel_genset_bus_electricity_0_0) ++0.2 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) +<= 0 + +c_u_InvestNonConvexFlowBlock_min(diesel_genset_bus_electricity_0_1)_: +-1 flow(diesel_genset_bus_electricity_0_1) ++0.2 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) +<= 0 + +c_u_InvestNonConvexFlowBlock_min(diesel_genset_bus_electricity_0_2)_: +-1 flow(diesel_genset_bus_electricity_0_2) ++0.2 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) +<= 0 + +c_u_InvestNonConvexFlowBlock_max(diesel_genset_bus_electricity_0_0)_: +1 flow(diesel_genset_bus_electricity_0_0) +-1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) +<= 0 + +c_u_InvestNonConvexFlowBlock_max(diesel_genset_bus_electricity_0_1)_: +1 flow(diesel_genset_bus_electricity_0_1) +-1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) +<= 0 + +c_u_InvestNonConvexFlowBlock_max(diesel_genset_bus_electricity_0_2)_: +1 flow(diesel_genset_bus_electricity_0_2) +-1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_one(diesel_genset_bus_electricity_0_0)_: +1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) +-1234 InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_0) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_one(diesel_genset_bus_electricity_0_1)_: +1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) +-1234 InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_1) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_one(diesel_genset_bus_electricity_0_2)_: +1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) +-1234 InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_2) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_two(diesel_genset_bus_electricity_0_0)_: +-1 InvestNonConvexFlowBlock_invest(diesel_genset_bus_electricity_0) +1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_two(diesel_genset_bus_electricity_0_1)_: +-1 InvestNonConvexFlowBlock_invest(diesel_genset_bus_electricity_0) +1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_two(diesel_genset_bus_electricity_0_2)_: +-1 InvestNonConvexFlowBlock_invest(diesel_genset_bus_electricity_0) +1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) +<= 0 + +c_u_InvestNonConvexFlowBlock_invest_nc_three(diesel_genset_bus_electricity_0_0)_: +1 InvestNonConvexFlowBlock_invest(diesel_genset_bus_electricity_0) +-1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) +1234 InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_0) +<= 1234 + +c_u_InvestNonConvexFlowBlock_invest_nc_three(diesel_genset_bus_electricity_0_1)_: +1 InvestNonConvexFlowBlock_invest(diesel_genset_bus_electricity_0) +-1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) +1234 InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_1) +<= 1234 + +c_u_InvestNonConvexFlowBlock_invest_nc_three(diesel_genset_bus_electricity_0_2)_: +1 InvestNonConvexFlowBlock_invest(diesel_genset_bus_electricity_0) +-1 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) +1234 InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_2) +<= 1234 + +c_e_OffsetConverterBlock_relation(diesel_genset_bus_diesel_bus_electricity_0_0)_: ++0.5 flow(bus_diesel_diesel_genset_0_0) +-1 flow(diesel_genset_bus_electricity_0_0) ++2.5 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) += 0 + +c_e_OffsetConverterBlock_relation(diesel_genset_bus_diesel_bus_electricity_0_1)_: ++0.5 flow(bus_diesel_diesel_genset_0_1) +-1 flow(diesel_genset_bus_electricity_0_1) ++2.5 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) += 0 + +c_e_OffsetConverterBlock_relation(diesel_genset_bus_diesel_bus_electricity_0_2)_: ++0.5 flow(bus_diesel_diesel_genset_0_2) +-1 flow(diesel_genset_bus_electricity_0_2) ++2.5 InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) += 0 + +bounds +0 <= InvestNonConvexFlowBlock_invest(diesel_genset_bus_electricity_0) <= 1234 +0 <= flow(bus_diesel_diesel_genset_0_0) <= +inf +0 <= flow(bus_diesel_diesel_genset_0_1) <= +inf +0 <= flow(bus_diesel_diesel_genset_0_2) <= +inf +0 <= flow(diesel_genset_bus_electricity_0_0) <= +inf +0 <= flow(diesel_genset_bus_electricity_0_1) <= +inf +0 <= flow(diesel_genset_bus_electricity_0_2) <= +inf +0 <= InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_0) <= +inf +0 <= InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_1) <= +inf +0 <= InvestNonConvexFlowBlock_status_nominal(diesel_genset_bus_electricity_2) <= +inf +0 <= InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_0) <= 1 +0 <= InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_1) <= 1 +0 <= InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_2) <= 1 +binary +InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_0) +InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_1) +InvestNonConvexFlowBlock_status(diesel_genset_bus_electricity_2) +end diff --git a/tests/lp_files/offsettransformer.lp b/tests/lp_files/offsettransformer.lp deleted file mode 100644 index ec61462c5..000000000 --- a/tests/lp_files/offsettransformer.lp +++ /dev/null @@ -1,116 +0,0 @@ -\* Source Pyomo model name=Model *\ - -min -objective: -+0 ONE_VAR_CONSTANT - -s.t. - -c_e_BusBlock_balance(gasBus_0)_: -+1 flow(gasBus_gasboiler_0) -= 0 - -c_e_BusBlock_balance(gasBus_1)_: -+1 flow(gasBus_gasboiler_1) -= 0 - -c_e_BusBlock_balance(gasBus_2)_: -+1 flow(gasBus_gasboiler_2) -= 0 - -c_e_BusBlock_balance(thermalBus_0)_: -+1 flow(gasboiler_thermalBus_0) -= 0 - -c_e_BusBlock_balance(thermalBus_1)_: -+1 flow(gasboiler_thermalBus_1) -= 0 - -c_e_BusBlock_balance(thermalBus_2)_: -+1 flow(gasboiler_thermalBus_2) -= 0 - -c_e_NonConvexFlowBlock_status_nominal_constraint(gasBus_gasboiler_0)_: --100 NonConvexFlowBlock_status(gasBus_gasboiler_0) -+1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0) -= 0 - -c_e_NonConvexFlowBlock_status_nominal_constraint(gasBus_gasboiler_1)_: --100 NonConvexFlowBlock_status(gasBus_gasboiler_1) -+1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1) -= 0 - -c_e_NonConvexFlowBlock_status_nominal_constraint(gasBus_gasboiler_2)_: --100 NonConvexFlowBlock_status(gasBus_gasboiler_2) -+1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2) -= 0 - -c_u_NonConvexFlowBlock_min(gasBus_gasboiler_0)_: -+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0) --1 flow(gasBus_gasboiler_0) -<= 0 - -c_u_NonConvexFlowBlock_min(gasBus_gasboiler_1)_: -+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1) --1 flow(gasBus_gasboiler_1) -<= 0 - -c_u_NonConvexFlowBlock_min(gasBus_gasboiler_2)_: -+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2) --1 flow(gasBus_gasboiler_2) -<= 0 - -c_u_NonConvexFlowBlock_max(gasBus_gasboiler_0)_: --1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0) -+1 flow(gasBus_gasboiler_0) -<= 0 - -c_u_NonConvexFlowBlock_max(gasBus_gasboiler_1)_: --1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1) -+1 flow(gasBus_gasboiler_1) -<= 0 - -c_u_NonConvexFlowBlock_max(gasBus_gasboiler_2)_: --1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2) -+1 flow(gasBus_gasboiler_2) -<= 0 - -c_e_OffsetTransformerBlock_relation(gasboiler_0)_: --17 NonConvexFlowBlock_status(gasBus_gasboiler_0) -+0.90000000000000002 flow(gasBus_gasboiler_0) --1 flow(gasboiler_thermalBus_0) -= 0 - -c_e_OffsetTransformerBlock_relation(gasboiler_1)_: --17 NonConvexFlowBlock_status(gasBus_gasboiler_1) -+0.90000000000000002 flow(gasBus_gasboiler_1) --1 flow(gasboiler_thermalBus_1) -= 0 - -c_e_OffsetTransformerBlock_relation(gasboiler_2)_: --17 NonConvexFlowBlock_status(gasBus_gasboiler_2) -+0.90000000000000002 flow(gasBus_gasboiler_2) --1 flow(gasboiler_thermalBus_2) -= 0 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - -bounds - 0 <= flow(gasBus_gasboiler_0) <= 100 - 0 <= flow(gasBus_gasboiler_1) <= 100 - 0 <= flow(gasBus_gasboiler_2) <= 100 - 0 <= flow(gasboiler_thermalBus_0) <= +inf - 0 <= flow(gasboiler_thermalBus_1) <= +inf - 0 <= flow(gasboiler_thermalBus_2) <= +inf - 0 <= NonConvexFlowBlock_status(gasBus_gasboiler_0) <= 1 - 0 <= NonConvexFlowBlock_status(gasBus_gasboiler_1) <= 1 - 0 <= NonConvexFlowBlock_status(gasBus_gasboiler_2) <= 1 - 0 <= NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0) <= +inf - 0 <= NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1) <= +inf - 0 <= NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2) <= +inf -binary - NonConvexFlowBlock_status(gasBus_gasboiler_0) - NonConvexFlowBlock_status(gasBus_gasboiler_1) - NonConvexFlowBlock_status(gasBus_gasboiler_2) -end diff --git a/tests/lp_files/periodical_emission_limit.lp b/tests/lp_files/periodical_emission_limit.lp new file mode 100644 index 000000000..a4ff0ee68 --- /dev/null +++ b/tests/lp_files/periodical_emission_limit.lp @@ -0,0 +1,44 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++0 ONE_VAR_CONSTANT + +s.t. + +c_u_periodical_integral_limit(0)_: ++0.5 flow(source1_electricityBus_0_0) +-1.0 flow(source1_electricityBus_0_1) ++3.5 flow(source2_electricityBus_0_0) ++3.5 flow(source2_electricityBus_0_1) +<= 300 + +c_u_periodical_integral_limit(1)_: ++2.0 flow(source1_electricityBus_1_2) ++1 flow(source1_electricityBus_1_3) ++3.5 flow(source2_electricityBus_1_2) ++3.5 flow(source2_electricityBus_1_3) +<= 200 + +c_u_periodical_integral_limit(2)_: ++0.5 flow(source1_electricityBus_2_4) ++0.5 flow(source1_electricityBus_2_5) ++3.5 flow(source2_electricityBus_2_4) ++3.5 flow(source2_electricityBus_2_5) +<= 100 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(source1_electricityBus_0_0) <= 100 + 0 <= flow(source1_electricityBus_0_1) <= 100 + 0 <= flow(source2_electricityBus_0_0) <= 100 + 0 <= flow(source2_electricityBus_0_1) <= 100 + 0 <= flow(source1_electricityBus_1_2) <= 100 + 0 <= flow(source1_electricityBus_1_3) <= 100 + 0 <= flow(source2_electricityBus_1_2) <= 100 + 0 <= flow(source2_electricityBus_1_3) <= 100 + 0 <= flow(source1_electricityBus_2_4) <= 100 + 0 <= flow(source1_electricityBus_2_5) <= 100 + 0 <= flow(source2_electricityBus_2_4) <= 100 + 0 <= flow(source2_electricityBus_2_5) <= 100 +end diff --git a/tests/lp_files/periodical_investment_limit.lp b/tests/lp_files/periodical_investment_limit.lp new file mode 100644 index 000000000..b6c76060f --- /dev/null +++ b/tests/lp_files/periodical_investment_limit.lp @@ -0,0 +1,583 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0) ++279.7977897184428 InvestmentFlowBlock_invest(Source_Bus1_1) ++274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2) ++194.22716197630274 GenericInvestmentStorageBlock_invest(storage_invest_limit_0) ++190.4187862512772 GenericInvestmentStorageBlock_invest(storage_invest_limit_1) ++186.68508456007567 GenericInvestmentStorageBlock_invest(storage_invest_limit_2) + +s.t. + +c_u_investment_limit_per_period(0)_: ++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0) ++194.22716197630274 GenericInvestmentStorageBlock_invest(storage_invest_limit_0) +<= 500 + +c_u_investment_limit_per_period(1)_: ++279.7977897184428 InvestmentFlowBlock_invest(Source_Bus1_1) ++190.4187862512772 GenericInvestmentStorageBlock_invest(storage_invest_limit_1) +<= 400 + +c_u_investment_limit_per_period(2)_: ++274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2) ++186.68508456007567 GenericInvestmentStorageBlock_invest(storage_invest_limit_2) +<= 300 + +c_e_BusBlock_balance(Bus1_0_0)_: ++1 flow(storage_invest_limit_Bus1_0_0) ++1 flow(Source_Bus1_0_0) +-1 flow(Bus1_storage_invest_limit_0_0) += 0 + +c_e_BusBlock_balance(Bus1_0_1)_: ++1 flow(storage_invest_limit_Bus1_0_1) ++1 flow(Source_Bus1_0_1) +-1 flow(Bus1_storage_invest_limit_0_1) += 0 + +c_e_BusBlock_balance(Bus1_1_2)_: ++1 flow(storage_invest_limit_Bus1_1_2) ++1 flow(Source_Bus1_1_2) +-1 flow(Bus1_storage_invest_limit_1_2) += 0 + +c_e_BusBlock_balance(Bus1_1_3)_: ++1 flow(storage_invest_limit_Bus1_1_3) ++1 flow(Source_Bus1_1_3) +-1 flow(Bus1_storage_invest_limit_1_3) += 0 + +c_e_BusBlock_balance(Bus1_2_4)_: ++1 flow(storage_invest_limit_Bus1_2_4) ++1 flow(Source_Bus1_2_4) +-1 flow(Bus1_storage_invest_limit_2_4) += 0 + +c_e_BusBlock_balance(Bus1_2_5)_: ++1 flow(storage_invest_limit_Bus1_2_5) ++1 flow(Source_Bus1_2_5) +-1 flow(Bus1_storage_invest_limit_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_invest_limit_Bus1_0)_: ++1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) +-1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_invest_limit_Bus1_1)_: +-1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) ++1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_1) +-1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1_1) ++1 InvestmentFlowBlock_old(storage_invest_limit_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_invest_limit_Bus1_2)_: +-1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_1) ++1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_2) +-1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1_2) ++1 InvestmentFlowBlock_old(storage_invest_limit_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_1)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_1) ++1 InvestmentFlowBlock_old(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_2)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_2) +-1 InvestmentFlowBlock_total(Source_Bus1_1) ++1 InvestmentFlowBlock_total(Source_Bus1_2) ++1 InvestmentFlowBlock_old(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(Bus1_storage_invest_limit_0)_: ++1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) +-1 InvestmentFlowBlock_invest(Bus1_storage_invest_limit_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Bus1_storage_invest_limit_1)_: +-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) ++1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_1) +-1 InvestmentFlowBlock_invest(Bus1_storage_invest_limit_1) ++1 InvestmentFlowBlock_old(Bus1_storage_invest_limit_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(Bus1_storage_invest_limit_2)_: +-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_1) ++1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_2) +-1 InvestmentFlowBlock_invest(Bus1_storage_invest_limit_2) ++1 InvestmentFlowBlock_old(Bus1_storage_invest_limit_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_invest_limit_Bus1_0)_: ++1 InvestmentFlowBlock_old_end(storage_invest_limit_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_invest_limit_Bus1_1)_: ++1 InvestmentFlowBlock_old_end(storage_invest_limit_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_invest_limit_Bus1_2)_: ++1 InvestmentFlowBlock_old_end(storage_invest_limit_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_0)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_invest_limit_0)_: ++1 InvestmentFlowBlock_old_end(Bus1_storage_invest_limit_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_invest_limit_1)_: ++1 InvestmentFlowBlock_old_end(Bus1_storage_invest_limit_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_invest_limit_2)_: ++1 InvestmentFlowBlock_old_end(Bus1_storage_invest_limit_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_invest_limit_Bus1_0)_: ++1 InvestmentFlowBlock_old_exo(storage_invest_limit_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_invest_limit_Bus1_1)_: ++1 InvestmentFlowBlock_old_exo(storage_invest_limit_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_invest_limit_Bus1_2)_: ++1 InvestmentFlowBlock_old_exo(storage_invest_limit_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_0)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_invest_limit_0)_: ++1 InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_invest_limit_1)_: ++1 InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_invest_limit_2)_: ++1 InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_invest_limit_Bus1_0)_: +-1 InvestmentFlowBlock_old_end(storage_invest_limit_Bus1_0) +-1 InvestmentFlowBlock_old_exo(storage_invest_limit_Bus1_0) ++1 InvestmentFlowBlock_old(storage_invest_limit_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_invest_limit_Bus1_1)_: ++1 InvestmentFlowBlock_old(storage_invest_limit_Bus1_1) +-1 InvestmentFlowBlock_old_end(storage_invest_limit_Bus1_1) +-1 InvestmentFlowBlock_old_exo(storage_invest_limit_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_invest_limit_Bus1_2)_: ++1 InvestmentFlowBlock_old(storage_invest_limit_Bus1_2) +-1 InvestmentFlowBlock_old_end(storage_invest_limit_Bus1_2) +-1 InvestmentFlowBlock_old_exo(storage_invest_limit_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_old_end(Source_Bus1_0) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_0) ++1 InvestmentFlowBlock_old(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old(Source_Bus1_1) +-1 InvestmentFlowBlock_old_end(Source_Bus1_1) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old(Source_Bus1_2) +-1 InvestmentFlowBlock_old_end(Source_Bus1_2) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(Bus1_storage_invest_limit_0)_: +-1 InvestmentFlowBlock_old_end(Bus1_storage_invest_limit_0) +-1 InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_0) ++1 InvestmentFlowBlock_old(Bus1_storage_invest_limit_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(Bus1_storage_invest_limit_1)_: ++1 InvestmentFlowBlock_old(Bus1_storage_invest_limit_1) +-1 InvestmentFlowBlock_old_end(Bus1_storage_invest_limit_1) +-1 InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(Bus1_storage_invest_limit_2)_: ++1 InvestmentFlowBlock_old(Bus1_storage_invest_limit_2) +-1 InvestmentFlowBlock_old_end(Bus1_storage_invest_limit_2) +-1 InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_2) += 0 + +c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_0_0)_: ++1 flow(storage_invest_limit_Bus1_0_0) +-1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_0_1)_: ++1 flow(storage_invest_limit_Bus1_0_1) +-1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_1_2)_: ++1 flow(storage_invest_limit_Bus1_1_2) +-1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_1_3)_: ++1 flow(storage_invest_limit_Bus1_1_3) +-1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_2_4)_: ++1 flow(storage_invest_limit_Bus1_2_4) +-1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_2_5)_: ++1 flow(storage_invest_limit_Bus1_2_5) +-1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_1_2)_: ++1 flow(Source_Bus1_1_2) +-1 InvestmentFlowBlock_total(Source_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_1_3)_: ++1 flow(Source_Bus1_1_3) +-1 InvestmentFlowBlock_total(Source_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_2_4)_: ++1 flow(Source_Bus1_2_4) +-1 InvestmentFlowBlock_total(Source_Bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_2_5)_: ++1 flow(Source_Bus1_2_5) +-1 InvestmentFlowBlock_total(Source_Bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_0_0)_: ++1 flow(Bus1_storage_invest_limit_0_0) +-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_0_1)_: ++1 flow(Bus1_storage_invest_limit_0_1) +-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_1_2)_: ++1 flow(Bus1_storage_invest_limit_1_2) +-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_1_3)_: ++1 flow(Bus1_storage_invest_limit_1_3) +-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_2_4)_: ++1 flow(Bus1_storage_invest_limit_2_4) +-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_2_5)_: ++1 flow(Bus1_storage_invest_limit_2_5) +-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_2) +<= 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_invest_limit_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_invest_limit_0) ++1 GenericInvestmentStorageBlock_total(storage_invest_limit_0) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_invest_limit_1)_: +-1 GenericInvestmentStorageBlock_invest(storage_invest_limit_1) +-1 GenericInvestmentStorageBlock_total(storage_invest_limit_0) ++1 GenericInvestmentStorageBlock_total(storage_invest_limit_1) ++1 GenericInvestmentStorageBlock_old(storage_invest_limit_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_invest_limit_2)_: +-1 GenericInvestmentStorageBlock_invest(storage_invest_limit_2) +-1 GenericInvestmentStorageBlock_total(storage_invest_limit_1) ++1 GenericInvestmentStorageBlock_total(storage_invest_limit_2) ++1 GenericInvestmentStorageBlock_old(storage_invest_limit_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_invest_limit_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage_invest_limit_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_invest_limit_1)_: ++1 GenericInvestmentStorageBlock_old_end(storage_invest_limit_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_invest_limit_2)_: ++1 GenericInvestmentStorageBlock_old_end(storage_invest_limit_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_invest_limit_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_invest_limit_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_invest_limit_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_invest_limit_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_invest_limit_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_invest_limit_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_invest_limit_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage_invest_limit_0) +-1 GenericInvestmentStorageBlock_old_exo(storage_invest_limit_0) ++1 GenericInvestmentStorageBlock_old(storage_invest_limit_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_invest_limit_1)_: ++1 GenericInvestmentStorageBlock_old(storage_invest_limit_1) +-1 GenericInvestmentStorageBlock_old_end(storage_invest_limit_1) +-1 GenericInvestmentStorageBlock_old_exo(storage_invest_limit_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_invest_limit_2)_: ++1 GenericInvestmentStorageBlock_old(storage_invest_limit_2) +-1 GenericInvestmentStorageBlock_old_end(storage_invest_limit_2) +-1 GenericInvestmentStorageBlock_old_exo(storage_invest_limit_2) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage_invest_limit_0)_: ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_invest_limit_0_1)_: ++1 flow(storage_invest_limit_Bus1_0_1) +-1 flow(Bus1_storage_invest_limit_0_1) +-1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_1) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_invest_limit_1_2)_: ++1 flow(storage_invest_limit_Bus1_1_2) +-1 flow(Bus1_storage_invest_limit_1_2) +-1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_invest_limit_1_3)_: ++1 flow(storage_invest_limit_Bus1_1_3) +-1 flow(Bus1_storage_invest_limit_1_3) +-1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_invest_limit_2_4)_: ++1 flow(storage_invest_limit_Bus1_2_4) +-1 flow(Bus1_storage_invest_limit_2_4) +-1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_3) ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_invest_limit_2_5)_: ++1 flow(storage_invest_limit_Bus1_2_5) +-1 flow(Bus1_storage_invest_limit_2_5) +-1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_4) ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_5) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_invest_limit_0)_: ++1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) +-0.2 GenericInvestmentStorageBlock_total(storage_invest_limit_0) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_invest_limit_1)_: ++1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_1) +-0.2 GenericInvestmentStorageBlock_total(storage_invest_limit_1) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_invest_limit_2)_: ++1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_2) +-0.2 GenericInvestmentStorageBlock_total(storage_invest_limit_2) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_invest_limit_0)_: ++1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) +-0.2 GenericInvestmentStorageBlock_total(storage_invest_limit_0) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_invest_limit_1)_: ++1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_1) +-0.2 GenericInvestmentStorageBlock_total(storage_invest_limit_1) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_invest_limit_2)_: ++1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_2) +-0.2 GenericInvestmentStorageBlock_total(storage_invest_limit_2) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage_invest_limit_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage_invest_limit_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_1_2)_: +-1 GenericInvestmentStorageBlock_total(storage_invest_limit_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_1_3)_: +-1 GenericInvestmentStorageBlock_total(storage_invest_limit_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_2_4)_: +-1 GenericInvestmentStorageBlock_total(storage_invest_limit_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_invest_limit_2_5)_: +-1 GenericInvestmentStorageBlock_total(storage_invest_limit_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_5) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_invest_limit_0) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_invest_limit_1) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_invest_limit_2) <= +inf + 0 <= flow(storage_invest_limit_Bus1_0_0) <= +inf + 0 <= flow(Source_Bus1_0_0) <= +inf + 0 <= flow(Bus1_storage_invest_limit_0_0) <= +inf + 0 <= flow(storage_invest_limit_Bus1_0_1) <= +inf + 0 <= flow(Source_Bus1_0_1) <= +inf + 0 <= flow(Bus1_storage_invest_limit_0_1) <= +inf + 0 <= flow(storage_invest_limit_Bus1_1_2) <= +inf + 0 <= flow(Source_Bus1_1_2) <= +inf + 0 <= flow(Bus1_storage_invest_limit_1_2) <= +inf + 0 <= flow(storage_invest_limit_Bus1_1_3) <= +inf + 0 <= flow(Source_Bus1_1_3) <= +inf + 0 <= flow(Bus1_storage_invest_limit_1_3) <= +inf + 0 <= flow(storage_invest_limit_Bus1_2_4) <= +inf + 0 <= flow(Source_Bus1_2_4) <= +inf + 0 <= flow(Bus1_storage_invest_limit_2_4) <= +inf + 0 <= flow(storage_invest_limit_Bus1_2_5) <= +inf + 0 <= flow(Source_Bus1_2_5) <= +inf + 0 <= flow(Bus1_storage_invest_limit_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_invest_limit_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage_invest_limit_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_invest_limit_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old(storage_invest_limit_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_total(storage_invest_limit_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_invest_limit_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage_invest_limit_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_storage_invest_limit_0) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_storage_invest_limit_1) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_storage_invest_limit_1) <= +inf + 0 <= InvestmentFlowBlock_old(Bus1_storage_invest_limit_1) <= +inf + 0 <= InvestmentFlowBlock_total(Bus1_storage_invest_limit_2) <= +inf + 0 <= InvestmentFlowBlock_invest(Bus1_storage_invest_limit_2) <= +inf + 0 <= InvestmentFlowBlock_old(Bus1_storage_invest_limit_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_invest_limit_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_invest_limit_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_invest_limit_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(Bus1_storage_invest_limit_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(Bus1_storage_invest_limit_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(Bus1_storage_invest_limit_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_invest_limit_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_invest_limit_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_invest_limit_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage_invest_limit_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old(Bus1_storage_invest_limit_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_invest_limit_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_invest_limit_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_invest_limit_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_invest_limit_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_invest_limit_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_invest_limit_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_invest_limit_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_invest_limit_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_invest_limit_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_invest_limit_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_invest_limit_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_invest_limit_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_invest_limit_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_invest_limit_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_invest_limit_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_invest_limit_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_invest_limit_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_invest_limit_5) <= +inf +end diff --git a/tests/lp_files/periodical_investment_limit_with_dsm_DIW.lp b/tests/lp_files/periodical_investment_limit_with_dsm_DIW.lp new file mode 100644 index 000000000..28e220674 --- /dev/null +++ b/tests/lp_files/periodical_investment_limit_with_dsm_DIW.lp @@ -0,0 +1,605 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0) ++279.7977897184428 InvestmentFlowBlock_invest(Source_Bus1_1) ++274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) ++0.5 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_1) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_1) ++0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_1) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_2) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_2) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_2) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_2) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_3) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_3) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_3) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_3) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_3) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_3) ++0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_3) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_4) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_4) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_4) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_4) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_4) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_4) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_4) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_5) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_5) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_5) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_5) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_5) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_5) ++0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_5) ++103.00990099009903 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_0) ++100.990099009901 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_1) ++99.00990099009901 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_2) + +s.t. + +c_u_investment_limit_per_period(0)_: ++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0) ++103.00990099009903 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_0) +<= 400 + +c_u_investment_limit_per_period(1)_: ++279.7977897184428 InvestmentFlowBlock_invest(Source_Bus1_1) ++100.990099009901 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_1) +<= 300 + +c_u_investment_limit_per_period(2)_: ++274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2) ++99.00990099009901 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_2) +<= 200 + +c_e_BusBlock_balance(Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 flow(Bus1_sink_dsm_DIW_0_0) += 0 + +c_e_BusBlock_balance(Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 flow(Bus1_sink_dsm_DIW_0_1) += 0 + +c_e_BusBlock_balance(Bus1_1_2)_: ++1 flow(Source_Bus1_1_2) +-1 flow(Bus1_sink_dsm_DIW_1_2) += 0 + +c_e_BusBlock_balance(Bus1_1_3)_: ++1 flow(Source_Bus1_1_3) +-1 flow(Bus1_sink_dsm_DIW_1_3) += 0 + +c_e_BusBlock_balance(Bus1_2_4)_: ++1 flow(Source_Bus1_2_4) +-1 flow(Bus1_sink_dsm_DIW_2_4) += 0 + +c_e_BusBlock_balance(Bus1_2_5)_: ++1 flow(Source_Bus1_2_5) +-1 flow(Bus1_sink_dsm_DIW_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_1)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_1) ++1 InvestmentFlowBlock_old(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_2)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_2) +-1 InvestmentFlowBlock_total(Source_Bus1_1) ++1 InvestmentFlowBlock_total(Source_Bus1_2) ++1 InvestmentFlowBlock_old(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_0)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_0)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_old_end(Source_Bus1_0) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_0) ++1 InvestmentFlowBlock_old(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old(Source_Bus1_1) +-1 InvestmentFlowBlock_old_end(Source_Bus1_1) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old(Source_Bus1_2) +-1 InvestmentFlowBlock_old_end(Source_Bus1_2) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_2) += 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_1_2)_: ++1 flow(Source_Bus1_1_2) +-1 InvestmentFlowBlock_total(Source_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_1_3)_: ++1 flow(Source_Bus1_1_3) +-1 InvestmentFlowBlock_total(Source_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_2_4)_: ++1 flow(Source_Bus1_2_4) +-1 InvestmentFlowBlock_total(Source_Bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_2_5)_: ++1 flow(Source_Bus1_2_5) +-1 InvestmentFlowBlock_total(Source_Bus1_2) +<= 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(sink_dsm_DIW_0)_: +-1 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) += 50 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(sink_dsm_DIW_1)_: +-1 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_1) +-1 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_1) ++1 SinkDSMDIWInvestmentBlock_old(sink_dsm_DIW_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(sink_dsm_DIW_2)_: +-1 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_2) +-1 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_1) ++1 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2) ++1 SinkDSMDIWInvestmentBlock_old(sink_dsm_DIW_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(sink_dsm_DIW_0)_: ++1 SinkDSMDIWInvestmentBlock_old_end(sink_dsm_DIW_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(sink_dsm_DIW_1)_: ++1 SinkDSMDIWInvestmentBlock_old_end(sink_dsm_DIW_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_end(sink_dsm_DIW_2)_: +-1 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_old_end(sink_dsm_DIW_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(sink_dsm_DIW_0)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(sink_dsm_DIW_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(sink_dsm_DIW_1)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(sink_dsm_DIW_1) += 50 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(sink_dsm_DIW_2)_: ++1 SinkDSMDIWInvestmentBlock_old_exo(sink_dsm_DIW_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(sink_dsm_DIW_0)_: +-1 SinkDSMDIWInvestmentBlock_old_end(sink_dsm_DIW_0) +-1 SinkDSMDIWInvestmentBlock_old_exo(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_old(sink_dsm_DIW_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(sink_dsm_DIW_1)_: ++1 SinkDSMDIWInvestmentBlock_old(sink_dsm_DIW_1) +-1 SinkDSMDIWInvestmentBlock_old_end(sink_dsm_DIW_1) +-1 SinkDSMDIWInvestmentBlock_old_exo(sink_dsm_DIW_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(sink_dsm_DIW_2)_: ++1 SinkDSMDIWInvestmentBlock_old(sink_dsm_DIW_2) +-1 SinkDSMDIWInvestmentBlock_old_end(sink_dsm_DIW_2) +-1 SinkDSMDIWInvestmentBlock_old_exo(sink_dsm_DIW_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(sink_dsm_DIW_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_0) += 0 + +c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(sink_dsm_DIW_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(sink_dsm_DIW_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(sink_dsm_DIW_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_3) += 0 + +c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(sink_dsm_DIW_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_4) += 0 + +c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(sink_dsm_DIW_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_5) += 0 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(sink_dsm_DIW_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) +-1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) ++1 flow(Bus1_sink_dsm_DIW_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_0) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(sink_dsm_DIW_0_1)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) ++1 flow(Bus1_sink_dsm_DIW_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_1) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(sink_dsm_DIW_1_2)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_2) ++1 flow(Bus1_sink_dsm_DIW_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_2) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(sink_dsm_DIW_1_3)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_3) ++1 flow(Bus1_sink_dsm_DIW_1_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_3) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(sink_dsm_DIW_2_4)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_4) ++1 flow(Bus1_sink_dsm_DIW_2_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_4) += 1 + +c_e_SinkDSMDIWInvestmentBlock_input_output_relation(sink_dsm_DIW_2_5)_: +-1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_5) ++1 flow(Bus1_sink_dsm_DIW_2_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_5) += 1 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(sink_dsm_DIW_0)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(sink_dsm_DIW_1)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(sink_dsm_DIW_2)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_3) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(sink_dsm_DIW_3)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_2) ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_3) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_3) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_4) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(sink_dsm_DIW_4)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_3) ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_4) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_4) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_5) += 0 + +c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(sink_dsm_DIW_5)_: +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_4) ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_5) +-1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_5) += 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(sink_dsm_DIW_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(sink_dsm_DIW_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(sink_dsm_DIW_1_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(sink_dsm_DIW_1_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_3) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(sink_dsm_DIW_2_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_4) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(sink_dsm_DIW_2_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_5) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(sink_dsm_DIW_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(sink_dsm_DIW_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(sink_dsm_DIW_1_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_2) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(sink_dsm_DIW_1_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_3) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(sink_dsm_DIW_2_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_4) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(sink_dsm_DIW_2_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_5) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(sink_dsm_DIW_0_0)_: ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_0) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(sink_dsm_DIW_0_1)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_1) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(sink_dsm_DIW_1_2)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_2) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_2) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(sink_dsm_DIW_1_3)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_3) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_3) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_1) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_3) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(sink_dsm_DIW_2_4)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_4) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_4) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_4) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_C2_constraint(sink_dsm_DIW_2_5)_: ++1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_5) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_5) +-0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2) ++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_5) +<= 0 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(sink_dsm_DIW_0)_: ++1 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) +<= 1000 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(sink_dsm_DIW_1)_: ++1 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_1) +<= 1000 + +c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(sink_dsm_DIW_2)_: ++1 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2) +<= 1000 + +c_l_SinkDSMDIWInvestmentBlock_overall_minimum(sink_dsm_DIW)_: ++1 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2) +>= 200 + +bounds + 0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_5) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_5) <= +inf + 33 <= SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_0) <= 100 + 33 <= SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_1) <= 100 + 33 <= SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_2) <= 100 + 0 <= flow(Source_Bus1_0_0) <= +inf + 0 <= flow(Bus1_sink_dsm_DIW_0_0) <= +inf + 0 <= flow(Source_Bus1_0_1) <= +inf + 0 <= flow(Bus1_sink_dsm_DIW_0_1) <= +inf + 0 <= flow(Source_Bus1_1_2) <= +inf + 0 <= flow(Bus1_sink_dsm_DIW_1_2) <= +inf + 0 <= flow(Source_Bus1_1_3) <= +inf + 0 <= flow(Bus1_sink_dsm_DIW_1_3) <= +inf + 0 <= flow(Source_Bus1_2_4) <= +inf + 0 <= flow(Bus1_sink_dsm_DIW_2_4) <= +inf + 0 <= flow(Source_Bus1_2_5) <= +inf + 0 <= flow(Bus1_sink_dsm_DIW_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(sink_dsm_DIW_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(sink_dsm_DIW_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(sink_dsm_DIW_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(sink_dsm_DIW_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_end(sink_dsm_DIW_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(sink_dsm_DIW_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(sink_dsm_DIW_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old_exo(sink_dsm_DIW_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_old(sink_dsm_DIW_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_0) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_1) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_2) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_3) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_4) <= +inf + 0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_5) <= +inf +end diff --git a/tests/lp_files/periodical_investment_limit_with_dsm_DLR.lp b/tests/lp_files/periodical_investment_limit_with_dsm_DLR.lp new file mode 100644 index 000000000..5f697ad19 --- /dev/null +++ b/tests/lp_files/periodical_investment_limit_with_dsm_DLR.lp @@ -0,0 +1,753 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0) ++279.7977897184428 InvestmentFlowBlock_invest(Source_Bus1_1) ++274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2) ++0.5 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++0.5 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) ++0.5 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) ++0.5 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) ++0.5 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) ++0.5 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) ++0.5 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++0.5 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) ++0.49019607843137253 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) ++0.49019607843137253 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) ++0.49019607843137253 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) ++0.49019607843137253 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) ++0.49019607843137253 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_3) ++0.49019607843137253 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_3) ++0.49019607843137253 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_3) ++0.49019607843137253 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_3) ++0.48058439061899266 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_4) ++0.48058439061899266 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_4) ++0.48058439061899266 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_4) ++0.48058439061899266 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_4) ++0.48058439061899266 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_5) ++0.48058439061899266 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_5) ++0.48058439061899266 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5) ++0.48058439061899266 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_5) ++103.00990099009903 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_0) ++100.990099009901 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_1) ++99.00990099009901 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_2) + +s.t. + +c_u_investment_limit_per_period(0)_: ++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0) ++103.00990099009903 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_0) +<= 400 + +c_u_investment_limit_per_period(1)_: ++279.7977897184428 InvestmentFlowBlock_invest(Source_Bus1_1) ++100.990099009901 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_1) +<= 300 + +c_u_investment_limit_per_period(2)_: ++274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2) ++99.00990099009901 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_2) +<= 200 + +c_e_BusBlock_balance(Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 flow(Bus1_sink_dsm_DLR_0_0) += 0 + +c_e_BusBlock_balance(Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 flow(Bus1_sink_dsm_DLR_0_1) += 0 + +c_e_BusBlock_balance(Bus1_1_2)_: ++1 flow(Source_Bus1_1_2) +-1 flow(Bus1_sink_dsm_DLR_1_2) += 0 + +c_e_BusBlock_balance(Bus1_1_3)_: ++1 flow(Source_Bus1_1_3) +-1 flow(Bus1_sink_dsm_DLR_1_3) += 0 + +c_e_BusBlock_balance(Bus1_2_4)_: ++1 flow(Source_Bus1_2_4) +-1 flow(Bus1_sink_dsm_DLR_2_4) += 0 + +c_e_BusBlock_balance(Bus1_2_5)_: ++1 flow(Source_Bus1_2_5) +-1 flow(Bus1_sink_dsm_DLR_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_1)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_1) ++1 InvestmentFlowBlock_old(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_2)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_2) +-1 InvestmentFlowBlock_total(Source_Bus1_1) ++1 InvestmentFlowBlock_total(Source_Bus1_2) ++1 InvestmentFlowBlock_old(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_0)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_0)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_old_end(Source_Bus1_0) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_0) ++1 InvestmentFlowBlock_old(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old(Source_Bus1_1) +-1 InvestmentFlowBlock_old_end(Source_Bus1_1) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old(Source_Bus1_2) +-1 InvestmentFlowBlock_old_end(Source_Bus1_2) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_2) += 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_1_2)_: ++1 flow(Source_Bus1_1_2) +-1 InvestmentFlowBlock_total(Source_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_1_3)_: ++1 flow(Source_Bus1_1_3) +-1 InvestmentFlowBlock_total(Source_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_2_4)_: ++1 flow(Source_Bus1_2_4) +-1 InvestmentFlowBlock_total(Source_Bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_2_5)_: ++1 flow(Source_Bus1_2_5) +-1 InvestmentFlowBlock_total(Source_Bus1_2) +<= 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(sink_dsm_DLR_0)_: +-1 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) += 50 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(sink_dsm_DLR_1)_: +-1 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_1) +-1 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) ++1 SinkDSMDLRInvestmentBlock_old(sink_dsm_DLR_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(sink_dsm_DLR_2)_: +-1 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_2) +-1 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) ++1 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) ++1 SinkDSMDLRInvestmentBlock_old(sink_dsm_DLR_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(sink_dsm_DLR_0)_: ++1 SinkDSMDLRInvestmentBlock_old_end(sink_dsm_DLR_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(sink_dsm_DLR_1)_: ++1 SinkDSMDLRInvestmentBlock_old_end(sink_dsm_DLR_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_end(sink_dsm_DLR_2)_: +-1 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_old_end(sink_dsm_DLR_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(sink_dsm_DLR_0)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(sink_dsm_DLR_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(sink_dsm_DLR_1)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(sink_dsm_DLR_1) += 50 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(sink_dsm_DLR_2)_: ++1 SinkDSMDLRInvestmentBlock_old_exo(sink_dsm_DLR_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(sink_dsm_DLR_0)_: +-1 SinkDSMDLRInvestmentBlock_old_end(sink_dsm_DLR_0) +-1 SinkDSMDLRInvestmentBlock_old_exo(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_old(sink_dsm_DLR_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(sink_dsm_DLR_1)_: ++1 SinkDSMDLRInvestmentBlock_old(sink_dsm_DLR_1) +-1 SinkDSMDLRInvestmentBlock_old_end(sink_dsm_DLR_1) +-1 SinkDSMDLRInvestmentBlock_old_exo(sink_dsm_DLR_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(sink_dsm_DLR_2)_: ++1 SinkDSMDLRInvestmentBlock_old(sink_dsm_DLR_2) +-1 SinkDSMDLRInvestmentBlock_old_end(sink_dsm_DLR_2) +-1 SinkDSMDLRInvestmentBlock_old_exo(sink_dsm_DLR_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(sink_dsm_DLR_1_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(sink_dsm_DLR_1_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(sink_dsm_DLR_1_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(sink_dsm_DLR_1_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(sink_dsm_DLR_1_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(sink_dsm_DLR_1_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(sink_dsm_DLR_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) ++1 flow(Bus1_sink_dsm_DLR_0_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_0) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(sink_dsm_DLR_0_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) ++1 flow(Bus1_sink_dsm_DLR_0_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(sink_dsm_DLR_1_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) ++1 flow(Bus1_sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(sink_dsm_DLR_1_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_3) ++1 flow(Bus1_sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_3) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(sink_dsm_DLR_2_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_4) ++1 flow(Bus1_sink_dsm_DLR_2_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_4) += 1 + +c_e_SinkDSMDLRInvestmentBlock_input_output_relation(sink_dsm_DLR_2_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_5) ++1 flow(Bus1_sink_dsm_DLR_2_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_5) += 1 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_0)_: ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_1)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_2)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_3)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_4)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_5)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_red(sink_dsm_DLR_1_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(sink_dsm_DLR_1_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_5) += 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(sink_dsm_DLR_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(sink_dsm_DLR_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(sink_dsm_DLR_1_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(sink_dsm_DLR_1_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_3) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(sink_dsm_DLR_2_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_4) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_red(sink_dsm_DLR_2_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_5) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(sink_dsm_DLR_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(sink_dsm_DLR_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(sink_dsm_DLR_1_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(sink_dsm_DLR_1_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_3) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(sink_dsm_DLR_2_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_4) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_availability_inc(sink_dsm_DLR_2_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_5) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) +<= 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(sink_dsm_DLR_0)_: +-1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(sink_dsm_DLR_1)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_0) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(sink_dsm_DLR_2)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_1) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(sink_dsm_DLR_3)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_2) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(sink_dsm_DLR_4)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_3) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(sink_dsm_DLR_5)_: +-1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_4) +-1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_5) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_0)_: +-1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_0) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_0) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_1) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_1) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_2) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_3) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_2) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_3) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_4) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_3) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_4) += 0 + +c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_5) +-1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_4) +-1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_5) += 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(sink_dsm_DLR_0_0)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(sink_dsm_DLR_0_1)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(sink_dsm_DLR_1_2)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(sink_dsm_DLR_1_3)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(sink_dsm_DLR_2_4)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_red(sink_dsm_DLR_2_5)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(sink_dsm_DLR_0_0)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(sink_dsm_DLR_0_1)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(sink_dsm_DLR_1_2)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(sink_dsm_DLR_1_3)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(sink_dsm_DLR_2_4)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(sink_dsm_DLR_2_5)_: +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) ++1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(sink_dsm_DLR_0_0)_: ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_0) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(sink_dsm_DLR_0_1)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(sink_dsm_DLR_1_2)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(sink_dsm_DLR_1_3)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_3) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_3) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_3) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(sink_dsm_DLR_2_4)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_4) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_4) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_4) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_dr_logical_constraint(sink_dsm_DLR_2_5)_: ++1 SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_5) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5) ++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_5) +-0.5 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) ++1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_5) +<= 0 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(sink_dsm_DLR_0)_: ++1 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) +<= 1000 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(sink_dsm_DLR_1)_: ++1 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) +<= 1000 + +c_u_SinkDSMDLRInvestmentBlock_overall_dsm_maximum(sink_dsm_DLR_2)_: ++1 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) +<= 1000 + +c_l_SinkDSMDLRInvestmentBlock_overall_minimum(sink_dsm_DLR)_: ++1 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) +>= 200 + +bounds + 0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_5) <= +inf + 33 <= SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_0) <= 100 + 33 <= SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_1) <= 100 + 33 <= SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_2) <= 100 + 0 <= flow(Source_Bus1_0_0) <= +inf + 0 <= flow(Bus1_sink_dsm_DLR_0_0) <= +inf + 0 <= flow(Source_Bus1_0_1) <= +inf + 0 <= flow(Bus1_sink_dsm_DLR_0_1) <= +inf + 0 <= flow(Source_Bus1_1_2) <= +inf + 0 <= flow(Bus1_sink_dsm_DLR_1_2) <= +inf + 0 <= flow(Source_Bus1_1_3) <= +inf + 0 <= flow(Bus1_sink_dsm_DLR_1_3) <= +inf + 0 <= flow(Source_Bus1_2_4) <= +inf + 0 <= flow(Bus1_sink_dsm_DLR_2_4) <= +inf + 0 <= flow(Source_Bus1_2_5) <= +inf + 0 <= flow(Bus1_sink_dsm_DLR_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(sink_dsm_DLR_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(sink_dsm_DLR_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(sink_dsm_DLR_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(sink_dsm_DLR_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_end(sink_dsm_DLR_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(sink_dsm_DLR_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(sink_dsm_DLR_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old_exo(sink_dsm_DLR_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_old(sink_dsm_DLR_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_5) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_0) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_1) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_2) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_3) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_4) <= +inf + 0 <= SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_5) <= +inf +end diff --git a/tests/lp_files/periodical_investment_limit_with_dsm_oemof.lp b/tests/lp_files/periodical_investment_limit_with_dsm_oemof.lp new file mode 100644 index 000000000..f1961322c --- /dev/null +++ b/tests/lp_files/periodical_investment_limit_with_dsm_oemof.lp @@ -0,0 +1,454 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0) ++279.7977897184428 InvestmentFlowBlock_invest(Source_Bus1_1) ++274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2) ++0.5 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0) ++0.5 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_0) ++0.5 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) ++0.5 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) ++0.49019607843137253 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_2) ++0.49019607843137253 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2) ++0.49019607843137253 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_3) ++0.49019607843137253 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_3) ++0.48058439061899266 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_4) ++0.48058439061899266 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_4) ++0.48058439061899266 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_5) ++0.48058439061899266 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_5) ++103.00990099009903 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_0) ++100.990099009901 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_1) ++99.00990099009901 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_2) + +s.t. + +c_u_investment_limit_per_period(0)_: ++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0) ++103.00990099009903 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_0) +<= 400 + +c_u_investment_limit_per_period(1)_: ++279.7977897184428 InvestmentFlowBlock_invest(Source_Bus1_1) ++100.990099009901 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_1) +<= 300 + +c_u_investment_limit_per_period(2)_: ++274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2) ++99.00990099009901 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_2) +<= 200 + +c_e_BusBlock_balance(Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 flow(Bus1_sink_dsm_oemof_0_0) += 0 + +c_e_BusBlock_balance(Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 flow(Bus1_sink_dsm_oemof_0_1) += 0 + +c_e_BusBlock_balance(Bus1_1_2)_: ++1 flow(Source_Bus1_1_2) +-1 flow(Bus1_sink_dsm_oemof_1_2) += 0 + +c_e_BusBlock_balance(Bus1_1_3)_: ++1 flow(Source_Bus1_1_3) +-1 flow(Bus1_sink_dsm_oemof_1_3) += 0 + +c_e_BusBlock_balance(Bus1_2_4)_: ++1 flow(Source_Bus1_2_4) +-1 flow(Bus1_sink_dsm_oemof_2_4) += 0 + +c_e_BusBlock_balance(Bus1_2_5)_: ++1 flow(Source_Bus1_2_5) +-1 flow(Bus1_sink_dsm_oemof_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_1)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) ++1 InvestmentFlowBlock_total(Source_Bus1_1) ++1 InvestmentFlowBlock_old(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(Source_Bus1_2)_: +-1 InvestmentFlowBlock_invest(Source_Bus1_2) +-1 InvestmentFlowBlock_total(Source_Bus1_1) ++1 InvestmentFlowBlock_total(Source_Bus1_2) ++1 InvestmentFlowBlock_old(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_0)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old_end(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_0)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old_exo(Source_Bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_0)_: +-1 InvestmentFlowBlock_old_end(Source_Bus1_0) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_0) ++1 InvestmentFlowBlock_old(Source_Bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_1)_: ++1 InvestmentFlowBlock_old(Source_Bus1_1) +-1 InvestmentFlowBlock_old_end(Source_Bus1_1) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(Source_Bus1_2)_: ++1 InvestmentFlowBlock_old(Source_Bus1_2) +-1 InvestmentFlowBlock_old_end(Source_Bus1_2) +-1 InvestmentFlowBlock_old_exo(Source_Bus1_2) += 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_: ++1 flow(Source_Bus1_0_0) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_: ++1 flow(Source_Bus1_0_1) +-1 InvestmentFlowBlock_total(Source_Bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_1_2)_: ++1 flow(Source_Bus1_1_2) +-1 InvestmentFlowBlock_total(Source_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_1_3)_: ++1 flow(Source_Bus1_1_3) +-1 InvestmentFlowBlock_total(Source_Bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_2_4)_: ++1 flow(Source_Bus1_2_4) +-1 InvestmentFlowBlock_total(Source_Bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(Source_Bus1_2_5)_: ++1 flow(Source_Bus1_2_5) +-1 InvestmentFlowBlock_total(Source_Bus1_2) +<= 0 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(sink_dsm_oemof_0)_: +-1 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) += 50 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(sink_dsm_oemof_1)_: +-1 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_1) +-1 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_old(sink_dsm_oemof_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(sink_dsm_oemof_2)_: +-1 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_2) +-1 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_old(sink_dsm_oemof_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(sink_dsm_oemof_0)_: ++1 SinkDSMOemofInvestmentBlock_old_end(sink_dsm_oemof_0) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(sink_dsm_oemof_1)_: ++1 SinkDSMOemofInvestmentBlock_old_end(sink_dsm_oemof_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_end(sink_dsm_oemof_2)_: +-1 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_old_end(sink_dsm_oemof_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(sink_dsm_oemof_0)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(sink_dsm_oemof_0) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(sink_dsm_oemof_1)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(sink_dsm_oemof_1) += 50 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(sink_dsm_oemof_2)_: ++1 SinkDSMOemofInvestmentBlock_old_exo(sink_dsm_oemof_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(sink_dsm_oemof_0)_: +-1 SinkDSMOemofInvestmentBlock_old_end(sink_dsm_oemof_0) +-1 SinkDSMOemofInvestmentBlock_old_exo(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_old(sink_dsm_oemof_0) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(sink_dsm_oemof_1)_: ++1 SinkDSMOemofInvestmentBlock_old(sink_dsm_oemof_1) +-1 SinkDSMOemofInvestmentBlock_old_end(sink_dsm_oemof_1) +-1 SinkDSMOemofInvestmentBlock_old_exo(sink_dsm_oemof_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(sink_dsm_oemof_2)_: ++1 SinkDSMOemofInvestmentBlock_old(sink_dsm_oemof_2) +-1 SinkDSMOemofInvestmentBlock_old_end(sink_dsm_oemof_2) +-1 SinkDSMOemofInvestmentBlock_old_exo(sink_dsm_oemof_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(sink_dsm_oemof_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_0) += 0 + +c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(sink_dsm_oemof_1)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(sink_dsm_oemof_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_2) += 0 + +c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(sink_dsm_oemof_3)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_3) += 0 + +c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(sink_dsm_oemof_4)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_4) += 0 + +c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(sink_dsm_oemof_5)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_5) += 0 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(sink_dsm_oemof_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0) +-1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_0) ++1 flow(Bus1_sink_dsm_oemof_0_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_0) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(sink_dsm_oemof_0_1)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) ++1 flow(Bus1_sink_dsm_oemof_0_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_1) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(sink_dsm_oemof_1_2)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2) ++1 flow(Bus1_sink_dsm_oemof_1_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_2) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(sink_dsm_oemof_1_3)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_3) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_3) ++1 flow(Bus1_sink_dsm_oemof_1_3) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_3) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(sink_dsm_oemof_2_4)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_4) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_4) ++1 flow(Bus1_sink_dsm_oemof_2_4) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_4) += 1 + +c_e_SinkDSMOemofInvestmentBlock_input_output_relation(sink_dsm_oemof_2_5)_: +-1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_5) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_5) ++1 flow(Bus1_sink_dsm_oemof_2_5) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_5) += 1 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(sink_dsm_oemof_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_0) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(sink_dsm_oemof_0_1)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(sink_dsm_oemof_1_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_2) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(sink_dsm_oemof_1_3)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_3) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(sink_dsm_oemof_2_4)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_4) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(sink_dsm_oemof_2_5)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_5) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(sink_dsm_oemof_0_0)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_0) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(sink_dsm_oemof_0_1)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_1) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(sink_dsm_oemof_1_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_2) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(sink_dsm_oemof_1_3)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_3) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_1) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_3) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(sink_dsm_oemof_2_4)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_4) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_4) +<= 0 + +c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(sink_dsm_oemof_2_5)_: ++1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_5) +-0.5 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_5) +<= 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(sink_dsm_oemof_0)_: +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_0) ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(sink_dsm_oemof_2)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_2) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2) ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_3) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_3) += 0 + +c_e_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(sink_dsm_oemof_4)_: ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_4) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_4) ++1 SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_5) +-1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_5) += 0 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(sink_dsm_oemof_0)_: ++1 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) +<= 1000 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(sink_dsm_oemof_1)_: ++1 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_1) +<= 1000 + +c_u_SinkDSMOemofInvestmentBlock_overall_dsm_maximum(sink_dsm_oemof_2)_: ++1 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_2) +<= 1000 + +c_l_SinkDSMOemofInvestmentBlock_overall_minimum(sink_dsm_oemof)_: ++1 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_2) +>= 200 + +bounds + 0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_invest(Source_Bus1_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_5) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_5) <= +inf + 33 <= SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_0) <= 100 + 33 <= SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_1) <= 100 + 33 <= SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_2) <= 100 + 0 <= flow(Source_Bus1_0_0) <= +inf + 0 <= flow(Bus1_sink_dsm_oemof_0_0) <= +inf + 0 <= flow(Source_Bus1_0_1) <= +inf + 0 <= flow(Bus1_sink_dsm_oemof_0_1) <= +inf + 0 <= flow(Source_Bus1_1_2) <= +inf + 0 <= flow(Bus1_sink_dsm_oemof_1_2) <= +inf + 0 <= flow(Source_Bus1_1_3) <= +inf + 0 <= flow(Bus1_sink_dsm_oemof_1_3) <= +inf + 0 <= flow(Source_Bus1_2_4) <= +inf + 0 <= flow(Bus1_sink_dsm_oemof_2_4) <= +inf + 0 <= flow(Source_Bus1_2_5) <= +inf + 0 <= flow(Bus1_sink_dsm_oemof_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_total(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(Source_Bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(sink_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(sink_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(sink_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(sink_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_end(sink_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(sink_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(sink_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old_exo(sink_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_old(sink_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_0) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_1) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_2) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_3) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_4) <= +inf + 0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_5) <= +inf +end diff --git a/tests/lp_files/piecewise_linear_converter_cc.lp b/tests/lp_files/piecewise_linear_converter_cc.lp new file mode 100644 index 000000000..22fbcc463 --- /dev/null +++ b/tests/lp_files/piecewise_linear_converter_cc.lp @@ -0,0 +1,295 @@ +\* Source Pyomo model name=Model *\ + +min +objective: +1 flow(gasBus_pwltf_0_0) +1 flow(gasBus_pwltf_0_1) +1 flow(gasBus_pwltf_0_2) + +s.t. + +c_e_BusBlock_balance(gasBus_0_0)_: +1 flow(gasBus_pwltf_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: +1 flow(gasBus_pwltf_0_1) += 0 + +c_e_BusBlock_balance(gasBus_0_2)_: +1 flow(gasBus_pwltf_0_2) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: +1 flow(pwltf_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: +1 flow(pwltf_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_0_2)_: +1 flow(pwltf_electricityBus_0_2) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_0_0)_: +-1 flow(gasBus_pwltf_0_0) +1 PiecewiseLinearConverterBlock_inflow(pwltf_0) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_0_1)_: +-1 flow(gasBus_pwltf_0_1) +1 PiecewiseLinearConverterBlock_inflow(pwltf_1) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_0_2)_: +-1 flow(gasBus_pwltf_0_2) +1 PiecewiseLinearConverterBlock_inflow(pwltf_2) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_0_0)_: +-1 flow(pwltf_electricityBus_0_0) +1 PiecewiseLinearConverterBlock_outflow(pwltf_0) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_0_1)_: +-1 flow(pwltf_electricityBus_0_1) +1 PiecewiseLinearConverterBlock_outflow(pwltf_1) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_0_2)_: +-1 flow(pwltf_electricityBus_0_2) +1 PiecewiseLinearConverterBlock_outflow(pwltf_2) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint1_: +1 PiecewiseLinearConverterBlock_inflow(pwltf_0) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint2_: +1 PiecewiseLinearConverterBlock_outflow(pwltf_0) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint3_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(4) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(5) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(1) += 1 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint4(1)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(1) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint4(2)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(2) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint4(3)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(3) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint4(4)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(4) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint4(5)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(5) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(4) +<= 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint5_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(1) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint1_: +1 PiecewiseLinearConverterBlock_inflow(pwltf_1) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint2_: +1 PiecewiseLinearConverterBlock_outflow(pwltf_1) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint3_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(4) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(5) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(1) += 1 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint4(1)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(1) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint4(2)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(2) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint4(3)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(3) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint4(4)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(4) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint4(5)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(5) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(4) +<= 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint5_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(1) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint1_: +1 PiecewiseLinearConverterBlock_inflow(pwltf_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint2_: +1 PiecewiseLinearConverterBlock_outflow(pwltf_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint3_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(4) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(5) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(1) += 1 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint4(1)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(1) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint4(2)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(2) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint4(3)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(3) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint4(4)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(4) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint4(5)_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(5) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(4) +<= 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint5_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(1) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(4) += 1 + +bounds +0 <= flow(gasBus_pwltf_0_0) <= 100 +0 <= flow(gasBus_pwltf_0_1) <= 100 +0 <= flow(gasBus_pwltf_0_2) <= 100 +0 <= flow(pwltf_electricityBus_0_0) <= +inf +0 <= flow(pwltf_electricityBus_0_1) <= +inf +0 <= flow(pwltf_electricityBus_0_2) <= +inf +0 <= PiecewiseLinearConverterBlock_inflow(pwltf_0) <= 100 +0 <= PiecewiseLinearConverterBlock_inflow(pwltf_1) <= 100 +0 <= PiecewiseLinearConverterBlock_inflow(pwltf_2) <= 100 +0 <= PiecewiseLinearConverterBlock_outflow(pwltf_0) <= 10000 +0 <= PiecewiseLinearConverterBlock_outflow(pwltf_1) <= 10000 +0 <= PiecewiseLinearConverterBlock_outflow(pwltf_2) <= 10000 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(2) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(3) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(4) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(5) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(1) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(1) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(2) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(3) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(4) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(2) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(3) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(4) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(5) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(1) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(1) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(2) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(3) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(4) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(2) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(3) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(4) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(5) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(1) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(1) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(2) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(3) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(4) <= 1 +binary +PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(1) +PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(2) +PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(3) +PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(4) +PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(1) +PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(2) +PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(3) +PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(4) +PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(1) +PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(2) +PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(3) +PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(4) +end diff --git a/tests/lp_files/piecewise_linear_converter_cc_multi_period.lp b/tests/lp_files/piecewise_linear_converter_cc_multi_period.lp new file mode 100644 index 000000000..7a0acc0bc --- /dev/null +++ b/tests/lp_files/piecewise_linear_converter_cc_multi_period.lp @@ -0,0 +1,580 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++1 flow(gasBus_pwltf_0_0) ++1 flow(gasBus_pwltf_0_1) ++0.9803921568627451 flow(gasBus_pwltf_1_2) ++0.9803921568627451 flow(gasBus_pwltf_1_3) ++0.9611687812379853 flow(gasBus_pwltf_2_4) ++0.9611687812379853 flow(gasBus_pwltf_2_5) + +s.t. + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_pwltf_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_pwltf_0_1) += 0 + +c_e_BusBlock_balance(gasBus_1_2)_: ++1 flow(gasBus_pwltf_1_2) += 0 + +c_e_BusBlock_balance(gasBus_1_3)_: ++1 flow(gasBus_pwltf_1_3) += 0 + +c_e_BusBlock_balance(gasBus_2_4)_: ++1 flow(gasBus_pwltf_2_4) += 0 + +c_e_BusBlock_balance(gasBus_2_5)_: ++1 flow(gasBus_pwltf_2_5) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(pwltf_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(pwltf_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(pwltf_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(pwltf_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(pwltf_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(pwltf_electricityBus_2_5) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_0_0)_: +-1 flow(gasBus_pwltf_0_0) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_0) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_0_1)_: +-1 flow(gasBus_pwltf_0_1) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_1) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_1_2)_: +-1 flow(gasBus_pwltf_1_2) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_2) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_1_3)_: +-1 flow(gasBus_pwltf_1_3) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_3) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_2_4)_: +-1 flow(gasBus_pwltf_2_4) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_4) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_2_5)_: +-1 flow(gasBus_pwltf_2_5) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_5) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_0_0)_: +-1 flow(pwltf_electricityBus_0_0) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_0) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_0_1)_: +-1 flow(pwltf_electricityBus_0_1) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_1) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_1_2)_: +-1 flow(pwltf_electricityBus_1_2) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_2) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_1_3)_: +-1 flow(pwltf_electricityBus_1_3) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_3) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_2_4)_: +-1 flow(pwltf_electricityBus_2_4) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_4) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_2_5)_: +-1 flow(pwltf_electricityBus_2_5) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_0) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_0) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint3_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(1) += 1 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint4(1)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(1) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint4(2)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(2) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint4(3)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(3) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint4(4)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(4) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint4(5)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(5) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(4) +<= 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_constraint5_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_1) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_1) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint3_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(1) += 1 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint4(1)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(1) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint4(2)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(2) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint4(3)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(3) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint4(4)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(4) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint4(5)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(5) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(4) +<= 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_constraint5_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint3_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(1) += 1 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint4(1)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(1) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint4(2)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(2) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint4(3)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(3) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint4(4)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(4) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint4(5)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(5) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(4) +<= 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_constraint5_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_3) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_3) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_constraint3_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(1) += 1 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_constraint4(1)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(1) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_constraint4(2)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(2) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_constraint4(3)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(3) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_constraint4(4)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(4) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_constraint4(5)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(5) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(4) +<= 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_constraint5_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_4) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_4) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_constraint3_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(1) += 1 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_constraint4(1)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(1) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_constraint4(2)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(2) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_constraint4(3)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(3) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_constraint4(4)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(4) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_constraint4(5)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(5) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(4) +<= 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_constraint5_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_5) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_5) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_constraint3_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(1) += 1 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_constraint4(1)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(1) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_constraint4(2)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(2) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_constraint4(3)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(3) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_constraint4(4)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(4) +<= 0 + +c_u_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_constraint4(5)_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(5) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(4) +<= 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_constraint5_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(4) += 1 + +bounds + 0 <= flow(gasBus_pwltf_0_0) <= 100 + 0 <= flow(gasBus_pwltf_0_1) <= 100 + 0 <= flow(gasBus_pwltf_1_2) <= 100 + 0 <= flow(gasBus_pwltf_1_3) <= 100 + 0 <= flow(gasBus_pwltf_2_4) <= 100 + 0 <= flow(gasBus_pwltf_2_5) <= 100 + 0 <= flow(pwltf_electricityBus_0_0) <= +inf + 0 <= flow(pwltf_electricityBus_0_1) <= +inf + 0 <= flow(pwltf_electricityBus_1_2) <= +inf + 0 <= flow(pwltf_electricityBus_1_3) <= +inf + 0 <= flow(pwltf_electricityBus_2_4) <= +inf + 0 <= flow(pwltf_electricityBus_2_5) <= +inf + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_0) <= 100 + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_1) <= 100 + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_2) <= 100 + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_3) <= 100 + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_4) <= 100 + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_5) <= 100 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_0) <= 10000 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_1) <= 10000 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_2) <= 10000 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_3) <= 10000 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_4) <= 10000 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_5) <= 10000 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_lambda(1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(4) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_lambda(1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(4) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_lambda(1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(4) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_lambda(1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(4) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_lambda(1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(4) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_lambda(1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(4) <= 1 +binary + PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_0)_CC_bin_y(4) + PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_1)_CC_bin_y(4) + PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_2)_CC_bin_y(4) + PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_3)_CC_bin_y(4) + PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_4)_CC_bin_y(4) + PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_5)_CC_bin_y(4) +end diff --git a/tests/lp_files/piecewise_linear_converter_dcc.lp b/tests/lp_files/piecewise_linear_converter_dcc.lp new file mode 100644 index 000000000..70ece2d09 --- /dev/null +++ b/tests/lp_files/piecewise_linear_converter_dcc.lp @@ -0,0 +1,286 @@ +\* Source Pyomo model name=Model *\ + +min +objective: +1 flow(gasBus_pwltf_0_0) +1 flow(gasBus_pwltf_0_1) +1 flow(gasBus_pwltf_0_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: +1 flow(pwltf_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: +1 flow(pwltf_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_0_2)_: +1 flow(pwltf_electricityBus_0_2) += 0 + +c_e_BusBlock_balance(gasBus_0_0)_: +1 flow(gasBus_pwltf_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: +1 flow(gasBus_pwltf_0_1) += 0 + +c_e_BusBlock_balance(gasBus_0_2)_: +1 flow(gasBus_pwltf_0_2) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_0_0)_: +-1 flow(gasBus_pwltf_0_0) +1 PiecewiseLinearConverterBlock_inflow(pwltf_0) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_0_1)_: +-1 flow(gasBus_pwltf_0_1) +1 PiecewiseLinearConverterBlock_inflow(pwltf_1) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_0_2)_: +-1 flow(gasBus_pwltf_0_2) +1 PiecewiseLinearConverterBlock_inflow(pwltf_2) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_0_0)_: +-1 flow(pwltf_electricityBus_0_0) +1 PiecewiseLinearConverterBlock_outflow(pwltf_0) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_0_1)_: +-1 flow(pwltf_electricityBus_0_1) +1 PiecewiseLinearConverterBlock_outflow(pwltf_1) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_0_2)_: +-1 flow(pwltf_electricityBus_0_2) +1 PiecewiseLinearConverterBlock_outflow(pwltf_2) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint1_: +1 PiecewiseLinearConverterBlock_inflow(pwltf_0) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_3) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_4) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint2_: +1 PiecewiseLinearConverterBlock_outflow(pwltf_0) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_3) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_4) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint3(1)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_1) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint3(2)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(2) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint3(3)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_4) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(3) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint3(4)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_5) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(4) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint4_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(1) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint1_: +1 PiecewiseLinearConverterBlock_inflow(pwltf_1) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_3) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_4) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint2_: +1 PiecewiseLinearConverterBlock_outflow(pwltf_1) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_3) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_4) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint3(1)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_1) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint3(2)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(2) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint3(3)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_4) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(3) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint3(4)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_5) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(4) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint4_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(1) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint1_: +1 PiecewiseLinearConverterBlock_inflow(pwltf_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_3) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_4) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint2_: +1 PiecewiseLinearConverterBlock_outflow(pwltf_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_3) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_4) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint3(1)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_1) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint3(2)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(2) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint3(3)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_4) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(3) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint3(4)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_5) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(4) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint4_: +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(1) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(2) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(3) +1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(4) += 1 + +bounds +0 <= flow(gasBus_pwltf_0_0) <= 100 +0 <= flow(gasBus_pwltf_0_1) <= 100 +0 <= flow(gasBus_pwltf_0_2) <= 100 +0 <= flow(pwltf_electricityBus_0_0) <= +inf +0 <= flow(pwltf_electricityBus_0_1) <= +inf +0 <= flow(pwltf_electricityBus_0_2) <= +inf +0 <= PiecewiseLinearConverterBlock_inflow(pwltf_0) <= 100 +0 <= PiecewiseLinearConverterBlock_inflow(pwltf_1) <= 100 +0 <= PiecewiseLinearConverterBlock_inflow(pwltf_2) <= 100 +0 <= PiecewiseLinearConverterBlock_outflow(pwltf_0) <= 10000 +0 <= PiecewiseLinearConverterBlock_outflow(pwltf_1) <= 10000 +0 <= PiecewiseLinearConverterBlock_outflow(pwltf_2) <= 10000 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_2) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_2) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_3) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_3) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_4) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_4) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_5) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(1) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_1) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(2) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(3) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(4) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_2) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_2) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_3) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_3) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_4) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_4) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_5) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(1) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_1) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(2) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(3) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(4) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_2) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_2) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_3) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_3) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_4) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_4) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_5) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(1) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_1) <= +inf +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(2) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(3) <= 1 +0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(4) <= 1 +binary +PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(1) +PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(2) +PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(3) +PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(4) +PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(1) +PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(2) +PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(3) +PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(4) +PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(1) +PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(2) +PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(3) +PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(4) +end diff --git a/tests/lp_files/piecewise_linear_converter_dcc_multi_period.lp b/tests/lp_files/piecewise_linear_converter_dcc_multi_period.lp new file mode 100644 index 000000000..b724b869c --- /dev/null +++ b/tests/lp_files/piecewise_linear_converter_dcc_multi_period.lp @@ -0,0 +1,562 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++1 flow(gasBus_pwltf_0_0) ++1 flow(gasBus_pwltf_0_1) ++0.9803921568627451 flow(gasBus_pwltf_1_2) ++0.9803921568627451 flow(gasBus_pwltf_1_3) ++0.9611687812379853 flow(gasBus_pwltf_2_4) ++0.9611687812379853 flow(gasBus_pwltf_2_5) + +s.t. + +c_e_BusBlock_balance(gasBus_0_0)_: ++1 flow(gasBus_pwltf_0_0) += 0 + +c_e_BusBlock_balance(gasBus_0_1)_: ++1 flow(gasBus_pwltf_0_1) += 0 + +c_e_BusBlock_balance(gasBus_1_2)_: ++1 flow(gasBus_pwltf_1_2) += 0 + +c_e_BusBlock_balance(gasBus_1_3)_: ++1 flow(gasBus_pwltf_1_3) += 0 + +c_e_BusBlock_balance(gasBus_2_4)_: ++1 flow(gasBus_pwltf_2_4) += 0 + +c_e_BusBlock_balance(gasBus_2_5)_: ++1 flow(gasBus_pwltf_2_5) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(pwltf_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(pwltf_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(pwltf_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(pwltf_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(pwltf_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(pwltf_electricityBus_2_5) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_0_0)_: +-1 flow(gasBus_pwltf_0_0) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_0) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_0_1)_: +-1 flow(gasBus_pwltf_0_1) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_1) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_1_2)_: +-1 flow(gasBus_pwltf_1_2) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_2) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_1_3)_: +-1 flow(gasBus_pwltf_1_3) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_3) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_2_4)_: +-1 flow(gasBus_pwltf_2_4) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_4) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_in(pwltf_2_5)_: +-1 flow(gasBus_pwltf_2_5) ++1 PiecewiseLinearConverterBlock_inflow(pwltf_5) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_0_0)_: +-1 flow(pwltf_electricityBus_0_0) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_0) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_0_1)_: +-1 flow(pwltf_electricityBus_0_1) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_1) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_1_2)_: +-1 flow(pwltf_electricityBus_1_2) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_2) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_1_3)_: +-1 flow(pwltf_electricityBus_1_3) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_3) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_2_4)_: +-1 flow(pwltf_electricityBus_2_4) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_4) += 0 + +c_e_PiecewiseLinearConverterBlock_equate_out(pwltf_2_5)_: +-1 flow(pwltf_electricityBus_2_5) ++1 PiecewiseLinearConverterBlock_outflow(pwltf_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_0) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_3) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_4) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_0) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_3) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_4) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint3(1)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_1) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint3(2)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(2) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint3(3)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(3) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint3(4)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(4) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_constraint4_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_1) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_3) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_4) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_1) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_3) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_4) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint3(1)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_1) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint3(2)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(2) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint3(3)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(3) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint3(4)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(4) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_constraint4_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_3) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_4) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_3) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_4) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint3(1)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_1) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint3(2)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(2) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint3(3)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(3) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint3(4)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(4) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_constraint4_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_3) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(1_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(2_2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(2_3) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(3_3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(3_4) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(4_4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_3) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(1_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(2_2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(2_3) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(3_3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(3_4) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(4_4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_constraint3(1)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(1_2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(1_1) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_constraint3(2)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(2_2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(2_3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(2) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_constraint3(3)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(3_3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(3_4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(3) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_constraint3(4)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(4_4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(4_5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(4) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_constraint4_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_4) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(1_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(2_2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(2_3) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(3_3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(3_4) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(4_4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_4) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(1_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(2_2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(2_3) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(3_3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(3_4) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(4_4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_constraint3(1)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(1_2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(1_1) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_constraint3(2)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(2_2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(2_3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(2) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_constraint3(3)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(3_3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(3_4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(3) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_constraint3(4)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(4_4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(4_5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(4) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_constraint4_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(4) += 1 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_constraint1_: ++1 PiecewiseLinearConverterBlock_inflow(pwltf_5) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(1_2) +-25 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(2_2) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(2_3) +-50 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(3_3) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(3_4) +-75 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(4_4) +-100 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_constraint2_: ++1 PiecewiseLinearConverterBlock_outflow(pwltf_5) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(1_2) +-625 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(2_2) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(2_3) +-2500 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(3_3) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(3_4) +-5625 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(4_4) +-10000 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(4_5) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_constraint3(1)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(1_2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(1) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(1_1) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_constraint3(2)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(2_2) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(2_3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(2) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_constraint3(3)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(3_3) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(3_4) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(3) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_constraint3(4)_: +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(4_4) +-1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(4_5) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(4) += 0 + +c_e_PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_constraint4_: ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(1) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(2) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(3) ++1 PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(4) += 1 + +bounds + 0 <= flow(gasBus_pwltf_0_0) <= 100 + 0 <= flow(gasBus_pwltf_0_1) <= 100 + 0 <= flow(gasBus_pwltf_1_2) <= 100 + 0 <= flow(gasBus_pwltf_1_3) <= 100 + 0 <= flow(gasBus_pwltf_2_4) <= 100 + 0 <= flow(gasBus_pwltf_2_5) <= 100 + 0 <= flow(pwltf_electricityBus_0_0) <= +inf + 0 <= flow(pwltf_electricityBus_0_1) <= +inf + 0 <= flow(pwltf_electricityBus_1_2) <= +inf + 0 <= flow(pwltf_electricityBus_1_3) <= +inf + 0 <= flow(pwltf_electricityBus_2_4) <= +inf + 0 <= flow(pwltf_electricityBus_2_5) <= +inf + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_0) <= 100 + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_1) <= 100 + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_2) <= 100 + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_3) <= 100 + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_4) <= 100 + 0 <= PiecewiseLinearConverterBlock_inflow(pwltf_5) <= 100 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_0) <= 10000 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_1) <= 10000 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_2) <= 10000 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_3) <= 10000 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_4) <= 10000 + 0 <= PiecewiseLinearConverterBlock_outflow(pwltf_5) <= 10000 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(2_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(3_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(4_5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_lambda(1_1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(4) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(2_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(3_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(4_5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_lambda(1_1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(4) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(2_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(3_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(4_5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_lambda(1_1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(4) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(1_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(2_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(2_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(3_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(3_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(4_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(4_5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_lambda(1_1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(4) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(1_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(2_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(2_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(3_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(3_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(4_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(4_5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_lambda(1_1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(4) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(1_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(2_2) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(2_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(3_3) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(3_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(4_4) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(4_5) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(1) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_lambda(1_1) <= +inf + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(2) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(3) <= 1 + 0 <= PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(4) <= 1 +binary + PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_0)_DCC_bin_y(4) + PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_1)_DCC_bin_y(4) + PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_2)_DCC_bin_y(4) + PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_3)_DCC_bin_y(4) + PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_4)_DCC_bin_y(4) + PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(1) + PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(2) + PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(3) + PiecewiseLinearConverterBlock_piecewise(pwltf_5)_DCC_bin_y(4) +end diff --git a/tests/lp_files/piecewise_linear_transformer_cc.lp b/tests/lp_files/piecewise_linear_transformer_cc.lp deleted file mode 100644 index a780e1e23..000000000 --- a/tests/lp_files/piecewise_linear_transformer_cc.lp +++ /dev/null @@ -1,298 +0,0 @@ -\* Source Pyomo model name=Model *\ - -min -objective: -+1 flow(gasBus_pwltf_0) -+1 flow(gasBus_pwltf_1) -+1 flow(gasBus_pwltf_2) - -s.t. - -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(pwltf_electricityBus_0) -= 0 - -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(pwltf_electricityBus_1) -= 0 - -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(pwltf_electricityBus_2) -= 0 - -c_e_BusBlock_balance(gasBus_0)_: -+1 flow(gasBus_pwltf_0) -= 0 - -c_e_BusBlock_balance(gasBus_1)_: -+1 flow(gasBus_pwltf_1) -= 0 - -c_e_BusBlock_balance(gasBus_2)_: -+1 flow(gasBus_pwltf_2) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_0)_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_0) --1 flow(gasBus_pwltf_0) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_1)_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_1) --1 flow(gasBus_pwltf_1) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_2)_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_2) --1 flow(gasBus_pwltf_2) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0)_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_0) --1 flow(pwltf_electricityBus_0) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_1)_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_1) --1 flow(pwltf_electricityBus_1) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_2)_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_2) --1 flow(pwltf_electricityBus_2) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint1_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_0) --25 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(2) --50 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(3) --75 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(4) --100 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint2_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_0) --625 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(2) --2500 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(3) --5625 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(4) --10000 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint3_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(4) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(5) -= 1 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint4(1)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(1) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint4(2)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(1) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(2) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint4(3)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(2) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(3) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint4(4)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(3) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(4) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(4) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint4(5)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(4) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(5) -<= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint5_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(4) -= 1 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint1_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_1) --25 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(2) --50 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(3) --75 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(4) --100 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint2_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_1) --625 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(2) --2500 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(3) --5625 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(4) --10000 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint3_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(4) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(5) -= 1 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint4(1)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(1) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint4(2)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(1) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(2) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint4(3)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(2) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(3) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint4(4)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(3) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(4) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(4) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint4(5)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(4) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(5) -<= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint5_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(4) -= 1 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint1_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_2) --25 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(2) --50 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(3) --75 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(4) --100 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint2_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_2) --625 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(2) --2500 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(3) --5625 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(4) --10000 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint3_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(4) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(5) -= 1 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint4(1)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(1) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint4(2)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(1) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(2) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint4(3)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(2) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(3) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint4(4)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(3) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(4) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(4) -<= 0 - -c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint4(5)_: --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(4) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(5) -<= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint5_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(4) -= 1 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - -bounds - 0 <= flow(gasBus_pwltf_0) <= 100 - 0 <= flow(gasBus_pwltf_1) <= 100 - 0 <= flow(gasBus_pwltf_2) <= 100 - 0 <= flow(pwltf_electricityBus_0) <= +inf - 0 <= flow(pwltf_electricityBus_1) <= +inf - 0 <= flow(pwltf_electricityBus_2) <= +inf - 0 <= PiecewiseLinearTransformerBlock_inflow(pwltf_0) <= 100 - 0 <= PiecewiseLinearTransformerBlock_inflow(pwltf_1) <= 100 - 0 <= PiecewiseLinearTransformerBlock_inflow(pwltf_2) <= 100 - 0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_0) <= 10000 - 0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_1) <= 10000 - 0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_2) <= 10000 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(1) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(2) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(3) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(4) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(5) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(1) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(2) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(3) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(4) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(1) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(2) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(3) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(4) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(5) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(1) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(2) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(3) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(4) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(1) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(2) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(3) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(4) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(5) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(1) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(2) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(3) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(4) <= 1 -binary - PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(1) - PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(2) - PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(3) - PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(4) - PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(1) - PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(2) - PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(3) - PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(4) - PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(1) - PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(2) - PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(3) - PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(4) -end diff --git a/tests/lp_files/piecewise_linear_transformer_dcc.lp b/tests/lp_files/piecewise_linear_transformer_dcc.lp deleted file mode 100644 index 600d617b2..000000000 --- a/tests/lp_files/piecewise_linear_transformer_dcc.lp +++ /dev/null @@ -1,289 +0,0 @@ -\* Source Pyomo model name=Model *\ - -min -objective: -+1 flow(gasBus_pwltf_0) -+1 flow(gasBus_pwltf_1) -+1 flow(gasBus_pwltf_2) - -s.t. - -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(pwltf_electricityBus_0) -= 0 - -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(pwltf_electricityBus_1) -= 0 - -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(pwltf_electricityBus_2) -= 0 - -c_e_BusBlock_balance(gasBus_0)_: -+1 flow(gasBus_pwltf_0) -= 0 - -c_e_BusBlock_balance(gasBus_1)_: -+1 flow(gasBus_pwltf_1) -= 0 - -c_e_BusBlock_balance(gasBus_2)_: -+1 flow(gasBus_pwltf_2) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_0)_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_0) --1 flow(gasBus_pwltf_0) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_1)_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_1) --1 flow(gasBus_pwltf_1) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_2)_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_2) --1 flow(gasBus_pwltf_2) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0)_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_0) --1 flow(pwltf_electricityBus_0) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_1)_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_1) --1 flow(pwltf_electricityBus_1) -= 0 - -c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_2)_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_2) --1 flow(pwltf_electricityBus_2) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint1_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_0) --25 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(1_2) --25 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(2_2) --50 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(2_3) --50 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(3_3) --75 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(3_4) --75 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(4_4) --100 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(4_5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint2_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_0) --625 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(1_2) --625 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(2_2) --2500 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(2_3) --2500 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(3_3) --5625 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(3_4) --5625 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(4_4) --10000 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(4_5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint3(1)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(1) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(1_1) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(1_2) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint3(2)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(2) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(2_2) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(2_3) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint3(3)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(3) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(3_3) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(3_4) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint3(4)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(4) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(4_4) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(4_5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint4_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(4) -= 1 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint1_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_1) --25 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(1_2) --25 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(2_2) --50 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(2_3) --50 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(3_3) --75 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(3_4) --75 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(4_4) --100 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(4_5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint2_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_1) --625 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(1_2) --625 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(2_2) --2500 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(2_3) --2500 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(3_3) --5625 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(3_4) --5625 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(4_4) --10000 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(4_5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint3(1)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(1) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(1_1) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(1_2) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint3(2)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(2) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(2_2) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(2_3) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint3(3)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(3) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(3_3) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(3_4) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint3(4)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(4) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(4_4) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(4_5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint4_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(4) -= 1 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint1_: -+1 PiecewiseLinearTransformerBlock_inflow(pwltf_2) --25 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(1_2) --25 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(2_2) --50 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(2_3) --50 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(3_3) --75 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(3_4) --75 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(4_4) --100 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(4_5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint2_: -+1 PiecewiseLinearTransformerBlock_outflow(pwltf_2) --625 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(1_2) --625 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(2_2) --2500 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(2_3) --2500 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(3_3) --5625 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(3_4) --5625 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(4_4) --10000 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(4_5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint3(1)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(1) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(1_1) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(1_2) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint3(2)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(2) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(2_2) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(2_3) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint3(3)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(3) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(3_3) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(3_4) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint3(4)_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(4) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(4_4) --1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(4_5) -= 0 - -c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint4_: -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(1) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(2) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(3) -+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(4) -= 1 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - -bounds - 0 <= flow(gasBus_pwltf_0) <= 100 - 0 <= flow(gasBus_pwltf_1) <= 100 - 0 <= flow(gasBus_pwltf_2) <= 100 - 0 <= flow(pwltf_electricityBus_0) <= +inf - 0 <= flow(pwltf_electricityBus_1) <= +inf - 0 <= flow(pwltf_electricityBus_2) <= +inf - 0 <= PiecewiseLinearTransformerBlock_inflow(pwltf_0) <= 100 - 0 <= PiecewiseLinearTransformerBlock_inflow(pwltf_1) <= 100 - 0 <= PiecewiseLinearTransformerBlock_inflow(pwltf_2) <= 100 - 0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_0) <= 10000 - 0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_1) <= 10000 - 0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_2) <= 10000 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(1_1) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(1_2) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(2_2) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(2_3) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(3_3) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(3_4) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(4_4) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(4_5) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(1) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(2) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(3) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(4) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(1_1) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(1_2) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(2_2) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(2_3) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(3_3) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(3_4) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(4_4) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(4_5) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(1) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(2) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(3) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(4) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(1_1) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(1_2) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(2_2) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(2_3) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(3_3) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(3_4) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(4_4) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(4_5) <= +inf - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(1) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(2) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(3) <= 1 - 0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(4) <= 1 -binary - PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(1) - PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(2) - PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(3) - PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(4) - PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(1) - PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(2) - PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(3) - PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(4) - PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(1) - PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(2) - PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(3) - PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(4) -end diff --git a/tests/lp_files/shared_limit.lp b/tests/lp_files/shared_limit.lp index c2f566bcb..0ff745a60 100644 --- a/tests/lp_files/shared_limit.lp +++ b/tests/lp_files/shared_limit.lp @@ -24,67 +24,67 @@ c_e_limit_storage_constraint(2)_: -1 limit_storage(2) = 0 -c_e_BusBlock_balance(bus_0)_: --1 flow(bus_storage1_0) --1 flow(bus_storage2_0) -+1 flow(storage1_bus_0) -+1 flow(storage2_bus_0) +c_e_BusBlock_balance(bus_0_0)_: ++1 flow(storage1_bus_0_0) ++1 flow(storage2_bus_0_0) +-1 flow(bus_storage1_0_0) +-1 flow(bus_storage2_0_0) = 0 -c_e_BusBlock_balance(bus_1)_: --1 flow(bus_storage1_1) --1 flow(bus_storage2_1) -+1 flow(storage1_bus_1) -+1 flow(storage2_bus_1) +c_e_BusBlock_balance(bus_0_1)_: ++1 flow(storage1_bus_0_1) ++1 flow(storage2_bus_0_1) +-1 flow(bus_storage1_0_1) +-1 flow(bus_storage2_0_1) = 0 -c_e_BusBlock_balance(bus_2)_: --1 flow(bus_storage1_2) --1 flow(bus_storage2_2) -+1 flow(storage1_bus_2) -+1 flow(storage2_bus_2) +c_e_BusBlock_balance(bus_0_2)_: ++1 flow(storage1_bus_0_2) ++1 flow(storage2_bus_0_2) +-1 flow(bus_storage1_0_2) +-1 flow(bus_storage2_0_2) = 0 -c_e_GenericStorageBlock_balance(storage1_0)_: +c_e_GenericStorageBlock_balance(storage1_0_0)_: -1 GenericStorageBlock_storage_content(storage1_0) +1 GenericStorageBlock_storage_content(storage1_1) --1 flow(bus_storage1_0) -+1 flow(storage1_bus_0) ++1 flow(storage1_bus_0_0) +-1 flow(bus_storage1_0_0) = 0 -c_e_GenericStorageBlock_balance(storage1_1)_: +c_e_GenericStorageBlock_balance(storage1_0_1)_: -1 GenericStorageBlock_storage_content(storage1_1) +1 GenericStorageBlock_storage_content(storage1_2) --1 flow(bus_storage1_1) -+1 flow(storage1_bus_1) ++1 flow(storage1_bus_0_1) +-1 flow(bus_storage1_0_1) = 0 -c_e_GenericStorageBlock_balance(storage1_2)_: +c_e_GenericStorageBlock_balance(storage1_0_2)_: -1 GenericStorageBlock_storage_content(storage1_2) ++1 flow(storage1_bus_0_2) +-1 flow(bus_storage1_0_2) +1 GenericStorageBlock_storage_content(storage1_3) --1 flow(bus_storage1_2) -+1 flow(storage1_bus_2) = 0 -c_e_GenericStorageBlock_balance(storage2_0)_: +c_e_GenericStorageBlock_balance(storage2_0_0)_: -1 GenericStorageBlock_storage_content(storage2_0) +1 GenericStorageBlock_storage_content(storage2_1) --1 flow(bus_storage2_0) -+1 flow(storage2_bus_0) ++1 flow(storage2_bus_0_0) +-1 flow(bus_storage2_0_0) = 0 -c_e_GenericStorageBlock_balance(storage2_1)_: +c_e_GenericStorageBlock_balance(storage2_0_1)_: -1 GenericStorageBlock_storage_content(storage2_1) +1 GenericStorageBlock_storage_content(storage2_2) --1 flow(bus_storage2_1) -+1 flow(storage2_bus_1) ++1 flow(storage2_bus_0_1) +-1 flow(bus_storage2_0_1) = 0 -c_e_GenericStorageBlock_balance(storage2_2)_: +c_e_GenericStorageBlock_balance(storage2_0_2)_: -1 GenericStorageBlock_storage_content(storage2_2) ++1 flow(storage2_bus_0_2) +-1 flow(bus_storage2_0_2) +1 GenericStorageBlock_storage_content(storage2_3) --1 flow(bus_storage2_2) -+1 flow(storage2_bus_2) = 0 c_e_GenericStorageBlock_balanced_cstr(storage1)_: @@ -97,31 +97,29 @@ c_e_GenericStorageBlock_balanced_cstr(storage2)_: +1 GenericStorageBlock_storage_content(storage2_3) = 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(bus_storage1_0) <= +inf - 0 <= flow(bus_storage1_1) <= +inf - 0 <= flow(bus_storage1_2) <= +inf - 0 <= flow(bus_storage2_0) <= +inf - 0 <= flow(bus_storage2_1) <= +inf - 0 <= flow(bus_storage2_2) <= +inf - 0 <= flow(storage1_bus_0) <= +inf - 0 <= flow(storage1_bus_1) <= +inf - 0 <= flow(storage1_bus_2) <= +inf - 0 <= flow(storage2_bus_0) <= +inf - 0 <= flow(storage2_bus_1) <= +inf - 0 <= flow(storage2_bus_2) <= +inf - 0 <= limit_storage(0) <= 7 - 0 <= limit_storage(1) <= 7 - 0 <= limit_storage(2) <= 7 + 1 <= ONE_VAR_CONSTANT <= 1 0 <= GenericStorageBlock_storage_content(storage1_0) <= 5 - 0 <= GenericStorageBlock_storage_content(storage1_1) <= 5 - 0 <= GenericStorageBlock_storage_content(storage1_2) <= 5 - 0 <= GenericStorageBlock_storage_content(storage1_3) <= 5 0 <= GenericStorageBlock_storage_content(storage2_0) <= 5 + 0 <= limit_storage(0) <= 7 + 0 <= GenericStorageBlock_storage_content(storage1_1) <= 5 0 <= GenericStorageBlock_storage_content(storage2_1) <= 5 + 0 <= limit_storage(1) <= 7 + 0 <= GenericStorageBlock_storage_content(storage1_2) <= 5 0 <= GenericStorageBlock_storage_content(storage2_2) <= 5 + 0 <= limit_storage(2) <= 7 + 0 <= flow(storage1_bus_0_0) <= +inf + 0 <= flow(storage2_bus_0_0) <= +inf + 0 <= flow(bus_storage1_0_0) <= +inf + 0 <= flow(bus_storage2_0_0) <= +inf + 0 <= flow(storage1_bus_0_1) <= +inf + 0 <= flow(storage2_bus_0_1) <= +inf + 0 <= flow(bus_storage1_0_1) <= +inf + 0 <= flow(bus_storage2_0_1) <= +inf + 0 <= flow(storage1_bus_0_2) <= +inf + 0 <= flow(storage2_bus_0_2) <= +inf + 0 <= flow(bus_storage1_0_2) <= +inf + 0 <= flow(bus_storage2_0_2) <= +inf + 0 <= GenericStorageBlock_storage_content(storage1_3) <= 5 0 <= GenericStorageBlock_storage_content(storage2_3) <= 5 end diff --git a/tests/lp_files/shared_limit_multi_period.lp b/tests/lp_files/shared_limit_multi_period.lp new file mode 100644 index 000000000..6bdd7fa17 --- /dev/null +++ b/tests/lp_files/shared_limit_multi_period.lp @@ -0,0 +1,227 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++0.0 ONE_VAR_CONSTANT + +s.t. + +c_e_limit_storage_constraint(0)_: ++0.5 GenericStorageBlock_storage_content(storage1_0) ++1.25 GenericStorageBlock_storage_content(storage2_0) +-1 limit_storage(0) += 0 + +c_e_limit_storage_constraint(1)_: ++0.5 GenericStorageBlock_storage_content(storage1_1) ++1.25 GenericStorageBlock_storage_content(storage2_1) +-1 limit_storage(1) += 0 + +c_e_limit_storage_constraint(2)_: ++0.5 GenericStorageBlock_storage_content(storage1_2) ++1.25 GenericStorageBlock_storage_content(storage2_2) +-1 limit_storage(2) += 0 + +c_e_limit_storage_constraint(3)_: ++0.5 GenericStorageBlock_storage_content(storage1_3) ++1.25 GenericStorageBlock_storage_content(storage2_3) +-1 limit_storage(3) += 0 + +c_e_limit_storage_constraint(4)_: ++0.5 GenericStorageBlock_storage_content(storage1_4) ++1.25 GenericStorageBlock_storage_content(storage2_4) +-1 limit_storage(4) += 0 + +c_e_limit_storage_constraint(5)_: ++0.5 GenericStorageBlock_storage_content(storage1_5) ++1.25 GenericStorageBlock_storage_content(storage2_5) +-1 limit_storage(5) += 0 + +c_e_BusBlock_balance(bus_0_0)_: ++1 flow(storage1_bus_0_0) ++1 flow(storage2_bus_0_0) +-1 flow(bus_storage1_0_0) +-1 flow(bus_storage2_0_0) += 0 + +c_e_BusBlock_balance(bus_0_1)_: ++1 flow(storage1_bus_0_1) ++1 flow(storage2_bus_0_1) +-1 flow(bus_storage1_0_1) +-1 flow(bus_storage2_0_1) += 0 + +c_e_BusBlock_balance(bus_1_2)_: ++1 flow(storage1_bus_1_2) ++1 flow(storage2_bus_1_2) +-1 flow(bus_storage1_1_2) +-1 flow(bus_storage2_1_2) += 0 + +c_e_BusBlock_balance(bus_1_3)_: ++1 flow(storage1_bus_1_3) ++1 flow(storage2_bus_1_3) +-1 flow(bus_storage1_1_3) +-1 flow(bus_storage2_1_3) += 0 + +c_e_BusBlock_balance(bus_2_4)_: ++1 flow(storage1_bus_2_4) ++1 flow(storage2_bus_2_4) +-1 flow(bus_storage1_2_4) +-1 flow(bus_storage2_2_4) += 0 + +c_e_BusBlock_balance(bus_2_5)_: ++1 flow(storage1_bus_2_5) ++1 flow(storage2_bus_2_5) +-1 flow(bus_storage1_2_5) +-1 flow(bus_storage2_2_5) += 0 + +c_e_GenericStorageBlock_balance(storage1_0_0)_: +-1 GenericStorageBlock_storage_content(storage1_0) ++1 GenericStorageBlock_storage_content(storage1_1) ++1 flow(storage1_bus_0_0) +-1 flow(bus_storage1_0_0) += 0 + +c_e_GenericStorageBlock_balance(storage1_0_1)_: +-1 GenericStorageBlock_storage_content(storage1_1) ++1 GenericStorageBlock_storage_content(storage1_2) ++1 flow(storage1_bus_0_1) +-1 flow(bus_storage1_0_1) += 0 + +c_e_GenericStorageBlock_balance(storage1_1_2)_: +-1 GenericStorageBlock_storage_content(storage1_2) ++1 GenericStorageBlock_storage_content(storage1_3) ++1 flow(storage1_bus_1_2) +-1 flow(bus_storage1_1_2) += 0 + +c_e_GenericStorageBlock_balance(storage1_1_3)_: +-1 GenericStorageBlock_storage_content(storage1_3) ++1 GenericStorageBlock_storage_content(storage1_4) ++1 flow(storage1_bus_1_3) +-1 flow(bus_storage1_1_3) += 0 + +c_e_GenericStorageBlock_balance(storage1_2_4)_: +-1 GenericStorageBlock_storage_content(storage1_4) ++1 GenericStorageBlock_storage_content(storage1_5) ++1 flow(storage1_bus_2_4) +-1 flow(bus_storage1_2_4) += 0 + +c_e_GenericStorageBlock_balance(storage1_2_5)_: +-1 GenericStorageBlock_storage_content(storage1_5) ++1 flow(storage1_bus_2_5) +-1 flow(bus_storage1_2_5) ++1 GenericStorageBlock_storage_content(storage1_6) += 0 + +c_e_GenericStorageBlock_balance(storage2_0_0)_: +-1 GenericStorageBlock_storage_content(storage2_0) ++1 GenericStorageBlock_storage_content(storage2_1) ++1 flow(storage2_bus_0_0) +-1 flow(bus_storage2_0_0) += 0 + +c_e_GenericStorageBlock_balance(storage2_0_1)_: +-1 GenericStorageBlock_storage_content(storage2_1) ++1 GenericStorageBlock_storage_content(storage2_2) ++1 flow(storage2_bus_0_1) +-1 flow(bus_storage2_0_1) += 0 + +c_e_GenericStorageBlock_balance(storage2_1_2)_: +-1 GenericStorageBlock_storage_content(storage2_2) ++1 GenericStorageBlock_storage_content(storage2_3) ++1 flow(storage2_bus_1_2) +-1 flow(bus_storage2_1_2) += 0 + +c_e_GenericStorageBlock_balance(storage2_1_3)_: +-1 GenericStorageBlock_storage_content(storage2_3) ++1 GenericStorageBlock_storage_content(storage2_4) ++1 flow(storage2_bus_1_3) +-1 flow(bus_storage2_1_3) += 0 + +c_e_GenericStorageBlock_balance(storage2_2_4)_: +-1 GenericStorageBlock_storage_content(storage2_4) ++1 GenericStorageBlock_storage_content(storage2_5) ++1 flow(storage2_bus_2_4) +-1 flow(bus_storage2_2_4) += 0 + +c_e_GenericStorageBlock_balance(storage2_2_5)_: +-1 GenericStorageBlock_storage_content(storage2_5) ++1 flow(storage2_bus_2_5) +-1 flow(bus_storage2_2_5) ++1 GenericStorageBlock_storage_content(storage2_6) += 0 + +c_e_GenericStorageBlock_balanced_cstr(storage1)_: +-1 GenericStorageBlock_storage_content(storage1_0) ++1 GenericStorageBlock_storage_content(storage1_6) += 0 + +c_e_GenericStorageBlock_balanced_cstr(storage2)_: +-1 GenericStorageBlock_storage_content(storage2_0) ++1 GenericStorageBlock_storage_content(storage2_6) += 0 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= GenericStorageBlock_storage_content(storage1_0) <= 5 + 0 <= GenericStorageBlock_storage_content(storage2_0) <= 5 + 0 <= limit_storage(0) <= 7 + 0 <= GenericStorageBlock_storage_content(storage1_1) <= 5 + 0 <= GenericStorageBlock_storage_content(storage2_1) <= 5 + 0 <= limit_storage(1) <= 7 + 0 <= GenericStorageBlock_storage_content(storage1_2) <= 5 + 0 <= GenericStorageBlock_storage_content(storage2_2) <= 5 + 0 <= limit_storage(2) <= 7 + 0 <= GenericStorageBlock_storage_content(storage1_3) <= 5 + 0 <= GenericStorageBlock_storage_content(storage2_3) <= 5 + 0 <= limit_storage(3) <= 7 + 0 <= GenericStorageBlock_storage_content(storage1_4) <= 5 + 0 <= GenericStorageBlock_storage_content(storage2_4) <= 5 + 0 <= limit_storage(4) <= 7 + 0 <= GenericStorageBlock_storage_content(storage1_5) <= 5 + 0 <= GenericStorageBlock_storage_content(storage2_5) <= 5 + 0 <= limit_storage(5) <= 7 + 0 <= flow(storage1_bus_0_0) <= +inf + 0 <= flow(storage2_bus_0_0) <= +inf + 0 <= flow(bus_storage1_0_0) <= +inf + 0 <= flow(bus_storage2_0_0) <= +inf + 0 <= flow(storage1_bus_0_1) <= +inf + 0 <= flow(storage2_bus_0_1) <= +inf + 0 <= flow(bus_storage1_0_1) <= +inf + 0 <= flow(bus_storage2_0_1) <= +inf + 0 <= flow(storage1_bus_1_2) <= +inf + 0 <= flow(storage2_bus_1_2) <= +inf + 0 <= flow(bus_storage1_1_2) <= +inf + 0 <= flow(bus_storage2_1_2) <= +inf + 0 <= flow(storage1_bus_1_3) <= +inf + 0 <= flow(storage2_bus_1_3) <= +inf + 0 <= flow(bus_storage1_1_3) <= +inf + 0 <= flow(bus_storage2_1_3) <= +inf + 0 <= flow(storage1_bus_2_4) <= +inf + 0 <= flow(storage2_bus_2_4) <= +inf + 0 <= flow(bus_storage1_2_4) <= +inf + 0 <= flow(bus_storage2_2_4) <= +inf + 0 <= flow(storage1_bus_2_5) <= +inf + 0 <= flow(storage2_bus_2_5) <= +inf + 0 <= flow(bus_storage1_2_5) <= +inf + 0 <= flow(bus_storage2_2_5) <= +inf + 0 <= GenericStorageBlock_storage_content(storage1_6) <= 5 + 0 <= GenericStorageBlock_storage_content(storage2_6) <= 5 +end diff --git a/tests/lp_files/source_with_gradient.lp b/tests/lp_files/source_with_gradient.lp index 738a41bd0..75f93f31b 100644 --- a/tests/lp_files/source_with_gradient.lp +++ b/tests/lp_files/source_with_gradient.lp @@ -1,58 +1,65 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+23 flow(powerplant_electricityBus_0) -+23 flow(powerplant_electricityBus_1) -+23 flow(powerplant_electricityBus_2) ++23 flow(powerplant_electricityBus_0_0) ++23 flow(powerplant_electricityBus_0_1) ++23 flow(powerplant_electricityBus_0_2) s.t. -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(powerplant_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(powerplant_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(powerplant_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(powerplant_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(powerplant_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(powerplant_electricityBus_0_2) = 0 -c_u_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_1)_: +c_e_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_0)_: ++1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_0) += 0 + +c_u_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_1)_: +-1 flow(powerplant_electricityBus_0_0) ++1 flow(powerplant_electricityBus_0_1) -1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_1) --1 flow(powerplant_electricityBus_0) -+1 flow(powerplant_electricityBus_1) <= 0 -c_u_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_2)_: +c_u_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_2)_: +-1 flow(powerplant_electricityBus_0_1) ++1 flow(powerplant_electricityBus_0_2) -1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_2) --1 flow(powerplant_electricityBus_1) -+1 flow(powerplant_electricityBus_2) <= 0 -c_u_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_1)_: +c_e_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_0)_: ++1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_0) += 0 + +c_u_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_1)_: ++1 flow(powerplant_electricityBus_0_0) +-1 flow(powerplant_electricityBus_0_1) -1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_1) -+1 flow(powerplant_electricityBus_0) --1 flow(powerplant_electricityBus_1) <= 0 -c_u_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_2)_: +c_u_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_2)_: ++1 flow(powerplant_electricityBus_0_1) +-1 flow(powerplant_electricityBus_0_2) -1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_2) -+1 flow(powerplant_electricityBus_1) --1 flow(powerplant_electricityBus_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(powerplant_electricityBus_0) <= 999 - 0 <= flow(powerplant_electricityBus_1) <= 999 - 0 <= flow(powerplant_electricityBus_2) <= 999 - -inf <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_1) <= 29.969999999999999 - -inf <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_2) <= 29.969999999999999 - -inf <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_1) <= 49.950000000000003 - -inf <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_2) <= 49.950000000000003 + 0 <= flow(powerplant_electricityBus_0_0) <= 999 + 0 <= flow(powerplant_electricityBus_0_1) <= 999 + 0 <= flow(powerplant_electricityBus_0_2) <= 999 + 0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_0) <= 29.97 + 0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_1) <= 29.97 + 0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_2) <= 29.97 + 0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_0) <= 49.95 + 0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_1) <= 49.95 + 0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_2) <= 49.95 end diff --git a/tests/lp_files/source_with_gradient_multi_period.lp b/tests/lp_files/source_with_gradient_multi_period.lp new file mode 100644 index 000000000..5ff719ac8 --- /dev/null +++ b/tests/lp_files/source_with_gradient_multi_period.lp @@ -0,0 +1,125 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++23 flow(powerplant_electricityBus_0_0) ++23 flow(powerplant_electricityBus_0_1) ++22.549019607843135 flow(powerplant_electricityBus_1_2) ++22.549019607843135 flow(powerplant_electricityBus_1_3) ++22.10688196847366 flow(powerplant_electricityBus_2_4) ++22.10688196847366 flow(powerplant_electricityBus_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(powerplant_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(powerplant_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(powerplant_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(powerplant_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(powerplant_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(powerplant_electricityBus_2_5) += 0 + +c_e_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_0)_: ++1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_0) += 0 + +c_u_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_1)_: +-1 flow(powerplant_electricityBus_0_0) ++1 flow(powerplant_electricityBus_0_1) +-1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_1) +<= 0 + +c_u_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_1_2)_: +-1 flow(powerplant_electricityBus_0_1) ++1 flow(powerplant_electricityBus_1_2) +-1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_2) +<= 0 + +c_u_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_1_3)_: +-1 flow(powerplant_electricityBus_1_2) ++1 flow(powerplant_electricityBus_1_3) +-1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_3) +<= 0 + +c_u_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_2_4)_: +-1 flow(powerplant_electricityBus_1_3) ++1 flow(powerplant_electricityBus_2_4) +-1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_4) +<= 0 + +c_u_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_2_5)_: +-1 flow(powerplant_electricityBus_2_4) ++1 flow(powerplant_electricityBus_2_5) +-1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_5) +<= 0 + +c_e_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_0)_: ++1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_0) += 0 + +c_u_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_1)_: ++1 flow(powerplant_electricityBus_0_0) +-1 flow(powerplant_electricityBus_0_1) +-1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_1) +<= 0 + +c_u_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_1_2)_: ++1 flow(powerplant_electricityBus_0_1) +-1 flow(powerplant_electricityBus_1_2) +-1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_2) +<= 0 + +c_u_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_1_3)_: ++1 flow(powerplant_electricityBus_1_2) +-1 flow(powerplant_electricityBus_1_3) +-1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_3) +<= 0 + +c_u_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_2_4)_: ++1 flow(powerplant_electricityBus_1_3) +-1 flow(powerplant_electricityBus_2_4) +-1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_4) +<= 0 + +c_u_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_2_5)_: ++1 flow(powerplant_electricityBus_2_4) +-1 flow(powerplant_electricityBus_2_5) +-1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_5) +<= 0 + +bounds + 0 <= flow(powerplant_electricityBus_0_0) <= 999 + 0 <= flow(powerplant_electricityBus_0_1) <= 999 + 0 <= flow(powerplant_electricityBus_1_2) <= 999 + 0 <= flow(powerplant_electricityBus_1_3) <= 999 + 0 <= flow(powerplant_electricityBus_2_4) <= 999 + 0 <= flow(powerplant_electricityBus_2_5) <= 999 + 0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_0) <= 29.97 + 0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_1) <= 29.97 + 0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_2) <= 29.97 + 0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_3) <= 29.97 + 0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_4) <= 29.97 + 0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_5) <= 29.97 + 0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_0) <= 49.95 + 0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_1) <= 49.95 + 0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_2) <= 49.95 + 0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_3) <= 49.95 + 0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_4) <= 49.95 + 0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_5) <= 49.95 +end diff --git a/tests/lp_files/source_with_nonconvex_gradient.lp b/tests/lp_files/source_with_nonconvex_gradient.lp index f7ba40b47..5e38b5ed7 100644 --- a/tests/lp_files/source_with_nonconvex_gradient.lp +++ b/tests/lp_files/source_with_nonconvex_gradient.lp @@ -1,116 +1,123 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+23 flow(powerplant_electricityBus_0) -+23 flow(powerplant_electricityBus_1) -+23 flow(powerplant_electricityBus_2) ++23 flow(powerplant_electricityBus_0_0) ++23 flow(powerplant_electricityBus_0_1) ++23 flow(powerplant_electricityBus_0_2) s.t. -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(powerplant_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(powerplant_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(powerplant_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(powerplant_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(powerplant_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(powerplant_electricityBus_0_2) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(powerplant_electricityBus_0)_: --999 NonConvexFlowBlock_status(powerplant_electricityBus_0) +1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_0) +-999 NonConvexFlowBlock_status(powerplant_electricityBus_0) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(powerplant_electricityBus_1)_: --999 NonConvexFlowBlock_status(powerplant_electricityBus_1) +1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_1) +-999 NonConvexFlowBlock_status(powerplant_electricityBus_1) = 0 c_e_NonConvexFlowBlock_status_nominal_constraint(powerplant_electricityBus_2)_: --999 NonConvexFlowBlock_status(powerplant_electricityBus_2) +1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_2) +-999 NonConvexFlowBlock_status(powerplant_electricityBus_2) = 0 -c_l_NonConvexFlowBlock_min(powerplant_electricityBus_0)_: -+1 flow(powerplant_electricityBus_0) ->= 0 +c_u_NonConvexFlowBlock_min(powerplant_electricityBus_0_0)_: +-1 flow(powerplant_electricityBus_0_0) +<= 0 -c_l_NonConvexFlowBlock_min(powerplant_electricityBus_1)_: -+1 flow(powerplant_electricityBus_1) ->= 0 +c_u_NonConvexFlowBlock_min(powerplant_electricityBus_0_1)_: +-1 flow(powerplant_electricityBus_0_1) +<= 0 -c_l_NonConvexFlowBlock_min(powerplant_electricityBus_2)_: -+1 flow(powerplant_electricityBus_2) ->= 0 +c_u_NonConvexFlowBlock_min(powerplant_electricityBus_0_2)_: +-1 flow(powerplant_electricityBus_0_2) +<= 0 -c_u_NonConvexFlowBlock_max(powerplant_electricityBus_0)_: +c_u_NonConvexFlowBlock_max(powerplant_electricityBus_0_0)_: ++1 flow(powerplant_electricityBus_0_0) -1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_0) -+1 flow(powerplant_electricityBus_0) <= 0 -c_u_NonConvexFlowBlock_max(powerplant_electricityBus_1)_: +c_u_NonConvexFlowBlock_max(powerplant_electricityBus_0_1)_: ++1 flow(powerplant_electricityBus_0_1) -1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_1) -+1 flow(powerplant_electricityBus_1) <= 0 -c_u_NonConvexFlowBlock_max(powerplant_electricityBus_2)_: +c_u_NonConvexFlowBlock_max(powerplant_electricityBus_0_2)_: ++1 flow(powerplant_electricityBus_0_2) -1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_2) -+1 flow(powerplant_electricityBus_2) <= 0 -c_u_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_1)_: +c_e_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_0)_: ++1 NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_0) += 0 + +c_u_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_1)_: -1 NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_1) + [ --1 NonConvexFlowBlock_status(powerplant_electricityBus_0) * flow(powerplant_electricityBus_0) -+1 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_1) +-1 flow(powerplant_electricityBus_0_0) * NonConvexFlowBlock_status(powerplant_electricityBus_0) ++1 flow(powerplant_electricityBus_0_1) * NonConvexFlowBlock_status(powerplant_electricityBus_1) ] <= 0 -c_u_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_2)_: +c_u_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_2)_: -1 NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_2) + [ --1 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_1) -+1 NonConvexFlowBlock_status(powerplant_electricityBus_2) * flow(powerplant_electricityBus_2) +-1 flow(powerplant_electricityBus_0_1) * NonConvexFlowBlock_status(powerplant_electricityBus_1) ++1 flow(powerplant_electricityBus_0_2) * NonConvexFlowBlock_status(powerplant_electricityBus_2) ] <= 0 -c_u_NonConvexFlowBlock_negative_gradient_constr(powerplant_electricityBus_1)_: +c_e_NonConvexFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_0)_: ++1 NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_0) += 0 + +c_u_NonConvexFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_1)_: -1 NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_1) + [ -+1 NonConvexFlowBlock_status(powerplant_electricityBus_0) * flow(powerplant_electricityBus_0) --1 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_1) ++1 flow(powerplant_electricityBus_0_0) * NonConvexFlowBlock_status(powerplant_electricityBus_0) +-1 flow(powerplant_electricityBus_0_1) * NonConvexFlowBlock_status(powerplant_electricityBus_1) ] <= 0 -c_u_NonConvexFlowBlock_negative_gradient_constr(powerplant_electricityBus_2)_: +c_u_NonConvexFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_2)_: -1 NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_2) + [ -+1 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_1) --1 NonConvexFlowBlock_status(powerplant_electricityBus_2) * flow(powerplant_electricityBus_2) ++1 flow(powerplant_electricityBus_0_1) * NonConvexFlowBlock_status(powerplant_electricityBus_1) +-1 flow(powerplant_electricityBus_0_2) * NonConvexFlowBlock_status(powerplant_electricityBus_2) ] <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(powerplant_electricityBus_0) <= 999 - 0 <= flow(powerplant_electricityBus_1) <= 999 - 0 <= flow(powerplant_electricityBus_2) <= 999 - 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_0) <= 1 - 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_1) <= 1 - 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_2) <= 1 + 0 <= flow(powerplant_electricityBus_0_0) <= 999 + 0 <= flow(powerplant_electricityBus_0_1) <= 999 + 0 <= flow(powerplant_electricityBus_0_2) <= 999 0 <= NonConvexFlowBlock_status_nominal(powerplant_electricityBus_0) <= +inf + 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_0) <= 1 0 <= NonConvexFlowBlock_status_nominal(powerplant_electricityBus_1) <= +inf + 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_1) <= 1 0 <= NonConvexFlowBlock_status_nominal(powerplant_electricityBus_2) <= +inf - -inf <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_1) <= +inf - -inf <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_2) <= +inf - -inf <= NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_1) <= +inf - -inf <= NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_2) <= +inf + 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_2) <= 1 + 0 <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_0) <= +inf + 0 <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_1) <= +inf + 0 <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_2) <= +inf + 0 <= NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_0) <= +inf + 0 <= NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_1) <= +inf + 0 <= NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_2) <= +inf binary NonConvexFlowBlock_status(powerplant_electricityBus_0) NonConvexFlowBlock_status(powerplant_electricityBus_1) diff --git a/tests/lp_files/source_with_nonconvex_gradient_multi_period.lp b/tests/lp_files/source_with_nonconvex_gradient_multi_period.lp new file mode 100644 index 000000000..68eac0154 --- /dev/null +++ b/tests/lp_files/source_with_nonconvex_gradient_multi_period.lp @@ -0,0 +1,248 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++23 flow(powerplant_electricityBus_0_0) ++23 flow(powerplant_electricityBus_0_1) ++22.549019607843135 flow(powerplant_electricityBus_1_2) ++22.549019607843135 flow(powerplant_electricityBus_1_3) ++22.10688196847366 flow(powerplant_electricityBus_2_4) ++22.10688196847366 flow(powerplant_electricityBus_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(powerplant_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(powerplant_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(powerplant_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(powerplant_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(powerplant_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(powerplant_electricityBus_2_5) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(powerplant_electricityBus_0)_: ++1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_0) +-999 NonConvexFlowBlock_status(powerplant_electricityBus_0) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(powerplant_electricityBus_1)_: ++1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_1) +-999 NonConvexFlowBlock_status(powerplant_electricityBus_1) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(powerplant_electricityBus_2)_: ++1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_2) +-999 NonConvexFlowBlock_status(powerplant_electricityBus_2) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(powerplant_electricityBus_3)_: ++1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_3) +-999 NonConvexFlowBlock_status(powerplant_electricityBus_3) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(powerplant_electricityBus_4)_: ++1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_4) +-999 NonConvexFlowBlock_status(powerplant_electricityBus_4) += 0 + +c_e_NonConvexFlowBlock_status_nominal_constraint(powerplant_electricityBus_5)_: ++1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_5) +-999 NonConvexFlowBlock_status(powerplant_electricityBus_5) += 0 + +c_u_NonConvexFlowBlock_min(powerplant_electricityBus_0_0)_: +-1 flow(powerplant_electricityBus_0_0) +<= 0 + +c_u_NonConvexFlowBlock_min(powerplant_electricityBus_0_1)_: +-1 flow(powerplant_electricityBus_0_1) +<= 0 + +c_u_NonConvexFlowBlock_min(powerplant_electricityBus_1_2)_: +-1 flow(powerplant_electricityBus_1_2) +<= 0 + +c_u_NonConvexFlowBlock_min(powerplant_electricityBus_1_3)_: +-1 flow(powerplant_electricityBus_1_3) +<= 0 + +c_u_NonConvexFlowBlock_min(powerplant_electricityBus_2_4)_: +-1 flow(powerplant_electricityBus_2_4) +<= 0 + +c_u_NonConvexFlowBlock_min(powerplant_electricityBus_2_5)_: +-1 flow(powerplant_electricityBus_2_5) +<= 0 + +c_u_NonConvexFlowBlock_max(powerplant_electricityBus_0_0)_: ++1 flow(powerplant_electricityBus_0_0) +-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_0) +<= 0 + +c_u_NonConvexFlowBlock_max(powerplant_electricityBus_0_1)_: ++1 flow(powerplant_electricityBus_0_1) +-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_1) +<= 0 + +c_u_NonConvexFlowBlock_max(powerplant_electricityBus_1_2)_: ++1 flow(powerplant_electricityBus_1_2) +-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_2) +<= 0 + +c_u_NonConvexFlowBlock_max(powerplant_electricityBus_1_3)_: ++1 flow(powerplant_electricityBus_1_3) +-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_3) +<= 0 + +c_u_NonConvexFlowBlock_max(powerplant_electricityBus_2_4)_: ++1 flow(powerplant_electricityBus_2_4) +-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_4) +<= 0 + +c_u_NonConvexFlowBlock_max(powerplant_electricityBus_2_5)_: ++1 flow(powerplant_electricityBus_2_5) +-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_5) +<= 0 + +c_e_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_0)_: ++1 NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_0) += 0 + +c_u_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_1)_: +-1 NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_1) ++ [ +-1 flow(powerplant_electricityBus_0_0) * NonConvexFlowBlock_status(powerplant_electricityBus_0) ++1 flow(powerplant_electricityBus_0_1) * NonConvexFlowBlock_status(powerplant_electricityBus_1) +] +<= 0 + +c_u_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_1_2)_: +-1 NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_2) ++ [ +-1 flow(powerplant_electricityBus_0_1) * NonConvexFlowBlock_status(powerplant_electricityBus_1) ++1 flow(powerplant_electricityBus_1_2) * NonConvexFlowBlock_status(powerplant_electricityBus_2) +] +<= 0 + +c_u_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_1_3)_: +-1 NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_3) ++ [ +-1 flow(powerplant_electricityBus_1_2) * NonConvexFlowBlock_status(powerplant_electricityBus_2) ++1 flow(powerplant_electricityBus_1_3) * NonConvexFlowBlock_status(powerplant_electricityBus_3) +] +<= 0 + +c_u_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_2_4)_: +-1 NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_4) ++ [ +-1 flow(powerplant_electricityBus_1_3) * NonConvexFlowBlock_status(powerplant_electricityBus_3) ++1 flow(powerplant_electricityBus_2_4) * NonConvexFlowBlock_status(powerplant_electricityBus_4) +] +<= 0 + +c_u_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_2_5)_: +-1 NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_5) ++ [ +-1 flow(powerplant_electricityBus_2_4) * NonConvexFlowBlock_status(powerplant_electricityBus_4) ++1 flow(powerplant_electricityBus_2_5) * NonConvexFlowBlock_status(powerplant_electricityBus_5) +] +<= 0 + +c_e_NonConvexFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_0)_: ++1 NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_0) += 0 + +c_u_NonConvexFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_1)_: +-1 NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_1) ++ [ ++1 flow(powerplant_electricityBus_0_0) * NonConvexFlowBlock_status(powerplant_electricityBus_0) +-1 flow(powerplant_electricityBus_0_1) * NonConvexFlowBlock_status(powerplant_electricityBus_1) +] +<= 0 + +c_u_NonConvexFlowBlock_negative_gradient_constr(powerplant_electricityBus_1_2)_: +-1 NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_2) ++ [ ++1 flow(powerplant_electricityBus_0_1) * NonConvexFlowBlock_status(powerplant_electricityBus_1) +-1 flow(powerplant_electricityBus_1_2) * NonConvexFlowBlock_status(powerplant_electricityBus_2) +] +<= 0 + +c_u_NonConvexFlowBlock_negative_gradient_constr(powerplant_electricityBus_1_3)_: +-1 NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_3) ++ [ ++1 flow(powerplant_electricityBus_1_2) * NonConvexFlowBlock_status(powerplant_electricityBus_2) +-1 flow(powerplant_electricityBus_1_3) * NonConvexFlowBlock_status(powerplant_electricityBus_3) +] +<= 0 + +c_u_NonConvexFlowBlock_negative_gradient_constr(powerplant_electricityBus_2_4)_: +-1 NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_4) ++ [ ++1 flow(powerplant_electricityBus_1_3) * NonConvexFlowBlock_status(powerplant_electricityBus_3) +-1 flow(powerplant_electricityBus_2_4) * NonConvexFlowBlock_status(powerplant_electricityBus_4) +] +<= 0 + +c_u_NonConvexFlowBlock_negative_gradient_constr(powerplant_electricityBus_2_5)_: +-1 NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_5) ++ [ ++1 flow(powerplant_electricityBus_2_4) * NonConvexFlowBlock_status(powerplant_electricityBus_4) +-1 flow(powerplant_electricityBus_2_5) * NonConvexFlowBlock_status(powerplant_electricityBus_5) +] +<= 0 + +bounds + 0 <= flow(powerplant_electricityBus_0_0) <= 999 + 0 <= flow(powerplant_electricityBus_0_1) <= 999 + 0 <= flow(powerplant_electricityBus_1_2) <= 999 + 0 <= flow(powerplant_electricityBus_1_3) <= 999 + 0 <= flow(powerplant_electricityBus_2_4) <= 999 + 0 <= flow(powerplant_electricityBus_2_5) <= 999 + 0 <= NonConvexFlowBlock_status_nominal(powerplant_electricityBus_0) <= +inf + 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_0) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(powerplant_electricityBus_1) <= +inf + 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_1) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(powerplant_electricityBus_2) <= +inf + 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_2) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(powerplant_electricityBus_3) <= +inf + 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_3) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(powerplant_electricityBus_4) <= +inf + 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_4) <= 1 + 0 <= NonConvexFlowBlock_status_nominal(powerplant_electricityBus_5) <= +inf + 0 <= NonConvexFlowBlock_status(powerplant_electricityBus_5) <= 1 + 0 <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_0) <= +inf + 0 <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_1) <= +inf + 0 <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_2) <= +inf + 0 <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_3) <= +inf + 0 <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_4) <= +inf + 0 <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_5) <= +inf + 0 <= NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_0) <= +inf + 0 <= NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_1) <= +inf + 0 <= NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_2) <= +inf + 0 <= NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_3) <= +inf + 0 <= NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_4) <= +inf + 0 <= NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_5) <= +inf +binary + NonConvexFlowBlock_status(powerplant_electricityBus_0) + NonConvexFlowBlock_status(powerplant_electricityBus_1) + NonConvexFlowBlock_status(powerplant_electricityBus_2) + NonConvexFlowBlock_status(powerplant_electricityBus_3) + NonConvexFlowBlock_status(powerplant_electricityBus_4) + NonConvexFlowBlock_status(powerplant_electricityBus_5) +end diff --git a/tests/lp_files/storage.lp b/tests/lp_files/storage.lp index 934a7ba24..073f266b7 100644 --- a/tests/lp_files/storage.lp +++ b/tests/lp_files/storage.lp @@ -1,66 +1,68 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+56 flow(electricityBus_storage_no_invest_0) -+56 flow(electricityBus_storage_no_invest_1) -+56 flow(electricityBus_storage_no_invest_2) -+24 flow(storage_no_invest_electricityBus_0) -+24 flow(storage_no_invest_electricityBus_1) -+24 flow(storage_no_invest_electricityBus_2) ++4000.0 ONE_VAR_CONSTANT ++0.1 GenericStorageBlock_storage_content(storage_no_invest_1) ++0.1 GenericStorageBlock_storage_content(storage_no_invest_2) ++0.1 GenericStorageBlock_storage_content(storage_no_invest_3) ++56 flow(electricityBus_storage_no_invest_0_0) ++56 flow(electricityBus_storage_no_invest_0_1) ++56 flow(electricityBus_storage_no_invest_0_2) ++24 flow(storage_no_invest_electricityBus_0_0) ++24 flow(storage_no_invest_electricityBus_0_1) ++24 flow(storage_no_invest_electricityBus_0_2) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage_no_invest_0) -+1 flow(storage_no_invest_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_storage_no_invest_0_0) ++1 flow(storage_no_invest_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage_no_invest_1) -+1 flow(storage_no_invest_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_storage_no_invest_0_1) ++1 flow(storage_no_invest_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage_no_invest_2) -+1 flow(storage_no_invest_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: +-1 flow(electricityBus_storage_no_invest_0_2) ++1 flow(storage_no_invest_electricityBus_0_2) = 0 -c_e_GenericStorageBlock_balance(storage_no_invest_0)_: +c_e_GenericStorageBlock_balance(storage_no_invest_0_0)_: +-0.97 flow(electricityBus_storage_no_invest_0_0) ++1.1627906976744187 flow(storage_no_invest_electricityBus_0_0) +1 GenericStorageBlock_storage_content(storage_no_invest_1) --0.96999999999999997 flow(electricityBus_storage_no_invest_0) -+1.1627906976744187 flow(storage_no_invest_electricityBus_0) -= 34800 += 34800.0 -c_e_GenericStorageBlock_balance(storage_no_invest_1)_: +c_e_GenericStorageBlock_balance(storage_no_invest_0_1)_: +-0.97 flow(electricityBus_storage_no_invest_0_1) ++1.1627906976744187 flow(storage_no_invest_electricityBus_0_1) -0.87 GenericStorageBlock_storage_content(storage_no_invest_1) +1 GenericStorageBlock_storage_content(storage_no_invest_2) --0.96999999999999997 flow(electricityBus_storage_no_invest_1) -+1.1627906976744187 flow(storage_no_invest_electricityBus_1) = 0 -c_e_GenericStorageBlock_balance(storage_no_invest_2)_: +c_e_GenericStorageBlock_balance(storage_no_invest_0_2)_: +-0.97 flow(electricityBus_storage_no_invest_0_2) ++1.1627906976744187 flow(storage_no_invest_electricityBus_0_2) -0.87 GenericStorageBlock_storage_content(storage_no_invest_2) +1 GenericStorageBlock_storage_content(storage_no_invest_3) --0.96999999999999997 flow(electricityBus_storage_no_invest_2) -+1.1627906976744187 flow(storage_no_invest_electricityBus_2) = 0 c_e_GenericStorageBlock_balanced_cstr(storage_no_invest)_: +1 GenericStorageBlock_storage_content(storage_no_invest_3) -= 40000 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 += 40000.0 bounds - 0 <= flow(electricityBus_storage_no_invest_0) <= 16667 - 0 <= flow(electricityBus_storage_no_invest_1) <= 16667 - 0 <= flow(electricityBus_storage_no_invest_2) <= 16667 - 0 <= flow(storage_no_invest_electricityBus_0) <= 16667 - 0 <= flow(storage_no_invest_electricityBus_1) <= 16667 - 0 <= flow(storage_no_invest_electricityBus_2) <= 16667 - 0 <= GenericStorageBlock_storage_content(storage_no_invest_1) <= 100000 - 0 <= GenericStorageBlock_storage_content(storage_no_invest_2) <= 100000 - 0 <= GenericStorageBlock_storage_content(storage_no_invest_3) <= 100000 + +1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(electricityBus_storage_no_invest_0_0) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_0_1) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_0_2) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_0_0) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_0_1) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_0_2) <= 16667 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_1) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_2) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_3) <= 100000.0 end diff --git a/tests/lp_files/storage_fixed_losses.lp b/tests/lp_files/storage_fixed_losses.lp index 2c6e264ad..ca4def3ee 100644 --- a/tests/lp_files/storage_fixed_losses.lp +++ b/tests/lp_files/storage_fixed_losses.lp @@ -2,65 +2,62 @@ min objective: -+56 flow(electricityBus_storage_no_invest_0) -+56 flow(electricityBus_storage_no_invest_1) -+56 flow(electricityBus_storage_no_invest_2) -+24 flow(storage_no_invest_electricityBus_0) -+24 flow(storage_no_invest_electricityBus_1) -+24 flow(storage_no_invest_electricityBus_2) ++56 flow(electricityBus_storage_no_invest_0_0) ++56 flow(electricityBus_storage_no_invest_0_1) ++56 flow(electricityBus_storage_no_invest_0_2) ++24 flow(storage_no_invest_electricityBus_0_0) ++24 flow(storage_no_invest_electricityBus_0_1) ++24 flow(storage_no_invest_electricityBus_0_2) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage_no_invest_0) -+1 flow(storage_no_invest_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_storage_no_invest_0_0) ++1 flow(storage_no_invest_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage_no_invest_1) -+1 flow(storage_no_invest_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_storage_no_invest_0_1) ++1 flow(storage_no_invest_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage_no_invest_2) -+1 flow(storage_no_invest_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: +-1 flow(electricityBus_storage_no_invest_0_2) ++1 flow(storage_no_invest_electricityBus_0_2) = 0 -c_e_GenericStorageBlock_balance(storage_no_invest_0)_: +c_e_GenericStorageBlock_balance(storage_no_invest_0_0)_: +-0.97 flow(electricityBus_storage_no_invest_0_0) ++1.1627906976744187 flow(storage_no_invest_electricityBus_0_0) +1 GenericStorageBlock_storage_content(storage_no_invest_1) --0.96999999999999997 flow(electricityBus_storage_no_invest_0) -+1.1627906976744187 flow(storage_no_invest_electricityBus_0) -= 33797 += 33797.0 -c_e_GenericStorageBlock_balance(storage_no_invest_1)_: +c_e_GenericStorageBlock_balance(storage_no_invest_0_1)_: +-0.97 flow(electricityBus_storage_no_invest_0_1) ++1.1627906976744187 flow(storage_no_invest_electricityBus_0_1) -0.87 GenericStorageBlock_storage_content(storage_no_invest_1) +1 GenericStorageBlock_storage_content(storage_no_invest_2) --0.96999999999999997 flow(electricityBus_storage_no_invest_1) -+1.1627906976744187 flow(storage_no_invest_electricityBus_1) -= -1003 += -1003.0 -c_e_GenericStorageBlock_balance(storage_no_invest_2)_: +c_e_GenericStorageBlock_balance(storage_no_invest_0_2)_: +-0.97 flow(electricityBus_storage_no_invest_0_2) ++1.1627906976744187 flow(storage_no_invest_electricityBus_0_2) -0.87 GenericStorageBlock_storage_content(storage_no_invest_2) +1 GenericStorageBlock_storage_content(storage_no_invest_3) --0.96999999999999997 flow(electricityBus_storage_no_invest_2) -+1.1627906976744187 flow(storage_no_invest_electricityBus_2) -= -1003 += -1003.0 c_e_GenericStorageBlock_balanced_cstr(storage_no_invest)_: +1 GenericStorageBlock_storage_content(storage_no_invest_3) -= 40000 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 += 40000.0 bounds - 0 <= flow(electricityBus_storage_no_invest_0) <= 16667 - 0 <= flow(electricityBus_storage_no_invest_1) <= 16667 - 0 <= flow(electricityBus_storage_no_invest_2) <= 16667 - 0 <= flow(storage_no_invest_electricityBus_0) <= 16667 - 0 <= flow(storage_no_invest_electricityBus_1) <= 16667 - 0 <= flow(storage_no_invest_electricityBus_2) <= 16667 - 0 <= GenericStorageBlock_storage_content(storage_no_invest_1) <= 100000 - 0 <= GenericStorageBlock_storage_content(storage_no_invest_2) <= 100000 - 0 <= GenericStorageBlock_storage_content(storage_no_invest_3) <= 100000 + 0 <= flow(electricityBus_storage_no_invest_0_0) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_0_1) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_0_2) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_0_0) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_0_1) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_0_2) <= 16667 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_1) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_2) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_3) <= 100000.0 end diff --git a/tests/lp_files/storage_fixed_losses_multi_period.lp b/tests/lp_files/storage_fixed_losses_multi_period.lp new file mode 100644 index 000000000..04ed25c3c --- /dev/null +++ b/tests/lp_files/storage_fixed_losses_multi_period.lp @@ -0,0 +1,114 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++56 flow(electricityBus_storage_no_invest_0_0) ++56 flow(electricityBus_storage_no_invest_0_1) ++54.90196078431372 flow(electricityBus_storage_no_invest_1_2) ++54.90196078431372 flow(electricityBus_storage_no_invest_1_3) ++53.82545174932718 flow(electricityBus_storage_no_invest_2_4) ++53.82545174932718 flow(electricityBus_storage_no_invest_2_5) ++24 flow(storage_no_invest_electricityBus_0_0) ++24 flow(storage_no_invest_electricityBus_0_1) ++23.52941176470588 flow(storage_no_invest_electricityBus_1_2) ++23.52941176470588 flow(storage_no_invest_electricityBus_1_3) ++23.06805074971165 flow(storage_no_invest_electricityBus_2_4) ++23.06805074971165 flow(storage_no_invest_electricityBus_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_storage_no_invest_0_0) ++1 flow(storage_no_invest_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_storage_no_invest_0_1) ++1 flow(storage_no_invest_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: +-1 flow(electricityBus_storage_no_invest_1_2) ++1 flow(storage_no_invest_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: +-1 flow(electricityBus_storage_no_invest_1_3) ++1 flow(storage_no_invest_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: +-1 flow(electricityBus_storage_no_invest_2_4) ++1 flow(storage_no_invest_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: +-1 flow(electricityBus_storage_no_invest_2_5) ++1 flow(storage_no_invest_electricityBus_2_5) += 0 + +c_e_GenericStorageBlock_balance(storage_no_invest_0_0)_: +-0.97 flow(electricityBus_storage_no_invest_0_0) ++1.1627906976744187 flow(storage_no_invest_electricityBus_0_0) ++1 GenericStorageBlock_storage_content(storage_no_invest_1) += 33797.0 + +c_e_GenericStorageBlock_balance(storage_no_invest_0_1)_: +-0.97 flow(electricityBus_storage_no_invest_0_1) ++1.1627906976744187 flow(storage_no_invest_electricityBus_0_1) +-0.87 GenericStorageBlock_storage_content(storage_no_invest_1) ++1 GenericStorageBlock_storage_content(storage_no_invest_2) += -1003.0 + +c_e_GenericStorageBlock_balance(storage_no_invest_1_2)_: +-0.97 flow(electricityBus_storage_no_invest_1_2) ++1.1627906976744187 flow(storage_no_invest_electricityBus_1_2) +-0.87 GenericStorageBlock_storage_content(storage_no_invest_2) ++1 GenericStorageBlock_storage_content(storage_no_invest_3) += -1003.0 + +c_e_GenericStorageBlock_balance(storage_no_invest_1_3)_: +-0.97 flow(electricityBus_storage_no_invest_1_3) ++1.1627906976744187 flow(storage_no_invest_electricityBus_1_3) +-0.87 GenericStorageBlock_storage_content(storage_no_invest_3) ++1 GenericStorageBlock_storage_content(storage_no_invest_4) += -1003.0 + +c_e_GenericStorageBlock_balance(storage_no_invest_2_4)_: +-0.97 flow(electricityBus_storage_no_invest_2_4) ++1.1627906976744187 flow(storage_no_invest_electricityBus_2_4) +-0.87 GenericStorageBlock_storage_content(storage_no_invest_4) ++1 GenericStorageBlock_storage_content(storage_no_invest_5) += -1003.0 + +c_e_GenericStorageBlock_balance(storage_no_invest_2_5)_: +-0.97 flow(electricityBus_storage_no_invest_2_5) ++1.1627906976744187 flow(storage_no_invest_electricityBus_2_5) +-0.87 GenericStorageBlock_storage_content(storage_no_invest_5) ++1 GenericStorageBlock_storage_content(storage_no_invest_6) += -1003.0 + +c_e_GenericStorageBlock_balanced_cstr(storage_no_invest)_: ++1 GenericStorageBlock_storage_content(storage_no_invest_6) += 40000.0 + +bounds + 0 <= flow(electricityBus_storage_no_invest_0_0) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_0_1) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_1_2) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_1_3) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_2_4) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_2_5) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_0_0) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_0_1) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_1_2) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_1_3) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_2_4) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_2_5) <= 16667 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_1) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_2) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_3) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_4) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_5) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_6) <= 100000.0 +end diff --git a/tests/lp_files/storage_invest_1.lp b/tests/lp_files/storage_invest_1.lp index 21ab34637..d40a61114 100644 --- a/tests/lp_files/storage_invest_1.lp +++ b/tests/lp_files/storage_invest_1.lp @@ -1,86 +1,101 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+145 GenericInvestmentStorageBlock_invest(storage1) -+56 flow(electricityBus_storage1_0) -+56 flow(electricityBus_storage1_1) -+56 flow(electricityBus_storage1_2) -+24 flow(storage1_electricityBus_0) -+24 flow(storage1_electricityBus_1) -+24 flow(storage1_electricityBus_2) ++56 flow(electricityBus_storage1_0_0) ++56 flow(electricityBus_storage1_0_1) ++56 flow(electricityBus_storage1_0_2) ++24 flow(storage1_electricityBus_0_0) ++24 flow(storage1_electricityBus_0_1) ++24 flow(storage1_electricityBus_0_2) ++145 GenericInvestmentStorageBlock_invest(storage1_0) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage1_0) -+1 flow(storage1_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_storage1_0_0) ++1 flow(storage1_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage1_1) -+1 flow(storage1_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_storage1_0_1) ++1 flow(storage1_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage1_2) -+1 flow(storage1_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: +-1 flow(electricityBus_storage1_0_2) ++1 flow(storage1_electricityBus_0_2) = 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage1_0)_: --1 InvestmentFlowBlock_invest(electricityBus_storage1) -+1 flow(electricityBus_storage1_0) +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage1_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage1_0) +-1 InvestmentFlowBlock_invest(electricityBus_storage1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage1_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage1_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage1_electricityBus_0) += 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_0)_: ++1 flow(electricityBus_storage1_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage1_1)_: --1 InvestmentFlowBlock_invest(electricityBus_storage1) -+1 flow(electricityBus_storage1_1) +c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_1)_: ++1 flow(electricityBus_storage1_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage1_2)_: --1 InvestmentFlowBlock_invest(electricityBus_storage1) -+1 flow(electricityBus_storage1_2) +c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_2)_: ++1 flow(electricityBus_storage1_0_2) +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) <= 0 -c_u_InvestmentFlowBlock_max(storage1_electricityBus_0)_: --1 InvestmentFlowBlock_invest(storage1_electricityBus) -+1 flow(storage1_electricityBus_0) +c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(storage1_electricityBus_1)_: --1 InvestmentFlowBlock_invest(storage1_electricityBus) -+1 flow(storage1_electricityBus_1) +c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(storage1_electricityBus_2)_: --1 InvestmentFlowBlock_invest(storage1_electricityBus) -+1 flow(storage1_electricityBus_2) +c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_2)_: ++1 flow(storage1_electricityBus_0_2) +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) <= 0 +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_: +-1 GenericInvestmentStorageBlock_invest(storage1_0) ++1 GenericInvestmentStorageBlock_total(storage1_0) += 0 + c_u_GenericInvestmentStorageBlock_init_content_limit(storage1)_: +-1 GenericInvestmentStorageBlock_invest(storage1_0) +1 GenericInvestmentStorageBlock_init_content(storage1) --1 GenericInvestmentStorageBlock_invest(storage1) <= 0 c_e_GenericInvestmentStorageBlock_balance_first(storage1)_: +-0.97 flow(electricityBus_storage1_0_0) ++1.1627906976744187 flow(storage1_electricityBus_0_0) -0.87 GenericInvestmentStorageBlock_init_content(storage1) +1 GenericInvestmentStorageBlock_storage_content(storage1_0) --0.96999999999999997 flow(electricityBus_storage1_0) -+1.1627906976744187 flow(storage1_electricityBus_0) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage1_1)_: +c_e_GenericInvestmentStorageBlock_balance(storage1_0_1)_: +-0.97 flow(electricityBus_storage1_0_1) ++1.1627906976744187 flow(storage1_electricityBus_0_1) -0.87 GenericInvestmentStorageBlock_storage_content(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_1) --0.96999999999999997 flow(electricityBus_storage1_1) -+1.1627906976744187 flow(storage1_electricityBus_1) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage1_2)_: +c_e_GenericInvestmentStorageBlock_balance(storage1_0_2)_: +-0.97 flow(electricityBus_storage1_0_2) ++1.1627906976744187 flow(storage1_electricityBus_0_2) -0.87 GenericInvestmentStorageBlock_storage_content(storage1_1) +1 GenericInvestmentStorageBlock_storage_content(storage1_2) --0.96999999999999997 flow(electricityBus_storage1_2) -+1.1627906976744187 flow(storage1_electricityBus_2) = 0 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage1)_: @@ -88,61 +103,61 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage1)_: +1 GenericInvestmentStorageBlock_storage_content(storage1_2) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1)_: --0.16666666666666666 GenericInvestmentStorageBlock_invest(storage1) -+1 InvestmentFlowBlock_invest(electricityBus_storage1) +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage1_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1)_: --0.16666666666666666 GenericInvestmentStorageBlock_invest(storage1) -+1 InvestmentFlowBlock_invest(storage1_electricityBus) +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_0)_: ++1 InvestmentFlowBlock_total(storage1_electricityBus_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0) = 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_0) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_1)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_1) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_2)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_2) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_0)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_0) -1 GenericInvestmentStorageBlock_storage_content(storage1_0) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_1)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_1)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_0) -1 GenericInvestmentStorageBlock_storage_content(storage1_1) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_2)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_2)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_0) -1 GenericInvestmentStorageBlock_storage_content(storage1_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(electricityBus_storage1_0) <= +inf - 0 <= flow(electricityBus_storage1_1) <= +inf - 0 <= flow(electricityBus_storage1_2) <= +inf - 0 <= flow(storage1_electricityBus_0) <= +inf - 0 <= flow(storage1_electricityBus_1) <= +inf - 0 <= flow(storage1_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(electricityBus_storage1) <= +inf - 0 <= InvestmentFlowBlock_invest(storage1_electricityBus) <= +inf + 0 <= flow(electricityBus_storage1_0_0) <= +inf + 0 <= flow(electricityBus_storage1_0_1) <= +inf + 0 <= flow(electricityBus_storage1_0_2) <= +inf + 0 <= flow(storage1_electricityBus_0_0) <= +inf + 0 <= flow(storage1_electricityBus_0_1) <= +inf + 0 <= flow(storage1_electricityBus_0_2) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage1_0) <= 234 + 0 <= InvestmentFlowBlock_total(electricityBus_storage1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage1_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage1_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage1_electricityBus_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_0) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_2) <= +inf - 0 <= GenericInvestmentStorageBlock_invest(storage1) <= 234 - 0 <= GenericInvestmentStorageBlock_init_content(storage1) <= +inf end diff --git a/tests/lp_files/storage_invest_1_fixed_losses.lp b/tests/lp_files/storage_invest_1_fixed_losses.lp index b5a47e1d7..c6c2ce6db 100644 --- a/tests/lp_files/storage_invest_1_fixed_losses.lp +++ b/tests/lp_files/storage_invest_1_fixed_losses.lp @@ -1,151 +1,166 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+145 GenericInvestmentStorageBlock_invest(storage1) -+56 flow(electricityBus_storage1_0) -+56 flow(electricityBus_storage1_1) -+56 flow(electricityBus_storage1_2) -+24 flow(storage1_electricityBus_0) -+24 flow(storage1_electricityBus_1) -+24 flow(storage1_electricityBus_2) ++56 flow(electricityBus_storage1_0_0) ++56 flow(electricityBus_storage1_0_1) ++56 flow(electricityBus_storage1_0_2) ++24 flow(storage1_electricityBus_0_0) ++24 flow(storage1_electricityBus_0_1) ++24 flow(storage1_electricityBus_0_2) ++145 GenericInvestmentStorageBlock_invest(storage1_0) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage1_0) -+1 flow(storage1_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_storage1_0_0) ++1 flow(storage1_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage1_1) -+1 flow(storage1_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_storage1_0_1) ++1 flow(storage1_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage1_2) -+1 flow(storage1_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: +-1 flow(electricityBus_storage1_0_2) ++1 flow(storage1_electricityBus_0_2) = 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage1_0)_: --1 InvestmentFlowBlock_invest(electricityBus_storage1) -+1 flow(electricityBus_storage1_0) +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage1_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage1_0) +-1 InvestmentFlowBlock_invest(electricityBus_storage1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage1_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage1_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage1_electricityBus_0) += 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_0)_: ++1 flow(electricityBus_storage1_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage1_1)_: --1 InvestmentFlowBlock_invest(electricityBus_storage1) -+1 flow(electricityBus_storage1_1) +c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_1)_: ++1 flow(electricityBus_storage1_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage1_2)_: --1 InvestmentFlowBlock_invest(electricityBus_storage1) -+1 flow(electricityBus_storage1_2) +c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_2)_: ++1 flow(electricityBus_storage1_0_2) +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) <= 0 -c_u_InvestmentFlowBlock_max(storage1_electricityBus_0)_: --1 InvestmentFlowBlock_invest(storage1_electricityBus) -+1 flow(storage1_electricityBus_0) +c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(storage1_electricityBus_1)_: --1 InvestmentFlowBlock_invest(storage1_electricityBus) -+1 flow(storage1_electricityBus_1) +c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(storage1_electricityBus_2)_: --1 InvestmentFlowBlock_invest(storage1_electricityBus) -+1 flow(storage1_electricityBus_2) +c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_2)_: ++1 flow(storage1_electricityBus_0_2) +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) <= 0 +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_: +-1 GenericInvestmentStorageBlock_invest(storage1_0) ++1 GenericInvestmentStorageBlock_total(storage1_0) += 0 + c_u_GenericInvestmentStorageBlock_init_content_limit(storage1)_: +-1 GenericInvestmentStorageBlock_invest(storage1_0) +1 GenericInvestmentStorageBlock_init_content(storage1) --1 GenericInvestmentStorageBlock_invest(storage1) <= 0 c_e_GenericInvestmentStorageBlock_balance_first(storage1)_: +-0.97 flow(electricityBus_storage1_0_0) ++1.1627906976744187 flow(storage1_electricityBus_0_0) ++0.01 GenericInvestmentStorageBlock_invest(storage1_0) -0.87 GenericInvestmentStorageBlock_init_content(storage1) -+0.01 GenericInvestmentStorageBlock_invest(storage1) +1 GenericInvestmentStorageBlock_storage_content(storage1_0) --0.96999999999999997 flow(electricityBus_storage1_0) -+1.1627906976744187 flow(storage1_electricityBus_0) -= -3 += -3.0 -c_e_GenericInvestmentStorageBlock_balance(storage1_1)_: -+0.01 GenericInvestmentStorageBlock_invest(storage1) +c_e_GenericInvestmentStorageBlock_balance(storage1_0_1)_: +-0.97 flow(electricityBus_storage1_0_1) ++1.1627906976744187 flow(storage1_electricityBus_0_1) ++0.01 GenericInvestmentStorageBlock_total(storage1_0) -0.87 GenericInvestmentStorageBlock_storage_content(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_1) --0.96999999999999997 flow(electricityBus_storage1_1) -+1.1627906976744187 flow(storage1_electricityBus_1) -= -3 += -3.0 -c_e_GenericInvestmentStorageBlock_balance(storage1_2)_: -+0.01 GenericInvestmentStorageBlock_invest(storage1) +c_e_GenericInvestmentStorageBlock_balance(storage1_0_2)_: +-0.97 flow(electricityBus_storage1_0_2) ++1.1627906976744187 flow(storage1_electricityBus_0_2) ++0.01 GenericInvestmentStorageBlock_total(storage1_0) -0.87 GenericInvestmentStorageBlock_storage_content(storage1_1) +1 GenericInvestmentStorageBlock_storage_content(storage1_2) --0.96999999999999997 flow(electricityBus_storage1_2) -+1.1627906976744187 flow(storage1_electricityBus_2) -= -3 += -3.0 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage1)_: -1 GenericInvestmentStorageBlock_init_content(storage1) +1 GenericInvestmentStorageBlock_storage_content(storage1_2) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1)_: --0.16666666666666666 GenericInvestmentStorageBlock_invest(storage1) -+1 InvestmentFlowBlock_invest(electricityBus_storage1) +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage1_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1)_: --0.16666666666666666 GenericInvestmentStorageBlock_invest(storage1) -+1 InvestmentFlowBlock_invest(storage1_electricityBus) +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_0)_: ++1 InvestmentFlowBlock_total(storage1_electricityBus_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0) = 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_0) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_1)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_1) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_2)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_2) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_0)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_0) -1 GenericInvestmentStorageBlock_storage_content(storage1_0) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_1)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_1)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_0) -1 GenericInvestmentStorageBlock_storage_content(storage1_1) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_2)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_2)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_0) -1 GenericInvestmentStorageBlock_storage_content(storage1_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(electricityBus_storage1_0) <= +inf - 0 <= flow(electricityBus_storage1_1) <= +inf - 0 <= flow(electricityBus_storage1_2) <= +inf - 0 <= flow(storage1_electricityBus_0) <= +inf - 0 <= flow(storage1_electricityBus_1) <= +inf - 0 <= flow(storage1_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(electricityBus_storage1) <= +inf - 0 <= InvestmentFlowBlock_invest(storage1_electricityBus) <= +inf + 0 <= flow(electricityBus_storage1_0_0) <= +inf + 0 <= flow(electricityBus_storage1_0_1) <= +inf + 0 <= flow(electricityBus_storage1_0_2) <= +inf + 0 <= flow(storage1_electricityBus_0_0) <= +inf + 0 <= flow(storage1_electricityBus_0_1) <= +inf + 0 <= flow(storage1_electricityBus_0_2) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage1_0) <= 234 + 0 <= InvestmentFlowBlock_total(electricityBus_storage1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage1_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage1_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage1_electricityBus_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_0) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_2) <= +inf - 0 <= GenericInvestmentStorageBlock_invest(storage1) <= 234 - 0 <= GenericInvestmentStorageBlock_init_content(storage1) <= +inf end diff --git a/tests/lp_files/storage_invest_1_multi_period.lp b/tests/lp_files/storage_invest_1_multi_period.lp new file mode 100644 index 000000000..35c7ff688 --- /dev/null +++ b/tests/lp_files/storage_invest_1_multi_period.lp @@ -0,0 +1,505 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++56 flow(electricityBus_storage1_0_0) ++56 flow(electricityBus_storage1_0_1) ++54.90196078431372 flow(electricityBus_storage1_1_2) ++54.90196078431372 flow(electricityBus_storage1_1_3) ++53.82545174932718 flow(electricityBus_storage1_2_4) ++53.82545174932718 flow(electricityBus_storage1_2_5) ++24 flow(storage1_electricityBus_0_0) ++24 flow(storage1_electricityBus_0_1) ++23.52941176470588 flow(storage1_electricityBus_1_2) ++23.52941176470588 flow(storage1_electricityBus_1_3) ++23.06805074971165 flow(storage1_electricityBus_2_4) ++23.06805074971165 flow(storage1_electricityBus_2_5) ++232.70350285300475 GenericInvestmentStorageBlock_invest(storage1_0) ++228.14068907157326 GenericInvestmentStorageBlock_invest(storage1_1) ++223.6673422270326 GenericInvestmentStorageBlock_invest(storage1_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_storage1_0_0) ++1 flow(storage1_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_storage1_0_1) ++1 flow(storage1_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: +-1 flow(electricityBus_storage1_1_2) ++1 flow(storage1_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: +-1 flow(electricityBus_storage1_1_3) ++1 flow(storage1_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: +-1 flow(electricityBus_storage1_2_4) ++1 flow(storage1_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: +-1 flow(electricityBus_storage1_2_5) ++1 flow(storage1_electricityBus_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage1_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage1_0) +-1 InvestmentFlowBlock_invest(electricityBus_storage1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage1_1)_: +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) ++1 InvestmentFlowBlock_total(electricityBus_storage1_1) +-1 InvestmentFlowBlock_invest(electricityBus_storage1_1) ++1 InvestmentFlowBlock_old(electricityBus_storage1_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage1_2)_: +-1 InvestmentFlowBlock_total(electricityBus_storage1_1) ++1 InvestmentFlowBlock_total(electricityBus_storage1_2) +-1 InvestmentFlowBlock_invest(electricityBus_storage1_2) ++1 InvestmentFlowBlock_old(electricityBus_storage1_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage1_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage1_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage1_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage1_electricityBus_1)_: +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) ++1 InvestmentFlowBlock_total(storage1_electricityBus_1) +-1 InvestmentFlowBlock_invest(storage1_electricityBus_1) ++1 InvestmentFlowBlock_old(storage1_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage1_electricityBus_2)_: +-1 InvestmentFlowBlock_total(storage1_electricityBus_1) ++1 InvestmentFlowBlock_total(storage1_electricityBus_2) +-1 InvestmentFlowBlock_invest(storage1_electricityBus_2) ++1 InvestmentFlowBlock_old(storage1_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage1_0)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage1_1)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage1_2)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage1_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(storage1_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage1_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(storage1_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage1_electricityBus_2)_: ++1 InvestmentFlowBlock_old_end(storage1_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage1_0)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage1_1)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage1_2)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage1_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(storage1_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage1_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(storage1_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage1_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(storage1_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage1_0)_: +-1 InvestmentFlowBlock_old_end(electricityBus_storage1_0) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage1_0) ++1 InvestmentFlowBlock_old(electricityBus_storage1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage1_1)_: ++1 InvestmentFlowBlock_old(electricityBus_storage1_1) +-1 InvestmentFlowBlock_old_end(electricityBus_storage1_1) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage1_2)_: ++1 InvestmentFlowBlock_old(electricityBus_storage1_2) +-1 InvestmentFlowBlock_old_end(electricityBus_storage1_2) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage1_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(storage1_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(storage1_electricityBus_0) ++1 InvestmentFlowBlock_old(storage1_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage1_electricityBus_1)_: ++1 InvestmentFlowBlock_old(storage1_electricityBus_1) +-1 InvestmentFlowBlock_old_end(storage1_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(storage1_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage1_electricityBus_2)_: ++1 InvestmentFlowBlock_old(storage1_electricityBus_2) +-1 InvestmentFlowBlock_old_end(storage1_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(storage1_electricityBus_2) += 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_0)_: ++1 flow(electricityBus_storage1_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_1)_: ++1 flow(electricityBus_storage1_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage1_1_2)_: ++1 flow(electricityBus_storage1_1_2) +-1 InvestmentFlowBlock_total(electricityBus_storage1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage1_1_3)_: ++1 flow(electricityBus_storage1_1_3) +-1 InvestmentFlowBlock_total(electricityBus_storage1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage1_2_4)_: ++1 flow(electricityBus_storage1_2_4) +-1 InvestmentFlowBlock_total(electricityBus_storage1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage1_2_5)_: ++1 flow(electricityBus_storage1_2_5) +-1 InvestmentFlowBlock_total(electricityBus_storage1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage1_electricityBus_1_2)_: ++1 flow(storage1_electricityBus_1_2) +-1 InvestmentFlowBlock_total(storage1_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage1_electricityBus_1_3)_: ++1 flow(storage1_electricityBus_1_3) +-1 InvestmentFlowBlock_total(storage1_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage1_electricityBus_2_4)_: ++1 flow(storage1_electricityBus_2_4) +-1 InvestmentFlowBlock_total(storage1_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage1_electricityBus_2_5)_: ++1 flow(storage1_electricityBus_2_5) +-1 InvestmentFlowBlock_total(storage1_electricityBus_2) +<= 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_: +-1 GenericInvestmentStorageBlock_invest(storage1_0) ++1 GenericInvestmentStorageBlock_total(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_1)_: +-1 GenericInvestmentStorageBlock_invest(storage1_1) +-1 GenericInvestmentStorageBlock_total(storage1_0) ++1 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_old(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_2)_: +-1 GenericInvestmentStorageBlock_invest(storage1_2) +-1 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_total(storage1_2) ++1 GenericInvestmentStorageBlock_old(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage1_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage1_1)_: ++1 GenericInvestmentStorageBlock_old_end(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage1_2)_: ++1 GenericInvestmentStorageBlock_old_end(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage1_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage1_0) +-1 GenericInvestmentStorageBlock_old_exo(storage1_0) ++1 GenericInvestmentStorageBlock_old(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage1_1)_: ++1 GenericInvestmentStorageBlock_old(storage1_1) +-1 GenericInvestmentStorageBlock_old_end(storage1_1) +-1 GenericInvestmentStorageBlock_old_exo(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage1_2)_: ++1 GenericInvestmentStorageBlock_old(storage1_2) +-1 GenericInvestmentStorageBlock_old_end(storage1_2) +-1 GenericInvestmentStorageBlock_old_exo(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage1_0)_: ++1 GenericInvestmentStorageBlock_storage_content(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_0_1)_: +-0.97 flow(electricityBus_storage1_0_1) ++1.1627906976744187 flow(storage1_electricityBus_0_1) +-0.87 GenericInvestmentStorageBlock_storage_content(storage1_0) ++1 GenericInvestmentStorageBlock_storage_content(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_1_2)_: +-0.97 flow(electricityBus_storage1_1_2) ++1.1627906976744187 flow(storage1_electricityBus_1_2) +-0.87 GenericInvestmentStorageBlock_storage_content(storage1_1) ++1 GenericInvestmentStorageBlock_storage_content(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_1_3)_: +-0.97 flow(electricityBus_storage1_1_3) ++1.1627906976744187 flow(storage1_electricityBus_1_3) +-0.87 GenericInvestmentStorageBlock_storage_content(storage1_2) ++1 GenericInvestmentStorageBlock_storage_content(storage1_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_2_4)_: +-0.97 flow(electricityBus_storage1_2_4) ++1.1627906976744187 flow(storage1_electricityBus_2_4) +-0.87 GenericInvestmentStorageBlock_storage_content(storage1_3) ++1 GenericInvestmentStorageBlock_storage_content(storage1_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_2_5)_: +-0.97 flow(electricityBus_storage1_2_5) ++1.1627906976744187 flow(storage1_electricityBus_2_5) +-0.87 GenericInvestmentStorageBlock_storage_content(storage1_4) ++1 GenericInvestmentStorageBlock_storage_content(storage1_5) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage1_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_1)_: ++1 InvestmentFlowBlock_total(electricityBus_storage1_1) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_2)_: ++1 InvestmentFlowBlock_total(electricityBus_storage1_2) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_0)_: ++1 InvestmentFlowBlock_total(storage1_electricityBus_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_1)_: ++1 InvestmentFlowBlock_total(storage1_electricityBus_1) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_2)_: ++1 InvestmentFlowBlock_total(storage1_electricityBus_2) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_2) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_0) ++1 GenericInvestmentStorageBlock_storage_content(storage1_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_1)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_0) ++1 GenericInvestmentStorageBlock_storage_content(storage1_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_2)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_storage_content(storage1_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_3)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_storage_content(storage1_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_4)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_2) ++1 GenericInvestmentStorageBlock_storage_content(storage1_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_5)_: +-0.9 GenericInvestmentStorageBlock_total(storage1_2) ++1 GenericInvestmentStorageBlock_storage_content(storage1_5) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_0)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_0) +-1 GenericInvestmentStorageBlock_storage_content(storage1_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_1)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_0) +-1 GenericInvestmentStorageBlock_storage_content(storage1_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_1_2)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_1) +-1 GenericInvestmentStorageBlock_storage_content(storage1_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_1_3)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_1) +-1 GenericInvestmentStorageBlock_storage_content(storage1_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_2_4)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_2) +-1 GenericInvestmentStorageBlock_storage_content(storage1_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_2_5)_: ++0.1 GenericInvestmentStorageBlock_total(storage1_2) +-1 GenericInvestmentStorageBlock_storage_content(storage1_5) +<= 0 + +c_u_GenericInvestmentStorageBlock_overall_storage_maximum(storage1_0)_: ++1 GenericInvestmentStorageBlock_total(storage1_0) +<= 1000 + +c_u_GenericInvestmentStorageBlock_overall_storage_maximum(storage1_1)_: ++1 GenericInvestmentStorageBlock_total(storage1_1) +<= 1000 + +c_u_GenericInvestmentStorageBlock_overall_storage_maximum(storage1_2)_: ++1 GenericInvestmentStorageBlock_total(storage1_2) +<= 1000 + +c_l_GenericInvestmentStorageBlock_overall_minimum(storage1)_: ++1 GenericInvestmentStorageBlock_total(storage1_2) +>= 2 + +bounds + 0 <= flow(electricityBus_storage1_0_0) <= +inf + 0 <= flow(electricityBus_storage1_0_1) <= +inf + 0 <= flow(electricityBus_storage1_1_2) <= +inf + 0 <= flow(electricityBus_storage1_1_3) <= +inf + 0 <= flow(electricityBus_storage1_2_4) <= +inf + 0 <= flow(electricityBus_storage1_2_5) <= +inf + 0 <= flow(storage1_electricityBus_0_0) <= +inf + 0 <= flow(storage1_electricityBus_0_1) <= +inf + 0 <= flow(storage1_electricityBus_1_2) <= +inf + 0 <= flow(storage1_electricityBus_1_3) <= +inf + 0 <= flow(storage1_electricityBus_2_4) <= +inf + 0 <= flow(storage1_electricityBus_2_5) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage1_0) <= 234 + 0 <= GenericInvestmentStorageBlock_invest(storage1_1) <= 234 + 0 <= GenericInvestmentStorageBlock_invest(storage1_2) <= 234 + 0 <= InvestmentFlowBlock_total(electricityBus_storage1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage1_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage1_1) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage1_1) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage1_1) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage1_2) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage1_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage1_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage1_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage1_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage1_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_invest(storage1_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(storage1_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(storage1_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_invest(storage1_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage1_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage1_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage1_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage1_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage1_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage1_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage1_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage1_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage1_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage1_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage1_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage1_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage1_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage1_0) <= +inf + 0 <= InvestmentFlowBlock_old(storage1_electricityBus_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_5) <= +inf +end diff --git a/tests/lp_files/storage_invest_2.lp b/tests/lp_files/storage_invest_2.lp index 9aa09e717..27a460ba8 100644 --- a/tests/lp_files/storage_invest_2.lp +++ b/tests/lp_files/storage_invest_2.lp @@ -1,82 +1,97 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+145 GenericInvestmentStorageBlock_invest(storage2) -+99 InvestmentFlowBlock_invest(electricityBus_storage2) -+9 InvestmentFlowBlock_invest(storage2_electricityBus) ++99 InvestmentFlowBlock_invest(electricityBus_storage2_0) ++9 InvestmentFlowBlock_invest(storage2_electricityBus_0) ++145 GenericInvestmentStorageBlock_invest(storage2_0) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage2_0) -+1 flow(storage2_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage2_electricityBus_0_0) +-1 flow(electricityBus_storage2_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage2_1) -+1 flow(storage2_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage2_electricityBus_0_1) +-1 flow(electricityBus_storage2_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage2_2) -+1 flow(storage2_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(storage2_electricityBus_0_2) +-1 flow(electricityBus_storage2_0_2) = 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage2_0)_: --1 InvestmentFlowBlock_invest(electricityBus_storage2) -+1 flow(electricityBus_storage2_0) +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage2_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage2_0) ++1 InvestmentFlowBlock_total(electricityBus_storage2_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage2_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(storage2_electricityBus_0) ++1 InvestmentFlowBlock_total(storage2_electricityBus_0) += 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage2_0_0)_: ++1 flow(electricityBus_storage2_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage2_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage2_1)_: --1 InvestmentFlowBlock_invest(electricityBus_storage2) -+1 flow(electricityBus_storage2_1) +c_u_InvestmentFlowBlock_max(electricityBus_storage2_0_1)_: ++1 flow(electricityBus_storage2_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage2_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage2_2)_: --1 InvestmentFlowBlock_invest(electricityBus_storage2) -+1 flow(electricityBus_storage2_2) +c_u_InvestmentFlowBlock_max(electricityBus_storage2_0_2)_: ++1 flow(electricityBus_storage2_0_2) +-1 InvestmentFlowBlock_total(electricityBus_storage2_0) <= 0 -c_u_InvestmentFlowBlock_max(storage2_electricityBus_0)_: --1 InvestmentFlowBlock_invest(storage2_electricityBus) -+1 flow(storage2_electricityBus_0) +c_u_InvestmentFlowBlock_max(storage2_electricityBus_0_0)_: ++1 flow(storage2_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage2_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(storage2_electricityBus_1)_: --1 InvestmentFlowBlock_invest(storage2_electricityBus) -+1 flow(storage2_electricityBus_1) +c_u_InvestmentFlowBlock_max(storage2_electricityBus_0_1)_: ++1 flow(storage2_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage2_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(storage2_electricityBus_2)_: --1 InvestmentFlowBlock_invest(storage2_electricityBus) -+1 flow(storage2_electricityBus_2) +c_u_InvestmentFlowBlock_max(storage2_electricityBus_0_2)_: ++1 flow(storage2_electricityBus_0_2) +-1 InvestmentFlowBlock_total(storage2_electricityBus_0) <= 0 +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage2_0)_: +-1 GenericInvestmentStorageBlock_invest(storage2_0) ++1 GenericInvestmentStorageBlock_total(storage2_0) += 0 + c_e_GenericInvestmentStorageBlock_init_content_fix(storage2)_: +-0.5 GenericInvestmentStorageBlock_invest(storage2_0) +1 GenericInvestmentStorageBlock_init_content(storage2) --0.5 GenericInvestmentStorageBlock_invest(storage2) = 0 c_e_GenericInvestmentStorageBlock_balance_first(storage2)_: ++1 flow(storage2_electricityBus_0_0) +-1 flow(electricityBus_storage2_0_0) -1 GenericInvestmentStorageBlock_init_content(storage2) +1 GenericInvestmentStorageBlock_storage_content(storage2_0) --1 flow(electricityBus_storage2_0) -+1 flow(storage2_electricityBus_0) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage2_1)_: +c_e_GenericInvestmentStorageBlock_balance(storage2_0_1)_: ++1 flow(storage2_electricityBus_0_1) +-1 flow(electricityBus_storage2_0_1) -1 GenericInvestmentStorageBlock_storage_content(storage2_0) +1 GenericInvestmentStorageBlock_storage_content(storage2_1) --1 flow(electricityBus_storage2_1) -+1 flow(storage2_electricityBus_1) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage2_2)_: +c_e_GenericInvestmentStorageBlock_balance(storage2_0_2)_: ++1 flow(storage2_electricityBus_0_2) +-1 flow(electricityBus_storage2_0_2) -1 GenericInvestmentStorageBlock_storage_content(storage2_1) +1 GenericInvestmentStorageBlock_storage_content(storage2_2) --1 flow(electricityBus_storage2_2) -+1 flow(storage2_electricityBus_2) = 0 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage2)_: @@ -84,36 +99,36 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage2)_: +1 GenericInvestmentStorageBlock_storage_content(storage2_2) = 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_0)_: --1 GenericInvestmentStorageBlock_invest(storage2) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage2_0) +1 GenericInvestmentStorageBlock_storage_content(storage2_0) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_1)_: --1 GenericInvestmentStorageBlock_invest(storage2) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage2_0) +1 GenericInvestmentStorageBlock_storage_content(storage2_1) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_2)_: --1 GenericInvestmentStorageBlock_invest(storage2) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_0_2)_: +-1 GenericInvestmentStorageBlock_total(storage2_0) +1 GenericInvestmentStorageBlock_storage_content(storage2_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(electricityBus_storage2_0) <= +inf - 0 <= flow(electricityBus_storage2_1) <= +inf - 0 <= flow(electricityBus_storage2_2) <= +inf - 0 <= flow(storage2_electricityBus_0) <= +inf - 0 <= flow(storage2_electricityBus_1) <= +inf - 0 <= flow(storage2_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(electricityBus_storage2) <= +inf - 0 <= InvestmentFlowBlock_invest(storage2_electricityBus) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage2_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage2_electricityBus_0) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage2_0) <= +inf + 0 <= flow(storage2_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage2_0_0) <= +inf + 0 <= flow(storage2_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage2_0_1) <= +inf + 0 <= flow(storage2_electricityBus_0_2) <= +inf + 0 <= flow(electricityBus_storage2_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage2_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage2_electricityBus_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage2_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage2) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage2_0) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage2_1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage2_2) <= +inf - 0 <= GenericInvestmentStorageBlock_invest(storage2) <= +inf - 0 <= GenericInvestmentStorageBlock_init_content(storage2) <= +inf end diff --git a/tests/lp_files/storage_invest_2_multi_period.lp b/tests/lp_files/storage_invest_2_multi_period.lp new file mode 100644 index 000000000..2331318ef --- /dev/null +++ b/tests/lp_files/storage_invest_2_multi_period.lp @@ -0,0 +1,423 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++121.09030188807486 InvestmentFlowBlock_invest(electricityBus_storage2_0) ++118.71598224321065 InvestmentFlowBlock_invest(electricityBus_storage2_1) ++116.38821788550062 InvestmentFlowBlock_invest(electricityBus_storage2_2) ++11.00820926255226 InvestmentFlowBlock_invest(storage2_electricityBus_0) ++10.792362022110058 InvestmentFlowBlock_invest(storage2_electricityBus_1) ++10.580747080500057 InvestmentFlowBlock_invest(storage2_electricityBus_2) ++177.35448256334197 GenericInvestmentStorageBlock_invest(storage2_0) ++173.87694368955096 GenericInvestmentStorageBlock_invest(storage2_1) ++170.46759185250093 GenericInvestmentStorageBlock_invest(storage2_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage2_electricityBus_0_0) +-1 flow(electricityBus_storage2_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage2_electricityBus_0_1) +-1 flow(electricityBus_storage2_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(storage2_electricityBus_1_2) +-1 flow(electricityBus_storage2_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(storage2_electricityBus_1_3) +-1 flow(electricityBus_storage2_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(storage2_electricityBus_2_4) +-1 flow(electricityBus_storage2_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(storage2_electricityBus_2_5) +-1 flow(electricityBus_storage2_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage2_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage2_0) ++1 InvestmentFlowBlock_total(electricityBus_storage2_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage2_1)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage2_1) +-1 InvestmentFlowBlock_total(electricityBus_storage2_0) ++1 InvestmentFlowBlock_total(electricityBus_storage2_1) ++1 InvestmentFlowBlock_old(electricityBus_storage2_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage2_2)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage2_2) +-1 InvestmentFlowBlock_total(electricityBus_storage2_1) ++1 InvestmentFlowBlock_total(electricityBus_storage2_2) ++1 InvestmentFlowBlock_old(electricityBus_storage2_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage2_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(storage2_electricityBus_0) ++1 InvestmentFlowBlock_total(storage2_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage2_electricityBus_1)_: +-1 InvestmentFlowBlock_invest(storage2_electricityBus_1) +-1 InvestmentFlowBlock_total(storage2_electricityBus_0) ++1 InvestmentFlowBlock_total(storage2_electricityBus_1) ++1 InvestmentFlowBlock_old(storage2_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage2_electricityBus_2)_: +-1 InvestmentFlowBlock_invest(storage2_electricityBus_2) +-1 InvestmentFlowBlock_total(storage2_electricityBus_1) ++1 InvestmentFlowBlock_total(storage2_electricityBus_2) ++1 InvestmentFlowBlock_old(storage2_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage2_0)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage2_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage2_1)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage2_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage2_2)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage2_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage2_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(storage2_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage2_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(storage2_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage2_electricityBus_2)_: ++1 InvestmentFlowBlock_old_end(storage2_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage2_0)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage2_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage2_1)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage2_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage2_2)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage2_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage2_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(storage2_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage2_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(storage2_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage2_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(storage2_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage2_0)_: +-1 InvestmentFlowBlock_old_end(electricityBus_storage2_0) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage2_0) ++1 InvestmentFlowBlock_old(electricityBus_storage2_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage2_1)_: ++1 InvestmentFlowBlock_old(electricityBus_storage2_1) +-1 InvestmentFlowBlock_old_end(electricityBus_storage2_1) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage2_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage2_2)_: ++1 InvestmentFlowBlock_old(electricityBus_storage2_2) +-1 InvestmentFlowBlock_old_end(electricityBus_storage2_2) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage2_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage2_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(storage2_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(storage2_electricityBus_0) ++1 InvestmentFlowBlock_old(storage2_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage2_electricityBus_1)_: ++1 InvestmentFlowBlock_old(storage2_electricityBus_1) +-1 InvestmentFlowBlock_old_end(storage2_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(storage2_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage2_electricityBus_2)_: ++1 InvestmentFlowBlock_old(storage2_electricityBus_2) +-1 InvestmentFlowBlock_old_end(storage2_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(storage2_electricityBus_2) += 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage2_0_0)_: ++1 flow(electricityBus_storage2_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage2_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage2_0_1)_: ++1 flow(electricityBus_storage2_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage2_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage2_1_2)_: ++1 flow(electricityBus_storage2_1_2) +-1 InvestmentFlowBlock_total(electricityBus_storage2_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage2_1_3)_: ++1 flow(electricityBus_storage2_1_3) +-1 InvestmentFlowBlock_total(electricityBus_storage2_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage2_2_4)_: ++1 flow(electricityBus_storage2_2_4) +-1 InvestmentFlowBlock_total(electricityBus_storage2_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage2_2_5)_: ++1 flow(electricityBus_storage2_2_5) +-1 InvestmentFlowBlock_total(electricityBus_storage2_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage2_electricityBus_0_0)_: ++1 flow(storage2_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage2_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage2_electricityBus_0_1)_: ++1 flow(storage2_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage2_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage2_electricityBus_1_2)_: ++1 flow(storage2_electricityBus_1_2) +-1 InvestmentFlowBlock_total(storage2_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage2_electricityBus_1_3)_: ++1 flow(storage2_electricityBus_1_3) +-1 InvestmentFlowBlock_total(storage2_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage2_electricityBus_2_4)_: ++1 flow(storage2_electricityBus_2_4) +-1 InvestmentFlowBlock_total(storage2_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage2_electricityBus_2_5)_: ++1 flow(storage2_electricityBus_2_5) +-1 InvestmentFlowBlock_total(storage2_electricityBus_2) +<= 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage2_0)_: +-1 GenericInvestmentStorageBlock_invest(storage2_0) ++1 GenericInvestmentStorageBlock_total(storage2_0) += 20 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage2_1)_: +-1 GenericInvestmentStorageBlock_invest(storage2_1) +-1 GenericInvestmentStorageBlock_total(storage2_0) ++1 GenericInvestmentStorageBlock_total(storage2_1) ++1 GenericInvestmentStorageBlock_old(storage2_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage2_2)_: +-1 GenericInvestmentStorageBlock_invest(storage2_2) +-1 GenericInvestmentStorageBlock_total(storage2_1) ++1 GenericInvestmentStorageBlock_total(storage2_2) ++1 GenericInvestmentStorageBlock_old(storage2_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage2_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage2_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage2_1)_: ++1 GenericInvestmentStorageBlock_old_end(storage2_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage2_2)_: ++1 GenericInvestmentStorageBlock_old_end(storage2_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage2_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage2_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage2_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage2_1) += 20 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage2_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage2_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage2_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage2_0) +-1 GenericInvestmentStorageBlock_old_exo(storage2_0) ++1 GenericInvestmentStorageBlock_old(storage2_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage2_1)_: ++1 GenericInvestmentStorageBlock_old(storage2_1) +-1 GenericInvestmentStorageBlock_old_end(storage2_1) +-1 GenericInvestmentStorageBlock_old_exo(storage2_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage2_2)_: ++1 GenericInvestmentStorageBlock_old(storage2_2) +-1 GenericInvestmentStorageBlock_old_end(storage2_2) +-1 GenericInvestmentStorageBlock_old_exo(storage2_2) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage2_0)_: ++1 GenericInvestmentStorageBlock_storage_content(storage2_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage2_0_1)_: ++1 flow(storage2_electricityBus_0_1) +-1 flow(electricityBus_storage2_0_1) +-1 GenericInvestmentStorageBlock_storage_content(storage2_0) ++1 GenericInvestmentStorageBlock_storage_content(storage2_1) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage2_1_2)_: ++1 flow(storage2_electricityBus_1_2) +-1 flow(electricityBus_storage2_1_2) +-1 GenericInvestmentStorageBlock_storage_content(storage2_1) ++1 GenericInvestmentStorageBlock_storage_content(storage2_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage2_1_3)_: ++1 flow(storage2_electricityBus_1_3) +-1 flow(electricityBus_storage2_1_3) +-1 GenericInvestmentStorageBlock_storage_content(storage2_2) ++1 GenericInvestmentStorageBlock_storage_content(storage2_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage2_2_4)_: ++1 flow(storage2_electricityBus_2_4) +-1 flow(electricityBus_storage2_2_4) +-1 GenericInvestmentStorageBlock_storage_content(storage2_3) ++1 GenericInvestmentStorageBlock_storage_content(storage2_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage2_2_5)_: ++1 flow(storage2_electricityBus_2_5) +-1 flow(electricityBus_storage2_2_5) +-1 GenericInvestmentStorageBlock_storage_content(storage2_4) ++1 GenericInvestmentStorageBlock_storage_content(storage2_5) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage2_0) ++1 GenericInvestmentStorageBlock_storage_content(storage2_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage2_0) ++1 GenericInvestmentStorageBlock_storage_content(storage2_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_1_2)_: +-1 GenericInvestmentStorageBlock_total(storage2_1) ++1 GenericInvestmentStorageBlock_storage_content(storage2_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_1_3)_: +-1 GenericInvestmentStorageBlock_total(storage2_1) ++1 GenericInvestmentStorageBlock_storage_content(storage2_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_2_4)_: +-1 GenericInvestmentStorageBlock_total(storage2_2) ++1 GenericInvestmentStorageBlock_storage_content(storage2_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_2_5)_: +-1 GenericInvestmentStorageBlock_total(storage2_2) ++1 GenericInvestmentStorageBlock_storage_content(storage2_5) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(electricityBus_storage2_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage2_1) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage2_2) <= +inf + 0 <= InvestmentFlowBlock_invest(storage2_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage2_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_invest(storage2_electricityBus_2) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage2_0) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage2_1) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage2_2) <= +inf + 0 <= flow(storage2_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage2_0_0) <= +inf + 0 <= flow(storage2_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage2_0_1) <= +inf + 0 <= flow(storage2_electricityBus_1_2) <= +inf + 0 <= flow(electricityBus_storage2_1_2) <= +inf + 0 <= flow(storage2_electricityBus_1_3) <= +inf + 0 <= flow(electricityBus_storage2_1_3) <= +inf + 0 <= flow(storage2_electricityBus_2_4) <= +inf + 0 <= flow(electricityBus_storage2_2_4) <= +inf + 0 <= flow(storage2_electricityBus_2_5) <= +inf + 0 <= flow(electricityBus_storage2_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage2_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage2_1) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage2_1) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage2_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage2_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage2_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage2_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(storage2_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(storage2_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage2_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage2_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage2_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage2_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage2_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage2_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage2_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage2_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage2_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage2_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage2_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage2_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage2_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage2_0) <= +inf + 0 <= InvestmentFlowBlock_old(storage2_electricityBus_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage2_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage2_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage2_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage2_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage2_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage2_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage2_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage2_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage2_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage2_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage2_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage2_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage2_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage2_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage2_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage2_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage2_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage2_5) <= +inf +end diff --git a/tests/lp_files/storage_invest_3.lp b/tests/lp_files/storage_invest_3.lp index b5924abd3..589d7e814 100644 --- a/tests/lp_files/storage_invest_3.lp +++ b/tests/lp_files/storage_invest_3.lp @@ -2,75 +2,85 @@ min objective: -+99 InvestmentFlowBlock_invest(electricityBus_storage3) -+9 InvestmentFlowBlock_invest(storage3_electricityBus) ++9 InvestmentFlowBlock_invest(storage3_electricityBus_0) ++99 InvestmentFlowBlock_invest(electricityBus_storage3_0) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage3_0) -+1 flow(storage3_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage3_electricityBus_0_0) +-1 flow(electricityBus_storage3_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage3_1) -+1 flow(storage3_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage3_electricityBus_0_1) +-1 flow(electricityBus_storage3_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage3_2) -+1 flow(storage3_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(storage3_electricityBus_0_2) +-1 flow(electricityBus_storage3_0_2) = 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage3_0)_: --1 InvestmentFlowBlock_invest(electricityBus_storage3) -+1 flow(electricityBus_storage3_0) +c_e_InvestmentFlowBlock_total_rule(storage3_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(storage3_electricityBus_0) ++1 InvestmentFlowBlock_total(storage3_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage3_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage3_0) ++1 InvestmentFlowBlock_total(electricityBus_storage3_0) += 0 + +c_u_InvestmentFlowBlock_max(storage3_electricityBus_0_0)_: ++1 flow(storage3_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage3_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage3_1)_: --1 InvestmentFlowBlock_invest(electricityBus_storage3) -+1 flow(electricityBus_storage3_1) +c_u_InvestmentFlowBlock_max(storage3_electricityBus_0_1)_: ++1 flow(storage3_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage3_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage3_2)_: --1 InvestmentFlowBlock_invest(electricityBus_storage3) -+1 flow(electricityBus_storage3_2) +c_u_InvestmentFlowBlock_max(storage3_electricityBus_0_2)_: ++1 flow(storage3_electricityBus_0_2) +-1 InvestmentFlowBlock_total(storage3_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(storage3_electricityBus_0)_: --1 InvestmentFlowBlock_invest(storage3_electricityBus) -+1 flow(storage3_electricityBus_0) +c_u_InvestmentFlowBlock_max(electricityBus_storage3_0_0)_: ++1 flow(electricityBus_storage3_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage3_0) <= 0 -c_u_InvestmentFlowBlock_max(storage3_electricityBus_1)_: --1 InvestmentFlowBlock_invest(storage3_electricityBus) -+1 flow(storage3_electricityBus_1) +c_u_InvestmentFlowBlock_max(electricityBus_storage3_0_1)_: ++1 flow(electricityBus_storage3_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage3_0) <= 0 -c_u_InvestmentFlowBlock_max(storage3_electricityBus_2)_: --1 InvestmentFlowBlock_invest(storage3_electricityBus) -+1 flow(storage3_electricityBus_2) +c_u_InvestmentFlowBlock_max(electricityBus_storage3_0_2)_: ++1 flow(electricityBus_storage3_0_2) +-1 InvestmentFlowBlock_total(electricityBus_storage3_0) <= 0 -c_e_GenericStorageBlock_balance(storage3_0)_: --1 GenericStorageBlock_storage_content(storage3_0) +c_e_GenericStorageBlock_balance(storage3_0_0)_: ++1 flow(storage3_electricityBus_0_0) +-1 flow(electricityBus_storage3_0_0) +1 GenericStorageBlock_storage_content(storage3_1) --1 flow(electricityBus_storage3_0) -+1 flow(storage3_electricityBus_0) +-1 GenericStorageBlock_storage_content(storage3_0) = 0 -c_e_GenericStorageBlock_balance(storage3_1)_: +c_e_GenericStorageBlock_balance(storage3_0_1)_: ++1 flow(storage3_electricityBus_0_1) +-1 flow(electricityBus_storage3_0_1) -1 GenericStorageBlock_storage_content(storage3_1) +1 GenericStorageBlock_storage_content(storage3_2) --1 flow(electricityBus_storage3_1) -+1 flow(storage3_electricityBus_1) = 0 -c_e_GenericStorageBlock_balance(storage3_2)_: +c_e_GenericStorageBlock_balance(storage3_0_2)_: ++1 flow(storage3_electricityBus_0_2) +-1 flow(electricityBus_storage3_0_2) -1 GenericStorageBlock_storage_content(storage3_2) +1 GenericStorageBlock_storage_content(storage3_3) --1 flow(electricityBus_storage3_2) -+1 flow(storage3_electricityBus_2) = 0 c_e_GenericStorageBlock_balanced_cstr(storage3)_: @@ -78,20 +88,19 @@ c_e_GenericStorageBlock_balanced_cstr(storage3)_: +1 GenericStorageBlock_storage_content(storage3_3) = 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(electricityBus_storage3_0) <= +inf - 0 <= flow(electricityBus_storage3_1) <= +inf - 0 <= flow(electricityBus_storage3_2) <= +inf - 0 <= flow(storage3_electricityBus_0) <= +inf - 0 <= flow(storage3_electricityBus_1) <= +inf - 0 <= flow(storage3_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(electricityBus_storage3) <= +inf - 0 <= InvestmentFlowBlock_invest(storage3_electricityBus) <= +inf - 0 <= GenericStorageBlock_storage_content(storage3_0) <= 5000 + 0 <= InvestmentFlowBlock_invest(storage3_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage3_0) <= +inf + 0 <= flow(storage3_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage3_0_0) <= +inf + 0 <= flow(storage3_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage3_0_1) <= +inf + 0 <= flow(storage3_electricityBus_0_2) <= +inf + 0 <= flow(electricityBus_storage3_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage3_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage3_0) <= +inf 0 <= GenericStorageBlock_storage_content(storage3_1) <= 5000 + 0 <= GenericStorageBlock_storage_content(storage3_0) <= 5000 0 <= GenericStorageBlock_storage_content(storage3_2) <= 5000 0 <= GenericStorageBlock_storage_content(storage3_3) <= 5000 end diff --git a/tests/lp_files/storage_invest_3_multi_period.lp b/tests/lp_files/storage_invest_3_multi_period.lp new file mode 100644 index 000000000..2fc9750d0 --- /dev/null +++ b/tests/lp_files/storage_invest_3_multi_period.lp @@ -0,0 +1,324 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++101.97980198019803 InvestmentFlowBlock_invest(electricityBus_storage3_0) ++99.98019801980199 InvestmentFlowBlock_invest(electricityBus_storage3_1) ++98.01980198019803 InvestmentFlowBlock_invest(electricityBus_storage3_2) ++11.00820926255226 InvestmentFlowBlock_invest(storage3_electricityBus_0) ++10.792362022110058 InvestmentFlowBlock_invest(storage3_electricityBus_1) ++10.580747080500057 InvestmentFlowBlock_invest(storage3_electricityBus_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage3_electricityBus_0_0) +-1 flow(electricityBus_storage3_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage3_electricityBus_0_1) +-1 flow(electricityBus_storage3_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(storage3_electricityBus_1_2) +-1 flow(electricityBus_storage3_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(storage3_electricityBus_1_3) +-1 flow(electricityBus_storage3_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(storage3_electricityBus_2_4) +-1 flow(electricityBus_storage3_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(storage3_electricityBus_2_5) +-1 flow(electricityBus_storage3_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage3_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage3_0) ++1 InvestmentFlowBlock_total(electricityBus_storage3_0) += 10 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage3_1)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage3_1) +-1 InvestmentFlowBlock_total(electricityBus_storage3_0) ++1 InvestmentFlowBlock_total(electricityBus_storage3_1) ++1 InvestmentFlowBlock_old(electricityBus_storage3_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage3_2)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage3_2) +-1 InvestmentFlowBlock_total(electricityBus_storage3_1) ++1 InvestmentFlowBlock_total(electricityBus_storage3_2) ++1 InvestmentFlowBlock_old(electricityBus_storage3_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage3_electricityBus_0)_: +-1 InvestmentFlowBlock_invest(storage3_electricityBus_0) ++1 InvestmentFlowBlock_total(storage3_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage3_electricityBus_1)_: +-1 InvestmentFlowBlock_invest(storage3_electricityBus_1) +-1 InvestmentFlowBlock_total(storage3_electricityBus_0) ++1 InvestmentFlowBlock_total(storage3_electricityBus_1) ++1 InvestmentFlowBlock_old(storage3_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage3_electricityBus_2)_: +-1 InvestmentFlowBlock_invest(storage3_electricityBus_2) +-1 InvestmentFlowBlock_total(storage3_electricityBus_1) ++1 InvestmentFlowBlock_total(storage3_electricityBus_2) ++1 InvestmentFlowBlock_old(storage3_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage3_0)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage3_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage3_1)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage3_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage3_2)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage3_0) ++1 InvestmentFlowBlock_old_end(electricityBus_storage3_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage3_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(storage3_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage3_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(storage3_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage3_electricityBus_2)_: ++1 InvestmentFlowBlock_old_end(storage3_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage3_0)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage3_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage3_1)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage3_1) += 10 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage3_2)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage3_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage3_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(storage3_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage3_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(storage3_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage3_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(storage3_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage3_0)_: +-1 InvestmentFlowBlock_old_end(electricityBus_storage3_0) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage3_0) ++1 InvestmentFlowBlock_old(electricityBus_storage3_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage3_1)_: ++1 InvestmentFlowBlock_old(electricityBus_storage3_1) +-1 InvestmentFlowBlock_old_end(electricityBus_storage3_1) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage3_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage3_2)_: ++1 InvestmentFlowBlock_old(electricityBus_storage3_2) +-1 InvestmentFlowBlock_old_end(electricityBus_storage3_2) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage3_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage3_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(storage3_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(storage3_electricityBus_0) ++1 InvestmentFlowBlock_old(storage3_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage3_electricityBus_1)_: ++1 InvestmentFlowBlock_old(storage3_electricityBus_1) +-1 InvestmentFlowBlock_old_end(storage3_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(storage3_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage3_electricityBus_2)_: ++1 InvestmentFlowBlock_old(storage3_electricityBus_2) +-1 InvestmentFlowBlock_old_end(storage3_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(storage3_electricityBus_2) += 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage3_0_0)_: ++1 flow(electricityBus_storage3_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage3_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage3_0_1)_: ++1 flow(electricityBus_storage3_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage3_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage3_1_2)_: ++1 flow(electricityBus_storage3_1_2) +-1 InvestmentFlowBlock_total(electricityBus_storage3_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage3_1_3)_: ++1 flow(electricityBus_storage3_1_3) +-1 InvestmentFlowBlock_total(electricityBus_storage3_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage3_2_4)_: ++1 flow(electricityBus_storage3_2_4) +-1 InvestmentFlowBlock_total(electricityBus_storage3_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage3_2_5)_: ++1 flow(electricityBus_storage3_2_5) +-1 InvestmentFlowBlock_total(electricityBus_storage3_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage3_electricityBus_0_0)_: ++1 flow(storage3_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage3_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage3_electricityBus_0_1)_: ++1 flow(storage3_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage3_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage3_electricityBus_1_2)_: ++1 flow(storage3_electricityBus_1_2) +-1 InvestmentFlowBlock_total(storage3_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage3_electricityBus_1_3)_: ++1 flow(storage3_electricityBus_1_3) +-1 InvestmentFlowBlock_total(storage3_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage3_electricityBus_2_4)_: ++1 flow(storage3_electricityBus_2_4) +-1 InvestmentFlowBlock_total(storage3_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage3_electricityBus_2_5)_: ++1 flow(storage3_electricityBus_2_5) +-1 InvestmentFlowBlock_total(storage3_electricityBus_2) +<= 0 + +c_e_GenericStorageBlock_balance(storage3_0_0)_: ++1 flow(storage3_electricityBus_0_0) +-1 flow(electricityBus_storage3_0_0) ++1 GenericStorageBlock_storage_content(storage3_1) +-1 GenericStorageBlock_storage_content(storage3_0) += 0 + +c_e_GenericStorageBlock_balance(storage3_0_1)_: ++1 flow(storage3_electricityBus_0_1) +-1 flow(electricityBus_storage3_0_1) +-1 GenericStorageBlock_storage_content(storage3_1) ++1 GenericStorageBlock_storage_content(storage3_2) += 0 + +c_e_GenericStorageBlock_balance(storage3_1_2)_: ++1 flow(storage3_electricityBus_1_2) +-1 flow(electricityBus_storage3_1_2) +-1 GenericStorageBlock_storage_content(storage3_2) ++1 GenericStorageBlock_storage_content(storage3_3) += 0 + +c_e_GenericStorageBlock_balance(storage3_1_3)_: ++1 flow(storage3_electricityBus_1_3) +-1 flow(electricityBus_storage3_1_3) +-1 GenericStorageBlock_storage_content(storage3_3) ++1 GenericStorageBlock_storage_content(storage3_4) += 0 + +c_e_GenericStorageBlock_balance(storage3_2_4)_: ++1 flow(storage3_electricityBus_2_4) +-1 flow(electricityBus_storage3_2_4) +-1 GenericStorageBlock_storage_content(storage3_4) ++1 GenericStorageBlock_storage_content(storage3_5) += 0 + +c_e_GenericStorageBlock_balance(storage3_2_5)_: ++1 flow(storage3_electricityBus_2_5) +-1 flow(electricityBus_storage3_2_5) +-1 GenericStorageBlock_storage_content(storage3_5) ++1 GenericStorageBlock_storage_content(storage3_6) += 0 + +c_e_GenericStorageBlock_balanced_cstr(storage3)_: +-1 GenericStorageBlock_storage_content(storage3_0) ++1 GenericStorageBlock_storage_content(storage3_6) += 0 + +bounds + 0 <= InvestmentFlowBlock_invest(electricityBus_storage3_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage3_1) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage3_2) <= +inf + 0 <= InvestmentFlowBlock_invest(storage3_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage3_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_invest(storage3_electricityBus_2) <= +inf + 0 <= flow(storage3_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage3_0_0) <= +inf + 0 <= flow(storage3_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage3_0_1) <= +inf + 0 <= flow(storage3_electricityBus_1_2) <= +inf + 0 <= flow(electricityBus_storage3_1_2) <= +inf + 0 <= flow(storage3_electricityBus_1_3) <= +inf + 0 <= flow(electricityBus_storage3_1_3) <= +inf + 0 <= flow(storage3_electricityBus_2_4) <= +inf + 0 <= flow(electricityBus_storage3_2_4) <= +inf + 0 <= flow(storage3_electricityBus_2_5) <= +inf + 0 <= flow(electricityBus_storage3_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage3_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage3_1) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage3_1) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage3_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage3_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage3_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage3_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(storage3_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(storage3_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage3_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage3_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage3_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage3_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage3_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage3_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage3_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage3_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage3_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage3_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage3_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage3_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage3_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage3_0) <= +inf + 0 <= InvestmentFlowBlock_old(storage3_electricityBus_0) <= +inf + 0 <= GenericStorageBlock_storage_content(storage3_1) <= 5000 + 0 <= GenericStorageBlock_storage_content(storage3_0) <= 5000 + 0 <= GenericStorageBlock_storage_content(storage3_2) <= 5000 + 0 <= GenericStorageBlock_storage_content(storage3_3) <= 5000 + 0 <= GenericStorageBlock_storage_content(storage3_4) <= 5000 + 0 <= GenericStorageBlock_storage_content(storage3_5) <= 5000 + 0 <= GenericStorageBlock_storage_content(storage3_6) <= 5000 +end diff --git a/tests/lp_files/storage_invest_4.lp b/tests/lp_files/storage_invest_4.lp index 8d29c2d6d..66fa233a2 100644 --- a/tests/lp_files/storage_invest_4.lp +++ b/tests/lp_files/storage_invest_4.lp @@ -1,50 +1,55 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+145 GenericInvestmentStorageBlock_invest(storage4) ++145 GenericInvestmentStorageBlock_invest(storage4_0) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage4_0) -+1 flow(storage4_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage4_electricityBus_0_0) +-1 flow(electricityBus_storage4_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage4_1) -+1 flow(storage4_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage4_electricityBus_0_1) +-1 flow(electricityBus_storage4_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage4_2) -+1 flow(storage4_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(storage4_electricityBus_0_2) +-1 flow(electricityBus_storage4_0_2) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage4_0)_: +-1 GenericInvestmentStorageBlock_invest(storage4_0) ++1 GenericInvestmentStorageBlock_total(storage4_0) = 0 c_u_GenericInvestmentStorageBlock_init_content_limit(storage4)_: +-1 GenericInvestmentStorageBlock_invest(storage4_0) +1 GenericInvestmentStorageBlock_init_content(storage4) --1 GenericInvestmentStorageBlock_invest(storage4) <= 0 c_e_GenericInvestmentStorageBlock_balance_first(storage4)_: ++1 flow(storage4_electricityBus_0_0) +-1 flow(electricityBus_storage4_0_0) -1 GenericInvestmentStorageBlock_init_content(storage4) +1 GenericInvestmentStorageBlock_storage_content(storage4_0) --1 flow(electricityBus_storage4_0) -+1 flow(storage4_electricityBus_0) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage4_1)_: +c_e_GenericInvestmentStorageBlock_balance(storage4_0_1)_: ++1 flow(storage4_electricityBus_0_1) +-1 flow(electricityBus_storage4_0_1) -1 GenericInvestmentStorageBlock_storage_content(storage4_0) +1 GenericInvestmentStorageBlock_storage_content(storage4_1) --1 flow(electricityBus_storage4_1) -+1 flow(storage4_electricityBus_1) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage4_2)_: +c_e_GenericInvestmentStorageBlock_balance(storage4_0_2)_: ++1 flow(storage4_electricityBus_0_2) +-1 flow(electricityBus_storage4_0_2) -1 GenericInvestmentStorageBlock_storage_content(storage4_1) +1 GenericInvestmentStorageBlock_storage_content(storage4_2) --1 flow(electricityBus_storage4_2) -+1 flow(storage4_electricityBus_2) = 0 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage4)_: @@ -52,34 +57,32 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage4)_: +1 GenericInvestmentStorageBlock_storage_content(storage4_2) = 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_0)_: --1 GenericInvestmentStorageBlock_invest(storage4) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage4_0) +1 GenericInvestmentStorageBlock_storage_content(storage4_0) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_1)_: --1 GenericInvestmentStorageBlock_invest(storage4) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage4_0) +1 GenericInvestmentStorageBlock_storage_content(storage4_1) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_2)_: --1 GenericInvestmentStorageBlock_invest(storage4) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_0_2)_: +-1 GenericInvestmentStorageBlock_total(storage4_0) +1 GenericInvestmentStorageBlock_storage_content(storage4_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(electricityBus_storage4_0) <= 80 - 0 <= flow(electricityBus_storage4_1) <= 80 - 0 <= flow(electricityBus_storage4_2) <= 80 - 0 <= flow(storage4_electricityBus_0) <= 100 - 0 <= flow(storage4_electricityBus_1) <= 100 - 0 <= flow(storage4_electricityBus_2) <= 100 + 0 <= GenericInvestmentStorageBlock_invest(storage4_0) <= 500 + 0 <= flow(storage4_electricityBus_0_0) <= 100 + 0 <= flow(electricityBus_storage4_0_0) <= 80 + 0 <= flow(storage4_electricityBus_0_1) <= 100 + 0 <= flow(electricityBus_storage4_0_1) <= 80 + 0 <= flow(storage4_electricityBus_0_2) <= 100 + 0 <= flow(electricityBus_storage4_0_2) <= 80 + 0 <= GenericInvestmentStorageBlock_total(storage4_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage4) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage4_0) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage4_1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage4_2) <= +inf - 0 <= GenericInvestmentStorageBlock_invest(storage4) <= 500 - 0 <= GenericInvestmentStorageBlock_init_content(storage4) <= +inf end diff --git a/tests/lp_files/storage_invest_4_multi_period.lp b/tests/lp_files/storage_invest_4_multi_period.lp new file mode 100644 index 000000000..c391c9b46 --- /dev/null +++ b/tests/lp_files/storage_invest_4_multi_period.lp @@ -0,0 +1,206 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++149.3643564356436 GenericInvestmentStorageBlock_invest(storage4_0) ++146.43564356435647 GenericInvestmentStorageBlock_invest(storage4_1) ++143.5643564356436 GenericInvestmentStorageBlock_invest(storage4_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage4_electricityBus_0_0) +-1 flow(electricityBus_storage4_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage4_electricityBus_0_1) +-1 flow(electricityBus_storage4_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(storage4_electricityBus_1_2) +-1 flow(electricityBus_storage4_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(storage4_electricityBus_1_3) +-1 flow(electricityBus_storage4_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(storage4_electricityBus_2_4) +-1 flow(electricityBus_storage4_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(storage4_electricityBus_2_5) +-1 flow(electricityBus_storage4_2_5) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage4_0)_: +-1 GenericInvestmentStorageBlock_invest(storage4_0) ++1 GenericInvestmentStorageBlock_total(storage4_0) += 100 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage4_1)_: +-1 GenericInvestmentStorageBlock_invest(storage4_1) +-1 GenericInvestmentStorageBlock_total(storage4_0) ++1 GenericInvestmentStorageBlock_total(storage4_1) ++1 GenericInvestmentStorageBlock_old(storage4_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage4_2)_: +-1 GenericInvestmentStorageBlock_invest(storage4_2) +-1 GenericInvestmentStorageBlock_total(storage4_1) ++1 GenericInvestmentStorageBlock_total(storage4_2) ++1 GenericInvestmentStorageBlock_old(storage4_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage4_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage4_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage4_1)_: ++1 GenericInvestmentStorageBlock_old_end(storage4_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage4_2)_: +-1 GenericInvestmentStorageBlock_invest(storage4_0) ++1 GenericInvestmentStorageBlock_old_end(storage4_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage4_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage4_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage4_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage4_1) += 100 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage4_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage4_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage4_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage4_0) +-1 GenericInvestmentStorageBlock_old_exo(storage4_0) ++1 GenericInvestmentStorageBlock_old(storage4_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage4_1)_: ++1 GenericInvestmentStorageBlock_old(storage4_1) +-1 GenericInvestmentStorageBlock_old_end(storage4_1) +-1 GenericInvestmentStorageBlock_old_exo(storage4_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage4_2)_: ++1 GenericInvestmentStorageBlock_old(storage4_2) +-1 GenericInvestmentStorageBlock_old_end(storage4_2) +-1 GenericInvestmentStorageBlock_old_exo(storage4_2) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage4_0)_: ++1 GenericInvestmentStorageBlock_storage_content(storage4_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage4_0_1)_: ++1 flow(storage4_electricityBus_0_1) +-1 flow(electricityBus_storage4_0_1) +-1 GenericInvestmentStorageBlock_storage_content(storage4_0) ++1 GenericInvestmentStorageBlock_storage_content(storage4_1) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage4_1_2)_: ++1 flow(storage4_electricityBus_1_2) +-1 flow(electricityBus_storage4_1_2) +-1 GenericInvestmentStorageBlock_storage_content(storage4_1) ++1 GenericInvestmentStorageBlock_storage_content(storage4_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage4_1_3)_: ++1 flow(storage4_electricityBus_1_3) +-1 flow(electricityBus_storage4_1_3) +-1 GenericInvestmentStorageBlock_storage_content(storage4_2) ++1 GenericInvestmentStorageBlock_storage_content(storage4_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage4_2_4)_: ++1 flow(storage4_electricityBus_2_4) +-1 flow(electricityBus_storage4_2_4) +-1 GenericInvestmentStorageBlock_storage_content(storage4_3) ++1 GenericInvestmentStorageBlock_storage_content(storage4_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage4_2_5)_: ++1 flow(storage4_electricityBus_2_5) +-1 flow(electricityBus_storage4_2_5) +-1 GenericInvestmentStorageBlock_storage_content(storage4_4) ++1 GenericInvestmentStorageBlock_storage_content(storage4_5) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage4_0) ++1 GenericInvestmentStorageBlock_storage_content(storage4_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage4_0) ++1 GenericInvestmentStorageBlock_storage_content(storage4_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_1_2)_: +-1 GenericInvestmentStorageBlock_total(storage4_1) ++1 GenericInvestmentStorageBlock_storage_content(storage4_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_1_3)_: +-1 GenericInvestmentStorageBlock_total(storage4_1) ++1 GenericInvestmentStorageBlock_storage_content(storage4_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_2_4)_: +-1 GenericInvestmentStorageBlock_total(storage4_2) ++1 GenericInvestmentStorageBlock_storage_content(storage4_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_2_5)_: +-1 GenericInvestmentStorageBlock_total(storage4_2) ++1 GenericInvestmentStorageBlock_storage_content(storage4_5) +<= 0 + +bounds + 0 <= GenericInvestmentStorageBlock_invest(storage4_0) <= 500 + 0 <= GenericInvestmentStorageBlock_invest(storage4_1) <= 500 + 0 <= GenericInvestmentStorageBlock_invest(storage4_2) <= 500 + 0 <= flow(storage4_electricityBus_0_0) <= 100 + 0 <= flow(electricityBus_storage4_0_0) <= 80 + 0 <= flow(storage4_electricityBus_0_1) <= 100 + 0 <= flow(electricityBus_storage4_0_1) <= 80 + 0 <= flow(storage4_electricityBus_1_2) <= 100 + 0 <= flow(electricityBus_storage4_1_2) <= 80 + 0 <= flow(storage4_electricityBus_1_3) <= 100 + 0 <= flow(electricityBus_storage4_1_3) <= 80 + 0 <= flow(storage4_electricityBus_2_4) <= 100 + 0 <= flow(electricityBus_storage4_2_4) <= 80 + 0 <= flow(storage4_electricityBus_2_5) <= 100 + 0 <= flow(electricityBus_storage4_2_5) <= 80 + 0 <= GenericInvestmentStorageBlock_total(storage4_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage4_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage4_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage4_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage4_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage4_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage4_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage4_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage4_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage4_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage4_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage4_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage4_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage4_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage4_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage4_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage4_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage4_5) <= +inf +end diff --git a/tests/lp_files/storage_invest_5.lp b/tests/lp_files/storage_invest_5.lp index b3c8fd449..853f833c0 100644 --- a/tests/lp_files/storage_invest_5.lp +++ b/tests/lp_files/storage_invest_5.lp @@ -2,74 +2,84 @@ min objective: -+99 InvestmentFlowBlock_invest(electricityBus_storage5) ++99 InvestmentFlowBlock_invest(electricityBus_storage5_0) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage5_0) -+1 flow(storage5_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage5_electricityBus_0_0) +-1 flow(electricityBus_storage5_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage5_1) -+1 flow(storage5_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage5_electricityBus_0_1) +-1 flow(electricityBus_storage5_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage5_2) -+1 flow(storage5_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(storage5_electricityBus_0_2) +-1 flow(electricityBus_storage5_0_2) = 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage5_0)_: --1 InvestmentFlowBlock_invest(electricityBus_storage5) -+1 flow(electricityBus_storage5_0) -<= 110 - -c_u_InvestmentFlowBlock_max(electricityBus_storage5_1)_: --1 InvestmentFlowBlock_invest(electricityBus_storage5) -+1 flow(electricityBus_storage5_1) -<= 110 - -c_u_InvestmentFlowBlock_max(electricityBus_storage5_2)_: --1 InvestmentFlowBlock_invest(electricityBus_storage5) -+1 flow(electricityBus_storage5_2) -<= 110 - -c_u_InvestmentFlowBlock_max(storage5_electricityBus_0)_: --1 InvestmentFlowBlock_invest(storage5_electricityBus) -+1 flow(storage5_electricityBus_0) -<= 100 - -c_u_InvestmentFlowBlock_max(storage5_electricityBus_1)_: --1 InvestmentFlowBlock_invest(storage5_electricityBus) -+1 flow(storage5_electricityBus_1) -<= 100 - -c_u_InvestmentFlowBlock_max(storage5_electricityBus_2)_: --1 InvestmentFlowBlock_invest(storage5_electricityBus) -+1 flow(storage5_electricityBus_2) -<= 100 - -c_e_GenericStorageBlock_balance(storage5_0)_: --1 GenericStorageBlock_storage_content(storage5_0) +c_e_InvestmentFlowBlock_total_rule(storage5_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage5_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage5_electricityBus_0) += 100 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage5_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage5_0) ++1 InvestmentFlowBlock_total(electricityBus_storage5_0) += 110 + +c_u_InvestmentFlowBlock_max(storage5_electricityBus_0_0)_: ++1 flow(storage5_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage5_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage5_electricityBus_0_1)_: ++1 flow(storage5_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage5_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage5_electricityBus_0_2)_: ++1 flow(storage5_electricityBus_0_2) +-1 InvestmentFlowBlock_total(storage5_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage5_0_0)_: ++1 flow(electricityBus_storage5_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage5_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage5_0_1)_: ++1 flow(electricityBus_storage5_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage5_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage5_0_2)_: ++1 flow(electricityBus_storage5_0_2) +-1 InvestmentFlowBlock_total(electricityBus_storage5_0) +<= 0 + +c_e_GenericStorageBlock_balance(storage5_0_0)_: ++1 flow(storage5_electricityBus_0_0) +-1 flow(electricityBus_storage5_0_0) +1 GenericStorageBlock_storage_content(storage5_1) --1 flow(electricityBus_storage5_0) -+1 flow(storage5_electricityBus_0) +-1 GenericStorageBlock_storage_content(storage5_0) = 0 -c_e_GenericStorageBlock_balance(storage5_1)_: +c_e_GenericStorageBlock_balance(storage5_0_1)_: ++1 flow(storage5_electricityBus_0_1) +-1 flow(electricityBus_storage5_0_1) -1 GenericStorageBlock_storage_content(storage5_1) +1 GenericStorageBlock_storage_content(storage5_2) --1 flow(electricityBus_storage5_1) -+1 flow(storage5_electricityBus_1) = 0 -c_e_GenericStorageBlock_balance(storage5_2)_: +c_e_GenericStorageBlock_balance(storage5_0_2)_: ++1 flow(storage5_electricityBus_0_2) +-1 flow(electricityBus_storage5_0_2) -1 GenericStorageBlock_storage_content(storage5_2) +1 GenericStorageBlock_storage_content(storage5_3) --1 flow(electricityBus_storage5_2) -+1 flow(storage5_electricityBus_2) = 0 c_e_GenericStorageBlock_balanced_cstr(storage5)_: @@ -77,25 +87,24 @@ c_e_GenericStorageBlock_balanced_cstr(storage5)_: +1 GenericStorageBlock_storage_content(storage5_3) = 0 -c_e_GenericStorageBlock_power_coupled(storage5)_: --1 InvestmentFlowBlock_invest(electricityBus_storage5) -+1.1000000000000001 InvestmentFlowBlock_invest(storage5_electricityBus) -= -1.4210854715202004e-14 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 +c_e_GenericStorageBlock_power_coupled(storage5_0)_: ++1.1 InvestmentFlowBlock_total(storage5_electricityBus_0) +-1 InvestmentFlowBlock_total(electricityBus_storage5_0) += 0 bounds - 0 <= flow(electricityBus_storage5_0) <= +inf - 0 <= flow(electricityBus_storage5_1) <= +inf - 0 <= flow(electricityBus_storage5_2) <= +inf - 0 <= flow(storage5_electricityBus_0) <= +inf - 0 <= flow(storage5_electricityBus_1) <= +inf - 0 <= flow(storage5_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(electricityBus_storage5) <= +inf - 0 <= InvestmentFlowBlock_invest(storage5_electricityBus) <= +inf - 0 <= GenericStorageBlock_storage_content(storage5_0) <= 10000 + 0 <= InvestmentFlowBlock_invest(electricityBus_storage5_0) <= +inf + 0 <= flow(storage5_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage5_0_0) <= +inf + 0 <= flow(storage5_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage5_0_1) <= +inf + 0 <= flow(storage5_electricityBus_0_2) <= +inf + 0 <= flow(electricityBus_storage5_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage5_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage5_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage5_0) <= +inf 0 <= GenericStorageBlock_storage_content(storage5_1) <= 10000 + 0 <= GenericStorageBlock_storage_content(storage5_0) <= 10000 0 <= GenericStorageBlock_storage_content(storage5_2) <= 10000 0 <= GenericStorageBlock_storage_content(storage5_3) <= 10000 end diff --git a/tests/lp_files/storage_invest_5_multi_period.lp b/tests/lp_files/storage_invest_5_multi_period.lp new file mode 100644 index 000000000..db88b35f0 --- /dev/null +++ b/tests/lp_files/storage_invest_5_multi_period.lp @@ -0,0 +1,335 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++121.09030188807486 InvestmentFlowBlock_invest(electricityBus_storage5_0) ++118.71598224321065 InvestmentFlowBlock_invest(electricityBus_storage5_1) ++116.38821788550062 InvestmentFlowBlock_invest(electricityBus_storage5_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage5_electricityBus_0_0) +-1 flow(electricityBus_storage5_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage5_electricityBus_0_1) +-1 flow(electricityBus_storage5_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(storage5_electricityBus_1_2) +-1 flow(electricityBus_storage5_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(storage5_electricityBus_1_3) +-1 flow(electricityBus_storage5_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(storage5_electricityBus_2_4) +-1 flow(electricityBus_storage5_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(storage5_electricityBus_2_5) +-1 flow(electricityBus_storage5_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage5_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage5_0) ++1 InvestmentFlowBlock_total(electricityBus_storage5_0) += 110 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage5_1)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage5_1) +-1 InvestmentFlowBlock_total(electricityBus_storage5_0) ++1 InvestmentFlowBlock_total(electricityBus_storage5_1) ++1 InvestmentFlowBlock_old(electricityBus_storage5_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage5_2)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage5_2) +-1 InvestmentFlowBlock_total(electricityBus_storage5_1) ++1 InvestmentFlowBlock_total(electricityBus_storage5_2) ++1 InvestmentFlowBlock_old(electricityBus_storage5_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage5_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage5_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage5_electricityBus_0) += 100 + +c_e_InvestmentFlowBlock_total_rule(storage5_electricityBus_1)_: +-1 InvestmentFlowBlock_total(storage5_electricityBus_0) ++1 InvestmentFlowBlock_total(storage5_electricityBus_1) +-1 InvestmentFlowBlock_invest(storage5_electricityBus_1) ++1 InvestmentFlowBlock_old(storage5_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage5_electricityBus_2)_: +-1 InvestmentFlowBlock_total(storage5_electricityBus_1) ++1 InvestmentFlowBlock_total(storage5_electricityBus_2) +-1 InvestmentFlowBlock_invest(storage5_electricityBus_2) ++1 InvestmentFlowBlock_old(storage5_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage5_0)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage5_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage5_1)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage5_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage5_2)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage5_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage5_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(storage5_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage5_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(storage5_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage5_electricityBus_2)_: ++1 InvestmentFlowBlock_old_end(storage5_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage5_0)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage5_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage5_1)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage5_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage5_2)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage5_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage5_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(storage5_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage5_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(storage5_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage5_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(storage5_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage5_0)_: +-1 InvestmentFlowBlock_old_end(electricityBus_storage5_0) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage5_0) ++1 InvestmentFlowBlock_old(electricityBus_storage5_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage5_1)_: ++1 InvestmentFlowBlock_old(electricityBus_storage5_1) +-1 InvestmentFlowBlock_old_end(electricityBus_storage5_1) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage5_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage5_2)_: ++1 InvestmentFlowBlock_old(electricityBus_storage5_2) +-1 InvestmentFlowBlock_old_end(electricityBus_storage5_2) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage5_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage5_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(storage5_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(storage5_electricityBus_0) ++1 InvestmentFlowBlock_old(storage5_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage5_electricityBus_1)_: ++1 InvestmentFlowBlock_old(storage5_electricityBus_1) +-1 InvestmentFlowBlock_old_end(storage5_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(storage5_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage5_electricityBus_2)_: ++1 InvestmentFlowBlock_old(storage5_electricityBus_2) +-1 InvestmentFlowBlock_old_end(storage5_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(storage5_electricityBus_2) += 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage5_0_0)_: ++1 flow(electricityBus_storage5_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage5_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage5_0_1)_: ++1 flow(electricityBus_storage5_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage5_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage5_1_2)_: ++1 flow(electricityBus_storage5_1_2) +-1 InvestmentFlowBlock_total(electricityBus_storage5_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage5_1_3)_: ++1 flow(electricityBus_storage5_1_3) +-1 InvestmentFlowBlock_total(electricityBus_storage5_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage5_2_4)_: ++1 flow(electricityBus_storage5_2_4) +-1 InvestmentFlowBlock_total(electricityBus_storage5_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage5_2_5)_: ++1 flow(electricityBus_storage5_2_5) +-1 InvestmentFlowBlock_total(electricityBus_storage5_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage5_electricityBus_0_0)_: ++1 flow(storage5_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage5_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage5_electricityBus_0_1)_: ++1 flow(storage5_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage5_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage5_electricityBus_1_2)_: ++1 flow(storage5_electricityBus_1_2) +-1 InvestmentFlowBlock_total(storage5_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage5_electricityBus_1_3)_: ++1 flow(storage5_electricityBus_1_3) +-1 InvestmentFlowBlock_total(storage5_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage5_electricityBus_2_4)_: ++1 flow(storage5_electricityBus_2_4) +-1 InvestmentFlowBlock_total(storage5_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage5_electricityBus_2_5)_: ++1 flow(storage5_electricityBus_2_5) +-1 InvestmentFlowBlock_total(storage5_electricityBus_2) +<= 0 + +c_e_GenericStorageBlock_balance(storage5_0_0)_: ++1 flow(storage5_electricityBus_0_0) +-1 flow(electricityBus_storage5_0_0) ++1 GenericStorageBlock_storage_content(storage5_1) +-1 GenericStorageBlock_storage_content(storage5_0) += 0 + +c_e_GenericStorageBlock_balance(storage5_0_1)_: ++1 flow(storage5_electricityBus_0_1) +-1 flow(electricityBus_storage5_0_1) +-1 GenericStorageBlock_storage_content(storage5_1) ++1 GenericStorageBlock_storage_content(storage5_2) += 0 + +c_e_GenericStorageBlock_balance(storage5_1_2)_: ++1 flow(storage5_electricityBus_1_2) +-1 flow(electricityBus_storage5_1_2) +-1 GenericStorageBlock_storage_content(storage5_2) ++1 GenericStorageBlock_storage_content(storage5_3) += 0 + +c_e_GenericStorageBlock_balance(storage5_1_3)_: ++1 flow(storage5_electricityBus_1_3) +-1 flow(electricityBus_storage5_1_3) +-1 GenericStorageBlock_storage_content(storage5_3) ++1 GenericStorageBlock_storage_content(storage5_4) += 0 + +c_e_GenericStorageBlock_balance(storage5_2_4)_: ++1 flow(storage5_electricityBus_2_4) +-1 flow(electricityBus_storage5_2_4) +-1 GenericStorageBlock_storage_content(storage5_4) ++1 GenericStorageBlock_storage_content(storage5_5) += 0 + +c_e_GenericStorageBlock_balance(storage5_2_5)_: ++1 flow(storage5_electricityBus_2_5) +-1 flow(electricityBus_storage5_2_5) +-1 GenericStorageBlock_storage_content(storage5_5) ++1 GenericStorageBlock_storage_content(storage5_6) += 0 + +c_e_GenericStorageBlock_balanced_cstr(storage5)_: +-1 GenericStorageBlock_storage_content(storage5_0) ++1 GenericStorageBlock_storage_content(storage5_6) += 0 + +c_e_GenericStorageBlock_power_coupled(storage5_0)_: +-1 InvestmentFlowBlock_total(electricityBus_storage5_0) ++1.1 InvestmentFlowBlock_total(storage5_electricityBus_0) += 0 + +c_e_GenericStorageBlock_power_coupled(storage5_1)_: +-1 InvestmentFlowBlock_total(electricityBus_storage5_1) ++1.1 InvestmentFlowBlock_total(storage5_electricityBus_1) += 0 + +c_e_GenericStorageBlock_power_coupled(storage5_2)_: +-1 InvestmentFlowBlock_total(electricityBus_storage5_2) ++1.1 InvestmentFlowBlock_total(storage5_electricityBus_2) += 0 + +bounds + 0 <= InvestmentFlowBlock_invest(electricityBus_storage5_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage5_1) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage5_2) <= +inf + 0 <= flow(storage5_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage5_0_0) <= +inf + 0 <= flow(storage5_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage5_0_1) <= +inf + 0 <= flow(storage5_electricityBus_1_2) <= +inf + 0 <= flow(electricityBus_storage5_1_2) <= +inf + 0 <= flow(storage5_electricityBus_1_3) <= +inf + 0 <= flow(electricityBus_storage5_1_3) <= +inf + 0 <= flow(storage5_electricityBus_2_4) <= +inf + 0 <= flow(electricityBus_storage5_2_4) <= +inf + 0 <= flow(storage5_electricityBus_2_5) <= +inf + 0 <= flow(electricityBus_storage5_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage5_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage5_1) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage5_1) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage5_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage5_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage5_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage5_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage5_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_invest(storage5_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(storage5_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(storage5_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_invest(storage5_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage5_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage5_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage5_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage5_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage5_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage5_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage5_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage5_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage5_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage5_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage5_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage5_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage5_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage5_0) <= +inf + 0 <= InvestmentFlowBlock_old(storage5_electricityBus_0) <= +inf + 0 <= GenericStorageBlock_storage_content(storage5_1) <= 10000 + 0 <= GenericStorageBlock_storage_content(storage5_0) <= 10000 + 0 <= GenericStorageBlock_storage_content(storage5_2) <= 10000 + 0 <= GenericStorageBlock_storage_content(storage5_3) <= 10000 + 0 <= GenericStorageBlock_storage_content(storage5_4) <= 10000 + 0 <= GenericStorageBlock_storage_content(storage5_5) <= 10000 + 0 <= GenericStorageBlock_storage_content(storage5_6) <= 10000 +end diff --git a/tests/lp_files/storage_invest_6.lp b/tests/lp_files/storage_invest_6.lp index 030d94140..59262db9b 100644 --- a/tests/lp_files/storage_invest_6.lp +++ b/tests/lp_files/storage_invest_6.lp @@ -1,81 +1,96 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+145 GenericInvestmentStorageBlock_invest(storage6) -+99 InvestmentFlowBlock_invest(electricityBus_storage6) ++99 InvestmentFlowBlock_invest(electricityBus_storage6_0) ++145 GenericInvestmentStorageBlock_invest(storage6_0) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage6_0) -+1 flow(storage6_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage6_electricityBus_0_0) +-1 flow(electricityBus_storage6_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage6_1) -+1 flow(storage6_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage6_electricityBus_0_1) +-1 flow(electricityBus_storage6_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage6_2) -+1 flow(storage6_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(storage6_electricityBus_0_2) +-1 flow(electricityBus_storage6_0_2) = 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage6_0)_: --1 InvestmentFlowBlock_invest(electricityBus_storage6) -+1 flow(electricityBus_storage6_0) -<= 110 - -c_u_InvestmentFlowBlock_max(electricityBus_storage6_1)_: --1 InvestmentFlowBlock_invest(electricityBus_storage6) -+1 flow(electricityBus_storage6_1) -<= 110 - -c_u_InvestmentFlowBlock_max(electricityBus_storage6_2)_: --1 InvestmentFlowBlock_invest(electricityBus_storage6) -+1 flow(electricityBus_storage6_2) -<= 110 - -c_u_InvestmentFlowBlock_max(storage6_electricityBus_0)_: --1 InvestmentFlowBlock_invest(storage6_electricityBus) -+1 flow(storage6_electricityBus_0) -<= 100 - -c_u_InvestmentFlowBlock_max(storage6_electricityBus_1)_: --1 InvestmentFlowBlock_invest(storage6_electricityBus) -+1 flow(storage6_electricityBus_1) -<= 100 - -c_u_InvestmentFlowBlock_max(storage6_electricityBus_2)_: --1 InvestmentFlowBlock_invest(storage6_electricityBus) -+1 flow(storage6_electricityBus_2) -<= 100 +c_e_InvestmentFlowBlock_total_rule(storage6_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage6_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage6_electricityBus_0) += 100 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage6_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage6_0) ++1 InvestmentFlowBlock_total(electricityBus_storage6_0) += 110 + +c_u_InvestmentFlowBlock_max(storage6_electricityBus_0_0)_: ++1 flow(storage6_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage6_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage6_electricityBus_0_1)_: ++1 flow(storage6_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage6_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage6_electricityBus_0_2)_: ++1 flow(storage6_electricityBus_0_2) +-1 InvestmentFlowBlock_total(storage6_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage6_0_0)_: ++1 flow(electricityBus_storage6_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage6_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage6_0_1)_: ++1 flow(electricityBus_storage6_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage6_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage6_0_2)_: ++1 flow(electricityBus_storage6_0_2) +-1 InvestmentFlowBlock_total(electricityBus_storage6_0) +<= 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage6_0)_: +-1 GenericInvestmentStorageBlock_invest(storage6_0) ++1 GenericInvestmentStorageBlock_total(storage6_0) += 10000 c_u_GenericInvestmentStorageBlock_init_content_limit(storage6)_: +-1 GenericInvestmentStorageBlock_invest(storage6_0) +1 GenericInvestmentStorageBlock_init_content(storage6) --1 GenericInvestmentStorageBlock_invest(storage6) <= 10000 c_e_GenericInvestmentStorageBlock_balance_first(storage6)_: ++1 flow(storage6_electricityBus_0_0) +-1 flow(electricityBus_storage6_0_0) -1 GenericInvestmentStorageBlock_init_content(storage6) +1 GenericInvestmentStorageBlock_storage_content(storage6_0) --1 flow(electricityBus_storage6_0) -+1 flow(storage6_electricityBus_0) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage6_1)_: +c_e_GenericInvestmentStorageBlock_balance(storage6_0_1)_: ++1 flow(storage6_electricityBus_0_1) +-1 flow(electricityBus_storage6_0_1) -1 GenericInvestmentStorageBlock_storage_content(storage6_0) +1 GenericInvestmentStorageBlock_storage_content(storage6_1) --1 flow(electricityBus_storage6_1) -+1 flow(storage6_electricityBus_1) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage6_2)_: +c_e_GenericInvestmentStorageBlock_balance(storage6_0_2)_: ++1 flow(storage6_electricityBus_0_2) +-1 flow(electricityBus_storage6_0_2) -1 GenericInvestmentStorageBlock_storage_content(storage6_1) +1 GenericInvestmentStorageBlock_storage_content(storage6_2) --1 flow(electricityBus_storage6_2) -+1 flow(storage6_electricityBus_2) = 0 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage6)_: @@ -83,41 +98,41 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage6)_: +1 GenericInvestmentStorageBlock_storage_content(storage6_2) = 0 -c_e_GenericInvestmentStorageBlock_power_coupled(storage6)_: --1 InvestmentFlowBlock_invest(electricityBus_storage6) -+1.1000000000000001 InvestmentFlowBlock_invest(storage6_electricityBus) -= -1.4210854715202004e-14 +c_e_GenericInvestmentStorageBlock_power_coupled(storage6_0)_: ++1.1 InvestmentFlowBlock_total(storage6_electricityBus_0) +-1 InvestmentFlowBlock_total(electricityBus_storage6_0) += 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_0)_: --1 GenericInvestmentStorageBlock_invest(storage6) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage6_0) +1 GenericInvestmentStorageBlock_storage_content(storage6_0) -<= 10000 +<= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_1)_: --1 GenericInvestmentStorageBlock_invest(storage6) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage6_0) +1 GenericInvestmentStorageBlock_storage_content(storage6_1) -<= 10000 +<= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_2)_: --1 GenericInvestmentStorageBlock_invest(storage6) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_0_2)_: +-1 GenericInvestmentStorageBlock_total(storage6_0) +1 GenericInvestmentStorageBlock_storage_content(storage6_2) -<= 10000 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 +<= 0 bounds - 0 <= flow(electricityBus_storage6_0) <= +inf - 0 <= flow(electricityBus_storage6_1) <= +inf - 0 <= flow(electricityBus_storage6_2) <= +inf - 0 <= flow(storage6_electricityBus_0) <= +inf - 0 <= flow(storage6_electricityBus_1) <= +inf - 0 <= flow(storage6_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(electricityBus_storage6) <= +inf - 0 <= InvestmentFlowBlock_invest(storage6_electricityBus) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage6_0) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage6_0) <= +inf + 0 <= flow(storage6_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage6_0_0) <= +inf + 0 <= flow(storage6_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage6_0_1) <= +inf + 0 <= flow(storage6_electricityBus_0_2) <= +inf + 0 <= flow(electricityBus_storage6_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage6_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage6_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage6_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage6_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage6) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage6_0) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage6_1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage6_2) <= +inf - 0 <= GenericInvestmentStorageBlock_invest(storage6) <= +inf - 0 <= GenericInvestmentStorageBlock_init_content(storage6) <= +inf end diff --git a/tests/lp_files/storage_invest_6_multi_period.lp b/tests/lp_files/storage_invest_6_multi_period.lp new file mode 100644 index 000000000..8ad4b9f42 --- /dev/null +++ b/tests/lp_files/storage_invest_6_multi_period.lp @@ -0,0 +1,435 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++121.09030188807486 InvestmentFlowBlock_invest(electricityBus_storage6_0) ++118.71598224321065 InvestmentFlowBlock_invest(electricityBus_storage6_1) ++116.38821788550062 InvestmentFlowBlock_invest(electricityBus_storage6_2) ++177.35448256334197 GenericInvestmentStorageBlock_invest(storage6_0) ++173.87694368955096 GenericInvestmentStorageBlock_invest(storage6_1) ++170.46759185250093 GenericInvestmentStorageBlock_invest(storage6_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage6_electricityBus_0_0) +-1 flow(electricityBus_storage6_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage6_electricityBus_0_1) +-1 flow(electricityBus_storage6_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(storage6_electricityBus_1_2) +-1 flow(electricityBus_storage6_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(storage6_electricityBus_1_3) +-1 flow(electricityBus_storage6_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(storage6_electricityBus_2_4) +-1 flow(electricityBus_storage6_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(storage6_electricityBus_2_5) +-1 flow(electricityBus_storage6_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage6_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage6_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage6_electricityBus_0) += 100 + +c_e_InvestmentFlowBlock_total_rule(storage6_electricityBus_1)_: +-1 InvestmentFlowBlock_total(storage6_electricityBus_0) ++1 InvestmentFlowBlock_total(storage6_electricityBus_1) +-1 InvestmentFlowBlock_invest(storage6_electricityBus_1) ++1 InvestmentFlowBlock_old(storage6_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage6_electricityBus_2)_: +-1 InvestmentFlowBlock_total(storage6_electricityBus_1) ++1 InvestmentFlowBlock_total(storage6_electricityBus_2) +-1 InvestmentFlowBlock_invest(storage6_electricityBus_2) ++1 InvestmentFlowBlock_old(storage6_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage6_0)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage6_0) ++1 InvestmentFlowBlock_total(electricityBus_storage6_0) += 110 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage6_1)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage6_1) +-1 InvestmentFlowBlock_total(electricityBus_storage6_0) ++1 InvestmentFlowBlock_total(electricityBus_storage6_1) ++1 InvestmentFlowBlock_old(electricityBus_storage6_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage6_2)_: +-1 InvestmentFlowBlock_invest(electricityBus_storage6_2) +-1 InvestmentFlowBlock_total(electricityBus_storage6_1) ++1 InvestmentFlowBlock_total(electricityBus_storage6_2) ++1 InvestmentFlowBlock_old(electricityBus_storage6_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage6_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(storage6_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage6_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(storage6_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage6_electricityBus_2)_: ++1 InvestmentFlowBlock_old_end(storage6_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage6_0)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage6_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage6_1)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage6_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage6_2)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage6_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage6_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(storage6_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage6_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(storage6_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage6_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(storage6_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage6_0)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage6_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage6_1)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage6_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage6_2)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage6_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage6_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(storage6_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(storage6_electricityBus_0) ++1 InvestmentFlowBlock_old(storage6_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage6_electricityBus_1)_: ++1 InvestmentFlowBlock_old(storage6_electricityBus_1) +-1 InvestmentFlowBlock_old_end(storage6_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(storage6_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage6_electricityBus_2)_: ++1 InvestmentFlowBlock_old(storage6_electricityBus_2) +-1 InvestmentFlowBlock_old_end(storage6_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(storage6_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage6_0)_: +-1 InvestmentFlowBlock_old_end(electricityBus_storage6_0) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage6_0) ++1 InvestmentFlowBlock_old(electricityBus_storage6_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage6_1)_: ++1 InvestmentFlowBlock_old(electricityBus_storage6_1) +-1 InvestmentFlowBlock_old_end(electricityBus_storage6_1) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage6_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage6_2)_: ++1 InvestmentFlowBlock_old(electricityBus_storage6_2) +-1 InvestmentFlowBlock_old_end(electricityBus_storage6_2) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage6_2) += 0 + +c_u_InvestmentFlowBlock_max(storage6_electricityBus_0_0)_: ++1 flow(storage6_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage6_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage6_electricityBus_0_1)_: ++1 flow(storage6_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage6_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage6_electricityBus_1_2)_: ++1 flow(storage6_electricityBus_1_2) +-1 InvestmentFlowBlock_total(storage6_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage6_electricityBus_1_3)_: ++1 flow(storage6_electricityBus_1_3) +-1 InvestmentFlowBlock_total(storage6_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage6_electricityBus_2_4)_: ++1 flow(storage6_electricityBus_2_4) +-1 InvestmentFlowBlock_total(storage6_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage6_electricityBus_2_5)_: ++1 flow(storage6_electricityBus_2_5) +-1 InvestmentFlowBlock_total(storage6_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage6_0_0)_: ++1 flow(electricityBus_storage6_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage6_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage6_0_1)_: ++1 flow(electricityBus_storage6_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage6_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage6_1_2)_: ++1 flow(electricityBus_storage6_1_2) +-1 InvestmentFlowBlock_total(electricityBus_storage6_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage6_1_3)_: ++1 flow(electricityBus_storage6_1_3) +-1 InvestmentFlowBlock_total(electricityBus_storage6_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage6_2_4)_: ++1 flow(electricityBus_storage6_2_4) +-1 InvestmentFlowBlock_total(electricityBus_storage6_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage6_2_5)_: ++1 flow(electricityBus_storage6_2_5) +-1 InvestmentFlowBlock_total(electricityBus_storage6_2) +<= 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage6_0)_: +-1 GenericInvestmentStorageBlock_invest(storage6_0) ++1 GenericInvestmentStorageBlock_total(storage6_0) += 1000 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage6_1)_: +-1 GenericInvestmentStorageBlock_invest(storage6_1) +-1 GenericInvestmentStorageBlock_total(storage6_0) ++1 GenericInvestmentStorageBlock_total(storage6_1) ++1 GenericInvestmentStorageBlock_old(storage6_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage6_2)_: +-1 GenericInvestmentStorageBlock_invest(storage6_2) +-1 GenericInvestmentStorageBlock_total(storage6_1) ++1 GenericInvestmentStorageBlock_total(storage6_2) ++1 GenericInvestmentStorageBlock_old(storage6_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage6_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage6_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage6_1)_: ++1 GenericInvestmentStorageBlock_old_end(storage6_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage6_2)_: ++1 GenericInvestmentStorageBlock_old_end(storage6_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage6_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage6_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage6_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage6_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage6_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage6_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage6_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage6_0) +-1 GenericInvestmentStorageBlock_old_exo(storage6_0) ++1 GenericInvestmentStorageBlock_old(storage6_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage6_1)_: ++1 GenericInvestmentStorageBlock_old(storage6_1) +-1 GenericInvestmentStorageBlock_old_end(storage6_1) +-1 GenericInvestmentStorageBlock_old_exo(storage6_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage6_2)_: ++1 GenericInvestmentStorageBlock_old(storage6_2) +-1 GenericInvestmentStorageBlock_old_end(storage6_2) +-1 GenericInvestmentStorageBlock_old_exo(storage6_2) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage6_0)_: ++1 GenericInvestmentStorageBlock_storage_content(storage6_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage6_0_1)_: ++1 flow(storage6_electricityBus_0_1) +-1 flow(electricityBus_storage6_0_1) +-1 GenericInvestmentStorageBlock_storage_content(storage6_0) ++1 GenericInvestmentStorageBlock_storage_content(storage6_1) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage6_1_2)_: ++1 flow(storage6_electricityBus_1_2) +-1 flow(electricityBus_storage6_1_2) +-1 GenericInvestmentStorageBlock_storage_content(storage6_1) ++1 GenericInvestmentStorageBlock_storage_content(storage6_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage6_1_3)_: ++1 flow(storage6_electricityBus_1_3) +-1 flow(electricityBus_storage6_1_3) +-1 GenericInvestmentStorageBlock_storage_content(storage6_2) ++1 GenericInvestmentStorageBlock_storage_content(storage6_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage6_2_4)_: ++1 flow(storage6_electricityBus_2_4) +-1 flow(electricityBus_storage6_2_4) +-1 GenericInvestmentStorageBlock_storage_content(storage6_3) ++1 GenericInvestmentStorageBlock_storage_content(storage6_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage6_2_5)_: ++1 flow(storage6_electricityBus_2_5) +-1 flow(electricityBus_storage6_2_5) +-1 GenericInvestmentStorageBlock_storage_content(storage6_4) ++1 GenericInvestmentStorageBlock_storage_content(storage6_5) += 0 + +c_e_GenericInvestmentStorageBlock_power_coupled(storage6_0)_: ++1.1 InvestmentFlowBlock_total(storage6_electricityBus_0) +-1 InvestmentFlowBlock_total(electricityBus_storage6_0) += 0 + +c_e_GenericInvestmentStorageBlock_power_coupled(storage6_1)_: ++1.1 InvestmentFlowBlock_total(storage6_electricityBus_1) +-1 InvestmentFlowBlock_total(electricityBus_storage6_1) += 0 + +c_e_GenericInvestmentStorageBlock_power_coupled(storage6_2)_: ++1.1 InvestmentFlowBlock_total(storage6_electricityBus_2) +-1 InvestmentFlowBlock_total(electricityBus_storage6_2) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage6_0) ++1 GenericInvestmentStorageBlock_storage_content(storage6_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage6_0) ++1 GenericInvestmentStorageBlock_storage_content(storage6_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_1_2)_: +-1 GenericInvestmentStorageBlock_total(storage6_1) ++1 GenericInvestmentStorageBlock_storage_content(storage6_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_1_3)_: +-1 GenericInvestmentStorageBlock_total(storage6_1) ++1 GenericInvestmentStorageBlock_storage_content(storage6_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_2_4)_: +-1 GenericInvestmentStorageBlock_total(storage6_2) ++1 GenericInvestmentStorageBlock_storage_content(storage6_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_2_5)_: +-1 GenericInvestmentStorageBlock_total(storage6_2) ++1 GenericInvestmentStorageBlock_storage_content(storage6_5) +<= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(electricityBus_storage6_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage6_1) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage6_2) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage6_0) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage6_1) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage6_2) <= +inf + 0 <= flow(storage6_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage6_0_0) <= +inf + 0 <= flow(storage6_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage6_0_1) <= +inf + 0 <= flow(storage6_electricityBus_1_2) <= +inf + 0 <= flow(electricityBus_storage6_1_2) <= +inf + 0 <= flow(storage6_electricityBus_1_3) <= +inf + 0 <= flow(electricityBus_storage6_1_3) <= +inf + 0 <= flow(storage6_electricityBus_2_4) <= +inf + 0 <= flow(electricityBus_storage6_2_4) <= +inf + 0 <= flow(storage6_electricityBus_2_5) <= +inf + 0 <= flow(electricityBus_storage6_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(storage6_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage6_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage6_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_invest(storage6_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(storage6_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(storage6_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_invest(storage6_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage6_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage6_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage6_1) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage6_1) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage6_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage6_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage6_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage6_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage6_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage6_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage6_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage6_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage6_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage6_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage6_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage6_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage6_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage6_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage6_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage6_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage6_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage6_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage6_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage6_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage6_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage6_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage6_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage6_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage6_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage6_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage6_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage6_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage6_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage6_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage6_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage6_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage6_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage6_5) <= +inf +end diff --git a/tests/lp_files/storage_invest_all_nonconvex.lp b/tests/lp_files/storage_invest_all_nonconvex.lp index 864233a69..9711a6c35 100644 --- a/tests/lp_files/storage_invest_all_nonconvex.lp +++ b/tests/lp_files/storage_invest_all_nonconvex.lp @@ -1,105 +1,120 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+20 GenericInvestmentStorageBlock_invest(storage_all_nonconvex) -+30 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex) -+10 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex) -+10 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1) -+10 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex) -+15 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1) ++10 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) ++15 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) ++10 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) ++10 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0) ++20 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) ++30 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0) s.t. -c_e_BusBlock_balance(bus1_0)_: --1 flow(bus1_storage_all_nonconvex_0) -+1 flow(storage_all_nonconvex_bus1_0) +c_e_BusBlock_balance(bus1_0_0)_: ++1 flow(storage_all_nonconvex_bus1_0_0) +-1 flow(bus1_storage_all_nonconvex_0_0) = 0 -c_e_BusBlock_balance(bus1_1)_: --1 flow(bus1_storage_all_nonconvex_1) -+1 flow(storage_all_nonconvex_bus1_1) +c_e_BusBlock_balance(bus1_0_1)_: ++1 flow(storage_all_nonconvex_bus1_0_1) +-1 flow(bus1_storage_all_nonconvex_0_1) = 0 -c_e_BusBlock_balance(bus1_2)_: --1 flow(bus1_storage_all_nonconvex_2) -+1 flow(storage_all_nonconvex_bus1_2) +c_e_BusBlock_balance(bus1_0_2)_: ++1 flow(storage_all_nonconvex_bus1_0_2) +-1 flow(bus1_storage_all_nonconvex_0_2) = 0 -c_u_InvestmentFlowBlock_minimum_rule(bus1_storage_all_nonconvex)_: --1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex) -+5 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex) +c_u_InvestmentFlowBlock_minimum_rule(storage_all_nonconvex_bus1_0)_: +-1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) ++8 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) <= 0 -c_u_InvestmentFlowBlock_minimum_rule(storage_all_nonconvex_bus1)_: --1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1) -+8 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1) +c_u_InvestmentFlowBlock_minimum_rule(bus1_storage_all_nonconvex_0)_: +-1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) ++5 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0) <= 0 -c_u_InvestmentFlowBlock_maximum_rule(bus1_storage_all_nonconvex)_: -+1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex) --30 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex) +c_u_InvestmentFlowBlock_maximum_rule(storage_all_nonconvex_bus1_0)_: ++1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) +-20 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) <= 0 -c_u_InvestmentFlowBlock_maximum_rule(storage_all_nonconvex_bus1)_: -+1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1) --20 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1) +c_u_InvestmentFlowBlock_maximum_rule(bus1_storage_all_nonconvex_0)_: ++1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) +-30 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0) <= 0 -c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_0)_: --1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex) -+1 flow(bus1_storage_all_nonconvex_0) +c_e_InvestmentFlowBlock_total_rule(storage_all_nonconvex_bus1_0)_: +-1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) ++1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(bus1_storage_all_nonconvex_0)_: +-1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) ++1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) += 0 + +c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_0_0)_: ++1 flow(storage_all_nonconvex_bus1_0_0) +-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_1)_: --1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex) -+1 flow(bus1_storage_all_nonconvex_1) +c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_0_1)_: ++1 flow(storage_all_nonconvex_bus1_0_1) +-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_2)_: --1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex) -+1 flow(bus1_storage_all_nonconvex_2) +c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_0_2)_: ++1 flow(storage_all_nonconvex_bus1_0_2) +-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_0)_: --1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1) -+1 flow(storage_all_nonconvex_bus1_0) +c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_0_0)_: ++1 flow(bus1_storage_all_nonconvex_0_0) +-1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_1)_: --1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1) -+1 flow(storage_all_nonconvex_bus1_1) +c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_0_1)_: ++1 flow(bus1_storage_all_nonconvex_0_1) +-1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_2)_: --1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1) -+1 flow(storage_all_nonconvex_bus1_2) +c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_0_2)_: ++1 flow(bus1_storage_all_nonconvex_0_2) +-1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) <= 0 +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_all_nonconvex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) ++1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) += 0 + c_u_GenericInvestmentStorageBlock_init_content_limit(storage_all_nonconvex)_: +-1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) +1 GenericInvestmentStorageBlock_init_content(storage_all_nonconvex) --1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex) <= 0 c_e_GenericInvestmentStorageBlock_balance_first(storage_all_nonconvex)_: ++1 flow(storage_all_nonconvex_bus1_0_0) +-1 flow(bus1_storage_all_nonconvex_0_0) -1 GenericInvestmentStorageBlock_init_content(storage_all_nonconvex) +1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_0) --1 flow(bus1_storage_all_nonconvex_0) -+1 flow(storage_all_nonconvex_bus1_0) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage_all_nonconvex_1)_: +c_e_GenericInvestmentStorageBlock_balance(storage_all_nonconvex_0_1)_: ++1 flow(storage_all_nonconvex_bus1_0_1) +-1 flow(bus1_storage_all_nonconvex_0_1) -1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_0) +1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_1) --1 flow(bus1_storage_all_nonconvex_1) -+1 flow(storage_all_nonconvex_bus1_1) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage_all_nonconvex_2)_: +c_e_GenericInvestmentStorageBlock_balance(storage_all_nonconvex_0_2)_: ++1 flow(storage_all_nonconvex_bus1_0_2) +-1 flow(bus1_storage_all_nonconvex_0_2) -1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_1) +1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_2) --1 flow(bus1_storage_all_nonconvex_2) -+1 flow(storage_all_nonconvex_bus1_2) = 0 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_all_nonconvex)_: @@ -107,53 +122,53 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_all_nonconvex)_: +1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_2) = 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_0)_: --1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) +1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_0) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_1)_: --1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) +1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_1) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_2)_: --1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_0_2)_: +-1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) +1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_2) <= 0 -c_l_GenericInvestmentStorageBlock_limit_max(storage_all_nonconvex)_: --1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex) -+100 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex) +c_l_GenericInvestmentStorageBlock_limit_max(storage_all_nonconvex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) ++100 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0) >= 0 -c_l_GenericInvestmentStorageBlock_limit_min(storage_all_nonconvex)_: -+1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex) --20 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex) +c_l_GenericInvestmentStorageBlock_limit_min(storage_all_nonconvex_0)_: ++1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) +-20 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0) >= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(bus1_storage_all_nonconvex_0) <= +inf - 0 <= flow(bus1_storage_all_nonconvex_1) <= +inf - 0 <= flow(bus1_storage_all_nonconvex_2) <= +inf - 0 <= flow(storage_all_nonconvex_bus1_0) <= +inf - 0 <= flow(storage_all_nonconvex_bus1_1) <= +inf - 0 <= flow(storage_all_nonconvex_bus1_2) <= +inf - 0 <= InvestmentFlowBlock_invest(bus1_storage_all_nonconvex) <= 30 - 0 <= InvestmentFlowBlock_invest(storage_all_nonconvex_bus1) <= 20 - 0 <= InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex) <= 1 - 0 <= InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1) <= 1 + 0 <= InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) <= 20 + 0 <= InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) <= 1 + 0 <= InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) <= 30 + 0 <= InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0) <= 1 + 0 <= GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) <= 100 + 0 <= GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0) <= 1 + 0 <= flow(storage_all_nonconvex_bus1_0_0) <= +inf + 0 <= flow(bus1_storage_all_nonconvex_0_0) <= +inf + 0 <= flow(storage_all_nonconvex_bus1_0_1) <= +inf + 0 <= flow(bus1_storage_all_nonconvex_0_1) <= +inf + 0 <= flow(storage_all_nonconvex_bus1_0_2) <= +inf + 0 <= flow(bus1_storage_all_nonconvex_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage_all_nonconvex) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_0) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_2) <= +inf - 0 <= GenericInvestmentStorageBlock_invest(storage_all_nonconvex) <= 100 - 0 <= GenericInvestmentStorageBlock_init_content(storage_all_nonconvex) <= +inf - 0 <= GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex) <= 1 binary - InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex) - InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1) - GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex) + InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) + InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0) + GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0) end diff --git a/tests/lp_files/storage_invest_all_nonconvex_multi_period.lp b/tests/lp_files/storage_invest_all_nonconvex_multi_period.lp new file mode 100644 index 000000000..68765fd78 --- /dev/null +++ b/tests/lp_files/storage_invest_all_nonconvex_multi_period.lp @@ -0,0 +1,541 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++12.231343625058066 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) ++10 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0) ++11.991513357900065 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_1) ++9.80392156862745 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_1) ++11.756385645000064 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_2) ++9.611687812379854 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_2) ++12.231343625058066 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) ++15 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) ++11.991513357900065 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_1) ++14.705882352941176 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_1) ++11.756385645000064 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_2) ++14.41753171856978 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_2) ++24.462687250116133 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) ++30 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0) ++23.98302671580013 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_1) ++29.41176470588235 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_1) ++23.512771290000128 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_2) ++28.83506343713956 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_2) + +s.t. + +c_e_BusBlock_balance(bus1_0_0)_: ++1 flow(storage_all_nonconvex_bus1_0_0) +-1 flow(bus1_storage_all_nonconvex_0_0) += 0 + +c_e_BusBlock_balance(bus1_0_1)_: ++1 flow(storage_all_nonconvex_bus1_0_1) +-1 flow(bus1_storage_all_nonconvex_0_1) += 0 + +c_e_BusBlock_balance(bus1_1_2)_: ++1 flow(storage_all_nonconvex_bus1_1_2) +-1 flow(bus1_storage_all_nonconvex_1_2) += 0 + +c_e_BusBlock_balance(bus1_1_3)_: ++1 flow(storage_all_nonconvex_bus1_1_3) +-1 flow(bus1_storage_all_nonconvex_1_3) += 0 + +c_e_BusBlock_balance(bus1_2_4)_: ++1 flow(storage_all_nonconvex_bus1_2_4) +-1 flow(bus1_storage_all_nonconvex_2_4) += 0 + +c_e_BusBlock_balance(bus1_2_5)_: ++1 flow(storage_all_nonconvex_bus1_2_5) +-1 flow(bus1_storage_all_nonconvex_2_5) += 0 + +c_u_InvestmentFlowBlock_minimum_rule(bus1_storage_all_nonconvex_0)_: +-1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) ++5 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0) +<= 0 + +c_u_InvestmentFlowBlock_minimum_rule(bus1_storage_all_nonconvex_1)_: +-1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_1) ++5 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_1) +<= 0 + +c_u_InvestmentFlowBlock_minimum_rule(bus1_storage_all_nonconvex_2)_: +-1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_2) ++5 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_2) +<= 0 + +c_u_InvestmentFlowBlock_minimum_rule(storage_all_nonconvex_bus1_0)_: +-1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) ++8 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_minimum_rule(storage_all_nonconvex_bus1_1)_: +-1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_1) ++8 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_minimum_rule(storage_all_nonconvex_bus1_2)_: +-1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_2) ++8 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(bus1_storage_all_nonconvex_0)_: ++1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) +-30 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(bus1_storage_all_nonconvex_1)_: ++1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_1) +-30 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_1) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(bus1_storage_all_nonconvex_2)_: ++1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_2) +-30 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_2) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(storage_all_nonconvex_bus1_0)_: ++1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) +-20 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(storage_all_nonconvex_bus1_1)_: ++1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_1) +-20 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_maximum_rule(storage_all_nonconvex_bus1_2)_: ++1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_2) +-20 InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_2) +<= 0 + +c_e_InvestmentFlowBlock_total_rule(bus1_storage_all_nonconvex_0)_: +-1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) ++1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(bus1_storage_all_nonconvex_1)_: +-1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_1) +-1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) ++1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_1) ++1 InvestmentFlowBlock_old(bus1_storage_all_nonconvex_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(bus1_storage_all_nonconvex_2)_: +-1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_2) +-1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_1) ++1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_2) ++1 InvestmentFlowBlock_old(bus1_storage_all_nonconvex_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_all_nonconvex_bus1_0)_: +-1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) ++1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_all_nonconvex_bus1_1)_: +-1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_1) +-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0) ++1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_1) ++1 InvestmentFlowBlock_old(storage_all_nonconvex_bus1_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_all_nonconvex_bus1_2)_: +-1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_2) +-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_1) ++1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_2) ++1 InvestmentFlowBlock_old(storage_all_nonconvex_bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(bus1_storage_all_nonconvex_0)_: ++1 InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(bus1_storage_all_nonconvex_1)_: ++1 InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(bus1_storage_all_nonconvex_2)_: ++1 InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_all_nonconvex_bus1_0)_: ++1 InvestmentFlowBlock_old_end(storage_all_nonconvex_bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_all_nonconvex_bus1_1)_: ++1 InvestmentFlowBlock_old_end(storage_all_nonconvex_bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_all_nonconvex_bus1_2)_: ++1 InvestmentFlowBlock_old_end(storage_all_nonconvex_bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(bus1_storage_all_nonconvex_0)_: ++1 InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(bus1_storage_all_nonconvex_1)_: ++1 InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(bus1_storage_all_nonconvex_2)_: ++1 InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_all_nonconvex_bus1_0)_: ++1 InvestmentFlowBlock_old_exo(storage_all_nonconvex_bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_all_nonconvex_bus1_1)_: ++1 InvestmentFlowBlock_old_exo(storage_all_nonconvex_bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_all_nonconvex_bus1_2)_: ++1 InvestmentFlowBlock_old_exo(storage_all_nonconvex_bus1_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(bus1_storage_all_nonconvex_0)_: +-1 InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_0) +-1 InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_0) ++1 InvestmentFlowBlock_old(bus1_storage_all_nonconvex_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(bus1_storage_all_nonconvex_1)_: ++1 InvestmentFlowBlock_old(bus1_storage_all_nonconvex_1) +-1 InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_1) +-1 InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(bus1_storage_all_nonconvex_2)_: ++1 InvestmentFlowBlock_old(bus1_storage_all_nonconvex_2) +-1 InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_2) +-1 InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_all_nonconvex_bus1_0)_: +-1 InvestmentFlowBlock_old_end(storage_all_nonconvex_bus1_0) +-1 InvestmentFlowBlock_old_exo(storage_all_nonconvex_bus1_0) ++1 InvestmentFlowBlock_old(storage_all_nonconvex_bus1_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_all_nonconvex_bus1_1)_: ++1 InvestmentFlowBlock_old(storage_all_nonconvex_bus1_1) +-1 InvestmentFlowBlock_old_end(storage_all_nonconvex_bus1_1) +-1 InvestmentFlowBlock_old_exo(storage_all_nonconvex_bus1_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_all_nonconvex_bus1_2)_: ++1 InvestmentFlowBlock_old(storage_all_nonconvex_bus1_2) +-1 InvestmentFlowBlock_old_end(storage_all_nonconvex_bus1_2) +-1 InvestmentFlowBlock_old_exo(storage_all_nonconvex_bus1_2) += 0 + +c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_0_0)_: ++1 flow(bus1_storage_all_nonconvex_0_0) +-1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) +<= 0 + +c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_0_1)_: ++1 flow(bus1_storage_all_nonconvex_0_1) +-1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) +<= 0 + +c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_1_2)_: ++1 flow(bus1_storage_all_nonconvex_1_2) +-1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_1) +<= 0 + +c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_1_3)_: ++1 flow(bus1_storage_all_nonconvex_1_3) +-1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_1) +<= 0 + +c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_2_4)_: ++1 flow(bus1_storage_all_nonconvex_2_4) +-1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_2) +<= 0 + +c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_2_5)_: ++1 flow(bus1_storage_all_nonconvex_2_5) +-1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_0_0)_: ++1 flow(storage_all_nonconvex_bus1_0_0) +-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_0_1)_: ++1 flow(storage_all_nonconvex_bus1_0_1) +-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_1_2)_: ++1 flow(storage_all_nonconvex_bus1_1_2) +-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_1_3)_: ++1 flow(storage_all_nonconvex_bus1_1_3) +-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_2_4)_: ++1 flow(storage_all_nonconvex_bus1_2_4) +-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_2_5)_: ++1 flow(storage_all_nonconvex_bus1_2_5) +-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_2) +<= 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_all_nonconvex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) ++1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_all_nonconvex_1)_: +-1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_1) +-1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) ++1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_1) ++1 GenericInvestmentStorageBlock_old(storage_all_nonconvex_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_all_nonconvex_2)_: +-1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_2) +-1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_1) ++1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_2) ++1 GenericInvestmentStorageBlock_old(storage_all_nonconvex_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_all_nonconvex_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage_all_nonconvex_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_all_nonconvex_1)_: ++1 GenericInvestmentStorageBlock_old_end(storage_all_nonconvex_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_all_nonconvex_2)_: ++1 GenericInvestmentStorageBlock_old_end(storage_all_nonconvex_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_all_nonconvex_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_all_nonconvex_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_all_nonconvex_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_all_nonconvex_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_all_nonconvex_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_all_nonconvex_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_all_nonconvex_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage_all_nonconvex_0) +-1 GenericInvestmentStorageBlock_old_exo(storage_all_nonconvex_0) ++1 GenericInvestmentStorageBlock_old(storage_all_nonconvex_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_all_nonconvex_1)_: ++1 GenericInvestmentStorageBlock_old(storage_all_nonconvex_1) +-1 GenericInvestmentStorageBlock_old_end(storage_all_nonconvex_1) +-1 GenericInvestmentStorageBlock_old_exo(storage_all_nonconvex_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_all_nonconvex_2)_: ++1 GenericInvestmentStorageBlock_old(storage_all_nonconvex_2) +-1 GenericInvestmentStorageBlock_old_end(storage_all_nonconvex_2) +-1 GenericInvestmentStorageBlock_old_exo(storage_all_nonconvex_2) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage_all_nonconvex_0)_: ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_all_nonconvex_0_1)_: ++1 flow(storage_all_nonconvex_bus1_0_1) +-1 flow(bus1_storage_all_nonconvex_0_1) +-1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_1) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_all_nonconvex_1_2)_: ++1 flow(storage_all_nonconvex_bus1_1_2) +-1 flow(bus1_storage_all_nonconvex_1_2) +-1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_all_nonconvex_1_3)_: ++1 flow(storage_all_nonconvex_bus1_1_3) +-1 flow(bus1_storage_all_nonconvex_1_3) +-1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_all_nonconvex_2_4)_: ++1 flow(storage_all_nonconvex_bus1_2_4) +-1 flow(bus1_storage_all_nonconvex_2_4) +-1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_3) ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_all_nonconvex_2_5)_: ++1 flow(storage_all_nonconvex_bus1_2_5) +-1 flow(bus1_storage_all_nonconvex_2_5) +-1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_4) ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_5) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_1_2)_: +-1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_1_3)_: +-1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_2_4)_: +-1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_2_5)_: +-1 GenericInvestmentStorageBlock_total(storage_all_nonconvex_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_5) +<= 0 + +c_l_GenericInvestmentStorageBlock_limit_max(storage_all_nonconvex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) ++100 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_max(storage_all_nonconvex_1)_: +-1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_1) ++100 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_1) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_max(storage_all_nonconvex_2)_: +-1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_2) ++100 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_2) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_min(storage_all_nonconvex_0)_: ++1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) +-20 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_min(storage_all_nonconvex_1)_: ++1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_1) +-20 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_1) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_min(storage_all_nonconvex_2)_: ++1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_2) +-20 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_2) +>= 0 + +bounds + 0 <= InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) <= 30 + 0 <= InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0) <= 1 + 0 <= InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_1) <= 30 + 0 <= InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_1) <= 1 + 0 <= InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_2) <= 30 + 0 <= InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_2) <= 1 + 0 <= InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) <= 20 + 0 <= InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) <= 1 + 0 <= InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_1) <= 20 + 0 <= InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_1) <= 1 + 0 <= InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_2) <= 20 + 0 <= InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_2) <= 1 + 0 <= GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) <= 100 + 0 <= GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0) <= 1 + 0 <= GenericInvestmentStorageBlock_invest(storage_all_nonconvex_1) <= 100 + 0 <= GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_1) <= 1 + 0 <= GenericInvestmentStorageBlock_invest(storage_all_nonconvex_2) <= 100 + 0 <= GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_2) <= 1 + 0 <= flow(storage_all_nonconvex_bus1_0_0) <= +inf + 0 <= flow(bus1_storage_all_nonconvex_0_0) <= +inf + 0 <= flow(storage_all_nonconvex_bus1_0_1) <= +inf + 0 <= flow(bus1_storage_all_nonconvex_0_1) <= +inf + 0 <= flow(storage_all_nonconvex_bus1_1_2) <= +inf + 0 <= flow(bus1_storage_all_nonconvex_1_2) <= +inf + 0 <= flow(storage_all_nonconvex_bus1_1_3) <= +inf + 0 <= flow(bus1_storage_all_nonconvex_1_3) <= +inf + 0 <= flow(storage_all_nonconvex_bus1_2_4) <= +inf + 0 <= flow(bus1_storage_all_nonconvex_2_4) <= +inf + 0 <= flow(storage_all_nonconvex_bus1_2_5) <= +inf + 0 <= flow(bus1_storage_all_nonconvex_2_5) <= +inf + 0 <= InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) <= +inf + 0 <= InvestmentFlowBlock_total(bus1_storage_all_nonconvex_1) <= +inf + 0 <= InvestmentFlowBlock_old(bus1_storage_all_nonconvex_1) <= +inf + 0 <= InvestmentFlowBlock_total(bus1_storage_all_nonconvex_2) <= +inf + 0 <= InvestmentFlowBlock_old(bus1_storage_all_nonconvex_2) <= +inf + 0 <= InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage_all_nonconvex_bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old(storage_all_nonconvex_bus1_1) <= +inf + 0 <= InvestmentFlowBlock_total(storage_all_nonconvex_bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage_all_nonconvex_bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_all_nonconvex_bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_all_nonconvex_bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_all_nonconvex_bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_all_nonconvex_bus1_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_all_nonconvex_bus1_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_all_nonconvex_bus1_2) <= +inf + 0 <= InvestmentFlowBlock_old(bus1_storage_all_nonconvex_0) <= +inf + 0 <= InvestmentFlowBlock_old(storage_all_nonconvex_bus1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_all_nonconvex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_all_nonconvex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_all_nonconvex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_all_nonconvex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_all_nonconvex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_all_nonconvex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_all_nonconvex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_all_nonconvex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_all_nonconvex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_all_nonconvex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_all_nonconvex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_5) <= +inf +binary + InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0) + InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_1) + InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_2) + InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) + InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_1) + InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_2) + GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0) + GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_1) + GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_2) +end diff --git a/tests/lp_files/storage_invest_minimum.lp b/tests/lp_files/storage_invest_minimum.lp index 4038a7663..b20a7966f 100644 --- a/tests/lp_files/storage_invest_minimum.lp +++ b/tests/lp_files/storage_invest_minimum.lp @@ -1,50 +1,55 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+145 GenericInvestmentStorageBlock_invest(storage1) ++145 GenericInvestmentStorageBlock_invest(storage1_0) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage1_0) -+1 flow(storage1_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 flow(electricityBus_storage1_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage1_1) -+1 flow(storage1_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage1_2) -+1 flow(storage1_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(storage1_electricityBus_0_2) +-1 flow(electricityBus_storage1_0_2) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_: +-1 GenericInvestmentStorageBlock_invest(storage1_0) ++1 GenericInvestmentStorageBlock_total(storage1_0) = 0 c_u_GenericInvestmentStorageBlock_init_content_limit(storage1)_: +-1 GenericInvestmentStorageBlock_invest(storage1_0) +1 GenericInvestmentStorageBlock_init_content(storage1) --1 GenericInvestmentStorageBlock_invest(storage1) <= 0 c_e_GenericInvestmentStorageBlock_balance_first(storage1)_: ++1 flow(storage1_electricityBus_0_0) +-1 flow(electricityBus_storage1_0_0) -1 GenericInvestmentStorageBlock_init_content(storage1) +1 GenericInvestmentStorageBlock_storage_content(storage1_0) --1 flow(electricityBus_storage1_0) -+1 flow(storage1_electricityBus_0) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage1_1)_: +c_e_GenericInvestmentStorageBlock_balance(storage1_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) -1 GenericInvestmentStorageBlock_storage_content(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_1) --1 flow(electricityBus_storage1_1) -+1 flow(storage1_electricityBus_1) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage1_2)_: +c_e_GenericInvestmentStorageBlock_balance(storage1_0_2)_: ++1 flow(storage1_electricityBus_0_2) +-1 flow(electricityBus_storage1_0_2) -1 GenericInvestmentStorageBlock_storage_content(storage1_1) +1 GenericInvestmentStorageBlock_storage_content(storage1_2) --1 flow(electricityBus_storage1_2) -+1 flow(storage1_electricityBus_2) = 0 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage1)_: @@ -52,34 +57,32 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage1)_: +1 GenericInvestmentStorageBlock_storage_content(storage1_2) = 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0)_: --1 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_0) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1)_: --1 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_1) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2)_: --1 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_2)_: +-1 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(electricityBus_storage1_0) <= +inf - 0 <= flow(electricityBus_storage1_1) <= +inf - 0 <= flow(electricityBus_storage1_2) <= +inf - 0 <= flow(storage1_electricityBus_0) <= +inf - 0 <= flow(storage1_electricityBus_1) <= +inf - 0 <= flow(storage1_electricityBus_2) <= +inf + 100 <= GenericInvestmentStorageBlock_invest(storage1_0) <= 200 + 0 <= flow(storage1_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage1_0_0) <= +inf + 0 <= flow(storage1_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage1_0_1) <= +inf + 0 <= flow(storage1_electricityBus_0_2) <= +inf + 0 <= flow(electricityBus_storage1_0_2) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_0) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_2) <= +inf - 100 <= GenericInvestmentStorageBlock_invest(storage1) <= 200 - 0 <= GenericInvestmentStorageBlock_init_content(storage1) <= +inf end diff --git a/tests/lp_files/storage_invest_minimum_multi_period.lp b/tests/lp_files/storage_invest_minimum_multi_period.lp new file mode 100644 index 000000000..76e8aa662 --- /dev/null +++ b/tests/lp_files/storage_invest_minimum_multi_period.lp @@ -0,0 +1,205 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++212.02333722461535 GenericInvestmentStorageBlock_invest(storage1_0) ++207.8660168868778 GenericInvestmentStorageBlock_invest(storage1_1) ++203.7902126341939 GenericInvestmentStorageBlock_invest(storage1_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 flow(electricityBus_storage1_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(storage1_electricityBus_1_2) +-1 flow(electricityBus_storage1_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(storage1_electricityBus_1_3) +-1 flow(electricityBus_storage1_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(storage1_electricityBus_2_4) +-1 flow(electricityBus_storage1_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(storage1_electricityBus_2_5) +-1 flow(electricityBus_storage1_2_5) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_: +-1 GenericInvestmentStorageBlock_invest(storage1_0) ++1 GenericInvestmentStorageBlock_total(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_1)_: +-1 GenericInvestmentStorageBlock_invest(storage1_1) +-1 GenericInvestmentStorageBlock_total(storage1_0) ++1 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_old(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_2)_: +-1 GenericInvestmentStorageBlock_invest(storage1_2) +-1 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_total(storage1_2) ++1 GenericInvestmentStorageBlock_old(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage1_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage1_1)_: ++1 GenericInvestmentStorageBlock_old_end(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage1_2)_: ++1 GenericInvestmentStorageBlock_old_end(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage1_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage1_0) +-1 GenericInvestmentStorageBlock_old_exo(storage1_0) ++1 GenericInvestmentStorageBlock_old(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage1_1)_: ++1 GenericInvestmentStorageBlock_old(storage1_1) +-1 GenericInvestmentStorageBlock_old_end(storage1_1) +-1 GenericInvestmentStorageBlock_old_exo(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage1_2)_: ++1 GenericInvestmentStorageBlock_old(storage1_2) +-1 GenericInvestmentStorageBlock_old_end(storage1_2) +-1 GenericInvestmentStorageBlock_old_exo(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage1_0)_: ++1 GenericInvestmentStorageBlock_storage_content(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) +-1 GenericInvestmentStorageBlock_storage_content(storage1_0) ++1 GenericInvestmentStorageBlock_storage_content(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_1_2)_: ++1 flow(storage1_electricityBus_1_2) +-1 flow(electricityBus_storage1_1_2) +-1 GenericInvestmentStorageBlock_storage_content(storage1_1) ++1 GenericInvestmentStorageBlock_storage_content(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_1_3)_: ++1 flow(storage1_electricityBus_1_3) +-1 flow(electricityBus_storage1_1_3) +-1 GenericInvestmentStorageBlock_storage_content(storage1_2) ++1 GenericInvestmentStorageBlock_storage_content(storage1_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_2_4)_: ++1 flow(storage1_electricityBus_2_4) +-1 flow(electricityBus_storage1_2_4) +-1 GenericInvestmentStorageBlock_storage_content(storage1_3) ++1 GenericInvestmentStorageBlock_storage_content(storage1_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_2_5)_: ++1 flow(storage1_electricityBus_2_5) +-1 flow(electricityBus_storage1_2_5) +-1 GenericInvestmentStorageBlock_storage_content(storage1_4) ++1 GenericInvestmentStorageBlock_storage_content(storage1_5) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage1_0) ++1 GenericInvestmentStorageBlock_storage_content(storage1_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage1_0) ++1 GenericInvestmentStorageBlock_storage_content(storage1_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_2)_: +-1 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_storage_content(storage1_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_3)_: +-1 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_storage_content(storage1_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_4)_: +-1 GenericInvestmentStorageBlock_total(storage1_2) ++1 GenericInvestmentStorageBlock_storage_content(storage1_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_5)_: +-1 GenericInvestmentStorageBlock_total(storage1_2) ++1 GenericInvestmentStorageBlock_storage_content(storage1_5) +<= 0 + +bounds + 100 <= GenericInvestmentStorageBlock_invest(storage1_0) <= 200 + 100 <= GenericInvestmentStorageBlock_invest(storage1_1) <= 200 + 100 <= GenericInvestmentStorageBlock_invest(storage1_2) <= 200 + 0 <= flow(storage1_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage1_0_0) <= +inf + 0 <= flow(storage1_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage1_0_1) <= +inf + 0 <= flow(storage1_electricityBus_1_2) <= +inf + 0 <= flow(electricityBus_storage1_1_2) <= +inf + 0 <= flow(storage1_electricityBus_1_3) <= +inf + 0 <= flow(electricityBus_storage1_1_3) <= +inf + 0 <= flow(storage1_electricityBus_2_4) <= +inf + 0 <= flow(electricityBus_storage1_2_4) <= +inf + 0 <= flow(storage1_electricityBus_2_5) <= +inf + 0 <= flow(electricityBus_storage1_2_5) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_5) <= +inf +end diff --git a/tests/lp_files/storage_invest_multi_period.lp b/tests/lp_files/storage_invest_multi_period.lp new file mode 100644 index 000000000..228aadf96 --- /dev/null +++ b/tests/lp_files/storage_invest_multi_period.lp @@ -0,0 +1,223 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++250.0 ONE_VAR_CONSTANT ++351.53628135238 GenericInvestmentStorageBlock_invest(storage1_0) ++341.9615033610845 GenericInvestmentStorageBlock_invest(storage1_1) ++332.6786079381219 GenericInvestmentStorageBlock_invest(storage1_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 flow(electricityBus_storage1_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(storage1_electricityBus_1_2) +-1 flow(electricityBus_storage1_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(storage1_electricityBus_1_3) +-1 flow(electricityBus_storage1_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(storage1_electricityBus_2_4) +-1 flow(electricityBus_storage1_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(storage1_electricityBus_2_5) +-1 flow(electricityBus_storage1_2_5) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_: +-1 GenericInvestmentStorageBlock_invest(storage1_0) ++1 GenericInvestmentStorageBlock_total(storage1_0) += 50 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_1)_: +-1 GenericInvestmentStorageBlock_invest(storage1_1) +-1 GenericInvestmentStorageBlock_total(storage1_0) ++1 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_old(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_2)_: +-1 GenericInvestmentStorageBlock_invest(storage1_2) +-1 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_total(storage1_2) ++1 GenericInvestmentStorageBlock_old(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage1_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage1_1)_: ++1 GenericInvestmentStorageBlock_old_end(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage1_2)_: ++1 GenericInvestmentStorageBlock_old_end(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage1_1) += 50 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage1_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage1_0) +-1 GenericInvestmentStorageBlock_old_exo(storage1_0) ++1 GenericInvestmentStorageBlock_old(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage1_1)_: ++1 GenericInvestmentStorageBlock_old(storage1_1) +-1 GenericInvestmentStorageBlock_old_end(storage1_1) +-1 GenericInvestmentStorageBlock_old_exo(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage1_2)_: ++1 GenericInvestmentStorageBlock_old(storage1_2) +-1 GenericInvestmentStorageBlock_old_end(storage1_2) +-1 GenericInvestmentStorageBlock_old_exo(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage1_0)_: ++1 GenericInvestmentStorageBlock_storage_content(storage1_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) +-1 GenericInvestmentStorageBlock_storage_content(storage1_0) ++1 GenericInvestmentStorageBlock_storage_content(storage1_1) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_1_2)_: ++1 flow(storage1_electricityBus_1_2) +-1 flow(electricityBus_storage1_1_2) +-1 GenericInvestmentStorageBlock_storage_content(storage1_1) ++1 GenericInvestmentStorageBlock_storage_content(storage1_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_1_3)_: ++1 flow(storage1_electricityBus_1_3) +-1 flow(electricityBus_storage1_1_3) +-1 GenericInvestmentStorageBlock_storage_content(storage1_2) ++1 GenericInvestmentStorageBlock_storage_content(storage1_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_2_4)_: ++1 flow(storage1_electricityBus_2_4) +-1 flow(electricityBus_storage1_2_4) +-1 GenericInvestmentStorageBlock_storage_content(storage1_3) ++1 GenericInvestmentStorageBlock_storage_content(storage1_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage1_2_5)_: ++1 flow(storage1_electricityBus_2_5) +-1 flow(electricityBus_storage1_2_5) +-1 GenericInvestmentStorageBlock_storage_content(storage1_4) ++1 GenericInvestmentStorageBlock_storage_content(storage1_5) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage1_0) ++1 GenericInvestmentStorageBlock_storage_content(storage1_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage1_0) ++1 GenericInvestmentStorageBlock_storage_content(storage1_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_2)_: +-1 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_storage_content(storage1_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_3)_: +-1 GenericInvestmentStorageBlock_total(storage1_1) ++1 GenericInvestmentStorageBlock_storage_content(storage1_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_4)_: +-1 GenericInvestmentStorageBlock_total(storage1_2) ++1 GenericInvestmentStorageBlock_storage_content(storage1_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_5)_: +-1 GenericInvestmentStorageBlock_total(storage1_2) ++1 GenericInvestmentStorageBlock_storage_content(storage1_5) +<= 0 + +c_u_GenericInvestmentStorageBlock_overall_storage_maximum(storage1_0)_: ++1 GenericInvestmentStorageBlock_total(storage1_0) +<= 500 + +c_u_GenericInvestmentStorageBlock_overall_storage_maximum(storage1_1)_: ++1 GenericInvestmentStorageBlock_total(storage1_1) +<= 500 + +c_u_GenericInvestmentStorageBlock_overall_storage_maximum(storage1_2)_: ++1 GenericInvestmentStorageBlock_total(storage1_2) +<= 500 + +c_l_GenericInvestmentStorageBlock_overall_minimum(storage1)_: ++1 GenericInvestmentStorageBlock_total(storage1_2) +>= 10 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 100 <= GenericInvestmentStorageBlock_invest(storage1_0) <= 200 + 100 <= GenericInvestmentStorageBlock_invest(storage1_1) <= 200 + 100 <= GenericInvestmentStorageBlock_invest(storage1_2) <= 200 + 0 <= flow(storage1_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage1_0_0) <= +inf + 0 <= flow(storage1_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage1_0_1) <= +inf + 0 <= flow(storage1_electricityBus_1_2) <= +inf + 0 <= flow(electricityBus_storage1_1_2) <= +inf + 0 <= flow(storage1_electricityBus_1_3) <= +inf + 0 <= flow(electricityBus_storage1_1_3) <= +inf + 0 <= flow(storage1_electricityBus_2_4) <= +inf + 0 <= flow(electricityBus_storage1_2_4) <= +inf + 0 <= flow(storage1_electricityBus_2_5) <= +inf + 0 <= flow(electricityBus_storage1_2_5) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage1_5) <= +inf +end diff --git a/tests/lp_files/storage_invest_unbalanced.lp b/tests/lp_files/storage_invest_unbalanced.lp index b9e917e2d..2dbed4e9b 100644 --- a/tests/lp_files/storage_invest_unbalanced.lp +++ b/tests/lp_files/storage_invest_unbalanced.lp @@ -1,122 +1,137 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+145 GenericInvestmentStorageBlock_invest(storage1) ++145 GenericInvestmentStorageBlock_invest(storage1_0) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage1_0) -+1 flow(storage1_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 flow(electricityBus_storage1_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage1_1) -+1 flow(storage1_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage1_2) -+1 flow(storage1_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(storage1_electricityBus_0_2) +-1 flow(electricityBus_storage1_0_2) = 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage1_0)_: --1 InvestmentFlowBlock_invest(electricityBus_storage1) -+1 flow(electricityBus_storage1_0) +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage1_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage1_0) +-1 InvestmentFlowBlock_invest(electricityBus_storage1_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage1_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage1_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage1_electricityBus_0) += 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_0)_: ++1 flow(electricityBus_storage1_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage1_1)_: --1 InvestmentFlowBlock_invest(electricityBus_storage1) -+1 flow(electricityBus_storage1_1) +c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_1)_: ++1 flow(electricityBus_storage1_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage1_2)_: --1 InvestmentFlowBlock_invest(electricityBus_storage1) -+1 flow(electricityBus_storage1_2) +c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_2)_: ++1 flow(electricityBus_storage1_0_2) +-1 InvestmentFlowBlock_total(electricityBus_storage1_0) <= 0 -c_u_InvestmentFlowBlock_max(storage1_electricityBus_0)_: --1 InvestmentFlowBlock_invest(storage1_electricityBus) -+1 flow(storage1_electricityBus_0) +c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(storage1_electricityBus_1)_: --1 InvestmentFlowBlock_invest(storage1_electricityBus) -+1 flow(storage1_electricityBus_1) +c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(storage1_electricityBus_2)_: --1 InvestmentFlowBlock_invest(storage1_electricityBus) -+1 flow(storage1_electricityBus_2) +c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_2)_: ++1 flow(storage1_electricityBus_0_2) +-1 InvestmentFlowBlock_total(storage1_electricityBus_0) <= 0 +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_: +-1 GenericInvestmentStorageBlock_invest(storage1_0) ++1 GenericInvestmentStorageBlock_total(storage1_0) += 0 + c_e_GenericInvestmentStorageBlock_init_content_fix(storage1)_: +-0.5 GenericInvestmentStorageBlock_invest(storage1_0) +1 GenericInvestmentStorageBlock_init_content(storage1) --0.5 GenericInvestmentStorageBlock_invest(storage1) = 0 c_e_GenericInvestmentStorageBlock_balance_first(storage1)_: ++1 flow(storage1_electricityBus_0_0) +-1 flow(electricityBus_storage1_0_0) -1 GenericInvestmentStorageBlock_init_content(storage1) +1 GenericInvestmentStorageBlock_storage_content(storage1_0) --1 flow(electricityBus_storage1_0) -+1 flow(storage1_electricityBus_0) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage1_1)_: +c_e_GenericInvestmentStorageBlock_balance(storage1_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) -1 GenericInvestmentStorageBlock_storage_content(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_1) --1 flow(electricityBus_storage1_1) -+1 flow(storage1_electricityBus_1) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage1_2)_: +c_e_GenericInvestmentStorageBlock_balance(storage1_0_2)_: ++1 flow(storage1_electricityBus_0_2) +-1 flow(electricityBus_storage1_0_2) -1 GenericInvestmentStorageBlock_storage_content(storage1_1) +1 GenericInvestmentStorageBlock_storage_content(storage1_2) --1 flow(electricityBus_storage1_2) -+1 flow(storage1_electricityBus_2) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1)_: --1 GenericInvestmentStorageBlock_invest(storage1) -+1 InvestmentFlowBlock_invest(electricityBus_storage1) +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage1_0) +-1 GenericInvestmentStorageBlock_total(storage1_0) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1)_: --1 GenericInvestmentStorageBlock_invest(storage1) -+1 InvestmentFlowBlock_invest(storage1_electricityBus) +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_0)_: ++1 InvestmentFlowBlock_total(storage1_electricityBus_0) +-1 GenericInvestmentStorageBlock_total(storage1_0) = 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0)_: --1 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_: +-1 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_0) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1)_: --1 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_1)_: +-1 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_1) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2)_: --1 GenericInvestmentStorageBlock_invest(storage1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_2)_: +-1 GenericInvestmentStorageBlock_total(storage1_0) +1 GenericInvestmentStorageBlock_storage_content(storage1_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(electricityBus_storage1_0) <= +inf - 0 <= flow(electricityBus_storage1_1) <= +inf - 0 <= flow(electricityBus_storage1_2) <= +inf - 0 <= flow(storage1_electricityBus_0) <= +inf - 0 <= flow(storage1_electricityBus_1) <= +inf - 0 <= flow(storage1_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(electricityBus_storage1) <= +inf - 0 <= InvestmentFlowBlock_invest(storage1_electricityBus) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage1_0) <= +inf + 0 <= flow(storage1_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage1_0_0) <= +inf + 0 <= flow(storage1_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage1_0_1) <= +inf + 0 <= flow(storage1_electricityBus_0_2) <= +inf + 0 <= flow(electricityBus_storage1_0_2) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage1_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage1_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage1_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage1_electricityBus_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_0) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage1_2) <= +inf - 0 <= GenericInvestmentStorageBlock_invest(storage1) <= +inf - 0 <= GenericInvestmentStorageBlock_init_content(storage1) <= +inf end diff --git a/tests/lp_files/storage_invest_with_offset.lp b/tests/lp_files/storage_invest_with_offset.lp index 2a8e01d0f..18cc0c966 100644 --- a/tests/lp_files/storage_invest_with_offset.lp +++ b/tests/lp_files/storage_invest_with_offset.lp @@ -1,162 +1,177 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+145 GenericInvestmentStorageBlock_invest(storagenon_convex) -+5 GenericInvestmentStorageBlock_invest_status(storagenon_convex) -+56 flow(electricityBus_storagenon_convex_0) -+56 flow(electricityBus_storagenon_convex_1) -+56 flow(electricityBus_storagenon_convex_2) -+24 flow(storagenon_convex_electricityBus_0) -+24 flow(storagenon_convex_electricityBus_1) -+24 flow(storagenon_convex_electricityBus_2) ++56 flow(electricityBus_storage_non_convex_0_0) ++56 flow(electricityBus_storage_non_convex_0_1) ++56 flow(electricityBus_storage_non_convex_0_2) ++24 flow(storage_non_convex_electricityBus_0_0) ++24 flow(storage_non_convex_electricityBus_0_1) ++24 flow(storage_non_convex_electricityBus_0_2) ++145 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++5 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storagenon_convex_0) -+1 flow(storagenon_convex_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_storage_non_convex_0_0) ++1 flow(storage_non_convex_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storagenon_convex_1) -+1 flow(storagenon_convex_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_storage_non_convex_0_1) ++1 flow(storage_non_convex_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storagenon_convex_2) -+1 flow(storagenon_convex_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: +-1 flow(electricityBus_storage_non_convex_0_2) ++1 flow(storage_non_convex_electricityBus_0_2) = 0 -c_u_InvestmentFlowBlock_max(electricityBus_storagenon_convex_0)_: --1 InvestmentFlowBlock_invest(electricityBus_storagenon_convex) -+1 flow(electricityBus_storagenon_convex_0) +c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +-1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) += 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_0)_: ++1 flow(storage_non_convex_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storagenon_convex_1)_: --1 InvestmentFlowBlock_invest(electricityBus_storagenon_convex) -+1 flow(electricityBus_storagenon_convex_1) +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_1)_: ++1 flow(storage_non_convex_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storagenon_convex_2)_: --1 InvestmentFlowBlock_invest(electricityBus_storagenon_convex) -+1 flow(electricityBus_storagenon_convex_2) +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_2)_: ++1 flow(storage_non_convex_electricityBus_0_2) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(storagenon_convex_electricityBus_0)_: --1 InvestmentFlowBlock_invest(storagenon_convex_electricityBus) -+1 flow(storagenon_convex_electricityBus_0) +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_0)_: ++1 flow(electricityBus_storage_non_convex_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) <= 0 -c_u_InvestmentFlowBlock_max(storagenon_convex_electricityBus_1)_: --1 InvestmentFlowBlock_invest(storagenon_convex_electricityBus) -+1 flow(storagenon_convex_electricityBus_1) +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_1)_: ++1 flow(electricityBus_storage_non_convex_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) <= 0 -c_u_InvestmentFlowBlock_max(storagenon_convex_electricityBus_2)_: --1 InvestmentFlowBlock_invest(storagenon_convex_electricityBus) -+1 flow(storagenon_convex_electricityBus_2) +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_2)_: ++1 flow(electricityBus_storage_non_convex_0_2) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) <= 0 -c_u_GenericInvestmentStorageBlock_init_content_limit(storagenon_convex)_: -+1 GenericInvestmentStorageBlock_init_content(storagenon_convex) --1 GenericInvestmentStorageBlock_invest(storagenon_convex) +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_total(storage_non_convex_0) += 0 + +c_u_GenericInvestmentStorageBlock_init_content_limit(storage_non_convex)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_init_content(storage_non_convex) <= 0 -c_e_GenericInvestmentStorageBlock_balance_first(storagenon_convex)_: --0.87 GenericInvestmentStorageBlock_init_content(storagenon_convex) -+1 GenericInvestmentStorageBlock_storage_content(storagenon_convex_0) --0.96999999999999997 flow(electricityBus_storagenon_convex_0) -+1.1627906976744187 flow(storagenon_convex_electricityBus_0) +c_e_GenericInvestmentStorageBlock_balance_first(storage_non_convex)_: +-0.97 flow(electricityBus_storage_non_convex_0_0) ++1.1627906976744187 flow(storage_non_convex_electricityBus_0_0) +-0.87 GenericInvestmentStorageBlock_init_content(storage_non_convex) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) = 0 -c_e_GenericInvestmentStorageBlock_balance(storagenon_convex_1)_: --0.87 GenericInvestmentStorageBlock_storage_content(storagenon_convex_0) -+1 GenericInvestmentStorageBlock_storage_content(storagenon_convex_1) --0.96999999999999997 flow(electricityBus_storagenon_convex_1) -+1.1627906976744187 flow(storagenon_convex_electricityBus_1) +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_0_1)_: +-0.97 flow(electricityBus_storage_non_convex_0_1) ++1.1627906976744187 flow(storage_non_convex_electricityBus_0_1) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) = 0 -c_e_GenericInvestmentStorageBlock_balance(storagenon_convex_2)_: --0.87 GenericInvestmentStorageBlock_storage_content(storagenon_convex_1) -+1 GenericInvestmentStorageBlock_storage_content(storagenon_convex_2) --0.96999999999999997 flow(electricityBus_storagenon_convex_2) -+1.1627906976744187 flow(storagenon_convex_electricityBus_2) +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_0_2)_: +-0.97 flow(electricityBus_storage_non_convex_0_2) ++1.1627906976744187 flow(storage_non_convex_electricityBus_0_2) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) = 0 -c_e_GenericInvestmentStorageBlock_balanced_cstr(storagenon_convex)_: --1 GenericInvestmentStorageBlock_init_content(storagenon_convex) -+1 GenericInvestmentStorageBlock_storage_content(storagenon_convex_2) +c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_non_convex)_: +-1 GenericInvestmentStorageBlock_init_content(storage_non_convex) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storagenon_convex)_: --0.16666666666666666 GenericInvestmentStorageBlock_invest(storagenon_convex) -+1 InvestmentFlowBlock_invest(electricityBus_storagenon_convex) +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_0) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storagenon_convex)_: --0.16666666666666666 GenericInvestmentStorageBlock_invest(storagenon_convex) -+1 InvestmentFlowBlock_invest(storagenon_convex_electricityBus) +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_0) = 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storagenon_convex_0)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storagenon_convex) -+1 GenericInvestmentStorageBlock_storage_content(storagenon_convex_0) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_0_0)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storagenon_convex_1)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storagenon_convex) -+1 GenericInvestmentStorageBlock_storage_content(storagenon_convex_1) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_0_1)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storagenon_convex_2)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storagenon_convex) -+1 GenericInvestmentStorageBlock_storage_content(storagenon_convex_2) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_0_2)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storagenon_convex_0)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storagenon_convex) --1 GenericInvestmentStorageBlock_storage_content(storagenon_convex_0) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_0_0)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_0) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storagenon_convex_1)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storagenon_convex) --1 GenericInvestmentStorageBlock_storage_content(storagenon_convex_1) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_0_1)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_0) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storagenon_convex_2)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storagenon_convex) --1 GenericInvestmentStorageBlock_storage_content(storagenon_convex_2) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_0_2)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_0) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) <= 0 -c_l_GenericInvestmentStorageBlock_limit_max(storagenon_convex)_: --1 GenericInvestmentStorageBlock_invest(storagenon_convex) -+1454 GenericInvestmentStorageBlock_invest_status(storagenon_convex) +c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++1454 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) >= 0 -c_l_GenericInvestmentStorageBlock_limit_min(storagenon_convex)_: -+1 GenericInvestmentStorageBlock_invest(storagenon_convex) --19 GenericInvestmentStorageBlock_invest_status(storagenon_convex) +c_l_GenericInvestmentStorageBlock_limit_min(storage_non_convex_0)_: ++1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) +-19 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) >= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(electricityBus_storagenon_convex_0) <= +inf - 0 <= flow(electricityBus_storagenon_convex_1) <= +inf - 0 <= flow(electricityBus_storagenon_convex_2) <= +inf - 0 <= flow(storagenon_convex_electricityBus_0) <= +inf - 0 <= flow(storagenon_convex_electricityBus_1) <= +inf - 0 <= flow(storagenon_convex_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(electricityBus_storagenon_convex) <= +inf - 0 <= InvestmentFlowBlock_invest(storagenon_convex_electricityBus) <= +inf - 0 <= GenericInvestmentStorageBlock_storage_content(storagenon_convex_0) <= +inf - 0 <= GenericInvestmentStorageBlock_storage_content(storagenon_convex_1) <= +inf - 0 <= GenericInvestmentStorageBlock_storage_content(storagenon_convex_2) <= +inf - 0 <= GenericInvestmentStorageBlock_invest(storagenon_convex) <= 1454 - 0 <= GenericInvestmentStorageBlock_init_content(storagenon_convex) <= +inf - 0 <= GenericInvestmentStorageBlock_invest_status(storagenon_convex) <= 1 + 0 <= flow(electricityBus_storage_non_convex_0_0) <= +inf + 0 <= flow(electricityBus_storage_non_convex_0_1) <= +inf + 0 <= flow(electricityBus_storage_non_convex_0_2) <= +inf + 0 <= flow(storage_non_convex_electricityBus_0_0) <= +inf + 0 <= flow(storage_non_convex_electricityBus_0_1) <= +inf + 0 <= flow(storage_non_convex_electricityBus_0_2) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_0) <= 1454 + 0 <= GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) <= 1 + 0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage_non_convex) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) <= +inf binary - GenericInvestmentStorageBlock_invest_status(storagenon_convex) + GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) end diff --git a/tests/lp_files/storage_invest_with_offset_multi_period.lp b/tests/lp_files/storage_invest_with_offset_multi_period.lp new file mode 100644 index 000000000..9fb9d7680 --- /dev/null +++ b/tests/lp_files/storage_invest_with_offset_multi_period.lp @@ -0,0 +1,529 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++56 flow(electricityBus_storage_non_convex_0_0) ++56 flow(electricityBus_storage_non_convex_0_1) ++54.90196078431372 flow(electricityBus_storage_non_convex_1_2) ++54.90196078431372 flow(electricityBus_storage_non_convex_1_3) ++53.82545174932718 flow(electricityBus_storage_non_convex_2_4) ++53.82545174932718 flow(electricityBus_storage_non_convex_2_5) ++24 flow(storage_non_convex_electricityBus_0_0) ++24 flow(storage_non_convex_electricityBus_0_1) ++23.52941176470588 flow(storage_non_convex_electricityBus_1_2) ++23.52941176470588 flow(storage_non_convex_electricityBus_1_3) ++23.06805074971165 flow(storage_non_convex_electricityBus_2_4) ++23.06805074971165 flow(storage_non_convex_electricityBus_2_5) ++177.35448256334197 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++5 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) ++173.87694368955096 GenericInvestmentStorageBlock_invest(storage_non_convex_1) ++4.901960784313725 GenericInvestmentStorageBlock_invest_status(storage_non_convex_1) ++170.46759185250093 GenericInvestmentStorageBlock_invest(storage_non_convex_2) ++4.805843906189927 GenericInvestmentStorageBlock_invest_status(storage_non_convex_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_storage_non_convex_0_0) ++1 flow(storage_non_convex_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_storage_non_convex_0_1) ++1 flow(storage_non_convex_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: +-1 flow(electricityBus_storage_non_convex_1_2) ++1 flow(storage_non_convex_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: +-1 flow(electricityBus_storage_non_convex_1_3) ++1 flow(storage_non_convex_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: +-1 flow(electricityBus_storage_non_convex_2_4) ++1 flow(storage_non_convex_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: +-1 flow(electricityBus_storage_non_convex_2_5) ++1 flow(storage_non_convex_electricityBus_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_1)_: +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) +-1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_1) ++1 InvestmentFlowBlock_old(storage_non_convex_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_2)_: +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) +-1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_2) ++1 InvestmentFlowBlock_old(storage_non_convex_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +-1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_1)_: +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) +-1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_1) ++1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_2)_: +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2) +-1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_2) ++1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_non_convex_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_non_convex_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_non_convex_electricityBus_2)_: ++1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage_non_convex_0)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage_non_convex_1)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage_non_convex_2)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_non_convex_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_non_convex_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_non_convex_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage_non_convex_0)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage_non_convex_1)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage_non_convex_2)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_non_convex_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_0) ++1 InvestmentFlowBlock_old(storage_non_convex_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_non_convex_electricityBus_1)_: ++1 InvestmentFlowBlock_old(storage_non_convex_electricityBus_1) +-1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_non_convex_electricityBus_2)_: ++1 InvestmentFlowBlock_old(storage_non_convex_electricityBus_2) +-1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage_non_convex_0)_: +-1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_0) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_0) ++1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage_non_convex_1)_: ++1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_1) +-1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_1) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage_non_convex_2)_: ++1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_2) +-1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_2) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_2) += 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_0)_: ++1 flow(storage_non_convex_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_1)_: ++1 flow(storage_non_convex_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_1_2)_: ++1 flow(storage_non_convex_electricityBus_1_2) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_1_3)_: ++1 flow(storage_non_convex_electricityBus_1_3) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_2_4)_: ++1 flow(storage_non_convex_electricityBus_2_4) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_2_5)_: ++1 flow(storage_non_convex_electricityBus_2_5) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_0)_: ++1 flow(electricityBus_storage_non_convex_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_1)_: ++1 flow(electricityBus_storage_non_convex_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_1_2)_: ++1 flow(electricityBus_storage_non_convex_1_2) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_1_3)_: ++1 flow(electricityBus_storage_non_convex_1_3) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_2_4)_: ++1 flow(electricityBus_storage_non_convex_2_4) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_2_5)_: ++1 flow(electricityBus_storage_non_convex_2_5) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2) +<= 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_total(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_1)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_1) +-1 GenericInvestmentStorageBlock_total(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_total(storage_non_convex_1) ++1 GenericInvestmentStorageBlock_old(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_2)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_2) +-1 GenericInvestmentStorageBlock_total(storage_non_convex_1) ++1 GenericInvestmentStorageBlock_total(storage_non_convex_2) ++1 GenericInvestmentStorageBlock_old(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_non_convex_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_non_convex_1)_: ++1 GenericInvestmentStorageBlock_old_end(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_non_convex_2)_: ++1 GenericInvestmentStorageBlock_old_end(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_non_convex_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_non_convex_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_non_convex_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_non_convex_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage_non_convex_0) +-1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_old(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_non_convex_1)_: ++1 GenericInvestmentStorageBlock_old(storage_non_convex_1) +-1 GenericInvestmentStorageBlock_old_end(storage_non_convex_1) +-1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_non_convex_2)_: ++1 GenericInvestmentStorageBlock_old(storage_non_convex_2) +-1 GenericInvestmentStorageBlock_old_end(storage_non_convex_2) +-1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage_non_convex_0)_: ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_0_1)_: +-0.97 flow(electricityBus_storage_non_convex_0_1) ++1.1627906976744187 flow(storage_non_convex_electricityBus_0_1) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_1_2)_: +-0.97 flow(electricityBus_storage_non_convex_1_2) ++1.1627906976744187 flow(storage_non_convex_electricityBus_1_2) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_1_3)_: +-0.97 flow(electricityBus_storage_non_convex_1_3) ++1.1627906976744187 flow(storage_non_convex_electricityBus_1_3) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_2_4)_: +-0.97 flow(electricityBus_storage_non_convex_2_4) ++1.1627906976744187 flow(storage_non_convex_electricityBus_2_4) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_3) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_2_5)_: +-0.97 flow(electricityBus_storage_non_convex_2_5) ++1.1627906976744187 flow(storage_non_convex_electricityBus_2_5) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_4) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_5) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_1)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_2)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_non_convex_1)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_non_convex_2)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_2) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_0_0)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_0_1)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_1_2)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_1_3)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_2_4)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_2_5)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_5) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_0_0)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_0) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_0_1)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_0) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_1_2)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_1) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_1_3)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_1) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_2_4)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_2) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_2_5)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_2) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_5) +<= 0 + +c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++1454 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_1)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_1) ++1454 GenericInvestmentStorageBlock_invest_status(storage_non_convex_1) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_2)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_2) ++1454 GenericInvestmentStorageBlock_invest_status(storage_non_convex_2) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_min(storage_non_convex_0)_: ++1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) +-19 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_min(storage_non_convex_1)_: ++1 GenericInvestmentStorageBlock_invest(storage_non_convex_1) +-19 GenericInvestmentStorageBlock_invest_status(storage_non_convex_1) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_min(storage_non_convex_2)_: ++1 GenericInvestmentStorageBlock_invest(storage_non_convex_2) +-19 GenericInvestmentStorageBlock_invest_status(storage_non_convex_2) +>= 0 + +bounds + 0 <= flow(electricityBus_storage_non_convex_0_0) <= +inf + 0 <= flow(electricityBus_storage_non_convex_0_1) <= +inf + 0 <= flow(electricityBus_storage_non_convex_1_2) <= +inf + 0 <= flow(electricityBus_storage_non_convex_1_3) <= +inf + 0 <= flow(electricityBus_storage_non_convex_2_4) <= +inf + 0 <= flow(electricityBus_storage_non_convex_2_5) <= +inf + 0 <= flow(storage_non_convex_electricityBus_0_0) <= +inf + 0 <= flow(storage_non_convex_electricityBus_0_1) <= +inf + 0 <= flow(storage_non_convex_electricityBus_1_2) <= +inf + 0 <= flow(storage_non_convex_electricityBus_1_3) <= +inf + 0 <= flow(storage_non_convex_electricityBus_2_4) <= +inf + 0 <= flow(storage_non_convex_electricityBus_2_5) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_0) <= 1454 + 0 <= GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) <= 1 + 0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_1) <= 1454 + 0 <= GenericInvestmentStorageBlock_invest_status(storage_non_convex_1) <= 1 + 0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_2) <= 1454 + 0 <= GenericInvestmentStorageBlock_invest_status(storage_non_convex_2) <= 1 + 0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_non_convex_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(storage_non_convex_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_non_convex_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage_non_convex_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_1) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage_non_convex_1) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage_non_convex_2) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage_non_convex_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_non_convex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_non_convex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_non_convex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_non_convex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_non_convex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_non_convex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_non_convex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_non_convex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_5) <= +inf +binary + GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) + GenericInvestmentStorageBlock_invest_status(storage_non_convex_1) + GenericInvestmentStorageBlock_invest_status(storage_non_convex_2) +end diff --git a/tests/lp_files/storage_invest_without_offset.lp b/tests/lp_files/storage_invest_without_offset.lp index f9d4f4607..248ce6848 100644 --- a/tests/lp_files/storage_invest_without_offset.lp +++ b/tests/lp_files/storage_invest_without_offset.lp @@ -1,86 +1,101 @@ \* Source Pyomo model name=Model *\ -min +min objective: -+141 GenericInvestmentStorageBlock_invest(storage_non_convex) -+56 flow(electricityBus_storage_non_convex_0) -+56 flow(electricityBus_storage_non_convex_1) -+56 flow(electricityBus_storage_non_convex_2) -+24 flow(storage_non_convex_electricityBus_0) -+24 flow(storage_non_convex_electricityBus_1) -+24 flow(storage_non_convex_electricityBus_2) ++56 flow(electricityBus_storage_non_convex_0_0) ++56 flow(electricityBus_storage_non_convex_0_1) ++56 flow(electricityBus_storage_non_convex_0_2) ++24 flow(storage_non_convex_electricityBus_0_0) ++24 flow(storage_non_convex_electricityBus_0_1) ++24 flow(storage_non_convex_electricityBus_0_2) ++141 GenericInvestmentStorageBlock_invest(storage_non_convex_0) s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage_non_convex_0) -+1 flow(storage_non_convex_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_storage_non_convex_0_0) ++1 flow(storage_non_convex_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage_non_convex_1) -+1 flow(storage_non_convex_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_storage_non_convex_0_1) ++1 flow(storage_non_convex_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage_non_convex_2) -+1 flow(storage_non_convex_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: +-1 flow(electricityBus_storage_non_convex_0_2) ++1 flow(storage_non_convex_electricityBus_0_2) = 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0)_: --1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex) -+1 flow(electricityBus_storage_non_convex_0) +c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +-1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) += 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_0)_: ++1 flow(storage_non_convex_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_1)_: --1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex) -+1 flow(electricityBus_storage_non_convex_1) +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_1)_: ++1 flow(storage_non_convex_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_2)_: --1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex) -+1 flow(electricityBus_storage_non_convex_2) +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_2)_: ++1 flow(storage_non_convex_electricityBus_0_2) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0)_: --1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus) -+1 flow(storage_non_convex_electricityBus_0) +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_0)_: ++1 flow(electricityBus_storage_non_convex_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_1)_: --1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus) -+1 flow(storage_non_convex_electricityBus_1) +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_1)_: ++1 flow(electricityBus_storage_non_convex_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) <= 0 -c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_2)_: --1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus) -+1 flow(storage_non_convex_electricityBus_2) +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_2)_: ++1 flow(electricityBus_storage_non_convex_0_2) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) <= 0 +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_total(storage_non_convex_0) += 0 + c_u_GenericInvestmentStorageBlock_init_content_limit(storage_non_convex)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) +1 GenericInvestmentStorageBlock_init_content(storage_non_convex) --1 GenericInvestmentStorageBlock_invest(storage_non_convex) <= 0 c_e_GenericInvestmentStorageBlock_balance_first(storage_non_convex)_: +-0.97 flow(electricityBus_storage_non_convex_0_0) ++1.1627906976744187 flow(storage_non_convex_electricityBus_0_0) -0.87 GenericInvestmentStorageBlock_init_content(storage_non_convex) +1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) --0.96999999999999997 flow(electricityBus_storage_non_convex_0) -+1.1627906976744187 flow(storage_non_convex_electricityBus_0) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_1)_: +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_0_1)_: +-0.97 flow(electricityBus_storage_non_convex_0_1) ++1.1627906976744187 flow(storage_non_convex_electricityBus_0_1) -0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) +1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) --0.96999999999999997 flow(electricityBus_storage_non_convex_1) -+1.1627906976744187 flow(storage_non_convex_electricityBus_1) = 0 -c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_2)_: +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_0_2)_: +-0.97 flow(electricityBus_storage_non_convex_0_2) ++1.1627906976744187 flow(storage_non_convex_electricityBus_0_2) -0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) +1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) --0.96999999999999997 flow(electricityBus_storage_non_convex_2) -+1.1627906976744187 flow(storage_non_convex_electricityBus_2) = 0 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_non_convex)_: @@ -88,74 +103,74 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_non_convex)_: +1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex)_: --0.16666666666666666 GenericInvestmentStorageBlock_invest(storage_non_convex) -+1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex) +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_0) = 0 -c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_non_convex)_: --0.16666666666666666 GenericInvestmentStorageBlock_invest(storage_non_convex) -+1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus) +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_0) = 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_0)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storage_non_convex) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_0_0)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0) +1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_1)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storage_non_convex) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_0_1)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0) +1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) <= 0 -c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_2)_: --0.90000000000000002 GenericInvestmentStorageBlock_invest(storage_non_convex) +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_0_2)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0) +1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_0)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storage_non_convex) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_0_0)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_0) -1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_1)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storage_non_convex) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_0_1)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_0) -1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) <= 0 -c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_2)_: -+0.10000000000000001 GenericInvestmentStorageBlock_invest(storage_non_convex) +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_0_2)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_0) -1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) <= 0 -c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex)_: --1 GenericInvestmentStorageBlock_invest(storage_non_convex) -+244 GenericInvestmentStorageBlock_invest_status(storage_non_convex) +c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++244 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) >= 0 -c_l_GenericInvestmentStorageBlock_limit_min(storage_non_convex)_: -+1 GenericInvestmentStorageBlock_invest(storage_non_convex) --12 GenericInvestmentStorageBlock_invest_status(storage_non_convex) +c_l_GenericInvestmentStorageBlock_limit_min(storage_non_convex_0)_: ++1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) +-12 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) >= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(electricityBus_storage_non_convex_0) <= +inf - 0 <= flow(electricityBus_storage_non_convex_1) <= +inf - 0 <= flow(electricityBus_storage_non_convex_2) <= +inf - 0 <= flow(storage_non_convex_electricityBus_0) <= +inf - 0 <= flow(storage_non_convex_electricityBus_1) <= +inf - 0 <= flow(storage_non_convex_electricityBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex) <= +inf - 0 <= InvestmentFlowBlock_invest(storage_non_convex_electricityBus) <= +inf + 0 <= flow(electricityBus_storage_non_convex_0_0) <= +inf + 0 <= flow(electricityBus_storage_non_convex_0_1) <= +inf + 0 <= flow(electricityBus_storage_non_convex_0_2) <= +inf + 0 <= flow(storage_non_convex_electricityBus_0_0) <= +inf + 0 <= flow(storage_non_convex_electricityBus_0_1) <= +inf + 0 <= flow(storage_non_convex_electricityBus_0_2) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_0) <= 244 + 0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_init_content(storage_non_convex) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) <= +inf 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) <= +inf - 0 <= GenericInvestmentStorageBlock_invest(storage_non_convex) <= 244 - 0 <= GenericInvestmentStorageBlock_init_content(storage_non_convex) <= +inf - 0 <= GenericInvestmentStorageBlock_invest_status(storage_non_convex) <= 1 + 0 <= GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) <= 1 binary - GenericInvestmentStorageBlock_invest_status(storage_non_convex) + GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) end diff --git a/tests/lp_files/storage_invest_without_offset_multi_period.lp b/tests/lp_files/storage_invest_without_offset_multi_period.lp new file mode 100644 index 000000000..3e98a271f --- /dev/null +++ b/tests/lp_files/storage_invest_without_offset_multi_period.lp @@ -0,0 +1,526 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++56 flow(electricityBus_storage_non_convex_0_0) ++56 flow(electricityBus_storage_non_convex_0_1) ++54.90196078431372 flow(electricityBus_storage_non_convex_1_2) ++54.90196078431372 flow(electricityBus_storage_non_convex_1_3) ++53.82545174932718 flow(electricityBus_storage_non_convex_2_4) ++53.82545174932718 flow(electricityBus_storage_non_convex_2_5) ++24 flow(storage_non_convex_electricityBus_0_0) ++24 flow(storage_non_convex_electricityBus_0_1) ++23.52941176470588 flow(storage_non_convex_electricityBus_1_2) ++23.52941176470588 flow(storage_non_convex_electricityBus_1_3) ++23.06805074971165 flow(storage_non_convex_electricityBus_2_4) ++23.06805074971165 flow(storage_non_convex_electricityBus_2_5) ++172.46194511331876 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++169.08033834639093 GenericInvestmentStorageBlock_invest(storage_non_convex_1) ++165.7650375945009 GenericInvestmentStorageBlock_invest(storage_non_convex_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_storage_non_convex_0_0) ++1 flow(storage_non_convex_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_storage_non_convex_0_1) ++1 flow(storage_non_convex_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: +-1 flow(electricityBus_storage_non_convex_1_2) ++1 flow(storage_non_convex_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: +-1 flow(electricityBus_storage_non_convex_1_3) ++1 flow(storage_non_convex_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: +-1 flow(electricityBus_storage_non_convex_2_4) ++1 flow(storage_non_convex_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: +-1 flow(electricityBus_storage_non_convex_2_5) ++1 flow(storage_non_convex_electricityBus_2_5) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_0)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +-1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_1)_: +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) +-1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_1) ++1 InvestmentFlowBlock_old(storage_non_convex_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_2)_: +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) +-1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_2) ++1 InvestmentFlowBlock_old(storage_non_convex_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +-1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_1)_: +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) +-1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_1) ++1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_1) += 0 + +c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_2)_: +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2) +-1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_2) ++1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_non_convex_electricityBus_0)_: ++1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_non_convex_electricityBus_1)_: ++1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(storage_non_convex_electricityBus_2)_: ++1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage_non_convex_0)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage_non_convex_1)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage_non_convex_2)_: ++1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_non_convex_electricityBus_0)_: ++1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_non_convex_electricityBus_1)_: ++1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(storage_non_convex_electricityBus_2)_: ++1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage_non_convex_0)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_0) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage_non_convex_1)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_1) += 0 + +c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage_non_convex_2)_: ++1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_non_convex_electricityBus_0)_: +-1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_0) +-1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_0) ++1 InvestmentFlowBlock_old(storage_non_convex_electricityBus_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_non_convex_electricityBus_1)_: ++1 InvestmentFlowBlock_old(storage_non_convex_electricityBus_1) +-1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_1) +-1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(storage_non_convex_electricityBus_2)_: ++1 InvestmentFlowBlock_old(storage_non_convex_electricityBus_2) +-1 InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_2) +-1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_2) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage_non_convex_0)_: +-1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_0) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_0) ++1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_0) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage_non_convex_1)_: ++1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_1) +-1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_1) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_1) += 0 + +c_e_InvestmentFlowBlock_old_rule(electricityBus_storage_non_convex_2)_: ++1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_2) +-1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_2) +-1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_2) += 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_0)_: ++1 flow(storage_non_convex_electricityBus_0_0) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_1)_: ++1 flow(storage_non_convex_electricityBus_0_1) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_1_2)_: ++1 flow(storage_non_convex_electricityBus_1_2) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_1_3)_: ++1 flow(storage_non_convex_electricityBus_1_3) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_2_4)_: ++1 flow(storage_non_convex_electricityBus_2_4) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_2_5)_: ++1 flow(storage_non_convex_electricityBus_2_5) +-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_0)_: ++1 flow(electricityBus_storage_non_convex_0_0) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_1)_: ++1 flow(electricityBus_storage_non_convex_0_1) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_1_2)_: ++1 flow(electricityBus_storage_non_convex_1_2) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_1_3)_: ++1 flow(electricityBus_storage_non_convex_1_3) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_2_4)_: ++1 flow(electricityBus_storage_non_convex_2_4) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2) +<= 0 + +c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_2_5)_: ++1 flow(electricityBus_storage_non_convex_2_5) +-1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2) +<= 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_total(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_1)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_1) +-1 GenericInvestmentStorageBlock_total(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_total(storage_non_convex_1) ++1 GenericInvestmentStorageBlock_old(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_2)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_2) +-1 GenericInvestmentStorageBlock_total(storage_non_convex_1) ++1 GenericInvestmentStorageBlock_total(storage_non_convex_2) ++1 GenericInvestmentStorageBlock_old(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_non_convex_0)_: ++1 GenericInvestmentStorageBlock_old_end(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_non_convex_1)_: ++1 GenericInvestmentStorageBlock_old_end(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_end(storage_non_convex_2)_: ++1 GenericInvestmentStorageBlock_old_end(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_non_convex_0)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_non_convex_1)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_non_convex_2)_: ++1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_non_convex_0)_: +-1 GenericInvestmentStorageBlock_old_end(storage_non_convex_0) +-1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_old(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_non_convex_1)_: ++1 GenericInvestmentStorageBlock_old(storage_non_convex_1) +-1 GenericInvestmentStorageBlock_old_end(storage_non_convex_1) +-1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_old_rule(storage_non_convex_2)_: ++1 GenericInvestmentStorageBlock_old(storage_non_convex_2) +-1 GenericInvestmentStorageBlock_old_end(storage_non_convex_2) +-1 GenericInvestmentStorageBlock_old_exo(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_initially_empty(storage_non_convex_0)_: ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_0_1)_: +-0.97 flow(electricityBus_storage_non_convex_0_1) ++1.1627906976744187 flow(storage_non_convex_electricityBus_0_1) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_1_2)_: +-0.97 flow(electricityBus_storage_non_convex_1_2) ++1.1627906976744187 flow(storage_non_convex_electricityBus_1_2) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_1_3)_: +-0.97 flow(electricityBus_storage_non_convex_1_3) ++1.1627906976744187 flow(storage_non_convex_electricityBus_1_3) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_3) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_2_4)_: +-0.97 flow(electricityBus_storage_non_convex_2_4) ++1.1627906976744187 flow(storage_non_convex_electricityBus_2_4) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_3) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_4) += 0 + +c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_2_5)_: +-0.97 flow(electricityBus_storage_non_convex_2_5) ++1.1627906976744187 flow(storage_non_convex_electricityBus_2_5) +-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_4) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_5) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_1)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_2)_: ++1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_2) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_non_convex_0)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_0) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_non_convex_1)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_1) += 0 + +c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_non_convex_2)_: ++1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) +-0.16666666666666666 GenericInvestmentStorageBlock_total(storage_non_convex_2) += 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_0_0)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_0_1)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_1_2)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_1_3)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_1) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_2_4)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_max_storage_content(storage_non_convex_2_5)_: +-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_2) ++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_5) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_0_0)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_0) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_0_1)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_0) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_1_2)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_1) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_1_3)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_1) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_3) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_2_4)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_2) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_4) +<= 0 + +c_u_GenericInvestmentStorageBlock_min_storage_content(storage_non_convex_2_5)_: ++0.1 GenericInvestmentStorageBlock_total(storage_non_convex_2) +-1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_5) +<= 0 + +c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_0)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) ++244 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_1)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_1) ++244 GenericInvestmentStorageBlock_invest_status(storage_non_convex_1) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_2)_: +-1 GenericInvestmentStorageBlock_invest(storage_non_convex_2) ++244 GenericInvestmentStorageBlock_invest_status(storage_non_convex_2) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_min(storage_non_convex_0)_: ++1 GenericInvestmentStorageBlock_invest(storage_non_convex_0) +-12 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_min(storage_non_convex_1)_: ++1 GenericInvestmentStorageBlock_invest(storage_non_convex_1) +-12 GenericInvestmentStorageBlock_invest_status(storage_non_convex_1) +>= 0 + +c_l_GenericInvestmentStorageBlock_limit_min(storage_non_convex_2)_: ++1 GenericInvestmentStorageBlock_invest(storage_non_convex_2) +-12 GenericInvestmentStorageBlock_invest_status(storage_non_convex_2) +>= 0 + +bounds + 0 <= flow(electricityBus_storage_non_convex_0_0) <= +inf + 0 <= flow(electricityBus_storage_non_convex_0_1) <= +inf + 0 <= flow(electricityBus_storage_non_convex_1_2) <= +inf + 0 <= flow(electricityBus_storage_non_convex_1_3) <= +inf + 0 <= flow(electricityBus_storage_non_convex_2_4) <= +inf + 0 <= flow(electricityBus_storage_non_convex_2_5) <= +inf + 0 <= flow(storage_non_convex_electricityBus_0_0) <= +inf + 0 <= flow(storage_non_convex_electricityBus_0_1) <= +inf + 0 <= flow(storage_non_convex_electricityBus_1_2) <= +inf + 0 <= flow(storage_non_convex_electricityBus_1_3) <= +inf + 0 <= flow(storage_non_convex_electricityBus_2_4) <= +inf + 0 <= flow(storage_non_convex_electricityBus_2_5) <= +inf + 0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_0) <= 244 + 0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_1) <= 244 + 0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_2) <= 244 + 0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_non_convex_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old(storage_non_convex_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_invest(storage_non_convex_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage_non_convex_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage_non_convex_0) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage_non_convex_1) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_1) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage_non_convex_1) <= +inf + 0 <= InvestmentFlowBlock_total(electricityBus_storage_non_convex_2) <= +inf + 0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_2) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage_non_convex_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(storage_non_convex_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_0) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_1) <= +inf + 0 <= InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_2) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_0) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_1) <= +inf + 0 <= InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_2) <= +inf + 0 <= InvestmentFlowBlock_old(storage_non_convex_electricityBus_0) <= +inf + 0 <= InvestmentFlowBlock_old(electricityBus_storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_non_convex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_non_convex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_total(storage_non_convex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_non_convex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_non_convex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_end(storage_non_convex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_non_convex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_old_exo(storage_non_convex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_old(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_2) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_3) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_4) <= +inf + 0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_5) <= +inf + 0 <= GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) <= 1 + 0 <= GenericInvestmentStorageBlock_invest_status(storage_non_convex_1) <= 1 + 0 <= GenericInvestmentStorageBlock_invest_status(storage_non_convex_2) <= 1 +binary + GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) + GenericInvestmentStorageBlock_invest_status(storage_non_convex_1) + GenericInvestmentStorageBlock_invest_status(storage_non_convex_2) +end diff --git a/tests/lp_files/storage_level_constraint.lp b/tests/lp_files/storage_level_constraint.lp new file mode 100644 index 000000000..e64ec8e92 --- /dev/null +++ b/tests/lp_files/storage_level_constraint.lp @@ -0,0 +1,136 @@ +\* Source Pyomo model name=Model *\ + +min +objective: +-0.125 flow(multiplexer_out_0_0_0) +-0.125 flow(multiplexer_out_0_0_1) +-0.125 flow(multiplexer_out_1_0_0) +-0.125 flow(multiplexer_out_1_0_1) ++0.25 flow(in_0_multiplexer_0_0) ++0.25 flow(in_0_multiplexer_0_1) + +s.t. + +c_u_multiplexer_output_active_constraint(out_0_0)_: ++0.125 multiplexer_active_output(out_0_0) +-0.25 GenericStorageBlock_storage_content(storage_1) +<= 0 + +c_u_multiplexer_output_active_constraint(out_0_1)_: ++0.125 multiplexer_active_output(out_0_1) +-0.25 GenericStorageBlock_storage_content(storage_2) +<= 0 + +c_u_multiplexer_output_active_constraint(out_1_0)_: +-0.25 GenericStorageBlock_storage_content(storage_1) ++0.5 multiplexer_active_output(out_1_0) +<= 0 + +c_u_multiplexer_output_active_constraint(out_1_1)_: +-0.25 GenericStorageBlock_storage_content(storage_2) ++0.5 multiplexer_active_output(out_1_1) +<= 0 + +c_u_multiplexer_output_constraint(out_0_0_0)_: ++4.0 flow(multiplexer_out_0_0_0) +-1 multiplexer_active_output(out_0_0) +<= 0 + +c_u_multiplexer_output_constraint(out_0_0_1)_: ++4.0 flow(multiplexer_out_0_0_1) +-1 multiplexer_active_output(out_0_1) +<= 0 + +c_u_multiplexer_output_constraint(out_1_0_0)_: ++8.0 flow(multiplexer_out_1_0_0) +-1 multiplexer_active_output(out_1_0) +<= 0 + +c_u_multiplexer_output_constraint(out_1_0_1)_: ++8.0 flow(multiplexer_out_1_0_1) +-1 multiplexer_active_output(out_1_1) +<= 0 + +c_u_multiplexer_input_active_constraint(in_1_0)_: +-1 multiplexer_active_input(in_1_0) +<= -0.75 + +c_u_multiplexer_input_active_constraint(in_1_1)_: ++0.25 GenericStorageBlock_storage_content(storage_1) +-1 multiplexer_active_input(in_1_1) +<= 0.25 + +c_u_multiplexer_input_constraint(in_1_0_0)_: ++1 multiplexer_active_input(in_1_0) ++8.0 flow(in_1_multiplexer_0_0) +<= 1 + +c_u_multiplexer_input_constraint(in_1_0_1)_: ++1 multiplexer_active_input(in_1_1) ++8.0 flow(in_1_multiplexer_0_1) +<= 1 + +c_e_BusBlock_balance(multiplexer_0_0)_: +-1 flow(multiplexer_out_0_0_0) +-1 flow(multiplexer_out_1_0_0) ++1 flow(in_0_multiplexer_0_0) ++1 flow(in_1_multiplexer_0_0) ++1 flow(storage_multiplexer_0_0) +-1 flow(multiplexer_storage_0_0) += 0 + +c_e_BusBlock_balance(multiplexer_0_1)_: +-1 flow(multiplexer_out_0_0_1) +-1 flow(multiplexer_out_1_0_1) ++1 flow(in_0_multiplexer_0_1) ++1 flow(in_1_multiplexer_0_1) ++1 flow(storage_multiplexer_0_1) +-1 flow(multiplexer_storage_0_1) += 0 + +c_e_GenericStorageBlock_balance(storage_0_0)_: ++1 GenericStorageBlock_storage_content(storage_1) ++1 flow(storage_multiplexer_0_0) +-1 flow(multiplexer_storage_0_0) += 3.0 + +c_e_GenericStorageBlock_balance(storage_0_1)_: +-0.75 GenericStorageBlock_storage_content(storage_1) ++1 GenericStorageBlock_storage_content(storage_2) ++1 flow(storage_multiplexer_0_1) +-1 flow(multiplexer_storage_0_1) += 0 + +c_e_GenericStorageBlock_balanced_cstr(storage)_: ++1 GenericStorageBlock_storage_content(storage_2) += 4 + +bounds + 0.0 <= flow(multiplexer_out_0_0_0) <= 0.25 + 0.0 <= flow(multiplexer_out_0_0_1) <= 0.25 + 0.0 <= flow(multiplexer_out_1_0_0) <= 0.125 + 0.0 <= flow(multiplexer_out_1_0_1) <= 0.125 + 0.0 <= flow(in_0_multiplexer_0_0) <= 0.5 + 0.0 <= flow(in_0_multiplexer_0_1) <= 0.5 + 0 <= multiplexer_active_output(out_0_0) <= 1 + 0 <= GenericStorageBlock_storage_content(storage_1) <= 4 + 0 <= multiplexer_active_output(out_0_1) <= 1 + 0 <= GenericStorageBlock_storage_content(storage_2) <= 4 + 0 <= multiplexer_active_output(out_1_0) <= 1 + 0 <= multiplexer_active_output(out_1_1) <= 1 + 0 <= multiplexer_active_input(in_1_0) <= 1 + 0 <= multiplexer_active_input(in_1_1) <= 1 + 0.0 <= flow(in_1_multiplexer_0_0) <= 0.125 + 0.0 <= flow(in_1_multiplexer_0_1) <= 0.125 + 0 <= flow(storage_multiplexer_0_0) <= +inf + 0 <= flow(multiplexer_storage_0_0) <= +inf + 0 <= flow(storage_multiplexer_0_1) <= +inf + 0 <= flow(multiplexer_storage_0_1) <= +inf +binary + multiplexer_active_output(out_0_0) + multiplexer_active_output(out_0_1) + multiplexer_active_output(out_1_0) + multiplexer_active_output(out_1_1) + multiplexer_active_input(in_1_0) + multiplexer_active_input(in_1_1) +end diff --git a/tests/lp_files/storage_multi_period.lp b/tests/lp_files/storage_multi_period.lp new file mode 100644 index 000000000..8fc170517 --- /dev/null +++ b/tests/lp_files/storage_multi_period.lp @@ -0,0 +1,114 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++56 flow(electricityBus_storage_no_invest_0_0) ++56 flow(electricityBus_storage_no_invest_0_1) ++54.90196078431372 flow(electricityBus_storage_no_invest_1_2) ++54.90196078431372 flow(electricityBus_storage_no_invest_1_3) ++53.82545174932718 flow(electricityBus_storage_no_invest_2_4) ++53.82545174932718 flow(electricityBus_storage_no_invest_2_5) ++24 flow(storage_no_invest_electricityBus_0_0) ++24 flow(storage_no_invest_electricityBus_0_1) ++23.52941176470588 flow(storage_no_invest_electricityBus_1_2) ++23.52941176470588 flow(storage_no_invest_electricityBus_1_3) ++23.06805074971165 flow(storage_no_invest_electricityBus_2_4) ++23.06805074971165 flow(storage_no_invest_electricityBus_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: +-1 flow(electricityBus_storage_no_invest_0_0) ++1 flow(storage_no_invest_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: +-1 flow(electricityBus_storage_no_invest_0_1) ++1 flow(storage_no_invest_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: +-1 flow(electricityBus_storage_no_invest_1_2) ++1 flow(storage_no_invest_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: +-1 flow(electricityBus_storage_no_invest_1_3) ++1 flow(storage_no_invest_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: +-1 flow(electricityBus_storage_no_invest_2_4) ++1 flow(storage_no_invest_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: +-1 flow(electricityBus_storage_no_invest_2_5) ++1 flow(storage_no_invest_electricityBus_2_5) += 0 + +c_e_GenericStorageBlock_balance(storage_no_invest_0_0)_: +-0.97 flow(electricityBus_storage_no_invest_0_0) ++1.1627906976744187 flow(storage_no_invest_electricityBus_0_0) ++1 GenericStorageBlock_storage_content(storage_no_invest_1) += 34800.0 + +c_e_GenericStorageBlock_balance(storage_no_invest_0_1)_: +-0.97 flow(electricityBus_storage_no_invest_0_1) ++1.1627906976744187 flow(storage_no_invest_electricityBus_0_1) +-0.87 GenericStorageBlock_storage_content(storage_no_invest_1) ++1 GenericStorageBlock_storage_content(storage_no_invest_2) += 0 + +c_e_GenericStorageBlock_balance(storage_no_invest_1_2)_: +-0.97 flow(electricityBus_storage_no_invest_1_2) ++1.1627906976744187 flow(storage_no_invest_electricityBus_1_2) +-0.87 GenericStorageBlock_storage_content(storage_no_invest_2) ++1 GenericStorageBlock_storage_content(storage_no_invest_3) += 0 + +c_e_GenericStorageBlock_balance(storage_no_invest_1_3)_: +-0.97 flow(electricityBus_storage_no_invest_1_3) ++1.1627906976744187 flow(storage_no_invest_electricityBus_1_3) +-0.87 GenericStorageBlock_storage_content(storage_no_invest_3) ++1 GenericStorageBlock_storage_content(storage_no_invest_4) += 0 + +c_e_GenericStorageBlock_balance(storage_no_invest_2_4)_: +-0.97 flow(electricityBus_storage_no_invest_2_4) ++1.1627906976744187 flow(storage_no_invest_electricityBus_2_4) +-0.87 GenericStorageBlock_storage_content(storage_no_invest_4) ++1 GenericStorageBlock_storage_content(storage_no_invest_5) += 0 + +c_e_GenericStorageBlock_balance(storage_no_invest_2_5)_: +-0.97 flow(electricityBus_storage_no_invest_2_5) ++1.1627906976744187 flow(storage_no_invest_electricityBus_2_5) +-0.87 GenericStorageBlock_storage_content(storage_no_invest_5) ++1 GenericStorageBlock_storage_content(storage_no_invest_6) += 0 + +c_e_GenericStorageBlock_balanced_cstr(storage_no_invest)_: ++1 GenericStorageBlock_storage_content(storage_no_invest_6) += 40000.0 + +bounds + 0 <= flow(electricityBus_storage_no_invest_0_0) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_0_1) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_1_2) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_1_3) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_2_4) <= 16667 + 0 <= flow(electricityBus_storage_no_invest_2_5) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_0_0) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_0_1) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_1_2) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_1_3) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_2_4) <= 16667 + 0 <= flow(storage_no_invest_electricityBus_2_5) <= 16667 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_1) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_2) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_3) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_4) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_5) <= 100000.0 + 0.0 <= GenericStorageBlock_storage_content(storage_no_invest_6) <= 100000.0 +end diff --git a/tests/lp_files/storage_unbalanced.lp b/tests/lp_files/storage_unbalanced.lp index bc5a87cd0..dfe57f128 100644 --- a/tests/lp_files/storage_unbalanced.lp +++ b/tests/lp_files/storage_unbalanced.lp @@ -6,54 +6,52 @@ objective: s.t. -c_e_BusBlock_balance(electricityBus_0)_: --1 flow(electricityBus_storage1_0) -+1 flow(storage1_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 flow(electricityBus_storage1_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: --1 flow(electricityBus_storage1_1) -+1 flow(storage1_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: --1 flow(electricityBus_storage1_2) -+1 flow(storage1_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(storage1_electricityBus_0_2) +-1 flow(electricityBus_storage1_0_2) = 0 -c_e_GenericStorageBlock_balance(storage1_0)_: --1 GenericStorageBlock_storage_content(storage1_0) +c_e_GenericStorageBlock_balance(storage1_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 flow(electricityBus_storage1_0_0) +1 GenericStorageBlock_storage_content(storage1_1) --1 flow(electricityBus_storage1_0) -+1 flow(storage1_electricityBus_0) +-1 GenericStorageBlock_storage_content(storage1_0) = 0 -c_e_GenericStorageBlock_balance(storage1_1)_: +c_e_GenericStorageBlock_balance(storage1_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) -1 GenericStorageBlock_storage_content(storage1_1) +1 GenericStorageBlock_storage_content(storage1_2) --1 flow(electricityBus_storage1_1) -+1 flow(storage1_electricityBus_1) = 0 -c_e_GenericStorageBlock_balance(storage1_2)_: +c_e_GenericStorageBlock_balance(storage1_0_2)_: ++1 flow(storage1_electricityBus_0_2) +-1 flow(electricityBus_storage1_0_2) -1 GenericStorageBlock_storage_content(storage1_2) +1 GenericStorageBlock_storage_content(storage1_3) --1 flow(electricityBus_storage1_2) -+1 flow(storage1_electricityBus_2) = 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(electricityBus_storage1_0) <= +inf - 0 <= flow(electricityBus_storage1_1) <= +inf - 0 <= flow(electricityBus_storage1_2) <= +inf - 0 <= flow(storage1_electricityBus_0) <= +inf - 0 <= flow(storage1_electricityBus_1) <= +inf - 0 <= flow(storage1_electricityBus_2) <= +inf - 0 <= GenericStorageBlock_storage_content(storage1_0) <= 1111 + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(storage1_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage1_0_0) <= +inf + 0 <= flow(storage1_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage1_0_1) <= +inf + 0 <= flow(storage1_electricityBus_0_2) <= +inf + 0 <= flow(electricityBus_storage1_0_2) <= +inf 0 <= GenericStorageBlock_storage_content(storage1_1) <= 1111 + 0 <= GenericStorageBlock_storage_content(storage1_0) <= 1111 0 <= GenericStorageBlock_storage_content(storage1_2) <= 1111 0 <= GenericStorageBlock_storage_content(storage1_3) <= 1111 end diff --git a/tests/lp_files/storage_unbalanced_multi_period.lp b/tests/lp_files/storage_unbalanced_multi_period.lp new file mode 100644 index 000000000..3cb5b79b8 --- /dev/null +++ b/tests/lp_files/storage_unbalanced_multi_period.lp @@ -0,0 +1,102 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++0.0 ONE_VAR_CONSTANT + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 flow(electricityBus_storage1_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(storage1_electricityBus_1_2) +-1 flow(electricityBus_storage1_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(storage1_electricityBus_1_3) +-1 flow(electricityBus_storage1_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(storage1_electricityBus_2_4) +-1 flow(electricityBus_storage1_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(storage1_electricityBus_2_5) +-1 flow(electricityBus_storage1_2_5) += 0 + +c_e_GenericStorageBlock_balance(storage1_0_0)_: ++1 flow(storage1_electricityBus_0_0) +-1 flow(electricityBus_storage1_0_0) ++1 GenericStorageBlock_storage_content(storage1_1) +-1 GenericStorageBlock_storage_content(storage1_0) += 0 + +c_e_GenericStorageBlock_balance(storage1_0_1)_: ++1 flow(storage1_electricityBus_0_1) +-1 flow(electricityBus_storage1_0_1) +-1 GenericStorageBlock_storage_content(storage1_1) ++1 GenericStorageBlock_storage_content(storage1_2) += 0 + +c_e_GenericStorageBlock_balance(storage1_1_2)_: ++1 flow(storage1_electricityBus_1_2) +-1 flow(electricityBus_storage1_1_2) +-1 GenericStorageBlock_storage_content(storage1_2) ++1 GenericStorageBlock_storage_content(storage1_3) += 0 + +c_e_GenericStorageBlock_balance(storage1_1_3)_: ++1 flow(storage1_electricityBus_1_3) +-1 flow(electricityBus_storage1_1_3) +-1 GenericStorageBlock_storage_content(storage1_3) ++1 GenericStorageBlock_storage_content(storage1_4) += 0 + +c_e_GenericStorageBlock_balance(storage1_2_4)_: ++1 flow(storage1_electricityBus_2_4) +-1 flow(electricityBus_storage1_2_4) +-1 GenericStorageBlock_storage_content(storage1_4) ++1 GenericStorageBlock_storage_content(storage1_5) += 0 + +c_e_GenericStorageBlock_balance(storage1_2_5)_: ++1 flow(storage1_electricityBus_2_5) +-1 flow(electricityBus_storage1_2_5) +-1 GenericStorageBlock_storage_content(storage1_5) ++1 GenericStorageBlock_storage_content(storage1_6) += 0 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(storage1_electricityBus_0_0) <= +inf + 0 <= flow(electricityBus_storage1_0_0) <= +inf + 0 <= flow(storage1_electricityBus_0_1) <= +inf + 0 <= flow(electricityBus_storage1_0_1) <= +inf + 0 <= flow(storage1_electricityBus_1_2) <= +inf + 0 <= flow(electricityBus_storage1_1_2) <= +inf + 0 <= flow(storage1_electricityBus_1_3) <= +inf + 0 <= flow(electricityBus_storage1_1_3) <= +inf + 0 <= flow(storage1_electricityBus_2_4) <= +inf + 0 <= flow(electricityBus_storage1_2_4) <= +inf + 0 <= flow(storage1_electricityBus_2_5) <= +inf + 0 <= flow(electricityBus_storage1_2_5) <= +inf + 0 <= GenericStorageBlock_storage_content(storage1_1) <= 1111 + 0 <= GenericStorageBlock_storage_content(storage1_0) <= 1111 + 0 <= GenericStorageBlock_storage_content(storage1_2) <= 1111 + 0 <= GenericStorageBlock_storage_content(storage1_3) <= 1111 + 0 <= GenericStorageBlock_storage_content(storage1_4) <= 1111 + 0 <= GenericStorageBlock_storage_content(storage1_5) <= 1111 + 0 <= GenericStorageBlock_storage_content(storage1_6) <= 1111 +end diff --git a/tests/lp_files/summed_min_source.lp b/tests/lp_files/summed_min_source.lp new file mode 100644 index 000000000..f2cf9022b --- /dev/null +++ b/tests/lp_files/summed_min_source.lp @@ -0,0 +1,39 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++25 flow(electricityBus_excess_0_0) ++25 flow(electricityBus_excess_0_1) ++25 flow(electricityBus_excess_0_2) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(electricityBus_excess_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(electricityBus_excess_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(electricityBus_excess_0_2) += 0 + +c_u_SimpleFlowBlock_full_load_time_max_constr(electricityBus_excess)_: ++1 flow(electricityBus_excess_0_0) ++1 flow(electricityBus_excess_0_1) ++1 flow(electricityBus_excess_0_2) +<= 1000 + +c_l_SimpleFlowBlock_full_load_time_min_constr(electricityBus_excess)_: ++1 flow(electricityBus_excess_0_0) ++1 flow(electricityBus_excess_0_1) ++1 flow(electricityBus_excess_0_2) +>= 30 + +bounds + 0 <= flow(electricityBus_excess_0_0) <= 8.0 + 0 <= flow(electricityBus_excess_0_1) <= 8.0 + 0 <= flow(electricityBus_excess_0_2) <= 8.0 +end diff --git a/tests/lp_files/summed_min_source_multi_period.lp b/tests/lp_files/summed_min_source_multi_period.lp new file mode 100644 index 000000000..ed2085dcf --- /dev/null +++ b/tests/lp_files/summed_min_source_multi_period.lp @@ -0,0 +1,63 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++25 flow(electricityBus_excess_0_0) ++25 flow(electricityBus_excess_0_1) ++24.509803921568626 flow(electricityBus_excess_1_2) ++24.509803921568626 flow(electricityBus_excess_1_3) ++24.029219530949632 flow(electricityBus_excess_2_4) ++24.029219530949632 flow(electricityBus_excess_2_5) + +s.t. + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(electricityBus_excess_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(electricityBus_excess_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(electricityBus_excess_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(electricityBus_excess_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(electricityBus_excess_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(electricityBus_excess_2_5) += 0 + +c_u_SimpleFlowBlock_full_load_time_max_constr(electricityBus_excess)_: ++1 flow(electricityBus_excess_0_0) ++1 flow(electricityBus_excess_0_1) ++1 flow(electricityBus_excess_1_2) ++1 flow(electricityBus_excess_1_3) ++1 flow(electricityBus_excess_2_4) ++1 flow(electricityBus_excess_2_5) +<= 1000 + +c_l_SimpleFlowBlock_full_load_time_min_constr(electricityBus_excess)_: ++1 flow(electricityBus_excess_0_0) ++1 flow(electricityBus_excess_0_1) ++1 flow(electricityBus_excess_1_2) ++1 flow(electricityBus_excess_1_3) ++1 flow(electricityBus_excess_2_4) ++1 flow(electricityBus_excess_2_5) +>= 30 + +bounds + 0 <= flow(electricityBus_excess_0_0) <= 8.0 + 0 <= flow(electricityBus_excess_0_1) <= 8.0 + 0 <= flow(electricityBus_excess_1_2) <= 8.0 + 0 <= flow(electricityBus_excess_1_3) <= 8.0 + 0 <= flow(electricityBus_excess_2_4) <= 8.0 + 0 <= flow(electricityBus_excess_2_5) <= 8.0 +end diff --git a/tests/lp_files/transformer.lp b/tests/lp_files/transformer.lp deleted file mode 100644 index 0c5d3d11b..000000000 --- a/tests/lp_files/transformer.lp +++ /dev/null @@ -1,138 +0,0 @@ -\* Source Pyomo model name=Model *\ - -min -objective: -+50 flow(powerplantGasCoal_electricityBus_0) -+50 flow(powerplantGasCoal_electricityBus_1) -+50 flow(powerplantGasCoal_electricityBus_2) -+20 flow(powerplantGasCoal_thermalBus_0) -+20 flow(powerplantGasCoal_thermalBus_1) -+20 flow(powerplantGasCoal_thermalBus_2) - -s.t. - -c_e_BusBlock_balance(biomassBus_0)_: -+1 flow(biomassBus_powerplantGasCoal_0) -= 0 - -c_e_BusBlock_balance(biomassBus_1)_: -+1 flow(biomassBus_powerplantGasCoal_1) -= 0 - -c_e_BusBlock_balance(biomassBus_2)_: -+1 flow(biomassBus_powerplantGasCoal_2) -= 0 - -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(powerplantGasCoal_electricityBus_0) -= 0 - -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(powerplantGasCoal_electricityBus_1) -= 0 - -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(powerplantGasCoal_electricityBus_2) -= 0 - -c_e_BusBlock_balance(gasBus_0)_: -+1 flow(gasBus_powerplantGasCoal_0) -= 0 - -c_e_BusBlock_balance(gasBus_1)_: -+1 flow(gasBus_powerplantGasCoal_1) -= 0 - -c_e_BusBlock_balance(gasBus_2)_: -+1 flow(gasBus_powerplantGasCoal_2) -= 0 - -c_e_BusBlock_balance(thermalBus_0)_: -+1 flow(powerplantGasCoal_thermalBus_0) -= 0 - -c_e_BusBlock_balance(thermalBus_1)_: -+1 flow(powerplantGasCoal_thermalBus_1) -= 0 - -c_e_BusBlock_balance(thermalBus_2)_: -+1 flow(powerplantGasCoal_thermalBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_biomassBus_electricityBus_0)_: -+0.29999999999999999 flow(biomassBus_powerplantGasCoal_0) --0.10000000000000001 flow(powerplantGasCoal_electricityBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_biomassBus_electricityBus_1)_: -+0.29999999999999999 flow(biomassBus_powerplantGasCoal_1) --0.10000000000000001 flow(powerplantGasCoal_electricityBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_biomassBus_electricityBus_2)_: -+0.29999999999999999 flow(biomassBus_powerplantGasCoal_2) --0.10000000000000001 flow(powerplantGasCoal_electricityBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_biomassBus_thermalBus_0)_: -+0.5 flow(biomassBus_powerplantGasCoal_0) --0.10000000000000001 flow(powerplantGasCoal_thermalBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_biomassBus_thermalBus_1)_: -+0.5 flow(biomassBus_powerplantGasCoal_1) --0.10000000000000001 flow(powerplantGasCoal_thermalBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_biomassBus_thermalBus_2)_: -+0.5 flow(biomassBus_powerplantGasCoal_2) --0.10000000000000001 flow(powerplantGasCoal_thermalBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_gasBus_electricityBus_0)_: -+0.29999999999999999 flow(gasBus_powerplantGasCoal_0) --0.40000000000000002 flow(powerplantGasCoal_electricityBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_gasBus_electricityBus_1)_: -+0.29999999999999999 flow(gasBus_powerplantGasCoal_1) --0.40000000000000002 flow(powerplantGasCoal_electricityBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_gasBus_electricityBus_2)_: -+0.29999999999999999 flow(gasBus_powerplantGasCoal_2) --0.40000000000000002 flow(powerplantGasCoal_electricityBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_gasBus_thermalBus_0)_: -+0.5 flow(gasBus_powerplantGasCoal_0) --0.40000000000000002 flow(powerplantGasCoal_thermalBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_gasBus_thermalBus_1)_: -+0.5 flow(gasBus_powerplantGasCoal_1) --0.40000000000000002 flow(powerplantGasCoal_thermalBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplantGasCoal_gasBus_thermalBus_2)_: -+0.5 flow(gasBus_powerplantGasCoal_2) --0.40000000000000002 flow(powerplantGasCoal_thermalBus_2) -= 0 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - -bounds - 0 <= flow(biomassBus_powerplantGasCoal_0) <= +inf - 0 <= flow(biomassBus_powerplantGasCoal_1) <= +inf - 0 <= flow(biomassBus_powerplantGasCoal_2) <= +inf - 0 <= flow(gasBus_powerplantGasCoal_0) <= +inf - 0 <= flow(gasBus_powerplantGasCoal_1) <= +inf - 0 <= flow(gasBus_powerplantGasCoal_2) <= +inf - 0 <= flow(powerplantGasCoal_electricityBus_0) <= +inf - 0 <= flow(powerplantGasCoal_electricityBus_1) <= +inf - 0 <= flow(powerplantGasCoal_electricityBus_2) <= +inf - 0 <= flow(powerplantGasCoal_thermalBus_0) <= 50000000000 - 0 <= flow(powerplantGasCoal_thermalBus_1) <= 50000000000 - 0 <= flow(powerplantGasCoal_thermalBus_2) <= 50000000000 -end diff --git a/tests/lp_files/transformer_invest.lp b/tests/lp_files/transformer_invest.lp deleted file mode 100644 index 25e4fe67d..000000000 --- a/tests/lp_files/transformer_invest.lp +++ /dev/null @@ -1,155 +0,0 @@ -\* Source Pyomo model name=Model *\ - -min -objective: -+20 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus) -+50 flow(powerplant_gas_coal_electricityBus_0) -+50 flow(powerplant_gas_coal_electricityBus_1) -+50 flow(powerplant_gas_coal_electricityBus_2) -+20 flow(powerplant_gas_coal_thermalBus_0) -+20 flow(powerplant_gas_coal_thermalBus_1) -+20 flow(powerplant_gas_coal_thermalBus_2) - -s.t. - -c_e_BusBlock_balance(coalBus_0)_: -+1 flow(coalBus_powerplant_gas_coal_0) -= 0 - -c_e_BusBlock_balance(coalBus_1)_: -+1 flow(coalBus_powerplant_gas_coal_1) -= 0 - -c_e_BusBlock_balance(coalBus_2)_: -+1 flow(coalBus_powerplant_gas_coal_2) -= 0 - -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(powerplant_gas_coal_electricityBus_0) -= 0 - -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(powerplant_gas_coal_electricityBus_1) -= 0 - -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(powerplant_gas_coal_electricityBus_2) -= 0 - -c_e_BusBlock_balance(gasBus_0)_: -+1 flow(gasBus_powerplant_gas_coal_0) -= 0 - -c_e_BusBlock_balance(gasBus_1)_: -+1 flow(gasBus_powerplant_gas_coal_1) -= 0 - -c_e_BusBlock_balance(gasBus_2)_: -+1 flow(gasBus_powerplant_gas_coal_2) -= 0 - -c_e_BusBlock_balance(thermalBus_0)_: -+1 flow(powerplant_gas_coal_thermalBus_0) -= 0 - -c_e_BusBlock_balance(thermalBus_1)_: -+1 flow(powerplant_gas_coal_thermalBus_1) -= 0 - -c_e_BusBlock_balance(thermalBus_2)_: -+1 flow(powerplant_gas_coal_thermalBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0)_: -+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0) --0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_1)_: -+0.29999999999999999 flow(coalBus_powerplant_gas_coal_1) --0.20000000000000001 flow(powerplant_gas_coal_electricityBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_2)_: -+0.29999999999999999 flow(coalBus_powerplant_gas_coal_2) --0.20000000000000001 flow(powerplant_gas_coal_electricityBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0)_: -+0.5 flow(coalBus_powerplant_gas_coal_0) --0.20000000000000001 flow(powerplant_gas_coal_thermalBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_1)_: -+0.5 flow(coalBus_powerplant_gas_coal_1) --0.20000000000000001 flow(powerplant_gas_coal_thermalBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_2)_: -+0.5 flow(coalBus_powerplant_gas_coal_2) --0.20000000000000001 flow(powerplant_gas_coal_thermalBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0)_: -+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0) --0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_1)_: -+0.29999999999999999 flow(gasBus_powerplant_gas_coal_1) --0.57999999999999996 flow(powerplant_gas_coal_electricityBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_2)_: -+0.29999999999999999 flow(gasBus_powerplant_gas_coal_2) --0.57999999999999996 flow(powerplant_gas_coal_electricityBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0)_: -+0.5 flow(gasBus_powerplant_gas_coal_0) --0.57999999999999996 flow(powerplant_gas_coal_thermalBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_1)_: -+0.5 flow(gasBus_powerplant_gas_coal_1) --0.57999999999999996 flow(powerplant_gas_coal_thermalBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_2)_: -+0.5 flow(gasBus_powerplant_gas_coal_2) --0.57999999999999996 flow(powerplant_gas_coal_thermalBus_2) -= 0 - -c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0)_: --1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus) -+1 flow(powerplant_gas_coal_electricityBus_0) -<= 0 - -c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_1)_: --1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus) -+1 flow(powerplant_gas_coal_electricityBus_1) -<= 0 - -c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_2)_: --1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus) -+1 flow(powerplant_gas_coal_electricityBus_2) -<= 0 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - -bounds - 0 <= flow(coalBus_powerplant_gas_coal_0) <= +inf - 0 <= flow(coalBus_powerplant_gas_coal_1) <= +inf - 0 <= flow(coalBus_powerplant_gas_coal_2) <= +inf - 0 <= flow(gasBus_powerplant_gas_coal_0) <= +inf - 0 <= flow(gasBus_powerplant_gas_coal_1) <= +inf - 0 <= flow(gasBus_powerplant_gas_coal_2) <= +inf - 0 <= flow(powerplant_gas_coal_electricityBus_0) <= +inf - 0 <= flow(powerplant_gas_coal_electricityBus_1) <= +inf - 0 <= flow(powerplant_gas_coal_electricityBus_2) <= +inf - 0 <= flow(powerplant_gas_coal_thermalBus_0) <= +inf - 0 <= flow(powerplant_gas_coal_thermalBus_1) <= +inf - 0 <= flow(powerplant_gas_coal_thermalBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus) <= 1000 -end diff --git a/tests/lp_files/transformer_invest_with_existing.lp b/tests/lp_files/transformer_invest_with_existing.lp deleted file mode 100644 index 3e2af2ebf..000000000 --- a/tests/lp_files/transformer_invest_with_existing.lp +++ /dev/null @@ -1,155 +0,0 @@ -\* Source Pyomo model name=Model *\ - -min -objective: -+20 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus) -+50 flow(powerplant_gas_coal_electricityBus_0) -+50 flow(powerplant_gas_coal_electricityBus_1) -+50 flow(powerplant_gas_coal_electricityBus_2) -+20 flow(powerplant_gas_coal_thermalBus_0) -+20 flow(powerplant_gas_coal_thermalBus_1) -+20 flow(powerplant_gas_coal_thermalBus_2) - -s.t. - -c_e_BusBlock_balance(coalBus_0)_: -+1 flow(coalBus_powerplant_gas_coal_0) -= 0 - -c_e_BusBlock_balance(coalBus_1)_: -+1 flow(coalBus_powerplant_gas_coal_1) -= 0 - -c_e_BusBlock_balance(coalBus_2)_: -+1 flow(coalBus_powerplant_gas_coal_2) -= 0 - -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(powerplant_gas_coal_electricityBus_0) -= 0 - -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(powerplant_gas_coal_electricityBus_1) -= 0 - -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(powerplant_gas_coal_electricityBus_2) -= 0 - -c_e_BusBlock_balance(gasBus_0)_: -+1 flow(gasBus_powerplant_gas_coal_0) -= 0 - -c_e_BusBlock_balance(gasBus_1)_: -+1 flow(gasBus_powerplant_gas_coal_1) -= 0 - -c_e_BusBlock_balance(gasBus_2)_: -+1 flow(gasBus_powerplant_gas_coal_2) -= 0 - -c_e_BusBlock_balance(thermalBus_0)_: -+1 flow(powerplant_gas_coal_thermalBus_0) -= 0 - -c_e_BusBlock_balance(thermalBus_1)_: -+1 flow(powerplant_gas_coal_thermalBus_1) -= 0 - -c_e_BusBlock_balance(thermalBus_2)_: -+1 flow(powerplant_gas_coal_thermalBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0)_: -+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0) --0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_1)_: -+0.29999999999999999 flow(coalBus_powerplant_gas_coal_1) --0.20000000000000001 flow(powerplant_gas_coal_electricityBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_2)_: -+0.29999999999999999 flow(coalBus_powerplant_gas_coal_2) --0.20000000000000001 flow(powerplant_gas_coal_electricityBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0)_: -+0.5 flow(coalBus_powerplant_gas_coal_0) --0.20000000000000001 flow(powerplant_gas_coal_thermalBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_1)_: -+0.5 flow(coalBus_powerplant_gas_coal_1) --0.20000000000000001 flow(powerplant_gas_coal_thermalBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_2)_: -+0.5 flow(coalBus_powerplant_gas_coal_2) --0.20000000000000001 flow(powerplant_gas_coal_thermalBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0)_: -+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0) --0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_1)_: -+0.29999999999999999 flow(gasBus_powerplant_gas_coal_1) --0.57999999999999996 flow(powerplant_gas_coal_electricityBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_2)_: -+0.29999999999999999 flow(gasBus_powerplant_gas_coal_2) --0.57999999999999996 flow(powerplant_gas_coal_electricityBus_2) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0)_: -+0.5 flow(gasBus_powerplant_gas_coal_0) --0.57999999999999996 flow(powerplant_gas_coal_thermalBus_0) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_1)_: -+0.5 flow(gasBus_powerplant_gas_coal_1) --0.57999999999999996 flow(powerplant_gas_coal_thermalBus_1) -= 0 - -c_e_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_2)_: -+0.5 flow(gasBus_powerplant_gas_coal_2) --0.57999999999999996 flow(powerplant_gas_coal_thermalBus_2) -= 0 - -c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0)_: --1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus) -+1 flow(powerplant_gas_coal_electricityBus_0) -<= 200 - -c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_1)_: --1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus) -+1 flow(powerplant_gas_coal_electricityBus_1) -<= 200 - -c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_2)_: --1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus) -+1 flow(powerplant_gas_coal_electricityBus_2) -<= 200 - -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - -bounds - 0 <= flow(coalBus_powerplant_gas_coal_0) <= +inf - 0 <= flow(coalBus_powerplant_gas_coal_1) <= +inf - 0 <= flow(coalBus_powerplant_gas_coal_2) <= +inf - 0 <= flow(gasBus_powerplant_gas_coal_0) <= +inf - 0 <= flow(gasBus_powerplant_gas_coal_1) <= +inf - 0 <= flow(gasBus_powerplant_gas_coal_2) <= +inf - 0 <= flow(powerplant_gas_coal_electricityBus_0) <= +inf - 0 <= flow(powerplant_gas_coal_electricityBus_1) <= +inf - 0 <= flow(powerplant_gas_coal_electricityBus_2) <= +inf - 0 <= flow(powerplant_gas_coal_thermalBus_0) <= +inf - 0 <= flow(powerplant_gas_coal_thermalBus_1) <= +inf - 0 <= flow(powerplant_gas_coal_thermalBus_2) <= +inf - 0 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus) <= 1000 -end diff --git a/tests/lp_files/variable_chp.lp b/tests/lp_files/variable_chp.lp index 1b5ba905d..9ec030a3e 100644 --- a/tests/lp_files/variable_chp.lp +++ b/tests/lp_files/variable_chp.lp @@ -1,142 +1,140 @@ \* Source Pyomo model name=Model *\ -min +min objective: +0 ONE_VAR_CONSTANT s.t. -c_e_BusBlock_balance(commodityBus_0)_: -+1 flow(commodityBus_variable_chp_gas1_0) -+1 flow(commodityBus_variable_chp_gas2_0) +c_e_BusBlock_balance(commodityBus_0_0)_: ++1 flow(commodityBus_variable_chp_gas1_0_0) ++1 flow(commodityBus_variable_chp_gas2_0_0) = 0 -c_e_BusBlock_balance(commodityBus_1)_: -+1 flow(commodityBus_variable_chp_gas1_1) -+1 flow(commodityBus_variable_chp_gas2_1) +c_e_BusBlock_balance(commodityBus_0_1)_: ++1 flow(commodityBus_variable_chp_gas1_0_1) ++1 flow(commodityBus_variable_chp_gas2_0_1) = 0 -c_e_BusBlock_balance(commodityBus_2)_: -+1 flow(commodityBus_variable_chp_gas1_2) -+1 flow(commodityBus_variable_chp_gas2_2) +c_e_BusBlock_balance(commodityBus_0_2)_: ++1 flow(commodityBus_variable_chp_gas1_0_2) ++1 flow(commodityBus_variable_chp_gas2_0_2) = 0 -c_e_BusBlock_balance(electricityBus_0)_: -+1 flow(variable_chp_gas1_electricityBus_0) -+1 flow(variable_chp_gas2_electricityBus_0) +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(variable_chp_gas1_electricityBus_0_0) ++1 flow(variable_chp_gas2_electricityBus_0_0) = 0 -c_e_BusBlock_balance(electricityBus_1)_: -+1 flow(variable_chp_gas1_electricityBus_1) -+1 flow(variable_chp_gas2_electricityBus_1) +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(variable_chp_gas1_electricityBus_0_1) ++1 flow(variable_chp_gas2_electricityBus_0_1) = 0 -c_e_BusBlock_balance(electricityBus_2)_: -+1 flow(variable_chp_gas1_electricityBus_2) -+1 flow(variable_chp_gas2_electricityBus_2) +c_e_BusBlock_balance(electricityBus_0_2)_: ++1 flow(variable_chp_gas1_electricityBus_0_2) ++1 flow(variable_chp_gas2_electricityBus_0_2) = 0 -c_e_BusBlock_balance(heatBus_0)_: -+1 flow(variable_chp_gas1_heatBus_0) -+1 flow(variable_chp_gas2_heatBus_0) +c_e_BusBlock_balance(heatBus_0_0)_: ++1 flow(variable_chp_gas1_heatBus_0_0) ++1 flow(variable_chp_gas2_heatBus_0_0) = 0 -c_e_BusBlock_balance(heatBus_1)_: -+1 flow(variable_chp_gas1_heatBus_1) -+1 flow(variable_chp_gas2_heatBus_1) +c_e_BusBlock_balance(heatBus_0_1)_: ++1 flow(variable_chp_gas1_heatBus_0_1) ++1 flow(variable_chp_gas2_heatBus_0_1) = 0 -c_e_BusBlock_balance(heatBus_2)_: -+1 flow(variable_chp_gas1_heatBus_2) -+1 flow(variable_chp_gas2_heatBus_2) +c_e_BusBlock_balance(heatBus_0_2)_: ++1 flow(variable_chp_gas1_heatBus_0_2) ++1 flow(variable_chp_gas2_heatBus_0_2) = 0 -c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_0)_: -+1 flow(commodityBus_variable_chp_gas1_0) --2 flow(variable_chp_gas1_electricityBus_0) --0.80000000000000004 flow(variable_chp_gas1_heatBus_0) -= 0 - -c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_1)_: -+1 flow(commodityBus_variable_chp_gas1_1) --2 flow(variable_chp_gas1_electricityBus_1) --0.80000000000000004 flow(variable_chp_gas1_heatBus_1) -= 0 - -c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_2)_: -+1 flow(commodityBus_variable_chp_gas1_2) --2 flow(variable_chp_gas1_electricityBus_2) --0.80000000000000004 flow(variable_chp_gas1_heatBus_2) -= 0 - -c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_0)_: -+1 flow(commodityBus_variable_chp_gas2_0) --2 flow(variable_chp_gas2_electricityBus_0) --0.80000000000000004 flow(variable_chp_gas2_heatBus_0) -= 0 - -c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_1)_: -+1 flow(commodityBus_variable_chp_gas2_1) --2 flow(variable_chp_gas2_electricityBus_1) --0.80000000000000004 flow(variable_chp_gas2_heatBus_1) -= 0 - -c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_2)_: -+1 flow(commodityBus_variable_chp_gas2_2) --2 flow(variable_chp_gas2_electricityBus_2) --0.80000000000000004 flow(variable_chp_gas2_heatBus_2) -= 0 - -c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_0)_: --1 flow(variable_chp_gas1_electricityBus_0) -+0.59999999999999998 flow(variable_chp_gas1_heatBus_0) +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_0_0)_: ++1 flow(commodityBus_variable_chp_gas1_0_0) +-2.0 flow(variable_chp_gas1_electricityBus_0_0) +-0.8 flow(variable_chp_gas1_heatBus_0_0) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_0_1)_: ++1 flow(commodityBus_variable_chp_gas1_0_1) +-2.0 flow(variable_chp_gas1_electricityBus_0_1) +-0.8 flow(variable_chp_gas1_heatBus_0_1) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_0_2)_: ++1 flow(commodityBus_variable_chp_gas1_0_2) +-2.0 flow(variable_chp_gas1_electricityBus_0_2) +-0.8 flow(variable_chp_gas1_heatBus_0_2) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_0_0)_: ++1 flow(commodityBus_variable_chp_gas2_0_0) +-2.0 flow(variable_chp_gas2_electricityBus_0_0) +-0.8 flow(variable_chp_gas2_heatBus_0_0) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_0_1)_: ++1 flow(commodityBus_variable_chp_gas2_0_1) +-2.0 flow(variable_chp_gas2_electricityBus_0_1) +-0.8 flow(variable_chp_gas2_heatBus_0_1) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_0_2)_: ++1 flow(commodityBus_variable_chp_gas2_0_2) +-2.0 flow(variable_chp_gas2_electricityBus_0_2) +-0.8 flow(variable_chp_gas2_heatBus_0_2) += 0.0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_0_0)_: +-1 flow(variable_chp_gas1_electricityBus_0_0) ++0.6 flow(variable_chp_gas1_heatBus_0_0) <= 0 -c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_1)_: --1 flow(variable_chp_gas1_electricityBus_1) -+0.59999999999999998 flow(variable_chp_gas1_heatBus_1) +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_0_1)_: +-1 flow(variable_chp_gas1_electricityBus_0_1) ++0.6 flow(variable_chp_gas1_heatBus_0_1) <= 0 -c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_2)_: --1 flow(variable_chp_gas1_electricityBus_2) -+0.59999999999999998 flow(variable_chp_gas1_heatBus_2) +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_0_2)_: +-1 flow(variable_chp_gas1_electricityBus_0_2) ++0.6 flow(variable_chp_gas1_heatBus_0_2) <= 0 -c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_0)_: --1 flow(variable_chp_gas2_electricityBus_0) -+0.59999999999999998 flow(variable_chp_gas2_heatBus_0) +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_0_0)_: +-1 flow(variable_chp_gas2_electricityBus_0_0) ++0.6 flow(variable_chp_gas2_heatBus_0_0) <= 0 -c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_1)_: --1 flow(variable_chp_gas2_electricityBus_1) -+0.59999999999999998 flow(variable_chp_gas2_heatBus_1) +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_0_1)_: +-1 flow(variable_chp_gas2_electricityBus_0_1) ++0.6 flow(variable_chp_gas2_heatBus_0_1) <= 0 -c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_2)_: --1 flow(variable_chp_gas2_electricityBus_2) -+0.59999999999999998 flow(variable_chp_gas2_heatBus_2) +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_0_2)_: +-1 flow(variable_chp_gas2_electricityBus_0_2) ++0.6 flow(variable_chp_gas2_heatBus_0_2) <= 0 -c_e_ONE_VAR_CONSTANT: -ONE_VAR_CONSTANT = 1.0 - bounds - 0 <= flow(commodityBus_variable_chp_gas1_0) <= 100 - 0 <= flow(commodityBus_variable_chp_gas1_1) <= 100 - 0 <= flow(commodityBus_variable_chp_gas1_2) <= 100 - 0 <= flow(commodityBus_variable_chp_gas2_0) <= 100 - 0 <= flow(commodityBus_variable_chp_gas2_1) <= 100 - 0 <= flow(commodityBus_variable_chp_gas2_2) <= 100 - 0 <= flow(variable_chp_gas1_electricityBus_0) <= +inf - 0 <= flow(variable_chp_gas1_electricityBus_1) <= +inf - 0 <= flow(variable_chp_gas1_electricityBus_2) <= +inf - 0 <= flow(variable_chp_gas1_heatBus_0) <= +inf - 0 <= flow(variable_chp_gas1_heatBus_1) <= +inf - 0 <= flow(variable_chp_gas1_heatBus_2) <= +inf - 0 <= flow(variable_chp_gas2_electricityBus_0) <= +inf - 0 <= flow(variable_chp_gas2_electricityBus_1) <= +inf - 0 <= flow(variable_chp_gas2_electricityBus_2) <= +inf - 0 <= flow(variable_chp_gas2_heatBus_0) <= +inf - 0 <= flow(variable_chp_gas2_heatBus_1) <= +inf - 0 <= flow(variable_chp_gas2_heatBus_2) <= +inf + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(commodityBus_variable_chp_gas1_0_0) <= 100 + 0 <= flow(commodityBus_variable_chp_gas2_0_0) <= 100 + 0 <= flow(commodityBus_variable_chp_gas1_0_1) <= 100 + 0 <= flow(commodityBus_variable_chp_gas2_0_1) <= 100 + 0 <= flow(commodityBus_variable_chp_gas1_0_2) <= 100 + 0 <= flow(commodityBus_variable_chp_gas2_0_2) <= 100 + 0 <= flow(variable_chp_gas1_electricityBus_0_0) <= +inf + 0 <= flow(variable_chp_gas2_electricityBus_0_0) <= +inf + 0 <= flow(variable_chp_gas1_electricityBus_0_1) <= +inf + 0 <= flow(variable_chp_gas2_electricityBus_0_1) <= +inf + 0 <= flow(variable_chp_gas1_electricityBus_0_2) <= +inf + 0 <= flow(variable_chp_gas2_electricityBus_0_2) <= +inf + 0 <= flow(variable_chp_gas1_heatBus_0_0) <= +inf + 0 <= flow(variable_chp_gas2_heatBus_0_0) <= +inf + 0 <= flow(variable_chp_gas1_heatBus_0_1) <= +inf + 0 <= flow(variable_chp_gas2_heatBus_0_1) <= +inf + 0 <= flow(variable_chp_gas1_heatBus_0_2) <= +inf + 0 <= flow(variable_chp_gas2_heatBus_0_2) <= +inf end diff --git a/tests/lp_files/variable_chp_multi_period.lp b/tests/lp_files/variable_chp_multi_period.lp new file mode 100644 index 000000000..dee45b69a --- /dev/null +++ b/tests/lp_files/variable_chp_multi_period.lp @@ -0,0 +1,269 @@ +\* Source Pyomo model name=Model *\ + +min +objective: ++0 ONE_VAR_CONSTANT + +s.t. + +c_e_BusBlock_balance(commodityBus_0_0)_: ++1 flow(commodityBus_variable_chp_gas1_0_0) ++1 flow(commodityBus_variable_chp_gas2_0_0) += 0 + +c_e_BusBlock_balance(commodityBus_0_1)_: ++1 flow(commodityBus_variable_chp_gas1_0_1) ++1 flow(commodityBus_variable_chp_gas2_0_1) += 0 + +c_e_BusBlock_balance(commodityBus_1_2)_: ++1 flow(commodityBus_variable_chp_gas1_1_2) ++1 flow(commodityBus_variable_chp_gas2_1_2) += 0 + +c_e_BusBlock_balance(commodityBus_1_3)_: ++1 flow(commodityBus_variable_chp_gas1_1_3) ++1 flow(commodityBus_variable_chp_gas2_1_3) += 0 + +c_e_BusBlock_balance(commodityBus_2_4)_: ++1 flow(commodityBus_variable_chp_gas1_2_4) ++1 flow(commodityBus_variable_chp_gas2_2_4) += 0 + +c_e_BusBlock_balance(commodityBus_2_5)_: ++1 flow(commodityBus_variable_chp_gas1_2_5) ++1 flow(commodityBus_variable_chp_gas2_2_5) += 0 + +c_e_BusBlock_balance(electricityBus_0_0)_: ++1 flow(variable_chp_gas2_electricityBus_0_0) ++1 flow(variable_chp_gas1_electricityBus_0_0) += 0 + +c_e_BusBlock_balance(electricityBus_0_1)_: ++1 flow(variable_chp_gas2_electricityBus_0_1) ++1 flow(variable_chp_gas1_electricityBus_0_1) += 0 + +c_e_BusBlock_balance(electricityBus_1_2)_: ++1 flow(variable_chp_gas2_electricityBus_1_2) ++1 flow(variable_chp_gas1_electricityBus_1_2) += 0 + +c_e_BusBlock_balance(electricityBus_1_3)_: ++1 flow(variable_chp_gas2_electricityBus_1_3) ++1 flow(variable_chp_gas1_electricityBus_1_3) += 0 + +c_e_BusBlock_balance(electricityBus_2_4)_: ++1 flow(variable_chp_gas2_electricityBus_2_4) ++1 flow(variable_chp_gas1_electricityBus_2_4) += 0 + +c_e_BusBlock_balance(electricityBus_2_5)_: ++1 flow(variable_chp_gas2_electricityBus_2_5) ++1 flow(variable_chp_gas1_electricityBus_2_5) += 0 + +c_e_BusBlock_balance(heatBus_0_0)_: ++1 flow(variable_chp_gas2_heatBus_0_0) ++1 flow(variable_chp_gas1_heatBus_0_0) += 0 + +c_e_BusBlock_balance(heatBus_0_1)_: ++1 flow(variable_chp_gas2_heatBus_0_1) ++1 flow(variable_chp_gas1_heatBus_0_1) += 0 + +c_e_BusBlock_balance(heatBus_1_2)_: ++1 flow(variable_chp_gas2_heatBus_1_2) ++1 flow(variable_chp_gas1_heatBus_1_2) += 0 + +c_e_BusBlock_balance(heatBus_1_3)_: ++1 flow(variable_chp_gas2_heatBus_1_3) ++1 flow(variable_chp_gas1_heatBus_1_3) += 0 + +c_e_BusBlock_balance(heatBus_2_4)_: ++1 flow(variable_chp_gas2_heatBus_2_4) ++1 flow(variable_chp_gas1_heatBus_2_4) += 0 + +c_e_BusBlock_balance(heatBus_2_5)_: ++1 flow(variable_chp_gas2_heatBus_2_5) ++1 flow(variable_chp_gas1_heatBus_2_5) += 0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_0_0)_: ++1 flow(commodityBus_variable_chp_gas2_0_0) +-2.0 flow(variable_chp_gas2_electricityBus_0_0) +-0.8 flow(variable_chp_gas2_heatBus_0_0) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_0_1)_: ++1 flow(commodityBus_variable_chp_gas2_0_1) +-2.0 flow(variable_chp_gas2_electricityBus_0_1) +-0.8 flow(variable_chp_gas2_heatBus_0_1) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_1_2)_: ++1 flow(commodityBus_variable_chp_gas2_1_2) +-2.0 flow(variable_chp_gas2_electricityBus_1_2) +-0.8 flow(variable_chp_gas2_heatBus_1_2) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_1_3)_: ++1 flow(commodityBus_variable_chp_gas2_1_3) +-2.0 flow(variable_chp_gas2_electricityBus_1_3) +-0.8 flow(variable_chp_gas2_heatBus_1_3) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_2_4)_: ++1 flow(commodityBus_variable_chp_gas2_2_4) +-2.0 flow(variable_chp_gas2_electricityBus_2_4) +-0.8 flow(variable_chp_gas2_heatBus_2_4) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas2_2_5)_: ++1 flow(commodityBus_variable_chp_gas2_2_5) +-2.0 flow(variable_chp_gas2_electricityBus_2_5) +-0.8 flow(variable_chp_gas2_heatBus_2_5) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_0_0)_: ++1 flow(commodityBus_variable_chp_gas1_0_0) +-2.0 flow(variable_chp_gas1_electricityBus_0_0) +-0.8 flow(variable_chp_gas1_heatBus_0_0) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_0_1)_: ++1 flow(commodityBus_variable_chp_gas1_0_1) +-2.0 flow(variable_chp_gas1_electricityBus_0_1) +-0.8 flow(variable_chp_gas1_heatBus_0_1) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_1_2)_: ++1 flow(commodityBus_variable_chp_gas1_1_2) +-2.0 flow(variable_chp_gas1_electricityBus_1_2) +-0.8 flow(variable_chp_gas1_heatBus_1_2) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_1_3)_: ++1 flow(commodityBus_variable_chp_gas1_1_3) +-2.0 flow(variable_chp_gas1_electricityBus_1_3) +-0.8 flow(variable_chp_gas1_heatBus_1_3) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_2_4)_: ++1 flow(commodityBus_variable_chp_gas1_2_4) +-2.0 flow(variable_chp_gas1_electricityBus_2_4) +-0.8 flow(variable_chp_gas1_heatBus_2_4) += 0.0 + +c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_2_5)_: ++1 flow(commodityBus_variable_chp_gas1_2_5) +-2.0 flow(variable_chp_gas1_electricityBus_2_5) +-0.8 flow(variable_chp_gas1_heatBus_2_5) += 0.0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_0_0)_: +-1 flow(variable_chp_gas2_electricityBus_0_0) ++0.6 flow(variable_chp_gas2_heatBus_0_0) +<= 0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_0_1)_: +-1 flow(variable_chp_gas2_electricityBus_0_1) ++0.6 flow(variable_chp_gas2_heatBus_0_1) +<= 0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_1_2)_: +-1 flow(variable_chp_gas2_electricityBus_1_2) ++0.6 flow(variable_chp_gas2_heatBus_1_2) +<= 0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_1_3)_: +-1 flow(variable_chp_gas2_electricityBus_1_3) ++0.6 flow(variable_chp_gas2_heatBus_1_3) +<= 0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_2_4)_: +-1 flow(variable_chp_gas2_electricityBus_2_4) ++0.6 flow(variable_chp_gas2_heatBus_2_4) +<= 0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_2_5)_: +-1 flow(variable_chp_gas2_electricityBus_2_5) ++0.6 flow(variable_chp_gas2_heatBus_2_5) +<= 0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_0_0)_: +-1 flow(variable_chp_gas1_electricityBus_0_0) ++0.6 flow(variable_chp_gas1_heatBus_0_0) +<= 0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_0_1)_: +-1 flow(variable_chp_gas1_electricityBus_0_1) ++0.6 flow(variable_chp_gas1_heatBus_0_1) +<= 0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_1_2)_: +-1 flow(variable_chp_gas1_electricityBus_1_2) ++0.6 flow(variable_chp_gas1_heatBus_1_2) +<= 0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_1_3)_: +-1 flow(variable_chp_gas1_electricityBus_1_3) ++0.6 flow(variable_chp_gas1_heatBus_1_3) +<= 0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_2_4)_: +-1 flow(variable_chp_gas1_electricityBus_2_4) ++0.6 flow(variable_chp_gas1_heatBus_2_4) +<= 0 + +c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_2_5)_: +-1 flow(variable_chp_gas1_electricityBus_2_5) ++0.6 flow(variable_chp_gas1_heatBus_2_5) +<= 0 + +bounds + 1 <= ONE_VAR_CONSTANT <= 1 + 0 <= flow(commodityBus_variable_chp_gas1_0_0) <= 100 + 0 <= flow(commodityBus_variable_chp_gas2_0_0) <= 100 + 0 <= flow(commodityBus_variable_chp_gas1_0_1) <= 100 + 0 <= flow(commodityBus_variable_chp_gas2_0_1) <= 100 + 0 <= flow(commodityBus_variable_chp_gas1_1_2) <= 100 + 0 <= flow(commodityBus_variable_chp_gas2_1_2) <= 100 + 0 <= flow(commodityBus_variable_chp_gas1_1_3) <= 100 + 0 <= flow(commodityBus_variable_chp_gas2_1_3) <= 100 + 0 <= flow(commodityBus_variable_chp_gas1_2_4) <= 100 + 0 <= flow(commodityBus_variable_chp_gas2_2_4) <= 100 + 0 <= flow(commodityBus_variable_chp_gas1_2_5) <= 100 + 0 <= flow(commodityBus_variable_chp_gas2_2_5) <= 100 + 0 <= flow(variable_chp_gas2_electricityBus_0_0) <= +inf + 0 <= flow(variable_chp_gas1_electricityBus_0_0) <= +inf + 0 <= flow(variable_chp_gas2_electricityBus_0_1) <= +inf + 0 <= flow(variable_chp_gas1_electricityBus_0_1) <= +inf + 0 <= flow(variable_chp_gas2_electricityBus_1_2) <= +inf + 0 <= flow(variable_chp_gas1_electricityBus_1_2) <= +inf + 0 <= flow(variable_chp_gas2_electricityBus_1_3) <= +inf + 0 <= flow(variable_chp_gas1_electricityBus_1_3) <= +inf + 0 <= flow(variable_chp_gas2_electricityBus_2_4) <= +inf + 0 <= flow(variable_chp_gas1_electricityBus_2_4) <= +inf + 0 <= flow(variable_chp_gas2_electricityBus_2_5) <= +inf + 0 <= flow(variable_chp_gas1_electricityBus_2_5) <= +inf + 0 <= flow(variable_chp_gas2_heatBus_0_0) <= +inf + 0 <= flow(variable_chp_gas1_heatBus_0_0) <= +inf + 0 <= flow(variable_chp_gas2_heatBus_0_1) <= +inf + 0 <= flow(variable_chp_gas1_heatBus_0_1) <= +inf + 0 <= flow(variable_chp_gas2_heatBus_1_2) <= +inf + 0 <= flow(variable_chp_gas1_heatBus_1_2) <= +inf + 0 <= flow(variable_chp_gas2_heatBus_1_3) <= +inf + 0 <= flow(variable_chp_gas1_heatBus_1_3) <= +inf + 0 <= flow(variable_chp_gas2_heatBus_2_4) <= +inf + 0 <= flow(variable_chp_gas1_heatBus_2_4) <= +inf + 0 <= flow(variable_chp_gas2_heatBus_2_5) <= +inf + 0 <= flow(variable_chp_gas1_heatBus_2_5) <= +inf +end diff --git a/tests/multi_period_constraint_tests.py b/tests/multi_period_constraint_tests.py new file mode 100644 index 000000000..2696f5ace --- /dev/null +++ b/tests/multi_period_constraint_tests.py @@ -0,0 +1,2141 @@ +# -*- coding: utf-8 - + +"""Test the created constraints against approved constraints. + +This file is part of project oemof (github.com/oemof/oemof). It's copyrighted +by the contributors recorded in the version control history of the file, +available from its original location oemof/tests/constraint_tests.py + +SPDX-License-Identifier: MIT +""" + +import logging +import re +from os import path as ospath + +import pandas as pd +import pytest +from pyomo.repn.tests.lp_diff import lp_diff + +from oemof import solph + +logging.disable(logging.INFO) + + +class TestsMultiPeriodConstraint: + @classmethod + def setup_class(cls): + cls.objective_pattern = re.compile( + r"^objective.*(?=s\.t\.)", re.DOTALL | re.MULTILINE + ) + + timeindex1 = pd.date_range("1/1/2012", periods=2, freq="H") + timeindex2 = pd.date_range("1/1/2013", periods=2, freq="H") + timeindex3 = pd.date_range("1/1/2014", periods=2, freq="H") + cls.date_time_index = timeindex1.append(timeindex2).append(timeindex3) + cls.periods = [timeindex1, timeindex2, timeindex3] + + cls.tmppath = solph.helpers.extend_basic_path("tmp") + logging.info(cls.tmppath) + + def setup_method(self): + self.energysystem = solph.EnergySystem( + groupings=solph.GROUPINGS, + timeindex=self.date_time_index, + timeincrement=[1] * len(self.date_time_index), + infer_last_interval=False, + periods=self.periods, + ) + + def get_om(self): + return solph.Model( + self.energysystem, timeindex=self.energysystem.timeindex + ) + + def compare_lp_files(self, filename, ignored=None, my_om=None): + r"""Compare lp-files to check constraints generated within solph. + + An lp-file is being generated automatically when the tests are + executed. Make sure that you create an empty file first and + transfer the content from the one that has been created automatically + into this one afterwards. Please ensure that the content is being + checked carefully. Otherwise, errors are included within the code base. + """ + if my_om is None: + om = self.get_om() + else: + om = my_om + tmp_filename = filename.replace(".lp", "") + "_tmp.lp" + new_filename = ospath.join(self.tmppath, tmp_filename) + om.write(new_filename, io_options={"symbolic_solver_labels": True}) + logging.info("Comparing with file: {0}".format(filename)) + with open(ospath.join(self.tmppath, tmp_filename)) as generated_file: + with open( + ospath.join( + ospath.dirname(ospath.realpath(__file__)), + "lp_files", + filename, + ) + ) as expected_file: + exp = expected_file.read() + gen = generated_file.read() + + # lp_diff returns two arrays of strings with cleaned lp syntax + # It automatically prints the diff + exp_diff, gen_diff = lp_diff(exp, gen) + + # sometimes, 0.0 is printed, sometimes 0, harmonise that + exp_diff = [ + (line + " ").replace(" 0.0 ", " 0 ") for line in exp_diff + ] + gen_diff = [ + (line + " ").replace(" 0.0 ", " 0 ") for line in gen_diff + ] + + assert len(exp_diff) == len(gen_diff) + + # Created the LP files do not have a reproducable + # order of the lines. Thus, we sort the lines. + for exp, gen in zip(sorted(exp_diff), sorted(gen_diff)): + assert ( + exp == gen + ), "Failed matching expected with generated lp file." + + def test_linear_converter(self): + """Constraint test of a Converter without Investment.""" + bgas = solph.buses.Bus(label="gas") + + bel = solph.buses.Bus(label="electricity") + + converter = solph.components.Converter( + label="powerplantGas", + inputs={bgas: solph.flows.Flow()}, + outputs={ + bel: solph.flows.Flow(nominal_value=10e10, variable_costs=50) + }, + conversion_factors={bel: 0.58}, + ) + self.energysystem.add(bgas, bel, converter) + self.compare_lp_files("linear_converter_multi_period.lp") + + def test_linear_converter_invest(self): + """Constraint test of a Converter with Investment.""" + + bgas = solph.buses.Bus(label="gas") + + bel = solph.buses.Bus(label="electricity") + + converter = solph.components.Converter( + label="powerplant_gas", + inputs={bgas: solph.flows.Flow()}, + outputs={ + bel: solph.flows.Flow( + variable_costs=50, + investment=solph.Investment( + existing=50, + maximum=1000, + overall_maximum=10000, + overall_minimum=200, + ep_costs=20, + age=5, + lifetime=40, + ), + ) + }, + conversion_factors={bel: 0.58}, + ) + self.energysystem.add(bgas, bel, converter) + self.compare_lp_files("linear_converter_invest_multi_period.lp") + + def test_linear_converter_invest_old_capacity(self): + """Constraint test of a Converter with Investment.""" + + bgas = solph.buses.Bus(label="gas") + + bel = solph.buses.Bus(label="electricity") + + converter = solph.components.Converter( + label="powerplant_gas", + inputs={bgas: solph.flows.Flow()}, + outputs={ + bel: solph.flows.Flow( + variable_costs=50, + investment=solph.Investment( + existing=50, + maximum=1000, + overall_maximum=10000, + overall_minimum=200, + ep_costs=20, + age=1, + lifetime=2, + ), + ) + }, + conversion_factors={bel: 0.58}, + ) + self.energysystem.add(bgas, bel, converter) + self.compare_lp_files("linear_converter_invest_multi_period_old.lp") + + def test_max_source_min_sink(self): + """Test source with max, sink with min""" + bel = solph.buses.Bus(label="electricityBus") + + source = solph.components.Source( + label="wind", + outputs={ + bel: solph.flows.Flow( + nominal_value=54, max=(0.85, 0.95, 0.61, 0.72, 0.99, 0.1) + ) + }, + ) + + sink = solph.components.Sink( + label="minDemand", + inputs={ + bel: solph.flows.Flow( + nominal_value=54, + min=(0.84, 0.94, 0.59, 0.7, 0.97, 0.09), + variable_costs=14, + ) + }, + ) + self.energysystem.add(bel, source, sink) + self.compare_lp_files("max_source_min_sink_multi_period.lp") + + def test_fixed_source_variable_sink(self): + """Constraint test with a fixed source and a variable sink.""" + + bel = solph.buses.Bus(label="electricityBus") + + source = solph.components.Source( + label="wind", + outputs={ + bel: solph.flows.Flow( + fix=[0.43, 0.72, 0.29, 0.33, 0.33, 0.33], nominal_value=1e6 + ) + }, + ) + + sink = solph.components.Sink( + label="excess", inputs={bel: solph.flows.Flow(variable_costs=40)} + ) + self.energysystem.add(bel, source, sink) + self.compare_lp_files("fixed_source_variable_sink_multi_period.lp") + + def test_nominal_value_to_zero(self): + """If the nominal value is set to zero nothing should happen.""" + bel = solph.buses.Bus(label="electricityBus") + + source = solph.components.Source( + label="s1", outputs={bel: solph.flows.Flow(nominal_value=0)} + ) + self.energysystem.add(bel, source) + self.compare_lp_files("nominal_value_to_zero_multi_period.lp") + + def test_fixed_source_invest_sink(self): + """Constraints test for fixed source + invest sink w. `summed_max`""" + bel = solph.buses.Bus(label="electricityBus") + + source = solph.components.Source( + label="wind", + outputs={ + bel: solph.flows.Flow( + fix=[12, 16, 14, 18, 18, 18], nominal_value=1e6 + ) + }, + ) + + sink = solph.components.Sink( + label="excess", + inputs={ + bel: solph.flows.Flow( + summed_max=2.3, + variable_costs=25, + max=0.8, + investment=solph.Investment( + ep_costs=500, maximum=1e6, existing=50, lifetime=20 + ), + ) + }, + ) + self.energysystem.add(bel, source, sink) + self.compare_lp_files("fixed_source_invest_sink_multi_period.lp") + + def test_investment_lifetime_missing(self): + """Test error raised if lifetime attribute is missing""" + bel = solph.buses.Bus(label="electricityBus") + + sink = solph.components.Sink( + label="excess", + inputs={ + bel: solph.flows.Flow( + max=0.8, + investment=solph.Investment( + ep_costs=500, maximum=1e6, existing=50 + ), + ) + }, + ) + self.energysystem.add(bel, sink) + msg = ( + "You have to specify a lifetime " + "for a Flow with an associated investment " + "object in a multi-period model!" + ) + with pytest.raises(ValueError, match=msg): + self.get_om() + + def test_invest_source_fixed_sink(self): + """Constraint test with a fixed sink and a dispatch invest source.""" + + bel = solph.buses.Bus(label="electricityBus") + + source = solph.components.Source( + label="pv", + outputs={ + bel: solph.flows.Flow( + max=[45, 83, 65, 67, 33, 96], + variable_costs=13, + investment=solph.Investment(ep_costs=123, lifetime=25), + ) + }, + ) + + sink = solph.components.Sink( + label="excess", + inputs={ + bel: solph.flows.Flow( + fix=[0.5, 0.8, 0.3, 0.6, 0.7, 0.2], nominal_value=1e5 + ) + }, + ) + self.energysystem.add(bel, source, sink) + self.compare_lp_files("invest_source_fixed_sink_multi_period.lp") + + def test_storage(self): + """ """ + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage_no_invest", + inputs={ + bel: solph.flows.Flow(nominal_value=16667, variable_costs=56) + }, + outputs={ + bel: solph.flows.Flow(nominal_value=16667, variable_costs=24) + }, + nominal_storage_capacity=1e5, + loss_rate=0.13, + inflow_conversion_factor=0.97, + outflow_conversion_factor=0.86, + initial_storage_level=0.4, + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_multi_period.lp") + + def test_storage_invest_1(self): + """All invest variables are coupled. The invest variables of the Flows + will be created during the initialisation of the storage e.g. battery + """ + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage1", + inputs={bel: solph.flows.Flow(variable_costs=56)}, + outputs={bel: solph.flows.Flow(variable_costs=24)}, + nominal_storage_capacity=None, + loss_rate=0.13, + max_storage_level=0.9, + min_storage_level=0.1, + invest_relation_input_capacity=1 / 6, + invest_relation_output_capacity=1 / 6, + lifetime_inflow=20, + lifetime_outflow=20, + inflow_conversion_factor=0.97, + outflow_conversion_factor=0.86, + investment=solph.Investment( + ep_costs=145, + maximum=234, + lifetime=20, + interest_rate=0.05, + overall_maximum=1000, + overall_minimum=2, + ), + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_invest_1_multi_period.lp") + + def test_storage_invest_2(self): + """All can be free extended to their own cost.""" + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage2", + inputs={ + bel: solph.flows.Flow( + investment=solph.Investment(ep_costs=99, lifetime=20) + ) + }, + outputs={ + bel: solph.flows.Flow( + investment=solph.Investment(ep_costs=9, lifetime=20) + ) + }, + investment=solph.Investment( + ep_costs=145, lifetime=20, existing=20, age=19 + ), + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_invest_2_multi_period.lp") + + def test_storage_invest_3(self): + """The storage capacity is fixed, but the Flows can be extended. + e.g. PHES with a fixed basin but the pump and the turbine can be + adapted + """ + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage3", + inputs={ + bel: solph.flows.Flow( + investment=solph.Investment( + ep_costs=99, + lifetime=2, + age=1, + existing=10, + ) + ) + }, + outputs={ + bel: solph.flows.Flow( + investment=solph.Investment(ep_costs=9, lifetime=20) + ) + }, + nominal_storage_capacity=5000, + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_invest_3_multi_period.lp") + + def test_storage_invest_4(self): + """Only the storage capacity can be extended.""" + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage4", + inputs={bel: solph.flows.Flow(nominal_value=80)}, + outputs={bel: solph.flows.Flow(nominal_value=100)}, + investment=solph.Investment( + ep_costs=145, maximum=500, lifetime=2, age=1, existing=100 + ), + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_invest_4_multi_period.lp") + + def test_storage_invest_5(self): + """The storage capacity is fixed, but the Flows can be extended. + e.g. PHES with a fixed basin but the pump and the turbine can be + adapted. The installed capacity of the pump is 10 % bigger than the + the capacity of the turbine due to 'invest_relation_input_output=1.1'. + """ + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage5", + inputs={ + bel: solph.flows.Flow( + investment=solph.Investment( + ep_costs=99, existing=110, lifetime=20 + ) + ) + }, + outputs={ + bel: solph.flows.Flow( + investment=solph.Investment(existing=100, lifetime=20) + ) + }, + invest_relation_input_output=1.1, + nominal_storage_capacity=10000, + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_invest_5_multi_period.lp") + + def test_storage_invest_6(self): + """Like test_storage_invest_5 but there can also be an investment in + the basin. + """ + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage6", + inputs={ + bel: solph.flows.Flow( + investment=solph.Investment( + ep_costs=99, existing=110, lifetime=20 + ) + ) + }, + outputs={ + bel: solph.flows.Flow( + investment=solph.Investment(existing=100, lifetime=20) + ) + }, + invest_relation_input_output=1.1, + investment=solph.Investment( + ep_costs=145, existing=1000, lifetime=20, age=17 + ), + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_invest_6_multi_period.lp") + + def test_storage_minimum_invest(self): + """All invest variables are coupled. The invest variables of the Flows + will be created during the initialisation of the storage e.g. battery + """ + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage1", + inputs={bel: solph.flows.Flow()}, + outputs={bel: solph.flows.Flow()}, + investment=solph.Investment( + ep_costs=145, minimum=100, maximum=200, lifetime=40 + ), + lifetime_inflow=40, + lifetime_outflow=40, + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_invest_minimum_multi_period.lp") + + def test_storage_invest_multi_period(self): + """Test multi-period attributes such as age, fixed_costs, ...""" + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage1", + inputs={bel: solph.flows.Flow()}, + outputs={bel: solph.flows.Flow()}, + investment=solph.Investment( + ep_costs=145, + minimum=100, + maximum=200, + lifetime=40, + existing=50, + age=39, + overall_minimum=10, + overall_maximum=500, + fixed_costs=5, + ), + lifetime_inflow=40, + lifetime_outflow=40, + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_invest_multi_period.lp") + + def test_storage_unbalanced(self): + """Testing a unbalanced storage (e.g. battery).""" + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage1", + inputs={bel: solph.flows.Flow()}, + outputs={bel: solph.flows.Flow()}, + nominal_storage_capacity=1111, + initial_storage_level=None, + balanced=False, + invest_relation_input_capacity=1, + invest_relation_output_capacity=1, + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_unbalanced_multi_period.lp") + + def test_storage_fixed_losses(self): + """ """ + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage_no_invest", + inputs={ + bel: solph.flows.Flow(nominal_value=16667, variable_costs=56) + }, + outputs={ + bel: solph.flows.Flow(nominal_value=16667, variable_costs=24) + }, + nominal_storage_capacity=1e5, + loss_rate=0.13, + fixed_losses_relative=0.01, + fixed_losses_absolute=3, + inflow_conversion_factor=0.97, + outflow_conversion_factor=0.86, + initial_storage_level=0.4, + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_fixed_losses_multi_period.lp") + + def test_storage_invest_1_fixed_losses(self): + """Test error for fixed losses""" + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage1", + inputs={bel: solph.flows.Flow(variable_costs=56)}, + outputs={bel: solph.flows.Flow(variable_costs=24)}, + nominal_storage_capacity=None, + loss_rate=0.13, + fixed_losses_relative=0.01, + fixed_losses_absolute=3, + max_storage_level=0.9, + min_storage_level=0.1, + invest_relation_input_capacity=1 / 6, + invest_relation_output_capacity=1 / 6, + inflow_conversion_factor=0.97, + outflow_conversion_factor=0.86, + lifetime_inflow=40, + lifetime_outflow=40, + investment=solph.Investment( + ep_costs=145, + maximum=234, + lifetime=20, + interest_rate=0.05, + overall_maximum=1000, + overall_minimum=2, + ), + ) + self.energysystem.add(bel, storage) + msg = ( + "For a multi-period investment model, fixed absolute" + " losses are not supported. Please remove parameter." + ) + with pytest.raises(ValueError, match=msg): + self.get_om() + + def test_storage_invest_1_initial_storage_level(self): + """Test error for initial storage level + with multi-period investments""" + bel = solph.buses.Bus(label="electricityBus") + storage = solph.components.GenericStorage( + label="storage1", + inputs={bel: solph.flows.Flow(variable_costs=56)}, + outputs={bel: solph.flows.Flow(variable_costs=24)}, + nominal_storage_capacity=None, + loss_rate=0.13, + max_storage_level=0.9, + min_storage_level=0.1, + invest_relation_input_capacity=1 / 6, + invest_relation_output_capacity=1 / 6, + inflow_conversion_factor=0.97, + outflow_conversion_factor=0.86, + lifetime_inflow=40, + lifetime_outflow=40, + initial_storage_level=0.5, + investment=solph.Investment( + ep_costs=145, + maximum=234, + lifetime=20, + interest_rate=0.05, + overall_maximum=1000, + overall_minimum=2, + ), + ) + self.energysystem.add(bel, storage) + msg = ( + "For a multi-period model, initial_storage_level is" + " not supported.\nIt needs to be removed since it" + " has no effect.\nstorage_content will be zero," + " until there is some usable storage capacity installed." + ) + with pytest.raises(ValueError, match=msg): + self.get_om() + + def test_storage_invest_1_missing_lifetime(self): + """Test error thrown if storage misses necessary lifetime""" + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage1", + inputs={bel: solph.flows.Flow(variable_costs=56)}, + outputs={bel: solph.flows.Flow(variable_costs=24)}, + nominal_storage_capacity=None, + loss_rate=0.13, + max_storage_level=0.9, + min_storage_level=0.1, + invest_relation_input_capacity=1 / 6, + invest_relation_output_capacity=1 / 6, + inflow_conversion_factor=0.97, + outflow_conversion_factor=0.86, + lifetime_inflow=40, + lifetime_outflow=40, + investment=solph.Investment( + ep_costs=145, + maximum=234, + interest_rate=0.05, + overall_maximum=1000, + overall_minimum=2, + ), + ) + self.energysystem.add(bel, storage) + msg = ( + "You have to specify a lifetime " + "for a Flow going into or out of a GenericStorage " + "unit in a multi-period model!" + ) + with pytest.raises(ValueError, match=msg): + self.get_om() + + def test_onverter(self): + """Constraint test of a LinearN1Converter without Investment.""" + bgas = solph.buses.Bus(label="gasBus") + bbms = solph.buses.Bus(label="biomassBus") + bel = solph.buses.Bus(label="electricityBus") + bth = solph.buses.Bus(label="thermalBus") + + trf = solph.components.Converter( + label="powerplantGasBiomass", + inputs={bbms: solph.flows.Flow(), bgas: solph.flows.Flow()}, + outputs={ + bel: solph.flows.Flow(variable_costs=50), + bth: solph.flows.Flow(nominal_value=5e10, variable_costs=20), + }, + conversion_factors={bgas: 0.4, bbms: 0.1, bel: 0.3, bth: 0.5}, + ) + self.energysystem.add(bgas, bbms, bel, bth, trf) + self.compare_lp_files("converter_multi_period.lp") + + def test_converter_invest(self): + """Constraint test of a LinearN1Converter with Investment.""" + bgas = solph.buses.Bus(label="gasBus") + bcoal = solph.buses.Bus(label="coalBus") + bel = solph.buses.Bus(label="electricityBus") + bth = solph.buses.Bus(label="thermalBus") + + trf = solph.components.Converter( + label="powerplant_gas_coal", + inputs={bgas: solph.flows.Flow(), bcoal: solph.flows.Flow()}, + outputs={ + bel: solph.flows.Flow( + variable_costs=50, + investment=solph.Investment( + maximum=1000, + ep_costs=20, + lifetime=20, + ), + ), + bth: solph.flows.Flow(variable_costs=20), + }, + conversion_factors={bgas: 0.58, bcoal: 0.2, bel: 0.3, bth: 0.5}, + ) + self.energysystem.add(bgas, bcoal, bel, bth, trf) + self.compare_lp_files("converter_invest_multi_period.lp") + + def test_converter_invest_with_existing(self): + """Constraint test of a LinearN1Converter with Investment.""" + bgas = solph.buses.Bus(label="gasBus") + bcoal = solph.buses.Bus(label="coalBus") + bel = solph.buses.Bus(label="electricityBus") + bth = solph.buses.Bus(label="thermalBus") + + trf = solph.components.Converter( + label="powerplant_gas_coal", + inputs={bgas: solph.flows.Flow(), bcoal: solph.flows.Flow()}, + outputs={ + bel: solph.flows.Flow( + variable_costs=50, + investment=solph.Investment( + maximum=1000, + ep_costs=20, + existing=200, + lifetime=2, + age=1, + ), + ), + bth: solph.flows.Flow(variable_costs=20), + }, + conversion_factors={bgas: 0.58, bcoal: 0.2, bel: 0.3, bth: 0.5}, + ) + self.energysystem.add(bgas, bcoal, bel, bth, trf) + self.compare_lp_files("converter_invest_with_existing_multi_period.lp") + + def test_linear_converter_chp(self): + """ + Constraint test of a Converter without Investment (two outputs). + """ + bgas = solph.buses.Bus(label="gasBus") + bheat = solph.buses.Bus(label="heatBus") + bel = solph.buses.Bus(label="electricityBus") + + trf = solph.components.Converter( + label="CHPpowerplantGas", + inputs={ + bgas: solph.flows.Flow(nominal_value=1e11, variable_costs=50) + }, + outputs={bel: solph.flows.Flow(), bheat: solph.flows.Flow()}, + conversion_factors={bel: 0.4, bheat: 0.5}, + ) + self.energysystem.add(bgas, bheat, bel, trf) + self.compare_lp_files("linear_converter_chp_multi_period.lp") + + def test_linear_converter_chp_invest(self): + """Constraint test of a Converter with Investment (two outputs).""" + bgas = solph.buses.Bus(label="gasBus") + bheat = solph.buses.Bus(label="heatBus") + bel = solph.buses.Bus(label="electricityBus") + + trf = solph.components.Converter( + label="chp_powerplant_gas", + inputs={ + bgas: solph.flows.Flow( + variable_costs=50, + investment=solph.Investment( + maximum=1000, ep_costs=20, lifetime=50 + ), + ) + }, + outputs={bel: solph.flows.Flow(), bheat: solph.flows.Flow()}, + conversion_factors={bel: 0.4, bheat: 0.5}, + ) + self.energysystem.add(bgas, bheat, bel, trf) + self.compare_lp_files("linear_converter_chp_invest_multi_period.lp") + + def test_variable_chp(self): + """Test ExctractionTurbineCHP basic functionality""" + bel = solph.buses.Bus(label="electricityBus") + bth = solph.buses.Bus(label="heatBus") + bgas = solph.buses.Bus(label="commodityBus") + + chp1 = solph.components.ExtractionTurbineCHP( + label="variable_chp_gas1", + inputs={bgas: solph.flows.Flow(nominal_value=100)}, + outputs={bel: solph.flows.Flow(), bth: solph.flows.Flow()}, + conversion_factors={bel: 0.3, bth: 0.5}, + conversion_factor_full_condensation={bel: 0.5}, + ) + + chp2 = solph.components.ExtractionTurbineCHP( + label="variable_chp_gas2", + inputs={bgas: solph.flows.Flow(nominal_value=100)}, + outputs={bel: solph.flows.Flow(), bth: solph.flows.Flow()}, + conversion_factors={bel: 0.3, bth: 0.5}, + conversion_factor_full_condensation={bel: 0.5}, + ) + self.energysystem.add(bel, bth, bgas, chp1, chp2) + self.compare_lp_files("variable_chp_multi_period.lp") + + def test_emission_budget_limit(self): + """Test emissions budget limit constraint""" + bel = solph.buses.Bus(label="electricityBus") + + source1 = solph.components.Source( + label="source1", + outputs={ + bel: solph.flows.Flow( + nominal_value=100, + custom_attributes={ + "emission_factor": [0.5, -1.0, 2.0, 1.0, 0.5, 0.5] + }, + ) + }, + ) + source2 = solph.components.Source( + label="source2", + outputs={ + bel: solph.flows.Flow( + nominal_value=100, + custom_attributes={"emission_factor": 3.5}, + ) + }, + ) + + # Should be ignored because the emission attribute is not defined. + source3 = solph.components.Source( + label="source3", outputs={bel: solph.flows.Flow(nominal_value=100)} + ) + self.energysystem.add(source1, source2, source3) + om = self.get_om() + + solph.constraints.emission_limit(om, limit=777) + + self.compare_lp_files("emission_budget_limit.lp", my_om=om) + + def test_periodical_emission_limit(self): + """Test periodical emissions constraint""" + bel = solph.buses.Bus(label="electricityBus") + + source1 = solph.components.Source( + label="source1", + outputs={ + bel: solph.flows.Flow( + nominal_value=100, + custom_attributes={ + "emission_factor": [0.5, -1.0, 2.0, 1.0, 0.5, 0.5] + }, + ) + }, + ) + source2 = solph.components.Source( + label="source2", + outputs={ + bel: solph.flows.Flow( + nominal_value=100, + custom_attributes={"emission_factor": 3.5}, + ) + }, + ) + + # Should be ignored because the emission attribute is not defined. + source3 = solph.components.Source( + label="source3", outputs={bel: solph.flows.Flow(nominal_value=100)} + ) + self.energysystem.add(source1, source2, source3) + om = self.get_om() + + solph.constraints.emission_limit_per_period(om, limit=[300, 200, 100]) + + self.compare_lp_files("periodical_emission_limit.lp", my_om=om) + + def test_periodical_emission_limit_missing_limit(self): + """Test error for periodical emissions constraint""" + bel = solph.buses.Bus(label="electricityBus") + + source1 = solph.components.Source( + label="source1", + outputs={ + bel: solph.flows.Flow( + nominal_value=100, + custom_attributes={ + "emission_factor": [0.5, -1.0, 2.0, 1.0, 0.5, 0.5] + }, + ) + }, + ) + source2 = solph.components.Source( + label="source2", + outputs={ + bel: solph.flows.Flow( + nominal_value=100, + custom_attributes={"emission_factor": 3.5}, + ) + }, + ) + + # Should be ignored because the emission attribute is not defined. + source3 = solph.components.Source( + label="source3", outputs={bel: solph.flows.Flow(nominal_value=100)} + ) + self.energysystem.add(source1, source2, source3) + om = self.get_om() + + msg = ( + "You have to provide a limit for each period!\n" + "If you provide a scalar value, this will be applied as a " + "limit for each period." + ) + with pytest.raises(ValueError, match=msg): + solph.constraints.emission_limit_per_period(om, limit=None) + + def test_flow_count_limit(self): + """Test limiting the count of nonconvex flows""" + bel = solph.buses.Bus(label="electricityBus") + + source1 = solph.components.Source( + label="source1", + outputs={ + bel: solph.flows.Flow( + nonconvex=solph.NonConvex(), + nominal_value=100, + custom_attributes={"emission_factor": 0.5}, + ) + }, + ) + source2 = solph.components.Source( + label="source2", + outputs={ + bel: solph.flows.Flow( + nonconvex=solph.NonConvex(), + nominal_value=100, + custom_attributes={"emission_factor": 0.5}, + ) + }, + ) + + # Should be ignored because emission_factor is not defined. + source3 = solph.components.Source( + label="source3", + outputs={ + bel: solph.flows.Flow( + nonconvex=solph.NonConvex(), nominal_value=100 + ) + }, + ) + + # Should be ignored because it is not NonConvex. + source4 = solph.components.Source( + label="source4", + outputs={ + bel: solph.flows.Flow( + custom_attributes={"emission_factor": 1.5}, + min=0.3, + nominal_value=100, + ) + }, + ) + self.energysystem.add(source1, source2, source3, source4) + om = self.get_om() + + # one of the two flows has to be active + solph.constraints.limit_active_flow_count_by_keyword( + om, "emission_factor", lower_limit=1, upper_limit=2 + ) + + self.compare_lp_files("flow_count_limit_multi_period.lp", my_om=om) + + def test_shared_limit(self): + """Test an overall limit shared among components""" + b1 = solph.buses.Bus(label="bus") + + storage1 = solph.components.GenericStorage( + label="storage1", + nominal_storage_capacity=5, + inputs={b1: solph.flows.Flow()}, + outputs={b1: solph.flows.Flow()}, + ) + storage2 = solph.components.GenericStorage( + label="storage2", + nominal_storage_capacity=5, + inputs={b1: solph.flows.Flow()}, + outputs={b1: solph.flows.Flow()}, + ) + self.energysystem.add(b1, storage1, storage2) + model = self.get_om() + + components = [storage1, storage2] + + solph.constraints.shared_limit( + model, + model.GenericStorageBlock.storage_content, + "limit_storage", + components, + [0.5, 1.25], + upper_limit=7, + ) + + self.compare_lp_files("shared_limit_multi_period.lp", my_om=model) + + def test_equate_variables_constraint(self): + """Testing the equate_variables function in the constraint module.""" + bus1 = solph.buses.Bus(label="Bus1") + storage = solph.components.GenericStorage( + label="storage", + invest_relation_input_capacity=0.2, + invest_relation_output_capacity=0.2, + inputs={bus1: solph.flows.Flow()}, + outputs={bus1: solph.flows.Flow()}, + lifetime_inflow=3, + lifetime_outflow=3, + investment=solph.Investment(ep_costs=145, lifetime=3), + ) + sink = solph.components.Sink( + label="Sink", + inputs={ + bus1: solph.flows.Flow( + investment=solph.Investment(ep_costs=500, lifetime=3) + ) + }, + ) + source = solph.components.Source( + label="Source", + outputs={ + bus1: solph.flows.Flow( + investment=solph.Investment(ep_costs=123, lifetime=3) + ) + }, + ) + self.energysystem.add(bus1, storage, sink, source) + om = self.get_om() + solph.constraints.equate_variables( + om, + om.InvestmentFlowBlock.invest[source, bus1, 0], + om.InvestmentFlowBlock.invest[bus1, sink, 0], + 2, + ) + solph.constraints.equate_variables( + om, + om.InvestmentFlowBlock.invest[source, bus1, 0], + om.GenericInvestmentStorageBlock.invest[storage, 0], + ) + + self.compare_lp_files("connect_investment_multi_period.lp", my_om=om) + + def test_gradient(self): + """Testing gradient constraints""" + bel = solph.buses.Bus(label="electricityBus") + + source = solph.components.Source( + label="powerplant", + outputs={ + bel: solph.flows.Flow( + nominal_value=999, + variable_costs=23, + positive_gradient_limit=0.03, + negative_gradient_limit=0.05, + ) + }, + ) + self.energysystem.add(bel, source) + self.compare_lp_files("source_with_gradient_multi_period.lp") + + def test_nonconvex_gradient(self): + """Testing gradient constraints""" + bel = solph.buses.Bus(label="electricityBus") + + source = solph.components.Source( + label="powerplant", + outputs={ + bel: solph.flows.Flow( + nominal_value=999, + variable_costs=23, + nonconvex=solph.NonConvex( + positive_gradient_limit=0.03, + negative_gradient_limit=0.05, + ), + ) + }, + ) + self.energysystem.add(bel, source) + self.compare_lp_files("source_with_nonconvex_gradient_multi_period.lp") + + def test_periodical_investment_limit(self): + """Testing the investment_limit function in the constraint module.""" + bus1 = solph.buses.Bus(label="Bus1") + storage = solph.components.GenericStorage( + label="storage_invest_limit", + invest_relation_input_capacity=0.2, + invest_relation_output_capacity=0.2, + inputs={bus1: solph.flows.Flow()}, + outputs={bus1: solph.flows.Flow()}, + lifetime_inflow=20, + lifetime_outflow=20, + investment=solph.Investment(ep_costs=145, lifetime=30), + ) + source = solph.components.Source( + label="Source", + outputs={ + bus1: solph.flows.Flow( + investment=solph.Investment(ep_costs=123, lifetime=100) + ) + }, + ) + self.energysystem.add(bus1, storage, source) + om = self.get_om() + solph.constraints.investment_limit_per_period( + om, limit=[500, 400, 300] + ) + + self.compare_lp_files("periodical_investment_limit.lp", my_om=om) + + def test_periodical_investment_limit_with_dsm1(self): + """Testing the investment_limit function in the constraint module.""" + bus1 = solph.buses.Bus(label="Bus1") + source = solph.components.Source( + label="Source", + outputs={ + bus1: solph.flows.Flow( + investment=solph.Investment(ep_costs=123, lifetime=100) + ) + }, + ) + sinkdsm = solph.components.experimental.SinkDSM( + label="sink_dsm_DIW", + approach="DIW", + inputs={bus1: solph.flows.Flow()}, + demand=[1] * 6, + capacity_up=[0.5] * 6, + capacity_down=[0.5] * 6, + max_demand=1, + delay_time=1, + cost_dsm_down_shift=0.5, + cost_dsm_up=0.5, + shed_eligibility=False, + investment=solph.Investment( + ep_costs=100, + existing=50, + minimum=33, + maximum=100, + age=1, + lifetime=2, + overall_maximum=1000, + overall_minimum=200, + ), + ) + self.energysystem.add(bus1, source, sinkdsm) + om = self.get_om() + solph.constraints.investment_limit_per_period( + om, limit=[400, 300, 200] + ) + + self.compare_lp_files( + "periodical_investment_limit_with_dsm_DIW.lp", my_om=om + ) + + def test_periodical_investment_limit_with_dsm2(self): + """Testing the investment_limit function in the constraint module.""" + bus1 = solph.buses.Bus(label="Bus1") + source = solph.components.Source( + label="Source", + outputs={ + bus1: solph.flows.Flow( + investment=solph.Investment(ep_costs=123, lifetime=100) + ) + }, + ) + sinkdsm = solph.components.experimental.SinkDSM( + label="sink_dsm_DLR", + approach="DLR", + inputs={bus1: solph.flows.Flow()}, + demand=[1] * 6, + capacity_up=[0.5] * 6, + capacity_down=[0.5] * 6, + max_demand=1, + delay_time=1, + shift_time=1, + cost_dsm_down_shift=0.5, + cost_dsm_up=0.5, + shed_eligibility=False, + investment=solph.Investment( + ep_costs=100, + existing=50, + minimum=33, + maximum=100, + age=1, + lifetime=2, + overall_maximum=1000, + overall_minimum=200, + ), + ) + self.energysystem.add(bus1, source, sinkdsm) + om = self.get_om() + solph.constraints.investment_limit_per_period( + om, limit=[400, 300, 200] + ) + + self.compare_lp_files( + "periodical_investment_limit_with_dsm_DLR.lp", my_om=om + ) + + def test_periodical_investment_limit_with_dsm3(self): + """Testing the investment_limit function in the constraint module.""" + bus1 = solph.buses.Bus(label="Bus1") + source = solph.components.Source( + label="Source", + outputs={ + bus1: solph.flows.Flow( + investment=solph.Investment(ep_costs=123, lifetime=100) + ) + }, + ) + sinkdsm = solph.components.experimental.SinkDSM( + label="sink_dsm_oemof", + approach="oemof", + inputs={bus1: solph.flows.Flow()}, + demand=[1] * 6, + capacity_up=[0.5] * 6, + capacity_down=[0.5] * 6, + max_demand=1, + delay_time=1, + shift_interval=2, + cost_dsm_down_shift=0.5, + cost_dsm_up=0.5, + shed_eligibility=False, + investment=solph.Investment( + ep_costs=100, + existing=50, + minimum=33, + maximum=100, + age=1, + lifetime=2, + overall_maximum=1000, + overall_minimum=200, + ), + ) + self.energysystem.add(bus1, source, sinkdsm) + om = self.get_om() + solph.constraints.investment_limit_per_period( + om, limit=[400, 300, 200] + ) + + self.compare_lp_files( + "periodical_investment_limit_with_dsm_oemof.lp", my_om=om + ) + + def test_periodical_investment_limit_missing(self): + """Testing the investment_limit function in the constraint module.""" + bus1 = solph.buses.Bus(label="Bus1") + storage = solph.components.GenericStorage( + label="storage_invest_limit", + invest_relation_input_capacity=0.2, + invest_relation_output_capacity=0.2, + inputs={bus1: solph.flows.Flow()}, + outputs={bus1: solph.flows.Flow()}, + lifetime_inflow=20, + lifetime_outflow=20, + investment=solph.Investment(ep_costs=145, lifetime=30), + ) + source = solph.components.Source( + label="Source", + outputs={ + bus1: solph.flows.Flow( + investment=solph.Investment(ep_costs=123, lifetime=100) + ) + }, + ) + self.energysystem.add(bus1, storage, source) + om = self.get_om() + msg = "You have to provide an investment limit for each period!" + with pytest.raises(ValueError, match=msg): + solph.constraints.investment_limit_per_period(om, limit=None) + + def test_min_max_runtime(self): + """Testing min and max runtimes for nonconvex flows.""" + bus_t = solph.buses.Bus(label="Bus_T") + source = solph.components.Source( + label="cheap_plant_min_down_constraints", + outputs={ + bus_t: solph.flows.Flow( + nominal_value=10, + min=0.5, + max=1.0, + variable_costs=10, + nonconvex=solph.NonConvex( + minimum_downtime=4, + minimum_uptime=2, + initial_status=1, + startup_costs=5, + shutdown_costs=7, + ), + ) + }, + ) + self.energysystem.add(bus_t, source) + self.compare_lp_files("min_max_runtime_multi_period.lp") + + def test_activity_costs(self): + """Testing activity_costs attribute for nonconvex flows.""" + bus_t = solph.buses.Bus(label="Bus_C") + source = solph.components.Source( + label="cheap_plant_activity_costs", + outputs={ + bus_t: solph.flows.Flow( + nominal_value=10, + min=0.5, + max=1.0, + variable_costs=10, + nonconvex=solph.NonConvex( + activity_costs=2, + ), + ) + }, + ) + self.energysystem.add(bus_t, source) + self.compare_lp_files("activity_costs_multi_period.lp") + + def test_inactivity_costs(self): + """Testing inactivity_costs attribute for nonconvex flows.""" + bus_t = solph.buses.Bus(label="Bus_C") + source = solph.components.Source( + label="cheap_plant_inactivity_costs", + outputs={ + bus_t: solph.flows.Flow( + nominal_value=10, + min=0.5, + max=1.0, + variable_costs=10, + nonconvex=solph.NonConvex( + inactivity_costs=2, + ), + ) + }, + ) + self.energysystem.add(bus_t, source) + self.compare_lp_files("inactivity_costs_multi_period.lp") + + def test_piecewise_linear_converter_cc(self): + """Testing PiecewiseLinearConverter using CC formulation.""" + bgas = solph.buses.Bus(label="gasBus") + bel = solph.buses.Bus(label="electricityBus") + pwltf = solph.components.experimental.PiecewiseLinearConverter( + label="pwltf", + inputs={ + bgas: solph.flows.Flow(nominal_value=100, variable_costs=1) + }, + outputs={bel: solph.flows.Flow()}, + in_breakpoints=[0, 25, 50, 75, 100], + conversion_function=lambda x: x**2, + pw_repn="CC", + ) + self.energysystem.add(bgas, bel, pwltf) + self.compare_lp_files("piecewise_linear_converter_cc_multi_period.lp") + + def test_piecewise_linear_converter_dcc(self): + """Testing PiecewiseLinearConverter using DCC formulation.""" + bgas = solph.buses.Bus(label="gasBus") + bel = solph.buses.Bus(label="electricityBus") + pwltf = solph.components.experimental.PiecewiseLinearConverter( + label="pwltf", + inputs={ + bgas: solph.flows.Flow(nominal_value=100, variable_costs=1) + }, + outputs={bel: solph.flows.Flow()}, + in_breakpoints=[0, 25, 50, 75, 100], + conversion_function=lambda x: x**2, + pw_repn="DCC", + ) + self.energysystem.add(bgas, bel, pwltf) + self.compare_lp_files("piecewise_linear_converter_dcc_multi_period.lp") + + def test_maximum_startups(self): + """Testing maximum_startups attribute for nonconvex flows.""" + bus_t = solph.buses.Bus(label="Bus_C") + source = solph.components.Source( + label="cheap_plant_maximum_startups", + outputs={ + bus_t: solph.flows.Flow( + nominal_value=10, + min=0.5, + max=1.0, + variable_costs=10, + nonconvex=solph.NonConvex(maximum_startups=2), + ) + }, + ) + self.energysystem.add(bus_t, source) + self.compare_lp_files("maximum_startups_multi_period.lp") + + def test_maximum_shutdowns(self): + """Testing maximum_shutdowns attribute for nonconvex flows.""" + bus_t = solph.buses.Bus(label="Bus_C") + source = solph.components.Source( + label="cheap_plant_maximum_shutdowns", + outputs={ + bus_t: solph.flows.Flow( + nominal_value=10, + min=0.5, + max=1.0, + variable_costs=10, + nonconvex=solph.NonConvex(maximum_shutdowns=2), + ) + }, + ) + self.energysystem.add(bus_t, source) + self.compare_lp_files("maximum_shutdowns_multi_period.lp") + + def test_offsetconverter(self): + """Constraint test of a OffsetOffsetConverter.""" + bgas = solph.buses.Bus(label="gasBus") + bth = solph.buses.Bus(label="thermalBus") + + otrf = solph.components.OffsetConverter( + label="gasboiler", + inputs={bgas: solph.flows.Flow()}, + outputs={ + bth: solph.flows.Flow( + nominal_value=100, min=0.32, nonconvex=solph.NonConvex() + ) + }, + coefficients=[-17, 0.9], + ) + self.energysystem.add(bgas, bth, otrf) + self.compare_lp_files("offsetconverter_multi_period.lp") + + def test_dsm_module_DIW(self): + """Constraint test of SinkDSM with approach=DLR""" + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1] * 6, + capacity_up=[0.5] * 6, + capacity_down=[0.5] * 6, + approach="DIW", + max_demand=1, + max_capacity_up=1, + max_capacity_down=1, + delay_time=1, + cost_dsm_down_shift=2, + shed_eligibility=False, + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_DIW_multi_period.lp") + + def test_dsm_module_DLR(self): + """Constraint test of SinkDSM with approach=DLR""" + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1] * 6, + capacity_up=[0.5] * 6, + capacity_down=[0.5] * 6, + approach="DLR", + max_demand=1, + max_capacity_up=1, + max_capacity_down=1, + delay_time=2, + shift_time=1, + cost_dsm_down_shift=2, + shed_eligibility=False, + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_DLR_multi_period.lp") + + def test_dsm_module_oemof(self): + """Constraint test of SinkDSM with approach=oemof""" + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1] * 6, + capacity_up=[0.5, 0.4, 0.5, 0.3, 0.3, 0.3], + capacity_down=[0.5, 0.4, 0.5, 0.3, 0.3, 0.3], + approach="oemof", + max_demand=1, + max_capacity_up=1, + max_capacity_down=1, + shift_interval=2, + cost_dsm_down_shift=2, + shed_eligibility=False, + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_oemof_multi_period.lp") + + def test_dsm_module_DIW_extended(self): + """Constraint test of SinkDSM with approach=DLR + + Test all possible parameters and constraints + """ + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1, 0.9, 0.8, 0.7, 0.7, 0.7], + capacity_up=[0.5, 0.4, 0.5, 0.3, 0.3, 0.3], + capacity_down=[0.3, 0.3, 0.4, 0.3, 0.3, 0.3], + approach="DIW", + max_demand=1, + max_capacity_up=1, + max_capacity_down=1, + delay_time=1, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + efficiency=0.99, + recovery_time_shift=2, + recovery_time_shed=2, + shed_time=2, + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_DIW_extended_multi_period.lp") + + def test_dsm_module_DLR_extended(self): + """Constraint test of SinkDSM with approach=DLR""" + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1, 0.9, 0.8, 0.7, 0.7, 0.7], + capacity_up=[0.5, 0.4, 0.5, 0.3, 0.3, 0.3], + capacity_down=[0.3, 0.3, 0.4, 0.3, 0.3, 0.3], + approach="DLR", + max_demand=1, + max_capacity_up=1, + max_capacity_down=1, + delay_time=2, + shift_time=1, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + efficiency=0.99, + recovery_time_shed=2, + ActivateYearLimit=True, + ActivateDayLimit=True, + n_yearLimit_shift=100, + n_yearLimit_shed=50, + t_dayLimit=3, + addition=False, + fixes=False, + shed_time=2, + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_DLR_extended_multi_period.lp") + + def test_dsm_module_oemof_extended(self): + """Constraint test of SinkDSM with approach=oemof""" + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1, 0.9, 0.8, 0.7, 0.7, 0.7], + capacity_up=[0.5, 0.4, 0.5, 0.3, 0.3, 0.3], + capacity_down=[0.3, 0.3, 0.4, 0.3, 0.3, 0.3], + approach="oemof", + shift_interval=2, + max_demand=1, + max_capacity_up=1, + max_capacity_down=1, + delay_time=2, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + efficiency=0.99, + recovery_time_shed=2, + shed_time=2, + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_oemof_extended_multi_period.lp") + + def test_dsm_module_DIW_invest(self): + """Constraint test of SinkDSM with approach=DLR and investments""" + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1] * 6, + capacity_up=[0.5] * 6, + capacity_down=[0.5] * 6, + approach="DIW", + max_demand=[1, 2, 3], + delay_time=1, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + shed_eligibility=True, + recovery_time_shed=2, + shed_time=2, + investment=solph.Investment( + ep_costs=100, + existing=50, + minimum=33, + maximum=100, + age=1, + lifetime=20, + fixed_costs=20, + overall_maximum=1000, + overall_minimum=5, + ), + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_DIW_invest_multi_period.lp") + + def test_dsm_module_DLR_invest(self): + """Constraint test of SinkDSM with approach=DLR and investments""" + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1] * 6, + capacity_up=[0.5] * 6, + capacity_down=[0.5] * 6, + approach="DLR", + max_demand=[1, 2, 3], + delay_time=2, + shift_time=1, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + shed_eligibility=True, + recovery_time_shed=2, + shed_time=2, + n_yearLimit_shed=50, + investment=solph.Investment( + ep_costs=100, + existing=50, + minimum=33, + maximum=100, + age=1, + lifetime=20, + fixed_costs=20, + overall_maximum=1000, + overall_minimum=5, + ), + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_DLR_invest_multi_period.lp") + + def test_dsm_module_oemof_invest(self): + """Constraint test of SinkDSM with approach=oemof and investments""" + + b_elec = solph.buses.Bus(label="bus_elec") + sinkdsm = solph.components.experimental.SinkDSM( + label="demand_dsm", + inputs={b_elec: solph.flows.Flow()}, + demand=[1] * 6, + capacity_up=[0.5, 0.4, 0.5, 0.3, 0.3, 0.3], + capacity_down=[0.5, 0.4, 0.5, 0.3, 0.3, 0.3], + approach="oemof", + max_demand=[1, 2, 3], + shift_interval=2, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + shed_eligibility=True, + recovery_time_shed=2, + shed_time=2, + investment=solph.Investment( + ep_costs=100, + existing=50, + minimum=33, + maximum=100, + age=1, + lifetime=20, + fixed_costs=20, + overall_maximum=1000, + overall_minimum=5, + ), + ) + self.energysystem.add(b_elec, sinkdsm) + self.compare_lp_files("dsm_module_oemof_invest_multi_period.lp") + + def test_nonconvex_investment_storage_without_offset(self): + """All invest variables are coupled. The invest variables of the Flows + will be created during the initialisation of the storage e.g. battery + """ + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage_non_convex", + inputs={bel: solph.flows.Flow(variable_costs=56)}, + outputs={bel: solph.flows.Flow(variable_costs=24)}, + nominal_storage_capacity=None, + loss_rate=0.13, + max_storage_level=0.9, + min_storage_level=0.1, + invest_relation_input_capacity=1 / 6, + invest_relation_output_capacity=1 / 6, + inflow_conversion_factor=0.97, + outflow_conversion_factor=0.86, + lifetime_inflow=20, + lifetime_outflow=20, + investment=solph.Investment( + ep_costs=141, + maximum=244, + minimum=12, + nonconvex=True, + lifetime=20, + ), + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_invest_without_offset_multi_period.lp") + + def test_nonconvex_investment_storage_with_offset(self): + """All invest variables are coupled. The invest variables of the Flows + will be created during the initialisation of the storage e.g. battery + """ + bel = solph.buses.Bus(label="electricityBus") + + storage = solph.components.GenericStorage( + label="storage_non_convex", + inputs={bel: solph.flows.Flow(variable_costs=56)}, + outputs={bel: solph.flows.Flow(variable_costs=24)}, + nominal_storage_capacity=None, + loss_rate=0.13, + max_storage_level=0.9, + min_storage_level=0.1, + invest_relation_input_capacity=1 / 6, + invest_relation_output_capacity=1 / 6, + inflow_conversion_factor=0.97, + outflow_conversion_factor=0.86, + lifetime_inflow=20, + lifetime_outflow=20, + investment=solph.Investment( + ep_costs=145, + minimum=19, + offset=5, + nonconvex=True, + maximum=1454, + lifetime=20, + ), + ) + self.energysystem.add(bel, storage) + self.compare_lp_files("storage_invest_with_offset_multi_period.lp") + + def test_nonconvex_invest_storage_all_nonconvex(self): + """All invest variables are free and nonconvex.""" + b1 = solph.buses.Bus(label="bus1") + + storage = solph.components.GenericStorage( + label="storage_all_nonconvex", + inputs={ + b1: solph.flows.Flow( + investment=solph.Investment( + nonconvex=True, + minimum=5, + offset=10, + maximum=30, + ep_costs=10, + lifetime=20, + ) + ) + }, + outputs={ + b1: solph.flows.Flow( + investment=solph.Investment( + nonconvex=True, + minimum=8, + offset=15, + ep_costs=10, + maximum=20, + lifetime=20, + ) + ) + }, + investment=solph.Investment( + nonconvex=True, + ep_costs=20, + offset=30, + minimum=20, + maximum=100, + lifetime=20, + ), + ) + self.energysystem.add(b1, storage) + self.compare_lp_files("storage_invest_all_nonconvex_multi_period.lp") + + def test_nonconvex_invest_sink_without_offset(self): + """Non convex invest flow without offset, with minimum.""" + bel = solph.buses.Bus(label="electricityBus") + + sink = solph.components.Sink( + label="sink_nonconvex_invest", + inputs={ + bel: solph.flows.Flow( + summed_max=2.3, + variable_costs=25, + max=0.8, + investment=solph.Investment( + ep_costs=500, + minimum=15, + nonconvex=True, + maximum=172, + lifetime=20, + ), + ) + }, + ) + self.energysystem.add(bel, sink) + self.compare_lp_files("flow_invest_without_offset_multi_period.lp") + + def test_nonconvex_invest_source_with_offset(self): + """Non convex invest flow with offset, with minimum.""" + bel = solph.buses.Bus(label="electricityBus") + + source = solph.components.Source( + label="source_nonconvex_invest", + outputs={ + bel: solph.flows.Flow( + summed_max=2.3, + variable_costs=25, + max=0.8, + investment=solph.Investment( + ep_costs=500, + minimum=15, + maximum=20, + offset=34, + nonconvex=True, + lifetime=20, + ), + ) + }, + ) + self.energysystem.add(bel, source) + self.compare_lp_files("flow_invest_with_offset_multi_period.lp") + + def test_nonconvex_invest_source_with_offset_no_minimum(self): + """Non convex invest flow with offset, without minimum.""" + bel = solph.buses.Bus(label="electricityBus") + + source = solph.components.Source( + label="source_nonconvex_invest", + outputs={ + bel: solph.flows.Flow( + summed_max=2.3, + variable_costs=25, + max=0.8, + investment=solph.Investment( + ep_costs=500, + maximum=1234, + offset=34, + nonconvex=True, + lifetime=20, + ), + ) + }, + ) + self.energysystem.add(bel, source) + self.compare_lp_files( + "flow_invest_with_offset_no_minimum_multi_period.lp" + ) + + def test_summed_min_max_source(self): + """Test sink with summed_min and summed_max attribute""" + bel = solph.buses.Bus(label="electricityBus") + + sink = solph.components.Sink( + label="excess", + inputs={ + bel: solph.flows.Flow( + summed_min=3, + summed_max=100, + variable_costs=25, + max=0.8, + nominal_value=10, + ) + }, + ) + self.energysystem.add(bel, sink) + self.compare_lp_files("summed_min_source_multi_period.lp") + + def test_flow_reaching_lifetime(self): + """Test flow forced to zero once exceeding its lifetime""" + bel = solph.buses.Bus(label="electricityBus") + + sink = solph.components.Sink( + label="excess", + inputs={ + bel: solph.flows.Flow( + variable_costs=25, max=0.8, nominal_value=10, lifetime=2 + ) + }, + ) + self.energysystem.add(bel, sink) + self.compare_lp_files("flow_reaching_lifetime.lp") + + def test_flow_reaching_lifetime_initial_age(self): + """Test flow forced to zero once exceeding its lifetime with age""" + bel = solph.buses.Bus(label="electricityBus") + + sink = solph.components.Sink( + label="excess", + inputs={ + bel: solph.flows.Flow( + variable_costs=25, + max=0.8, + nominal_value=10, + lifetime=2, + age=1, + ) + }, + ) + self.energysystem.add(bel, sink) + self.compare_lp_files("flow_reaching_lifetime_initial_age.lp") + + def test_fixed_costs(self): + """Test fixed_cost attribute for different kinds of flows""" + bel = solph.buses.Bus(label="electricityBus") + + source1 = solph.components.Source( + label="pv_forever", + outputs={ + bel: solph.flows.Flow( + variable_costs=25, max=0.8, nominal_value=10, fixed_costs=3 + ) + }, + ) + + source2 = solph.components.Source( + label="pv_with_lifetime", + outputs={ + bel: solph.flows.Flow( + variable_costs=25, + max=0.8, + nominal_value=10, + fixed_costs=3, + lifetime=20, + ) + }, + ) + + source3 = solph.components.Source( + label="pv_with_lifetime_and_age", + outputs={ + bel: solph.flows.Flow( + variable_costs=25, + max=0.8, + nominal_value=10, + fixed_costs=3, + lifetime=20, + age=18, + ) + }, + ) + self.energysystem.add(bel, source1, source2, source3) + self.compare_lp_files("fixed_costs_sources.lp") + + def test_multi_period_varying_period_length(self): + """Test multi period with varying period length""" + + # Define starting years of investment periods + years = [2000, 2020, 2035, 2045, 2050, 2060, 2075, 2095] + + # Create a list of timeindex for each period + periods = [ + pd.date_range(f"1/1/{i}", periods=3, freq="H") for i in years + ] + + # Create an overall timeindex + timeindex = pd.concat( + [pd.Series(index=i, dtype="float64") for i in periods] + ).index + + # Create an energy system + es = solph.EnergySystem( + timeindex=timeindex, + timeincrement=[1] * len(timeindex), + periods=periods, + infer_last_interval=False, + ) + + # Create buses + bel = solph.Bus(label="electricity", balanced=True) + + # Create a storage + storage = solph.components.GenericStorage( + label="storage", + inputs={ + bel: solph.Flow( + variable_costs=0, + investment=solph.Investment( + ep_costs=10, + existing=0, + lifetime=20, + age=0, + interest_rate=0.02, + ), + ) + }, + outputs={ + bel: solph.Flow( + variable_costs=0, + investment=solph.Investment( + ep_costs=10, + existing=0, + lifetime=20, + age=0, + interest_rate=0.02, + ), + ) + }, + loss_rate=0.00, + invest_relation_output_capacity=0.2, + invest_relation_input_output=1, + # inflow_conversion_factor=1, + # outflow_conversion_factor=0.8, + # nominal_storage_capacity=100, + investment=solph.Investment( + ep_costs=10, + maximum=float("+inf"), + existing=0, + lifetime=20, + age=0, + fixed_costs=None, + interest_rate=0.02, + ), + ) + # Create a DSM sink with DIW approach + sinkdsm_diw = solph.components.experimental.SinkDSM( + label="demand_dsm_diw", + inputs={bel: solph.flows.Flow()}, + demand=[1] * len(timeindex), + capacity_up=[0.5] * len(timeindex), + capacity_down=[0.5] * len(timeindex), + approach="DIW", + max_demand=[1] * len(timeindex), + delay_time=1, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + shed_eligibility=True, + recovery_time_shed=2, + shed_time=2, + investment=solph.Investment( + ep_costs=100, + minimum=33, + maximum=100, + lifetime=20, + fixed_costs=20, + overall_maximum=1000, + overall_minimum=5, + ), + ) + + # Create a DSM sink with DLR approach + sinkdsm_dlr = solph.components.experimental.SinkDSM( + label="demand_dsm_dlr", + inputs={bel: solph.flows.Flow()}, + demand=[1] * len(timeindex), + capacity_up=[0.5] * len(timeindex), + capacity_down=[0.5] * len(timeindex), + approach="DLR", + max_demand=[1] * len(timeindex), + delay_time=2, + shift_time=1, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + shed_eligibility=True, + recovery_time_shed=2, + shed_time=2, + n_yearLimit_shed=50, + investment=solph.Investment( + ep_costs=100, + minimum=33, + maximum=100, + lifetime=20, + fixed_costs=20, + overall_maximum=1000, + overall_minimum=5, + ), + ) + + # Create a DSM sink with oemof approach + sinkdsm_oemof = solph.components.experimental.SinkDSM( + label="demand_dsm_oemof", + inputs={bel: solph.flows.Flow()}, + demand=[1] * len(timeindex), + capacity_up=[0.5] * len(timeindex), + capacity_down=[0.5] * len(timeindex), + approach="oemof", + max_demand=[1] * len(timeindex), + shift_interval=2, + cost_dsm_down_shift=1, + cost_dsm_up=1, + cost_dsm_down_shed=100, + shed_eligibility=True, + recovery_time_shed=2, + shed_time=2, + investment=solph.Investment( + ep_costs=100, + existing=50, + minimum=33, + maximum=100, + age=1, + lifetime=20, + fixed_costs=20, + overall_maximum=1000, + overall_minimum=5, + ), + ) + + # Add components to the energy system + es.add(bel, storage, sinkdsm_diw, sinkdsm_dlr, sinkdsm_oemof) + + # Create an optimization problem + om = solph.Model(es) + + # Compare the lp files + self.compare_lp_files("multi_period_period_length.lp", my_om=om) diff --git a/tests/test_components.py b/tests/test_components.py index eaf5c5575..cde311415 100644 --- a/tests/test_components.py +++ b/tests/test_components.py @@ -45,7 +45,10 @@ def test_generic_storage_1(): def test_generic_storage_2(): """Nominal value defined with investment model.""" bel = Bus() - with pytest.raises(AttributeError, match="If an investment object"): + with pytest.raises( + AttributeError, + match="For backward compatibility, the option investment overwrites", + ): components.GenericStorage( label="storage3", nominal_storage_capacity=45, @@ -116,7 +119,7 @@ def test_generic_storage_with_non_convex_investment(): def test_generic_storage_with_non_convex_invest_maximum(): """No investment maximum at nonconvex investment.""" with pytest.raises( - AttributeError, match=r"Please provide an maximum investment value" + AttributeError, match=r"Please provide a maximum investment value" ): bel = Bus() components.GenericStorage( @@ -190,89 +193,122 @@ def test_generic_storage_too_many_outputs(): ) -# ********* OffsetTransformer ********* +# ********* OffsetConverter ********* -def test_offsettransformer_wrong_flow_type(): - """No NonConvexFlow for Inflow defined.""" +def test_offsetconverter_without_nonconvex(): + """No NonConvex attribute is defined for the output flow.""" with pytest.raises( - TypeError, match=r"Input flows must have NonConvex attribute!" + TypeError, match="Output flow must have the `NonConvex` attribute!" ): - bus = Bus(label="Bus") - components.OffsetTransformer( - label="gasboiler", - inputs={bus: Flow()}, - outputs={bus: Flow(nonconvex=NonConvex())}, - coefficients=(-17, 0.9), + b_el = Bus(label="bus_electricity") + components.OffsetConverter( + label="diesel_genset", + inputs={b_el: Flow()}, + outputs={b_el: Flow()}, + coefficients=(2.5, 0.5), + ) + + +def test_offsetconverter_nonconvex_on_inputs(): + """NonConvex attribute is defined for the input flow.""" + with pytest.raises( + TypeError, + match="`NonConvex` attribute must be defined only for the output " + + "flow!", + ): + b_diesel = Bus(label="bus_diesel") + components.OffsetConverter( + inputs={b_diesel: Flow(nonconvex=NonConvex())}, + outputs={b_diesel: Flow(nonconvex=NonConvex())}, + coefficients=(2.5, 0.5), ) -def test_offsettransformer_not_enough_coefficients(): +def test_offsetconverter_investment_on_inputs(): + """Investment attribute is defined for the input flow.""" + with pytest.raises( + TypeError, + match="`Investment` attribute must be defined only for the output " + + "flow!", + ): + b_diesel = Bus(label="bus_diesel") + components.OffsetConverter( + inputs={b_diesel: Flow(investment=Investment())}, + outputs={ + b_diesel: Flow( + nonconvex=NonConvex(), investment=Investment(maximum=1) + ) + }, + coefficients=(2.5, 0.5), + ) + + +def test_offsetconverter_not_enough_coefficients(): with pytest.raises( ValueError, - match=r"Two coefficients or coefficient series have to be given.", + match="Two coefficients or coefficient series have to be given.", ): bus = Bus(label="Bus") - components.OffsetTransformer( + components.OffsetConverter( label="of1", - inputs={bus: Flow(nonconvex=NonConvex())}, + inputs={bus: Flow()}, outputs={bus: Flow(nonconvex=NonConvex())}, coefficients=([1, 4, 7]), ) -def test_offsettransformer_too_many_coefficients(): +def test_offsetconverter_too_many_coefficients(): with pytest.raises( ValueError, - match=r"Two coefficients or coefficient series have to be given.", + match="Two coefficients or coefficient series have to be given.", ): bus = Bus(label="Bus") - components.OffsetTransformer( + components.OffsetConverter( label="of2", - inputs={bus: Flow(nonconvex=NonConvex())}, + inputs={bus: Flow()}, outputs={bus: Flow(nonconvex=NonConvex())}, coefficients=(1, 4, 7), ) -def test_offsettransformer__too_many_input_flows(): +def test_offsetconverter__too_many_input_flows(): """Too many Input Flows defined.""" with pytest.raises( - ValueError, match=r"OffsetTransformer` must not have more than 1" + ValueError, + match="Component `OffsetConverter` must not have more than 1 input " + + "and 1 output!", ): - bgas = Bus(label="GasBus") - bcoal = Bus(label="CoalBus") - components.OffsetTransformer( - label="ostf_2_in", + b_gas = Bus(label="bus_gas") + b_coal = Bus(label="bus_coal") + components.OffsetConverter( inputs={ - bgas: Flow( - nominal_value=60, min=0.5, max=1.0, nonconvex=NonConvex() - ), - bcoal: Flow( - nominal_value=30, min=0.3, max=1.0, nonconvex=NonConvex() - ), + b_gas: Flow(), + b_coal: Flow(), }, - outputs={bcoal: Flow(nonconvex=NonConvex())}, + outputs={b_coal: Flow(nonconvex=NonConvex())}, coefficients=(20, 0.5), ) -def test_offsettransformer_too_many_output_flows(): +def test_offsetconverter_too_many_output_flows(): """Too many Output Flows defined.""" with pytest.raises( - ValueError, match="OffsetTransformer` must not have more than 1" + ValueError, + match="Component `OffsetConverter` must not have more than 1 input " + + "and 1 output!", ): - bm1 = Bus(label="my_offset_Bus1") - bm2 = Bus(label="my_offset_Bus2") + b_el = Bus(label="bus_electricity") + b_th = Bus(label="bus_thermal") - components.OffsetTransformer( - label="ostf_2_out", + components.OffsetConverter( inputs={ - bm1: Flow( - nominal_value=60, min=0.5, max=1.0, nonconvex=NonConvex() - ) + b_el: Flow(), + }, + outputs={ + b_el: Flow(nonconvex=NonConvex()), + b_th: Flow(nonconvex=NonConvex()), }, - outputs={bm1: Flow(), bm2: Flow()}, coefficients=(20, 0.5), ) diff --git a/tests/test_constraints_module.py b/tests/test_constraints_module.py index cf202d677..09f461525 100644 --- a/tests/test_constraints_module.py +++ b/tests/test_constraints_module.py @@ -31,7 +31,7 @@ def test_something_else(): bel2 = solph.buses.Bus(label="electricity2") energysystem.add(bel1, bel2) energysystem.add( - solph.components.Transformer( + solph.components.Converter( label="powerline_1_2", inputs={bel1: solph.flows.Flow()}, outputs={ @@ -42,7 +42,7 @@ def test_something_else(): ) ) energysystem.add( - solph.components.Transformer( + solph.components.Converter( label="powerline_2_1", inputs={bel2: solph.flows.Flow()}, outputs={ @@ -57,7 +57,7 @@ def test_something_else(): line21 = energysystem.groups["powerline_2_1"] solph.constraints.equate_variables( om, - om.InvestmentFlowBlock.invest[line12, bel2], - om.InvestmentFlowBlock.invest[line21, bel1], + om.InvestmentFlowBlock.invest[line12, bel2, 0], + om.InvestmentFlowBlock.invest[line21, bel1, 0], name="my_name", ) diff --git a/tests/test_energy_system.py b/tests/test_energy_system.py new file mode 100644 index 000000000..574d5cf9f --- /dev/null +++ b/tests/test_energy_system.py @@ -0,0 +1,46 @@ +"""Tests of the _energy_system module. + +This file is part of project oemof (github.com/oemof/oemof). It's copyrighted +by the contributors recorded in the version control history of the file, +available from its original location oemof/tests/test_components.py + +SPDX-License-Identifier: MIT +""" + +import pandas as pd + +from oemof.solph import EnergySystem + + +def test_add_periods(): + """test method _add_periods of energy system""" + timeindex = pd.date_range(start="2012-01-01", periods=10000, freq="H") + periods = [ + pd.date_range(start="2012-01-01", periods=8784, freq="H"), + pd.date_range(start="2013-01-01", periods=1217, freq="H"), + ] + es = EnergySystem(timeindex=timeindex, periods=periods) + assert len(es.periods) == 2 + assert es.periods[0].equals( + pd.date_range(start="2012-01-01", periods=8784, freq="H") + ) + assert es.periods[1].equals( + pd.date_range(start="2013-01-01", periods=1217, freq="H") + ) + + +def test_extract_periods_years(): + """test method _extract_periods_years of energy system""" + t_idx_1 = pd.date_range("1/1/2020", periods=3, freq="H").to_series() + t_idx_2 = pd.date_range("1/1/2041", periods=3, freq="H").to_series() + t_idx_3 = pd.date_range("1/1/2050", periods=3, freq="H").to_series() + timeindex = pd.concat([t_idx_1, t_idx_2, t_idx_3]).index + periods = [t_idx_1, t_idx_2, t_idx_3] + es = EnergySystem( + timeindex=timeindex, + timeincrement=[1] * len(timeindex), + infer_last_interval=False, + periods=periods, + ) + periods_years = [0, 21, 30] + assert es.periods_years == periods_years diff --git a/tests/test_models.py b/tests/test_models.py index ad2fc9eee..d42f4252f 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -11,6 +11,7 @@ import warnings +import pandas as pd import pytest from oemof import solph @@ -65,3 +66,106 @@ def test_infeasible_model(): m.solve(solver="cbc") assert "Optimization ended with status" in str(w[0].message) solph.processing.meta_results(m) + + +def test_multi_period_default_discount_rate(): + """Test error being thrown for default multi-period discount rate""" + warnings.filterwarnings("ignore", category=FutureWarning) + timeindex = pd.date_range(start="2017-01-01", periods=100, freq="D") + es = solph.EnergySystem(timeindex=timeindex, periods={0: timeindex}) + bel = solph.buses.Bus(label="bus") + es.add(bel) + es.add( + solph.components.Sink( + label="sink", + inputs={ + bel: solph.flows.Flow( + nominal_value=5, fix=[1] * len(timeindex) + ) + }, + ) + ) + es.add( + solph.components.Source( + label="source", + outputs={bel: solph.flows.Flow(nominal_value=4, variable_costs=5)}, + ) + ) + msg = ( + "By default, a discount_rate of 0.02 is used for a multi-period model." + ) + with warnings.catch_warnings(record=True) as w: + solph.Model(es) + assert msg in str(w[0].message) + + +def test_cellular_structure_detection(): + """Test flag creation if list is passed as energysystem to model""" + timeindex = pd.date_range(start="2020-01-01", periods=1, freq="H") + es = solph.EnergySystem( + label="es", timeindex=timeindex, infer_last_interval=True + ) + ec_1 = solph.EnergySystem( + label="ec_1", timeindex=timeindex, infer_last_interval=True + ) + ec_2 = solph.EnergySystem( + label="ec_2", timeindex=timeindex, infer_last_interval=True + ) + m = solph.Model(energysystem=[es, ec_1, ec_2]) + assert m.is_cellular + + +def test_sub_cell_node_consideration(): + """ + Test if the nodes of sub-cells are considered for cellular + energysystems. + """ + timeindex = pd.date_range(start="2020-01-01", periods=1, freq="H") + es = solph.EnergySystem( + label="es", timeindex=timeindex, infer_last_interval=True + ) + ec_1 = solph.EnergySystem( + label="ec_1", timeindex=timeindex, infer_last_interval=True + ) + bus_es = solph.buses.Bus(label="bus_es") + bus_ec_1 = solph.buses.Bus(label="bus_ec_1") + es.add(bus_es) + ec_1.add(bus_ec_1) + m = solph.Model(energysystem=[es, ec_1]) + assert bus_ec_1 in m.nodes + + +def test_sub_cell_flow_consideration(): + """ + Test if the flows of sub-cells are considered for cellular + energysystems. + """ + timeindex = pd.date_range(start="2020-01-01", periods=1, freq="H") + es = solph.EnergySystem( + label="es", timeindex=timeindex, infer_last_interval=True + ) + ec_1 = solph.EnergySystem( + label="ec_1", timeindex=timeindex, infer_last_interval=True + ) + bus_es = solph.buses.Bus(label="bus_es") + bus_ec_1 = solph.buses.Bus(label="bus_ec_1") + es.add(bus_es) + ec_1.add(bus_ec_1) + + connector_ec_1 = solph.buses.Bus( + label="connector_ec_1", + inputs={ + bus_es: solph.flows.Flow(), + bus_ec_1: solph.flows.Flow(), + }, + outputs={ + bus_es: solph.flows.Flow(), + bus_ec_1: solph.flows.Flow(), + }, + ) + es.add(connector_ec_1) + + test_flow = [io for io in ec_1.flows().keys()][0] + + m = solph.Model(energysystem=[es, ec_1]) + assert test_flow in m.FLOWS diff --git a/tests/test_non_equidistant_time_index.py b/tests/test_non_equidistant_time_index.py index eb6e34783..488e826ef 100644 --- a/tests/test_non_equidistant_time_index.py +++ b/tests/test_non_equidistant_time_index.py @@ -34,7 +34,7 @@ def setup_class(cls): es.add(b_el1, b_diesel) # TEST DIESEL: - dg = cmp.Transformer( + dg = cmp.Converter( label="diesel_generator", inputs={b_diesel: flows.Flow(variable_costs=2)}, outputs={ diff --git a/tests/test_oemof_installation_test.py b/tests/test_oemof_installation_test.py new file mode 100644 index 000000000..9b4e8acd8 --- /dev/null +++ b/tests/test_oemof_installation_test.py @@ -0,0 +1,6 @@ +import subprocess + + +def test_oemof_installation_test_runs_without_errors(): + completed_process = subprocess.run(["oemof_installation_test"]) + assert completed_process.returncode == 0 diff --git a/tests/test_options.py b/tests/test_options.py new file mode 100644 index 000000000..c209c5e79 --- /dev/null +++ b/tests/test_options.py @@ -0,0 +1,18 @@ +"""Tests of the _options module. + +This file is part of project oemof (github.com/oemof/oemof). It's copyrighted +by the contributors recorded in the version control history of the file, +available from its original location oemof/tests/test_components.py + +SPDX-License-Identifier: MIT +""" +import pytest + +from oemof import solph + + +def test_check_age_and_lifetime(): + """Check error being thrown if age > lifetime""" + msg = "A unit's age must be smaller than its expected lifetime." + with pytest.raises(AttributeError, match=msg): + solph.components.Sink(investment=solph.Investment(age=41, lifetime=40)) diff --git a/tests/test_outputlib/__init__.py b/tests/test_outputlib/__init__.py index cb814b8fd..78f002380 100644 --- a/tests/test_outputlib/__init__.py +++ b/tests/test_outputlib/__init__.py @@ -5,9 +5,9 @@ from oemof.solph import EnergySystem from oemof.solph import Model from oemof.solph.buses import Bus +from oemof.solph.components import Converter from oemof.solph.components import Sink from oemof.solph.components import Source -from oemof.solph.components import Transformer from oemof.solph.flows import Flow filename = os.path.join(os.path.dirname(__file__), "input_data.csv") @@ -70,28 +70,28 @@ ) # power plants -pp_coal = Transformer( +pp_coal = Converter( label="pp_coal", inputs={bcoal: Flow()}, outputs={bel: Flow(nominal_value=20.2, variable_costs=25)}, conversion_factors={bel: 0.39}, ) -pp_lig = Transformer( +pp_lig = Converter( label="pp_lig", inputs={blig: Flow()}, outputs={bel: Flow(nominal_value=11.8, variable_costs=19)}, conversion_factors={bel: 0.41}, ) -pp_gas = Transformer( +pp_gas = Converter( label="pp_gas", inputs={bgas: Flow()}, outputs={bel: Flow(nominal_value=41, variable_costs=40)}, conversion_factors={bel: 0.50}, ) -pp_oil = Transformer( +pp_oil = Converter( label="pp_oil", inputs={boil: Flow()}, outputs={bel: Flow(nominal_value=5, variable_costs=50)}, @@ -99,7 +99,7 @@ ) # combined heat and power plant (chp) -pp_chp = Transformer( +pp_chp = Converter( label="pp_chp", inputs={bgas: Flow()}, outputs={ @@ -115,7 +115,7 @@ heat_source = Source(label="heat_source", outputs={b_heat_source: Flow()}) cop = 3 -heat_pump = Transformer( +heat_pump = Converter( label="heat_pump", inputs={bel: Flow(), b_heat_source: Flow()}, outputs={bth: Flow(nominal_value=10)}, diff --git a/tests/test_processing.py b/tests/test_processing.py index 98254a619..6cc68ccc2 100644 --- a/tests/test_processing.py +++ b/tests/test_processing.py @@ -20,9 +20,9 @@ from oemof.solph import processing from oemof.solph import views from oemof.solph.buses import Bus +from oemof.solph.components import Converter from oemof.solph.components import GenericStorage from oemof.solph.components import Sink -from oemof.solph.components import Transformer from oemof.solph.flows import Flow @@ -43,7 +43,7 @@ def setup_class(cls): cls.es.add(b_el1, b_el2, b_diesel) # TEST DIESEL: - dg = Transformer( + dg = Converter( label="diesel", inputs={b_diesel: Flow(variable_costs=2)}, outputs={ @@ -116,7 +116,9 @@ def test_flows_without_none_exclusion(self): param_results = processing.parameter_as_dict( self.es, exclude_none=False ) - scalar_attributes = { + default_attributes = { + "age": None, + "lifetime": None, "integer": False, "investment": None, "nominal_value": 1, @@ -129,13 +131,14 @@ def test_flows_without_none_exclusion(self): "negative_gradient_limit": None, "positive_gradient_limit": None, "variable_costs": 0, + "fixed_costs": None, "flow": None, "values": None, "label": str(b_el2.outputs[demand].label), } assert_series_equal( param_results[(b_el2, demand)]["scalars"].sort_index(), - pandas.Series(scalar_attributes).sort_index(), + pandas.Series(default_attributes).sort_index(), ) sequences_attributes = { "fix": self.demand_values, @@ -160,13 +163,17 @@ def test_nodes_with_none_exclusion(self): "initial_storage_level": 0, "invest_relation_input_capacity": 1 / 6, "invest_relation_output_capacity": 1 / 6, - "investment_ep_costs": 0.4, + "investment_age": 0, "investment_existing": 0, + "investment_interest_rate": 0, + "investment_nonconvex": False, + "investment_ep_costs": 0.4, "investment_maximum": float("inf"), "investment_minimum": 0, "investment_nonconvex": False, "investment_offset": 0, "label": "storage", + "fixed_costs": 0, "fixed_losses_absolute": 0, "fixed_losses_relative": 0, "inflow_conversion_factor": 1, @@ -196,13 +203,17 @@ def test_nodes_with_none_exclusion_old_name(self): "initial_storage_level": 0, "invest_relation_input_capacity": 1 / 6, "invest_relation_output_capacity": 1 / 6, - "investment_ep_costs": 0.4, + "investment_age": 0, "investment_existing": 0, + "investment_interest_rate": 0, + "investment_nonconvex": False, + "investment_ep_costs": 0.4, "investment_maximum": float("inf"), "investment_minimum": 0, "investment_nonconvex": False, "investment_offset": 0, "label": "storage", + "fixed_costs": 0, "fixed_losses_absolute": 0, "fixed_losses_relative": 0, "inflow_conversion_factor": 1, @@ -276,7 +287,7 @@ def test_multiindex_sequences(self): def test_error_from_nan_values(self): trsf = self.es.groups["diesel"] bus = self.es.groups["b_el1"] - self.mod.flow[trsf, bus, 5] = float("nan") + self.mod.flow[trsf, bus, 0, 5] = float("nan") with pytest.raises(ValueError): processing.results(self.mod) @@ -290,17 +301,17 @@ def test_node_weight_by_type(self): storage_content = views.node_weight_by_type( results, node_type=GenericStorage ) - assert round(float(storage_content.sum()), 6) == 1437.500003 + assert round(float(storage_content.sum()), 1) == 1437.5 def test_output_by_type_view(self): results = processing.results(self.om) - transformer_output = views.node_output_by_type( - results, node_type=Transformer + converter_output = views.node_output_by_type( + results, node_type=Converter ) compare = views.node(results, "diesel", multiindex=True)["sequences"][ ("diesel", "b_el1", "flow") ] - assert int(transformer_output.sum()) == int(compare.sum()) + assert int(converter_output.sum()) == int(compare.sum()) def test_input_by_type_view(self): results = processing.results(self.om) diff --git a/tests/test_scripts/test_solph/test_connect_invest/test_connect_invest.py b/tests/test_scripts/test_solph/test_connect_invest/test_connect_invest.py index a4d7a8b78..91637d424 100644 --- a/tests/test_scripts/test_solph/test_connect_invest/test_connect_invest.py +++ b/tests/test_scripts/test_solph/test_connect_invest/test_connect_invest.py @@ -82,14 +82,14 @@ def test_connect_invest(): ) es.add(storage) - line12 = components.Transformer( + line12 = components.Converter( label="line12", inputs={bel1: Flow()}, outputs={bel2: Flow(investment=Investment(ep_costs=20))}, ) es.add(line12) - line21 = components.Transformer( + line21 = components.Converter( label="line21", inputs={bel2: Flow()}, outputs={bel1: Flow(investment=Investment(ep_costs=20))}, @@ -100,26 +100,34 @@ def test_connect_invest(): constraints.equate_variables( om, - om.InvestmentFlowBlock.invest[line12, bel2], - om.InvestmentFlowBlock.invest[line21, bel1], + om.InvestmentFlowBlock.invest[line12, bel2, 0], + om.InvestmentFlowBlock.invest[line21, bel1, 0], 2, ) constraints.equate_variables( om, - om.InvestmentFlowBlock.invest[line12, bel2], - om.GenericInvestmentStorageBlock.invest[storage], + om.InvestmentFlowBlock.invest[line12, bel2, 0], + om.GenericInvestmentStorageBlock.invest[storage, 0], ) # if tee_switch is true solver messages will be displayed logging.info("Solve the optimization problem") - om.solve(solver="cbc") + om.solve(solver="cbc", tee=True) # check if the new result object is working for custom components results = processing.results(om) my_results = dict() - my_results["line12"] = float(views.node(results, "line12")["scalars"]) - my_results["line21"] = float(views.node(results, "line21")["scalars"]) + my_results["line12"] = float( + views.node(results, "line12")["scalars"].loc[ + [(("line12", "electricity2"), "invest")] + ] + ) + my_results["line21"] = float( + views.node(results, "line21")["scalars"].loc[ + [(("line21", "electricity1"), "invest")] + ] + ) stor_res = views.node(results, "storage")["scalars"] my_results["storage_in"] = stor_res[ [(("electricity1", "storage"), "invest")] diff --git a/tests/test_scripts/test_solph/test_flexible_modelling/test_add_constraints.py b/tests/test_scripts/test_solph/test_flexible_modelling/test_add_constraints.py index d027dc9ce..7dfd74a12 100644 --- a/tests/test_scripts/test_solph/test_flexible_modelling/test_add_constraints.py +++ b/tests/test_scripts/test_solph/test_flexible_modelling/test_add_constraints.py @@ -45,15 +45,16 @@ def test_add_constraints_example(solver="cbc", nologg=False): inputs={b_el: Flow(nominal_value=40, fix=[0.5, 0.4, 0.3, 1])}, ) ) - pp_oil = components.Transformer( + pp_oil = components.Converter( label="pp_oil", inputs={boil: Flow()}, outputs={b_el: Flow(nominal_value=50, variable_costs=25)}, conversion_factors={b_el: 0.39}, ) + es.add(pp_oil) es.add( - components.Transformer( + components.Converter( label="pp_lig", inputs={blig: Flow()}, outputs={b_el: Flow(nominal_value=50, variable_costs=10)}, @@ -98,26 +99,26 @@ def test_add_constraints_example(solver="cbc", nologg=False): # add the sub-model to the oemof Model instance om.add_component("MyBlock", myblock) - def _inflow_share_rule(m, si, e, ti): + def _inflow_share_rule(m, si, e, p, ti): """pyomo rule definition: Here we can use all objects from the block or the om object, in this case we don't need anything from the block except the newly defined set MYFLOWS. """ - expr = om.flow[si, e, ti] >= om.flows[si, e].outflow_share[ti] * sum( - om.flow[i, o, ti] for (i, o) in om.FLOWS if o == e - ) + expr = om.flow[si, e, p, ti] >= om.flows[si, e].outflow_share[ + ti + ] * sum(om.flow[i, o, p, ti] for (i, o) in om.FLOWS if o == e) return expr myblock.inflow_share = po.Constraint( - myblock.MYFLOWS, om.TIMESTEPS, rule=_inflow_share_rule + myblock.MYFLOWS, om.TIMEINDEX, rule=_inflow_share_rule ) # add emission constraint myblock.emission_constr = po.Constraint( expr=( sum( - om.flow[i, o, t] + om.flow[i, o, p, t] for (i, o) in myblock.COMMODITYFLOWS - for t in om.TIMESTEPS + for p, t in om.TIMEINDEX ) <= emission_limit ) diff --git a/tests/test_scripts/test_solph/test_multi_period_model/test_multi_period_dispatch_model.py b/tests/test_scripts/test_solph/test_multi_period_model/test_multi_period_dispatch_model.py new file mode 100644 index 000000000..0d2ffec5c --- /dev/null +++ b/tests/test_scripts/test_solph/test_multi_period_model/test_multi_period_dispatch_model.py @@ -0,0 +1,306 @@ +""" +Test for creating an multi-period dispatch optimization model + +Create an energy system consisting of the following fleets +- lignite +- hardcoal +- CCGT +- GT +- Wind +- GenericStorage unit +- SinkDSM unit +for Germany + +Add wind source and demand sink for FR and links for exchange. +""" + +import pandas as pd + +from oemof.solph import EnergySystem +from oemof.solph import Model +from oemof.solph import buses +from oemof.solph import components +from oemof.solph import flows +from oemof.solph import processing +from oemof.solph import views + + +def test_multi_period_dispatch_model(solver="cbc"): + """Test a simple multi_period dispatch model""" + + t_idx_1 = pd.date_range("1/1/2020", periods=3, freq="H") + t_idx_2 = pd.date_range("1/1/2030", periods=3, freq="H") + t_idx_3 = pd.date_range("1/1/2040", periods=3, freq="H") + + # Create an overall timeindex + t_idx_1_series = pd.Series(index=t_idx_1, dtype="float64") + t_idx_2_series = pd.Series(index=t_idx_2, dtype="float64") + t_idx_3_series = pd.Series(index=t_idx_3, dtype="float64") + + timeindex = pd.concat( + [t_idx_1_series, t_idx_2_series, t_idx_3_series] + ).index + periods = [t_idx_1, t_idx_2, t_idx_3] + + es = EnergySystem( + timeindex=timeindex, + timeincrement=[1] * len(timeindex), + periods=periods, + infer_last_interval=False, + ) + + # Create buses + bus_lignite = buses.Bus(label="DE_bus_lignite", balanced=True) + bus_hardcoal = buses.Bus(label="DE_bus_hardcoal", balanced=True) + bus_natgas = buses.Bus(label="DE_bus_natgas", balanced=True) + bus_el = buses.Bus(label="DE_bus_el", balanced=True) + bus_el_fr = buses.Bus(label="FR_bus_el", balanced=True) + + # Create sources + source_lignite = components.Source( + label="DE_source_lignite", + outputs={bus_lignite: flows.Flow(variable_costs=5)}, + ) + source_hardcoal = components.Source( + label="DE_source_hardcoal", + outputs={bus_hardcoal: flows.Flow(variable_costs=10)}, + ) + source_natgas = components.Source( + label="DE_source_natgas", + outputs={bus_natgas: flows.Flow(variable_costs=20)}, + ) + source_wind = components.Source( + label="DE_source_wind", + outputs={ + bus_el: flows.Flow( + variable_costs=0, + fix=[110] + [90] * (len(timeindex) - 1), + nominal_value=1, + ) + }, + ) + source_shortage = components.Source( + label="DE_source_shortage", + outputs={bus_el: flows.Flow(variable_costs=1e10, nominal_value=1e10)}, + ) + source_wind_fr = components.Source( + label="FR_source_wind", + outputs={ + bus_el_fr: flows.Flow( + variable_costs=0, + fix=[45] * len(timeindex), + nominal_value=1, + ) + }, + ) + source_shortage_fr = components.Source( + label="FR_source_shortage", + outputs={ + bus_el_fr: flows.Flow(variable_costs=1e10, nominal_value=1e10) + }, + ) + + # Create sinks + sink_el = components.Sink( + label="DE_sink_el", + inputs={ + bus_el: flows.Flow(fix=[80] * len(timeindex), nominal_value=1) + }, + ) + sink_excess = components.Sink( + label="DE_sink_excess", + inputs={bus_el: flows.Flow(variable_costs=1e10, nominal_value=1e10)}, + ) + sink_el_fr = components.Sink( + label="FR_sink_el", + inputs={ + bus_el_fr: flows.Flow(fix=[50] * len(timeindex), nominal_value=1) + }, + ) + sink_excess_fr = components.Sink( + label="FR_sink_excess", + inputs={bus_el_fr: flows.Flow(variable_costs=1e3, nominal_value=1e10)}, + ) + + # Create converters + pp_lignite = components.Converter( + label="DE_pp_lignite", + inputs={bus_lignite: flows.Flow()}, + outputs={bus_el: flows.Flow(nominal_value=100, variable_costs=1)}, + conversion_factors={bus_el: 0.38}, + ) + + pp_hardcoal = components.Converter( + label="DE_pp_hardcoal", + inputs={bus_hardcoal: flows.Flow()}, + outputs={bus_el: flows.Flow(nominal_value=100, variable_costs=2)}, + conversion_factors={bus_el: 0.45}, + ) + + pp_natgas_ccgt = components.Converter( + label="DE_pp_natgas_CCGT", + inputs={bus_natgas: flows.Flow()}, + outputs={ + bus_el: flows.Flow( + nominal_value=100, + variable_costs=3, + ) + }, + conversion_factors={bus_el: 0.6}, + ) + + pp_natgas_gt = components.Converter( + label="DE_pp_natgas_GT", + inputs={bus_natgas: flows.Flow()}, + outputs={ + bus_el: flows.Flow( + nominal_value=100, + variable_costs=4, + ) + }, + conversion_factors={bus_el: 0.4}, + ) + + storage_el = components.GenericStorage( + label="DE_storage_el", + inputs={bus_el: flows.Flow(nominal_value=20, variable_costs=0, max=1)}, + outputs={ + bus_el: flows.Flow(nominal_value=20, variable_costs=0, max=1) + }, + nominal_storage_capacity=20, + loss_rate=0, + initial_storage_level=0, + max_storage_level=1, + min_storage_level=0, + inflow_conversion_factor=1, + outflow_conversion_factor=1, + balanced=True, + fixed_costs=10, + ) + + link_de_fr = components.Link( + label="link_DE_FR", + inputs={ + bus_el: flows.Flow(nominal_value=10), + bus_el_fr: flows.Flow(nominal_value=10), + }, + outputs={ + bus_el_fr: flows.Flow(), + bus_el: flows.Flow(), + }, + conversion_factors={ + (bus_el, bus_el_fr): 0.999999, + (bus_el_fr, bus_el): 0.999999, + }, + ) + + # Parameterize and create SinkDSM + approach = "DLR" + + kwargs_all = { + "label": "demand_dsm", + "inputs": {bus_el: flows.Flow(variable_costs=0)}, + "demand": [1] * len(timeindex), + "capacity_up": [1] * len(timeindex), + "capacity_down": [1] * len(timeindex), + "delay_time": 4, + "shed_time": 2, + "recovery_time_shift": 0, + "recovery_time_shed": 24, + "cost_dsm_up": 0.01, + "cost_dsm_down_shift": 0.01, + "cost_dsm_down_shed": 1000, + "efficiency": 1.0, + "shed_eligibility": False, + "shift_eligibility": True, + "max_demand": 20, + "max_capacity_down": 10, + "max_capacity_up": 10, + "shift_time": 2, + } + + kwargs_dict = { + "oemof": {"shift_interval": 24}, + "DIW": {}, + "DLR": { + "ActivateYearLimit": True, + "ActivateDayLimit": True, + "n_yearLimit_shift": 2, + "n_yearLimit_shed": 10, + "t_dayLimit": 2, + "addition": True, + "fixes": True, + }, + } + + dsm_unit = components.experimental.SinkDSM( + **kwargs_all, + approach=approach, + **kwargs_dict[approach], + ) + + es.add( + source_lignite, + source_hardcoal, + source_natgas, + source_wind, + source_shortage, + bus_lignite, + bus_hardcoal, + bus_natgas, + bus_el, + pp_lignite, + pp_hardcoal, + pp_natgas_ccgt, + pp_natgas_gt, + sink_el, + sink_excess, + storage_el, + source_wind_fr, + source_shortage_fr, + bus_el_fr, + sink_el_fr, + sink_excess_fr, + link_de_fr, + dsm_unit, + ) + + om = Model(es, discount_rate=0.02) + om.solve(solver=solver) + + results = processing.results(om) + test_results = { + "DE_source_lignite": 303, + "DE_source_hardcoal": 0, + "DE_source_natgas": 0, + "DE_source_wind": 830, + "DE_source_shortage": 0, + "DE_bus_lignite": 606, + "DE_bus_hardcoal": 0, + "DE_bus_natgas": 0, + "DE_bus_el": 1900, + "DE_pp_lignite": 418, + "DE_pp_hardcoal": 0, + "DE_pp_natgas_CCGT": 0, + "DE_pp_natgas_GT": 0, + "DE_sink_el": 720, + "DE_sink_excess": 0, + "DE_storage_el": 15, + "FR_source_wind": 405, + "FR_source_shortage": 0, + "FR_bus_el": 900, + "FR_sink_el": 450, + "FR_sink_excess": 0, + "link_DE_FR": 90, + "demand_dsm": 320, + } + + for key in test_results.keys(): + assert ( + int( + views.node(results, key)["sequences"] + .sum(axis=0) + .round(0) + .sum() + ) + ) == test_results[key] diff --git a/tests/test_scripts/test_solph/test_multi_period_model/test_multi_period_investment_model.py b/tests/test_scripts/test_solph/test_multi_period_model/test_multi_period_investment_model.py new file mode 100644 index 000000000..1c6d4ca63 --- /dev/null +++ b/tests/test_scripts/test_solph/test_multi_period_model/test_multi_period_investment_model.py @@ -0,0 +1,404 @@ +""" +Test for creating an multi-period investment optimization model + +Create an energy system consisting of the following fleets +- lignite +- hardcoal +- CCGT +- GT +- Wind +- GenericStorage unit +- SinkDSM unit +for Germany + +Add wind source and demand sink for FR and links for exchange. +""" + +import pandas as pd + +from oemof.solph import EnergySystem +from oemof.solph import Model +from oemof.solph import _options +from oemof.solph import buses +from oemof.solph import components +from oemof.solph import flows +from oemof.solph import processing +from oemof.solph import views + + +def test_multi_period_investment_model(solver="cbc"): + """Test a simple multi_period investment model + for multiple SinkDSM approaches""" + + for approach in ["oemof", "DLR", "DIW"]: + t_idx_1 = pd.date_range("1/1/2020", periods=3, freq="H") + t_idx_2 = pd.date_range("1/1/2030", periods=3, freq="H") + t_idx_3 = pd.date_range("1/1/2040", periods=3, freq="H") + + # Create an overall timeindex + t_idx_1_series = pd.Series(index=t_idx_1, dtype="float64") + t_idx_2_series = pd.Series(index=t_idx_2, dtype="float64") + t_idx_3_series = pd.Series(index=t_idx_3, dtype="float64") + + timeindex = pd.concat( + [t_idx_1_series, t_idx_2_series, t_idx_3_series] + ).index + periods = [t_idx_1, t_idx_2, t_idx_3] + + es = EnergySystem( + timeindex=timeindex, + timeincrement=[1] * len(timeindex), + periods=periods, + infer_last_interval=False, + ) + + # Create buses + bus_lignite = buses.Bus(label="DE_bus_lignite", balanced=True) + bus_hardcoal = buses.Bus(label="DE_bus_hardcoal", balanced=True) + bus_natgas = buses.Bus(label="DE_bus_natgas", balanced=True) + bus_el = buses.Bus(label="DE_bus_el", balanced=True) + bus_el_FR = buses.Bus(label="FR_bus_el", balanced=True) + + # Create sources + source_lignite = components.Source( + label="DE_source_lignite", + outputs={bus_lignite: flows.Flow(variable_costs=5)}, + ) + source_hardcoal = components.Source( + label="DE_source_hardcoal", + outputs={bus_hardcoal: flows.Flow(variable_costs=10)}, + ) + source_natgas = components.Source( + label="DE_source_natgas", + outputs={bus_natgas: flows.Flow(variable_costs=20)}, + ) + source_wind = components.Source( + label="DE_source_wind", + outputs={ + bus_el: flows.Flow( + variable_costs=0, + fix=[110] + [90] * (len(timeindex) - 1), + nominal_value=1, + ) + }, + ) + source_shortage = components.Source( + label="DE_source_shortage", + outputs={ + bus_el: flows.Flow(variable_costs=1e10, nominal_value=1e10) + }, + ) + source_wind_FR = components.Source( + label="FR_source_wind", + outputs={ + bus_el_FR: flows.Flow( + variable_costs=0, + fix=[45] * len(timeindex), + nominal_value=1, + ) + }, + ) + source_shortage_FR = components.Source( + label="FR_source_shortage", + outputs={ + bus_el_FR: flows.Flow(variable_costs=1e10, nominal_value=1e10) + }, + ) + + # Create sinks + sink_el = components.Sink( + label="DE_sink_el", + inputs={ + bus_el: flows.Flow(fix=[80] * len(timeindex), nominal_value=1) + }, + ) + sink_excess = components.Sink( + label="DE_sink_excess", + inputs={ + bus_el: flows.Flow(variable_costs=1e10, nominal_value=1e10) + }, + ) + sink_el_FR = components.Sink( + label="FR_sink_el", + inputs={ + bus_el_FR: flows.Flow( + fix=[50] * len(timeindex), nominal_value=1 + ) + }, + ) + sink_excess_FR = components.Sink( + label="FR_sink_excess", + inputs={ + bus_el_FR: flows.Flow(variable_costs=1e3, nominal_value=1e10) + }, + ) + + # Create converters + pp_lignite = components.Converter( + label="DE_pp_lignite", + inputs={bus_lignite: flows.Flow()}, + outputs={ + bus_el: flows.Flow( + investment=_options.Investment( + maximum=1000, + ep_costs=2e6, + existing=0, + lifetime=20, + age=0, + interest_rate=0.02, + ), + variable_costs=1, + ) + }, + conversion_factors={bus_el: 0.38}, + ) + + pp_hardcoal = components.Converter( + label="DE_pp_hardcoal", + inputs={bus_hardcoal: flows.Flow()}, # )}, + outputs={ + bus_el: flows.Flow( + investment=_options.Investment( + maximum=1000, + ep_costs=1.6e6, + existing=0, + lifetime=20, + age=0, + interest_rate=0.02, + ), + variable_costs=2, + ) + }, + conversion_factors={bus_el: 0.45}, + ) + + pp_natgas_CCGT = components.Converter( + label="DE_pp_natgas_CCGT", + inputs={bus_natgas: flows.Flow()}, # )}, + outputs={ + bus_el: flows.Flow( + investment=_options.Investment( + maximum=1000, + ep_costs=1e6, + existing=0, + lifetime=20, + age=0, + interest_rate=0.02, + ), + variable_costs=3, + ) + }, + conversion_factors={bus_el: 0.6}, + ) + + pp_natgas_GT = components.Converter( + label="DE_pp_natgas_GT", + inputs={bus_natgas: flows.Flow()}, # )}, + outputs={ + bus_el: flows.Flow( + investment=_options.Investment( + maximum=1000, + ep_costs=[0.6e6, 0.5e6, 0.8e6, 0.4e6], + existing=0, + lifetime=20, + age=0, + interest_rate=0.02, + fixed_costs=1000, + ), + variable_costs=4, + ) + }, + conversion_factors={bus_el: 0.4}, + ) + + storage_el = components.GenericStorage( + label="DE_storage_el", + inputs={ + bus_el: flows.Flow( + variable_costs=0, + max=1, + investment=_options.Investment( + maximum=20, + ep_costs=1000, + existing=10, + lifetime=2, + age=1, + interest_rate=0.02, + ), + ) + }, + outputs={ + bus_el: flows.Flow( + variable_costs=0, + max=1, + investment=_options.Investment( + maximum=20, + ep_costs=1000, + existing=10, + lifetime=2, + age=1, + interest_rate=0.02, + ), + ) + }, + loss_rate=0, + max_storage_level=1, + min_storage_level=0, + inflow_conversion_factor=1, + outflow_conversion_factor=1, + balanced=True, + invest_relation_input_output=1, + invest_relation_input_capacity=None, + invest_relation_output_capacity=None, + fixed_costs=10, + investment=_options.Investment( + maximum=20, + ep_costs=1000, + existing=10, + lifetime=2, + age=1, + interest_rate=0.02, + fixed_costs=10, + ), + ) + + link_DE_FR = components.Link( + label="link_DE_FR", + inputs={ + bus_el: flows.Flow( + nominal_value=10, + ), + bus_el_FR: flows.Flow( + nominal_value=10, + ), + }, + outputs={bus_el_FR: flows.Flow(), bus_el: flows.Flow()}, + conversion_factors={ + (bus_el, bus_el_FR): 0.999999, + (bus_el_FR, bus_el): 0.999999, + }, + ) + + kwargs_all = { + "label": "demand_dsm", + "inputs": { + bus_el: flows.Flow( + variable_costs=0, + ) + }, + "demand": [1] * len(timeindex), + "capacity_up": [1] * len(timeindex), + "capacity_down": [1] * len(timeindex), + "delay_time": 4, + "shed_time": 2, + "max_demand": [1] * len(es.periods), + "recovery_time_shift": 0, + "recovery_time_shed": 24, + "cost_dsm_up": 0.01, + "cost_dsm_down_shift": 0.01, + "cost_dsm_down_shed": 1000, + "efficiency": 1.0, + "shed_eligibility": False, + "shift_eligibility": True, + "shift_time": 2, + } + + kwargs_dict = { + "oemof": {"shift_interval": 24}, + "DIW": {}, + "DLR": { + "ActivateYearLimit": True, + "ActivateDayLimit": True, + "n_yearLimit_shift": 2, + "n_yearLimit_shed": 10, + "t_dayLimit": 2, + "addition": True, + "fixes": True, + }, + } + + dsm_unit = components.experimental.SinkDSM( + **kwargs_all, + approach=approach, + **kwargs_dict[approach], + investment=_options.Investment( + existing=10, + maximum=20, + ep_costs=10, + lifetime=2, + age=1, + interest_rate=0.02, + ), + ) + + es.add( + source_lignite, + source_hardcoal, + source_natgas, + source_wind, + source_shortage, + bus_lignite, + bus_hardcoal, + bus_natgas, + bus_el, + pp_lignite, + pp_hardcoal, + pp_natgas_CCGT, + pp_natgas_GT, + sink_el, + sink_excess, + storage_el, + source_wind_FR, + source_shortage_FR, + bus_el_FR, + sink_el_FR, + sink_excess_FR, + link_DE_FR, + dsm_unit, + ) + + om = Model(es, discount_rate=0.02) + om.receive_duals() + om.solve(solver=solver) + + results = processing.results(om) + test_results = { + "DE_bus_el": pd.Series( + { + "invest": 0, + "old": 20, + "old_end": 20, + "old_exo": 20, + "total": 20, + }, + name="variable_name", + ), + "demand_dsm": pd.Series( + { + "invest": 13, + "old": 10, + "old_end": 0, + "old_exo": 10, + "total": 37, + }, + name="variable_name", + ), + "DE_storage_el": pd.Series( + { + "invest": 0, + "old": 30, + "old_end": 0, + "old_exo": 30, + "total": 30, + }, + name="variable_name", + ), + } + + for key in test_results.keys(): + assert ( + views.node(results, key)["period_scalars"] + .sum(axis=0) + .round(0) + .convert_dtypes("int") + ).any() == test_results[key].any() diff --git a/tests/test_scripts/test_solph/test_piecewiselineartransformer/test_piecewiselineartransformer.py b/tests/test_scripts/test_solph/test_piecewiselineartransformer/test_piecewiselineartransformer.py index 2922a2296..89942bb6c 100644 --- a/tests/test_scripts/test_solph/test_piecewiselineartransformer/test_piecewiselineartransformer.py +++ b/tests/test_scripts/test_solph/test_piecewiselineartransformer/test_piecewiselineartransformer.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """ Example that illustrates how to use custom component -`PiecewiseLinearTransformer` can be used. +`PiecewiseLinearConverter` can be used. This file is part of project oemof (github.com/oemof/oemof). It's copyrighted by the contributors recorded in the version control history of the file, @@ -48,8 +48,8 @@ def conv_func(x): in_breakpoints = np.arange(0, 110, 25) out_breakpoints = conv_func(in_breakpoints) - # Create and add PiecewiseLinearTransformer - pwltf = solph.components.experimental.PiecewiseLinearTransformer( + # Create and add PiecewiseLinearConverter + pwltf = solph.components.experimental.PiecewiseLinearConverter( label="pwltf", inputs={b_gas: solph.flows.Flow(nominal_value=100, variable_costs=1)}, outputs={b_el: solph.flows.Flow()}, diff --git a/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch.py b/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch.py index ae2c82bd7..ee694a772 100644 --- a/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch.py +++ b/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch.py @@ -22,9 +22,9 @@ from oemof.solph import processing from oemof.solph import views from oemof.solph.buses import Bus +from oemof.solph.components import Converter from oemof.solph.components import Sink from oemof.solph.components import Source -from oemof.solph.components import Transformer from oemof.solph.flows import Flow @@ -72,28 +72,28 @@ def test_dispatch_example(solver="cbc", periods=24 * 5): ) # power plants - pp_coal = Transformer( + pp_coal = Converter( label="pp_coal", inputs={bcoal: Flow()}, outputs={bel: Flow(nominal_value=20.2, variable_costs=25)}, conversion_factors={bel: 0.39}, ) - pp_lig = Transformer( + pp_lig = Converter( label="pp_lig", inputs={blig: Flow()}, outputs={bel: Flow(nominal_value=11.8, variable_costs=19)}, conversion_factors={bel: 0.41}, ) - pp_gas = Transformer( + pp_gas = Converter( label="pp_gas", inputs={bgas: Flow()}, outputs={bel: Flow(nominal_value=41, variable_costs=40)}, conversion_factors={bel: 0.50}, ) - pp_oil = Transformer( + pp_oil = Converter( label="pp_oil", inputs={boil: Flow()}, outputs={bel: Flow(nominal_value=5, variable_costs=50)}, @@ -101,7 +101,7 @@ def test_dispatch_example(solver="cbc", periods=24 * 5): ) # combined heat and power plant (chp) - pp_chp = Transformer( + pp_chp = Converter( label="pp_chp", inputs={bgas: Flow()}, outputs={ @@ -117,7 +117,7 @@ def test_dispatch_example(solver="cbc", periods=24 * 5): heat_source = Source(label="heat_source", outputs={b_heat_source: Flow()}) cop = 3 - heat_pump = Transformer( + heat_pump = Converter( label="heat_pump", inputs={bel: Flow(), b_heat_source: Flow()}, outputs={bth: Flow(nominal_value=10)}, diff --git a/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch_one.py b/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch_one.py index e489f9745..d7e4c3a6c 100644 --- a/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch_one.py +++ b/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch_one.py @@ -16,9 +16,9 @@ from oemof.solph import processing from oemof.solph import views from oemof.solph.buses import Bus +from oemof.solph.components import Converter from oemof.solph.components import Sink from oemof.solph.components import Source -from oemof.solph.components import Transformer from oemof.solph.flows import Flow @@ -51,7 +51,7 @@ def test_dispatch_one_time_step(solver="cbc"): ) # combined heat and power plant (chp) - pp_chp = Transformer( + pp_chp = Converter( label="pp_chp", inputs={bgas: Flow()}, outputs={ @@ -67,7 +67,7 @@ def test_dispatch_one_time_step(solver="cbc"): heat_source = Source(label="heat_source", outputs={b_heat_source: Flow()}) cop = 3 - heat_pump = Transformer( + heat_pump = Converter( label="heat_pump", inputs={bel: Flow(), b_heat_source: Flow()}, outputs={bth: Flow(nominal_value=10)}, diff --git a/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch_one_explicit_timemode.py b/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch_one_explicit_timemode.py index e489f9745..d7e4c3a6c 100644 --- a/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch_one_explicit_timemode.py +++ b/tests/test_scripts/test_solph/test_simple_model/test_simple_dispatch_one_explicit_timemode.py @@ -16,9 +16,9 @@ from oemof.solph import processing from oemof.solph import views from oemof.solph.buses import Bus +from oemof.solph.components import Converter from oemof.solph.components import Sink from oemof.solph.components import Source -from oemof.solph.components import Transformer from oemof.solph.flows import Flow @@ -51,7 +51,7 @@ def test_dispatch_one_time_step(solver="cbc"): ) # combined heat and power plant (chp) - pp_chp = Transformer( + pp_chp = Converter( label="pp_chp", inputs={bgas: Flow()}, outputs={ @@ -67,7 +67,7 @@ def test_dispatch_one_time_step(solver="cbc"): heat_source = Source(label="heat_source", outputs={b_heat_source: Flow()}) cop = 3 - heat_pump = Transformer( + heat_pump = Converter( label="heat_pump", inputs={bel: Flow(), b_heat_source: Flow()}, outputs={bth: Flow(nominal_value=10)}, diff --git a/tests/test_scripts/test_solph/test_simple_model/test_simple_invest.py b/tests/test_scripts/test_solph/test_simple_model/test_simple_invest.py index 775b16062..5a60a3e61 100644 --- a/tests/test_scripts/test_solph/test_simple_model/test_simple_invest.py +++ b/tests/test_scripts/test_solph/test_simple_model/test_simple_invest.py @@ -24,9 +24,9 @@ from oemof.solph import processing from oemof.solph import views from oemof.solph.buses import Bus +from oemof.solph.components import Converter from oemof.solph.components import Sink from oemof.solph.components import Source -from oemof.solph.components import Transformer from oemof.solph.flows import Flow @@ -88,28 +88,28 @@ def test_dispatch_example(solver="cbc", periods=24 * 5): ) # power plants - pp_coal = Transformer( + pp_coal = Converter( label="pp_coal", inputs={bcoal: Flow()}, outputs={bel: Flow(nominal_value=20.2, variable_costs=25)}, conversion_factors={bel: 0.39}, ) - pp_lig = Transformer( + pp_lig = Converter( label="pp_lig", inputs={blig: Flow()}, outputs={bel: Flow(nominal_value=11.8, variable_costs=19)}, conversion_factors={bel: 0.41}, ) - pp_gas = Transformer( + pp_gas = Converter( label="pp_gas", inputs={bgas: Flow()}, outputs={bel: Flow(nominal_value=41, variable_costs=40)}, conversion_factors={bel: 0.50}, ) - pp_oil = Transformer( + pp_oil = Converter( label="pp_oil", inputs={boil: Flow()}, outputs={bel: Flow(nominal_value=5, variable_costs=50)}, @@ -117,7 +117,7 @@ def test_dispatch_example(solver="cbc", periods=24 * 5): ) # combined heat and power plant (chp) - pp_chp = Transformer( + pp_chp = Converter( label="pp_chp", inputs={bgas: Flow()}, outputs={ @@ -133,7 +133,7 @@ def test_dispatch_example(solver="cbc", periods=24 * 5): heat_source = Source(label="heat_source", outputs={b_heat_source: Flow()}) cop = 3 - heat_pump = Transformer( + heat_pump = Converter( label="el_heat_pump", inputs={bel: Flow(), b_heat_source: Flow()}, outputs={bth: Flow(nominal_value=10)}, diff --git a/tests/test_scripts/test_solph/test_storage_investment/test_invest_storage_regression.py b/tests/test_scripts/test_solph/test_storage_investment/test_invest_storage_regression.py index cd6ecdae2..34089738d 100644 --- a/tests/test_scripts/test_solph/test_storage_investment/test_invest_storage_regression.py +++ b/tests/test_scripts/test_solph/test_storage_investment/test_invest_storage_regression.py @@ -52,9 +52,9 @@ def test_regression_investment_storage(solver="cbc"): ) ) - # Transformer + # Converter energysystem.add( - solph.components.Transformer( + solph.components.Converter( label="pp_gas", inputs={bgas: solph.flows.Flow()}, outputs={bel: solph.flows.Flow(nominal_value=300000)}, diff --git a/tests/test_scripts/test_solph/test_storage_investment/test_storage_investment.py b/tests/test_scripts/test_solph/test_storage_investment/test_storage_investment.py index 95e85149e..a22ec81bb 100644 --- a/tests/test_scripts/test_solph/test_storage_investment/test_storage_investment.py +++ b/tests/test_scripts/test_solph/test_storage_investment/test_storage_investment.py @@ -18,7 +18,7 @@ demand(Sink) |<------------------| | | | | | | | | | - pp_gas(Transformer) |<---------| | | + pp_gas(Converter) |<---------| | | |------------------>| | | | | | storage(Storage) |<------------------| | @@ -111,8 +111,8 @@ def test_optimise_storage_size( ) ) - # Transformer - PP_GAS = solph.components.Transformer( + # Converter + PP_GAS = solph.components.Converter( label="pp_gas", inputs={bgas: solph.flows.Flow()}, outputs={ @@ -151,6 +151,7 @@ def test_optimise_storage_size( def test_results_with_actual_dump(): + test_optimise_storage_size() energysystem = solph.EnergySystem() energysystem.restore() @@ -188,8 +189,8 @@ def test_results_with_actual_dump(): # Problem results assert meta["problem"]["Lower bound"] == 4.231675777e17 assert meta["problem"]["Upper bound"], 4.231675777e17 - assert meta["problem"]["Number of variables"] == 2805 - assert meta["problem"]["Number of constraints"] == 2806 + assert meta["problem"]["Number of variables"] == 2807 + assert meta["problem"]["Number of constraints"] == 2808 assert meta["problem"]["Number of nonzeros"] == 1197 assert meta["problem"]["Number of objectives"] == 1 assert str(meta["problem"]["Sense"]) == "minimize" @@ -198,9 +199,10 @@ def test_results_with_actual_dump(): assert round(meta["objective"]) == 423167578261115584 -def test_solph_transformer_attributes_before_dump_and_after_restore(): +def test_solph_converter_attributes_before_dump_and_after_restore(): """dump/restore should preserve all attributes - of `solph.components.Transformer`""" + of `solph.components.Converter`""" + test_optimise_storage_size() energysystem = solph.EnergySystem() energysystem.restore() diff --git a/tests/test_scripts/test_solph/test_storage_investment/test_storage_with_tuple_label.py b/tests/test_scripts/test_solph/test_storage_investment/test_storage_with_tuple_label.py index 20ea93f99..845820fcf 100644 --- a/tests/test_scripts/test_solph/test_storage_investment/test_storage_with_tuple_label.py +++ b/tests/test_scripts/test_solph/test_storage_investment/test_storage_with_tuple_label.py @@ -18,7 +18,7 @@ demand(Sink) |<------------------| | | | | | | | | | - pp_gas(Transformer) |<---------| | | + pp_gas(Converter) |<---------| | | |------------------>| | | | | | storage(Storage) |<------------------| | @@ -124,9 +124,9 @@ def test_tuples_as_labels_example( ) ) - # Transformer + # Converter energysystem.add( - solph.components.Transformer( + solph.components.Converter( label=Label("pp", "electricity", "natural_gas"), inputs={bgas: solph.flows.Flow()}, outputs={ @@ -211,8 +211,8 @@ def test_tuples_as_labels_example( # Problem results assert int(meta["problem"]["Lower bound"]) == 37819254 assert int(meta["problem"]["Upper bound"]) == 37819254 - assert meta["problem"]["Number of variables"] == 281 - assert meta["problem"]["Number of constraints"] == 163 + assert meta["problem"]["Number of variables"] == 280 + assert meta["problem"]["Number of constraints"] == 162 assert meta["problem"]["Number of nonzeros"] == 116 assert meta["problem"]["Number of objectives"] == 1 assert str(meta["problem"]["Sense"]) == "minimize" diff --git a/tests/test_scripts/test_solph/test_variable_chp/test_variable_chp.py b/tests/test_scripts/test_solph/test_variable_chp/test_variable_chp.py index 6c28e8f28..59b940a82 100644 --- a/tests/test_scripts/test_solph/test_variable_chp/test_variable_chp.py +++ b/tests/test_scripts/test_solph/test_variable_chp/test_variable_chp.py @@ -119,9 +119,9 @@ def test_variable_chp(filename="variable_chp.csv", solver="cbc"): ) ) - # create a fixed transformer to distribute to the heat_2 and elec_2 buses + # create a fixed converter to distribute to the heat_2 and elec_2 buses energysystem.add( - solph.components.Transformer( + solph.components.Converter( label=("fixed_chp", "gas"), inputs={bgas: solph.flows.Flow(nominal_value=10e10)}, outputs={bel2: solph.flows.Flow(), bth2: solph.flows.Flow()}, @@ -129,7 +129,7 @@ def test_variable_chp(filename="variable_chp.csv", solver="cbc"): ) ) - # create a fixed transformer to distribute to the heat and elec buses + # create a fixed converter to distribute to the heat and elec buses energysystem.add( solph.components.ExtractionTurbineCHP( label=("variable_chp", "gas"), diff --git a/tests/test_solph_network_classes.py b/tests/test_solph_network_classes.py index 68308e0e5..24c540a62 100644 --- a/tests/test_solph_network_classes.py +++ b/tests/test_solph_network_classes.py @@ -17,7 +17,7 @@ from oemof import solph -class TestTransformerClass: +class TestConverterClass: @classmethod def setup_class(cls): """Setup default values""" @@ -28,54 +28,81 @@ def setup_class(cls): def teardown_class(cls): warnings.filterwarnings("always", category=SuspiciousUsageWarning) - def test_empty_transformer(self): - transf = solph.components.Transformer() + def test_empty_converter(self): + transf = solph.components.Converter() assert isinstance(transf.conversion_factors, dict) assert len(transf.conversion_factors.keys()) == 0 def test_default_conversion_factor(self): - transf = solph.components.Transformer( + transf = solph.components.Converter( inputs={self.bus: solph.flows.Flow()} ) assert transf.conversion_factors[self.bus][2] == 1 def test_sequence_conversion_factor_from_scalar(self): - transf = solph.components.Transformer( + transf = solph.components.Converter( inputs={self.bus: solph.flows.Flow()}, conversion_factors={self.bus: 2}, ) assert transf.conversion_factors[self.bus][6] == 2 def test_sequence_conversion_factor_from_list_correct_length(self): - transf = solph.components.Transformer( + transf = solph.components.Converter( inputs={self.bus: solph.flows.Flow()}, conversion_factors={self.bus: [2]}, ) assert len(transf.conversion_factors[self.bus]) == 1 def test_sequence_conversion_factor_from_list_wrong_length(self): - transf = solph.components.Transformer( + transf = solph.components.Converter( inputs={self.bus: solph.flows.Flow()}, conversion_factors={self.bus: [2]}, ) with pytest.raises(IndexError): self.a = transf.conversion_factors[self.bus][6] - def test_transformer_missing_output_create_empty_dict(self): - trfr = solph.components.Transformer(inputs={}) + def test_converter_missing_output_create_empty_dict(self): + trfr = solph.components.Converter(inputs={}) assert trfr.outputs == {} - def test_transformer_missing_input_create_empty_dict(self): - trfr = solph.components.Transformer(outputs={}) + def test_converter_missing_input_create_empty_dict(self): + trfr = solph.components.Converter(outputs={}) assert trfr.inputs == {} +def test_transformer_wrapper(): + with pytest.warns(FutureWarning): + solph.components.Transformer() + + +def test_offset_transformer_wrapper(): + with pytest.warns(FutureWarning): + solph.components.OffsetTransformer(inputs={}, outputs={}) + + def test_wrong_combination_invest_and_nominal_value(): - msg = "Using the investment object the nominal_value" - with pytest.raises(ValueError, match=msg): + msg = "For backward compatibility, the option investment overwrites" + with pytest.raises(AttributeError, match=msg): solph.flows.Flow(investment=solph.Investment(), nominal_value=4) +def test_fixed_costs_warning(): + msg = ( + "Be aware that the fixed costs attribute is only\n" + "meant to be used for multi-period models.\n" + "If you wish to set up a multi-period model, explicitly " + "set the `periods` attribute of your energy system.\n" + "It has been decided to remove the `fixed_costs` " + "attribute with v0.2 for regular uses.\n" + "If you specify `fixed_costs` for a regular model, " + "it will simply be ignored." + ) + with warnings.catch_warnings(record=True) as w: + solph.flows.Flow(fixed_costs=34) + assert len(w) != 0 + assert msg == str(w[-1].message) + + def test_flow_with_fix_and_min_max(): msg = "It is not allowed to define `min`/`max` if `fix` is defined." with pytest.raises(AttributeError, match=msg): diff --git a/tests/test_warnings.py b/tests/test_warnings.py index 7dd9df3a2..cf465ac53 100644 --- a/tests/test_warnings.py +++ b/tests/test_warnings.py @@ -11,6 +11,7 @@ import warnings +import pandas as pd import pytest from oemof.network import network from oemof.tools.debugging import SuspiciousUsageWarning @@ -81,25 +82,25 @@ def test_that_the_source_warnings_actually_get_raised(warning_fixture): assert msg in str(w[-1].message) -def test_that_the_transformer_warnings_actually_get_raised(warning_fixture): - """Transformer doesn't warn about potentially erroneous usage.""" +def test_that_the_converter_warnings_actually_get_raised(warning_fixture): + """Converter doesn't warn about potentially erroneous usage.""" look_out = network.Bus() msg = ( "Attribute is missing in Node of ." + " 'oemof.solph.components._converter.Converter'>." ) with warnings.catch_warnings(record=True) as w: - solph.components.Transformer( + solph.components.Converter( label="no input", outputs={look_out: "No inputs!"} ) assert len(w) == 1 assert msg in str(w[-1].message) msg = ( "Attribute is missing in Node of ." + " 'oemof.solph.components._converter.Converter'>." ) with warnings.catch_warnings(record=True) as w: - solph.components.Transformer( + solph.components.Converter( label="no output", inputs={look_out: "No outputs!"} ) assert len(w) == 1 @@ -153,3 +154,60 @@ def test_nonconvex_investment_without_maximum_raises_warning(warning_fixture): ), nonconvex=solph.NonConvex(), ) + + +def test_link_to_warn_about_not_matching_number_of_flows(warning_fixture): + """Link warns about missing parameters and not matching number of flows.""" + + msg = ( + "Component `Link` should have exactly " + + "2 inputs, 2 outputs, and 2 " + + "conversion factors connecting these. You are initializing " + + "a `Link`without obeying this specification. " + + "If this is intended and you know what you are doing you can " + + "disable the SuspiciousUsageWarning globally." + ) + + with warnings.catch_warnings(record=True) as w: + solph.components.Link( + label="empty_link", + ) + assert len(w) == 4 + # Check number of raised warnings: + # 1. empty inputs, 2. empty outputs 3. empty conversion_factors + # 4. unmatched number of flows + # Check warning for unmatched number of flows + assert msg in str(w[-1].message) + + +def test_link_raise_key_error_in_Linkblock(warning_fixture): + """Link raises KeyError if conversion factors don't match the connected + busses.""" + + date_time_index = pd.date_range("1/1/2012", periods=3, freq="H") + energysystem = solph.EnergySystem( + timeindex=date_time_index, + infer_last_interval=True, + ) + bel0 = solph.buses.Bus(label="el0") + bel1 = solph.buses.Bus(label="el1") + look_out = solph.buses.Bus(label="look_out") + link = solph.components.Link( + label="transshipment_link", + inputs={ + bel0: solph.flows.Flow(nominal_value=4), + bel1: solph.flows.Flow(nominal_value=2), + }, + outputs={bel0: solph.flows.Flow(), look_out: solph.flows.Flow()}, + conversion_factors={(bel0, bel1): 0.8, (bel1, bel0): 0.7}, + ) + + energysystem.add(bel0, bel1, link) + + msg = ( + "Error in constraint creation from: el0, to: el1, via: " + "transshipment_link. Check if all connected buses match the " + "conversion factors." + ) + with pytest.raises(KeyError, match=msg): + solph.Model(energysystem)