Bump pyomo version in requirements?
**Describe the bug**
When installing oemof.solph via pip, the requirements for pyomo is given with: `"pyomo >= 6.0.0, < 7.0",`.
However, simple code such as the `basic_example.py` does not run with the `pyomo` versions between `6.0.0` and `6.4.2`(inclusive). The error returned points to `solph\buses\__init__.py`, line 471 with:

`TypeError: 'tuple' object does not support item assignment`

With `pyomo >= 6.4.3`, the error vanishes. 

I see two options to fix that:
1) Change the code in  `solph\buses\__init__.py`, or
2) Change the `pyomo`-dependency to `"pyomo >= 6.4.3, < 7.0"`

I assume 2) will be easier to implement.

**To Reproduce**
Steps to reproduce the behavior:
1.  Create a new venv
2.  Run `pip install oemof.solph`
3.  Check if `6.0.0 <= pyomo <= 6.4.2`, if not, run `pip install --upgrade --force-reinstall pyomo==6.0.1` (or any other version that fits the previous requirement)
4.  Run `basic_example.py` in the new venv
5.  See error message
6.  Run `pip install --upgrade --force-reinstall pyomo==6.4.3` (or higher)
7.  Marvel at the results of the script

**Expected behavior**
The examples should run with all versions specified in the install-requirements. (The expected behavior is ofc related to #922, but the reason for the error is not, I think).

**Desktop (please complete the following information):**
 -   OS: Windows10
 -   Python version: 3.11

**Additional context**
I should point out, that when **only** installing oemof.solph in a new environment, `pip` pulls the latest version of `pyomo` (6.5.0), so there won't be an error. But if other packages are installed beforehand, the pyomo version could be lower, so I think a fix would be great.

diff --git a/setup.py b/setup.py
index be69d6f3..1c915e3b 100644
--- a/setup.py
+++ b/setup.py
@@ -80,7 +80,7 @@ setup(
         "dill",
         "numpy",
         "pandas >= 1.5.3",
-        "pyomo >= 6.0.0, < 7.0",
+        "pyomo >= 6.6.0, < 7.0",
         "networkx",
         "oemof.tools >= 0.4.2",
         "oemof.network >= 0.5.0a1",
diff --git a/tests/constraint_tests.py b/tests/constraint_tests.py
index f849ac9e..381e8923 100644
--- a/tests/constraint_tests.py
+++ b/tests/constraint_tests.py
@@ -11,11 +11,11 @@ SPDX-License-Identifier: MIT
 
 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,70 +69,29 @@ class TestsConstraint:
                     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="",
-                        )
-                    ),
-                )
+                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_transformer(self):
         """Constraint test of a Transformer without Investment."""
diff --git a/tests/lp_files/activity_costs.lp b/tests/lp_files/activity_costs.lp
index 7f0efb57..02f6420c 100644
--- a/tests/lp_files/activity_costs.lp
+++ b/tests/lp_files/activity_costs.lp
@@ -2,12 +2,12 @@
 
 min 
 objective:
-+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_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)
 
 s.t.
 
@@ -39,42 +39,39 @@ c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_activity_costs_Bus_
 = 0
 
 c_u_NonConvexFlowBlock_min(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)
++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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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_0_2)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_2)
 -1 flow(cheap_plant_activity_costs_Bus_C_0_2)
++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_2)
 <= 0
 
 c_u_NonConvexFlowBlock_max(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)
+-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 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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_0_2)_:
--1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_2)
 +1 flow(cheap_plant_activity_costs_Bus_C_0_2)
+-1 NonConvexFlowBlock_status_nominal(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_0) <= 10
-   0 <= flow(cheap_plant_activity_costs_Bus_C_0_1) <= 10
-   0 <= flow(cheap_plant_activity_costs_Bus_C_0_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
index 63d3b59d..fd798fa7 100644
--- a/tests/lp_files/activity_costs_multi_period.lp
+++ b/tests/lp_files/activity_costs_multi_period.lp
@@ -2,18 +2,18 @@
 
 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)
-+10 flow(cheap_plant_activity_costs_Bus_C_0_0)
-+10 flow(cheap_plant_activity_costs_Bus_C_0_1)
-+9.8039215686274499 flow(cheap_plant_activity_costs_Bus_C_1_2)
-+9.8039215686274499 flow(cheap_plant_activity_costs_Bus_C_1_3)
-+9.6116878123798539 flow(cheap_plant_activity_costs_Bus_C_2_4)
-+9.6116878123798539 flow(cheap_plant_activity_costs_Bus_C_2_5)
 
 s.t.
 
@@ -72,75 +72,72 @@ c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_activity_costs_Bus_
 = 0
 
 c_u_NonConvexFlowBlock_min(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)
++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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_5)
 +1 flow(cheap_plant_activity_costs_Bus_C_2_5)
+-1 NonConvexFlowBlock_status_nominal(cheap_plant_activity_costs_Bus_C_5)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(cheap_plant_activity_costs_Bus_C_0_0) <= 10
-   0 <= flow(cheap_plant_activity_costs_Bus_C_0_1) <= 10
-   0 <= flow(cheap_plant_activity_costs_Bus_C_1_2) <= 10
-   0 <= flow(cheap_plant_activity_costs_Bus_C_1_3) <= 10
-   0 <= flow(cheap_plant_activity_costs_Bus_C_2_4) <= 10
-   0 <= flow(cheap_plant_activity_costs_Bus_C_2_5) <= 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_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
diff --git a/tests/lp_files/connect_investment.lp b/tests/lp_files/connect_investment.lp
index 4b8917e0..5573bd32 100644
--- a/tests/lp_files/connect_investment.lp
+++ b/tests/lp_files/connect_investment.lp
@@ -2,9 +2,9 @@
 
 min 
 objective:
-+145 GenericInvestmentStorageBlock_invest(storage_0)
 +500 InvestmentFlowBlock_invest(Bus1_Sink_0)
 +123 InvestmentFlowBlock_invest(Source_Bus1_0)
++145 GenericInvestmentStorageBlock_invest(storage_0)
 
 s.t.
 
@@ -14,29 +14,34 @@ c_e__equate_InvestmentFlowBlock_invest(Source_Bus1_0)_InvestmentFlowBlock_invest
 = 0
 
 c_e__equate_InvestmentFlowBlock_invest(Source_Bus1_0)_GenericInvestmentStorageBlock_invest(storage_0)__:
--1 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(Bus1_Sink_0_0)
--1 flow(Bus1_storage_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_0_1)_:
--1 flow(Bus1_Sink_0_1)
--1 flow(Bus1_storage_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_0_2)_:
--1 flow(Bus1_Sink_0_2)
--1 flow(Bus1_storage_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_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)_:
@@ -44,79 +49,74 @@ c_e_InvestmentFlowBlock_total_rule(Bus1_Sink_0)_:
 +1 InvestmentFlowBlock_total(Bus1_Sink_0)
 = 0
 
-c_e_InvestmentFlowBlock_total_rule(Bus1_storage_0)_:
--1 InvestmentFlowBlock_invest(Bus1_storage_0)
-+1 InvestmentFlowBlock_total(Bus1_storage_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(storage_Bus1_0)_:
--1 InvestmentFlowBlock_invest(storage_Bus1_0)
-+1 InvestmentFlowBlock_total(storage_Bus1_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(Bus1_Sink_0_0)_:
--1 InvestmentFlowBlock_total(Bus1_Sink_0)
-+1 flow(Bus1_Sink_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_0_1)_:
--1 InvestmentFlowBlock_total(Bus1_Sink_0)
-+1 flow(Bus1_Sink_0_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_0_2)_:
--1 InvestmentFlowBlock_total(Bus1_Sink_0)
-+1 flow(Bus1_Sink_0_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_0_0)_:
--1 InvestmentFlowBlock_total(Bus1_storage_0)
-+1 flow(Bus1_storage_0_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_0_1)_:
--1 InvestmentFlowBlock_total(Bus1_storage_0)
-+1 flow(Bus1_storage_0_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_0_2)_:
--1 InvestmentFlowBlock_total(Bus1_storage_0)
-+1 flow(Bus1_storage_0_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_0)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_0)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_1)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_2)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_2)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
-c_u_InvestmentFlowBlock_max(storage_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(storage_Bus1_0)
-+1 flow(storage_Bus1_0_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_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(storage_Bus1_0)
-+1 flow(storage_Bus1_0_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_Bus1_0_2)_:
--1 InvestmentFlowBlock_total(storage_Bus1_0)
-+1 flow(storage_Bus1_0_2)
+c_u_InvestmentFlowBlock_max(Bus1_storage_0_2)_:
++1 flow(Bus1_storage_0_2)
+-1 InvestmentFlowBlock_total(Bus1_storage_0)
 <= 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_0)_:
@@ -125,29 +125,29 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_0)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_init_content_limit(storage)_:
-+1 GenericInvestmentStorageBlock_init_content(storage)
 -1 GenericInvestmentStorageBlock_invest(storage_0)
++1 GenericInvestmentStorageBlock_init_content(storage)
 <= 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)
--1 flow(Bus1_storage_0_0)
-+1 flow(storage_Bus1_0_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)
--1 flow(Bus1_storage_0_1)
-+1 flow(storage_Bus1_0_1)
 = 0
 
 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)
--1 flow(Bus1_storage_0_2)
-+1 flow(storage_Bus1_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage)_:
@@ -156,58 +156,55 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_0)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(storage_0)
 +1 InvestmentFlowBlock_total(Bus1_storage_0)
+-0.2 GenericInvestmentStorageBlock_total(storage_0)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_0)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(storage_0)
 +1 InvestmentFlowBlock_total(storage_Bus1_0)
+-0.2 GenericInvestmentStorageBlock_total(storage_0)
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_0)
 -1 GenericInvestmentStorageBlock_total(storage_0)
++1 GenericInvestmentStorageBlock_storage_content(storage_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_1)
 -1 GenericInvestmentStorageBlock_total(storage_0)
++1 GenericInvestmentStorageBlock_storage_content(storage_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_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_0) <= +inf
-   0 <= flow(Bus1_Sink_0_1) <= +inf
-   0 <= flow(Bus1_Sink_0_2) <= +inf
-   0 <= flow(Bus1_storage_0_0) <= +inf
-   0 <= flow(Bus1_storage_0_1) <= +inf
-   0 <= flow(Bus1_storage_0_2) <= +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(Source_Bus1_0_1) <= +inf
-   0 <= flow(Source_Bus1_0_2) <= +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 <= InvestmentFlowBlock_invest(Bus1_Sink_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(Bus1_storage_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +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(Bus1_storage_0) <= +inf
    0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_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
-   0 <= GenericInvestmentStorageBlock_invest(storage_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_total(storage_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_init_content(storage) <= +inf
 end
diff --git a/tests/lp_files/connect_investment_multi_period.lp b/tests/lp_files/connect_investment_multi_period.lp
index 1a03f385..9fb2ea73 100644
--- a/tests/lp_files/connect_investment_multi_period.lp
+++ b/tests/lp_files/connect_investment_multi_period.lp
@@ -2,15 +2,15 @@
 
 min 
 objective:
-+150.83828257744048 GenericInvestmentStorageBlock_invest(storage_0)
-+147.8806691935691 GenericInvestmentStorageBlock_invest(storage_1)
-+144.98104822898929 GenericInvestmentStorageBlock_invest(storage_2)
-+520.13200888772576 InvestmentFlowBlock_invest(Bus1_Sink_0)
++520.1320088877258 InvestmentFlowBlock_invest(Bus1_Sink_0)
 +509.93334204678996 InvestmentFlowBlock_invest(Bus1_Sink_1)
 +499.9346490654803 InvestmentFlowBlock_invest(Bus1_Sink_2)
 +127.95247418638057 InvestmentFlowBlock_invest(Source_Bus1_0)
 +125.44360214351036 InvestmentFlowBlock_invest(Source_Bus1_1)
 +122.9839236701082 InvestmentFlowBlock_invest(Source_Bus1_2)
++150.83828257744048 GenericInvestmentStorageBlock_invest(storage_0)
++147.8806691935691 GenericInvestmentStorageBlock_invest(storage_1)
++144.9810482289893 GenericInvestmentStorageBlock_invest(storage_2)
 
 s.t.
 
@@ -20,50 +20,69 @@ c_e__equate_InvestmentFlowBlock_invest(Source_Bus1_0)_InvestmentFlowBlock_invest
 = 0
 
 c_e__equate_InvestmentFlowBlock_invest(Source_Bus1_0)_GenericInvestmentStorageBlock_invest(storage_0)__:
--1 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(Bus1_Sink_0_0)
--1 flow(Bus1_storage_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_0_1)_:
--1 flow(Bus1_Sink_0_1)
--1 flow(Bus1_storage_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_1_2)_:
--1 flow(Bus1_Sink_1_2)
--1 flow(Bus1_storage_1_2)
 +1 flow(Source_Bus1_1_2)
 +1 flow(storage_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(Bus1_Sink_1_3)
--1 flow(Bus1_storage_1_3)
 +1 flow(Source_Bus1_1_3)
 +1 flow(storage_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(Bus1_Sink_2_4)
--1 flow(Bus1_storage_2_4)
 +1 flow(Source_Bus1_2_4)
 +1 flow(storage_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(Bus1_Sink_2_5)
--1 flow(Bus1_storage_2_5)
 +1 flow(Source_Bus1_2_5)
 +1 flow(storage_Bus1_2_5)
+-1 flow(Bus1_storage_2_5)
+-1 flow(Bus1_Sink_2_5)
+= 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_total_rule(Bus1_Sink_0)_:
@@ -73,35 +92,16 @@ c_e_InvestmentFlowBlock_total_rule(Bus1_Sink_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(Bus1_Sink_1)_:
 -1 InvestmentFlowBlock_invest(Bus1_Sink_1)
-+1 InvestmentFlowBlock_old(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_old(Bus1_Sink_2)
 -1 InvestmentFlowBlock_total(Bus1_Sink_1)
 +1 InvestmentFlowBlock_total(Bus1_Sink_2)
-= 0
-
-c_e_InvestmentFlowBlock_total_rule(Bus1_storage_0)_:
--1 InvestmentFlowBlock_invest(Bus1_storage_0)
-+1 InvestmentFlowBlock_total(Bus1_storage_0)
-= 0
-
-c_e_InvestmentFlowBlock_total_rule(Bus1_storage_1)_:
--1 InvestmentFlowBlock_invest(Bus1_storage_1)
-+1 InvestmentFlowBlock_old(Bus1_storage_1)
--1 InvestmentFlowBlock_total(Bus1_storage_0)
-+1 InvestmentFlowBlock_total(Bus1_storage_1)
-= 0
-
-c_e_InvestmentFlowBlock_total_rule(Bus1_storage_2)_:
--1 InvestmentFlowBlock_invest(Bus1_storage_2)
-+1 InvestmentFlowBlock_old(Bus1_storage_2)
--1 InvestmentFlowBlock_total(Bus1_storage_1)
-+1 InvestmentFlowBlock_total(Bus1_storage_2)
++1 InvestmentFlowBlock_old(Bus1_Sink_2)
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_:
@@ -111,59 +111,59 @@ c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(Source_Bus1_1)_:
 -1 InvestmentFlowBlock_invest(Source_Bus1_1)
-+1 InvestmentFlowBlock_old(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_old(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(storage_Bus1_0)_:
--1 InvestmentFlowBlock_invest(storage_Bus1_0)
-+1 InvestmentFlowBlock_total(storage_Bus1_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(storage_Bus1_1)_:
--1 InvestmentFlowBlock_invest(storage_Bus1_1)
-+1 InvestmentFlowBlock_old(storage_Bus1_1)
--1 InvestmentFlowBlock_total(storage_Bus1_0)
-+1 InvestmentFlowBlock_total(storage_Bus1_1)
+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(storage_Bus1_2)_:
--1 InvestmentFlowBlock_invest(storage_Bus1_2)
-+1 InvestmentFlowBlock_old(storage_Bus1_2)
--1 InvestmentFlowBlock_total(storage_Bus1_1)
-+1 InvestmentFlowBlock_total(storage_Bus1_2)
+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_old_rule_end(Bus1_Sink_0)_:
-+1 InvestmentFlowBlock_old_end(Bus1_Sink_0)
+c_e_InvestmentFlowBlock_old_rule_end(storage_Bus1_0)_:
++1 InvestmentFlowBlock_old_end(storage_Bus1_0)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(Bus1_Sink_1)_:
-+1 InvestmentFlowBlock_old_end(Bus1_Sink_1)
+c_e_InvestmentFlowBlock_old_rule_end(storage_Bus1_1)_:
++1 InvestmentFlowBlock_old_end(storage_Bus1_1)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(Bus1_Sink_2)_:
-+1 InvestmentFlowBlock_old_end(Bus1_Sink_2)
+c_e_InvestmentFlowBlock_old_rule_end(storage_Bus1_2)_:
++1 InvestmentFlowBlock_old_end(storage_Bus1_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_0)_:
-+1 InvestmentFlowBlock_old_end(Bus1_storage_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_storage_1)_:
-+1 InvestmentFlowBlock_old_end(Bus1_storage_1)
+c_e_InvestmentFlowBlock_old_rule_end(Bus1_Sink_1)_:
++1 InvestmentFlowBlock_old_end(Bus1_Sink_1)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_2)_:
-+1 InvestmentFlowBlock_old_end(Bus1_storage_2)
+c_e_InvestmentFlowBlock_old_rule_end(Bus1_Sink_2)_:
++1 InvestmentFlowBlock_old_end(Bus1_Sink_2)
 = 0
 
 c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_0)_:
@@ -178,40 +178,40 @@ c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_2)_:
 +1 InvestmentFlowBlock_old_end(Source_Bus1_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(storage_Bus1_0)_:
-+1 InvestmentFlowBlock_old_end(storage_Bus1_0)
+c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_0)_:
++1 InvestmentFlowBlock_old_end(Bus1_storage_0)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(storage_Bus1_1)_:
-+1 InvestmentFlowBlock_old_end(storage_Bus1_1)
+c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_1)_:
++1 InvestmentFlowBlock_old_end(Bus1_storage_1)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(storage_Bus1_2)_:
-+1 InvestmentFlowBlock_old_end(storage_Bus1_2)
+c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_2)_:
++1 InvestmentFlowBlock_old_end(Bus1_storage_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_exo(Bus1_Sink_0)_:
-+1 InvestmentFlowBlock_old_exo(Bus1_Sink_0)
+c_e_InvestmentFlowBlock_old_rule_exo(storage_Bus1_0)_:
++1 InvestmentFlowBlock_old_exo(storage_Bus1_0)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_exo(Bus1_Sink_1)_:
-+1 InvestmentFlowBlock_old_exo(Bus1_Sink_1)
+c_e_InvestmentFlowBlock_old_rule_exo(storage_Bus1_1)_:
++1 InvestmentFlowBlock_old_exo(storage_Bus1_1)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_exo(Bus1_Sink_2)_:
-+1 InvestmentFlowBlock_old_exo(Bus1_Sink_2)
+c_e_InvestmentFlowBlock_old_rule_exo(storage_Bus1_2)_:
++1 InvestmentFlowBlock_old_exo(storage_Bus1_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_0)_:
-+1 InvestmentFlowBlock_old_exo(Bus1_storage_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_storage_1)_:
-+1 InvestmentFlowBlock_old_exo(Bus1_storage_1)
+c_e_InvestmentFlowBlock_old_rule_exo(Bus1_Sink_1)_:
++1 InvestmentFlowBlock_old_exo(Bus1_Sink_1)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_2)_:
-+1 InvestmentFlowBlock_old_exo(Bus1_storage_2)
+c_e_InvestmentFlowBlock_old_rule_exo(Bus1_Sink_2)_:
++1 InvestmentFlowBlock_old_exo(Bus1_Sink_2)
 = 0
 
 c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_0)_:
@@ -226,22 +226,40 @@ c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_2)_:
 +1 InvestmentFlowBlock_old_exo(Source_Bus1_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_exo(storage_Bus1_0)_:
-+1 InvestmentFlowBlock_old_exo(storage_Bus1_0)
+c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_0)_:
++1 InvestmentFlowBlock_old_exo(Bus1_storage_0)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_exo(storage_Bus1_1)_:
-+1 InvestmentFlowBlock_old_exo(storage_Bus1_1)
+c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_1)_:
++1 InvestmentFlowBlock_old_exo(Bus1_storage_1)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_exo(storage_Bus1_2)_:
-+1 InvestmentFlowBlock_old_exo(storage_Bus1_2)
+c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_2)_:
++1 InvestmentFlowBlock_old_exo(Bus1_storage_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_e_InvestmentFlowBlock_old_rule(Bus1_Sink_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -256,28 +274,10 @@ c_e_InvestmentFlowBlock_old_rule(Bus1_Sink_2)_:
 -1 InvestmentFlowBlock_old_exo(Bus1_Sink_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule(Bus1_storage_0)_:
-+1 InvestmentFlowBlock_old(Bus1_storage_0)
--1 InvestmentFlowBlock_old_end(Bus1_storage_0)
--1 InvestmentFlowBlock_old_exo(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(Source_Bus1_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -292,142 +292,142 @@ c_e_InvestmentFlowBlock_old_rule(Source_Bus1_2)_:
 -1 InvestmentFlowBlock_old_exo(Source_Bus1_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule(storage_Bus1_0)_:
-+1 InvestmentFlowBlock_old(storage_Bus1_0)
--1 InvestmentFlowBlock_old_end(storage_Bus1_0)
--1 InvestmentFlowBlock_old_exo(storage_Bus1_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(storage_Bus1_1)_:
-+1 InvestmentFlowBlock_old(storage_Bus1_1)
--1 InvestmentFlowBlock_old_end(storage_Bus1_1)
--1 InvestmentFlowBlock_old_exo(storage_Bus1_1)
+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(storage_Bus1_2)_:
-+1 InvestmentFlowBlock_old(storage_Bus1_2)
--1 InvestmentFlowBlock_old_end(storage_Bus1_2)
--1 InvestmentFlowBlock_old_exo(storage_Bus1_2)
+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_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_u_InvestmentFlowBlock_max(Bus1_Sink_0_0)_:
--1 InvestmentFlowBlock_total(Bus1_Sink_0)
 +1 flow(Bus1_Sink_0_0)
+-1 InvestmentFlowBlock_total(Bus1_Sink_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Bus1_Sink_0_1)_:
--1 InvestmentFlowBlock_total(Bus1_Sink_0)
 +1 flow(Bus1_Sink_0_1)
+-1 InvestmentFlowBlock_total(Bus1_Sink_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Bus1_Sink_1_2)_:
--1 InvestmentFlowBlock_total(Bus1_Sink_1)
 +1 flow(Bus1_Sink_1_2)
+-1 InvestmentFlowBlock_total(Bus1_Sink_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Bus1_Sink_1_3)_:
--1 InvestmentFlowBlock_total(Bus1_Sink_1)
 +1 flow(Bus1_Sink_1_3)
+-1 InvestmentFlowBlock_total(Bus1_Sink_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Bus1_Sink_2_4)_:
--1 InvestmentFlowBlock_total(Bus1_Sink_2)
 +1 flow(Bus1_Sink_2_4)
+-1 InvestmentFlowBlock_total(Bus1_Sink_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Bus1_Sink_2_5)_:
--1 InvestmentFlowBlock_total(Bus1_Sink_2)
 +1 flow(Bus1_Sink_2_5)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Bus1_storage_0_0)_:
--1 InvestmentFlowBlock_total(Bus1_storage_0)
-+1 flow(Bus1_storage_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Bus1_storage_0_1)_:
--1 InvestmentFlowBlock_total(Bus1_storage_0)
-+1 flow(Bus1_storage_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Bus1_storage_1_2)_:
--1 InvestmentFlowBlock_total(Bus1_storage_1)
-+1 flow(Bus1_storage_1_2)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Bus1_storage_1_3)_:
--1 InvestmentFlowBlock_total(Bus1_storage_1)
-+1 flow(Bus1_storage_1_3)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Bus1_storage_2_4)_:
--1 InvestmentFlowBlock_total(Bus1_storage_2)
-+1 flow(Bus1_storage_2_4)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Bus1_storage_2_5)_:
--1 InvestmentFlowBlock_total(Bus1_storage_2)
-+1 flow(Bus1_storage_2_5)
+-1 InvestmentFlowBlock_total(Bus1_Sink_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_0)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_1)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_1_2)_:
--1 InvestmentFlowBlock_total(Source_Bus1_1)
 +1 flow(Source_Bus1_1_2)
+-1 InvestmentFlowBlock_total(Source_Bus1_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_1_3)_:
--1 InvestmentFlowBlock_total(Source_Bus1_1)
 +1 flow(Source_Bus1_1_3)
+-1 InvestmentFlowBlock_total(Source_Bus1_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_2_4)_:
--1 InvestmentFlowBlock_total(Source_Bus1_2)
 +1 flow(Source_Bus1_2_4)
+-1 InvestmentFlowBlock_total(Source_Bus1_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_2_5)_:
--1 InvestmentFlowBlock_total(Source_Bus1_2)
 +1 flow(Source_Bus1_2_5)
+-1 InvestmentFlowBlock_total(Source_Bus1_2)
 <= 0
 
-c_u_InvestmentFlowBlock_max(storage_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(storage_Bus1_0)
-+1 flow(storage_Bus1_0_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_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(storage_Bus1_0)
-+1 flow(storage_Bus1_0_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_Bus1_1_2)_:
--1 InvestmentFlowBlock_total(storage_Bus1_1)
-+1 flow(storage_Bus1_1_2)
+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(storage_Bus1_1_3)_:
--1 InvestmentFlowBlock_total(storage_Bus1_1)
-+1 flow(storage_Bus1_1_3)
+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(storage_Bus1_2_4)_:
--1 InvestmentFlowBlock_total(storage_Bus1_2)
-+1 flow(storage_Bus1_2_4)
+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(storage_Bus1_2_5)_:
--1 InvestmentFlowBlock_total(storage_Bus1_2)
-+1 flow(storage_Bus1_2_5)
+c_u_InvestmentFlowBlock_max(Bus1_storage_2_5)_:
++1 flow(Bus1_storage_2_5)
+-1 InvestmentFlowBlock_total(Bus1_storage_2)
 <= 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_0)_:
@@ -437,16 +437,16 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_0)_:
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_1)_:
 -1 GenericInvestmentStorageBlock_invest(storage_1)
-+1 GenericInvestmentStorageBlock_old(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_old(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)_:
@@ -474,9 +474,9 @@ c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_old_rule(storage_0)_:
-+1 GenericInvestmentStorageBlock_old(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)_:
@@ -492,202 +492,192 @@ c_e_GenericInvestmentStorageBlock_old_rule(storage_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_balance(storage_0_1)_:
--1 GenericInvestmentStorageBlock_storage_content(storage_0)
-+1 GenericInvestmentStorageBlock_storage_content(storage_1)
--1 flow(Bus1_storage_0_1)
 +1 flow(storage_Bus1_0_1)
+-1 flow(Bus1_storage_0_1)
++1 GenericInvestmentStorageBlock_storage_content(storage_1)
+-1 GenericInvestmentStorageBlock_storage_content(storage_0)
 = 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)
--1 flow(Bus1_storage_1_2)
-+1 flow(storage_Bus1_1_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)
--1 flow(Bus1_storage_1_3)
-+1 flow(storage_Bus1_1_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)
--1 flow(Bus1_storage_2_4)
-+1 flow(storage_Bus1_2_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)
--1 flow(Bus1_storage_2_5)
-+1 flow(storage_Bus1_2_5)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_0)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(storage_0)
 +1 InvestmentFlowBlock_total(Bus1_storage_0)
+-0.2 GenericInvestmentStorageBlock_total(storage_0)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_1)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(storage_1)
 +1 InvestmentFlowBlock_total(Bus1_storage_1)
+-0.2 GenericInvestmentStorageBlock_total(storage_1)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_2)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(storage_2)
 +1 InvestmentFlowBlock_total(Bus1_storage_2)
+-0.2 GenericInvestmentStorageBlock_total(storage_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_0)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(storage_0)
 +1 InvestmentFlowBlock_total(storage_Bus1_0)
+-0.2 GenericInvestmentStorageBlock_total(storage_0)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_1)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(storage_1)
 +1 InvestmentFlowBlock_total(storage_Bus1_1)
+-0.2 GenericInvestmentStorageBlock_total(storage_1)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage_2)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(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_storage_content(storage_0)
 -1 GenericInvestmentStorageBlock_total(storage_0)
++1 GenericInvestmentStorageBlock_storage_content(storage_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_1)
 -1 GenericInvestmentStorageBlock_total(storage_0)
++1 GenericInvestmentStorageBlock_storage_content(storage_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage_1_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_2)
 -1 GenericInvestmentStorageBlock_total(storage_1)
++1 GenericInvestmentStorageBlock_storage_content(storage_2)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage_1_3)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_3)
 -1 GenericInvestmentStorageBlock_total(storage_1)
++1 GenericInvestmentStorageBlock_storage_content(storage_3)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage_2_4)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_4)
 -1 GenericInvestmentStorageBlock_total(storage_2)
++1 GenericInvestmentStorageBlock_storage_content(storage_4)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage_2_5)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_5)
 -1 GenericInvestmentStorageBlock_total(storage_2)
++1 GenericInvestmentStorageBlock_storage_content(storage_5)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(Bus1_Sink_0_0) <= +inf
-   0 <= flow(Bus1_Sink_0_1) <= +inf
-   0 <= flow(Bus1_Sink_1_2) <= +inf
-   0 <= flow(Bus1_Sink_1_3) <= +inf
-   0 <= flow(Bus1_Sink_2_4) <= +inf
-   0 <= flow(Bus1_Sink_2_5) <= +inf
-   0 <= flow(Bus1_storage_0_0) <= +inf
-   0 <= flow(Bus1_storage_0_1) <= +inf
-   0 <= flow(Bus1_storage_1_2) <= +inf
-   0 <= flow(Bus1_storage_1_3) <= +inf
-   0 <= flow(Bus1_storage_2_4) <= +inf
-   0 <= flow(Bus1_storage_2_5) <= +inf
+   0 <= InvestmentFlowBlock_invest(Bus1_Sink_0) <= +inf
+   0 <= InvestmentFlowBlock_invest(Bus1_Sink_1) <= +inf
+   0 <= InvestmentFlowBlock_invest(Bus1_Sink_2) <= +inf
+   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_0) <= +inf
+   0 <= GenericInvestmentStorageBlock_invest(storage_1) <= +inf
+   0 <= GenericInvestmentStorageBlock_invest(storage_2) <= +inf
    0 <= flow(Source_Bus1_0_0) <= +inf
-   0 <= flow(Source_Bus1_0_1) <= +inf
-   0 <= flow(Source_Bus1_1_2) <= +inf
-   0 <= flow(Source_Bus1_1_3) <= +inf
-   0 <= flow(Source_Bus1_2_4) <= +inf
-   0 <= flow(Source_Bus1_2_5) <= +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_1_2) <= +inf
    0 <= flow(storage_Bus1_1_2) <= +inf
+   0 <= flow(Bus1_storage_1_2) <= +inf
+   0 <= flow(Bus1_Sink_1_2) <= +inf
+   0 <= flow(Source_Bus1_1_3) <= +inf
    0 <= flow(storage_Bus1_1_3) <= +inf
+   0 <= flow(Bus1_storage_1_3) <= +inf
+   0 <= flow(Bus1_Sink_1_3) <= +inf
+   0 <= flow(Source_Bus1_2_4) <= +inf
    0 <= flow(storage_Bus1_2_4) <= +inf
+   0 <= flow(Bus1_storage_2_4) <= +inf
+   0 <= flow(Bus1_Sink_2_4) <= +inf
+   0 <= flow(Source_Bus1_2_5) <= +inf
    0 <= flow(storage_Bus1_2_5) <= +inf
-   0 <= InvestmentFlowBlock_invest(Bus1_Sink_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(Bus1_Sink_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(Bus1_Sink_2) <= +inf
-   0 <= InvestmentFlowBlock_invest(Bus1_storage_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(Bus1_storage_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(Bus1_storage_2) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_2) <= +inf
+   0 <= flow(Bus1_storage_2_5) <= +inf
+   0 <= flow(Bus1_Sink_2_5) <= +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_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_total(Bus1_storage_0) <= +inf
-   0 <= InvestmentFlowBlock_total(Bus1_storage_1) <= +inf
-   0 <= InvestmentFlowBlock_total(Bus1_storage_2) <= +inf
+   0 <= InvestmentFlowBlock_old(Bus1_Sink_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_total(storage_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_Bus1_2) <= +inf
-   0 <= InvestmentFlowBlock_old(Bus1_Sink_0) <= +inf
-   0 <= InvestmentFlowBlock_old(Bus1_Sink_1) <= +inf
-   0 <= InvestmentFlowBlock_old(Bus1_Sink_2) <= +inf
-   0 <= InvestmentFlowBlock_old(Bus1_storage_0) <= +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_old(Source_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_old(Source_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_old(Source_Bus1_2) <= +inf
-   0 <= InvestmentFlowBlock_old(storage_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_old(storage_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_old(storage_Bus1_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_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(Bus1_storage_0) <= +inf
-   0 <= InvestmentFlowBlock_old_end(Bus1_storage_1) <= +inf
-   0 <= InvestmentFlowBlock_old_end(Bus1_storage_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(storage_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_old_end(storage_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_old_end(storage_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_exo(storage_Bus1_0) <= +inf
+   0 <= InvestmentFlowBlock_old_exo(storage_Bus1_1) <= +inf
+   0 <= InvestmentFlowBlock_old_exo(storage_Bus1_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(Bus1_storage_0) <= +inf
-   0 <= InvestmentFlowBlock_old_exo(Bus1_storage_1) <= +inf
-   0 <= InvestmentFlowBlock_old_exo(Bus1_storage_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(storage_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_old_exo(storage_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_old_exo(storage_Bus1_2) <= +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
-   0 <= GenericInvestmentStorageBlock_invest(storage_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_invest(storage_1) <= +inf
-   0 <= GenericInvestmentStorageBlock_invest(storage_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(storage_Bus1_0) <= +inf
+   0 <= InvestmentFlowBlock_old(Bus1_Sink_0) <= +inf
+   0 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +inf
+   0 <= InvestmentFlowBlock_old(Bus1_storage_0) <= +inf
    0 <= GenericInvestmentStorageBlock_total(storage_0) <= +inf
    0 <= GenericInvestmentStorageBlock_total(storage_1) <= +inf
-   0 <= GenericInvestmentStorageBlock_total(storage_2) <= +inf
-   0 <= GenericInvestmentStorageBlock_old(storage_0) <= +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
@@ -695,4 +685,11 @@ bounds
    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_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
 end
diff --git a/tests/lp_files/dsm_module_DIW.lp b/tests/lp_files/dsm_module_DIW.lp
index 33602611..33723887 100644
--- a/tests/lp_files/dsm_module_DIW.lp
+++ b/tests/lp_files/dsm_module_DIW.lp
@@ -3,13 +3,13 @@
 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.
@@ -39,28 +39,28 @@ c_e_SinkDSMDIWBlock_shift_shed_vars(demand_dsm_2)_:
 = 0
 
 c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_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_up(demand_dsm_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_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_up(demand_dsm_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_0_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_up(demand_dsm_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
 
 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_0) <= +inf
-   0 <= flow(bus_elec_demand_dsm_0_1) <= +inf
-   0 <= flow(bus_elec_demand_dsm_0_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
index 32a53f13..92ce70c7 100644
--- a/tests/lp_files/dsm_module_DIW_extended.lp
+++ b/tests/lp_files/dsm_module_DIW_extended.lp
@@ -2,21 +2,21 @@
 
 min 
 objective:
-+100 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1)
-+100 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0)
-+1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1)
-+1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2)
 +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_do_shift(demand_dsm_2_0)
-+1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1)
-+1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2)
++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.
 
@@ -33,47 +33,47 @@ c_e_BusBlock_balance(bus_elec_0_2)_:
 = 0
 
 c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_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)
 +1 flow(bus_elec_demand_dsm_0_0)
 = 1
 
 c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_1)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_1)
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1)
 +1 flow(bus_elec_demand_dsm_0_1)
-= 0.90000000000000002
+= 0.9
 
 c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_2)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_2)
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2)
 +1 flow(bus_elec_demand_dsm_0_2)
-= 0.80000000000000004
+= 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.98999999999999999 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)
++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.98999999999999999 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)
++0.99 SinkDSMDIWBlock_dsm_up(demand_dsm_2)
 -1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2)
-+0.98999999999999999 SinkDSMDIWBlock_dsm_up(demand_dsm_2)
 = 0
 
 c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_0)_:
@@ -82,51 +82,51 @@ c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_0)_:
 
 c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_1)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_1)
-<= 0.40000000000000002
+<= 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_shed(demand_dsm_0)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0)
-<= 0.29999999999999999
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0)
+<= 0.3
 
 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)
-<= 0.29999999999999999
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1)
+<= 0.3
 
 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)
-<= 0.40000000000000002
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2)
+<= 0.4
 
 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_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_up(demand_dsm_1)
-<= 0.40000000000000002
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1)
+<= 0.4
 
 c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_2)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_2)
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2)
 <= 0.5
 
 c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_0)_:
@@ -137,7 +137,7 @@ c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_0)_:
 c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_1)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_1)
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_2)
-<= 0.40000000000000002
+<= 0.4
 
 c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_2)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_2)
@@ -146,37 +146,34 @@ c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_2)_:
 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.59999999999999998
+<= 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.59999999999999998
+<= 0.6
 
 c_u_SinkDSMDIWBlock_shed_limit_constraint(demand_dsm_2)_:
 +1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2)
-<= 0.80000000000000004
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+<= 0.8
 
 bounds
-   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_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_2_1) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_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
    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
index 930cda48..e247e622 100644
--- a/tests/lp_files/dsm_module_DIW_extended_multi_period.lp
+++ b/tests/lp_files/dsm_module_DIW_extended_multi_period.lp
@@ -2,54 +2,54 @@
 
 min 
 objective:
-+100 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1)
-+98.039215686274503 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2)
-+98.039215686274503 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3)
-+96.116878123798529 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4)
-+96.116878123798529 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0)
-+1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_3)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_4)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_5)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0)
-+1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_3)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_4)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_5)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0)
-+1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_4)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_5)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_0)
-+1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_1)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_5)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_0)
-+1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_1)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_2)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_0)
-+1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_1)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_2)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_3)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5)
++100 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0)
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_0)
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_1)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_up(demand_dsm_2)
-+0.98039215686274506 SinkDSMDIWBlock_dsm_up(demand_dsm_3)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_up(demand_dsm_4)
-+0.96116878123798533 SinkDSMDIWBlock_dsm_up(demand_dsm_5)
++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.
 
@@ -78,95 +78,95 @@ c_e_BusBlock_balance(bus_elec_2_5)_:
 = 0
 
 c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_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)
 +1 flow(bus_elec_demand_dsm_0_0)
 = 1
 
 c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_1)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_1)
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1)
 +1 flow(bus_elec_demand_dsm_0_1)
-= 0.90000000000000002
+= 0.9
 
 c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_1_2)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_2)
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2)
 +1 flow(bus_elec_demand_dsm_1_2)
-= 0.80000000000000004
+= 0.8
 
 c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_1_3)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_3)
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3)
 +1 flow(bus_elec_demand_dsm_1_3)
-= 0.69999999999999996
+= 0.7
 
 c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_2_4)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_4)
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4)
 +1 flow(bus_elec_demand_dsm_2_4)
-= 0.69999999999999996
+= 0.7
 
 c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_2_5)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_5)
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5)
 +1 flow(bus_elec_demand_dsm_2_5)
-= 0.69999999999999996
+= 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.98999999999999999 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)
++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.98999999999999999 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)
++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.98999999999999999 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)
++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.98999999999999999 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)
++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.98999999999999999 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)
++0.99 SinkDSMDIWBlock_dsm_up(demand_dsm_5)
 -1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5)
-+0.98999999999999999 SinkDSMDIWBlock_dsm_up(demand_dsm_5)
 = 0
 
 c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_0)_:
@@ -175,7 +175,7 @@ c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_0)_:
 
 c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_1)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_1)
-<= 0.40000000000000002
+<= 0.4
 
 c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_2)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_2)
@@ -183,101 +183,101 @@ c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_2)_:
 
 c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_3)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_3)
-<= 0.29999999999999999
+<= 0.3
 
 c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_4)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_4)
-<= 0.29999999999999999
+<= 0.3
 
 c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_5)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_5)
-<= 0.29999999999999999
+<= 0.3
 
 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)
-<= 0.29999999999999999
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_0)
+<= 0.3
 
 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)
-<= 0.29999999999999999
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1)
+<= 0.3
 
 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_shift(demand_dsm_3_2)
-<= 0.40000000000000002
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2)
+<= 0.4
 
 c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_3)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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)
-<= 0.29999999999999999
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3)
+<= 0.3
 
 c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_4)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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)
-<= 0.29999999999999999
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4)
+<= 0.3
 
 c_u_SinkDSMDIWBlock_dsm_do_constraint(demand_dsm_5)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5)
-<= 0.29999999999999999
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5)
+<= 0.3
 
 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_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_up(demand_dsm_1)
-<= 0.40000000000000002
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_1)
+<= 0.4
 
 c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_2)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_2)
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_2)
 <= 0.5
 
 c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_3)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_3)
-<= 0.29999999999999999
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_3)
+<= 0.3
 
 c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_4)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_4)
-<= 0.29999999999999999
++1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_4)
+<= 0.3
 
 c_u_SinkDSMDIWBlock_C2_constraint(demand_dsm_5)_:
-+1 SinkDSMDIWBlock_dsm_do_shed(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_up(demand_dsm_5)
-<= 0.29999999999999999
++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)
@@ -287,7 +287,7 @@ c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_0)_:
 c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_1)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_1)
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_2)
-<= 0.40000000000000002
+<= 0.4
 
 c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_2)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_2)
@@ -297,102 +297,99 @@ c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_2)_:
 c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_3)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_3)
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_4)
-<= 0.29999999999999999
+<= 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.29999999999999999
+<= 0.3
 
 c_u_SinkDSMDIWBlock_recovery_constraint(demand_dsm_5)_:
 +1 SinkDSMDIWBlock_dsm_up(demand_dsm_5)
-<= 0.29999999999999999
+<= 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.59999999999999998
+<= 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.59999999999999998
+<= 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.80000000000000004
+<= 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.59999999999999998
+<= 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.59999999999999998
+<= 0.6
 
 c_u_SinkDSMDIWBlock_shed_limit_constraint(demand_dsm_5)_:
 +1 SinkDSMDIWBlock_dsm_do_shed(demand_dsm_5)
-<= 0.59999999999999998
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+<= 0.6
 
 bounds
-   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_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_0_3) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_4) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_5) <= +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_1_3) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_5) <= +inf
    0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_5) <= +inf
    0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_0) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_1) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_5) <= +inf
    0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_0) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_1) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_2) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) <= +inf
    0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_0) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_1) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_2) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_3) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_4) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_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_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 2ac4f693..ee3ccfb2 100644
--- a/tests/lp_files/dsm_module_DIW_invest.lp
+++ b/tests/lp_files/dsm_module_DIW_invest.lp
@@ -2,21 +2,21 @@
 
 min 
 objective:
-+100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1)
-+100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2)
 +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_2)
 +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2)
 +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_0)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2)
++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.
 
@@ -33,52 +33,52 @@ c_e_BusBlock_balance(bus_elec_0_2)_:
 = 0
 
 c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_0)_:
--1 SinkDSMDIWInvestmentBlock_invest(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_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_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_do_shed(demand_dsm_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_dsm_do_shed(demand_dsm_1)
 +1 flow(bus_elec_demand_dsm_0_1)
 = 1
 
 c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_0_2)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_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_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_0)_:
@@ -97,91 +97,88 @@ c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_0_2)_:
 <= 0
 
 c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_0_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_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_shed(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_dsm_do_constraint(demand_dsm_0_2)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(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_shed(demand_dsm_2)
 -0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0)
 <= 0
 
 c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_0_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_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_do_shed(demand_dsm_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_dsm_do_shed(demand_dsm_1)
 -0.5 SinkDSMDIWInvestmentBlock_total(demand_dsm_0)
 <= 0
 
 c_u_SinkDSMDIWInvestmentBlock_C2_constraint(demand_dsm_0_2)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_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_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 SinkDSMDIWInvestmentBlock_total(demand_dsm_0)
+-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 SinkDSMDIWInvestmentBlock_total(demand_dsm_0)
+-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_0)
 <= 0
 
 c_u_SinkDSMDIWInvestmentBlock_shed_limit_constraint(demand_dsm_0_2)_:
 +1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2)
--1 SinkDSMDIWInvestmentBlock_total(demand_dsm_0)
+-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_0)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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
-   33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_0) <= 100
-   0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_0) <= +inf
    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
index 1f85adf6..a0302236 100644
--- a/tests/lp_files/dsm_module_DIW_invest_multi_period.lp
+++ b/tests/lp_files/dsm_module_DIW_invest_multi_period.lp
@@ -2,58 +2,58 @@
 
 min 
 objective:
-+100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_1)
-+98.039215686274503 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_2)
-+98.039215686274503 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_3)
-+96.116878123798529 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_4)
-+96.116878123798529 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_5)
++15992.031251718836 ONE_VAR_CONSTANT
 +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_0)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_1)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_2)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_3)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_4)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_5)
 +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_0)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_1)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_2)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_3)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_4)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_5)
 +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_0)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_1)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_3)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_4)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_5)
 +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_0)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_1)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_2)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_3)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_4)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_5)
 +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_0)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_1)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_2)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_3)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_4)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_5)
 +1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_0)
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_1)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_2)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_3)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_4)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_5)
++100 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_0)
 +1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0)
 +1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2)
-+0.98039215686274506 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_3)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_4)
-+0.96116878123798533 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_5)
++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.5314736691401 SinkDSMDIWInvestmentBlock_invest(demand_dsm_1)
-+425.73027329942335 SinkDSMDIWInvestmentBlock_invest(demand_dsm_2)
-+15992.031251718836 ONE_VAR_CONSTANT
++440.53147366914004 SinkDSMDIWInvestmentBlock_invest(demand_dsm_1)
++425.7302732994234 SinkDSMDIWInvestmentBlock_invest(demand_dsm_2)
 
 s.t.
 
@@ -88,16 +88,16 @@ c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_0)_:
 
 c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(demand_dsm_1)_:
 -1 SinkDSMDIWInvestmentBlock_invest(demand_dsm_1)
-+1 SinkDSMDIWInvestmentBlock_old(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_old(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)_:
@@ -125,9 +125,9 @@ c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(demand_dsm_2)_:
 = 0
 
 c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_0)_:
-+1 SinkDSMDIWInvestmentBlock_old(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)_:
@@ -143,95 +143,95 @@ c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(demand_dsm_2)_:
 = 0
 
 c_e_SinkDSMDIWInvestmentBlock_input_output_relation(demand_dsm_0_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_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_do_shed(demand_dsm_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_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_do_shed(demand_dsm_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_up(demand_dsm_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_do_shed(demand_dsm_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_up(demand_dsm_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_do_shed(demand_dsm_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_up(demand_dsm_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_do_shed(demand_dsm_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_up(demand_dsm_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_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_up(demand_dsm_2)
 -1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_2)
 -1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_3)
-+1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2)
 = 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)
-+1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_3)
 = 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)
-+1 SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_4)
 = 0
 
 c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(demand_dsm_5)_:
 -1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_4)
--1 SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_5)
 +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)_:
@@ -265,136 +265,136 @@ c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(demand_dsm_2_5)_:
 <= 0
 
 c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(demand_dsm_0_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_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_shed(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_dsm_do_constraint(demand_dsm_1_2)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(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_dsm_do_constraint(demand_dsm_1_3)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(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_dsm_do_constraint(demand_dsm_2_4)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(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_dsm_do_constraint(demand_dsm_2_5)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(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_C2_constraint(demand_dsm_0_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_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_do_shed(demand_dsm_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_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_do_shed(demand_dsm_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_up(demand_dsm_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_do_shed(demand_dsm_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_up(demand_dsm_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_do_shed(demand_dsm_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_up(demand_dsm_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_do_shed(demand_dsm_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_up(demand_dsm_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 SinkDSMDIWInvestmentBlock_total(demand_dsm_0)
+-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 SinkDSMDIWInvestmentBlock_total(demand_dsm_0)
+-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 SinkDSMDIWInvestmentBlock_total(demand_dsm_1)
+-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 SinkDSMDIWInvestmentBlock_total(demand_dsm_1)
+-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 SinkDSMDIWInvestmentBlock_total(demand_dsm_2)
+-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 SinkDSMDIWInvestmentBlock_total(demand_dsm_2)
+-1.0 SinkDSMDIWInvestmentBlock_total(demand_dsm_2)
 <= 0
 
 c_u_SinkDSMDIWInvestmentBlock_overall_dsm_maximum(demand_dsm_0)_:
@@ -413,24 +413,69 @@ c_l_SinkDSMDIWInvestmentBlock_overall_minimum(demand_dsm)_:
 +1 SinkDSMDIWInvestmentBlock_total(demand_dsm_2)
 >= 5
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 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
-   33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_0) <= 100
-   33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_1) <= 100
-   33 <= SinkDSMDIWInvestmentBlock_invest(demand_dsm_2) <= 100
    0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_0) <= +inf
    0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_total(demand_dsm_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_old(demand_dsm_0) <= +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
@@ -438,52 +483,5 @@ bounds
    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_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_0_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_0_5) <= +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_1_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_1_5) <= +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_shift(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_2_5) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_3_5) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_4_5) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(demand_dsm_5_5) <= +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_do_shed(demand_dsm_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shed(demand_dsm_5) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(demand_dsm_5) <= +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
index 0f987d8d..a1be324b 100644
--- a/tests/lp_files/dsm_module_DIW_multi_period.lp
+++ b/tests/lp_files/dsm_module_DIW_multi_period.lp
@@ -3,40 +3,40 @@
 min 
 objective:
 +2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_0)
-+2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_1)
-+1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_2)
-+1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_3)
-+1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_4)
-+1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_5)
 +2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_0)
-+2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_1)
-+1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_2)
-+1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_3)
-+1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_4)
-+1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_5)
 +2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0)
-+2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1)
-+1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2)
-+1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3)
-+1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_4)
-+1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_5)
 +2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_0)
-+2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_1)
-+1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2)
-+1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3)
-+1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4)
-+1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_5)
 +2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_0)
-+2 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_1)
-+1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_2)
-+1.9607843137254901 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3)
-+1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4)
-+1.9223375624759707 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5)
 +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.
@@ -90,55 +90,55 @@ c_e_SinkDSMDIWBlock_shift_shed_vars(demand_dsm_5)_:
 = 0
 
 c_e_SinkDSMDIWBlock_input_output_relation(demand_dsm_0_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_up(demand_dsm_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_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_up(demand_dsm_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_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_shift(demand_dsm_3_2)
--1 SinkDSMDIWBlock_dsm_up(demand_dsm_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_shed(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_up(demand_dsm_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_shed(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_up(demand_dsm_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_shed(demand_dsm_5)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5)
 +1 SinkDSMDIWBlock_dsm_do_shift(demand_dsm_5_5)
--1 SinkDSMDIWBlock_dsm_up(demand_dsm_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)_:
@@ -206,137 +206,134 @@ c_u_SinkDSMDIWBlock_dsm_up_constraint(demand_dsm_5)_:
 <= 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_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_shed(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_shed(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_shed(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_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_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_shed(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_shed(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_shed(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
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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_0_3) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_4) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_0_5) <= +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_1_3) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_1_5) <= +inf
    0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_0) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_1) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_2) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_2_5) <= +inf
    0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_0) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_1) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_2) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_3) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_4) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_3_5) <= +inf
    0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_0) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_1) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_2) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_3) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_4) <= +inf
-   0 <= SinkDSMDIWBlock_dsm_do_shift(demand_dsm_4_5) <= +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
diff --git a/tests/lp_files/dsm_module_DLR.lp b/tests/lp_files/dsm_module_DLR.lp
index 3c72179e..e6aa3475 100644
--- a/tests/lp_files/dsm_module_DLR.lp
+++ b/tests/lp_files/dsm_module_DLR.lp
@@ -2,18 +2,18 @@
 
 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.
 
@@ -54,42 +54,42 @@ c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_2_2)_:
 = 0
 
 c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_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 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_balance_dsm_up(demand_dsm_1_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_balance_dsm_up(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 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_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_balance_dsm_up(demand_dsm_1_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_balance_dsm_up(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 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
 
 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_0) <= +inf
-   0 <= flow(bus_elec_demand_dsm_0_1) <= +inf
-   0 <= flow(bus_elec_demand_dsm_0_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
index 40d8530d..21997cf8 100644
--- a/tests/lp_files/dsm_module_DLR_delay_time.lp
+++ b/tests/lp_files/dsm_module_DLR_delay_time.lp
@@ -2,18 +2,18 @@
 
 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_3_0)
 +2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_0)
-+2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_1)
-+2 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_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_3_0)
++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.
 
@@ -54,42 +54,42 @@ c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_3_2)_:
 = 0
 
 c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_0)_:
--1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0)
--1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_0)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_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_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_balance_dsm_up(demand_dsm_1_1)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_1)
-+1 SinkDSMDLRBlock_dsm_do_shed(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_dsm_up(demand_dsm_1_1)
--1 SinkDSMDLRBlock_dsm_up(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_balance_dsm_up(demand_dsm_1_2)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_2)
-+1 SinkDSMDLRBlock_dsm_do_shed(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_dsm_up(demand_dsm_1_2)
--1 SinkDSMDLRBlock_dsm_up(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)_:
@@ -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_3_0)_:
@@ -115,13 +115,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_3_0)_:
@@ -161,72 +161,72 @@ c_e_SinkDSMDLRBlock_no_comp_inc(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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_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_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)
 <= 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_3_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_balance_dsm_do(demand_dsm_1_2)
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_3_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_level(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_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_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_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_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)_:
@@ -236,19 +236,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_3_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_balance_dsm_up(demand_dsm_1_2)
--1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_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
@@ -278,75 +278,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_3_0)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_3_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_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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_1)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_2)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_3_2)
 <= 0.5
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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_3_0) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_1) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_3_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_3_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_3_0) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_3_1) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_3_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_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_balance_dsm_do(demand_dsm_3_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_3_0) <= +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
diff --git a/tests/lp_files/dsm_module_DLR_extended.lp b/tests/lp_files/dsm_module_DLR_extended.lp
index 33ff298b..3c09f5fe 100644
--- a/tests/lp_files/dsm_module_DLR_extended.lp
+++ b/tests/lp_files/dsm_module_DLR_extended.lp
@@ -2,33 +2,33 @@
 
 min 
 objective:
++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0)
 +1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0)
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1)
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2)
++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0)
 +1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0)
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1)
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2)
++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0)
 +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2)
++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0)
 +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2)
 +100 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1)
-+100 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_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_dsm_do_shift(demand_dsm_1_2)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0)
++1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1)
 +1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_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_dsm_up(demand_dsm_2_0)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1)
++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.
 
@@ -45,56 +45,56 @@ c_e_BusBlock_balance(bus_elec_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 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0)
--1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0)
--1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_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 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_0_1)
-= 0.90000000000000002
+= 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 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_0_2)
-= 0.80000000000000004
+= 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 SinkDSMDLRBlock_balance_dsm_do(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 SinkDSMDLRBlock_balance_dsm_do(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)_:
@@ -102,8 +102,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.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)_:
@@ -111,13 +111,13 @@ c_e_SinkDSMDLRBlock_capacity_balance_inc(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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0)
 = 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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1)
 = 0
 
 c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_0)_:
@@ -125,77 +125,77 @@ c_e_SinkDSMDLRBlock_capacity_balance_inc(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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0)
 = 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.29999999999999999
+<= 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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1)
-<= 0.29999999999999999
+<= 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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2)
-<= 0.40000000000000002
+<= 0.4
 
 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)
-<= 0.40000000000000002
++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1)
+<= 0.4
 
 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)_:
--0.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1)
--0.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1)
-+1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0)
--1 SinkDSMDLRBlock_dsm_do_level(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.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2)
--0.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2)
-+1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1)
--1 SinkDSMDLRBlock_dsm_do_level(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)_:
@@ -205,105 +205,102 @@ c_e_SinkDSMDLRBlock_dr_storage_inc(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)
-+0.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1)
-+0.98999999999999999 SinkDSMDLRBlock_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)
-+0.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2)
-+0.98999999999999999 SinkDSMDLRBlock_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.33333333333333331
+<= 0.3333333333333333
 
 c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_1)_:
 +1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1)
-<= 0.33333333333333331
+<= 0.3333333333333333
 
 c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_2)_:
 +1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2)
-<= 0.33333333333333331
+<= 0.3333333333333333
 
 c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_0)_:
 +1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0)
-<= 0.46666666666666662
+<= 0.4666666666666666
 
 c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_1)_:
 +1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_1)
-<= 0.46666666666666662
+<= 0.4666666666666666
 
 c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_2)_:
 +1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_2)
-<= 0.46666666666666662
+<= 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.333333333333329
+<= 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_1_1)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2)
 +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.333333333333329
+<= 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_1_1)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2)
 +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
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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_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_balance_dsm_up(demand_dsm_2_0) <= +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_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_balance_dsm_do(demand_dsm_2_0) <= +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_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
diff --git a/tests/lp_files/dsm_module_DLR_extended_multi_period.lp b/tests/lp_files/dsm_module_DLR_extended_multi_period.lp
index 4afd5f9c..1626a1bf 100644
--- a/tests/lp_files/dsm_module_DLR_extended_multi_period.lp
+++ b/tests/lp_files/dsm_module_DLR_extended_multi_period.lp
@@ -2,60 +2,60 @@
 
 min 
 objective:
++1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0)
 +1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_0)
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1)
-+0.98039215686274506 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2)
-+0.98039215686274506 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3)
-+0.96116878123798533 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4)
-+0.96116878123798533 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5)
++1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0)
 +1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0)
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1)
-+0.98039215686274506 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2)
-+0.98039215686274506 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3)
-+0.96116878123798533 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4)
-+0.96116878123798533 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5)
++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0)
 +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_1)
-+0.98039215686274506 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2)
-+0.98039215686274506 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3)
-+0.96116878123798533 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4)
-+0.96116878123798533 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5)
++1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0)
 +1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1)
-+0.98039215686274506 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2)
-+0.98039215686274506 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3)
-+0.96116878123798533 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4)
-+0.96116878123798533 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5)
 +100 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_1)
-+98.039215686274503 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_2)
-+98.039215686274503 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_3)
-+96.116878123798529 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_4)
-+96.116878123798529 SinkDSMDLRBlock_dsm_do_shed(demand_dsm_5)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1)
-+0.98039215686274506 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2)
-+0.98039215686274506 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3)
-+0.96116878123798533 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4)
-+0.96116878123798533 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1)
-+0.98039215686274506 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2)
-+0.98039215686274506 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3)
-+0.96116878123798533 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4)
-+0.96116878123798533 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0)
 +1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1)
-+0.98039215686274506 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2)
-+0.98039215686274506 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3)
-+0.96116878123798533 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4)
-+0.96116878123798533 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0)
++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1)
 +1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1)
-+0.98039215686274506 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2)
-+0.98039215686274506 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3)
-+0.96116878123798533 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4)
-+0.96116878123798533 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5)
++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.
 
@@ -84,110 +84,110 @@ c_e_BusBlock_balance(bus_elec_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 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_0)
--1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0)
--1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_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 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_0_1)
-= 0.90000000000000002
+= 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 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_1_2)
-= 0.80000000000000004
+= 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 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3)
--1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3)
--1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3)
 +1 flow(bus_elec_demand_dsm_1_3)
-= 0.69999999999999996
+= 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 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4)
--1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4)
--1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_4)
 +1 flow(bus_elec_demand_dsm_2_4)
-= 0.69999999999999996
+= 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 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5)
--1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5)
--1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5)
 +1 flow(bus_elec_demand_dsm_2_5)
-= 0.69999999999999996
+= 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 SinkDSMDLRBlock_balance_dsm_do(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 SinkDSMDLRBlock_balance_dsm_do(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 SinkDSMDLRBlock_balance_dsm_do(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 SinkDSMDLRBlock_balance_dsm_do(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 SinkDSMDLRBlock_balance_dsm_do(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)_:
@@ -195,23 +195,23 @@ 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.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 SinkDSMDLRBlock_balance_dsm_do(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 SinkDSMDLRBlock_balance_dsm_do(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 SinkDSMDLRBlock_balance_dsm_do(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)_:
@@ -219,28 +219,28 @@ c_e_SinkDSMDLRBlock_capacity_balance_inc(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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_0)
 = 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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1)
 = 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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2)
 = 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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3)
 = 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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4)
 = 0
 
 c_e_SinkDSMDLRBlock_capacity_balance_inc(demand_dsm_2_0)_:
@@ -248,164 +248,164 @@ c_e_SinkDSMDLRBlock_capacity_balance_inc(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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_2_0)
 = 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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_2_1)
 = 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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_2_2)
 = 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.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_2_3)
 = 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.29999999999999999
+<= 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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_1)
-<= 0.29999999999999999
+<= 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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_2)
-<= 0.40000000000000002
+<= 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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3)
-<= 0.29999999999999999
+<= 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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4)
-<= 0.29999999999999999
+<= 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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5)
-<= 0.29999999999999999
+<= 0.3
 
 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)
-<= 0.40000000000000002
++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1)
+<= 0.4
 
 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_u_SinkDSMDLRBlock_availability_inc(demand_dsm_3)_:
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3)
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_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)
-<= 0.29999999999999999
++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3)
+<= 0.3
 
 c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_4)_:
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4)
-+1 SinkDSMDLRBlock_balance_dsm_do(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)
-<= 0.29999999999999999
++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4)
+<= 0.3
 
 c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_5)_:
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5)
-+1 SinkDSMDLRBlock_balance_dsm_do(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)
-<= 0.29999999999999999
++1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5)
+<= 0.3
 
 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)_:
--0.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_1)
--0.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_1)
-+1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_0)
--1 SinkDSMDLRBlock_dsm_do_level(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.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_2)
--0.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_2)
-+1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1)
--1 SinkDSMDLRBlock_dsm_do_level(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.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3)
--0.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_3)
-+1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2)
--1 SinkDSMDLRBlock_dsm_do_level(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.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4)
--0.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4)
-+1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_3)
--1 SinkDSMDLRBlock_dsm_do_level(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.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5)
--0.98999999999999999 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5)
-+1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_4)
--1 SinkDSMDLRBlock_dsm_do_level(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)_:
@@ -415,73 +415,73 @@ c_e_SinkDSMDLRBlock_dr_storage_inc(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)
-+0.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_1)
-+0.98999999999999999 SinkDSMDLRBlock_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)
-+0.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2)
-+0.98999999999999999 SinkDSMDLRBlock_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)
-+0.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3)
-+0.98999999999999999 SinkDSMDLRBlock_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)
-+0.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4)
-+0.98999999999999999 SinkDSMDLRBlock_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)
-+0.98999999999999999 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5)
-+0.98999999999999999 SinkDSMDLRBlock_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.31666666666666671
+<= 0.3166666666666667
 
 c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_1)_:
 +1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_1)
-<= 0.31666666666666671
+<= 0.3166666666666667
 
 c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_2)_:
 +1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_2)
-<= 0.31666666666666671
+<= 0.3166666666666667
 
 c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_3)_:
 +1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_3)
-<= 0.31666666666666671
+<= 0.3166666666666667
 
 c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_4)_:
 +1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_4)
-<= 0.31666666666666671
+<= 0.3166666666666667
 
 c_u_SinkDSMDLRBlock_dr_storage_limit_red(demand_dsm_5)_:
 +1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_5)
-<= 0.31666666666666671
+<= 0.3166666666666667
 
 c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_0)_:
 +1 SinkDSMDLRBlock_dsm_up_level(demand_dsm_0)
@@ -510,190 +510,187 @@ c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_5)_:
 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.666666666666671
+<= 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.666666666666671
+<= 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.666666666666671
+<= 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_1_1)
 +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.666666666666671
+<= 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_1_3)
 +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.666666666666671
+<= 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_1_5)
 +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.666666666666671
+<= 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_1_1)
 +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.333333333333329
+<= 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_1_3)
 +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.333333333333329
+<= 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_1_5)
 +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.333333333333329
+<= 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_1_1)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3)
 +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.31666666666666671
+<= 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_1_2)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4)
 +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.31666666666666671
+<= 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_1_3)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5)
 +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.31666666666666671
+<= 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_1_1)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_2)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3)
 +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_1_2)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4)
 +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_1_3)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5)
 +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
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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_dsm_do_shift(demand_dsm_1_1) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) <= +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_shift(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5) <= +inf
+   0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) <= +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_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_1_3) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) <= +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_dsm_up(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) <= +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_balance_dsm_do(demand_dsm_1_3) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) <= +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_do(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) <= +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_1_3) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) <= +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_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
diff --git a/tests/lp_files/dsm_module_DLR_invest.lp b/tests/lp_files/dsm_module_DLR_invest.lp
index c6c472ed..c7404697 100644
--- a/tests/lp_files/dsm_module_DLR_invest.lp
+++ b/tests/lp_files/dsm_module_DLR_invest.lp
@@ -2,33 +2,33 @@
 
 min 
 objective:
++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0)
 +1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2)
++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0)
 +1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2)
++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0)
 +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2)
++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0)
 +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2)
 +100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1)
-+100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_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_dsm_do_shift(demand_dsm_1_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0)
++1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_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_dsm_up(demand_dsm_2_0)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1)
++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.
 
@@ -45,46 +45,46 @@ c_e_BusBlock_balance(bus_elec_0_2)_:
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_0)_:
--1 SinkDSMDLRInvestmentBlock_invest(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_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 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 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 flow(bus_elec_demand_dsm_0_1)
 = 1
 
 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 flow(bus_elec_demand_dsm_0_2)
 = 1
 
@@ -93,13 +93,13 @@ c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(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)_:
@@ -107,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)_:
@@ -116,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)_:
@@ -130,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)_:
@@ -159,78 +159,78 @@ c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(demand_dsm_2_2)_:
 = 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_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1)
 -0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0)
 <= 0
 
 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_total(demand_dsm_0)
 <= 0
 
 c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_0_0)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_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_balance_dsm_do(demand_dsm_1_1)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_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_0_2)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_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_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)_:
@@ -240,135 +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_0)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_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_0_2)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_2)
 -0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0)
++1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_2)
 <= 0
 
 c_u_SinkDSMDLRInvestmentBlock_dr_storage_limit_inc(demand_dsm_0_0)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_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_0_2)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_2)
 -0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_0)
++1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_2)
 <= 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 SinkDSMDLRInvestmentBlock_total(demand_dsm_0)
+-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_0)
 <= 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_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)
-+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_total(demand_dsm_0)
 <= 0
 
 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_total(demand_dsm_0)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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
-   33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_0) <= 100
-   0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_0) <= +inf
+   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
index 7af8287d..49a0840f 100644
--- a/tests/lp_files/dsm_module_DLR_invest_multi_period.lp
+++ b/tests/lp_files/dsm_module_DLR_invest_multi_period.lp
@@ -2,64 +2,64 @@
 
 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_balance_dsm_do(demand_dsm_1_1)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_2)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_3)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_4)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_5)
++1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0)
 +1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_1)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_2)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_3)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_4)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_5)
++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0)
 +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_1)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_2)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_3)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_4)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_5)
++1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0)
 +1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_3)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_4)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_5)
 +100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_1)
-+98.039215686274503 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_2)
-+98.039215686274503 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_3)
-+96.116878123798529 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_4)
-+96.116878123798529 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_3)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_0)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_1)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_2)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_3)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_4)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_0)
 +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_1)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_2)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_3)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_4)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_0)
++1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_1)
 +1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_1)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_2)
-+0.98039215686274506 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_3)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_4)
-+0.96116878123798533 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_5)
++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.5314736691401 SinkDSMDLRInvestmentBlock_invest(demand_dsm_1)
-+425.73027329942335 SinkDSMDLRInvestmentBlock_invest(demand_dsm_2)
-+15992.031251718836 ONE_VAR_CONSTANT
++440.53147366914004 SinkDSMDLRInvestmentBlock_invest(demand_dsm_1)
++425.7302732994234 SinkDSMDLRInvestmentBlock_invest(demand_dsm_2)
 
 s.t.
 
@@ -94,16 +94,16 @@ c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_0)_:
 
 c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(demand_dsm_1)_:
 -1 SinkDSMDLRInvestmentBlock_invest(demand_dsm_1)
-+1 SinkDSMDLRInvestmentBlock_old(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_old(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)_:
@@ -131,9 +131,9 @@ c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(demand_dsm_2)_:
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(demand_dsm_0)_:
-+1 SinkDSMDLRInvestmentBlock_old(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)_:
@@ -149,80 +149,80 @@ c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(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 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 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 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 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 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 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 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_3)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_3)
--1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_3)
--1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_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 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_4)
--1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_4)
--1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_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 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5)
--1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_5)
--1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_5)
 +1 flow(bus_elec_demand_dsm_2_5)
 = 3
 
@@ -231,28 +231,28 @@ c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(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_1_3)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(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_balance_dsm_do(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_balance_dsm_do(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)_:
@@ -260,23 +260,23 @@ 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_red(demand_dsm_2_3)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(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_balance_dsm_do(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_balance_dsm_do(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)_:
@@ -284,28 +284,28 @@ 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_1_3)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(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_balance_dsm_up(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_balance_dsm_up(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)_:
@@ -313,23 +313,23 @@ 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_capacity_balance_inc(demand_dsm_2_3)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(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_balance_dsm_up(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_balance_dsm_up(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)_:
@@ -357,156 +357,156 @@ c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_0)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_1)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_3)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5)
 -0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2)
 <= 0
 
 c_u_SinkDSMDLRInvestmentBlock_availability_inc(demand_dsm_0_0)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_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_balance_dsm_do(demand_dsm_1_1)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_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_balance_dsm_do(demand_dsm_1_2)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_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_balance_dsm_do(demand_dsm_1_3)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_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_balance_dsm_do(demand_dsm_1_4)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(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_balance_dsm_do(demand_dsm_1_5)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(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_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_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_level(demand_dsm_2)
--1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_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_level(demand_dsm_3)
--1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_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_level(demand_dsm_4)
--1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_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)_:
@@ -516,108 +516,108 @@ 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_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(demand_dsm_3)_:
--1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_3)
--1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_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_balance_dsm_up(demand_dsm_1_4)
--1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_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_balance_dsm_up(demand_dsm_1_5)
--1 SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(demand_dsm_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)_:
@@ -627,7 +627,7 @@ c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_0)_:
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_3)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_4)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_5)
--50 SinkDSMDLRInvestmentBlock_total(demand_dsm_0)
+-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_0)
 <= 0
 
 c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_1)_:
@@ -637,7 +637,7 @@ c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_1)_:
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_3)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_4)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_5)
--50 SinkDSMDLRInvestmentBlock_total(demand_dsm_1)
+-50.0 SinkDSMDLRInvestmentBlock_total(demand_dsm_1)
 <= 0
 
 c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_2)_:
@@ -647,84 +647,84 @@ c_u_SinkDSMDLRInvestmentBlock_dr_yearly_limit_shed(demand_dsm_2)_:
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_3)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_4)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_5)
--50 SinkDSMDLRInvestmentBlock_total(demand_dsm_2)
+-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)
-+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_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)
-+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_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)
-+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_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_3)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_3)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_3)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_4)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_4)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_5)
 -0.5 SinkDSMDLRInvestmentBlock_total(demand_dsm_2)
 <= 0
 
@@ -744,24 +744,75 @@ c_l_SinkDSMDLRInvestmentBlock_overall_minimum(demand_dsm)_:
 +1 SinkDSMDLRInvestmentBlock_total(demand_dsm_2)
 >= 5
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 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
-   33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_0) <= 100
-   33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_1) <= 100
-   33 <= SinkDSMDLRInvestmentBlock_invest(demand_dsm_2) <= 100
    0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_0) <= +inf
    0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_1) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_total(demand_dsm_2) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_old(demand_dsm_0) <= +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
@@ -769,60 +820,7 @@ bounds
    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_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_dsm_do_shift(demand_dsm_1_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_1_5) <= +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_dsm_do_shift(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(demand_dsm_2_5) <= +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_do_shed(demand_dsm_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shed(demand_dsm_5) <= +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_1_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_1_5) <= +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_dsm_up(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_up(demand_dsm_2_5) <= +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_1_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_1_5) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_0) <= +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_do(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(demand_dsm_2_5) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_0) <= +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_1_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_1_5) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_0) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_1) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_2) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(demand_dsm_2_5) <= +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
diff --git a/tests/lp_files/dsm_module_DLR_multi_period.lp b/tests/lp_files/dsm_module_DLR_multi_period.lp
index c3b961db..c9ff2e69 100644
--- a/tests/lp_files/dsm_module_DLR_multi_period.lp
+++ b/tests/lp_files/dsm_module_DLR_multi_period.lp
@@ -2,30 +2,30 @@
 
 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)
-+1.9607843137254901 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_2)
-+1.9607843137254901 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3)
-+1.9223375624759707 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4)
-+1.9223375624759707 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5)
++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)
-+1.9607843137254901 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2)
-+1.9607843137254901 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3)
-+1.9223375624759707 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4)
-+1.9223375624759707 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5)
-+2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_0)
 +2 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_1)
-+1.9607843137254901 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_2)
-+1.9607843137254901 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3)
-+1.9223375624759707 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4)
-+1.9223375624759707 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5)
-+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)
++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.
 
@@ -102,81 +102,81 @@ c_e_SinkDSMDLRBlock_shift_shed_vars(demand_dsm_2_5)_:
 = 0
 
 c_e_SinkDSMDLRBlock_input_output_relation(demand_dsm_0_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 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_balance_dsm_up(demand_dsm_1_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_balance_dsm_up(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 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_balance_dsm_up(demand_dsm_1_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_balance_dsm_up(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 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_balance_dsm_up(demand_dsm_1_3)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3)
-+1 SinkDSMDLRBlock_dsm_do_shed(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_dsm_up(demand_dsm_1_3)
--1 SinkDSMDLRBlock_dsm_up(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_balance_dsm_up(demand_dsm_1_4)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4)
-+1 SinkDSMDLRBlock_dsm_do_shed(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_dsm_up(demand_dsm_1_4)
--1 SinkDSMDLRBlock_dsm_up(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_balance_dsm_up(demand_dsm_1_5)
-+1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_5)
-+1 SinkDSMDLRBlock_dsm_do_shed(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_dsm_up(demand_dsm_1_5)
--1 SinkDSMDLRBlock_dsm_up(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)_:
@@ -184,28 +184,28 @@ 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_1_3)_:
-+1 SinkDSMDLRBlock_balance_dsm_do(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_balance_dsm_do(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_balance_dsm_do(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)_:
@@ -213,23 +213,23 @@ 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_red(demand_dsm_2_3)_:
-+1 SinkDSMDLRBlock_balance_dsm_do(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_balance_dsm_do(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_balance_dsm_do(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)_:
@@ -237,28 +237,28 @@ 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_1_3)_:
-+1 SinkDSMDLRBlock_balance_dsm_up(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_balance_dsm_up(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_balance_dsm_up(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)_:
@@ -266,23 +266,23 @@ 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_capacity_balance_inc(demand_dsm_2_3)_:
-+1 SinkDSMDLRBlock_balance_dsm_up(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_balance_dsm_up(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_balance_dsm_up(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)_:
@@ -310,144 +310,144 @@ c_e_SinkDSMDLRBlock_no_comp_inc(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)
-+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_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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5)
 <= 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_u_SinkDSMDLRBlock_availability_inc(demand_dsm_3)_:
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_3)
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_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_balance_dsm_do(demand_dsm_1_4)
-+1 SinkDSMDLRBlock_balance_dsm_do(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)
 <= 0.5
 
 c_u_SinkDSMDLRBlock_availability_inc(demand_dsm_5)_:
-+1 SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5)
-+1 SinkDSMDLRBlock_balance_dsm_do(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)
 <= 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_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_level(demand_dsm_2)
--1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_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_level(demand_dsm_3)
--1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_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_level(demand_dsm_4)
--1 SinkDSMDLRBlock_dsm_do_level(demand_dsm_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)_:
@@ -457,46 +457,46 @@ 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
 
 c_e_SinkDSMDLRBlock_dr_storage_inc(demand_dsm_3)_:
--1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_3)
--1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_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_balance_dsm_up(demand_dsm_1_4)
--1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_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_balance_dsm_up(demand_dsm_1_5)
--1 SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_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
@@ -550,141 +550,138 @@ c_u_SinkDSMDLRBlock_dr_storage_limit_inc(demand_dsm_5)_:
 <= 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_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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_3)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_3)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_3)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_4)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_4)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_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)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5)
-+1 SinkDSMDLRBlock_dsm_do_shift(demand_dsm_2_5)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_1_5)
-+1 SinkDSMDLRBlock_dsm_up(demand_dsm_2_5)
 <= 0.5
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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_dsm_do_shift(demand_dsm_1_3) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_do_shift(demand_dsm_1_5) <= +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_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_1_3) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_1_5) <= +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_dsm_up(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDLRBlock_dsm_up(demand_dsm_2_5) <= +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_balance_dsm_do(demand_dsm_1_3) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_1_5) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_0) <= +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_do(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_do(demand_dsm_2_5) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_0) <= +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_1_3) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_4) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_1_5) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_0) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_1) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_2) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_3) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_up(demand_dsm_2_4) <= +inf
-   0 <= SinkDSMDLRBlock_balance_dsm_up(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
diff --git a/tests/lp_files/dsm_module_oemof.lp b/tests/lp_files/dsm_module_oemof.lp
index 6b5c7404..416c4ee1 100644
--- a/tests/lp_files/dsm_module_oemof.lp
+++ b/tests/lp_files/dsm_module_oemof.lp
@@ -33,24 +33,24 @@ c_e_SinkDSMOemofBlock_shift_shed_vars(demand_dsm_2)_:
 = 0
 
 c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_0)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0)
--1 SinkDSMOemofBlock_dsm_up(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_shed(demand_dsm_1)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1)
--1 SinkDSMOemofBlock_dsm_up(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_0_2)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2)
--1 SinkDSMOemofBlock_dsm_up(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
 
 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_0) <= +inf
-   0 <= flow(bus_elec_demand_dsm_0_1) <= +inf
-   0 <= flow(bus_elec_demand_dsm_0_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
index 74543b81..3ebe9b45 100644
--- a/tests/lp_files/dsm_module_oemof_extended.lp
+++ b/tests/lp_files/dsm_module_oemof_extended.lp
@@ -2,15 +2,15 @@
 
 min 
 objective:
-+100 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1)
-+100 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0)
-+1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1)
-+1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2)
++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.
 
@@ -27,25 +27,25 @@ c_e_BusBlock_balance(bus_elec_0_2)_:
 = 0
 
 c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_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)
 -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_do_shed(demand_dsm_1)
-+1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_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.90000000000000002
+= 0.9
 
 c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_2)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2)
-+1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_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.80000000000000004
+= 0.8
 
 c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_0)_:
 +1 SinkDSMOemofBlock_dsm_up(demand_dsm_0)
@@ -53,48 +53,45 @@ 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)
-<= 0.29999999999999999
++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0)
+<= 0.3
 
 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.29999999999999999
++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1)
+<= 0.3
 
 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)
-<= 0.40000000000000002
++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.98999999999999999 SinkDSMOemofBlock_dsm_up(demand_dsm_0)
-+0.98999999999999999 SinkDSMOemofBlock_dsm_up(demand_dsm_1)
-= 0
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+= 0.0
 
 bounds
-   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_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_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_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
index e93d3a74..745854ca 100644
--- a/tests/lp_files/dsm_module_oemof_extended_multi_period.lp
+++ b/tests/lp_files/dsm_module_oemof_extended_multi_period.lp
@@ -2,24 +2,24 @@
 
 min 
 objective:
-+100 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1)
-+98.039215686274503 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2)
-+98.039215686274503 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3)
-+96.116878123798529 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4)
-+96.116878123798529 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0)
-+1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1)
-+0.98039215686274506 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2)
-+0.98039215686274506 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3)
-+0.96116878123798533 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4)
-+0.96116878123798533 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5)
++100 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0)
 +1 SinkDSMOemofBlock_dsm_up(demand_dsm_0)
 +1 SinkDSMOemofBlock_dsm_up(demand_dsm_1)
-+0.98039215686274506 SinkDSMOemofBlock_dsm_up(demand_dsm_2)
-+0.98039215686274506 SinkDSMOemofBlock_dsm_up(demand_dsm_3)
-+0.96116878123798533 SinkDSMOemofBlock_dsm_up(demand_dsm_4)
-+0.96116878123798533 SinkDSMOemofBlock_dsm_up(demand_dsm_5)
++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.
 
@@ -48,46 +48,46 @@ c_e_BusBlock_balance(bus_elec_2_5)_:
 = 0
 
 c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_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)
 -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_do_shed(demand_dsm_1)
-+1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_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.90000000000000002
+= 0.9
 
 c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_1_2)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2)
-+1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_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.80000000000000004
+= 0.8
 
 c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_1_3)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3)
-+1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_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.69999999999999996
+= 0.7
 
 c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_2_4)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4)
-+1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_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.69999999999999996
+= 0.7
 
 c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_2_5)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5)
-+1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_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.69999999999999996
+= 0.7
 
 c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_0)_:
 +1 SinkDSMOemofBlock_dsm_up(demand_dsm_0)
@@ -95,7 +95,7 @@ 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)
@@ -103,93 +103,90 @@ c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_2)_:
 
 c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_3)_:
 +1 SinkDSMOemofBlock_dsm_up(demand_dsm_3)
-<= 0.29999999999999999
+<= 0.3
 
 c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_4)_:
 +1 SinkDSMOemofBlock_dsm_up(demand_dsm_4)
-<= 0.29999999999999999
+<= 0.3
 
 c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_5)_:
 +1 SinkDSMOemofBlock_dsm_up(demand_dsm_5)
-<= 0.29999999999999999
+<= 0.3
 
 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)
-<= 0.29999999999999999
++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0)
+<= 0.3
 
 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.29999999999999999
++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_1)
+<= 0.3
 
 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)
-<= 0.40000000000000002
++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_2)
+<= 0.4
 
 c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_3)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3)
-<= 0.29999999999999999
++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3)
+<= 0.3
 
 c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_4)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4)
-<= 0.29999999999999999
++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4)
+<= 0.3
 
 c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_5)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5)
-<= 0.29999999999999999
++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.98999999999999999 SinkDSMOemofBlock_dsm_up(demand_dsm_0)
-+0.98999999999999999 SinkDSMOemofBlock_dsm_up(demand_dsm_1)
-= 0
+= 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.98999999999999999 SinkDSMOemofBlock_dsm_up(demand_dsm_2)
-+0.98999999999999999 SinkDSMOemofBlock_dsm_up(demand_dsm_3)
-= 0
+= 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.98999999999999999 SinkDSMOemofBlock_dsm_up(demand_dsm_4)
-+0.98999999999999999 SinkDSMOemofBlock_dsm_up(demand_dsm_5)
-= 0
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+= 0.0
 
 bounds
-   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_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 <= 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_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 f6a477fa..ca2a8929 100644
--- a/tests/lp_files/dsm_module_oemof_invest.lp
+++ b/tests/lp_files/dsm_module_oemof_invest.lp
@@ -2,15 +2,15 @@
 
 min 
 objective:
-+100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1)
-+100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2)
 +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2)
++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.
 
@@ -27,28 +27,28 @@ c_e_BusBlock_balance(bus_elec_0_2)_:
 = 0
 
 c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_0)_:
--1 SinkDSMOemofInvestmentBlock_invest(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_0)_:
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_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_do_shed(demand_dsm_1)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_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_0_2)_:
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_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_0_2)
 = 1
 
@@ -59,7 +59,7 @@ c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0_0)_:
 
 c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0_1)_:
 +1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1)
--0.40000000000000002 SinkDSMOemofInvestmentBlock_total(demand_dsm_0)
+-0.4 SinkDSMOemofInvestmentBlock_total(demand_dsm_0)
 <= 0
 
 c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0_2)_:
@@ -68,46 +68,43 @@ c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0_2)_:
 <= 0
 
 c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_0_0)_:
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_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_shed(demand_dsm_1)
 +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1)
--0.40000000000000002 SinkDSMOemofInvestmentBlock_total(demand_dsm_0)
++1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1)
+-0.4 SinkDSMOemofInvestmentBlock_total(demand_dsm_0)
 <= 0
 
 c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_0_2)_:
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2)
 +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2)
++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_0) <= +inf
-   0 <= flow(bus_elec_demand_dsm_0_1) <= +inf
-   0 <= flow(bus_elec_demand_dsm_0_2) <= +inf
-   33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_0) <= 100
-   0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_0) <= +inf
    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
index 980f4414..016b262d 100644
--- a/tests/lp_files/dsm_module_oemof_invest_multi_period.lp
+++ b/tests/lp_files/dsm_module_oemof_invest_multi_period.lp
@@ -2,28 +2,28 @@
 
 min 
 objective:
-+100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0)
-+100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_1)
-+98.039215686274503 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_2)
-+98.039215686274503 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_3)
-+96.116878123798529 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_4)
-+96.116878123798529 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_5)
++15992.031251718836 ONE_VAR_CONSTANT
 +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_0)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1)
-+0.98039215686274506 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2)
-+0.98039215686274506 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_3)
-+0.96116878123798533 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_4)
-+0.96116878123798533 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_5)
++100 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_0)
 +1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0)
 +1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1)
-+0.98039215686274506 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_2)
-+0.98039215686274506 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_3)
-+0.96116878123798533 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_4)
-+0.96116878123798533 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_5)
++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.5314736691401 SinkDSMOemofInvestmentBlock_invest(demand_dsm_1)
-+425.73027329942335 SinkDSMOemofInvestmentBlock_invest(demand_dsm_2)
-+15992.031251718836 ONE_VAR_CONSTANT
++440.53147366914004 SinkDSMOemofInvestmentBlock_invest(demand_dsm_1)
++425.7302732994234 SinkDSMOemofInvestmentBlock_invest(demand_dsm_2)
 
 s.t.
 
@@ -58,16 +58,16 @@ c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_0)_:
 
 c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(demand_dsm_1)_:
 -1 SinkDSMOemofInvestmentBlock_invest(demand_dsm_1)
-+1 SinkDSMOemofInvestmentBlock_old(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_old(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)_:
@@ -95,9 +95,9 @@ c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(demand_dsm_2)_:
 = 0
 
 c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_0)_:
-+1 SinkDSMOemofInvestmentBlock_old(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)_:
@@ -113,44 +113,44 @@ c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(demand_dsm_2)_:
 = 0
 
 c_e_SinkDSMOemofInvestmentBlock_input_output_relation(demand_dsm_0_0)_:
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_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_do_shed(demand_dsm_1)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_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_do_shed(demand_dsm_2)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_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_do_shed(demand_dsm_3)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_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_do_shed(demand_dsm_4)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_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_do_shed(demand_dsm_5)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_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
 
@@ -161,7 +161,7 @@ c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0_0)_:
 
 c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_0_1)_:
 +1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1)
--0.40000000000000002 SinkDSMOemofInvestmentBlock_total(demand_dsm_0)
+-0.4 SinkDSMOemofInvestmentBlock_total(demand_dsm_0)
 <= 0
 
 c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_1_2)_:
@@ -171,74 +171,74 @@ c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_1_2)_:
 
 c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(demand_dsm_1_3)_:
 +1 SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_3)
--0.29999999999999999 SinkDSMOemofInvestmentBlock_total(demand_dsm_1)
+-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.29999999999999999 SinkDSMOemofInvestmentBlock_total(demand_dsm_2)
+-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.29999999999999999 SinkDSMOemofInvestmentBlock_total(demand_dsm_2)
+-0.3 SinkDSMOemofInvestmentBlock_total(demand_dsm_2)
 <= 0
 
 c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(demand_dsm_0_0)_:
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_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_shed(demand_dsm_1)
 +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_1)
--0.40000000000000002 SinkDSMOemofInvestmentBlock_total(demand_dsm_0)
++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_shed(demand_dsm_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_shed(demand_dsm_3)
 +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_3)
--0.29999999999999999 SinkDSMOemofInvestmentBlock_total(demand_dsm_1)
++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_shed(demand_dsm_4)
 +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_4)
--0.29999999999999999 SinkDSMOemofInvestmentBlock_total(demand_dsm_2)
++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_shed(demand_dsm_5)
 +1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_5)
--0.29999999999999999 SinkDSMOemofInvestmentBlock_total(demand_dsm_2)
++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_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_SinkDSMOemofInvestmentBlock_dsm_sum_constraint(demand_dsm_2)_:
--1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_2)
--1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_3)
 +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_do_shift(demand_dsm_4)
--1 SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_5)
 +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)_:
@@ -257,24 +257,39 @@ c_l_SinkDSMOemofInvestmentBlock_overall_minimum(demand_dsm)_:
 +1 SinkDSMOemofInvestmentBlock_total(demand_dsm_2)
 >= 5
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 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
-   33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_0) <= 100
-   33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_1) <= 100
-   33 <= SinkDSMOemofInvestmentBlock_invest(demand_dsm_2) <= 100
    0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_0) <= +inf
    0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_1) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_total(demand_dsm_2) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_old(demand_dsm_0) <= +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
@@ -282,22 +297,5 @@ bounds
    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_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_shift(demand_dsm_3) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_4) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(demand_dsm_5) <= +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_do_shed(demand_dsm_3) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_4) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shed(demand_dsm_5) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_0) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_1) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_2) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_3) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_4) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(demand_dsm_5) <= +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
index e872f0ea..225e20da 100644
--- a/tests/lp_files/dsm_module_oemof_multi_period.lp
+++ b/tests/lp_files/dsm_module_oemof_multi_period.lp
@@ -60,45 +60,45 @@ c_e_SinkDSMOemofBlock_shift_shed_vars(demand_dsm_5)_:
 = 0
 
 c_e_SinkDSMOemofBlock_input_output_relation(demand_dsm_0_0)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_0)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_0)
--1 SinkDSMOemofBlock_dsm_up(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_shed(demand_dsm_1)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_1)
--1 SinkDSMOemofBlock_dsm_up(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_shed(demand_dsm_2)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_2)
--1 SinkDSMOemofBlock_dsm_up(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_shed(demand_dsm_3)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3)
--1 SinkDSMOemofBlock_dsm_up(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_shed(demand_dsm_4)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4)
--1 SinkDSMOemofBlock_dsm_up(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_shed(demand_dsm_5)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5)
--1 SinkDSMOemofBlock_dsm_up(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)_:
@@ -107,7 +107,7 @@ 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)
@@ -115,45 +115,45 @@ c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_2)_:
 
 c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_3)_:
 +1 SinkDSMOemofBlock_dsm_up(demand_dsm_3)
-<= 0.29999999999999999
+<= 0.3
 
 c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_4)_:
 +1 SinkDSMOemofBlock_dsm_up(demand_dsm_4)
-<= 0.29999999999999999
+<= 0.3
 
 c_u_SinkDSMOemofBlock_dsm_up_constraint(demand_dsm_5)_:
 +1 SinkDSMOemofBlock_dsm_up(demand_dsm_5)
-<= 0.29999999999999999
+<= 0.3
 
 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_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_3)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_3)
-<= 0.29999999999999999
++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_3)
+<= 0.3
 
 c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_4)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_4)
-<= 0.29999999999999999
++1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_4)
+<= 0.3
 
 c_u_SinkDSMOemofBlock_dsm_down_constraint(demand_dsm_5)_:
-+1 SinkDSMOemofBlock_dsm_do_shed(demand_dsm_5)
 +1 SinkDSMOemofBlock_dsm_do_shift(demand_dsm_5)
-<= 0.29999999999999999
++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)
@@ -176,22 +176,19 @@ c_e_SinkDSMOemofBlock_dsm_sum_constraint(demand_dsm_4)_:
 +1 SinkDSMOemofBlock_dsm_up(demand_dsm_5)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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
diff --git a/tests/lp_files/emission_budget_limit.lp b/tests/lp_files/emission_budget_limit.lp
index 12ea645d..cbe106b6 100644
--- a/tests/lp_files/emission_budget_limit.lp
+++ b/tests/lp_files/emission_budget_limit.lp
@@ -8,8 +8,8 @@ s.t.
 
 c_u_integral_limit_emission_factor_constraint_:
 +0.5 flow(source1_electricityBus_0_0)
--1 flow(source1_electricityBus_0_1)
-+2 flow(source1_electricityBus_1_2)
+-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)
@@ -21,10 +21,8 @@ c_u_integral_limit_emission_factor_constraint_:
 +3.5 flow(source2_electricityBus_2_5)
 <= 777
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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_1_2) <= 100
diff --git a/tests/lp_files/emission_limit.lp b/tests/lp_files/emission_limit.lp
index 28709526..8d00d7c3 100644
--- a/tests/lp_files/emission_limit.lp
+++ b/tests/lp_files/emission_limit.lp
@@ -8,8 +8,8 @@ s.t.
 
 c_u_integral_limit_emission_factor_constraint_:
 +0.5 flow(source1_electricityBus_0_0)
--1 flow(source1_electricityBus_0_1)
-+2 flow(source1_electricityBus_0_2)
+-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)
@@ -33,10 +33,8 @@ c_e_BusBlock_balance(electricityBus_0_2)_:
 +1 flow(source3_electricityBus_0_2)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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
diff --git a/tests/lp_files/emission_limit_no_error.lp b/tests/lp_files/emission_limit_no_error.lp
index bde83919..564aadb0 100644
--- a/tests/lp_files/emission_limit_no_error.lp
+++ b/tests/lp_files/emission_limit_no_error.lp
@@ -7,9 +7,9 @@ objective:
 s.t.
 
 c_u_integral_limit_emission_factor_constraint_:
-+0.80000000000000004 flow(source1_electricityBus_0_0)
-+0.80000000000000004 flow(source1_electricityBus_0_1)
-+0.80000000000000004 flow(source1_electricityBus_0_2)
++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)_:
@@ -27,10 +27,8 @@ c_e_BusBlock_balance(electricityBus_0_2)_:
 +1 flow(source2_electricityBus_0_2)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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
diff --git a/tests/lp_files/equate_flows.lp b/tests/lp_files/equate_flows.lp
index 7b9dc0d5..950d932e 100644
--- a/tests/lp_files/equate_flows.lp
+++ b/tests/lp_files/equate_flows.lp
@@ -50,9 +50,6 @@ c_e_BusBlock_balance(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_0) <= 300
    0 <= flow(Bus1_Sink_0_1) <= 300
diff --git a/tests/lp_files/fixed_costs_sources.lp b/tests/lp_files/fixed_costs_sources.lp
index 1c6901cd..7a025ff5 100644
--- a/tests/lp_files/fixed_costs_sources.lp
+++ b/tests/lp_files/fixed_costs_sources.lp
@@ -2,62 +2,62 @@
 
 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_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)
 +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)
-+648.01245319357577 ONE_VAR_CONSTANT
++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_and_age_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_and_age_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_and_age_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_and_age_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_and_age_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_and_age_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)_:
@@ -68,26 +68,24 @@ c_e_SimpleFlowBlock_lifetime_age_output(pv_with_lifetime_and_age_electricityBus_
 +1 flow(pv_with_lifetime_and_age_electricityBus_2_5)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(pv_forever_electricityBus_0_0) <= 8
-   0 <= flow(pv_forever_electricityBus_0_1) <= 8
-   0 <= flow(pv_forever_electricityBus_1_2) <= 8
-   0 <= flow(pv_forever_electricityBus_1_3) <= 8
-   0 <= flow(pv_forever_electricityBus_2_4) <= 8
-   0 <= flow(pv_forever_electricityBus_2_5) <= 8
-   0 <= flow(pv_with_lifetime_electricityBus_0_0) <= 8
-   0 <= flow(pv_with_lifetime_electricityBus_0_1) <= 8
-   0 <= flow(pv_with_lifetime_electricityBus_1_2) <= 8
-   0 <= flow(pv_with_lifetime_electricityBus_1_3) <= 8
-   0 <= flow(pv_with_lifetime_electricityBus_2_4) <= 8
-   0 <= flow(pv_with_lifetime_electricityBus_2_5) <= 8
-   0 <= flow(pv_with_lifetime_and_age_electricityBus_0_0) <= 8
-   0 <= flow(pv_with_lifetime_and_age_electricityBus_0_1) <= 8
-   0 <= flow(pv_with_lifetime_and_age_electricityBus_1_2) <= 8
-   0 <= flow(pv_with_lifetime_and_age_electricityBus_1_3) <= 8
-   0 <= flow(pv_with_lifetime_and_age_electricityBus_2_4) <= 8
-   0 <= flow(pv_with_lifetime_and_age_electricityBus_2_5) <= 8
+   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 76140d02..7e36eb90 100644
--- a/tests/lp_files/fixed_source_invest_sink.lp
+++ b/tests/lp_files/fixed_source_invest_sink.lp
@@ -11,15 +11,15 @@ s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
 -1 flow(electricityBus_excess_0_0)
-= -12000000
+= -12000000.0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
 -1 flow(electricityBus_excess_0_1)
-= -16000000
+= -16000000.0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
 -1 flow(electricityBus_excess_0_2)
-= -14000000
+= -14000000.0
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_excess_0)_:
 -1 InvestmentFlowBlock_invest(electricityBus_excess_0)
@@ -27,34 +27,31 @@ c_e_InvestmentFlowBlock_total_rule(electricityBus_excess_0)_:
 = 50
 
 c_u_InvestmentFlowBlock_max(electricityBus_excess_0_0)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_excess_0)
 +1 flow(electricityBus_excess_0_0)
+-0.8 InvestmentFlowBlock_total(electricityBus_excess_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_excess_0_1)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_excess_0)
 +1 flow(electricityBus_excess_0_1)
+-0.8 InvestmentFlowBlock_total(electricityBus_excess_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_excess_0_2)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_excess_0)
 +1 flow(electricityBus_excess_0_2)
+-0.8 InvestmentFlowBlock_total(electricityBus_excess_0)
 <= 0
 
 c_u_InvestmentFlowBlock_full_load_time_max(electricityBus_excess)_:
--2.2999999999999998 InvestmentFlowBlock_total(electricityBus_excess_0)
 +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
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
+   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_invest(electricityBus_excess_0) <= 1000000
    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
index 3bd45338..bbfaa46f 100644
--- a/tests/lp_files/fixed_source_invest_sink_multi_period.lp
+++ b/tests/lp_files/fixed_source_invest_sink_multi_period.lp
@@ -2,8 +2,8 @@
 
 min 
 objective:
-+611.56718125290342 InvestmentFlowBlock_invest(electricityBus_excess_0)
-+599.57566789500333 InvestmentFlowBlock_invest(electricityBus_excess_1)
++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)
@@ -16,27 +16,27 @@ s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
 -1 flow(electricityBus_excess_0_0)
-= -12000000
+= -12000000.0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
 -1 flow(electricityBus_excess_0_1)
-= -16000000
+= -16000000.0
 
 c_e_BusBlock_balance(electricityBus_1_2)_:
 -1 flow(electricityBus_excess_1_2)
-= -14000000
+= -14000000.0
 
 c_e_BusBlock_balance(electricityBus_1_3)_:
 -1 flow(electricityBus_excess_1_3)
-= -18000000
+= -18000000.0
 
 c_e_BusBlock_balance(electricityBus_2_4)_:
 -1 flow(electricityBus_excess_2_4)
-= -18000000
+= -18000000.0
 
 c_e_BusBlock_balance(electricityBus_2_5)_:
 -1 flow(electricityBus_excess_2_5)
-= -18000000
+= -18000000.0
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_excess_0)_:
 -1 InvestmentFlowBlock_invest(electricityBus_excess_0)
@@ -45,16 +45,16 @@ c_e_InvestmentFlowBlock_total_rule(electricityBus_excess_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_excess_1)_:
 -1 InvestmentFlowBlock_invest(electricityBus_excess_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -82,9 +82,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_excess_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(electricityBus_excess_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -100,65 +100,61 @@ c_e_InvestmentFlowBlock_old_rule(electricityBus_excess_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_excess_0_0)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_excess_0)
 +1 flow(electricityBus_excess_0_0)
+-0.8 InvestmentFlowBlock_total(electricityBus_excess_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_excess_0_1)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_excess_0)
 +1 flow(electricityBus_excess_0_1)
+-0.8 InvestmentFlowBlock_total(electricityBus_excess_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_excess_1_2)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_excess_1)
 +1 flow(electricityBus_excess_1_2)
+-0.8 InvestmentFlowBlock_total(electricityBus_excess_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_excess_1_3)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_excess_1)
 +1 flow(electricityBus_excess_1_3)
+-0.8 InvestmentFlowBlock_total(electricityBus_excess_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_excess_2_4)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_excess_2)
 +1 flow(electricityBus_excess_2_4)
+-0.8 InvestmentFlowBlock_total(electricityBus_excess_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_excess_2_5)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_excess_2)
 +1 flow(electricityBus_excess_2_5)
+-0.8 InvestmentFlowBlock_total(electricityBus_excess_2)
 <= 0
 
 c_u_InvestmentFlowBlock_full_load_time_max(electricityBus_excess)_:
--2.2999999999999998 InvestmentFlowBlock_total(electricityBus_excess_0)
--2.2999999999999998 InvestmentFlowBlock_total(electricityBus_excess_1)
--2.2999999999999998 InvestmentFlowBlock_total(electricityBus_excess_2)
 +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)
-<= 0
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+-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_invest(electricityBus_excess_0) <= 1000000
-   0 <= InvestmentFlowBlock_invest(electricityBus_excess_1) <= 1000000
-   0 <= InvestmentFlowBlock_invest(electricityBus_excess_2) <= 1000000
    0 <= InvestmentFlowBlock_total(electricityBus_excess_0) <= +inf
    0 <= InvestmentFlowBlock_total(electricityBus_excess_1) <= +inf
-   0 <= InvestmentFlowBlock_total(electricityBus_excess_2) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_excess_0) <= +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
@@ -166,4 +162,5 @@ bounds
    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 8169d6a6..064e7f06 100644
--- a/tests/lp_files/fixed_source_variable_sink.lp
+++ b/tests/lp_files/fixed_source_variable_sink.lp
@@ -10,18 +10,15 @@ s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
 -1 flow(electricityBus_excess_0_0)
-= -430000
+= -430000.0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
 -1 flow(electricityBus_excess_0_1)
-= -720000
+= -720000.0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
 -1 flow(electricityBus_excess_0_2)
-= -290000
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+= -290000.0
 
 bounds
    0 <= flow(electricityBus_excess_0_0) <= +inf
diff --git a/tests/lp_files/fixed_source_variable_sink_multi_period.lp b/tests/lp_files/fixed_source_variable_sink_multi_period.lp
index c231524c..f8666523 100644
--- a/tests/lp_files/fixed_source_variable_sink_multi_period.lp
+++ b/tests/lp_files/fixed_source_variable_sink_multi_period.lp
@@ -13,30 +13,27 @@ s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
 -1 flow(electricityBus_excess_0_0)
-= -430000
+= -430000.0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
 -1 flow(electricityBus_excess_0_1)
-= -720000
+= -720000.0
 
 c_e_BusBlock_balance(electricityBus_1_2)_:
 -1 flow(electricityBus_excess_1_2)
-= -290000
+= -290000.0
 
 c_e_BusBlock_balance(electricityBus_1_3)_:
 -1 flow(electricityBus_excess_1_3)
-= -330000
+= -330000.0
 
 c_e_BusBlock_balance(electricityBus_2_4)_:
 -1 flow(electricityBus_excess_2_4)
-= -330000
+= -330000.0
 
 c_e_BusBlock_balance(electricityBus_2_5)_:
 -1 flow(electricityBus_excess_2_5)
-= -330000
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+= -330000.0
 
 bounds
    0 <= flow(electricityBus_excess_0_0) <= +inf
diff --git a/tests/lp_files/flow_count_limit.lp b/tests/lp_files/flow_count_limit.lp
index 7ad44c77..b4e80d20 100644
--- a/tests/lp_files/flow_count_limit.lp
+++ b/tests/lp_files/flow_count_limit.lp
@@ -25,24 +25,24 @@ c_e_emission_factor_constraint(2)_:
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
-+1 flow(source1_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)
-+1 flow(source4_electricityBus_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
-+1 flow(source1_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)
-+1 flow(source4_electricityBus_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
-+1 flow(source1_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)
-+1 flow(source4_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_0)_:
-+1 flow(source1_electricityBus_0_0)
->= 0
+c_u_NonConvexFlowBlock_min(source1_electricityBus_0_0)_:
+-1 flow(source1_electricityBus_0_0)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source1_electricityBus_0_1)_:
-+1 flow(source1_electricityBus_0_1)
->= 0
+c_u_NonConvexFlowBlock_min(source1_electricityBus_0_1)_:
+-1 flow(source1_electricityBus_0_1)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source1_electricityBus_0_2)_:
-+1 flow(source1_electricityBus_0_2)
->= 0
+c_u_NonConvexFlowBlock_min(source1_electricityBus_0_2)_:
+-1 flow(source1_electricityBus_0_2)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source2_electricityBus_0_0)_:
-+1 flow(source2_electricityBus_0_0)
->= 0
+c_u_NonConvexFlowBlock_min(source3_electricityBus_0_0)_:
+-1 flow(source3_electricityBus_0_0)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source2_electricityBus_0_1)_:
-+1 flow(source2_electricityBus_0_1)
->= 0
+c_u_NonConvexFlowBlock_min(source3_electricityBus_0_1)_:
+-1 flow(source3_electricityBus_0_1)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source2_electricityBus_0_2)_:
-+1 flow(source2_electricityBus_0_2)
->= 0
+c_u_NonConvexFlowBlock_min(source3_electricityBus_0_2)_:
+-1 flow(source3_electricityBus_0_2)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source3_electricityBus_0_0)_:
-+1 flow(source3_electricityBus_0_0)
->= 0
+c_u_NonConvexFlowBlock_min(source2_electricityBus_0_0)_:
+-1 flow(source2_electricityBus_0_0)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source3_electricityBus_0_1)_:
-+1 flow(source3_electricityBus_0_1)
->= 0
+c_u_NonConvexFlowBlock_min(source2_electricityBus_0_1)_:
+-1 flow(source2_electricityBus_0_1)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source3_electricityBus_0_2)_:
-+1 flow(source3_electricityBus_0_2)
->= 0
+c_u_NonConvexFlowBlock_min(source2_electricityBus_0_2)_:
+-1 flow(source2_electricityBus_0_2)
+<= 0
 
 c_u_NonConvexFlowBlock_max(source1_electricityBus_0_0)_:
--1 NonConvexFlowBlock_status_nominal(source1_electricityBus_0)
 +1 flow(source1_electricityBus_0_0)
+-1 NonConvexFlowBlock_status_nominal(source1_electricityBus_0)
 <= 0
 
 c_u_NonConvexFlowBlock_max(source1_electricityBus_0_1)_:
--1 NonConvexFlowBlock_status_nominal(source1_electricityBus_1)
 +1 flow(source1_electricityBus_0_1)
+-1 NonConvexFlowBlock_status_nominal(source1_electricityBus_1)
 <= 0
 
 c_u_NonConvexFlowBlock_max(source1_electricityBus_0_2)_:
--1 NonConvexFlowBlock_status_nominal(source1_electricityBus_2)
 +1 flow(source1_electricityBus_0_2)
-<= 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_0_2)_:
--1 NonConvexFlowBlock_status_nominal(source2_electricityBus_2)
-+1 flow(source2_electricityBus_0_2)
+-1 NonConvexFlowBlock_status_nominal(source1_electricityBus_2)
 <= 0
 
 c_u_NonConvexFlowBlock_max(source3_electricityBus_0_0)_:
--1 NonConvexFlowBlock_status_nominal(source3_electricityBus_0)
 +1 flow(source3_electricityBus_0_0)
+-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_0)
 <= 0
 
 c_u_NonConvexFlowBlock_max(source3_electricityBus_0_1)_:
--1 NonConvexFlowBlock_status_nominal(source3_electricityBus_1)
 +1 flow(source3_electricityBus_0_1)
+-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_1)
 <= 0
 
 c_u_NonConvexFlowBlock_max(source3_electricityBus_0_2)_:
--1 NonConvexFlowBlock_status_nominal(source3_electricityBus_2)
 +1 flow(source3_electricityBus_0_2)
+-1 NonConvexFlowBlock_status_nominal(source3_electricityBus_2)
+<= 0
+
+c_u_NonConvexFlowBlock_max(source2_electricityBus_0_0)_:
++1 flow(source2_electricityBus_0_0)
+-1 NonConvexFlowBlock_status_nominal(source2_electricityBus_0)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+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(source2_electricityBus_0_2)_:
++1 flow(source2_electricityBus_0_2)
+-1 NonConvexFlowBlock_status_nominal(source2_electricityBus_2)
+<= 0
 
 bounds
-   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
-   30 <= flow(source4_electricityBus_0_0) <= 100
-   30 <= flow(source4_electricityBus_0_1) <= 100
-   30 <= flow(source4_electricityBus_0_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
index 034148da..3532a0b1 100644
--- a/tests/lp_files/flow_count_limit_multi_period.lp
+++ b/tests/lp_files/flow_count_limit_multi_period.lp
@@ -72,6 +72,36 @@ c_e_NonConvexFlowBlock_status_nominal_constraint(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)
@@ -102,107 +132,77 @@ c_e_NonConvexFlowBlock_status_nominal_constraint(source2_electricityBus_5)_:
 +1 NonConvexFlowBlock_status_nominal(source2_electricityBus_5)
 = 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_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_3)_:
--100 NonConvexFlowBlock_status(source3_electricityBus_3)
-+1 NonConvexFlowBlock_status_nominal(source3_electricityBus_3)
-= 0
-
-c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_4)_:
--100 NonConvexFlowBlock_status(source3_electricityBus_4)
-+1 NonConvexFlowBlock_status_nominal(source3_electricityBus_4)
-= 0
-
-c_e_NonConvexFlowBlock_status_nominal_constraint(source3_electricityBus_5)_:
--100 NonConvexFlowBlock_status(source3_electricityBus_5)
-+1 NonConvexFlowBlock_status_nominal(source3_electricityBus_5)
-= 0
-
-c_l_NonConvexFlowBlock_min(source1_electricityBus_0_0)_:
-+1 flow(source1_electricityBus_0_0)
->= 0
+c_u_NonConvexFlowBlock_min(source1_electricityBus_0_0)_:
+-1 flow(source1_electricityBus_0_0)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source1_electricityBus_0_1)_:
-+1 flow(source1_electricityBus_0_1)
->= 0
+c_u_NonConvexFlowBlock_min(source1_electricityBus_0_1)_:
+-1 flow(source1_electricityBus_0_1)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source1_electricityBus_1_2)_:
-+1 flow(source1_electricityBus_1_2)
->= 0
+c_u_NonConvexFlowBlock_min(source1_electricityBus_1_2)_:
+-1 flow(source1_electricityBus_1_2)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source1_electricityBus_1_3)_:
-+1 flow(source1_electricityBus_1_3)
->= 0
+c_u_NonConvexFlowBlock_min(source1_electricityBus_1_3)_:
+-1 flow(source1_electricityBus_1_3)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source1_electricityBus_2_4)_:
-+1 flow(source1_electricityBus_2_4)
->= 0
+c_u_NonConvexFlowBlock_min(source1_electricityBus_2_4)_:
+-1 flow(source1_electricityBus_2_4)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source1_electricityBus_2_5)_:
-+1 flow(source1_electricityBus_2_5)
->= 0
+c_u_NonConvexFlowBlock_min(source1_electricityBus_2_5)_:
+-1 flow(source1_electricityBus_2_5)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source2_electricityBus_0_0)_:
-+1 flow(source2_electricityBus_0_0)
->= 0
+c_u_NonConvexFlowBlock_min(source3_electricityBus_0_0)_:
+-1 flow(source3_electricityBus_0_0)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source2_electricityBus_0_1)_:
-+1 flow(source2_electricityBus_0_1)
->= 0
+c_u_NonConvexFlowBlock_min(source3_electricityBus_0_1)_:
+-1 flow(source3_electricityBus_0_1)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source2_electricityBus_1_2)_:
-+1 flow(source2_electricityBus_1_2)
->= 0
+c_u_NonConvexFlowBlock_min(source3_electricityBus_1_2)_:
+-1 flow(source3_electricityBus_1_2)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source2_electricityBus_1_3)_:
-+1 flow(source2_electricityBus_1_3)
->= 0
+c_u_NonConvexFlowBlock_min(source3_electricityBus_1_3)_:
+-1 flow(source3_electricityBus_1_3)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source2_electricityBus_2_4)_:
-+1 flow(source2_electricityBus_2_4)
->= 0
+c_u_NonConvexFlowBlock_min(source3_electricityBus_2_4)_:
+-1 flow(source3_electricityBus_2_4)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source2_electricityBus_2_5)_:
-+1 flow(source2_electricityBus_2_5)
->= 0
+c_u_NonConvexFlowBlock_min(source3_electricityBus_2_5)_:
+-1 flow(source3_electricityBus_2_5)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source3_electricityBus_0_0)_:
-+1 flow(source3_electricityBus_0_0)
->= 0
+c_u_NonConvexFlowBlock_min(source2_electricityBus_0_0)_:
+-1 flow(source2_electricityBus_0_0)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source3_electricityBus_0_1)_:
-+1 flow(source3_electricityBus_0_1)
->= 0
+c_u_NonConvexFlowBlock_min(source2_electricityBus_0_1)_:
+-1 flow(source2_electricityBus_0_1)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source3_electricityBus_1_2)_:
-+1 flow(source3_electricityBus_1_2)
->= 0
+c_u_NonConvexFlowBlock_min(source2_electricityBus_1_2)_:
+-1 flow(source2_electricityBus_1_2)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source3_electricityBus_1_3)_:
-+1 flow(source3_electricityBus_1_3)
->= 0
+c_u_NonConvexFlowBlock_min(source2_electricityBus_1_3)_:
+-1 flow(source2_electricityBus_1_3)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source3_electricityBus_2_4)_:
-+1 flow(source3_electricityBus_2_4)
->= 0
+c_u_NonConvexFlowBlock_min(source2_electricityBus_2_4)_:
+-1 flow(source2_electricityBus_2_4)
+<= 0
 
-c_l_NonConvexFlowBlock_min(source3_electricityBus_2_5)_:
-+1 flow(source3_electricityBus_2_5)
->= 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)
@@ -234,36 +234,6 @@ c_u_NonConvexFlowBlock_max(source1_electricityBus_2_5)_:
 +1 flow(source1_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
-
 c_u_NonConvexFlowBlock_max(source3_electricityBus_0_0)_:
 -1 NonConvexFlowBlock_status_nominal(source3_electricityBus_0)
 +1 flow(source3_electricityBus_0_0)
@@ -294,82 +264,110 @@ c_u_NonConvexFlowBlock_max(source3_electricityBus_2_5)_:
 +1 flow(source3_electricityBus_2_5)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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
-   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
-   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
-   1 <= emission_factor(0) <= 2
-   1 <= emission_factor(1) <= 2
-   1 <= emission_factor(2) <= 2
-   1 <= emission_factor(3) <= 2
-   1 <= emission_factor(4) <= 2
-   1 <= emission_factor(5) <= 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(source1_electricityBus_3) <= 1
-   0 <= NonConvexFlowBlock_status(source1_electricityBus_4) <= 1
-   0 <= NonConvexFlowBlock_status(source1_electricityBus_5) <= 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
-   0 <= NonConvexFlowBlock_status(source3_electricityBus_0) <= 1
-   0 <= NonConvexFlowBlock_status(source3_electricityBus_1) <= 1
-   0 <= NonConvexFlowBlock_status(source3_electricityBus_2) <= 1
-   0 <= NonConvexFlowBlock_status(source3_electricityBus_3) <= 1
-   0 <= NonConvexFlowBlock_status(source3_electricityBus_4) <= 1
-   0 <= NonConvexFlowBlock_status(source3_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(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 <= 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(source1_electricityBus_1)
-  NonConvexFlowBlock_status(source1_electricityBus_2)
-  NonConvexFlowBlock_status(source1_electricityBus_3)
-  NonConvexFlowBlock_status(source1_electricityBus_4)
-  NonConvexFlowBlock_status(source1_electricityBus_5)
   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)
diff --git a/tests/lp_files/flow_invest_with_offset.lp b/tests/lp_files/flow_invest_with_offset.lp
index e5d398f4..168b31a8 100644
--- a/tests/lp_files/flow_invest_with_offset.lp
+++ b/tests/lp_files/flow_invest_with_offset.lp
@@ -38,37 +38,34 @@ c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_0)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_0)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0)
 +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_0_2)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0)
 +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_total(source_nonconvex_invest_electricityBus_0)
 +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 <= 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_invest(source_nonconvex_invest_electricityBus_0) <= 20
    0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) <= 1
 binary
   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
index f93eb4a4..1954c450 100644
--- a/tests/lp_files/flow_invest_with_offset_multi_period.lp
+++ b/tests/lp_files/flow_invest_with_offset_multi_period.lp
@@ -2,12 +2,12 @@
 
 min 
 objective:
-+611.56718125290342 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0)
-+599.57566789500333 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1)
-+587.8192822500032 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2)
++611.5671812529034 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0)
 +34 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0)
-+33.333333333333329 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1)
-+32.679738562091501 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2)
++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)
@@ -78,16 +78,16 @@ c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_1)_:
 -1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -115,9 +115,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(source_nonconvex_invest_electricityBus_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(source_nonconvex_invest_electricityBus_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -133,65 +133,64 @@ c_e_InvestmentFlowBlock_old_rule(source_nonconvex_invest_electricityBus_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_0)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2)
 +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)_:
--2.2999999999999998 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0)
--2.2999999999999998 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1)
--2.2999999999999998 InvestmentFlowBlock_total(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_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)
-<= 0
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+-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_invest(source_nonconvex_invest_electricityBus_0) <= 20
-   0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) <= 20
-   0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) <= 20
    0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= +inf
    0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) <= +inf
-   0 <= InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_0) <= +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
@@ -199,9 +198,7 @@ bounds
    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_invest_status(source_nonconvex_invest_electricityBus_0) <= 1
-   0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1) <= 1
-   0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2) <= 1
+   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)
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 6e4f63dd..ead5cfa5 100644
--- a/tests/lp_files/flow_invest_with_offset_no_minimum.lp
+++ b/tests/lp_files/flow_invest_with_offset_no_minimum.lp
@@ -22,9 +22,9 @@ 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_0)_:
-+1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0)
->= 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_0)_:
 +1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0)
@@ -37,37 +37,34 @@ c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_0)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_0)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0)
 +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_0_2)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0)
 +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_total(source_nonconvex_invest_electricityBus_0)
 +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 <= 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_invest(source_nonconvex_invest_electricityBus_0) <= 1234
    0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0) <= 1
 binary
   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
index 8e9183a1..462f594d 100644
--- 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
@@ -2,12 +2,12 @@
 
 min 
 objective:
-+611.56718125290342 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0)
-+599.57566789500333 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1)
-+587.8192822500032 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2)
++611.5671812529034 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0)
 +34 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_0)
-+33.333333333333329 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1)
-+32.679738562091501 InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2)
++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)
@@ -41,17 +41,17 @@ c_e_BusBlock_balance(electricityBus_2_5)_:
 +1 flow(source_nonconvex_invest_electricityBus_2_5)
 = 0
 
-c_l_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_0)_:
+-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_0)
+<= 0
 
-c_l_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_1)_:
+-1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1)
+<= 0
 
-c_l_InvestmentFlowBlock_minimum_rule(source_nonconvex_invest_electricityBus_2)_:
-+1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2)
->= 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)
@@ -75,16 +75,16 @@ c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(source_nonconvex_invest_electricityBus_1)_:
 -1 InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -112,9 +112,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(source_nonconvex_invest_electricityBus_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(source_nonconvex_invest_electricityBus_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -130,65 +130,64 @@ c_e_InvestmentFlowBlock_old_rule(source_nonconvex_invest_electricityBus_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(source_nonconvex_invest_electricityBus_0_0)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2)
 +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)_:
--2.2999999999999998 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0)
--2.2999999999999998 InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1)
--2.2999999999999998 InvestmentFlowBlock_total(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_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)
-<= 0
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+-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_invest(source_nonconvex_invest_electricityBus_0) <= 1234
-   0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_1) <= 1234
-   0 <= InvestmentFlowBlock_invest(source_nonconvex_invest_electricityBus_2) <= 1234
    0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_0) <= +inf
    0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_total(source_nonconvex_invest_electricityBus_2) <= +inf
-   0 <= InvestmentFlowBlock_old(source_nonconvex_invest_electricityBus_0) <= +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
@@ -196,9 +195,7 @@ bounds
    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_invest_status(source_nonconvex_invest_electricityBus_0) <= 1
-   0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_1) <= 1
-   0 <= InvestmentFlowBlock_invest_status(source_nonconvex_invest_electricityBus_2) <= 1
+   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)
diff --git a/tests/lp_files/flow_invest_without_offset.lp b/tests/lp_files/flow_invest_without_offset.lp
index be02bc73..0e52141d 100644
--- a/tests/lp_files/flow_invest_without_offset.lp
+++ b/tests/lp_files/flow_invest_without_offset.lp
@@ -37,37 +37,34 @@ c_e_InvestmentFlowBlock_total_rule(electricityBus_sink_nonconvex_invest_0)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_0_0)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_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)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0)
 +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_0_2)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0)
 +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_total(electricityBus_sink_nonconvex_invest_0)
 +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 <= 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(electricityBus_sink_nonconvex_invest_0) <= 172
-   0 <= InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0) <= +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_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
index 915bef92..4ce5cd34 100644
--- a/tests/lp_files/flow_invest_without_offset_multi_period.lp
+++ b/tests/lp_files/flow_invest_without_offset_multi_period.lp
@@ -2,8 +2,8 @@
 
 min 
 objective:
-+611.56718125290342 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_0)
-+599.57566789500333 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_1)
++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)
@@ -75,16 +75,16 @@ c_e_InvestmentFlowBlock_total_rule(electricityBus_sink_nonconvex_invest_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_sink_nonconvex_invest_1)_:
 -1 InvestmentFlowBlock_invest(electricityBus_sink_nonconvex_invest_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -112,9 +112,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_sink_nonconvex_invest_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(electricityBus_sink_nonconvex_invest_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -130,65 +130,64 @@ c_e_InvestmentFlowBlock_old_rule(electricityBus_sink_nonconvex_invest_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_sink_nonconvex_invest_0_0)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_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)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_1)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_1)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_2)
 +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)_:
--0.80000000000000004 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_2)
 +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)_:
--2.2999999999999998 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_0)
--2.2999999999999998 InvestmentFlowBlock_total(electricityBus_sink_nonconvex_invest_1)
--2.2999999999999998 InvestmentFlowBlock_total(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_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)
-<= 0
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+-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(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 <= 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_total(electricityBus_sink_nonconvex_invest_2) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_sink_nonconvex_invest_0) <= +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
@@ -196,9 +195,7 @@ bounds
    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_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_old(electricityBus_sink_nonconvex_invest_0) <= +inf
 binary
   InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_0)
   InvestmentFlowBlock_invest_status(electricityBus_sink_nonconvex_invest_1)
diff --git a/tests/lp_files/flow_nonconvex_invest_bounded_transformer.lp b/tests/lp_files/flow_nonconvex_invest_bounded_transformer.lp
index 532279af..ea6621e9 100644
--- a/tests/lp_files/flow_nonconvex_invest_bounded_transformer.lp
+++ b/tests/lp_files/flow_nonconvex_invest_bounded_transformer.lp
@@ -2,10 +2,10 @@
 
 min 
 objective:
-+500 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus_0)
 +25 flow(transformer_nonconvex_invest_electricityBus_0_0)
 +25 flow(transformer_nonconvex_invest_electricityBus_0_1)
 +25 flow(transformer_nonconvex_invest_electricityBus_0_2)
++500 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus_0)
 
 s.t.
 
@@ -34,18 +34,18 @@ c_e_BusBlock_balance(fuelBus_0_2)_:
 = 0
 
 c_e_TransformerBlock_relation(transformer_nonconvex_invest_fuelBus_electricityBus_0_0)_:
-+0.5 flow(fuelBus_transformer_nonconvex_invest_0_0)
 -1 flow(transformer_nonconvex_invest_electricityBus_0_0)
++0.5 flow(fuelBus_transformer_nonconvex_invest_0_0)
 = 0
 
 c_e_TransformerBlock_relation(transformer_nonconvex_invest_fuelBus_electricityBus_0_1)_:
-+0.5 flow(fuelBus_transformer_nonconvex_invest_0_1)
 -1 flow(transformer_nonconvex_invest_electricityBus_0_1)
++0.5 flow(fuelBus_transformer_nonconvex_invest_0_1)
 = 0
 
 c_e_TransformerBlock_relation(transformer_nonconvex_invest_fuelBus_electricityBus_0_2)_:
-+0.5 flow(fuelBus_transformer_nonconvex_invest_0_2)
 -1 flow(transformer_nonconvex_invest_electricityBus_0_2)
++0.5 flow(fuelBus_transformer_nonconvex_invest_0_2)
 = 0
 
 c_l_InvestNonConvexFlowBlock_minimum_investment(transformer_nonconvex_invest_electricityBus_0)_:
@@ -57,48 +57,48 @@ c_u_InvestNonConvexFlowBlock_maximum_investment(transformer_nonconvex_invest_ele
 <= 1234
 
 c_u_InvestNonConvexFlowBlock_min(transformer_nonconvex_invest_electricityBus_0_0)_:
-+0.25 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0)
 -1 flow(transformer_nonconvex_invest_electricityBus_0_0)
++0.25 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_min(transformer_nonconvex_invest_electricityBus_0_1)_:
-+0.25 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1)
 -1 flow(transformer_nonconvex_invest_electricityBus_0_1)
++0.25 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_min(transformer_nonconvex_invest_electricityBus_0_2)_:
-+0.25 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2)
 -1 flow(transformer_nonconvex_invest_electricityBus_0_2)
++0.25 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_max(transformer_nonconvex_invest_electricityBus_0_0)_:
--0.5 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0)
 +1 flow(transformer_nonconvex_invest_electricityBus_0_0)
+-0.5 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_max(transformer_nonconvex_invest_electricityBus_0_1)_:
--0.5 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1)
 +1 flow(transformer_nonconvex_invest_electricityBus_0_1)
+-0.5 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_max(transformer_nonconvex_invest_electricityBus_0_2)_:
--0.5 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2)
 +1 flow(transformer_nonconvex_invest_electricityBus_0_2)
+-0.5 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_invest_nc_one(transformer_nonconvex_invest_electricityBus_0_0)_:
--1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_0)
 +1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0)
+-1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_0)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_invest_nc_one(transformer_nonconvex_invest_electricityBus_0_1)_:
--1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_1)
 +1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1)
+-1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_1)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_invest_nc_one(transformer_nonconvex_invest_electricityBus_0_2)_:
--1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_2)
 +1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2)
+-1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_2)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_invest_nc_two(transformer_nonconvex_invest_electricityBus_0_0)_:
@@ -118,39 +118,36 @@ c_u_InvestNonConvexFlowBlock_invest_nc_two(transformer_nonconvex_invest_electric
 
 c_u_InvestNonConvexFlowBlock_invest_nc_three(transformer_nonconvex_invest_electricityBus_0_0)_:
 +1 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus_0)
-+1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_0)
 -1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_0)
++1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_0)
 <= 1234
 
 c_u_InvestNonConvexFlowBlock_invest_nc_three(transformer_nonconvex_invest_electricityBus_0_1)_:
 +1 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus_0)
-+1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_1)
 -1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_1)
++1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_1)
 <= 1234
 
 c_u_InvestNonConvexFlowBlock_invest_nc_three(transformer_nonconvex_invest_electricityBus_0_2)_:
 +1 InvestNonConvexFlowBlock_invest(transformer_nonconvex_invest_electricityBus_0)
-+1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_2)
 -1 InvestNonConvexFlowBlock_status_nominal(transformer_nonconvex_invest_electricityBus_2)
++1234 InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_2)
 <= 1234
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(fuelBus_transformer_nonconvex_invest_0_0) <= +inf
-   0 <= flow(fuelBus_transformer_nonconvex_invest_0_1) <= +inf
-   0 <= flow(fuelBus_transformer_nonconvex_invest_0_2) <= +inf
    0 <= flow(transformer_nonconvex_invest_electricityBus_0_0) <= +inf
    0 <= flow(transformer_nonconvex_invest_electricityBus_0_1) <= +inf
    0 <= flow(transformer_nonconvex_invest_electricityBus_0_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_0) <= 1234
+   0 <= flow(fuelBus_transformer_nonconvex_invest_0_0) <= +inf
+   0 <= flow(fuelBus_transformer_nonconvex_invest_0_1) <= +inf
+   0 <= flow(fuelBus_transformer_nonconvex_invest_0_2) <= +inf
    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
+   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
 binary
   InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_0)
   InvestNonConvexFlowBlock_status(transformer_nonconvex_invest_electricityBus_1)
diff --git a/tests/lp_files/flow_reaching_lifetime.lp b/tests/lp_files/flow_reaching_lifetime.lp
index 01644408..e4b06321 100644
--- a/tests/lp_files/flow_reaching_lifetime.lp
+++ b/tests/lp_files/flow_reaching_lifetime.lp
@@ -43,14 +43,11 @@ c_e_SimpleFlowBlock_lifetime_output(electricityBus_excess_2_5)_:
 +1 flow(electricityBus_excess_2_5)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_excess_0_0) <= 8
-   0 <= flow(electricityBus_excess_0_1) <= 8
-   0 <= flow(electricityBus_excess_1_2) <= 8
-   0 <= flow(electricityBus_excess_1_3) <= 8
-   0 <= flow(electricityBus_excess_2_4) <= 8
-   0 <= flow(electricityBus_excess_2_5) <= 8
+   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
index 86fefab7..61f0a0a7 100644
--- a/tests/lp_files/flow_reaching_lifetime_initial_age.lp
+++ b/tests/lp_files/flow_reaching_lifetime_initial_age.lp
@@ -51,14 +51,11 @@ c_e_SimpleFlowBlock_lifetime_age_output(electricityBus_excess_2_5)_:
 +1 flow(electricityBus_excess_2_5)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_excess_0_0) <= 8
-   0 <= flow(electricityBus_excess_0_1) <= 8
-   0 <= flow(electricityBus_excess_1_2) <= 8
-   0 <= flow(electricityBus_excess_1_3) <= 8
-   0 <= flow(electricityBus_excess_2_4) <= 8
-   0 <= flow(electricityBus_excess_2_5) <= 8
+   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 4d1d67e1..f8598642 100644
--- a/tests/lp_files/generic_invest_limit.lp
+++ b/tests/lp_files/generic_invest_limit.lp
@@ -2,38 +2,33 @@
 
 min 
 objective:
-+50 InvestmentFlowBlock_invest(source_0_bus_1_0)
 +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_0)
 +1 InvestmentFlowBlock_invest(source_1_bus_1_0)
++4 InvestmentFlowBlock_invest(source_0_bus_1_0)
 <= 20
 
 c_e_BusBlock_balance(bus_1_0_0)_:
 +1 flow(source_0_bus_1_0_0)
-+1 flow(source_1_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_0_1)_:
 +1 flow(source_0_bus_1_0_1)
-+1 flow(source_1_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_0_2)_:
 +1 flow(source_0_bus_1_0_2)
-+1 flow(source_1_bus_1_0_2)
 +1 flow(source_2_bus_1_0_2)
-= 0
-
-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)
++1 flow(source_1_bus_1_0_2)
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(source_1_bus_1_0)_:
@@ -46,68 +41,70 @@ c_e_InvestmentFlowBlock_total_rule(source_2_bus_1_0)_:
 +1 InvestmentFlowBlock_total(source_2_bus_1_0)
 = 0
 
-c_u_InvestmentFlowBlock_max(source_0_bus_1_0_0)_:
--1 InvestmentFlowBlock_total(source_0_bus_1_0)
-+1 flow(source_0_bus_1_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(source_0_bus_1_0_1)_:
--1 InvestmentFlowBlock_total(source_0_bus_1_0)
-+1 flow(source_0_bus_1_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(source_0_bus_1_0_2)_:
--1 InvestmentFlowBlock_total(source_0_bus_1_0)
-+1 flow(source_0_bus_1_0_2)
-<= 0
+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 InvestmentFlowBlock_total(source_1_bus_1_0)
 +1 flow(source_1_bus_1_0_0)
+-1 InvestmentFlowBlock_total(source_1_bus_1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(source_1_bus_1_0_1)_:
--1 InvestmentFlowBlock_total(source_1_bus_1_0)
 +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_2)_:
--1 InvestmentFlowBlock_total(source_1_bus_1_0)
 +1 flow(source_1_bus_1_0_2)
+-1 InvestmentFlowBlock_total(source_1_bus_1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(source_2_bus_1_0_0)_:
--1 InvestmentFlowBlock_total(source_2_bus_1_0)
 +1 flow(source_2_bus_1_0_0)
+-1 InvestmentFlowBlock_total(source_2_bus_1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(source_2_bus_1_0_1)_:
--1 InvestmentFlowBlock_total(source_2_bus_1_0)
 +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_2)_:
--1 InvestmentFlowBlock_total(source_2_bus_1_0)
 +1 flow(source_2_bus_1_0_2)
+-1 InvestmentFlowBlock_total(source_2_bus_1_0)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+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_0_bus_1_0_1)_:
++1 flow(source_0_bus_1_0_1)
+-1 InvestmentFlowBlock_total(source_0_bus_1_0)
+<= 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 <= 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_0_bus_1_0_1) <= +inf
-   0 <= flow(source_0_bus_1_0_2) <= +inf
-   0 <= flow(source_1_bus_1_0_0) <= +inf
-   0 <= flow(source_1_bus_1_0_1) <= +inf
-   0 <= flow(source_1_bus_1_0_2) <= +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 <= InvestmentFlowBlock_invest(source_0_bus_1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(source_1_bus_1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(source_2_bus_1_0) <= +inf
-   0 <= InvestmentFlowBlock_total(source_0_bus_1_0) <= +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 6e469d64..16ed152a 100644
--- a/tests/lp_files/inactivity_costs.lp
+++ b/tests/lp_files/inactivity_costs.lp
@@ -2,13 +2,13 @@
 
 min 
 objective:
--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)
++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)
-+6 ONE_VAR_CONSTANT
+-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)
 
 s.t.
 
@@ -40,42 +40,40 @@ c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_inactivity_costs_Bu
 = 0
 
 c_u_NonConvexFlowBlock_min(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)
++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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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_0_2)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_2)
 -1 flow(cheap_plant_inactivity_costs_Bus_C_0_2)
++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_2)
 <= 0
 
 c_u_NonConvexFlowBlock_max(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)
+-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 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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_0_2)_:
--1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_2)
 +1 flow(cheap_plant_inactivity_costs_Bus_C_0_2)
+-1 NonConvexFlowBlock_status_nominal(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_0) <= 10
-   0 <= flow(cheap_plant_inactivity_costs_Bus_C_0_1) <= 10
-   0 <= flow(cheap_plant_inactivity_costs_Bus_C_0_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
index bfe689a0..b9a6b580 100644
--- a/tests/lp_files/inactivity_costs_multi_period.lp
+++ b/tests/lp_files/inactivity_costs_multi_period.lp
@@ -2,19 +2,19 @@
 
 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)
-+10 flow(cheap_plant_inactivity_costs_Bus_C_0_0)
-+10 flow(cheap_plant_inactivity_costs_Bus_C_0_1)
-+9.8039215686274499 flow(cheap_plant_inactivity_costs_Bus_C_1_2)
-+9.8039215686274499 flow(cheap_plant_inactivity_costs_Bus_C_1_3)
-+9.6116878123798539 flow(cheap_plant_inactivity_costs_Bus_C_2_4)
-+9.6116878123798539 flow(cheap_plant_inactivity_costs_Bus_C_2_5)
-+11.766243752402922 ONE_VAR_CONSTANT
 
 s.t.
 
@@ -73,75 +73,73 @@ c_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_inactivity_costs_Bu
 = 0
 
 c_u_NonConvexFlowBlock_min(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)
++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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_5)
 +1 flow(cheap_plant_inactivity_costs_Bus_C_2_5)
+-1 NonConvexFlowBlock_status_nominal(cheap_plant_inactivity_costs_Bus_C_5)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(cheap_plant_inactivity_costs_Bus_C_0_0) <= 10
-   0 <= flow(cheap_plant_inactivity_costs_Bus_C_0_1) <= 10
-   0 <= flow(cheap_plant_inactivity_costs_Bus_C_1_2) <= 10
-   0 <= flow(cheap_plant_inactivity_costs_Bus_C_1_3) <= 10
-   0 <= flow(cheap_plant_inactivity_costs_Bus_C_2_4) <= 10
-   0 <= flow(cheap_plant_inactivity_costs_Bus_C_2_5) <= 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_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
diff --git a/tests/lp_files/integer_source.lp b/tests/lp_files/integer_source.lp
index b4846d35..7a28ce40 100644
--- a/tests/lp_files/integer_source.lp
+++ b/tests/lp_files/integer_source.lp
@@ -21,23 +21,20 @@ c_e_BusBlock_balance(electricityBus_0_2)_:
 = 0
 
 c_e_SimpleFlowBlock_integer_flow_constr(electricityBus_excess_0_0)_:
-+1 SimpleFlowBlock_integer_flow(electricityBus_excess_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 SimpleFlowBlock_integer_flow(electricityBus_excess_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 SimpleFlowBlock_integer_flow(electricityBus_excess_2)
 -1 flow(electricityBus_excess_0_2)
++1 SimpleFlowBlock_integer_flow(electricityBus_excess_2)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
    0 <= flow(electricityBus_excess_0_0) <= 10
    0 <= flow(electricityBus_excess_0_1) <= 10
diff --git a/tests/lp_files/invest_non_convex_flow.lp b/tests/lp_files/invest_non_convex_flow.lp
index 982bec43..17d43149 100644
--- a/tests/lp_files/invest_non_convex_flow.lp
+++ b/tests/lp_files/invest_non_convex_flow.lp
@@ -2,28 +2,13 @@
 
 min 
 objective:
-+0.75 InvestNonConvexFlowBlock_invest(b1_b2_0)
 +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_0)_:
--1 flow(b1_b2_0_0)
-+1 flow(b2_b1_0_0)
-= 0
-
-c_e_BusBlock_balance(b1_0_1)_:
--1 flow(b1_b2_0_1)
-+1 flow(b2_b1_0_1)
-= 0
-
-c_e_BusBlock_balance(b1_0_2)_:
--1 flow(b1_b2_0_2)
-+1 flow(b2_b1_0_2)
-= 0
-
 c_e_BusBlock_balance(b2_0_0)_:
 +1 flow(b1_b2_0_0)
 -1 flow(b2_b1_0_0)
@@ -39,6 +24,21 @@ c_e_BusBlock_balance(b2_0_2)_:
 -1 flow(b2_b1_0_2)
 = 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(b1_0_1)_:
+-1 flow(b1_b2_0_1)
++1 flow(b2_b1_0_1)
+= 0
+
+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_0)_:
 +1 InvestNonConvexFlowBlock_invest(b1_b2_0)
 >= 0
@@ -48,48 +48,48 @@ c_u_InvestNonConvexFlowBlock_maximum_investment(b1_b2_0)_:
 <= 10
 
 c_u_InvestNonConvexFlowBlock_min(b1_b2_0_0)_:
-+0.25 InvestNonConvexFlowBlock_status_nominal(b1_b2_0)
 -1 flow(b1_b2_0_0)
++0.25 InvestNonConvexFlowBlock_status_nominal(b1_b2_0)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_min(b1_b2_0_1)_:
-+0.25 InvestNonConvexFlowBlock_status_nominal(b1_b2_1)
 -1 flow(b1_b2_0_1)
++0.25 InvestNonConvexFlowBlock_status_nominal(b1_b2_1)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_min(b1_b2_0_2)_:
-+0.25 InvestNonConvexFlowBlock_status_nominal(b1_b2_2)
 -1 flow(b1_b2_0_2)
++0.25 InvestNonConvexFlowBlock_status_nominal(b1_b2_2)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_max(b1_b2_0_0)_:
--0.5 InvestNonConvexFlowBlock_status_nominal(b1_b2_0)
 +1 flow(b1_b2_0_0)
+-0.5 InvestNonConvexFlowBlock_status_nominal(b1_b2_0)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_max(b1_b2_0_1)_:
--0.5 InvestNonConvexFlowBlock_status_nominal(b1_b2_1)
 +1 flow(b1_b2_0_1)
+-0.5 InvestNonConvexFlowBlock_status_nominal(b1_b2_1)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_max(b1_b2_0_2)_:
--0.5 InvestNonConvexFlowBlock_status_nominal(b1_b2_2)
 +1 flow(b1_b2_0_2)
+-0.5 InvestNonConvexFlowBlock_status_nominal(b1_b2_2)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_invest_nc_one(b1_b2_0_0)_:
--10 InvestNonConvexFlowBlock_status(b1_b2_0)
 +1 InvestNonConvexFlowBlock_status_nominal(b1_b2_0)
+-10 InvestNonConvexFlowBlock_status(b1_b2_0)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_invest_nc_one(b1_b2_0_1)_:
--10 InvestNonConvexFlowBlock_status(b1_b2_1)
 +1 InvestNonConvexFlowBlock_status_nominal(b1_b2_1)
+-10 InvestNonConvexFlowBlock_status(b1_b2_1)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_invest_nc_one(b1_b2_0_2)_:
--10 InvestNonConvexFlowBlock_status(b1_b2_2)
 +1 InvestNonConvexFlowBlock_status_nominal(b1_b2_2)
+-10 InvestNonConvexFlowBlock_status(b1_b2_2)
 <= 0
 
 c_u_InvestNonConvexFlowBlock_invest_nc_two(b1_b2_0_0)_:
@@ -109,39 +109,36 @@ c_u_InvestNonConvexFlowBlock_invest_nc_two(b1_b2_0_2)_:
 
 c_u_InvestNonConvexFlowBlock_invest_nc_three(b1_b2_0_0)_:
 +1 InvestNonConvexFlowBlock_invest(b1_b2_0)
-+10 InvestNonConvexFlowBlock_status(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_0_1)_:
 +1 InvestNonConvexFlowBlock_invest(b1_b2_0)
-+10 InvestNonConvexFlowBlock_status(b1_b2_1)
 -1 InvestNonConvexFlowBlock_status_nominal(b1_b2_1)
++10 InvestNonConvexFlowBlock_status(b1_b2_1)
 <= 10
 
 c_u_InvestNonConvexFlowBlock_invest_nc_three(b1_b2_0_2)_:
 +1 InvestNonConvexFlowBlock_invest(b1_b2_0)
-+10 InvestNonConvexFlowBlock_status(b1_b2_2)
 -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_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(b1_b2_0) <= 1
-   0 <= InvestNonConvexFlowBlock_status(b1_b2_1) <= 1
-   0 <= InvestNonConvexFlowBlock_status(b1_b2_2) <= 1
-   0 <= InvestNonConvexFlowBlock_invest(b1_b2_0) <= 10
    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 31847784..f7749fb1 100644
--- a/tests/lp_files/invest_source_fixed_sink.lp
+++ b/tests/lp_files/invest_source_fixed_sink.lp
@@ -11,15 +11,15 @@ s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
 +1 flow(pv_electricityBus_0_0)
-= 50000
+= 50000.0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
 +1 flow(pv_electricityBus_0_1)
-= 80000
+= 80000.0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
 +1 flow(pv_electricityBus_0_2)
-= 30000
+= 30000.0
 
 c_e_InvestmentFlowBlock_total_rule(pv_electricityBus_0)_:
 -1 InvestmentFlowBlock_invest(pv_electricityBus_0)
@@ -27,27 +27,24 @@ c_e_InvestmentFlowBlock_total_rule(pv_electricityBus_0)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(pv_electricityBus_0_0)_:
--45 InvestmentFlowBlock_total(pv_electricityBus_0)
 +1 flow(pv_electricityBus_0_0)
+-45 InvestmentFlowBlock_total(pv_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(pv_electricityBus_0_1)_:
--83 InvestmentFlowBlock_total(pv_electricityBus_0)
 +1 flow(pv_electricityBus_0_1)
+-83 InvestmentFlowBlock_total(pv_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(pv_electricityBus_0_2)_:
--65 InvestmentFlowBlock_total(pv_electricityBus_0)
 +1 flow(pv_electricityBus_0_2)
+-65 InvestmentFlowBlock_total(pv_electricityBus_0)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
+   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_invest(pv_electricityBus_0) <= +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
index cdd49b48..b0f28add 100644
--- a/tests/lp_files/invest_source_fixed_sink_multi_period.lp
+++ b/tests/lp_files/invest_source_fixed_sink_multi_period.lp
@@ -2,8 +2,8 @@
 
 min 
 objective:
-+157.50284813348861 InvestmentFlowBlock_invest(pv_electricityBus_0)
-+154.41455699361629 InvestmentFlowBlock_invest(pv_electricityBus_1)
++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)
@@ -16,27 +16,27 @@ s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
 +1 flow(pv_electricityBus_0_0)
-= 50000
+= 50000.0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
 +1 flow(pv_electricityBus_0_1)
-= 80000
+= 80000.0
 
 c_e_BusBlock_balance(electricityBus_1_2)_:
 +1 flow(pv_electricityBus_1_2)
-= 30000
+= 30000.0
 
 c_e_BusBlock_balance(electricityBus_1_3)_:
 +1 flow(pv_electricityBus_1_3)
-= 60000
+= 60000.0
 
 c_e_BusBlock_balance(electricityBus_2_4)_:
 +1 flow(pv_electricityBus_2_4)
-= 70000
+= 70000.0
 
 c_e_BusBlock_balance(electricityBus_2_5)_:
 +1 flow(pv_electricityBus_2_5)
-= 20000
+= 20000.0
 
 c_e_InvestmentFlowBlock_total_rule(pv_electricityBus_0)_:
 -1 InvestmentFlowBlock_invest(pv_electricityBus_0)
@@ -45,16 +45,16 @@ c_e_InvestmentFlowBlock_total_rule(pv_electricityBus_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(pv_electricityBus_1)_:
 -1 InvestmentFlowBlock_invest(pv_electricityBus_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -82,9 +82,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(pv_electricityBus_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(pv_electricityBus_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -100,53 +100,49 @@ c_e_InvestmentFlowBlock_old_rule(pv_electricityBus_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(pv_electricityBus_0_0)_:
--45 InvestmentFlowBlock_total(pv_electricityBus_0)
 +1 flow(pv_electricityBus_0_0)
+-45 InvestmentFlowBlock_total(pv_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(pv_electricityBus_0_1)_:
--83 InvestmentFlowBlock_total(pv_electricityBus_0)
 +1 flow(pv_electricityBus_0_1)
+-83 InvestmentFlowBlock_total(pv_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(pv_electricityBus_1_2)_:
--65 InvestmentFlowBlock_total(pv_electricityBus_1)
 +1 flow(pv_electricityBus_1_2)
+-65 InvestmentFlowBlock_total(pv_electricityBus_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(pv_electricityBus_1_3)_:
--67 InvestmentFlowBlock_total(pv_electricityBus_1)
 +1 flow(pv_electricityBus_1_3)
+-67 InvestmentFlowBlock_total(pv_electricityBus_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(pv_electricityBus_2_4)_:
--33 InvestmentFlowBlock_total(pv_electricityBus_2)
 +1 flow(pv_electricityBus_2_4)
+-33 InvestmentFlowBlock_total(pv_electricityBus_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(pv_electricityBus_2_5)_:
--96 InvestmentFlowBlock_total(pv_electricityBus_2)
 +1 flow(pv_electricityBus_2_5)
+-96 InvestmentFlowBlock_total(pv_electricityBus_2)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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_invest(pv_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(pv_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(pv_electricityBus_2) <= +inf
    0 <= InvestmentFlowBlock_total(pv_electricityBus_0) <= +inf
    0 <= InvestmentFlowBlock_total(pv_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_total(pv_electricityBus_2) <= +inf
-   0 <= InvestmentFlowBlock_old(pv_electricityBus_0) <= +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
@@ -154,4 +150,5 @@ bounds
    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 dd071ce6..c52f8973 100644
--- a/tests/lp_files/investment_limit.lp
+++ b/tests/lp_files/investment_limit.lp
@@ -2,37 +2,42 @@
 
 min 
 objective:
-+145 GenericInvestmentStorageBlock_invest(storage_invest_limit_0)
 +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_0)
 +123 InvestmentFlowBlock_invest(Source_Bus1_0)
++145 GenericInvestmentStorageBlock_invest(storage_invest_limit_0)
 <= 900
 
 c_e_BusBlock_balance(Bus1_0_0)_:
--1 flow(Bus1_storage_invest_limit_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_0_1)_:
--1 flow(Bus1_storage_invest_limit_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_0_2)_:
--1 flow(Bus1_storage_invest_limit_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_e_InvestmentFlowBlock_total_rule(Bus1_storage_invest_limit_0)_:
--1 InvestmentFlowBlock_invest(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)_:
@@ -40,54 +45,49 @@ c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_:
 +1 InvestmentFlowBlock_total(Source_Bus1_0)
 = 0
 
-c_e_InvestmentFlowBlock_total_rule(storage_invest_limit_Bus1_0)_:
--1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1_0)
-+1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0)
-= 0
-
 c_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_0_0)_:
--1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_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 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0)
 +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_0_2)_:
--1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0)
 +1 flow(Bus1_storage_invest_limit_0_2)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
-+1 flow(Source_Bus1_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
-+1 flow(Source_Bus1_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Source_Bus1_0_2)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
-+1 flow(Source_Bus1_0_2)
+-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_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 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0)
 +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_0_2)_:
--1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0)
 +1 flow(storage_invest_limit_Bus1_0_2)
+-1 InvestmentFlowBlock_total(storage_invest_limit_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_GenericInvestmentStorageBlock_total_storage_rule(storage_invest_limit_0)_:
@@ -96,29 +96,29 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_invest_limit_0)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_init_content_limit(storage_invest_limit)_:
-+1 GenericInvestmentStorageBlock_init_content(storage_invest_limit)
 -1 GenericInvestmentStorageBlock_invest(storage_invest_limit_0)
++1 GenericInvestmentStorageBlock_init_content(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_0)
-+1 flow(storage_invest_limit_Bus1_0_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)
--1 flow(Bus1_storage_invest_limit_0_1)
-+1 flow(storage_invest_limit_Bus1_0_1)
 = 0
 
 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_0_2)
-+1 flow(storage_invest_limit_Bus1_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_invest_limit)_:
@@ -127,53 +127,50 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_invest_limit)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_invest_limit_0)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(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)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(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_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_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_storage_content(storage_invest_limit_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_0_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_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_0) <= +inf
-   0 <= flow(Bus1_storage_invest_limit_0_1) <= +inf
-   0 <= flow(Bus1_storage_invest_limit_0_2) <= +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(Source_Bus1_0_1) <= +inf
-   0 <= flow(Source_Bus1_0_2) <= +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_invest(Source_Bus1_0) <= +inf
+   0 <= InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) <= +inf
    0 <= InvestmentFlowBlock_invest(storage_invest_limit_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_total(Bus1_storage_invest_limit_0) <= +inf
    0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_invest_limit_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_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_total(storage_invest_limit_0) <= +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
index 2ce54c3e..2f1f88c0 100644
--- a/tests/lp_files/investment_limit_with_dsm_DIW.lp
+++ b/tests/lp_files/investment_limit_with_dsm_DIW.lp
@@ -4,17 +4,17 @@ 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_0_1)
-+0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_2)
 +0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0)
-+0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1)
-+0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2)
 +0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_0)
-+0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1)
-+0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2)
 +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.
@@ -25,18 +25,18 @@ c_u_investment_limit_:
 <= 900
 
 c_e_BusBlock_balance(Bus1_0_0)_:
--1 flow(Bus1_sink_dsm_DIW_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(Bus1_sink_dsm_DIW_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(Bus1_sink_dsm_DIW_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)_:
@@ -45,18 +45,18 @@ c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_0)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_1)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_2)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_2)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(sink_dsm_DIW_0)_:
@@ -77,47 +77,47 @@ c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(sink_dsm_DIW_2)_:
 = 0
 
 c_e_SinkDSMDIWInvestmentBlock_input_output_relation(sink_dsm_DIW_0_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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_up(sink_dsm_DIW_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_do_shift(sink_dsm_DIW_0_1)
 +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)
-+1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1)
 = 0
 
 c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(sink_dsm_DIW_2)_:
 -1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1)
--1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2)
 +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)_:
@@ -136,79 +136,76 @@ c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(sink_dsm_DIW_0_2)_:
 <= 0
 
 c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(sink_dsm_DIW_0_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_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_shed(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_dsm_do_constraint(sink_dsm_DIW_0_2)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(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
 
 c_u_SinkDSMDIWInvestmentBlock_C2_constraint(sink_dsm_DIW_0_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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_up(sink_dsm_DIW_2)
 -0.5 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0)
++1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_2)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(Bus1_sink_dsm_DIW_0_0) <= +inf
-   0 <= flow(Bus1_sink_dsm_DIW_0_1) <= +inf
-   0 <= flow(Bus1_sink_dsm_DIW_0_2) <= +inf
-   0 <= flow(Source_Bus1_0_0) <= +inf
-   0 <= flow(Source_Bus1_0_1) <= +inf
-   0 <= flow(Source_Bus1_0_2) <= +inf
    0 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf
-   33 <= SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_0) <= 100
-   0 <= SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) <= +inf
    0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_2) <= +inf
    0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) <= +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
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(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
index 97b82a20..d6d74c5d 100644
--- a/tests/lp_files/investment_limit_with_dsm_DLR.lp
+++ b/tests/lp_files/investment_limit_with_dsm_DLR.lp
@@ -3,18 +3,18 @@
 min 
 objective:
 +123 InvestmentFlowBlock_invest(Source_Bus1_0)
-+0.5 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0)
-+0.5 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1)
-+0.5 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2)
-+0.5 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0)
-+0.5 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1)
-+0.5 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2)
 +0.5 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0)
-+0.5 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1)
-+0.5 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2)
++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.
@@ -25,18 +25,18 @@ c_u_investment_limit_:
 <= 900
 
 c_e_BusBlock_balance(Bus1_0_0)_:
--1 flow(Bus1_sink_dsm_DLR_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(Bus1_sink_dsm_DLR_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(Bus1_sink_dsm_DLR_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)_:
@@ -45,18 +45,18 @@ c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_0)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_1)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_2)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_2)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(sink_dsm_DLR_0)_:
@@ -77,30 +77,30 @@ c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(sink_dsm_DLR_1_2)_:
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_input_output_relation(sink_dsm_DLR_0_0)_:
--1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_up(sink_dsm_DLR_1_1)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1)
--1 SinkDSMDLRInvestmentBlock_dsm_up(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_balance_dsm_up(sink_dsm_DLR_1_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2)
--1 SinkDSMDLRInvestmentBlock_dsm_up(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)_:
@@ -108,13 +108,13 @@ c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_0)_:
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_1)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(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_balance_dsm_do(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)_:
@@ -122,13 +122,13 @@ c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_0)_:
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_1)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(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_balance_dsm_up(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)_:
@@ -140,61 +140,61 @@ c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(sink_dsm_DLR_1_2)_:
 = 0
 
 c_u_SinkDSMDLRInvestmentBlock_availability_red(sink_dsm_DLR_0_0)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_up(sink_dsm_DLR_1_1)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_up(sink_dsm_DLR_1_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_do(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)
 <= 0
 
 c_u_SinkDSMDLRInvestmentBlock_availability_inc(sink_dsm_DLR_0_1)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_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_balance_dsm_do(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_0)
 <= 0
 
 c_e_SinkDSMDLRInvestmentBlock_dr_storage_red(sink_dsm_DLR_0)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2)
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_0)_:
@@ -203,105 +203,102 @@ c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_0)_:
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_1)_:
--1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_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_balance_dsm_up(sink_dsm_DLR_1_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_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_balance_dsm_do(sink_dsm_DLR_1_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_up(sink_dsm_DLR_1_1)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(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_balance_dsm_up(sink_dsm_DLR_1_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(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_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(Bus1_sink_dsm_DLR_0_0) <= +inf
-   0 <= flow(Bus1_sink_dsm_DLR_0_1) <= +inf
-   0 <= flow(Bus1_sink_dsm_DLR_0_2) <= +inf
+   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 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf
+   0 <= flow(Bus1_sink_dsm_DLR_0_2) <= +inf
    0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf
-   33 <= SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_0) <= 100
    0 <= SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) <= +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_up(sink_dsm_DLR_1_0) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_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_0) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_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
diff --git a/tests/lp_files/investment_limit_with_dsm_oemof.lp b/tests/lp_files/investment_limit_with_dsm_oemof.lp
index 155431cd..ecfc1425 100644
--- a/tests/lp_files/investment_limit_with_dsm_oemof.lp
+++ b/tests/lp_files/investment_limit_with_dsm_oemof.lp
@@ -4,11 +4,11 @@ min
 objective:
 +123 InvestmentFlowBlock_invest(Source_Bus1_0)
 +0.5 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0)
-+0.5 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1)
-+0.5 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2)
 +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.
@@ -19,18 +19,18 @@ c_u_investment_limit_:
 <= 900
 
 c_e_BusBlock_balance(Bus1_0_0)_:
--1 flow(Bus1_sink_dsm_oemof_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(Bus1_sink_dsm_oemof_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(Bus1_sink_dsm_oemof_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)_:
@@ -39,18 +39,18 @@ c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_0)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_1)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_2)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_2)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(sink_dsm_oemof_0)_:
@@ -71,24 +71,24 @@ c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(sink_dsm_oemof_2)_:
 = 0
 
 c_e_SinkDSMOemofInvestmentBlock_input_output_relation(sink_dsm_oemof_0_0)_:
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_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_do_shed(sink_dsm_oemof_1)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_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_do_shed(sink_dsm_oemof_2)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_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)_:
@@ -107,51 +107,48 @@ c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(sink_dsm_oemof_0_2)_:
 <= 0
 
 c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(sink_dsm_oemof_0_0)_:
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_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_shed(sink_dsm_oemof_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_shed(sink_dsm_oemof_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_do_shift(sink_dsm_oemof_1)
 +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_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(Bus1_sink_dsm_oemof_0_0) <= +inf
-   0 <= flow(Bus1_sink_dsm_oemof_0_1) <= +inf
-   0 <= flow(Bus1_sink_dsm_oemof_0_2) <= +inf
+   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 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf
+   0 <= flow(Bus1_sink_dsm_oemof_0_2) <= +inf
    0 <= InvestmentFlowBlock_total(Source_Bus1_0) <= +inf
-   33 <= SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_0) <= 100
    0 <= SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_0) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2) <= +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_up(sink_dsm_oemof_0) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_2) <= +inf
 end
diff --git a/tests/lp_files/linear_transformer.lp b/tests/lp_files/linear_transformer.lp
index 31dea46c..90b829da 100644
--- a/tests/lp_files/linear_transformer.lp
+++ b/tests/lp_files/linear_transformer.lp
@@ -8,18 +8,6 @@ objective:
 
 s.t.
 
-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_BusBlock_balance(gas_0_0)_:
 +1 flow(gas_powerplantGas_0_0)
 = 0
@@ -32,29 +20,38 @@ 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_TransformerBlock_relation(powerplantGas_gas_electricity_0_0)_:
-+0.57999999999999996 flow(gas_powerplantGas_0_0)
 -1 flow(powerplantGas_electricity_0_0)
++0.58 flow(gas_powerplantGas_0_0)
 = 0
 
 c_e_TransformerBlock_relation(powerplantGas_gas_electricity_0_1)_:
-+0.57999999999999996 flow(gas_powerplantGas_0_1)
 -1 flow(powerplantGas_electricity_0_1)
++0.58 flow(gas_powerplantGas_0_1)
 = 0
 
 c_e_TransformerBlock_relation(powerplantGas_gas_electricity_0_2)_:
-+0.57999999999999996 flow(gas_powerplantGas_0_2)
 -1 flow(powerplantGas_electricity_0_2)
++0.58 flow(gas_powerplantGas_0_2)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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
-   0 <= flow(powerplantGas_electricity_0_0) <= 100000000000
-   0 <= flow(powerplantGas_electricity_0_1) <= 100000000000
-   0 <= flow(powerplantGas_electricity_0_2) <= 100000000000
 end
diff --git a/tests/lp_files/linear_transformer_chp.lp b/tests/lp_files/linear_transformer_chp.lp
index 6b5273c6..8c31a39a 100644
--- a/tests/lp_files/linear_transformer_chp.lp
+++ b/tests/lp_files/linear_transformer_chp.lp
@@ -8,18 +8,6 @@ objective:
 
 s.t.
 
-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(gasBus_0_0)_:
 +1 flow(gasBus_CHPpowerplantGas_0_0)
 = 0
@@ -32,6 +20,18 @@ 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
@@ -45,46 +45,43 @@ c_e_BusBlock_balance(heatBus_0_2)_:
 = 0
 
 c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_0)_:
++0.4 flow(gasBus_CHPpowerplantGas_0_0)
 -1 flow(CHPpowerplantGas_electricityBus_0_0)
-+0.40000000000000002 flow(gasBus_CHPpowerplantGas_0_0)
-= 0
-
-c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_1)_:
--1 flow(CHPpowerplantGas_electricityBus_0_1)
-+0.40000000000000002 flow(gasBus_CHPpowerplantGas_0_1)
-= 0
-
-c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_2)_:
--1 flow(CHPpowerplantGas_electricityBus_0_2)
-+0.40000000000000002 flow(gasBus_CHPpowerplantGas_0_2)
 = 0
 
 c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_0_0)_:
--1 flow(CHPpowerplantGas_heatBus_0_0)
 +0.5 flow(gasBus_CHPpowerplantGas_0_0)
+-1 flow(CHPpowerplantGas_heatBus_0_0)
+= 0
+
+c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_1)_:
++0.4 flow(gasBus_CHPpowerplantGas_0_1)
+-1 flow(CHPpowerplantGas_electricityBus_0_1)
 = 0
 
 c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_0_1)_:
--1 flow(CHPpowerplantGas_heatBus_0_1)
 +0.5 flow(gasBus_CHPpowerplantGas_0_1)
+-1 flow(CHPpowerplantGas_heatBus_0_1)
+= 0
+
+c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_2)_:
++0.4 flow(gasBus_CHPpowerplantGas_0_2)
+-1 flow(CHPpowerplantGas_electricityBus_0_2)
 = 0
 
 c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_0_2)_:
--1 flow(CHPpowerplantGas_heatBus_0_2)
 +0.5 flow(gasBus_CHPpowerplantGas_0_2)
+-1 flow(CHPpowerplantGas_heatBus_0_2)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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
-   0 <= flow(gasBus_CHPpowerplantGas_0_0) <= 100000000000
-   0 <= flow(gasBus_CHPpowerplantGas_0_1) <= 100000000000
-   0 <= flow(gasBus_CHPpowerplantGas_0_2) <= 100000000000
 end
diff --git a/tests/lp_files/linear_transformer_chp_invest.lp b/tests/lp_files/linear_transformer_chp_invest.lp
index 018e930e..4109107d 100644
--- a/tests/lp_files/linear_transformer_chp_invest.lp
+++ b/tests/lp_files/linear_transformer_chp_invest.lp
@@ -9,18 +9,6 @@ objective:
 
 s.t.
 
-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(gasBus_0_0)_:
 +1 flow(gasBus_chp_powerplant_gas_0_0)
 = 0
@@ -33,6 +21,18 @@ 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
@@ -46,33 +46,33 @@ c_e_BusBlock_balance(heatBus_0_2)_:
 = 0
 
 c_e_TransformerBlock_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.40000000000000002 flow(gasBus_chp_powerplant_gas_0_0)
-= 0
-
-c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_electricityBus_0_1)_:
--1 flow(chp_powerplant_gas_electricityBus_0_1)
-+0.40000000000000002 flow(gasBus_chp_powerplant_gas_0_1)
-= 0
-
-c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_electricityBus_0_2)_:
--1 flow(chp_powerplant_gas_electricityBus_0_2)
-+0.40000000000000002 flow(gasBus_chp_powerplant_gas_0_2)
 = 0
 
 c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_0_0)_:
--1 flow(chp_powerplant_gas_heatBus_0_0)
 +0.5 flow(gasBus_chp_powerplant_gas_0_0)
+-1 flow(chp_powerplant_gas_heatBus_0_0)
+= 0
+
+c_e_TransformerBlock_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_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_0_1)_:
--1 flow(chp_powerplant_gas_heatBus_0_1)
 +0.5 flow(gasBus_chp_powerplant_gas_0_1)
+-1 flow(chp_powerplant_gas_heatBus_0_1)
+= 0
+
+c_e_TransformerBlock_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_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_0_2)_:
--1 flow(chp_powerplant_gas_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)_:
@@ -81,33 +81,30 @@ c_e_InvestmentFlowBlock_total_rule(gasBus_chp_powerplant_gas_0)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_0_0)_:
--1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_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 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0)
 +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 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0)
 +1 flow(gasBus_chp_powerplant_gas_0_2)
+-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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 <= 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 <= InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_0) <= 1000
    0 <= InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) <= +inf
 end
diff --git a/tests/lp_files/linear_transformer_chp_invest_multi_period.lp b/tests/lp_files/linear_transformer_chp_invest_multi_period.lp
index 4ad96b27..56db8e8f 100644
--- a/tests/lp_files/linear_transformer_chp_invest_multi_period.lp
+++ b/tests/lp_files/linear_transformer_chp_invest_multi_period.lp
@@ -2,42 +2,18 @@
 
 min 
 objective:
-+31.823209703696548 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_0)
++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.019607843137251 flow(gasBus_chp_powerplant_gas_1_2)
-+49.019607843137251 flow(gasBus_chp_powerplant_gas_1_3)
++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(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(gasBus_0_0)_:
 +1 flow(gasBus_chp_powerplant_gas_0_0)
 = 0
@@ -62,6 +38,30 @@ 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
@@ -87,63 +87,63 @@ c_e_BusBlock_balance(heatBus_2_5)_:
 = 0
 
 c_e_TransformerBlock_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.40000000000000002 flow(gasBus_chp_powerplant_gas_0_0)
-= 0
-
-c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_electricityBus_0_1)_:
--1 flow(chp_powerplant_gas_electricityBus_0_1)
-+0.40000000000000002 flow(gasBus_chp_powerplant_gas_0_1)
-= 0
-
-c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_electricityBus_1_2)_:
--1 flow(chp_powerplant_gas_electricityBus_1_2)
-+0.40000000000000002 flow(gasBus_chp_powerplant_gas_1_2)
-= 0
-
-c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_electricityBus_1_3)_:
--1 flow(chp_powerplant_gas_electricityBus_1_3)
-+0.40000000000000002 flow(gasBus_chp_powerplant_gas_1_3)
-= 0
-
-c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_electricityBus_2_4)_:
--1 flow(chp_powerplant_gas_electricityBus_2_4)
-+0.40000000000000002 flow(gasBus_chp_powerplant_gas_2_4)
-= 0
-
-c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_electricityBus_2_5)_:
--1 flow(chp_powerplant_gas_electricityBus_2_5)
-+0.40000000000000002 flow(gasBus_chp_powerplant_gas_2_5)
 = 0
 
 c_e_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_0_0)_:
--1 flow(chp_powerplant_gas_heatBus_0_0)
 +0.5 flow(gasBus_chp_powerplant_gas_0_0)
+-1 flow(chp_powerplant_gas_heatBus_0_0)
+= 0
+
+c_e_TransformerBlock_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_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_0_1)_:
--1 flow(chp_powerplant_gas_heatBus_0_1)
 +0.5 flow(gasBus_chp_powerplant_gas_0_1)
+-1 flow(chp_powerplant_gas_heatBus_0_1)
+= 0
+
+c_e_TransformerBlock_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_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_1_2)_:
--1 flow(chp_powerplant_gas_heatBus_1_2)
 +0.5 flow(gasBus_chp_powerplant_gas_1_2)
+-1 flow(chp_powerplant_gas_heatBus_1_2)
+= 0
+
+c_e_TransformerBlock_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_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_1_3)_:
--1 flow(chp_powerplant_gas_heatBus_1_3)
 +0.5 flow(gasBus_chp_powerplant_gas_1_3)
+-1 flow(chp_powerplant_gas_heatBus_1_3)
+= 0
+
+c_e_TransformerBlock_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_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_2_4)_:
--1 flow(chp_powerplant_gas_heatBus_2_4)
 +0.5 flow(gasBus_chp_powerplant_gas_2_4)
+-1 flow(chp_powerplant_gas_heatBus_2_4)
+= 0
+
+c_e_TransformerBlock_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_TransformerBlock_relation(chp_powerplant_gas_gasBus_heatBus_2_5)_:
--1 flow(chp_powerplant_gas_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)_:
@@ -153,16 +153,16 @@ c_e_InvestmentFlowBlock_total_rule(gasBus_chp_powerplant_gas_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(gasBus_chp_powerplant_gas_1)_:
 -1 InvestmentFlowBlock_invest(gasBus_chp_powerplant_gas_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -190,9 +190,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(gasBus_chp_powerplant_gas_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(gasBus_chp_powerplant_gas_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -208,39 +208,45 @@ c_e_InvestmentFlowBlock_old_rule(gasBus_chp_powerplant_gas_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(gasBus_chp_powerplant_gas_0_0)_:
--1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_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 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0)
 +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 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_1)
 +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 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_1)
 +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 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_2)
 +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 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_2)
 +1 flow(gasBus_chp_powerplant_gas_2_5)
+-1 InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_2)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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
@@ -253,20 +259,10 @@ bounds
    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 <= 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 <= 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 <= InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_0) <= +inf
    0 <= InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_1) <= +inf
-   0 <= InvestmentFlowBlock_total(gasBus_chp_powerplant_gas_2) <= +inf
-   0 <= InvestmentFlowBlock_old(gasBus_chp_powerplant_gas_0) <= +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
@@ -274,4 +270,5 @@ bounds
    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_transformer_chp_multi_period.lp b/tests/lp_files/linear_transformer_chp_multi_period.lp
index e91c85b0..a5bece0a 100644
--- a/tests/lp_files/linear_transformer_chp_multi_period.lp
+++ b/tests/lp_files/linear_transformer_chp_multi_period.lp
@@ -4,37 +4,13 @@ min
 objective:
 +50 flow(gasBus_CHPpowerplantGas_0_0)
 +50 flow(gasBus_CHPpowerplantGas_0_1)
-+49.019607843137251 flow(gasBus_CHPpowerplantGas_1_2)
-+49.019607843137251 flow(gasBus_CHPpowerplantGas_1_3)
++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(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(gasBus_0_0)_:
 +1 flow(gasBus_CHPpowerplantGas_0_0)
 = 0
@@ -59,6 +35,30 @@ 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
@@ -84,69 +84,72 @@ c_e_BusBlock_balance(heatBus_2_5)_:
 = 0
 
 c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_0)_:
++0.4 flow(gasBus_CHPpowerplantGas_0_0)
 -1 flow(CHPpowerplantGas_electricityBus_0_0)
-+0.40000000000000002 flow(gasBus_CHPpowerplantGas_0_0)
-= 0
-
-c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_1)_:
--1 flow(CHPpowerplantGas_electricityBus_0_1)
-+0.40000000000000002 flow(gasBus_CHPpowerplantGas_0_1)
-= 0
-
-c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_1_2)_:
--1 flow(CHPpowerplantGas_electricityBus_1_2)
-+0.40000000000000002 flow(gasBus_CHPpowerplantGas_1_2)
-= 0
-
-c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_1_3)_:
--1 flow(CHPpowerplantGas_electricityBus_1_3)
-+0.40000000000000002 flow(gasBus_CHPpowerplantGas_1_3)
-= 0
-
-c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_2_4)_:
--1 flow(CHPpowerplantGas_electricityBus_2_4)
-+0.40000000000000002 flow(gasBus_CHPpowerplantGas_2_4)
-= 0
-
-c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_2_5)_:
--1 flow(CHPpowerplantGas_electricityBus_2_5)
-+0.40000000000000002 flow(gasBus_CHPpowerplantGas_2_5)
 = 0
 
 c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_0_0)_:
--1 flow(CHPpowerplantGas_heatBus_0_0)
 +0.5 flow(gasBus_CHPpowerplantGas_0_0)
+-1 flow(CHPpowerplantGas_heatBus_0_0)
+= 0
+
+c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_0_1)_:
++0.4 flow(gasBus_CHPpowerplantGas_0_1)
+-1 flow(CHPpowerplantGas_electricityBus_0_1)
 = 0
 
 c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_0_1)_:
--1 flow(CHPpowerplantGas_heatBus_0_1)
 +0.5 flow(gasBus_CHPpowerplantGas_0_1)
+-1 flow(CHPpowerplantGas_heatBus_0_1)
+= 0
+
+c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_1_2)_:
++0.4 flow(gasBus_CHPpowerplantGas_1_2)
+-1 flow(CHPpowerplantGas_electricityBus_1_2)
 = 0
 
 c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_1_2)_:
--1 flow(CHPpowerplantGas_heatBus_1_2)
 +0.5 flow(gasBus_CHPpowerplantGas_1_2)
+-1 flow(CHPpowerplantGas_heatBus_1_2)
+= 0
+
+c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_1_3)_:
++0.4 flow(gasBus_CHPpowerplantGas_1_3)
+-1 flow(CHPpowerplantGas_electricityBus_1_3)
 = 0
 
 c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_1_3)_:
--1 flow(CHPpowerplantGas_heatBus_1_3)
 +0.5 flow(gasBus_CHPpowerplantGas_1_3)
+-1 flow(CHPpowerplantGas_heatBus_1_3)
+= 0
+
+c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_2_4)_:
++0.4 flow(gasBus_CHPpowerplantGas_2_4)
+-1 flow(CHPpowerplantGas_electricityBus_2_4)
 = 0
 
 c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_2_4)_:
--1 flow(CHPpowerplantGas_heatBus_2_4)
 +0.5 flow(gasBus_CHPpowerplantGas_2_4)
+-1 flow(CHPpowerplantGas_heatBus_2_4)
+= 0
+
+c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_electricityBus_2_5)_:
++0.4 flow(gasBus_CHPpowerplantGas_2_5)
+-1 flow(CHPpowerplantGas_electricityBus_2_5)
 = 0
 
 c_e_TransformerBlock_relation(CHPpowerplantGas_gasBus_heatBus_2_5)_:
--1 flow(CHPpowerplantGas_heatBus_2_5)
 +0.5 flow(gasBus_CHPpowerplantGas_2_5)
+-1 flow(CHPpowerplantGas_heatBus_2_5)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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
@@ -159,10 +162,4 @@ bounds
    0 <= flow(CHPpowerplantGas_heatBus_1_3) <= +inf
    0 <= flow(CHPpowerplantGas_heatBus_2_4) <= +inf
    0 <= flow(CHPpowerplantGas_heatBus_2_5) <= +inf
-   0 <= flow(gasBus_CHPpowerplantGas_0_0) <= 100000000000
-   0 <= flow(gasBus_CHPpowerplantGas_0_1) <= 100000000000
-   0 <= flow(gasBus_CHPpowerplantGas_1_2) <= 100000000000
-   0 <= flow(gasBus_CHPpowerplantGas_1_3) <= 100000000000
-   0 <= flow(gasBus_CHPpowerplantGas_2_4) <= 100000000000
-   0 <= flow(gasBus_CHPpowerplantGas_2_5) <= 100000000000
 end
diff --git a/tests/lp_files/linear_transformer_invest.lp b/tests/lp_files/linear_transformer_invest.lp
index 1e73bc44..1d9d4507 100644
--- a/tests/lp_files/linear_transformer_invest.lp
+++ b/tests/lp_files/linear_transformer_invest.lp
@@ -9,18 +9,6 @@ objective:
 
 s.t.
 
-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_BusBlock_balance(gas_0_0)_:
 +1 flow(gas_powerplant_gas_0_0)
 = 0
@@ -33,19 +21,31 @@ 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_TransformerBlock_relation(powerplant_gas_gas_electricity_0_0)_:
-+0.57999999999999996 flow(gas_powerplant_gas_0_0)
 -1 flow(powerplant_gas_electricity_0_0)
++0.58 flow(gas_powerplant_gas_0_0)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_0_1)_:
-+0.57999999999999996 flow(gas_powerplant_gas_0_1)
 -1 flow(powerplant_gas_electricity_0_1)
++0.58 flow(gas_powerplant_gas_0_1)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_0_2)_:
-+0.57999999999999996 flow(gas_powerplant_gas_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)_:
@@ -54,30 +54,27 @@ c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_0)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_0_0)_:
--1 InvestmentFlowBlock_total(powerplant_gas_electricity_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 InvestmentFlowBlock_total(powerplant_gas_electricity_0)
 +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 InvestmentFlowBlock_total(powerplant_gas_electricity_0)
 +1 flow(powerplant_gas_electricity_0_2)
+-1 InvestmentFlowBlock_total(powerplant_gas_electricity_0)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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 <= InvestmentFlowBlock_invest(powerplant_gas_electricity_0) <= 1000
+   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_transformer_invest_multi_period.lp b/tests/lp_files/linear_transformer_invest_multi_period.lp
index 29ee748f..97beffdb 100644
--- a/tests/lp_files/linear_transformer_invest_multi_period.lp
+++ b/tests/lp_files/linear_transformer_invest_multi_period.lp
@@ -4,40 +4,16 @@ min
 objective:
 +29.24459823787798 InvestmentFlowBlock_invest(powerplant_gas_electricity_0)
 +28.671174743017627 InvestmentFlowBlock_invest(powerplant_gas_electricity_1)
-+28.108994846095712 InvestmentFlowBlock_invest(powerplant_gas_electricity_2)
++28.10899484609571 InvestmentFlowBlock_invest(powerplant_gas_electricity_2)
 +50 flow(powerplant_gas_electricity_0_0)
 +50 flow(powerplant_gas_electricity_0_1)
-+49.019607843137251 flow(powerplant_gas_electricity_1_2)
-+49.019607843137251 flow(powerplant_gas_electricity_1_3)
++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(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_BusBlock_balance(gas_0_0)_:
 +1 flow(gas_powerplant_gas_0_0)
 = 0
@@ -62,34 +38,58 @@ 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_TransformerBlock_relation(powerplant_gas_gas_electricity_0_0)_:
-+0.57999999999999996 flow(gas_powerplant_gas_0_0)
 -1 flow(powerplant_gas_electricity_0_0)
++0.58 flow(gas_powerplant_gas_0_0)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_0_1)_:
-+0.57999999999999996 flow(gas_powerplant_gas_0_1)
 -1 flow(powerplant_gas_electricity_0_1)
++0.58 flow(gas_powerplant_gas_0_1)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_1_2)_:
-+0.57999999999999996 flow(gas_powerplant_gas_1_2)
 -1 flow(powerplant_gas_electricity_1_2)
++0.58 flow(gas_powerplant_gas_1_2)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_1_3)_:
-+0.57999999999999996 flow(gas_powerplant_gas_1_3)
 -1 flow(powerplant_gas_electricity_1_3)
++0.58 flow(gas_powerplant_gas_1_3)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_2_4)_:
-+0.57999999999999996 flow(gas_powerplant_gas_2_4)
 -1 flow(powerplant_gas_electricity_2_4)
++0.58 flow(gas_powerplant_gas_2_4)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_2_5)_:
-+0.57999999999999996 flow(gas_powerplant_gas_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)_:
@@ -99,16 +99,16 @@ c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_1)_:
 -1 InvestmentFlowBlock_invest(powerplant_gas_electricity_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -136,9 +136,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_electricity_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(powerplant_gas_electricity_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -154,33 +154,33 @@ c_e_InvestmentFlowBlock_old_rule(powerplant_gas_electricity_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_0_0)_:
--1 InvestmentFlowBlock_total(powerplant_gas_electricity_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 InvestmentFlowBlock_total(powerplant_gas_electricity_0)
 +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 InvestmentFlowBlock_total(powerplant_gas_electricity_1)
 +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 InvestmentFlowBlock_total(powerplant_gas_electricity_1)
 +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 InvestmentFlowBlock_total(powerplant_gas_electricity_2)
 +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 InvestmentFlowBlock_total(powerplant_gas_electricity_2)
 +1 flow(powerplant_gas_electricity_2_5)
+-1 InvestmentFlowBlock_total(powerplant_gas_electricity_2)
 <= 0
 
 c_u_InvestmentFlowBlock_overall_maximum(powerplant_gas_electricity_0)_:
@@ -199,30 +199,26 @@ c_l_InvestmentFlowBlock_overall_minimum(powerplant_gas_electricity)_:
 +1 InvestmentFlowBlock_total(powerplant_gas_electricity_2)
 >= 200
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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 <= 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(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_total(powerplant_gas_electricity_2) <= +inf
-   0 <= InvestmentFlowBlock_old(powerplant_gas_electricity_0) <= +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
@@ -230,4 +226,5 @@ bounds
    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_transformer_invest_multi_period_old.lp b/tests/lp_files/linear_transformer_invest_multi_period_old.lp
index b6627dc9..9a45f012 100644
--- a/tests/lp_files/linear_transformer_invest_multi_period_old.lp
+++ b/tests/lp_files/linear_transformer_invest_multi_period_old.lp
@@ -3,41 +3,17 @@
 min 
 objective:
 +20.601980198019806 InvestmentFlowBlock_invest(powerplant_gas_electricity_0)
-+20.198019801980202 InvestmentFlowBlock_invest(powerplant_gas_electricity_1)
++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.019607843137251 flow(powerplant_gas_electricity_1_2)
-+49.019607843137251 flow(powerplant_gas_electricity_1_3)
++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(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_BusBlock_balance(gas_0_0)_:
 +1 flow(gas_powerplant_gas_0_0)
 = 0
@@ -62,34 +38,58 @@ 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_TransformerBlock_relation(powerplant_gas_gas_electricity_0_0)_:
-+0.57999999999999996 flow(gas_powerplant_gas_0_0)
 -1 flow(powerplant_gas_electricity_0_0)
++0.58 flow(gas_powerplant_gas_0_0)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_0_1)_:
-+0.57999999999999996 flow(gas_powerplant_gas_0_1)
 -1 flow(powerplant_gas_electricity_0_1)
++0.58 flow(gas_powerplant_gas_0_1)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_1_2)_:
-+0.57999999999999996 flow(gas_powerplant_gas_1_2)
 -1 flow(powerplant_gas_electricity_1_2)
++0.58 flow(gas_powerplant_gas_1_2)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_1_3)_:
-+0.57999999999999996 flow(gas_powerplant_gas_1_3)
 -1 flow(powerplant_gas_electricity_1_3)
++0.58 flow(gas_powerplant_gas_1_3)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_2_4)_:
-+0.57999999999999996 flow(gas_powerplant_gas_2_4)
 -1 flow(powerplant_gas_electricity_2_4)
++0.58 flow(gas_powerplant_gas_2_4)
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_gas_electricity_2_5)_:
-+0.57999999999999996 flow(gas_powerplant_gas_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)_:
@@ -99,16 +99,16 @@ c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(powerplant_gas_electricity_1)_:
 -1 InvestmentFlowBlock_invest(powerplant_gas_electricity_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -137,9 +137,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_electricity_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(powerplant_gas_electricity_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -155,33 +155,33 @@ c_e_InvestmentFlowBlock_old_rule(powerplant_gas_electricity_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(powerplant_gas_electricity_0_0)_:
--1 InvestmentFlowBlock_total(powerplant_gas_electricity_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 InvestmentFlowBlock_total(powerplant_gas_electricity_0)
 +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 InvestmentFlowBlock_total(powerplant_gas_electricity_1)
 +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 InvestmentFlowBlock_total(powerplant_gas_electricity_1)
 +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 InvestmentFlowBlock_total(powerplant_gas_electricity_2)
 +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 InvestmentFlowBlock_total(powerplant_gas_electricity_2)
 +1 flow(powerplant_gas_electricity_2_5)
+-1 InvestmentFlowBlock_total(powerplant_gas_electricity_2)
 <= 0
 
 c_u_InvestmentFlowBlock_overall_maximum(powerplant_gas_electricity_0)_:
@@ -200,30 +200,26 @@ c_l_InvestmentFlowBlock_overall_minimum(powerplant_gas_electricity)_:
 +1 InvestmentFlowBlock_total(powerplant_gas_electricity_2)
 >= 200
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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 <= 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(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_total(powerplant_gas_electricity_2) <= +inf
-   0 <= InvestmentFlowBlock_old(powerplant_gas_electricity_0) <= +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
@@ -231,4 +227,5 @@ bounds
    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_transformer_multi_period.lp b/tests/lp_files/linear_transformer_multi_period.lp
index 88297d25..4ddebc36 100644
--- a/tests/lp_files/linear_transformer_multi_period.lp
+++ b/tests/lp_files/linear_transformer_multi_period.lp
@@ -4,37 +4,13 @@ min
 objective:
 +50 flow(powerplantGas_electricity_0_0)
 +50 flow(powerplantGas_electricity_0_1)
-+49.019607843137251 flow(powerplantGas_electricity_1_2)
-+49.019607843137251 flow(powerplantGas_electricity_1_3)
++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(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_BusBlock_balance(gas_0_0)_:
 +1 flow(gas_powerplantGas_0_0)
 = 0
@@ -59,50 +35,71 @@ 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_TransformerBlock_relation(powerplantGas_gas_electricity_0_0)_:
-+0.57999999999999996 flow(gas_powerplantGas_0_0)
 -1 flow(powerplantGas_electricity_0_0)
++0.58 flow(gas_powerplantGas_0_0)
 = 0
 
 c_e_TransformerBlock_relation(powerplantGas_gas_electricity_0_1)_:
-+0.57999999999999996 flow(gas_powerplantGas_0_1)
 -1 flow(powerplantGas_electricity_0_1)
++0.58 flow(gas_powerplantGas_0_1)
 = 0
 
 c_e_TransformerBlock_relation(powerplantGas_gas_electricity_1_2)_:
-+0.57999999999999996 flow(gas_powerplantGas_1_2)
 -1 flow(powerplantGas_electricity_1_2)
++0.58 flow(gas_powerplantGas_1_2)
 = 0
 
 c_e_TransformerBlock_relation(powerplantGas_gas_electricity_1_3)_:
-+0.57999999999999996 flow(gas_powerplantGas_1_3)
 -1 flow(powerplantGas_electricity_1_3)
++0.58 flow(gas_powerplantGas_1_3)
 = 0
 
 c_e_TransformerBlock_relation(powerplantGas_gas_electricity_2_4)_:
-+0.57999999999999996 flow(gas_powerplantGas_2_4)
 -1 flow(powerplantGas_electricity_2_4)
++0.58 flow(gas_powerplantGas_2_4)
 = 0
 
 c_e_TransformerBlock_relation(powerplantGas_gas_electricity_2_5)_:
-+0.57999999999999996 flow(gas_powerplantGas_2_5)
 -1 flow(powerplantGas_electricity_2_5)
++0.58 flow(gas_powerplantGas_2_5)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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
-   0 <= flow(powerplantGas_electricity_0_0) <= 100000000000
-   0 <= flow(powerplantGas_electricity_0_1) <= 100000000000
-   0 <= flow(powerplantGas_electricity_1_2) <= 100000000000
-   0 <= flow(powerplantGas_electricity_1_3) <= 100000000000
-   0 <= flow(powerplantGas_electricity_2_4) <= 100000000000
-   0 <= flow(powerplantGas_electricity_2_5) <= 100000000000
 end
diff --git a/tests/lp_files/link.lp b/tests/lp_files/link.lp
index 6990b070..56d1b4df 100644
--- a/tests/lp_files/link.lp
+++ b/tests/lp_files/link.lp
@@ -7,79 +7,77 @@ objective:
 s.t.
 
 c_e_BusBlock_balance(bel0_0_0)_:
--1 flow(bel0_link_0_0)
 +1 flow(link_bel0_0_0)
+-1 flow(bel0_link_0_0)
 = 0
 
 c_e_BusBlock_balance(bel0_0_1)_:
--1 flow(bel0_link_0_1)
 +1 flow(link_bel0_0_1)
+-1 flow(bel0_link_0_1)
 = 0
 
 c_e_BusBlock_balance(bel0_0_2)_:
--1 flow(bel0_link_0_2)
 +1 flow(link_bel0_0_2)
+-1 flow(bel0_link_0_2)
 = 0
 
 c_e_BusBlock_balance(bel1_0_0)_:
--1 flow(bel1_link_0_0)
 +1 flow(link_bel1_0_0)
+-1 flow(bel1_link_0_0)
 = 0
 
 c_e_BusBlock_balance(bel1_0_1)_:
--1 flow(bel1_link_0_1)
 +1 flow(link_bel1_0_1)
+-1 flow(bel1_link_0_1)
 = 0
 
 c_e_BusBlock_balance(bel1_0_2)_:
--1 flow(bel1_link_0_2)
 +1 flow(link_bel1_0_2)
+-1 flow(bel1_link_0_2)
 = 0
 
 c_e_LinkBlock_relation(link_bel0_bel1_0_0)_:
--0.80000000000000004 flow(bel0_link_0_0)
+-0.8 flow(bel0_link_0_0)
 +1 flow(link_bel1_0_0)
 = 0
 
-c_e_LinkBlock_relation(link_bel0_bel1_0_1)_:
--0.80000000000000004 flow(bel0_link_0_1)
-+1 flow(link_bel1_0_1)
-= 0
-
-c_e_LinkBlock_relation(link_bel0_bel1_0_2)_:
--0.80000000000000004 flow(bel0_link_0_2)
-+1 flow(link_bel1_0_2)
-= 0
-
 c_e_LinkBlock_relation(link_bel1_bel0_0_0)_:
--0.90000000000000002 flow(bel1_link_0_0)
 +1 flow(link_bel0_0_0)
+-0.9 flow(bel1_link_0_0)
+= 0
+
+c_e_LinkBlock_relation(link_bel0_bel1_0_1)_:
+-0.8 flow(bel0_link_0_1)
++1 flow(link_bel1_0_1)
 = 0
 
 c_e_LinkBlock_relation(link_bel1_bel0_0_1)_:
--0.90000000000000002 flow(bel1_link_0_1)
 +1 flow(link_bel0_0_1)
+-0.9 flow(bel1_link_0_1)
+= 0
+
+c_e_LinkBlock_relation(link_bel0_bel1_0_2)_:
+-0.8 flow(bel0_link_0_2)
++1 flow(link_bel1_0_2)
 = 0
 
 c_e_LinkBlock_relation(link_bel1_bel0_0_2)_:
--0.90000000000000002 flow(bel1_link_0_2)
 +1 flow(link_bel0_0_2)
+-0.9 flow(bel1_link_0_2)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(bel0_link_0_0) <= 4
-   0 <= flow(bel0_link_0_1) <= 4
-   0 <= flow(bel0_link_0_2) <= 4
-   0 <= flow(bel1_link_0_0) <= 2
-   0 <= flow(bel1_link_0_1) <= 2
-   0 <= flow(bel1_link_0_2) <= 2
+   1 <= ONE_VAR_CONSTANT <= 1
    0 <= flow(link_bel0_0_0) <= +inf
+   0 <= flow(bel0_link_0_0) <= 4
    0 <= flow(link_bel0_0_1) <= +inf
+   0 <= flow(bel0_link_0_1) <= 4
    0 <= flow(link_bel0_0_2) <= +inf
+   0 <= flow(bel0_link_0_2) <= 4
    0 <= flow(link_bel1_0_0) <= +inf
+   0 <= flow(bel1_link_0_0) <= 2
    0 <= flow(link_bel1_0_1) <= +inf
+   0 <= flow(bel1_link_0_1) <= 2
    0 <= flow(link_bel1_0_2) <= +inf
+   0 <= flow(bel1_link_0_2) <= 2
 end
diff --git a/tests/lp_files/max_source_min_sink.lp b/tests/lp_files/max_source_min_sink.lp
index 4ddf6f0d..21c940c6 100644
--- a/tests/lp_files/max_source_min_sink.lp
+++ b/tests/lp_files/max_source_min_sink.lp
@@ -23,14 +23,11 @@ c_e_BusBlock_balance(electricityBus_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_0) <= 54
-   50.759999999999998 <= flow(electricityBus_minDemand_0_1) <= 54
-   31.859999999999999 <= flow(electricityBus_minDemand_0_2) <= 54
-   0 <= flow(wind_electricityBus_0_0) <= 45.899999999999999
-   0 <= flow(wind_electricityBus_0_1) <= 51.299999999999997
-   0 <= flow(wind_electricityBus_0_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
index 175d8b9d..db3e1ab0 100644
--- a/tests/lp_files/max_source_min_sink_multi_period.lp
+++ b/tests/lp_files/max_source_min_sink_multi_period.lp
@@ -4,8 +4,8 @@ min
 objective:
 +14 flow(electricityBus_minDemand_0_0)
 +14 flow(electricityBus_minDemand_0_1)
-+13.725490196078431 flow(electricityBus_minDemand_1_2)
-+13.725490196078431 flow(electricityBus_minDemand_1_3)
++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)
 
@@ -41,20 +41,17 @@ c_e_BusBlock_balance(electricityBus_2_5)_:
 +1 flow(wind_electricityBus_2_5)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   45.359999999999999 <= flow(electricityBus_minDemand_0_0) <= 54
-   50.759999999999998 <= flow(electricityBus_minDemand_0_1) <= 54
-   31.859999999999999 <= flow(electricityBus_minDemand_1_2) <= 54
-   37.799999999999997 <= flow(electricityBus_minDemand_1_3) <= 54
+   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.8599999999999994 <= flow(electricityBus_minDemand_2_5) <= 54
-   0 <= flow(wind_electricityBus_0_0) <= 45.899999999999999
-   0 <= flow(wind_electricityBus_0_1) <= 51.299999999999997
-   0 <= flow(wind_electricityBus_1_2) <= 32.939999999999998
+   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.460000000000001
-   0 <= flow(wind_electricityBus_2_5) <= 5.4000000000000004
+   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 4105c996..6887f17d 100644
--- a/tests/lp_files/maximum_shutdowns.lp
+++ b/tests/lp_files/maximum_shutdowns.lp
@@ -21,65 +21,65 @@ c_e_BusBlock_balance(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_0)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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_0_2)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_2)
 -1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_2)
++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_2)
 <= 0
 
 c_u_NonConvexFlowBlock_max(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)
+-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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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_0_2)_:
--1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_2)
 +1 flow(cheap_plant_maximum_shutdowns_Bus_C_0_2)
+-1 NonConvexFlowBlock_status_nominal(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_0) <= 10
-   0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) <= 10
-   0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_0_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
index 3c590aa3..f7f28012 100644
--- a/tests/lp_files/maximum_shutdowns_multi_period.lp
+++ b/tests/lp_files/maximum_shutdowns_multi_period.lp
@@ -4,10 +4,10 @@ min
 objective:
 +10 flow(cheap_plant_maximum_shutdowns_Bus_C_0_0)
 +10 flow(cheap_plant_maximum_shutdowns_Bus_C_0_1)
-+9.8039215686274499 flow(cheap_plant_maximum_shutdowns_Bus_C_1_2)
-+9.8039215686274499 flow(cheap_plant_maximum_shutdowns_Bus_C_1_3)
-+9.6116878123798539 flow(cheap_plant_maximum_shutdowns_Bus_C_2_4)
-+9.6116878123798539 flow(cheap_plant_maximum_shutdowns_Bus_C_2_5)
++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.
 
@@ -36,128 +36,128 @@ c_e_BusBlock_balance(Bus_C_2_5)_:
 = 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_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_shutdowns_Bus_C_3)_:
--10 NonConvexFlowBlock_status(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)_:
--10 NonConvexFlowBlock_status(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)_:
--10 NonConvexFlowBlock_status(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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_shutdowns_Bus_C_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_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_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C_3)_:
--1 NonConvexFlowBlock_shutdown(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_shutdown(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_shutdown(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)_:
@@ -169,28 +169,25 @@ c_u_NonConvexFlowBlock_max_shutdown_constr(cheap_plant_maximum_shutdowns_Bus_C)_
 +1 NonConvexFlowBlock_shutdown(cheap_plant_maximum_shutdowns_Bus_C_5)
 <= 2
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_0_0) <= 10
-   0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_0_1) <= 10
-   0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_1_2) <= 10
-   0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_1_3) <= 10
-   0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_2_4) <= 10
-   0 <= flow(cheap_plant_maximum_shutdowns_Bus_C_2_5) <= 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 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_3) <= 1
-   0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_4) <= 1
-   0 <= NonConvexFlowBlock_status(cheap_plant_maximum_shutdowns_Bus_C_5) <= 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_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
diff --git a/tests/lp_files/maximum_startups.lp b/tests/lp_files/maximum_startups.lp
index 52dfac78..984e780c 100644
--- a/tests/lp_files/maximum_startups.lp
+++ b/tests/lp_files/maximum_startups.lp
@@ -21,65 +21,65 @@ c_e_BusBlock_balance(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_0)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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_0_2)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_2)
 -1 flow(cheap_plant_maximum_startups_Bus_C_0_2)
++0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_2)
 <= 0
 
 c_u_NonConvexFlowBlock_max(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)
+-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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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_0_2)_:
--1 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_2)
 +1 flow(cheap_plant_maximum_startups_Bus_C_0_2)
+-1 NonConvexFlowBlock_status_nominal(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_0) <= 10
-   0 <= flow(cheap_plant_maximum_startups_Bus_C_0_1) <= 10
-   0 <= flow(cheap_plant_maximum_startups_Bus_C_0_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
index c196c817..c51cf0d7 100644
--- a/tests/lp_files/maximum_startups_multi_period.lp
+++ b/tests/lp_files/maximum_startups_multi_period.lp
@@ -4,10 +4,10 @@ min
 objective:
 +10 flow(cheap_plant_maximum_startups_Bus_C_0_0)
 +10 flow(cheap_plant_maximum_startups_Bus_C_0_1)
-+9.8039215686274499 flow(cheap_plant_maximum_startups_Bus_C_1_2)
-+9.8039215686274499 flow(cheap_plant_maximum_startups_Bus_C_1_3)
-+9.6116878123798539 flow(cheap_plant_maximum_startups_Bus_C_2_4)
-+9.6116878123798539 flow(cheap_plant_maximum_startups_Bus_C_2_5)
++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.
 
@@ -36,128 +36,128 @@ c_e_BusBlock_balance(Bus_C_2_5)_:
 = 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_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_maximum_startups_Bus_C_3)_:
--10 NonConvexFlowBlock_status(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)_:
--10 NonConvexFlowBlock_status(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)_:
--10 NonConvexFlowBlock_status(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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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 NonConvexFlowBlock_status_nominal(cheap_plant_maximum_startups_Bus_C_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_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_startup_constr(cheap_plant_maximum_startups_Bus_C_3)_:
--1 NonConvexFlowBlock_startup(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_startup(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_startup(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)_:
@@ -169,28 +169,25 @@ c_u_NonConvexFlowBlock_max_startup_constr(cheap_plant_maximum_startups_Bus_C)_:
 +1 NonConvexFlowBlock_startup(cheap_plant_maximum_startups_Bus_C_5)
 <= 2
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(cheap_plant_maximum_startups_Bus_C_0_0) <= 10
-   0 <= flow(cheap_plant_maximum_startups_Bus_C_0_1) <= 10
-   0 <= flow(cheap_plant_maximum_startups_Bus_C_1_2) <= 10
-   0 <= flow(cheap_plant_maximum_startups_Bus_C_1_3) <= 10
-   0 <= flow(cheap_plant_maximum_startups_Bus_C_2_4) <= 10
-   0 <= flow(cheap_plant_maximum_startups_Bus_C_2_5) <= 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 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_3) <= 1
-   0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_4) <= 1
-   0 <= NonConvexFlowBlock_status(cheap_plant_maximum_startups_Bus_C_5) <= 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_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
diff --git a/tests/lp_files/min_max_runtime.lp b/tests/lp_files/min_max_runtime.lp
index a8cce8bd..5bd20f14 100644
--- a/tests/lp_files/min_max_runtime.lp
+++ b/tests/lp_files/min_max_runtime.lp
@@ -2,15 +2,15 @@
 
 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)
-+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_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)
++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.
 
@@ -27,48 +27,48 @@ c_e_BusBlock_balance(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_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)
++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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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_0_2)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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)
 <= 0
 
 c_u_NonConvexFlowBlock_max(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)
+-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 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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_0_2)_:
--1 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_2)
 +1 flow(cheap_plant_min_down_constraints_Bus_T_0_2)
+-1 NonConvexFlowBlock_status_nominal(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_0) <= 10
-   0 <= flow(cheap_plant_min_down_constraints_Bus_T_0_1) <= 10
-   0 <= flow(cheap_plant_min_down_constraints_Bus_T_0_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
index 26a1175a..922976d9 100644
--- a/tests/lp_files/min_max_runtime_multi_period.lp
+++ b/tests/lp_files/min_max_runtime_multi_period.lp
@@ -2,24 +2,24 @@
 
 min 
 objective:
-+7 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_0)
-+7 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_1)
-+6.8627450980392153 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_2)
-+6.8627450980392153 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_3)
-+6.7281814686658974 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_4)
-+6.7281814686658974 NonConvexFlowBlock_shutdown(cheap_plant_min_down_constraints_Bus_T_5)
++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)
-+10 flow(cheap_plant_min_down_constraints_Bus_T_0_0)
-+10 flow(cheap_plant_min_down_constraints_Bus_T_0_1)
-+9.8039215686274499 flow(cheap_plant_min_down_constraints_Bus_T_1_2)
-+9.8039215686274499 flow(cheap_plant_min_down_constraints_Bus_T_1_3)
-+9.6116878123798539 flow(cheap_plant_min_down_constraints_Bus_T_2_4)
-+9.6116878123798539 flow(cheap_plant_min_down_constraints_Bus_T_2_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.
 
@@ -48,93 +48,93 @@ c_e_BusBlock_balance(Bus_T_2_5)_:
 = 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_e_NonConvexFlowBlock_status_nominal_constraint(cheap_plant_min_down_constraints_Bus_T_3)_:
--10 NonConvexFlowBlock_status(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)_:
--10 NonConvexFlowBlock_status(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)_:
--10 NonConvexFlowBlock_status(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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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)_:
-+0.5 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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 NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_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)_:
@@ -255,28 +255,13 @@ c_e_NonConvexFlowBlock_min_downtime_constr(cheap_plant_min_down_constraints_Bus_
 +1 NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_5)
 = 1
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(cheap_plant_min_down_constraints_Bus_T_0_0) <= 10
-   0 <= flow(cheap_plant_min_down_constraints_Bus_T_0_1) <= 10
-   0 <= flow(cheap_plant_min_down_constraints_Bus_T_1_2) <= 10
-   0 <= flow(cheap_plant_min_down_constraints_Bus_T_1_3) <= 10
-   0 <= flow(cheap_plant_min_down_constraints_Bus_T_2_4) <= 10
-   0 <= flow(cheap_plant_min_down_constraints_Bus_T_2_5) <= 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(cheap_plant_min_down_constraints_Bus_T_3) <= 1
-   0 <= NonConvexFlowBlock_status(cheap_plant_min_down_constraints_Bus_T_4) <= 1
-   0 <= NonConvexFlowBlock_status(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_nominal(cheap_plant_min_down_constraints_Bus_T_1) <= +inf
-   0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_2) <= +inf
-   0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_3) <= +inf
-   0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_4) <= +inf
-   0 <= NonConvexFlowBlock_status_nominal(cheap_plant_min_down_constraints_Bus_T_5) <= +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_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
@@ -289,13 +274,19 @@ bounds
    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_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)
   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)
@@ -308,4 +299,10 @@ binary
   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/nominal_value_to_zero.lp b/tests/lp_files/nominal_value_to_zero.lp
index 79ef7734..82cf4dae 100644
--- a/tests/lp_files/nominal_value_to_zero.lp
+++ b/tests/lp_files/nominal_value_to_zero.lp
@@ -18,10 +18,8 @@ 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
+   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
diff --git a/tests/lp_files/nominal_value_to_zero_multi_period.lp b/tests/lp_files/nominal_value_to_zero_multi_period.lp
index 5cb0f3a3..11db58e6 100644
--- a/tests/lp_files/nominal_value_to_zero_multi_period.lp
+++ b/tests/lp_files/nominal_value_to_zero_multi_period.lp
@@ -30,10 +30,8 @@ c_e_BusBlock_balance(electricityBus_2_5)_:
 +1 flow(s1_electricityBus_2_5)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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
diff --git a/tests/lp_files/nonequidistant_timeindex.lp b/tests/lp_files/nonequidistant_timeindex.lp
index 78e2fe35..3bf90479 100644
--- a/tests/lp_files/nonequidistant_timeindex.lp
+++ b/tests/lp_files/nonequidistant_timeindex.lp
@@ -5,221 +5,210 @@ objective:
 +100 flow(gas_boiler_0_0)
 +100 flow(gas_boiler_0_1)
 +100 flow(gas_boiler_0_2)
-+200 flow(gas_boiler_0_3)
-+200 flow(gas_boiler_0_4)
-+50 flow(gas_boiler_0_5)
-+50 flow(gas_boiler_0_6)
-+50 flow(gas_boiler_0_7)
++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 flow(heat_storage_0_3)
-+112 flow(heat_storage_0_4)
-+28 flow(heat_storage_0_5)
-+28 flow(heat_storage_0_6)
-+28 flow(heat_storage_0_7)
++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 flow(storage_heat_0_3)
-+48 flow(storage_heat_0_4)
-+12 flow(storage_heat_0_5)
-+12 flow(storage_heat_0_6)
-+12 flow(storage_heat_0_7)
++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_0)_:
-+1 flow(gas_boiler_0_0)
-= 0
-
-c_e_BusBlock_balance(gas_0_1)_:
-+1 flow(gas_boiler_0_1)
-= 0
-
-c_e_BusBlock_balance(gas_0_2)_:
-+1 flow(gas_boiler_0_2)
-= 0
-
-c_e_BusBlock_balance(gas_0_3)_:
-+1 flow(gas_boiler_0_3)
-= 0
-
-c_e_BusBlock_balance(gas_0_4)_:
-+1 flow(gas_boiler_0_4)
-= 0
-
-c_e_BusBlock_balance(gas_0_5)_:
-+1 flow(gas_boiler_0_5)
-= 0
-
-c_e_BusBlock_balance(gas_0_6)_:
-+1 flow(gas_boiler_0_6)
-= 0
-
-c_e_BusBlock_balance(gas_0_7)_:
-+1 flow(gas_boiler_0_7)
-= 0
-
 c_e_BusBlock_balance(heat_0_0)_:
-+1 flow(boiler_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(heat_0_1)_:
-+1 flow(boiler_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(heat_0_2)_:
-+1 flow(boiler_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(heat_0_3)_:
-+1 flow(boiler_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(heat_0_4)_:
-+1 flow(boiler_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(heat_0_5)_:
-+1 flow(boiler_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(heat_0_6)_:
-+1 flow(boiler_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(heat_0_7)_:
-+1 flow(boiler_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(gas_0_0)_:
++1 flow(gas_boiler_0_0)
+= 0
+
+c_e_BusBlock_balance(gas_0_1)_:
++1 flow(gas_boiler_0_1)
+= 0
+
+c_e_BusBlock_balance(gas_0_2)_:
++1 flow(gas_boiler_0_2)
+= 0
+
+c_e_BusBlock_balance(gas_0_3)_:
++1 flow(gas_boiler_0_3)
+= 0
+
+c_e_BusBlock_balance(gas_0_4)_:
++1 flow(gas_boiler_0_4)
+= 0
+
+c_e_BusBlock_balance(gas_0_5)_:
++1 flow(gas_boiler_0_5)
+= 0
+
+c_e_BusBlock_balance(gas_0_6)_:
++1 flow(gas_boiler_0_6)
+= 0
+
+c_e_BusBlock_balance(gas_0_7)_:
++1 flow(gas_boiler_0_7)
 = 0
 
 c_e_TransformerBlock_relation(boiler_gas_heat_0_0)_:
--1 flow(boiler_heat_0_0)
 +1 flow(gas_boiler_0_0)
+-1 flow(boiler_heat_0_0)
 = 0
 
 c_e_TransformerBlock_relation(boiler_gas_heat_0_1)_:
--1 flow(boiler_heat_0_1)
 +1 flow(gas_boiler_0_1)
+-1 flow(boiler_heat_0_1)
 = 0
 
 c_e_TransformerBlock_relation(boiler_gas_heat_0_2)_:
--1 flow(boiler_heat_0_2)
 +1 flow(gas_boiler_0_2)
+-1 flow(boiler_heat_0_2)
 = 0
 
 c_e_TransformerBlock_relation(boiler_gas_heat_0_3)_:
--1 flow(boiler_heat_0_3)
 +1 flow(gas_boiler_0_3)
+-1 flow(boiler_heat_0_3)
 = 0
 
 c_e_TransformerBlock_relation(boiler_gas_heat_0_4)_:
--1 flow(boiler_heat_0_4)
 +1 flow(gas_boiler_0_4)
+-1 flow(boiler_heat_0_4)
 = 0
 
 c_e_TransformerBlock_relation(boiler_gas_heat_0_5)_:
--1 flow(boiler_heat_0_5)
 +1 flow(gas_boiler_0_5)
+-1 flow(boiler_heat_0_5)
 = 0
 
 c_e_TransformerBlock_relation(boiler_gas_heat_0_6)_:
--1 flow(boiler_heat_0_6)
 +1 flow(gas_boiler_0_6)
+-1 flow(boiler_heat_0_6)
 = 0
 
 c_e_TransformerBlock_relation(boiler_gas_heat_0_7)_:
--1 flow(boiler_heat_0_7)
 +1 flow(gas_boiler_0_7)
+-1 flow(boiler_heat_0_7)
 = 0
 
 c_e_GenericStorageBlock_balance(storage_0_0)_:
-+1 GenericStorageBlock_storage_content(storage_1)
 -1 flow(heat_storage_0_0)
 +1 flow(storage_heat_0_0)
-= 270
++1 GenericStorageBlock_storage_content(storage_1)
+= 270.0
 
 c_e_GenericStorageBlock_balance(storage_0_1)_:
--0.90000000000000002 GenericStorageBlock_storage_content(storage_1)
-+1 GenericStorageBlock_storage_content(storage_2)
 -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)
 = 0
 
 c_e_GenericStorageBlock_balance(storage_0_2)_:
--0.90000000000000002 GenericStorageBlock_storage_content(storage_2)
-+1 GenericStorageBlock_storage_content(storage_3)
 -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)
 = 0
 
 c_e_GenericStorageBlock_balance(storage_0_3)_:
--0.81000000000000005 GenericStorageBlock_storage_content(storage_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_0_3)
-+2 flow(storage_heat_0_3)
 = 0
 
 c_e_GenericStorageBlock_balance(storage_0_4)_:
--0.81000000000000005 GenericStorageBlock_storage_content(storage_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_0_4)
-+2 flow(storage_heat_0_4)
 = 0
 
 c_e_GenericStorageBlock_balance(storage_0_5)_:
--0.94868329805051377 GenericStorageBlock_storage_content(storage_5)
-+1 GenericStorageBlock_storage_content(storage_6)
 -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
 
 c_e_GenericStorageBlock_balance(storage_0_6)_:
--0.94868329805051377 GenericStorageBlock_storage_content(storage_6)
-+1 GenericStorageBlock_storage_content(storage_7)
 -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
 
 c_e_GenericStorageBlock_balance(storage_0_7)_:
--0.94868329805051377 GenericStorageBlock_storage_content(storage_7)
-+1 GenericStorageBlock_storage_content(storage_8)
 -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
 
 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_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 <= flow(gas_boiler_0_0) <= +inf
    0 <= flow(gas_boiler_0_1) <= +inf
    0 <= flow(gas_boiler_0_2) <= +inf
@@ -244,6 +233,14 @@ bounds
    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/offsettransformer.lp b/tests/lp_files/offsettransformer.lp
index d4459907..ef5e3038 100644
--- a/tests/lp_files/offsettransformer.lp
+++ b/tests/lp_files/offsettransformer.lp
@@ -31,84 +31,82 @@ c_e_BusBlock_balance(thermalBus_0_2)_:
 = 0
 
 c_e_NonConvexFlowBlock_status_nominal_constraint(gasBus_gasboiler_0)_:
--100 NonConvexFlowBlock_status(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)_:
--100 NonConvexFlowBlock_status(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)_:
--100 NonConvexFlowBlock_status(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)_:
-+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0)
 -1 flow(gasBus_gasboiler_0_0)
++0.32 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0)
 <= 0
 
 c_u_NonConvexFlowBlock_min(gasBus_gasboiler_0_1)_:
-+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1)
 -1 flow(gasBus_gasboiler_0_1)
++0.32 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1)
 <= 0
 
 c_u_NonConvexFlowBlock_min(gasBus_gasboiler_0_2)_:
-+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_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 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0)
 +1 flow(gasBus_gasboiler_0_0)
+-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0)
 <= 0
 
 c_u_NonConvexFlowBlock_max(gasBus_gasboiler_0_1)_:
--1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1)
 +1 flow(gasBus_gasboiler_0_1)
+-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1)
 <= 0
 
 c_u_NonConvexFlowBlock_max(gasBus_gasboiler_0_2)_:
--1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2)
 +1 flow(gasBus_gasboiler_0_2)
+-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2)
 <= 0
 
 c_e_OffsetTransformerBlock_relation(gasboiler_0_0)_:
--17 NonConvexFlowBlock_status(gasBus_gasboiler_0)
-+0.90000000000000002 flow(gasBus_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_OffsetTransformerBlock_relation(gasboiler_0_1)_:
--17 NonConvexFlowBlock_status(gasBus_gasboiler_1)
-+0.90000000000000002 flow(gasBus_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_OffsetTransformerBlock_relation(gasboiler_0_2)_:
--17 NonConvexFlowBlock_status(gasBus_gasboiler_2)
-+0.90000000000000002 flow(gasBus_gasboiler_0_2)
++0.9 flow(gasBus_gasboiler_0_2)
 -1 flow(gasboiler_thermalBus_0_2)
+-17 NonConvexFlowBlock_status(gasBus_gasboiler_2)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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(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(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)
diff --git a/tests/lp_files/offsettransformer_multi_period.lp b/tests/lp_files/offsettransformer_multi_period.lp
index 89a52173..51752dec 100644
--- a/tests/lp_files/offsettransformer_multi_period.lp
+++ b/tests/lp_files/offsettransformer_multi_period.lp
@@ -55,135 +55,133 @@ c_e_BusBlock_balance(thermalBus_2_5)_:
 = 0
 
 c_e_NonConvexFlowBlock_status_nominal_constraint(gasBus_gasboiler_0)_:
--100 NonConvexFlowBlock_status(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)_:
--100 NonConvexFlowBlock_status(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)_:
--100 NonConvexFlowBlock_status(gasBus_gasboiler_2)
 +1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2)
+-100 NonConvexFlowBlock_status(gasBus_gasboiler_2)
 = 0
 
 c_e_NonConvexFlowBlock_status_nominal_constraint(gasBus_gasboiler_3)_:
--100 NonConvexFlowBlock_status(gasBus_gasboiler_3)
 +1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_3)
+-100 NonConvexFlowBlock_status(gasBus_gasboiler_3)
 = 0
 
 c_e_NonConvexFlowBlock_status_nominal_constraint(gasBus_gasboiler_4)_:
--100 NonConvexFlowBlock_status(gasBus_gasboiler_4)
 +1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_4)
+-100 NonConvexFlowBlock_status(gasBus_gasboiler_4)
 = 0
 
 c_e_NonConvexFlowBlock_status_nominal_constraint(gasBus_gasboiler_5)_:
--100 NonConvexFlowBlock_status(gasBus_gasboiler_5)
 +1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_5)
+-100 NonConvexFlowBlock_status(gasBus_gasboiler_5)
 = 0
 
 c_u_NonConvexFlowBlock_min(gasBus_gasboiler_0_0)_:
-+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0)
 -1 flow(gasBus_gasboiler_0_0)
++0.32 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0)
 <= 0
 
 c_u_NonConvexFlowBlock_min(gasBus_gasboiler_0_1)_:
-+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1)
 -1 flow(gasBus_gasboiler_0_1)
++0.32 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1)
 <= 0
 
 c_u_NonConvexFlowBlock_min(gasBus_gasboiler_1_2)_:
-+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2)
 -1 flow(gasBus_gasboiler_1_2)
++0.32 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2)
 <= 0
 
 c_u_NonConvexFlowBlock_min(gasBus_gasboiler_1_3)_:
-+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_3)
 -1 flow(gasBus_gasboiler_1_3)
++0.32 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_3)
 <= 0
 
 c_u_NonConvexFlowBlock_min(gasBus_gasboiler_2_4)_:
-+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_4)
 -1 flow(gasBus_gasboiler_2_4)
++0.32 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_4)
 <= 0
 
 c_u_NonConvexFlowBlock_min(gasBus_gasboiler_2_5)_:
-+0.32000000000000001 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_5)
 -1 flow(gasBus_gasboiler_2_5)
++0.32 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_5)
 <= 0
 
 c_u_NonConvexFlowBlock_max(gasBus_gasboiler_0_0)_:
--1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0)
 +1 flow(gasBus_gasboiler_0_0)
+-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_0)
 <= 0
 
 c_u_NonConvexFlowBlock_max(gasBus_gasboiler_0_1)_:
--1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1)
 +1 flow(gasBus_gasboiler_0_1)
+-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_1)
 <= 0
 
 c_u_NonConvexFlowBlock_max(gasBus_gasboiler_1_2)_:
--1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2)
 +1 flow(gasBus_gasboiler_1_2)
+-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_2)
 <= 0
 
 c_u_NonConvexFlowBlock_max(gasBus_gasboiler_1_3)_:
--1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_3)
 +1 flow(gasBus_gasboiler_1_3)
+-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_3)
 <= 0
 
 c_u_NonConvexFlowBlock_max(gasBus_gasboiler_2_4)_:
--1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_4)
 +1 flow(gasBus_gasboiler_2_4)
+-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_4)
 <= 0
 
 c_u_NonConvexFlowBlock_max(gasBus_gasboiler_2_5)_:
--1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_5)
 +1 flow(gasBus_gasboiler_2_5)
+-1 NonConvexFlowBlock_status_nominal(gasBus_gasboiler_5)
 <= 0
 
 c_e_OffsetTransformerBlock_relation(gasboiler_0_0)_:
--17 NonConvexFlowBlock_status(gasBus_gasboiler_0)
-+0.90000000000000002 flow(gasBus_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_OffsetTransformerBlock_relation(gasboiler_0_1)_:
--17 NonConvexFlowBlock_status(gasBus_gasboiler_1)
-+0.90000000000000002 flow(gasBus_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_OffsetTransformerBlock_relation(gasboiler_1_2)_:
--17 NonConvexFlowBlock_status(gasBus_gasboiler_2)
-+0.90000000000000002 flow(gasBus_gasboiler_1_2)
++0.9 flow(gasBus_gasboiler_1_2)
 -1 flow(gasboiler_thermalBus_1_2)
+-17 NonConvexFlowBlock_status(gasBus_gasboiler_2)
 = 0
 
 c_e_OffsetTransformerBlock_relation(gasboiler_1_3)_:
--17 NonConvexFlowBlock_status(gasBus_gasboiler_3)
-+0.90000000000000002 flow(gasBus_gasboiler_1_3)
++0.9 flow(gasBus_gasboiler_1_3)
 -1 flow(gasboiler_thermalBus_1_3)
+-17 NonConvexFlowBlock_status(gasBus_gasboiler_3)
 = 0
 
 c_e_OffsetTransformerBlock_relation(gasboiler_2_4)_:
--17 NonConvexFlowBlock_status(gasBus_gasboiler_4)
-+0.90000000000000002 flow(gasBus_gasboiler_2_4)
++0.9 flow(gasBus_gasboiler_2_4)
 -1 flow(gasboiler_thermalBus_2_4)
+-17 NonConvexFlowBlock_status(gasBus_gasboiler_4)
 = 0
 
 c_e_OffsetTransformerBlock_relation(gasboiler_2_5)_:
--17 NonConvexFlowBlock_status(gasBus_gasboiler_5)
-+0.90000000000000002 flow(gasBus_gasboiler_2_5)
++0.9 flow(gasBus_gasboiler_2_5)
 -1 flow(gasboiler_thermalBus_2_5)
+-17 NonConvexFlowBlock_status(gasBus_gasboiler_5)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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_1_2) <= 100
@@ -196,18 +194,18 @@ bounds
    0 <= flow(gasboiler_thermalBus_1_3) <= +inf
    0 <= flow(gasboiler_thermalBus_2_4) <= +inf
    0 <= flow(gasboiler_thermalBus_2_5) <= +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(gasBus_gasboiler_3) <= 1
-   0 <= NonConvexFlowBlock_status(gasBus_gasboiler_4) <= 1
-   0 <= NonConvexFlowBlock_status(gasBus_gasboiler_5) <= 1
    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
    0 <= NonConvexFlowBlock_status_nominal(gasBus_gasboiler_3) <= +inf
+   0 <= NonConvexFlowBlock_status(gasBus_gasboiler_3) <= 1
    0 <= NonConvexFlowBlock_status_nominal(gasBus_gasboiler_4) <= +inf
+   0 <= NonConvexFlowBlock_status(gasBus_gasboiler_4) <= 1
    0 <= NonConvexFlowBlock_status_nominal(gasBus_gasboiler_5) <= +inf
+   0 <= NonConvexFlowBlock_status(gasBus_gasboiler_5) <= 1
 binary
   NonConvexFlowBlock_status(gasBus_gasboiler_0)
   NonConvexFlowBlock_status(gasBus_gasboiler_1)
diff --git a/tests/lp_files/periodical_emission_limit.lp b/tests/lp_files/periodical_emission_limit.lp
index 68e7086a..a4ff0ee6 100644
--- a/tests/lp_files/periodical_emission_limit.lp
+++ b/tests/lp_files/periodical_emission_limit.lp
@@ -8,13 +8,13 @@ s.t.
 
 c_u_periodical_integral_limit(0)_:
 +0.5 flow(source1_electricityBus_0_0)
--1 flow(source1_electricityBus_0_1)
+-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 flow(source1_electricityBus_1_2)
++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)
@@ -27,20 +27,18 @@ c_u_periodical_integral_limit(2)_:
 +3.5 flow(source2_electricityBus_2_5)
 <= 100
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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_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(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
index 8fc3bddd..99a8eb73 100644
--- a/tests/lp_files/periodical_investment_limit.lp
+++ b/tests/lp_files/periodical_investment_limit.lp
@@ -2,83 +2,102 @@
 
 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)
-+285.39374551281168 InvestmentFlowBlock_invest(Source_Bus1_0)
-+279.7977897184428 InvestmentFlowBlock_invest(Source_Bus1_1)
-+274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_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)
-+285.39374551281168 InvestmentFlowBlock_invest(Source_Bus1_0)
 <= 500
 
 c_u_investment_limit_per_period(1)_:
-+190.4187862512772 GenericInvestmentStorageBlock_invest(storage_invest_limit_1)
 +279.7977897184428 InvestmentFlowBlock_invest(Source_Bus1_1)
++190.4187862512772 GenericInvestmentStorageBlock_invest(storage_invest_limit_1)
 <= 400
 
 c_u_investment_limit_per_period(2)_:
-+186.68508456007567 GenericInvestmentStorageBlock_invest(storage_invest_limit_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(Bus1_storage_invest_limit_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_0_1)_:
--1 flow(Bus1_storage_invest_limit_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_1_2)_:
--1 flow(Bus1_storage_invest_limit_1_2)
 +1 flow(Source_Bus1_1_2)
 +1 flow(storage_invest_limit_Bus1_1_2)
+-1 flow(Bus1_storage_invest_limit_1_2)
 = 0
 
 c_e_BusBlock_balance(Bus1_1_3)_:
--1 flow(Bus1_storage_invest_limit_1_3)
 +1 flow(Source_Bus1_1_3)
 +1 flow(storage_invest_limit_Bus1_1_3)
+-1 flow(Bus1_storage_invest_limit_1_3)
 = 0
 
 c_e_BusBlock_balance(Bus1_2_4)_:
--1 flow(Bus1_storage_invest_limit_2_4)
 +1 flow(Source_Bus1_2_4)
 +1 flow(storage_invest_limit_Bus1_2_4)
+-1 flow(Bus1_storage_invest_limit_2_4)
 = 0
 
 c_e_BusBlock_balance(Bus1_2_5)_:
--1 flow(Bus1_storage_invest_limit_2_5)
 +1 flow(Source_Bus1_2_5)
 +1 flow(storage_invest_limit_Bus1_2_5)
+-1 flow(Bus1_storage_invest_limit_2_5)
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(Bus1_storage_invest_limit_0)_:
--1 InvestmentFlowBlock_invest(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_invest(Bus1_storage_invest_limit_1)
-+1 InvestmentFlowBlock_old(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_invest(Bus1_storage_invest_limit_2)
-+1 InvestmentFlowBlock_old(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_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)_:
@@ -88,35 +107,16 @@ c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(Source_Bus1_1)_:
 -1 InvestmentFlowBlock_invest(Source_Bus1_1)
-+1 InvestmentFlowBlock_old(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_old(Source_Bus1_2)
 -1 InvestmentFlowBlock_total(Source_Bus1_1)
 +1 InvestmentFlowBlock_total(Source_Bus1_2)
-= 0
-
-c_e_InvestmentFlowBlock_total_rule(storage_invest_limit_Bus1_0)_:
--1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1_0)
-+1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0)
-= 0
-
-c_e_InvestmentFlowBlock_total_rule(storage_invest_limit_Bus1_1)_:
--1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1_1)
-+1 InvestmentFlowBlock_old(storage_invest_limit_Bus1_1)
--1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0)
-+1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_1)
-= 0
-
-c_e_InvestmentFlowBlock_total_rule(storage_invest_limit_Bus1_2)_:
--1 InvestmentFlowBlock_invest(storage_invest_limit_Bus1_2)
-+1 InvestmentFlowBlock_old(storage_invest_limit_Bus1_2)
--1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_1)
-+1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_2)
++1 InvestmentFlowBlock_old(Source_Bus1_2)
 = 0
 
 c_e_InvestmentFlowBlock_old_rule_end(Bus1_storage_invest_limit_0)_:
@@ -131,18 +131,6 @@ 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_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(storage_invest_limit_Bus1_0)_:
 +1 InvestmentFlowBlock_old_end(storage_invest_limit_Bus1_0)
 = 0
@@ -155,28 +143,28 @@ 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_exo(Bus1_storage_invest_limit_0)_:
-+1 InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_0)
+c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_0)_:
++1 InvestmentFlowBlock_old_end(Source_Bus1_0)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_invest_limit_1)_:
-+1 InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_1)
+c_e_InvestmentFlowBlock_old_rule_end(Source_Bus1_1)_:
++1 InvestmentFlowBlock_old_end(Source_Bus1_1)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_exo(Bus1_storage_invest_limit_2)_:
-+1 InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_2)
+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)
+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(Source_Bus1_1)_:
-+1 InvestmentFlowBlock_old_exo(Source_Bus1_1)
+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(Source_Bus1_2)_:
-+1 InvestmentFlowBlock_old_exo(Source_Bus1_2)
+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_exo(storage_invest_limit_Bus1_0)_:
@@ -191,10 +179,22 @@ 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(Bus1_storage_invest_limit_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -209,28 +209,10 @@ c_e_InvestmentFlowBlock_old_rule(Bus1_storage_invest_limit_2)_:
 -1 InvestmentFlowBlock_old_exo(Bus1_storage_invest_limit_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule(Source_Bus1_0)_:
-+1 InvestmentFlowBlock_old(Source_Bus1_0)
--1 InvestmentFlowBlock_old_end(Source_Bus1_0)
--1 InvestmentFlowBlock_old_exo(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(storage_invest_limit_Bus1_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -245,94 +227,112 @@ c_e_InvestmentFlowBlock_old_rule(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_u_InvestmentFlowBlock_max(Bus1_storage_invest_limit_0_0)_:
--1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_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 InvestmentFlowBlock_total(Bus1_storage_invest_limit_0)
 +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 InvestmentFlowBlock_total(Bus1_storage_invest_limit_1)
 +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 InvestmentFlowBlock_total(Bus1_storage_invest_limit_1)
 +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 InvestmentFlowBlock_total(Bus1_storage_invest_limit_2)
 +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 InvestmentFlowBlock_total(Bus1_storage_invest_limit_2)
 +1 flow(Bus1_storage_invest_limit_2_5)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
-+1 flow(Source_Bus1_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
-+1 flow(Source_Bus1_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Source_Bus1_1_2)_:
--1 InvestmentFlowBlock_total(Source_Bus1_1)
-+1 flow(Source_Bus1_1_2)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Source_Bus1_1_3)_:
--1 InvestmentFlowBlock_total(Source_Bus1_1)
-+1 flow(Source_Bus1_1_3)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Source_Bus1_2_4)_:
--1 InvestmentFlowBlock_total(Source_Bus1_2)
-+1 flow(Source_Bus1_2_4)
-<= 0
-
-c_u_InvestmentFlowBlock_max(Source_Bus1_2_5)_:
--1 InvestmentFlowBlock_total(Source_Bus1_2)
-+1 flow(Source_Bus1_2_5)
+-1 InvestmentFlowBlock_total(Bus1_storage_invest_limit_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage_invest_limit_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(storage_invest_limit_Bus1_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 InvestmentFlowBlock_total(storage_invest_limit_Bus1_0)
 +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 InvestmentFlowBlock_total(storage_invest_limit_Bus1_1)
 +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 InvestmentFlowBlock_total(storage_invest_limit_Bus1_1)
 +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 InvestmentFlowBlock_total(storage_invest_limit_Bus1_2)
 +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 InvestmentFlowBlock_total(storage_invest_limit_Bus1_2)
 +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_e_GenericInvestmentStorageBlock_total_storage_rule(storage_invest_limit_0)_:
@@ -342,16 +342,16 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_invest_limit_0)_:
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_invest_limit_1)_:
 -1 GenericInvestmentStorageBlock_invest(storage_invest_limit_1)
-+1 GenericInvestmentStorageBlock_old(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_old(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)_:
@@ -379,9 +379,9 @@ c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_invest_limit_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_old_rule(storage_invest_limit_0)_:
-+1 GenericInvestmentStorageBlock_old(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)_:
@@ -397,181 +397,171 @@ c_e_GenericInvestmentStorageBlock_old_rule(storage_invest_limit_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_balance(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_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_1)
+-1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_0)
 = 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)
--1 flow(Bus1_storage_invest_limit_1_2)
-+1 flow(storage_invest_limit_Bus1_1_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)
--1 flow(Bus1_storage_invest_limit_1_3)
-+1 flow(storage_invest_limit_Bus1_1_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)
--1 flow(Bus1_storage_invest_limit_2_4)
-+1 flow(storage_invest_limit_Bus1_2_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)
--1 flow(Bus1_storage_invest_limit_2_5)
-+1 flow(storage_invest_limit_Bus1_2_5)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_invest_limit_0)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(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)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(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)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(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)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(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)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(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)_:
--0.20000000000000001 GenericInvestmentStorageBlock_total(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_storage_content(storage_invest_limit_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_storage_content(storage_invest_limit_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_storage_content(storage_invest_limit_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_storage_content(storage_invest_limit_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_storage_content(storage_invest_limit_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_storage_content(storage_invest_limit_5)
 -1 GenericInvestmentStorageBlock_total(storage_invest_limit_2)
++1 GenericInvestmentStorageBlock_storage_content(storage_invest_limit_5)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(Bus1_storage_invest_limit_0_0) <= +inf
-   0 <= flow(Bus1_storage_invest_limit_0_1) <= +inf
-   0 <= flow(Bus1_storage_invest_limit_1_2) <= +inf
-   0 <= flow(Bus1_storage_invest_limit_1_3) <= +inf
-   0 <= flow(Bus1_storage_invest_limit_2_4) <= +inf
-   0 <= flow(Bus1_storage_invest_limit_2_5) <= +inf
+   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(Source_Bus1_0_0) <= +inf
-   0 <= flow(Source_Bus1_0_1) <= +inf
-   0 <= flow(Source_Bus1_1_2) <= +inf
-   0 <= flow(Source_Bus1_1_3) <= +inf
-   0 <= flow(Source_Bus1_2_4) <= +inf
-   0 <= flow(Source_Bus1_2_5) <= +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_1_2) <= +inf
    0 <= flow(storage_invest_limit_Bus1_1_2) <= +inf
+   0 <= flow(Bus1_storage_invest_limit_1_2) <= +inf
+   0 <= flow(Source_Bus1_1_3) <= +inf
    0 <= flow(storage_invest_limit_Bus1_1_3) <= +inf
+   0 <= flow(Bus1_storage_invest_limit_1_3) <= +inf
+   0 <= flow(Source_Bus1_2_4) <= +inf
    0 <= flow(storage_invest_limit_Bus1_2_4) <= +inf
+   0 <= flow(Bus1_storage_invest_limit_2_4) <= +inf
+   0 <= flow(Source_Bus1_2_5) <= +inf
    0 <= flow(storage_invest_limit_Bus1_2_5) <= +inf
+   0 <= flow(Bus1_storage_invest_limit_2_5) <= +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_invest(Source_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_2) <= +inf
+   0 <= InvestmentFlowBlock_old(Bus1_storage_invest_limit_2) <= +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_total(Bus1_storage_invest_limit_0) <= +inf
-   0 <= InvestmentFlowBlock_total(Bus1_storage_invest_limit_1) <= +inf
-   0 <= InvestmentFlowBlock_total(Bus1_storage_invest_limit_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_total(Source_Bus1_2) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_invest_limit_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_invest_limit_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_invest_limit_Bus1_2) <= +inf
-   0 <= InvestmentFlowBlock_old(Bus1_storage_invest_limit_0) <= +inf
-   0 <= InvestmentFlowBlock_old(Bus1_storage_invest_limit_1) <= +inf
-   0 <= InvestmentFlowBlock_old(Bus1_storage_invest_limit_2) <= +inf
-   0 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +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(storage_invest_limit_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_old(storage_invest_limit_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_old(storage_invest_limit_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_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(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_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_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(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 <= 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
-   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 <= 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(Bus1_storage_invest_limit_0) <= +inf
+   0 <= InvestmentFlowBlock_old(storage_invest_limit_Bus1_0) <= +inf
+   0 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +inf
    0 <= GenericInvestmentStorageBlock_total(storage_invest_limit_0) <= +inf
    0 <= GenericInvestmentStorageBlock_total(storage_invest_limit_1) <= +inf
-   0 <= GenericInvestmentStorageBlock_total(storage_invest_limit_2) <= +inf
-   0 <= GenericInvestmentStorageBlock_old(storage_invest_limit_0) <= +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
@@ -579,4 +569,11 @@ bounds
    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_1) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage_invest_limit_0) <= +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
index 0434083e..28e22067 100644
--- a/tests/lp_files/periodical_investment_limit_with_dsm_DIW.lp
+++ b/tests/lp_files/periodical_investment_limit_with_dsm_DIW.lp
@@ -2,59 +2,59 @@
 
 min 
 objective:
-+285.39374551281168 InvestmentFlowBlock_invest(Source_Bus1_0)
++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_0_1)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_2)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_3)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_4)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_5)
 +0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0)
-+0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_3)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_4)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_5)
 +0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_0)
-+0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_3)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_4)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_5)
 +0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_0)
-+0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_1)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_2)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_3)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_4)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_5)
 +0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_0)
-+0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_1)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_2)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_3)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_4)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_5)
 +0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_0)
-+0.5 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_1)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_2)
-+0.49019607843137253 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_3)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_4)
-+0.48058439061899266 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_5)
 +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.009900990099013 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_2)
++99.00990099009901 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_2)
 
 s.t.
 
 c_u_investment_limit_per_period(0)_:
-+285.39374551281168 InvestmentFlowBlock_invest(Source_Bus1_0)
++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0)
 +103.00990099009903 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_0)
 <= 400
 
@@ -65,37 +65,37 @@ c_u_investment_limit_per_period(1)_:
 
 c_u_investment_limit_per_period(2)_:
 +274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2)
-+99.009900990099013 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_2)
++99.00990099009901 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_2)
 <= 200
 
 c_e_BusBlock_balance(Bus1_0_0)_:
--1 flow(Bus1_sink_dsm_DIW_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(Bus1_sink_dsm_DIW_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(Bus1_sink_dsm_DIW_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(Bus1_sink_dsm_DIW_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(Bus1_sink_dsm_DIW_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(Bus1_sink_dsm_DIW_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)_:
@@ -105,16 +105,16 @@ c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(Source_Bus1_1)_:
 -1 InvestmentFlowBlock_invest(Source_Bus1_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -142,9 +142,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(Source_Bus1_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -160,33 +160,33 @@ c_e_InvestmentFlowBlock_old_rule(Source_Bus1_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_0)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_1)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_1_2)_:
--1 InvestmentFlowBlock_total(Source_Bus1_1)
 +1 flow(Source_Bus1_1_2)
+-1 InvestmentFlowBlock_total(Source_Bus1_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_1_3)_:
--1 InvestmentFlowBlock_total(Source_Bus1_1)
 +1 flow(Source_Bus1_1_3)
+-1 InvestmentFlowBlock_total(Source_Bus1_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_2_4)_:
--1 InvestmentFlowBlock_total(Source_Bus1_2)
 +1 flow(Source_Bus1_2_4)
+-1 InvestmentFlowBlock_total(Source_Bus1_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_2_5)_:
--1 InvestmentFlowBlock_total(Source_Bus1_2)
 +1 flow(Source_Bus1_2_5)
+-1 InvestmentFlowBlock_total(Source_Bus1_2)
 <= 0
 
 c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(sink_dsm_DIW_0)_:
@@ -196,16 +196,16 @@ c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(sink_dsm_DIW_0)_:
 
 c_e_SinkDSMDIWInvestmentBlock_total_dsm_rule(sink_dsm_DIW_1)_:
 -1 SinkDSMDIWInvestmentBlock_invest(sink_dsm_DIW_1)
-+1 SinkDSMDIWInvestmentBlock_old(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_old(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)_:
@@ -234,9 +234,9 @@ c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule_exo(sink_dsm_DIW_2)_:
 = 0
 
 c_e_SinkDSMDIWInvestmentBlock_old_dsm_rule(sink_dsm_DIW_0)_:
-+1 SinkDSMDIWInvestmentBlock_old(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)_:
@@ -276,95 +276,95 @@ c_e_SinkDSMDIWInvestmentBlock_shift_shed_vars(sink_dsm_DIW_5)_:
 = 0
 
 c_e_SinkDSMDIWInvestmentBlock_input_output_relation(sink_dsm_DIW_0_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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_do_shift(sink_dsm_DIW_0_1)
 +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)
-+1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1)
 = 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)
-+1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2)
 = 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)
-+1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_3)
 = 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)
-+1 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_4)
 = 0
 
 c_e_SinkDSMDIWInvestmentBlock_dsm_updo_constraint(sink_dsm_DIW_5)_:
 -1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_4)
--1 SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_5)
 +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)_:
@@ -398,101 +398,101 @@ c_u_SinkDSMDIWInvestmentBlock_dsm_up_constraint(sink_dsm_DIW_2_5)_:
 <= 0
 
 c_u_SinkDSMDIWInvestmentBlock_dsm_do_constraint(sink_dsm_DIW_0_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_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_shed(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_dsm_do_constraint(sink_dsm_DIW_1_2)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(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_dsm_do_constraint(sink_dsm_DIW_1_3)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(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_dsm_do_constraint(sink_dsm_DIW_2_4)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(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_dsm_do_constraint(sink_dsm_DIW_2_5)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(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_C2_constraint(sink_dsm_DIW_0_0)_:
-+1 SinkDSMDIWInvestmentBlock_dsm_do_shed(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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_do_shed(sink_dsm_DIW_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 SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_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)_:
@@ -511,30 +511,71 @@ c_l_SinkDSMDIWInvestmentBlock_overall_minimum(sink_dsm_DIW)_:
 +1 SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2)
 >= 200
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(Bus1_sink_dsm_DIW_0_0) <= +inf
-   0 <= flow(Bus1_sink_dsm_DIW_0_1) <= +inf
-   0 <= flow(Bus1_sink_dsm_DIW_1_2) <= +inf
-   0 <= flow(Bus1_sink_dsm_DIW_1_3) <= +inf
-   0 <= flow(Bus1_sink_dsm_DIW_2_4) <= +inf
-   0 <= flow(Bus1_sink_dsm_DIW_2_5) <= +inf
+   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 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_2) <= +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_total(Source_Bus1_2) <= +inf
-   0 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +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
@@ -542,14 +583,11 @@ bounds
    0 <= InvestmentFlowBlock_old_exo(Source_Bus1_0) <= +inf
    0 <= InvestmentFlowBlock_old_exo(Source_Bus1_1) <= +inf
    0 <= InvestmentFlowBlock_old_exo(Source_Bus1_2) <= +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 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +inf
    0 <= SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_0) <= +inf
    0 <= SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_total(sink_dsm_DIW_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_old(sink_dsm_DIW_0) <= +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
@@ -557,52 +595,11 @@ bounds
    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_dsm_do_shift(sink_dsm_DIW_0_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_0_5) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_1_5) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_2_5) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_3_5) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_4_5) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_do_shift(sink_dsm_DIW_5_5) <= +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
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_0) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_1) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_2) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_3) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(sink_dsm_DIW_4) <= +inf
-   0 <= SinkDSMDIWInvestmentBlock_dsm_up(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
index 93f16e4d..5f697ad1 100644
--- a/tests/lp_files/periodical_investment_limit_with_dsm_DLR.lp
+++ b/tests/lp_files/periodical_investment_limit_with_dsm_DLR.lp
@@ -2,41 +2,41 @@
 
 min 
 objective:
-+285.39374551281168 InvestmentFlowBlock_invest(Source_Bus1_0)
++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0)
 +279.7977897184428 InvestmentFlowBlock_invest(Source_Bus1_1)
 +274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2)
-+0.5 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0)
-+0.5 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1)
-+0.49019607843137253 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2)
-+0.49019607843137253 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_3)
-+0.48058439061899266 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_4)
-+0.48058439061899266 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_5)
-+0.5 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0)
-+0.5 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1)
-+0.49019607843137253 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2)
-+0.49019607843137253 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_3)
-+0.48058439061899266 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_4)
-+0.48058439061899266 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_5)
 +0.5 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_0)
-+0.5 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1)
-+0.49019607843137253 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2)
-+0.49019607843137253 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_3)
-+0.48058439061899266 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_4)
-+0.48058439061899266 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5)
++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.009900990099013 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_2)
++99.00990099009901 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_2)
 
 s.t.
 
 c_u_investment_limit_per_period(0)_:
-+285.39374551281168 InvestmentFlowBlock_invest(Source_Bus1_0)
++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0)
 +103.00990099009903 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_0)
 <= 400
 
@@ -47,37 +47,37 @@ c_u_investment_limit_per_period(1)_:
 
 c_u_investment_limit_per_period(2)_:
 +274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2)
-+99.009900990099013 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_2)
++99.00990099009901 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_2)
 <= 200
 
 c_e_BusBlock_balance(Bus1_0_0)_:
--1 flow(Bus1_sink_dsm_DLR_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(Bus1_sink_dsm_DLR_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(Bus1_sink_dsm_DLR_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(Bus1_sink_dsm_DLR_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(Bus1_sink_dsm_DLR_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(Bus1_sink_dsm_DLR_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)_:
@@ -87,16 +87,16 @@ c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(Source_Bus1_1)_:
 -1 InvestmentFlowBlock_invest(Source_Bus1_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -124,9 +124,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(Source_Bus1_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -142,33 +142,33 @@ c_e_InvestmentFlowBlock_old_rule(Source_Bus1_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_0)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_1)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_1_2)_:
--1 InvestmentFlowBlock_total(Source_Bus1_1)
 +1 flow(Source_Bus1_1_2)
+-1 InvestmentFlowBlock_total(Source_Bus1_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_1_3)_:
--1 InvestmentFlowBlock_total(Source_Bus1_1)
 +1 flow(Source_Bus1_1_3)
+-1 InvestmentFlowBlock_total(Source_Bus1_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_2_4)_:
--1 InvestmentFlowBlock_total(Source_Bus1_2)
 +1 flow(Source_Bus1_2_4)
+-1 InvestmentFlowBlock_total(Source_Bus1_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_2_5)_:
--1 InvestmentFlowBlock_total(Source_Bus1_2)
 +1 flow(Source_Bus1_2_5)
+-1 InvestmentFlowBlock_total(Source_Bus1_2)
 <= 0
 
 c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(sink_dsm_DLR_0)_:
@@ -178,16 +178,16 @@ c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(sink_dsm_DLR_0)_:
 
 c_e_SinkDSMDLRInvestmentBlock_total_dsm_rule(sink_dsm_DLR_1)_:
 -1 SinkDSMDLRInvestmentBlock_invest(sink_dsm_DLR_1)
-+1 SinkDSMDLRInvestmentBlock_old(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_old(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)_:
@@ -216,9 +216,9 @@ c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule_exo(sink_dsm_DLR_2)_:
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_old_dsm_rule(sink_dsm_DLR_0)_:
-+1 SinkDSMDLRInvestmentBlock_old(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)_:
@@ -258,57 +258,57 @@ c_e_SinkDSMDLRInvestmentBlock_shift_shed_vars(sink_dsm_DLR_1_5)_:
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_input_output_relation(sink_dsm_DLR_0_0)_:
--1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_up(sink_dsm_DLR_1_1)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1)
--1 SinkDSMDLRInvestmentBlock_dsm_up(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_balance_dsm_up(sink_dsm_DLR_1_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2)
--1 SinkDSMDLRInvestmentBlock_dsm_up(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_balance_dsm_up(sink_dsm_DLR_1_3)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_3)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_3)
--1 SinkDSMDLRInvestmentBlock_dsm_up(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_balance_dsm_up(sink_dsm_DLR_1_4)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_4)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_4)
--1 SinkDSMDLRInvestmentBlock_dsm_up(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_balance_dsm_up(sink_dsm_DLR_1_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_5)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5)
--1 SinkDSMDLRInvestmentBlock_dsm_up(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)_:
@@ -316,28 +316,28 @@ c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_0)_:
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_red(sink_dsm_DLR_1_1)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(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_balance_dsm_do(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_balance_dsm_do(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_balance_dsm_do(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_balance_dsm_do(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)_:
@@ -345,28 +345,28 @@ c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_0)_:
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_capacity_balance_inc(sink_dsm_DLR_1_1)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(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_balance_dsm_up(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_balance_dsm_up(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_balance_dsm_up(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_balance_dsm_up(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)_:
@@ -378,121 +378,121 @@ c_e_SinkDSMDLRInvestmentBlock_no_comp_inc(sink_dsm_DLR_1_5)_:
 = 0
 
 c_u_SinkDSMDLRInvestmentBlock_availability_red(sink_dsm_DLR_0_0)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_up(sink_dsm_DLR_1_1)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_up(sink_dsm_DLR_1_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_up(sink_dsm_DLR_1_3)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_up(sink_dsm_DLR_1_4)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_up(sink_dsm_DLR_1_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_do(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)
 <= 0
 
 c_u_SinkDSMDLRInvestmentBlock_availability_inc(sink_dsm_DLR_0_1)_:
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_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_balance_dsm_do(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_balance_dsm_do(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_balance_dsm_do(sink_dsm_DLR_1_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_balance_dsm_do(sink_dsm_DLR_1_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_level(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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_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)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5)
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_0)_:
@@ -501,152 +501,152 @@ c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_0)_:
 = 0
 
 c_e_SinkDSMDLRInvestmentBlock_dr_storage_inc(sink_dsm_DLR_1)_:
--1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_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_balance_dsm_up(sink_dsm_DLR_1_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_balance_dsm_up(sink_dsm_DLR_1_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_balance_dsm_up(sink_dsm_DLR_1_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_balance_dsm_up(sink_dsm_DLR_1_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_do_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_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)_:
-+1 SinkDSMDLRInvestmentBlock_dsm_up_level(sink_dsm_DLR_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_balance_dsm_do(sink_dsm_DLR_1_0)
-+1 SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_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_balance_dsm_up(sink_dsm_DLR_1_1)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_1)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(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_balance_dsm_up(sink_dsm_DLR_1_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_2)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(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_balance_dsm_up(sink_dsm_DLR_1_3)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_3)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_3)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(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_balance_dsm_up(sink_dsm_DLR_1_4)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_4)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_4)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(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_balance_dsm_up(sink_dsm_DLR_1_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_do_shed(sink_dsm_DLR_5)
 +1 SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5)
-+1 SinkDSMDLRInvestmentBlock_dsm_up(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)_:
@@ -665,30 +665,53 @@ c_l_SinkDSMDLRInvestmentBlock_overall_minimum(sink_dsm_DLR)_:
 +1 SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2)
 >= 200
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(Bus1_sink_dsm_DLR_0_0) <= +inf
-   0 <= flow(Bus1_sink_dsm_DLR_0_1) <= +inf
-   0 <= flow(Bus1_sink_dsm_DLR_1_2) <= +inf
-   0 <= flow(Bus1_sink_dsm_DLR_1_3) <= +inf
-   0 <= flow(Bus1_sink_dsm_DLR_2_4) <= +inf
-   0 <= flow(Bus1_sink_dsm_DLR_2_5) <= +inf
+   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 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_2) <= +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_total(Source_Bus1_2) <= +inf
-   0 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +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
@@ -696,14 +719,11 @@ bounds
    0 <= InvestmentFlowBlock_old_exo(Source_Bus1_0) <= +inf
    0 <= InvestmentFlowBlock_old_exo(Source_Bus1_1) <= +inf
    0 <= InvestmentFlowBlock_old_exo(Source_Bus1_2) <= +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 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +inf
    0 <= SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_0) <= +inf
    0 <= SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_1) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_total(sink_dsm_DLR_2) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_old(sink_dsm_DLR_0) <= +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
@@ -711,36 +731,13 @@ bounds
    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_dsm_do_shift(sink_dsm_DLR_1_0) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_1) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_2) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_do_shift(sink_dsm_DLR_1_5) <= +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_up(sink_dsm_DLR_1_0) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_1) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_2) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_dsm_up(sink_dsm_DLR_1_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_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_0) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_1) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_2) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_do(sink_dsm_DLR_1_5) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_0) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_1) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_2) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_3) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_4) <= +inf
-   0 <= SinkDSMDLRInvestmentBlock_balance_dsm_up(sink_dsm_DLR_1_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
diff --git a/tests/lp_files/periodical_investment_limit_with_dsm_oemof.lp b/tests/lp_files/periodical_investment_limit_with_dsm_oemof.lp
index d19ad6de..f1961322 100644
--- a/tests/lp_files/periodical_investment_limit_with_dsm_oemof.lp
+++ b/tests/lp_files/periodical_investment_limit_with_dsm_oemof.lp
@@ -2,29 +2,29 @@
 
 min 
 objective:
-+285.39374551281168 InvestmentFlowBlock_invest(Source_Bus1_0)
++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_do_shift(sink_dsm_oemof_1)
-+0.49019607843137253 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2)
-+0.49019607843137253 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_3)
-+0.48058439061899266 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_4)
-+0.48058439061899266 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_5)
 +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.009900990099013 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_2)
++99.00990099009901 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_2)
 
 s.t.
 
 c_u_investment_limit_per_period(0)_:
-+285.39374551281168 InvestmentFlowBlock_invest(Source_Bus1_0)
++285.3937455128117 InvestmentFlowBlock_invest(Source_Bus1_0)
 +103.00990099009903 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_0)
 <= 400
 
@@ -35,37 +35,37 @@ c_u_investment_limit_per_period(1)_:
 
 c_u_investment_limit_per_period(2)_:
 +274.31155854749295 InvestmentFlowBlock_invest(Source_Bus1_2)
-+99.009900990099013 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_2)
++99.00990099009901 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_2)
 <= 200
 
 c_e_BusBlock_balance(Bus1_0_0)_:
--1 flow(Bus1_sink_dsm_oemof_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(Bus1_sink_dsm_oemof_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(Bus1_sink_dsm_oemof_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(Bus1_sink_dsm_oemof_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(Bus1_sink_dsm_oemof_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(Bus1_sink_dsm_oemof_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)_:
@@ -75,16 +75,16 @@ c_e_InvestmentFlowBlock_total_rule(Source_Bus1_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(Source_Bus1_1)_:
 -1 InvestmentFlowBlock_invest(Source_Bus1_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -112,9 +112,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(Source_Bus1_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(Source_Bus1_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -130,33 +130,33 @@ c_e_InvestmentFlowBlock_old_rule(Source_Bus1_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_0)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_0)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_0_1)_:
--1 InvestmentFlowBlock_total(Source_Bus1_0)
 +1 flow(Source_Bus1_0_1)
+-1 InvestmentFlowBlock_total(Source_Bus1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_1_2)_:
--1 InvestmentFlowBlock_total(Source_Bus1_1)
 +1 flow(Source_Bus1_1_2)
+-1 InvestmentFlowBlock_total(Source_Bus1_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_1_3)_:
--1 InvestmentFlowBlock_total(Source_Bus1_1)
 +1 flow(Source_Bus1_1_3)
+-1 InvestmentFlowBlock_total(Source_Bus1_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_2_4)_:
--1 InvestmentFlowBlock_total(Source_Bus1_2)
 +1 flow(Source_Bus1_2_4)
+-1 InvestmentFlowBlock_total(Source_Bus1_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(Source_Bus1_2_5)_:
--1 InvestmentFlowBlock_total(Source_Bus1_2)
 +1 flow(Source_Bus1_2_5)
+-1 InvestmentFlowBlock_total(Source_Bus1_2)
 <= 0
 
 c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(sink_dsm_oemof_0)_:
@@ -166,16 +166,16 @@ c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(sink_dsm_oemof_0)_:
 
 c_e_SinkDSMOemofInvestmentBlock_total_dsm_rule(sink_dsm_oemof_1)_:
 -1 SinkDSMOemofInvestmentBlock_invest(sink_dsm_oemof_1)
-+1 SinkDSMOemofInvestmentBlock_old(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_old(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)_:
@@ -204,9 +204,9 @@ c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule_exo(sink_dsm_oemof_2)_:
 = 0
 
 c_e_SinkDSMOemofInvestmentBlock_old_dsm_rule(sink_dsm_oemof_0)_:
-+1 SinkDSMOemofInvestmentBlock_old(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)_:
@@ -246,45 +246,45 @@ c_e_SinkDSMOemofInvestmentBlock_shift_shed_vars(sink_dsm_oemof_5)_:
 = 0
 
 c_e_SinkDSMOemofInvestmentBlock_input_output_relation(sink_dsm_oemof_0_0)_:
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_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_do_shed(sink_dsm_oemof_1)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_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_do_shed(sink_dsm_oemof_2)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_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_do_shed(sink_dsm_oemof_3)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_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_do_shed(sink_dsm_oemof_4)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_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_do_shed(sink_dsm_oemof_5)
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_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)_:
@@ -318,60 +318,60 @@ c_u_SinkDSMOemofInvestmentBlock_dsm_up_constraint(sink_dsm_oemof_2_5)_:
 <= 0
 
 c_u_SinkDSMOemofInvestmentBlock_dsm_down_constraint(sink_dsm_oemof_0_0)_:
-+1 SinkDSMOemofInvestmentBlock_dsm_do_shed(sink_dsm_oemof_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_shed(sink_dsm_oemof_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_shed(sink_dsm_oemof_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_shed(sink_dsm_oemof_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_shed(sink_dsm_oemof_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_shed(sink_dsm_oemof_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_do_shift(sink_dsm_oemof_1)
 +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_do_shift(sink_dsm_oemof_2)
--1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_3)
 +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_do_shift(sink_dsm_oemof_4)
--1 SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_5)
 +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)_:
@@ -390,30 +390,41 @@ c_l_SinkDSMOemofInvestmentBlock_overall_minimum(sink_dsm_oemof)_:
 +1 SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_2)
 >= 200
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(Bus1_sink_dsm_oemof_0_0) <= +inf
-   0 <= flow(Bus1_sink_dsm_oemof_0_1) <= +inf
-   0 <= flow(Bus1_sink_dsm_oemof_1_2) <= +inf
-   0 <= flow(Bus1_sink_dsm_oemof_1_3) <= +inf
-   0 <= flow(Bus1_sink_dsm_oemof_2_4) <= +inf
-   0 <= flow(Bus1_sink_dsm_oemof_2_5) <= +inf
+   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 <= InvestmentFlowBlock_invest(Source_Bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(Source_Bus1_2) <= +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_total(Source_Bus1_2) <= +inf
-   0 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +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
@@ -421,14 +432,11 @@ bounds
    0 <= InvestmentFlowBlock_old_exo(Source_Bus1_0) <= +inf
    0 <= InvestmentFlowBlock_old_exo(Source_Bus1_1) <= +inf
    0 <= InvestmentFlowBlock_old_exo(Source_Bus1_2) <= +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 <= InvestmentFlowBlock_old(Source_Bus1_0) <= +inf
    0 <= SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_0) <= +inf
    0 <= SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_1) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_total(sink_dsm_oemof_2) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_old(sink_dsm_oemof_0) <= +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
@@ -436,22 +444,11 @@ bounds
    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_dsm_do_shift(sink_dsm_oemof_0) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_1) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_2) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_3) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_4) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_do_shift(sink_dsm_oemof_5) <= +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
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_0) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_1) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_2) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_3) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_4) <= +inf
-   0 <= SinkDSMOemofInvestmentBlock_dsm_up(sink_dsm_oemof_5) <= +inf
 end
diff --git a/tests/lp_files/piecewise_linear_transformer_cc.lp b/tests/lp_files/piecewise_linear_transformer_cc.lp
index 39707487..24ef782c 100644
--- a/tests/lp_files/piecewise_linear_transformer_cc.lp
+++ b/tests/lp_files/piecewise_linear_transformer_cc.lp
@@ -8,18 +8,6 @@ objective:
 
 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
@@ -32,34 +20,46 @@ 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_PiecewiseLinearTransformerBlock_equate_in(pwltf_0_0)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_0)
 -1 flow(gasBus_pwltf_0_0)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_0)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_0_1)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_1)
 -1 flow(gasBus_pwltf_0_1)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_1)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_0_2)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_2)
 -1 flow(gasBus_pwltf_0_2)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0_0)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_0)
 -1 flow(pwltf_electricityBus_0_0)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_0)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0_1)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_1)
 -1 flow(pwltf_electricityBus_0_1)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_1)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0_2)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_2)
 -1 flow(pwltf_electricityBus_0_2)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint1_:
@@ -79,39 +79,39 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint2_:
 = 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 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(1)
 = 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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(1)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint4(2)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(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_lambda(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_lambda(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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(4)
 <= 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint5_:
@@ -138,39 +138,39 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint2_:
 = 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 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(1)
 = 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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(1)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint4(2)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(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_lambda(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_lambda(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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(4)
 <= 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint5_:
@@ -197,39 +197,39 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint2_:
 = 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 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(1)
 = 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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(1)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint4(2)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(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_lambda(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_lambda(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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(4)
 <= 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint5_:
@@ -239,9 +239,6 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint5_:
 +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_0) <= 100
    0 <= flow(gasBus_pwltf_0_1) <= 100
@@ -255,29 +252,29 @@ bounds
    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_lambda(1) <= +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_lambda(1) <= +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_lambda(1) <= +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
diff --git a/tests/lp_files/piecewise_linear_transformer_cc_multi_period.lp b/tests/lp_files/piecewise_linear_transformer_cc_multi_period.lp
index a0d1c62e..9e248c89 100644
--- a/tests/lp_files/piecewise_linear_transformer_cc_multi_period.lp
+++ b/tests/lp_files/piecewise_linear_transformer_cc_multi_period.lp
@@ -4,37 +4,13 @@ min
 objective:
 +1 flow(gasBus_pwltf_0_0)
 +1 flow(gasBus_pwltf_0_1)
-+0.98039215686274506 flow(gasBus_pwltf_1_2)
-+0.98039215686274506 flow(gasBus_pwltf_1_3)
-+0.96116878123798533 flow(gasBus_pwltf_2_4)
-+0.96116878123798533 flow(gasBus_pwltf_2_5)
++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(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_BusBlock_balance(gasBus_0_0)_:
 +1 flow(gasBus_pwltf_0_0)
 = 0
@@ -59,64 +35,88 @@ 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_PiecewiseLinearTransformerBlock_equate_in(pwltf_0_0)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_0)
 -1 flow(gasBus_pwltf_0_0)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_0)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_0_1)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_1)
 -1 flow(gasBus_pwltf_0_1)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_1)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_1_2)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_2)
 -1 flow(gasBus_pwltf_1_2)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_1_3)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_3)
 -1 flow(gasBus_pwltf_1_3)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_3)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_2_4)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_4)
 -1 flow(gasBus_pwltf_2_4)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_2_5)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_5)
 -1 flow(gasBus_pwltf_2_5)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_5)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0_0)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_0)
 -1 flow(pwltf_electricityBus_0_0)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_0)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0_1)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_1)
 -1 flow(pwltf_electricityBus_0_1)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_1)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_1_2)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_2)
 -1 flow(pwltf_electricityBus_1_2)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_1_3)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_3)
 -1 flow(pwltf_electricityBus_1_3)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_3)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_2_4)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_4)
 -1 flow(pwltf_electricityBus_2_4)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_2_5)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_5)
 -1 flow(pwltf_electricityBus_2_5)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_5)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint1_:
@@ -136,39 +136,39 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint2_:
 = 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 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(1)
 = 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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(1)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint4(2)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_lambda(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_lambda(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_lambda(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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_bin_y(4)
 <= 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_CC_constraint5_:
@@ -195,39 +195,39 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint2_:
 = 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 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(1)
 = 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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(1)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint4(2)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_lambda(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_lambda(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_lambda(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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_bin_y(4)
 <= 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_CC_constraint5_:
@@ -254,39 +254,39 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint2_:
 = 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 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(1)
 = 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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(1)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint4(2)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_lambda(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_lambda(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_lambda(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)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_bin_y(4)
 <= 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_CC_constraint5_:
@@ -313,39 +313,39 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_constraint3_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(1)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(2)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(3)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(4)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(5)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(1)
 = 1
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_constraint4(1)_:
--1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(1)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(1)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(1)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_constraint4(2)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(1)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(2)
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(2)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_constraint4(3)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(3)
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(3)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_constraint4(4)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(4)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(4)
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(4)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_constraint4(5)_:
--1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(4)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(5)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(4)
 <= 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_constraint5_:
@@ -372,39 +372,39 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_constraint3_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(1)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(2)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(3)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(4)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(5)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(1)
 = 1
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_constraint4(1)_:
--1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(1)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(1)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(1)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_constraint4(2)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(1)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(2)
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(2)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_constraint4(3)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(3)
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(3)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_constraint4(4)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(4)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(4)
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(4)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_constraint4(5)_:
--1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(4)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(5)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(4)
 <= 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_constraint5_:
@@ -431,39 +431,39 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_constraint3_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(1)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(2)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(3)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(4)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(5)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(1)
 = 1
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_constraint4(1)_:
--1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(1)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(1)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(1)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_constraint4(2)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(1)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(2)
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(2)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_constraint4(3)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(3)
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(3)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_constraint4(4)_:
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(4)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(4)
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(4)
 <= 0
 
 c_u_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_constraint4(5)_:
--1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(4)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(5)
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(4)
 <= 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_constraint5_:
@@ -473,9 +473,6 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_constraint5_:
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(4)
 = 1
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
    0 <= flow(gasBus_pwltf_0_0) <= 100
    0 <= flow(gasBus_pwltf_0_1) <= 100
@@ -501,56 +498,56 @@ bounds
    0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_3) <= 10000
    0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_4) <= 10000
    0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_5) <= 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_lambda(1) <= +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_lambda(1) <= +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_lambda(1) <= +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
-   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(2) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(3) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(4) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(5) <= +inf
+   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_lambda(1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(1) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(2) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(3) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_CC_bin_y(4) <= 1
-   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(2) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(3) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(4) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(5) <= +inf
+   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_lambda(1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(1) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(2) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(3) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_CC_bin_y(4) <= 1
-   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(2) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(3) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(4) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(5) <= +inf
+   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_lambda(1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(1) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(2) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_CC_bin_y(3) <= 1
diff --git a/tests/lp_files/piecewise_linear_transformer_dcc.lp b/tests/lp_files/piecewise_linear_transformer_dcc.lp
index e50b7ee0..6076838c 100644
--- a/tests/lp_files/piecewise_linear_transformer_dcc.lp
+++ b/tests/lp_files/piecewise_linear_transformer_dcc.lp
@@ -8,18 +8,6 @@ objective:
 
 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
@@ -32,34 +20,46 @@ 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_PiecewiseLinearTransformerBlock_equate_in(pwltf_0_0)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_0)
 -1 flow(gasBus_pwltf_0_0)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_0)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_0_1)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_1)
 -1 flow(gasBus_pwltf_0_1)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_1)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_0_2)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_2)
 -1 flow(gasBus_pwltf_0_2)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0_0)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_0)
 -1 flow(pwltf_electricityBus_0_0)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_0)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0_1)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_1)
 -1 flow(pwltf_electricityBus_0_1)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_1)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0_2)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_2)
 -1 flow(pwltf_electricityBus_0_2)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint1_:
@@ -85,27 +85,27 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint3(1)_:
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(1_2)
 +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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(2)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(3)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint4_:
@@ -138,27 +138,27 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint3(1)_:
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(1_2)
 +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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(2)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(3)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint4_:
@@ -191,27 +191,27 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint3(1)_:
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(1_2)
 +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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(2)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(3)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint4_:
@@ -221,9 +221,6 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint4_:
 +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_0) <= 100
    0 <= flow(gasBus_pwltf_0_1) <= 100
@@ -237,7 +234,6 @@ bounds
    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
@@ -246,10 +242,10 @@ bounds
    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_lambda(1_1) <= +inf
    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
@@ -258,10 +254,10 @@ bounds
    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_lambda(1_1) <= +inf
    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
@@ -270,6 +266,7 @@ bounds
    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_lambda(1_1) <= +inf
    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
diff --git a/tests/lp_files/piecewise_linear_transformer_dcc_multi_period.lp b/tests/lp_files/piecewise_linear_transformer_dcc_multi_period.lp
index 0f56eab0..97203741 100644
--- a/tests/lp_files/piecewise_linear_transformer_dcc_multi_period.lp
+++ b/tests/lp_files/piecewise_linear_transformer_dcc_multi_period.lp
@@ -4,37 +4,13 @@ min
 objective:
 +1 flow(gasBus_pwltf_0_0)
 +1 flow(gasBus_pwltf_0_1)
-+0.98039215686274506 flow(gasBus_pwltf_1_2)
-+0.98039215686274506 flow(gasBus_pwltf_1_3)
-+0.96116878123798533 flow(gasBus_pwltf_2_4)
-+0.96116878123798533 flow(gasBus_pwltf_2_5)
++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(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_BusBlock_balance(gasBus_0_0)_:
 +1 flow(gasBus_pwltf_0_0)
 = 0
@@ -59,64 +35,88 @@ 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_PiecewiseLinearTransformerBlock_equate_in(pwltf_0_0)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_0)
 -1 flow(gasBus_pwltf_0_0)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_0)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_0_1)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_1)
 -1 flow(gasBus_pwltf_0_1)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_1)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_1_2)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_2)
 -1 flow(gasBus_pwltf_1_2)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_1_3)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_3)
 -1 flow(gasBus_pwltf_1_3)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_3)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_2_4)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_4)
 -1 flow(gasBus_pwltf_2_4)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_in(pwltf_2_5)_:
-+1 PiecewiseLinearTransformerBlock_inflow(pwltf_5)
 -1 flow(gasBus_pwltf_2_5)
++1 PiecewiseLinearTransformerBlock_inflow(pwltf_5)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0_0)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_0)
 -1 flow(pwltf_electricityBus_0_0)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_0)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_0_1)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_1)
 -1 flow(pwltf_electricityBus_0_1)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_1)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_1_2)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_2)
 -1 flow(pwltf_electricityBus_1_2)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_1_3)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_3)
 -1 flow(pwltf_electricityBus_1_3)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_3)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_2_4)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_4)
 -1 flow(pwltf_electricityBus_2_4)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_equate_out(pwltf_2_5)_:
-+1 PiecewiseLinearTransformerBlock_outflow(pwltf_5)
 -1 flow(pwltf_electricityBus_2_5)
++1 PiecewiseLinearTransformerBlock_outflow(pwltf_5)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint1_:
@@ -142,27 +142,27 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint3(1)_:
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_lambda(1_2)
 +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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(2)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(3)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_bin_y(4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_0)_DCC_constraint4_:
@@ -195,27 +195,27 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint3(1)_:
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_lambda(1_2)
 +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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(2)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(3)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_bin_y(4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_1)_DCC_constraint4_:
@@ -248,27 +248,27 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint3(1)_:
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_lambda(1_2)
 +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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(2)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(3)
 = 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)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_bin_y(4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_2)_DCC_constraint4_:
@@ -301,27 +301,27 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_constraint3(1)_:
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(1_2)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_bin_y(1)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(1_1)
--1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(1_2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_constraint3(2)_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_bin_y(2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(2_2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(2_3)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_bin_y(2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_constraint3(3)_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_bin_y(3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(3_3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(3_4)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_bin_y(3)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_constraint3(4)_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_bin_y(4)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(4_4)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(4_5)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_bin_y(4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_constraint4_:
@@ -354,27 +354,27 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_constraint3(1)_:
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(1_2)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_bin_y(1)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(1_1)
--1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(1_2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_constraint3(2)_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_bin_y(2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(2_2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(2_3)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_bin_y(2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_constraint3(3)_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_bin_y(3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(3_3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(3_4)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_bin_y(3)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_constraint3(4)_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_bin_y(4)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(4_4)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(4_5)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_bin_y(4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_constraint4_:
@@ -407,27 +407,27 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_constraint2_:
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_constraint3(1)_:
+-1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(1_2)
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(1)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(1_1)
--1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(1_2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_constraint3(2)_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(2_2)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(2_3)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(2)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_constraint3(3)_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(3_3)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(3_4)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(3)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_constraint3(4)_:
-+1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(4)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(4_4)
 -1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(4_5)
++1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(4)
 = 0
 
 c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_constraint4_:
@@ -437,9 +437,6 @@ c_e_PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_constraint4_:
 +1 PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(4)
 = 1
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
    0 <= flow(gasBus_pwltf_0_0) <= 100
    0 <= flow(gasBus_pwltf_0_1) <= 100
@@ -465,7 +462,6 @@ bounds
    0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_3) <= 10000
    0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_4) <= 10000
    0 <= PiecewiseLinearTransformerBlock_outflow(pwltf_5) <= 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
@@ -474,10 +470,10 @@ bounds
    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_lambda(1_1) <= +inf
    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
@@ -486,10 +482,10 @@ bounds
    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_lambda(1_1) <= +inf
    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
@@ -498,10 +494,10 @@ bounds
    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_lambda(1_1) <= +inf
    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
-   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(1_1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(1_2) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(2_2) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(2_3) <= +inf
@@ -510,10 +506,10 @@ bounds
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(4_4) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(4_5) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_bin_y(1) <= 1
+   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_lambda(1_1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_bin_y(2) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_bin_y(3) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_3)_DCC_bin_y(4) <= 1
-   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(1_1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(1_2) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(2_2) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(2_3) <= +inf
@@ -522,10 +518,10 @@ bounds
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(4_4) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(4_5) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_bin_y(1) <= 1
+   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_lambda(1_1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_bin_y(2) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_bin_y(3) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_4)_DCC_bin_y(4) <= 1
-   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(1_1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(1_2) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(2_2) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(2_3) <= +inf
@@ -534,6 +530,7 @@ bounds
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(4_4) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(4_5) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(1) <= 1
+   0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_lambda(1_1) <= +inf
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(2) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(3) <= 1
    0 <= PiecewiseLinearTransformerBlock_piecewise(pwltf_5)_DCC_bin_y(4) <= 1
diff --git a/tests/lp_files/shared_limit.lp b/tests/lp_files/shared_limit.lp
index 4cec5bd1..0ff745a6 100644
--- a/tests/lp_files/shared_limit.lp
+++ b/tests/lp_files/shared_limit.lp
@@ -25,66 +25,66 @@ c_e_limit_storage_constraint(2)_:
 = 0
 
 c_e_BusBlock_balance(bus_0_0)_:
--1 flow(bus_storage1_0_0)
--1 flow(bus_storage2_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(bus_storage1_0_1)
--1 flow(bus_storage2_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_0_2)_:
--1 flow(bus_storage1_0_2)
--1 flow(bus_storage2_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_0)_:
 -1 GenericStorageBlock_storage_content(storage1_0)
 +1 GenericStorageBlock_storage_content(storage1_1)
--1 flow(bus_storage1_0_0)
 +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(bus_storage1_0_1)
 +1 flow(storage1_bus_0_1)
+-1 flow(bus_storage1_0_1)
 = 0
 
 c_e_GenericStorageBlock_balance(storage1_0_2)_:
 -1 GenericStorageBlock_storage_content(storage1_2)
-+1 GenericStorageBlock_storage_content(storage1_3)
--1 flow(bus_storage1_0_2)
 +1 flow(storage1_bus_0_2)
+-1 flow(bus_storage1_0_2)
++1 GenericStorageBlock_storage_content(storage1_3)
 = 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_0)
 +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(bus_storage2_0_1)
 +1 flow(storage2_bus_0_1)
+-1 flow(bus_storage2_0_1)
 = 0
 
 c_e_GenericStorageBlock_balance(storage2_0_2)_:
 -1 GenericStorageBlock_storage_content(storage2_2)
-+1 GenericStorageBlock_storage_content(storage2_3)
--1 flow(bus_storage2_0_2)
 +1 flow(storage2_bus_0_2)
+-1 flow(bus_storage2_0_2)
++1 GenericStorageBlock_storage_content(storage2_3)
 = 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
+   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 <= flow(storage1_bus_0_0) <= +inf
+   0 <= flow(storage2_bus_0_0) <= +inf
    0 <= flow(bus_storage1_0_0) <= +inf
-   0 <= flow(bus_storage1_0_1) <= +inf
-   0 <= flow(bus_storage1_0_2) <= +inf
    0 <= flow(bus_storage2_0_0) <= +inf
-   0 <= flow(bus_storage2_0_1) <= +inf
-   0 <= flow(bus_storage2_0_2) <= +inf
-   0 <= flow(storage1_bus_0_0) <= +inf
    0 <= flow(storage1_bus_0_1) <= +inf
-   0 <= flow(storage1_bus_0_2) <= +inf
-   0 <= flow(storage2_bus_0_0) <= +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 <= limit_storage(0) <= 7
-   0 <= limit_storage(1) <= 7
-   0 <= limit_storage(2) <= 7
-   0 <= GenericStorageBlock_storage_content(storage1_0) <= 5
-   0 <= GenericStorageBlock_storage_content(storage1_1) <= 5
-   0 <= GenericStorageBlock_storage_content(storage1_2) <= 5
+   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_0) <= 5
-   0 <= GenericStorageBlock_storage_content(storage2_1) <= 5
-   0 <= GenericStorageBlock_storage_content(storage2_2) <= 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
index c637bcc7..6bdd7fa1 100644
--- a/tests/lp_files/shared_limit_multi_period.lp
+++ b/tests/lp_files/shared_limit_multi_period.lp
@@ -2,7 +2,7 @@
 
 min 
 objective:
-+0 ONE_VAR_CONSTANT
++0.0 ONE_VAR_CONSTANT
 
 s.t.
 
@@ -43,129 +43,129 @@ c_e_limit_storage_constraint(5)_:
 = 0
 
 c_e_BusBlock_balance(bus_0_0)_:
--1 flow(bus_storage1_0_0)
--1 flow(bus_storage2_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(bus_storage1_0_1)
--1 flow(bus_storage2_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(bus_storage1_1_2)
--1 flow(bus_storage2_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(bus_storage1_1_3)
--1 flow(bus_storage2_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(bus_storage1_2_4)
--1 flow(bus_storage2_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(bus_storage1_2_5)
--1 flow(bus_storage2_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(bus_storage1_0_0)
 +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(bus_storage1_0_1)
 +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(bus_storage1_1_2)
 +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(bus_storage1_1_3)
 +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(bus_storage1_2_4)
 +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 GenericStorageBlock_storage_content(storage1_6)
--1 flow(bus_storage1_2_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(bus_storage2_0_0)
 +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(bus_storage2_0_1)
 +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(bus_storage2_1_2)
 +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(bus_storage2_1_3)
 +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(bus_storage2_2_4)
 +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 GenericStorageBlock_storage_content(storage2_6)
--1 flow(bus_storage2_2_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)_:
@@ -178,52 +178,50 @@ c_e_GenericStorageBlock_balanced_cstr(storage2)_:
 +1 GenericStorageBlock_storage_content(storage2_6)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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_storage1_0_1) <= +inf
-   0 <= flow(bus_storage1_1_2) <= +inf
-   0 <= flow(bus_storage1_1_3) <= +inf
-   0 <= flow(bus_storage1_2_4) <= +inf
-   0 <= flow(bus_storage1_2_5) <= +inf
    0 <= flow(bus_storage2_0_0) <= +inf
-   0 <= flow(bus_storage2_0_1) <= +inf
-   0 <= flow(bus_storage2_1_2) <= +inf
-   0 <= flow(bus_storage2_1_3) <= +inf
-   0 <= flow(bus_storage2_2_4) <= +inf
-   0 <= flow(bus_storage2_2_5) <= +inf
-   0 <= flow(storage1_bus_0_0) <= +inf
    0 <= flow(storage1_bus_0_1) <= +inf
-   0 <= flow(storage1_bus_1_2) <= +inf
-   0 <= flow(storage1_bus_1_3) <= +inf
-   0 <= flow(storage1_bus_2_4) <= +inf
-   0 <= flow(storage1_bus_2_5) <= +inf
-   0 <= flow(storage2_bus_0_0) <= +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 <= limit_storage(0) <= 7
-   0 <= limit_storage(1) <= 7
-   0 <= limit_storage(2) <= 7
-   0 <= limit_storage(3) <= 7
-   0 <= limit_storage(4) <= 7
-   0 <= limit_storage(5) <= 7
-   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(storage1_4) <= 5
-   0 <= GenericStorageBlock_storage_content(storage1_5) <= 5
+   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_0) <= 5
-   0 <= GenericStorageBlock_storage_content(storage2_1) <= 5
-   0 <= GenericStorageBlock_storage_content(storage2_2) <= 5
-   0 <= GenericStorageBlock_storage_content(storage2_3) <= 5
-   0 <= GenericStorageBlock_storage_content(storage2_4) <= 5
-   0 <= GenericStorageBlock_storage_content(storage2_5) <= 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 c7f1e196..75f93f31 100644
--- a/tests/lp_files/source_with_gradient.lp
+++ b/tests/lp_files/source_with_gradient.lp
@@ -25,15 +25,15 @@ c_e_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_0)_:
 = 0
 
 c_u_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_1)_:
--1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_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_0_2)_:
--1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_2)
 -1 flow(powerplant_electricityBus_0_1)
 +1 flow(powerplant_electricityBus_0_2)
+-1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_2)
 <= 0
 
 c_e_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_0)_:
@@ -41,28 +41,25 @@ c_e_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_0)_:
 = 0
 
 c_u_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_1)_:
--1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_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_0_2)_:
--1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_2)
 +1 flow(powerplant_electricityBus_0_1)
 -1 flow(powerplant_electricityBus_0_2)
+-1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_2)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
    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.969999999999999
-   0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_1) <= 29.969999999999999
-   0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_2) <= 29.969999999999999
-   0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_0) <= 49.950000000000003
-   0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_1) <= 49.950000000000003
-   0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_2) <= 49.950000000000003
+   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
index a61585c7..5ff719ac 100644
--- a/tests/lp_files/source_with_gradient_multi_period.lp
+++ b/tests/lp_files/source_with_gradient_multi_period.lp
@@ -6,8 +6,8 @@ objective:
 +23 flow(powerplant_electricityBus_0_1)
 +22.549019607843135 flow(powerplant_electricityBus_1_2)
 +22.549019607843135 flow(powerplant_electricityBus_1_3)
-+22.106881968473662 flow(powerplant_electricityBus_2_4)
-+22.106881968473662 flow(powerplant_electricityBus_2_5)
++22.10688196847366 flow(powerplant_electricityBus_2_4)
++22.10688196847366 flow(powerplant_electricityBus_2_5)
 
 s.t.
 
@@ -40,33 +40,33 @@ c_e_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_0)_:
 = 0
 
 c_u_SimpleFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_1)_:
--1 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_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 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_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 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_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 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_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 SimpleFlowBlock_positive_gradient(powerplant_electricityBus_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)_:
@@ -74,38 +74,35 @@ c_e_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_0)_:
 = 0
 
 c_u_SimpleFlowBlock_negative_gradient_constr(powerplant_electricityBus_0_1)_:
--1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_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 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_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 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_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 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_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 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_5)
 +1 flow(powerplant_electricityBus_2_4)
 -1 flow(powerplant_electricityBus_2_5)
+-1 SimpleFlowBlock_negative_gradient(powerplant_electricityBus_5)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
    0 <= flow(powerplant_electricityBus_0_0) <= 999
    0 <= flow(powerplant_electricityBus_0_1) <= 999
@@ -113,16 +110,16 @@ bounds
    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.969999999999999
-   0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_1) <= 29.969999999999999
-   0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_2) <= 29.969999999999999
-   0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_3) <= 29.969999999999999
-   0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_4) <= 29.969999999999999
-   0 <= SimpleFlowBlock_positive_gradient(powerplant_electricityBus_5) <= 29.969999999999999
-   0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_0) <= 49.950000000000003
-   0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_1) <= 49.950000000000003
-   0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_2) <= 49.950000000000003
-   0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_3) <= 49.950000000000003
-   0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_4) <= 49.950000000000003
-   0 <= SimpleFlowBlock_negative_gradient(powerplant_electricityBus_5) <= 49.950000000000003
+   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 768533e9..5e38b5ed 100644
--- a/tests/lp_files/source_with_nonconvex_gradient.lp
+++ b/tests/lp_files/source_with_nonconvex_gradient.lp
@@ -21,45 +21,45 @@ c_e_BusBlock_balance(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_0)_:
-+1 flow(powerplant_electricityBus_0_0)
->= 0
+c_u_NonConvexFlowBlock_min(powerplant_electricityBus_0_0)_:
+-1 flow(powerplant_electricityBus_0_0)
+<= 0
 
-c_l_NonConvexFlowBlock_min(powerplant_electricityBus_0_1)_:
-+1 flow(powerplant_electricityBus_0_1)
->= 0
+c_u_NonConvexFlowBlock_min(powerplant_electricityBus_0_1)_:
+-1 flow(powerplant_electricityBus_0_1)
+<= 0
 
-c_l_NonConvexFlowBlock_min(powerplant_electricityBus_0_2)_:
-+1 flow(powerplant_electricityBus_0_2)
->= 0
+c_u_NonConvexFlowBlock_min(powerplant_electricityBus_0_2)_:
+-1 flow(powerplant_electricityBus_0_2)
+<= 0
 
 c_u_NonConvexFlowBlock_max(powerplant_electricityBus_0_0)_:
--1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_0)
 +1 flow(powerplant_electricityBus_0_0)
+-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_0)
 <= 0
 
 c_u_NonConvexFlowBlock_max(powerplant_electricityBus_0_1)_:
--1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_1)
 +1 flow(powerplant_electricityBus_0_1)
+-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_1)
 <= 0
 
 c_u_NonConvexFlowBlock_max(powerplant_electricityBus_0_2)_:
--1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_2)
 +1 flow(powerplant_electricityBus_0_2)
+-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_2)
 <= 0
 
 c_e_NonConvexFlowBlock_positive_gradient_constr(powerplant_electricityBus_0_0)_:
@@ -69,16 +69,16 @@ c_e_NonConvexFlowBlock_positive_gradient_constr(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_0)
-+1 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_0_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_0_2)_:
 -1 NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_2)
 + [
--1 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_0_1)
-+1 NonConvexFlowBlock_status(powerplant_electricityBus_2) * flow(powerplant_electricityBus_0_2)
+-1 flow(powerplant_electricityBus_0_1) * NonConvexFlowBlock_status(powerplant_electricityBus_1)
++1 flow(powerplant_electricityBus_0_2) * NonConvexFlowBlock_status(powerplant_electricityBus_2)
 ]
 <= 0
 
@@ -89,32 +89,29 @@ c_e_NonConvexFlowBlock_negative_gradient_constr(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_0)
--1 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_0_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_0_2)_:
 -1 NonConvexFlowBlock_negative_gradient(powerplant_electricityBus_2)
 + [
-+1 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_0_1)
--1 NonConvexFlowBlock_status(powerplant_electricityBus_2) * flow(powerplant_electricityBus_0_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_0) <= 999
    0 <= flow(powerplant_electricityBus_0_1) <= 999
    0 <= flow(powerplant_electricityBus_0_2) <= 999
-   0 <= NonConvexFlowBlock_status(powerplant_electricityBus_0) <= 1
-   0 <= NonConvexFlowBlock_status(powerplant_electricityBus_1) <= 1
-   0 <= NonConvexFlowBlock_status(powerplant_electricityBus_2) <= 1
    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_positive_gradient(powerplant_electricityBus_0) <= +inf
    0 <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_1) <= +inf
    0 <= NonConvexFlowBlock_positive_gradient(powerplant_electricityBus_2) <= +inf
diff --git a/tests/lp_files/source_with_nonconvex_gradient_multi_period.lp b/tests/lp_files/source_with_nonconvex_gradient_multi_period.lp
index cb6fd945..68eac015 100644
--- a/tests/lp_files/source_with_nonconvex_gradient_multi_period.lp
+++ b/tests/lp_files/source_with_nonconvex_gradient_multi_period.lp
@@ -6,8 +6,8 @@ objective:
 +23 flow(powerplant_electricityBus_0_1)
 +22.549019607843135 flow(powerplant_electricityBus_1_2)
 +22.549019607843135 flow(powerplant_electricityBus_1_3)
-+22.106881968473662 flow(powerplant_electricityBus_2_4)
-+22.106881968473662 flow(powerplant_electricityBus_2_5)
++22.10688196847366 flow(powerplant_electricityBus_2_4)
++22.10688196847366 flow(powerplant_electricityBus_2_5)
 
 s.t.
 
@@ -36,87 +36,87 @@ c_e_BusBlock_balance(electricityBus_2_5)_:
 = 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_e_NonConvexFlowBlock_status_nominal_constraint(powerplant_electricityBus_3)_:
--999 NonConvexFlowBlock_status(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)_:
--999 NonConvexFlowBlock_status(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)_:
--999 NonConvexFlowBlock_status(powerplant_electricityBus_5)
 +1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_5)
+-999 NonConvexFlowBlock_status(powerplant_electricityBus_5)
 = 0
 
-c_l_NonConvexFlowBlock_min(powerplant_electricityBus_0_0)_:
-+1 flow(powerplant_electricityBus_0_0)
->= 0
+c_u_NonConvexFlowBlock_min(powerplant_electricityBus_0_0)_:
+-1 flow(powerplant_electricityBus_0_0)
+<= 0
 
-c_l_NonConvexFlowBlock_min(powerplant_electricityBus_0_1)_:
-+1 flow(powerplant_electricityBus_0_1)
->= 0
+c_u_NonConvexFlowBlock_min(powerplant_electricityBus_0_1)_:
+-1 flow(powerplant_electricityBus_0_1)
+<= 0
 
-c_l_NonConvexFlowBlock_min(powerplant_electricityBus_1_2)_:
-+1 flow(powerplant_electricityBus_1_2)
->= 0
+c_u_NonConvexFlowBlock_min(powerplant_electricityBus_1_2)_:
+-1 flow(powerplant_electricityBus_1_2)
+<= 0
 
-c_l_NonConvexFlowBlock_min(powerplant_electricityBus_1_3)_:
-+1 flow(powerplant_electricityBus_1_3)
->= 0
+c_u_NonConvexFlowBlock_min(powerplant_electricityBus_1_3)_:
+-1 flow(powerplant_electricityBus_1_3)
+<= 0
 
-c_l_NonConvexFlowBlock_min(powerplant_electricityBus_2_4)_:
-+1 flow(powerplant_electricityBus_2_4)
->= 0
+c_u_NonConvexFlowBlock_min(powerplant_electricityBus_2_4)_:
+-1 flow(powerplant_electricityBus_2_4)
+<= 0
 
-c_l_NonConvexFlowBlock_min(powerplant_electricityBus_2_5)_:
-+1 flow(powerplant_electricityBus_2_5)
->= 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 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_0)
 +1 flow(powerplant_electricityBus_0_0)
+-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_0)
 <= 0
 
 c_u_NonConvexFlowBlock_max(powerplant_electricityBus_0_1)_:
--1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_1)
 +1 flow(powerplant_electricityBus_0_1)
+-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_1)
 <= 0
 
 c_u_NonConvexFlowBlock_max(powerplant_electricityBus_1_2)_:
--1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_2)
 +1 flow(powerplant_electricityBus_1_2)
+-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_2)
 <= 0
 
 c_u_NonConvexFlowBlock_max(powerplant_electricityBus_1_3)_:
--1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_3)
 +1 flow(powerplant_electricityBus_1_3)
+-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_3)
 <= 0
 
 c_u_NonConvexFlowBlock_max(powerplant_electricityBus_2_4)_:
--1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_4)
 +1 flow(powerplant_electricityBus_2_4)
+-1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_4)
 <= 0
 
 c_u_NonConvexFlowBlock_max(powerplant_electricityBus_2_5)_:
--1 NonConvexFlowBlock_status_nominal(powerplant_electricityBus_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)_:
@@ -126,40 +126,40 @@ c_e_NonConvexFlowBlock_positive_gradient_constr(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_0)
-+1 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_0_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 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_0_1)
-+1 NonConvexFlowBlock_status(powerplant_electricityBus_2) * flow(powerplant_electricityBus_1_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 NonConvexFlowBlock_status(powerplant_electricityBus_2) * flow(powerplant_electricityBus_1_2)
-+1 NonConvexFlowBlock_status(powerplant_electricityBus_3) * flow(powerplant_electricityBus_1_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 NonConvexFlowBlock_status(powerplant_electricityBus_3) * flow(powerplant_electricityBus_1_3)
-+1 NonConvexFlowBlock_status(powerplant_electricityBus_4) * flow(powerplant_electricityBus_2_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 NonConvexFlowBlock_status(powerplant_electricityBus_4) * flow(powerplant_electricityBus_2_4)
-+1 NonConvexFlowBlock_status(powerplant_electricityBus_5) * flow(powerplant_electricityBus_2_5)
+-1 flow(powerplant_electricityBus_2_4) * NonConvexFlowBlock_status(powerplant_electricityBus_4)
++1 flow(powerplant_electricityBus_2_5) * NonConvexFlowBlock_status(powerplant_electricityBus_5)
 ]
 <= 0
 
@@ -170,46 +170,43 @@ c_e_NonConvexFlowBlock_negative_gradient_constr(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_0)
--1 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_0_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 NonConvexFlowBlock_status(powerplant_electricityBus_1) * flow(powerplant_electricityBus_0_1)
--1 NonConvexFlowBlock_status(powerplant_electricityBus_2) * flow(powerplant_electricityBus_1_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 NonConvexFlowBlock_status(powerplant_electricityBus_2) * flow(powerplant_electricityBus_1_2)
--1 NonConvexFlowBlock_status(powerplant_electricityBus_3) * flow(powerplant_electricityBus_1_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 NonConvexFlowBlock_status(powerplant_electricityBus_3) * flow(powerplant_electricityBus_1_3)
--1 NonConvexFlowBlock_status(powerplant_electricityBus_4) * flow(powerplant_electricityBus_2_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 NonConvexFlowBlock_status(powerplant_electricityBus_4) * flow(powerplant_electricityBus_2_4)
--1 NonConvexFlowBlock_status(powerplant_electricityBus_5) * flow(powerplant_electricityBus_2_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_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
    0 <= flow(powerplant_electricityBus_0_0) <= 999
    0 <= flow(powerplant_electricityBus_0_1) <= 999
@@ -217,18 +214,18 @@ bounds
    0 <= flow(powerplant_electricityBus_1_3) <= 999
    0 <= flow(powerplant_electricityBus_2_4) <= 999
    0 <= flow(powerplant_electricityBus_2_5) <= 999
-   0 <= NonConvexFlowBlock_status(powerplant_electricityBus_0) <= 1
-   0 <= NonConvexFlowBlock_status(powerplant_electricityBus_1) <= 1
-   0 <= NonConvexFlowBlock_status(powerplant_electricityBus_2) <= 1
-   0 <= NonConvexFlowBlock_status(powerplant_electricityBus_3) <= 1
-   0 <= NonConvexFlowBlock_status(powerplant_electricityBus_4) <= 1
-   0 <= NonConvexFlowBlock_status(powerplant_electricityBus_5) <= 1
    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
diff --git a/tests/lp_files/storage.lp b/tests/lp_files/storage.lp
index 0dd2f945..8135f3ec 100644
--- a/tests/lp_files/storage.lp
+++ b/tests/lp_files/storage.lp
@@ -27,31 +27,28 @@ c_e_BusBlock_balance(electricityBus_0_2)_:
 = 0
 
 c_e_GenericStorageBlock_balance(storage_no_invest_0_0)_:
-+1 GenericStorageBlock_storage_content(storage_no_invest_1)
--0.96999999999999997 flow(electricityBus_storage_no_invest_0_0)
+-0.97 flow(electricityBus_storage_no_invest_0_0)
 +1.1627906976744187 flow(storage_no_invest_electricityBus_0_0)
-= 34800
++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.96999999999999997 flow(electricityBus_storage_no_invest_0_1)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_0_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_0) <= 16667
@@ -60,7 +57,7 @@ bounds
    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 <= 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.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 769e2f3e..ca4def3e 100644
--- a/tests/lp_files/storage_fixed_losses.lp
+++ b/tests/lp_files/storage_fixed_losses.lp
@@ -27,31 +27,28 @@ c_e_BusBlock_balance(electricityBus_0_2)_:
 = 0
 
 c_e_GenericStorageBlock_balance(storage_no_invest_0_0)_:
-+1 GenericStorageBlock_storage_content(storage_no_invest_1)
--0.96999999999999997 flow(electricityBus_storage_no_invest_0_0)
+-0.97 flow(electricityBus_storage_no_invest_0_0)
 +1.1627906976744187 flow(storage_no_invest_electricityBus_0_0)
-= 33797
++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)
--0.96999999999999997 flow(electricityBus_storage_no_invest_0_1)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_0_1)
-= -1003
+= -1003.0
 
 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_0_2)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_0_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_0) <= 16667
@@ -60,7 +57,7 @@ bounds
    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 <= 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.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
index 2721d8a4..04ed25c3 100644
--- a/tests/lp_files/storage_fixed_losses_multi_period.lp
+++ b/tests/lp_files/storage_fixed_losses_multi_period.lp
@@ -4,16 +4,16 @@ min
 objective:
 +56 flow(electricityBus_storage_no_invest_0_0)
 +56 flow(electricityBus_storage_no_invest_0_1)
-+54.901960784313722 flow(electricityBus_storage_no_invest_1_2)
-+54.901960784313722 flow(electricityBus_storage_no_invest_1_3)
-+53.825451749327179 flow(electricityBus_storage_no_invest_2_4)
-+53.825451749327179 flow(electricityBus_storage_no_invest_2_5)
++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.068050749711649 flow(storage_no_invest_electricityBus_2_4)
-+23.068050749711649 flow(storage_no_invest_electricityBus_2_5)
++23.06805074971165 flow(storage_no_invest_electricityBus_2_4)
++23.06805074971165 flow(storage_no_invest_electricityBus_2_5)
 
 s.t.
 
@@ -48,52 +48,49 @@ c_e_BusBlock_balance(electricityBus_2_5)_:
 = 0
 
 c_e_GenericStorageBlock_balance(storage_no_invest_0_0)_:
-+1 GenericStorageBlock_storage_content(storage_no_invest_1)
--0.96999999999999997 flow(electricityBus_storage_no_invest_0_0)
+-0.97 flow(electricityBus_storage_no_invest_0_0)
 +1.1627906976744187 flow(storage_no_invest_electricityBus_0_0)
-= 33797
++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)
--0.96999999999999997 flow(electricityBus_storage_no_invest_0_1)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_0_1)
-= -1003
+= -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)
--0.96999999999999997 flow(electricityBus_storage_no_invest_1_2)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_1_2)
-= -1003
+= -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)
--0.96999999999999997 flow(electricityBus_storage_no_invest_1_3)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_1_3)
-= -1003
+= -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)
--0.96999999999999997 flow(electricityBus_storage_no_invest_2_4)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_2_4)
-= -1003
+= -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)
--0.96999999999999997 flow(electricityBus_storage_no_invest_2_5)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_2_5)
-= -1003
+= -1003.0
 
 c_e_GenericStorageBlock_balanced_cstr(storage_no_invest)_:
 +1 GenericStorageBlock_storage_content(storage_no_invest_6)
-= 40000
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+= 40000.0
 
 bounds
    0 <= flow(electricityBus_storage_no_invest_0_0) <= 16667
@@ -108,10 +105,10 @@ bounds
    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 <= 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 <= GenericStorageBlock_storage_content(storage_no_invest_4) <= 100000
-   0 <= GenericStorageBlock_storage_content(storage_no_invest_5) <= 100000
-   0 <= GenericStorageBlock_storage_content(storage_no_invest_6) <= 100000
+   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 c9060c44..d40a6111 100644
--- a/tests/lp_files/storage_invest_1.lp
+++ b/tests/lp_files/storage_invest_1.lp
@@ -2,13 +2,13 @@
 
 min 
 objective:
-+145 GenericInvestmentStorageBlock_invest(storage1_0)
 +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.
 
@@ -28,43 +28,43 @@ c_e_BusBlock_balance(electricityBus_0_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_storage1_0)_:
--1 InvestmentFlowBlock_invest(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_invest(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 InvestmentFlowBlock_total(electricityBus_storage1_0)
 +1 flow(electricityBus_storage1_0_0)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 +1 flow(electricityBus_storage1_0_1)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 +1 flow(electricityBus_storage1_0_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 +1 flow(storage1_electricityBus_0_0)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 +1 flow(storage1_electricityBus_0_1)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_2)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 +1 flow(storage1_electricityBus_0_2)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 <= 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
@@ -73,29 +73,29 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_init_content_limit(storage1)_:
-+1 GenericInvestmentStorageBlock_init_content(storage1)
 -1 GenericInvestmentStorageBlock_invest(storage1_0)
++1 GenericInvestmentStorageBlock_init_content(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_0)
-+1.1627906976744187 flow(storage1_electricityBus_0_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.96999999999999997 flow(electricityBus_storage1_0_1)
-+1.1627906976744187 flow(storage1_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1.1627906976744187 flow(storage1_electricityBus_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage1)_:
@@ -104,48 +104,45 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage1)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_0)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 +1 InvestmentFlowBlock_total(electricityBus_storage1_0)
+-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_0)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 +1 InvestmentFlowBlock_total(storage1_electricityBus_0)
+-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_:
+-0.9 GenericInvestmentStorageBlock_total(storage1_0)
 +1 GenericInvestmentStorageBlock_storage_content(storage1_0)
--0.90000000000000002 GenericInvestmentStorageBlock_total(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.90000000000000002 GenericInvestmentStorageBlock_total(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_2)_:
+-0.9 GenericInvestmentStorageBlock_total(storage1_0)
 +1 GenericInvestmentStorageBlock_storage_content(storage1_2)
--0.90000000000000002 GenericInvestmentStorageBlock_total(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_0)_:
++0.1 GenericInvestmentStorageBlock_total(storage1_0)
 -1 GenericInvestmentStorageBlock_storage_content(storage1_0)
-+0.10000000000000001 GenericInvestmentStorageBlock_total(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.10000000000000001 GenericInvestmentStorageBlock_total(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_2)_:
++0.1 GenericInvestmentStorageBlock_total(storage1_0)
 -1 GenericInvestmentStorageBlock_storage_content(storage1_2)
-+0.10000000000000001 GenericInvestmentStorageBlock_total(storage1_0)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
    0 <= flow(electricityBus_storage1_0_0) <= +inf
    0 <= flow(electricityBus_storage1_0_1) <= +inf
@@ -153,14 +150,14 @@ bounds
    0 <= flow(storage1_electricityBus_0_0) <= +inf
    0 <= flow(storage1_electricityBus_0_1) <= +inf
    0 <= flow(storage1_electricityBus_0_2) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(storage1_electricityBus_0) <= +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_0) <= 234
-   0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf
-   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 29186bd4..c6c2ce6d 100644
--- a/tests/lp_files/storage_invest_1_fixed_losses.lp
+++ b/tests/lp_files/storage_invest_1_fixed_losses.lp
@@ -2,13 +2,13 @@
 
 min 
 objective:
-+145 GenericInvestmentStorageBlock_invest(storage1_0)
 +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.
 
@@ -28,43 +28,43 @@ c_e_BusBlock_balance(electricityBus_0_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_storage1_0)_:
--1 InvestmentFlowBlock_invest(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_invest(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 InvestmentFlowBlock_total(electricityBus_storage1_0)
 +1 flow(electricityBus_storage1_0_0)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 +1 flow(electricityBus_storage1_0_1)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 +1 flow(electricityBus_storage1_0_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 +1 flow(storage1_electricityBus_0_0)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 +1 flow(storage1_electricityBus_0_1)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_2)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 +1 flow(storage1_electricityBus_0_2)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 <= 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
@@ -73,33 +73,33 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_init_content_limit(storage1)_:
-+1 GenericInvestmentStorageBlock_init_content(storage1)
 -1 GenericInvestmentStorageBlock_invest(storage1_0)
++1 GenericInvestmentStorageBlock_init_content(storage1)
 <= 0
 
 c_e_GenericInvestmentStorageBlock_balance_first(storage1)_:
--0.87 GenericInvestmentStorageBlock_init_content(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)
 +1 GenericInvestmentStorageBlock_storage_content(storage1_0)
--0.96999999999999997 flow(electricityBus_storage1_0_0)
-+1.1627906976744187 flow(storage1_electricityBus_0_0)
-= -3
+= -3.0
 
 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.01 GenericInvestmentStorageBlock_total(storage1_0)
--0.96999999999999997 flow(electricityBus_storage1_0_1)
-+1.1627906976744187 flow(storage1_electricityBus_0_1)
-= -3
+= -3.0
 
 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.01 GenericInvestmentStorageBlock_total(storage1_0)
--0.96999999999999997 flow(electricityBus_storage1_0_2)
-+1.1627906976744187 flow(storage1_electricityBus_0_2)
-= -3
+= -3.0
 
 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage1)_:
 -1 GenericInvestmentStorageBlock_init_content(storage1)
@@ -107,48 +107,45 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage1)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_0)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 +1 InvestmentFlowBlock_total(electricityBus_storage1_0)
+-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_0)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 +1 InvestmentFlowBlock_total(storage1_electricityBus_0)
+-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_:
+-0.9 GenericInvestmentStorageBlock_total(storage1_0)
 +1 GenericInvestmentStorageBlock_storage_content(storage1_0)
--0.90000000000000002 GenericInvestmentStorageBlock_total(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.90000000000000002 GenericInvestmentStorageBlock_total(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_2)_:
+-0.9 GenericInvestmentStorageBlock_total(storage1_0)
 +1 GenericInvestmentStorageBlock_storage_content(storage1_2)
--0.90000000000000002 GenericInvestmentStorageBlock_total(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_0)_:
++0.1 GenericInvestmentStorageBlock_total(storage1_0)
 -1 GenericInvestmentStorageBlock_storage_content(storage1_0)
-+0.10000000000000001 GenericInvestmentStorageBlock_total(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.10000000000000001 GenericInvestmentStorageBlock_total(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_2)_:
++0.1 GenericInvestmentStorageBlock_total(storage1_0)
 -1 GenericInvestmentStorageBlock_storage_content(storage1_2)
-+0.10000000000000001 GenericInvestmentStorageBlock_total(storage1_0)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
    0 <= flow(electricityBus_storage1_0_0) <= +inf
    0 <= flow(electricityBus_storage1_0_1) <= +inf
@@ -156,14 +153,14 @@ bounds
    0 <= flow(storage1_electricityBus_0_0) <= +inf
    0 <= flow(storage1_electricityBus_0_1) <= +inf
    0 <= flow(storage1_electricityBus_0_2) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(storage1_electricityBus_0) <= +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_0) <= 234
-   0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf
-   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
index 82f97343..ec9897a2 100644
--- a/tests/lp_files/storage_invest_1_multi_period.lp
+++ b/tests/lp_files/storage_invest_1_multi_period.lp
@@ -2,21 +2,21 @@
 
 min 
 objective:
-+232.70350285300475 GenericInvestmentStorageBlock_invest(storage1_0)
-+228.14068907157326 GenericInvestmentStorageBlock_invest(storage1_1)
-+223.66734222703261 GenericInvestmentStorageBlock_invest(storage1_2)
 +56 flow(electricityBus_storage1_0_0)
 +56 flow(electricityBus_storage1_0_1)
-+54.901960784313722 flow(electricityBus_storage1_1_2)
-+54.901960784313722 flow(electricityBus_storage1_1_3)
-+53.825451749327179 flow(electricityBus_storage1_2_4)
-+53.825451749327179 flow(electricityBus_storage1_2_5)
++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.068050749711649 flow(storage1_electricityBus_2_4)
-+23.068050749711649 flow(storage1_electricityBus_2_5)
++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.
 
@@ -51,41 +51,41 @@ c_e_BusBlock_balance(electricityBus_2_5)_:
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_storage1_0)_:
--1 InvestmentFlowBlock_invest(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_invest(electricityBus_storage1_1)
-+1 InvestmentFlowBlock_old(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_invest(electricityBus_storage1_2)
-+1 InvestmentFlowBlock_old(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_invest(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_invest(storage1_electricityBus_1)
-+1 InvestmentFlowBlock_old(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_invest(storage1_electricityBus_2)
-+1 InvestmentFlowBlock_old(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)_:
@@ -137,9 +137,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(storage1_electricityBus_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(electricityBus_storage1_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -155,9 +155,9 @@ c_e_InvestmentFlowBlock_old_rule(electricityBus_storage1_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(storage1_electricityBus_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -173,63 +173,63 @@ c_e_InvestmentFlowBlock_old_rule(storage1_electricityBus_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_0)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 +1 flow(electricityBus_storage1_0_0)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 +1 flow(electricityBus_storage1_0_1)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_1_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_1)
 +1 flow(electricityBus_storage1_1_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_1_3)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_1)
 +1 flow(electricityBus_storage1_1_3)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_2_4)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_2)
 +1 flow(electricityBus_storage1_2_4)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_2_5)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_2)
 +1 flow(electricityBus_storage1_2_5)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 +1 flow(storage1_electricityBus_0_0)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 +1 flow(storage1_electricityBus_0_1)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_1_2)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_1)
 +1 flow(storage1_electricityBus_1_2)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_1_3)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_1)
 +1 flow(storage1_electricityBus_1_3)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_2_4)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_2)
 +1 flow(storage1_electricityBus_2_4)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_2_5)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_2)
 +1 flow(storage1_electricityBus_2_5)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_2)
 <= 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
@@ -239,16 +239,16 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_1)_:
 -1 GenericInvestmentStorageBlock_invest(storage1_1)
-+1 GenericInvestmentStorageBlock_old(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_old(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)_:
@@ -276,9 +276,9 @@ c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_old_rule(storage1_0)_:
-+1 GenericInvestmentStorageBlock_old(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)_:
@@ -294,128 +294,128 @@ c_e_GenericInvestmentStorageBlock_old_rule(storage1_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_balance(storage1_0_1)_:
--0.87 GenericInvestmentStorageBlock_storage_content(storage1_0)
-+1 GenericInvestmentStorageBlock_storage_content(storage1_1)
--0.96999999999999997 flow(electricityBus_storage1_0_1)
+-0.97 flow(electricityBus_storage1_0_1)
 +1.1627906976744187 flow(storage1_electricityBus_0_1)
++1 GenericInvestmentStorageBlock_storage_content(storage1_1)
+-0.87 GenericInvestmentStorageBlock_storage_content(storage1_0)
 = 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.96999999999999997 flow(electricityBus_storage1_1_2)
-+1.1627906976744187 flow(storage1_electricityBus_1_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.96999999999999997 flow(electricityBus_storage1_1_3)
-+1.1627906976744187 flow(storage1_electricityBus_1_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.96999999999999997 flow(electricityBus_storage1_2_4)
-+1.1627906976744187 flow(storage1_electricityBus_2_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.96999999999999997 flow(electricityBus_storage1_2_5)
-+1.1627906976744187 flow(storage1_electricityBus_2_5)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_0)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 +1 InvestmentFlowBlock_total(electricityBus_storage1_0)
+-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_1)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_1)
 +1 InvestmentFlowBlock_total(electricityBus_storage1_1)
+-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_1)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_2)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_2)
 +1 InvestmentFlowBlock_total(electricityBus_storage1_2)
+-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_0)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 +1 InvestmentFlowBlock_total(storage1_electricityBus_0)
+-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_0)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_1)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_1)
 +1 InvestmentFlowBlock_total(storage1_electricityBus_1)
+-0.16666666666666666 GenericInvestmentStorageBlock_total(storage1_1)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_2)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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.90000000000000002 GenericInvestmentStorageBlock_total(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.90000000000000002 GenericInvestmentStorageBlock_total(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_2)_:
+-0.9 GenericInvestmentStorageBlock_total(storage1_1)
 +1 GenericInvestmentStorageBlock_storage_content(storage1_2)
--0.90000000000000002 GenericInvestmentStorageBlock_total(storage1_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_3)_:
+-0.9 GenericInvestmentStorageBlock_total(storage1_1)
 +1 GenericInvestmentStorageBlock_storage_content(storage1_3)
--0.90000000000000002 GenericInvestmentStorageBlock_total(storage1_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_4)_:
+-0.9 GenericInvestmentStorageBlock_total(storage1_2)
 +1 GenericInvestmentStorageBlock_storage_content(storage1_4)
--0.90000000000000002 GenericInvestmentStorageBlock_total(storage1_2)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_5)_:
+-0.9 GenericInvestmentStorageBlock_total(storage1_2)
 +1 GenericInvestmentStorageBlock_storage_content(storage1_5)
--0.90000000000000002 GenericInvestmentStorageBlock_total(storage1_2)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_0_0)_:
++0.1 GenericInvestmentStorageBlock_total(storage1_0)
 -1 GenericInvestmentStorageBlock_storage_content(storage1_0)
-+0.10000000000000001 GenericInvestmentStorageBlock_total(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.10000000000000001 GenericInvestmentStorageBlock_total(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_1_2)_:
++0.1 GenericInvestmentStorageBlock_total(storage1_1)
 -1 GenericInvestmentStorageBlock_storage_content(storage1_2)
-+0.10000000000000001 GenericInvestmentStorageBlock_total(storage1_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_1_3)_:
++0.1 GenericInvestmentStorageBlock_total(storage1_1)
 -1 GenericInvestmentStorageBlock_storage_content(storage1_3)
-+0.10000000000000001 GenericInvestmentStorageBlock_total(storage1_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_2_4)_:
++0.1 GenericInvestmentStorageBlock_total(storage1_2)
 -1 GenericInvestmentStorageBlock_storage_content(storage1_4)
-+0.10000000000000001 GenericInvestmentStorageBlock_total(storage1_2)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_min_storage_content(storage1_2_5)_:
++0.1 GenericInvestmentStorageBlock_total(storage1_2)
 -1 GenericInvestmentStorageBlock_storage_content(storage1_5)
-+0.10000000000000001 GenericInvestmentStorageBlock_total(storage1_2)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_overall_storage_maximum(storage1_0)_:
@@ -434,9 +434,6 @@ c_l_GenericInvestmentStorageBlock_overall_minimum(storage1)_:
 +1 GenericInvestmentStorageBlock_total(storage1_2)
 >= 2
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
    0 <= flow(electricityBus_storage1_0_0) <= +inf
    0 <= flow(electricityBus_storage1_0_1) <= +inf
@@ -450,23 +447,24 @@ bounds
    0 <= flow(storage1_electricityBus_1_3) <= +inf
    0 <= flow(storage1_electricityBus_2_4) <= +inf
    0 <= flow(storage1_electricityBus_2_5) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage1_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage1_2) <= +inf
-   0 <= InvestmentFlowBlock_invest(storage1_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(storage1_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(storage1_electricityBus_2) <= +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_total(storage1_electricityBus_2) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_storage1_0) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_storage1_1) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_storage1_2) <= +inf
-   0 <= InvestmentFlowBlock_old(storage1_electricityBus_0) <= +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
@@ -480,20 +478,12 @@ bounds
    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 <= 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
-   0 <= GenericInvestmentStorageBlock_invest(storage1_0) <= 234
-   0 <= GenericInvestmentStorageBlock_invest(storage1_1) <= 234
-   0 <= GenericInvestmentStorageBlock_invest(storage1_2) <= 234
+   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_total(storage1_2) <= +inf
-   0 <= GenericInvestmentStorageBlock_old(storage1_0) <= +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
@@ -501,4 +491,11 @@ bounds
    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_1) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage1_0) <= +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 ea333919..27a460ba 100644
--- a/tests/lp_files/storage_invest_2.lp
+++ b/tests/lp_files/storage_invest_2.lp
@@ -2,25 +2,25 @@
 
 min 
 objective:
-+145 GenericInvestmentStorageBlock_invest(storage2_0)
 +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_0)_:
--1 flow(electricityBus_storage2_0_0)
 +1 flow(storage2_electricityBus_0_0)
+-1 flow(electricityBus_storage2_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage2_0_1)
 +1 flow(storage2_electricityBus_0_1)
+-1 flow(electricityBus_storage2_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
--1 flow(electricityBus_storage2_0_2)
 +1 flow(storage2_electricityBus_0_2)
+-1 flow(electricityBus_storage2_0_2)
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_storage2_0)_:
@@ -34,33 +34,33 @@ c_e_InvestmentFlowBlock_total_rule(storage2_electricityBus_0)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage2_0_0)_:
--1 InvestmentFlowBlock_total(electricityBus_storage2_0)
 +1 flow(electricityBus_storage2_0_0)
+-1 InvestmentFlowBlock_total(electricityBus_storage2_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage2_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage2_0)
 +1 flow(electricityBus_storage2_0_1)
+-1 InvestmentFlowBlock_total(electricityBus_storage2_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage2_0_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage2_0)
 +1 flow(electricityBus_storage2_0_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage2_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage2_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage2_electricityBus_0)
 +1 flow(storage2_electricityBus_0_0)
+-1 InvestmentFlowBlock_total(storage2_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage2_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage2_electricityBus_0)
 +1 flow(storage2_electricityBus_0_1)
+-1 InvestmentFlowBlock_total(storage2_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage2_electricityBus_0_2)_:
--1 InvestmentFlowBlock_total(storage2_electricityBus_0)
 +1 flow(storage2_electricityBus_0_2)
+-1 InvestmentFlowBlock_total(storage2_electricityBus_0)
 <= 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage2_0)_:
@@ -69,29 +69,29 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage2_0)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_init_content_fix(storage2)_:
-+1 GenericInvestmentStorageBlock_init_content(storage2)
 -0.5 GenericInvestmentStorageBlock_invest(storage2_0)
++1 GenericInvestmentStorageBlock_init_content(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_0)
-+1 flow(storage2_electricityBus_0_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)
--1 flow(electricityBus_storage2_0_1)
-+1 flow(storage2_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1 flow(storage2_electricityBus_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage2)_:
@@ -100,38 +100,35 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage2)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage2_0)
 -1 GenericInvestmentStorageBlock_total(storage2_0)
++1 GenericInvestmentStorageBlock_storage_content(storage2_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage2_1)
 -1 GenericInvestmentStorageBlock_total(storage2_0)
++1 GenericInvestmentStorageBlock_storage_content(storage2_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_0_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage2_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_0) <= +inf
-   0 <= flow(electricityBus_storage2_0_1) <= +inf
-   0 <= flow(electricityBus_storage2_0_2) <= +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 <= InvestmentFlowBlock_invest(electricityBus_storage2_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(storage2_electricityBus_0) <= +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_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_total(storage2_0) <= +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
index a6ad6f15..3c1e1d05 100644
--- a/tests/lp_files/storage_invest_2_multi_period.lp
+++ b/tests/lp_files/storage_invest_2_multi_period.lp
@@ -2,46 +2,46 @@
 
 min 
 objective:
-+177.35448256334197 GenericInvestmentStorageBlock_invest(storage2_0)
-+173.87694368955096 GenericInvestmentStorageBlock_invest(storage2_1)
-+170.46759185250093 GenericInvestmentStorageBlock_invest(storage2_2)
 +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(electricityBus_storage2_0_0)
 +1 flow(storage2_electricityBus_0_0)
+-1 flow(electricityBus_storage2_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage2_0_1)
 +1 flow(storage2_electricityBus_0_1)
+-1 flow(electricityBus_storage2_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_2)_:
--1 flow(electricityBus_storage2_1_2)
 +1 flow(storage2_electricityBus_1_2)
+-1 flow(electricityBus_storage2_1_2)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_3)_:
--1 flow(electricityBus_storage2_1_3)
 +1 flow(storage2_electricityBus_1_3)
+-1 flow(electricityBus_storage2_1_3)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_4)_:
--1 flow(electricityBus_storage2_2_4)
 +1 flow(storage2_electricityBus_2_4)
+-1 flow(electricityBus_storage2_2_4)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_5)_:
--1 flow(electricityBus_storage2_2_5)
 +1 flow(storage2_electricityBus_2_5)
+-1 flow(electricityBus_storage2_2_5)
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_storage2_0)_:
@@ -51,16 +51,16 @@ c_e_InvestmentFlowBlock_total_rule(electricityBus_storage2_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_storage2_1)_:
 -1 InvestmentFlowBlock_invest(electricityBus_storage2_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -70,16 +70,16 @@ c_e_InvestmentFlowBlock_total_rule(storage2_electricityBus_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(storage2_electricityBus_1)_:
 -1 InvestmentFlowBlock_invest(storage2_electricityBus_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -131,9 +131,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(storage2_electricityBus_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(electricityBus_storage2_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -149,9 +149,9 @@ c_e_InvestmentFlowBlock_old_rule(electricityBus_storage2_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(storage2_electricityBus_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -167,63 +167,63 @@ c_e_InvestmentFlowBlock_old_rule(storage2_electricityBus_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage2_0_0)_:
--1 InvestmentFlowBlock_total(electricityBus_storage2_0)
 +1 flow(electricityBus_storage2_0_0)
+-1 InvestmentFlowBlock_total(electricityBus_storage2_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage2_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage2_0)
 +1 flow(electricityBus_storage2_0_1)
+-1 InvestmentFlowBlock_total(electricityBus_storage2_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage2_1_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage2_1)
 +1 flow(electricityBus_storage2_1_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage2_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage2_1_3)_:
--1 InvestmentFlowBlock_total(electricityBus_storage2_1)
 +1 flow(electricityBus_storage2_1_3)
+-1 InvestmentFlowBlock_total(electricityBus_storage2_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage2_2_4)_:
--1 InvestmentFlowBlock_total(electricityBus_storage2_2)
 +1 flow(electricityBus_storage2_2_4)
+-1 InvestmentFlowBlock_total(electricityBus_storage2_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage2_2_5)_:
--1 InvestmentFlowBlock_total(electricityBus_storage2_2)
 +1 flow(electricityBus_storage2_2_5)
+-1 InvestmentFlowBlock_total(electricityBus_storage2_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage2_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage2_electricityBus_0)
 +1 flow(storage2_electricityBus_0_0)
+-1 InvestmentFlowBlock_total(storage2_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage2_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage2_electricityBus_0)
 +1 flow(storage2_electricityBus_0_1)
+-1 InvestmentFlowBlock_total(storage2_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage2_electricityBus_1_2)_:
--1 InvestmentFlowBlock_total(storage2_electricityBus_1)
 +1 flow(storage2_electricityBus_1_2)
+-1 InvestmentFlowBlock_total(storage2_electricityBus_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage2_electricityBus_1_3)_:
--1 InvestmentFlowBlock_total(storage2_electricityBus_1)
 +1 flow(storage2_electricityBus_1_3)
+-1 InvestmentFlowBlock_total(storage2_electricityBus_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage2_electricityBus_2_4)_:
--1 InvestmentFlowBlock_total(storage2_electricityBus_2)
 +1 flow(storage2_electricityBus_2_4)
+-1 InvestmentFlowBlock_total(storage2_electricityBus_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage2_electricityBus_2_5)_:
--1 InvestmentFlowBlock_total(storage2_electricityBus_2)
 +1 flow(storage2_electricityBus_2_5)
+-1 InvestmentFlowBlock_total(storage2_electricityBus_2)
 <= 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage2_0)_:
@@ -233,16 +233,16 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage2_0)_:
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage2_1)_:
 -1 GenericInvestmentStorageBlock_invest(storage2_1)
-+1 GenericInvestmentStorageBlock_old(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_old(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)_:
@@ -270,9 +270,9 @@ c_e_GenericInvestmentStorageBlock_old_rule_exo(storage2_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_old_rule(storage2_0)_:
-+1 GenericInvestmentStorageBlock_old(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)_:
@@ -288,103 +288,101 @@ c_e_GenericInvestmentStorageBlock_old_rule(storage2_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_balance(storage2_0_1)_:
--1 GenericInvestmentStorageBlock_storage_content(storage2_0)
-+1 GenericInvestmentStorageBlock_storage_content(storage2_1)
--1 flow(electricityBus_storage2_0_1)
 +1 flow(storage2_electricityBus_0_1)
+-1 flow(electricityBus_storage2_0_1)
++1 GenericInvestmentStorageBlock_storage_content(storage2_1)
+-1 GenericInvestmentStorageBlock_storage_content(storage2_0)
 = 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)
--1 flow(electricityBus_storage2_1_2)
-+1 flow(storage2_electricityBus_1_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)
--1 flow(electricityBus_storage2_1_3)
-+1 flow(storage2_electricityBus_1_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)
--1 flow(electricityBus_storage2_2_4)
-+1 flow(storage2_electricityBus_2_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)
--1 flow(electricityBus_storage2_2_5)
-+1 flow(storage2_electricityBus_2_5)
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage2_0)
 -1 GenericInvestmentStorageBlock_total(storage2_0)
++1 GenericInvestmentStorageBlock_storage_content(storage2_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage2_1)
 -1 GenericInvestmentStorageBlock_total(storage2_0)
++1 GenericInvestmentStorageBlock_storage_content(storage2_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_1_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage2_2)
 -1 GenericInvestmentStorageBlock_total(storage2_1)
++1 GenericInvestmentStorageBlock_storage_content(storage2_2)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_1_3)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage2_3)
 -1 GenericInvestmentStorageBlock_total(storage2_1)
++1 GenericInvestmentStorageBlock_storage_content(storage2_3)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_2_4)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage2_4)
 -1 GenericInvestmentStorageBlock_total(storage2_2)
++1 GenericInvestmentStorageBlock_storage_content(storage2_4)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage2_2_5)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage2_5)
 -1 GenericInvestmentStorageBlock_total(storage2_2)
++1 GenericInvestmentStorageBlock_storage_content(storage2_5)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_storage2_0_0) <= +inf
-   0 <= flow(electricityBus_storage2_0_1) <= +inf
-   0 <= flow(electricityBus_storage2_1_2) <= +inf
-   0 <= flow(electricityBus_storage2_1_3) <= +inf
-   0 <= flow(electricityBus_storage2_2_4) <= +inf
-   0 <= flow(electricityBus_storage2_2_5) <= +inf
-   0 <= flow(storage2_electricityBus_0_0) <= +inf
-   0 <= flow(storage2_electricityBus_0_1) <= +inf
-   0 <= flow(storage2_electricityBus_1_2) <= +inf
-   0 <= flow(storage2_electricityBus_1_3) <= +inf
-   0 <= flow(storage2_electricityBus_2_4) <= +inf
-   0 <= flow(storage2_electricityBus_2_5) <= +inf
    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_total(storage2_electricityBus_2) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_storage2_0) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_storage2_1) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_storage2_2) <= +inf
-   0 <= InvestmentFlowBlock_old(storage2_electricityBus_0) <= +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
@@ -398,20 +396,12 @@ bounds
    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 <= 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
-   0 <= GenericInvestmentStorageBlock_invest(storage2_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_invest(storage2_1) <= +inf
-   0 <= GenericInvestmentStorageBlock_invest(storage2_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_total(storage2_2) <= +inf
-   0 <= GenericInvestmentStorageBlock_old(storage2_0) <= +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
@@ -419,4 +409,11 @@ bounds
    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_1) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage2_0) <= +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 db800d0e..589d7e81 100644
--- a/tests/lp_files/storage_invest_3.lp
+++ b/tests/lp_files/storage_invest_3.lp
@@ -2,29 +2,24 @@
 
 min 
 objective:
-+99 InvestmentFlowBlock_invest(electricityBus_storage3_0)
 +9 InvestmentFlowBlock_invest(storage3_electricityBus_0)
++99 InvestmentFlowBlock_invest(electricityBus_storage3_0)
 
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage3_0_0)
 +1 flow(storage3_electricityBus_0_0)
+-1 flow(electricityBus_storage3_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage3_0_1)
 +1 flow(storage3_electricityBus_0_1)
+-1 flow(electricityBus_storage3_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
--1 flow(electricityBus_storage3_0_2)
 +1 flow(storage3_electricityBus_0_2)
-= 0
-
-c_e_InvestmentFlowBlock_total_rule(electricityBus_storage3_0)_:
--1 InvestmentFlowBlock_invest(electricityBus_storage3_0)
-+1 InvestmentFlowBlock_total(electricityBus_storage3_0)
+-1 flow(electricityBus_storage3_0_2)
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(storage3_electricityBus_0)_:
@@ -32,55 +27,60 @@ c_e_InvestmentFlowBlock_total_rule(storage3_electricityBus_0)_:
 +1 InvestmentFlowBlock_total(storage3_electricityBus_0)
 = 0
 
-c_u_InvestmentFlowBlock_max(electricityBus_storage3_0_0)_:
--1 InvestmentFlowBlock_total(electricityBus_storage3_0)
-+1 flow(electricityBus_storage3_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage3_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage3_0)
-+1 flow(electricityBus_storage3_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage3_0_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage3_0)
-+1 flow(electricityBus_storage3_0_2)
-<= 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 InvestmentFlowBlock_total(storage3_electricityBus_0)
 +1 flow(storage3_electricityBus_0_0)
+-1 InvestmentFlowBlock_total(storage3_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage3_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage3_electricityBus_0)
 +1 flow(storage3_electricityBus_0_1)
+-1 InvestmentFlowBlock_total(storage3_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage3_electricityBus_0_2)_:
--1 InvestmentFlowBlock_total(storage3_electricityBus_0)
 +1 flow(storage3_electricityBus_0_2)
+-1 InvestmentFlowBlock_total(storage3_electricityBus_0)
+<= 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_0_2)_:
++1 flow(electricityBus_storage3_0_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage3_0)
 <= 0
 
 c_e_GenericStorageBlock_balance(storage3_0_0)_:
--1 GenericStorageBlock_storage_content(storage3_0)
-+1 GenericStorageBlock_storage_content(storage3_1)
--1 flow(electricityBus_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)
--1 flow(electricityBus_storage3_0_1)
-+1 flow(storage3_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1 flow(storage3_electricityBus_0_2)
 = 0
 
 c_e_GenericStorageBlock_balanced_cstr(storage3)_:
@@ -88,22 +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_0) <= +inf
-   0 <= flow(electricityBus_storage3_0_1) <= +inf
-   0 <= flow(electricityBus_storage3_0_2) <= +inf
+   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 <= InvestmentFlowBlock_invest(electricityBus_storage3_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(storage3_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_total(electricityBus_storage3_0) <= +inf
+   0 <= flow(electricityBus_storage3_0_2) <= +inf
    0 <= InvestmentFlowBlock_total(storage3_electricityBus_0) <= +inf
-   0 <= GenericStorageBlock_storage_content(storage3_0) <= 5000
+   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
index c16cf5c7..51410232 100644
--- a/tests/lp_files/storage_invest_3_multi_period.lp
+++ b/tests/lp_files/storage_invest_3_multi_period.lp
@@ -2,43 +2,62 @@
 
 min 
 objective:
-+101.97980198019803 InvestmentFlowBlock_invest(electricityBus_storage3_0)
-+99.980198019801989 InvestmentFlowBlock_invest(electricityBus_storage3_1)
-+98.019801980198025 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)
++101.97980198019803 InvestmentFlowBlock_invest(electricityBus_storage3_0)
++99.98019801980199 InvestmentFlowBlock_invest(electricityBus_storage3_1)
++98.01980198019803 InvestmentFlowBlock_invest(electricityBus_storage3_2)
 
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage3_0_0)
 +1 flow(storage3_electricityBus_0_0)
+-1 flow(electricityBus_storage3_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage3_0_1)
 +1 flow(storage3_electricityBus_0_1)
+-1 flow(electricityBus_storage3_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_2)_:
--1 flow(electricityBus_storage3_1_2)
 +1 flow(storage3_electricityBus_1_2)
+-1 flow(electricityBus_storage3_1_2)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_3)_:
--1 flow(electricityBus_storage3_1_3)
 +1 flow(storage3_electricityBus_1_3)
+-1 flow(electricityBus_storage3_1_3)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_4)_:
--1 flow(electricityBus_storage3_2_4)
 +1 flow(storage3_electricityBus_2_4)
+-1 flow(electricityBus_storage3_2_4)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_5)_:
--1 flow(electricityBus_storage3_2_5)
 +1 flow(storage3_electricityBus_2_5)
+-1 flow(electricityBus_storage3_2_5)
+= 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_total_rule(electricityBus_storage3_0)_:
@@ -48,35 +67,28 @@ c_e_InvestmentFlowBlock_total_rule(electricityBus_storage3_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_storage3_1)_:
 -1 InvestmentFlowBlock_invest(electricityBus_storage3_1)
-+1 InvestmentFlowBlock_old(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_old(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)
+c_e_InvestmentFlowBlock_old_rule_end(storage3_electricityBus_0)_:
++1 InvestmentFlowBlock_old_end(storage3_electricityBus_0)
 = 0
 
-c_e_InvestmentFlowBlock_total_rule(storage3_electricityBus_1)_:
--1 InvestmentFlowBlock_invest(storage3_electricityBus_1)
-+1 InvestmentFlowBlock_old(storage3_electricityBus_1)
--1 InvestmentFlowBlock_total(storage3_electricityBus_0)
-+1 InvestmentFlowBlock_total(storage3_electricityBus_1)
+c_e_InvestmentFlowBlock_old_rule_end(storage3_electricityBus_1)_:
++1 InvestmentFlowBlock_old_end(storage3_electricityBus_1)
 = 0
 
-c_e_InvestmentFlowBlock_total_rule(storage3_electricityBus_2)_:
--1 InvestmentFlowBlock_invest(storage3_electricityBus_2)
-+1 InvestmentFlowBlock_old(storage3_electricityBus_2)
--1 InvestmentFlowBlock_total(storage3_electricityBus_1)
-+1 InvestmentFlowBlock_total(storage3_electricityBus_2)
+c_e_InvestmentFlowBlock_old_rule_end(storage3_electricityBus_2)_:
++1 InvestmentFlowBlock_old_end(storage3_electricityBus_2)
 = 0
 
 c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage3_0)_:
@@ -92,16 +104,16 @@ c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage3_2)_:
 +1 InvestmentFlowBlock_old_end(electricityBus_storage3_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(storage3_electricityBus_0)_:
-+1 InvestmentFlowBlock_old_end(storage3_electricityBus_0)
+c_e_InvestmentFlowBlock_old_rule_exo(storage3_electricityBus_0)_:
++1 InvestmentFlowBlock_old_exo(storage3_electricityBus_0)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(storage3_electricityBus_1)_:
-+1 InvestmentFlowBlock_old_end(storage3_electricityBus_1)
+c_e_InvestmentFlowBlock_old_rule_exo(storage3_electricityBus_1)_:
++1 InvestmentFlowBlock_old_exo(storage3_electricityBus_1)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(storage3_electricityBus_2)_:
-+1 InvestmentFlowBlock_old_end(storage3_electricityBus_2)
+c_e_InvestmentFlowBlock_old_rule_exo(storage3_electricityBus_2)_:
++1 InvestmentFlowBlock_old_exo(storage3_electricityBus_2)
 = 0
 
 c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage3_0)_:
@@ -116,22 +128,28 @@ 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)
+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_exo(storage3_electricityBus_1)_:
-+1 InvestmentFlowBlock_old_exo(storage3_electricityBus_1)
+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_exo(storage3_electricityBus_2)_:
-+1 InvestmentFlowBlock_old_exo(storage3_electricityBus_2)
+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_e_InvestmentFlowBlock_old_rule(electricityBus_storage3_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -146,124 +164,106 @@ c_e_InvestmentFlowBlock_old_rule(electricityBus_storage3_2)_:
 -1 InvestmentFlowBlock_old_exo(electricityBus_storage3_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule(storage3_electricityBus_0)_:
-+1 InvestmentFlowBlock_old(storage3_electricityBus_0)
--1 InvestmentFlowBlock_old_end(storage3_electricityBus_0)
--1 InvestmentFlowBlock_old_exo(storage3_electricityBus_0)
-= 0
+c_u_InvestmentFlowBlock_max(storage3_electricityBus_0_0)_:
++1 flow(storage3_electricityBus_0_0)
+-1 InvestmentFlowBlock_total(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_u_InvestmentFlowBlock_max(storage3_electricityBus_0_1)_:
++1 flow(storage3_electricityBus_0_1)
+-1 InvestmentFlowBlock_total(storage3_electricityBus_0)
+<= 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(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_u_InvestmentFlowBlock_max(electricityBus_storage3_0_0)_:
--1 InvestmentFlowBlock_total(electricityBus_storage3_0)
 +1 flow(electricityBus_storage3_0_0)
+-1 InvestmentFlowBlock_total(electricityBus_storage3_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage3_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage3_0)
 +1 flow(electricityBus_storage3_0_1)
+-1 InvestmentFlowBlock_total(electricityBus_storage3_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage3_1_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage3_1)
 +1 flow(electricityBus_storage3_1_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage3_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage3_1_3)_:
--1 InvestmentFlowBlock_total(electricityBus_storage3_1)
 +1 flow(electricityBus_storage3_1_3)
+-1 InvestmentFlowBlock_total(electricityBus_storage3_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage3_2_4)_:
--1 InvestmentFlowBlock_total(electricityBus_storage3_2)
 +1 flow(electricityBus_storage3_2_4)
+-1 InvestmentFlowBlock_total(electricityBus_storage3_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage3_2_5)_:
--1 InvestmentFlowBlock_total(electricityBus_storage3_2)
 +1 flow(electricityBus_storage3_2_5)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage3_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage3_electricityBus_0)
-+1 flow(storage3_electricityBus_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage3_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage3_electricityBus_0)
-+1 flow(storage3_electricityBus_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage3_electricityBus_1_2)_:
--1 InvestmentFlowBlock_total(storage3_electricityBus_1)
-+1 flow(storage3_electricityBus_1_2)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage3_electricityBus_1_3)_:
--1 InvestmentFlowBlock_total(storage3_electricityBus_1)
-+1 flow(storage3_electricityBus_1_3)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage3_electricityBus_2_4)_:
--1 InvestmentFlowBlock_total(storage3_electricityBus_2)
-+1 flow(storage3_electricityBus_2_4)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage3_electricityBus_2_5)_:
--1 InvestmentFlowBlock_total(storage3_electricityBus_2)
-+1 flow(storage3_electricityBus_2_5)
+-1 InvestmentFlowBlock_total(electricityBus_storage3_2)
 <= 0
 
 c_e_GenericStorageBlock_balance(storage3_0_0)_:
--1 GenericStorageBlock_storage_content(storage3_0)
-+1 GenericStorageBlock_storage_content(storage3_1)
--1 flow(electricityBus_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)
--1 flow(electricityBus_storage3_0_1)
-+1 flow(storage3_electricityBus_0_1)
 = 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)
--1 flow(electricityBus_storage3_1_2)
-+1 flow(storage3_electricityBus_1_2)
 = 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)
--1 flow(electricityBus_storage3_1_3)
-+1 flow(storage3_electricityBus_1_3)
 = 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)
--1 flow(electricityBus_storage3_2_4)
-+1 flow(storage3_electricityBus_2_4)
 = 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)
--1 flow(electricityBus_storage3_2_5)
-+1 flow(storage3_electricityBus_2_5)
 = 0
 
 c_e_GenericStorageBlock_balanced_cstr(storage3)_:
@@ -271,54 +271,51 @@ c_e_GenericStorageBlock_balanced_cstr(storage3)_:
 +1 GenericStorageBlock_storage_content(storage3_6)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_storage3_0_0) <= +inf
-   0 <= flow(electricityBus_storage3_0_1) <= +inf
-   0 <= flow(electricityBus_storage3_1_2) <= +inf
-   0 <= flow(electricityBus_storage3_1_3) <= +inf
-   0 <= flow(electricityBus_storage3_2_4) <= +inf
-   0 <= flow(electricityBus_storage3_2_5) <= +inf
+   0 <= InvestmentFlowBlock_invest(storage3_electricityBus_0) <= +inf
+   0 <= InvestmentFlowBlock_invest(storage3_electricityBus_1) <= +inf
+   0 <= InvestmentFlowBlock_invest(storage3_electricityBus_2) <= +inf
+   0 <= InvestmentFlowBlock_invest(electricityBus_storage3_0) <= +inf
+   0 <= InvestmentFlowBlock_invest(electricityBus_storage3_1) <= +inf
+   0 <= InvestmentFlowBlock_invest(electricityBus_storage3_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 <= 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 <= InvestmentFlowBlock_total(electricityBus_storage3_0) <= +inf
-   0 <= InvestmentFlowBlock_total(electricityBus_storage3_1) <= +inf
-   0 <= InvestmentFlowBlock_total(electricityBus_storage3_2) <= +inf
+   0 <= flow(electricityBus_storage3_2_5) <= +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(electricityBus_storage3_0) <= +inf
+   0 <= InvestmentFlowBlock_old(storage3_electricityBus_2) <= +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_old(storage3_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_old(storage3_electricityBus_1) <= +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_end(electricityBus_storage3_0) <= +inf
+   0 <= InvestmentFlowBlock_old_end(electricityBus_storage3_1) <= +inf
+   0 <= InvestmentFlowBlock_old_end(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 <= GenericStorageBlock_storage_content(storage3_0) <= 5000
+   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(storage3_electricityBus_0) <= +inf
+   0 <= InvestmentFlowBlock_old(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
    0 <= GenericStorageBlock_storage_content(storage3_4) <= 5000
diff --git a/tests/lp_files/storage_invest_4.lp b/tests/lp_files/storage_invest_4.lp
index bc71d372..66fa233a 100644
--- a/tests/lp_files/storage_invest_4.lp
+++ b/tests/lp_files/storage_invest_4.lp
@@ -7,18 +7,18 @@ objective:
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage4_0_0)
 +1 flow(storage4_electricityBus_0_0)
+-1 flow(electricityBus_storage4_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage4_0_1)
 +1 flow(storage4_electricityBus_0_1)
+-1 flow(electricityBus_storage4_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
--1 flow(electricityBus_storage4_0_2)
 +1 flow(storage4_electricityBus_0_2)
+-1 flow(electricityBus_storage4_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage4_0)_:
@@ -27,29 +27,29 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage4_0)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_init_content_limit(storage4)_:
-+1 GenericInvestmentStorageBlock_init_content(storage4)
 -1 GenericInvestmentStorageBlock_invest(storage4_0)
++1 GenericInvestmentStorageBlock_init_content(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_0)
-+1 flow(storage4_electricityBus_0_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)
--1 flow(electricityBus_storage4_0_1)
-+1 flow(storage4_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1 flow(storage4_electricityBus_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage4)_:
@@ -58,34 +58,31 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage4)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage4_0)
 -1 GenericInvestmentStorageBlock_total(storage4_0)
++1 GenericInvestmentStorageBlock_storage_content(storage4_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage4_1)
 -1 GenericInvestmentStorageBlock_total(storage4_0)
++1 GenericInvestmentStorageBlock_storage_content(storage4_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_0_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage4_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_0) <= 80
-   0 <= flow(electricityBus_storage4_0_1) <= 80
-   0 <= flow(electricityBus_storage4_0_2) <= 80
+   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_0) <= 500
-   0 <= GenericInvestmentStorageBlock_total(storage4_0) <= +inf
-   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
index a3243521..75b419e4 100644
--- a/tests/lp_files/storage_invest_4_multi_period.lp
+++ b/tests/lp_files/storage_invest_4_multi_period.lp
@@ -4,38 +4,38 @@ min
 objective:
 +149.3643564356436 GenericInvestmentStorageBlock_invest(storage4_0)
 +146.43564356435647 GenericInvestmentStorageBlock_invest(storage4_1)
-+143.56435643564359 GenericInvestmentStorageBlock_invest(storage4_2)
++143.5643564356436 GenericInvestmentStorageBlock_invest(storage4_2)
 
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage4_0_0)
 +1 flow(storage4_electricityBus_0_0)
+-1 flow(electricityBus_storage4_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage4_0_1)
 +1 flow(storage4_electricityBus_0_1)
+-1 flow(electricityBus_storage4_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_2)_:
--1 flow(electricityBus_storage4_1_2)
 +1 flow(storage4_electricityBus_1_2)
+-1 flow(electricityBus_storage4_1_2)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_3)_:
--1 flow(electricityBus_storage4_1_3)
 +1 flow(storage4_electricityBus_1_3)
+-1 flow(electricityBus_storage4_1_3)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_4)_:
--1 flow(electricityBus_storage4_2_4)
 +1 flow(storage4_electricityBus_2_4)
+-1 flow(electricityBus_storage4_2_4)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_5)_:
--1 flow(electricityBus_storage4_2_5)
 +1 flow(storage4_electricityBus_2_5)
+-1 flow(electricityBus_storage4_2_5)
 = 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage4_0)_:
@@ -45,16 +45,16 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage4_0)_:
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage4_1)_:
 -1 GenericInvestmentStorageBlock_invest(storage4_1)
-+1 GenericInvestmentStorageBlock_old(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_old(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)_:
@@ -83,9 +83,9 @@ c_e_GenericInvestmentStorageBlock_old_rule_exo(storage4_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_old_rule(storage4_0)_:
-+1 GenericInvestmentStorageBlock_old(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)_:
@@ -101,100 +101,90 @@ c_e_GenericInvestmentStorageBlock_old_rule(storage4_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_balance(storage4_0_1)_:
--1 GenericInvestmentStorageBlock_storage_content(storage4_0)
-+1 GenericInvestmentStorageBlock_storage_content(storage4_1)
--1 flow(electricityBus_storage4_0_1)
 +1 flow(storage4_electricityBus_0_1)
+-1 flow(electricityBus_storage4_0_1)
++1 GenericInvestmentStorageBlock_storage_content(storage4_1)
+-1 GenericInvestmentStorageBlock_storage_content(storage4_0)
 = 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)
--1 flow(electricityBus_storage4_1_2)
-+1 flow(storage4_electricityBus_1_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)
--1 flow(electricityBus_storage4_1_3)
-+1 flow(storage4_electricityBus_1_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)
--1 flow(electricityBus_storage4_2_4)
-+1 flow(storage4_electricityBus_2_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)
--1 flow(electricityBus_storage4_2_5)
-+1 flow(storage4_electricityBus_2_5)
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage4_0)
 -1 GenericInvestmentStorageBlock_total(storage4_0)
++1 GenericInvestmentStorageBlock_storage_content(storage4_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage4_1)
 -1 GenericInvestmentStorageBlock_total(storage4_0)
++1 GenericInvestmentStorageBlock_storage_content(storage4_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_1_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage4_2)
 -1 GenericInvestmentStorageBlock_total(storage4_1)
++1 GenericInvestmentStorageBlock_storage_content(storage4_2)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_1_3)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage4_3)
 -1 GenericInvestmentStorageBlock_total(storage4_1)
++1 GenericInvestmentStorageBlock_storage_content(storage4_3)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_2_4)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage4_4)
 -1 GenericInvestmentStorageBlock_total(storage4_2)
++1 GenericInvestmentStorageBlock_storage_content(storage4_4)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage4_2_5)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage4_5)
 -1 GenericInvestmentStorageBlock_total(storage4_2)
++1 GenericInvestmentStorageBlock_storage_content(storage4_5)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_storage4_0_0) <= 80
-   0 <= flow(electricityBus_storage4_0_1) <= 80
-   0 <= flow(electricityBus_storage4_1_2) <= 80
-   0 <= flow(electricityBus_storage4_1_3) <= 80
-   0 <= flow(electricityBus_storage4_2_4) <= 80
-   0 <= flow(electricityBus_storage4_2_5) <= 80
+   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 <= 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
-   0 <= GenericInvestmentStorageBlock_invest(storage4_0) <= 500
-   0 <= GenericInvestmentStorageBlock_invest(storage4_1) <= 500
-   0 <= GenericInvestmentStorageBlock_invest(storage4_2) <= 500
+   0 <= flow(electricityBus_storage4_2_5) <= 80
    0 <= GenericInvestmentStorageBlock_total(storage4_0) <= +inf
    0 <= GenericInvestmentStorageBlock_total(storage4_1) <= +inf
-   0 <= GenericInvestmentStorageBlock_total(storage4_2) <= +inf
-   0 <= GenericInvestmentStorageBlock_old(storage4_0) <= +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
@@ -202,4 +192,11 @@ bounds
    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_1) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage4_0) <= +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 3347b434..853f833c 100644
--- a/tests/lp_files/storage_invest_5.lp
+++ b/tests/lp_files/storage_invest_5.lp
@@ -7,79 +7,79 @@ objective:
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage5_0_0)
 +1 flow(storage5_electricityBus_0_0)
+-1 flow(electricityBus_storage5_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage5_0_1)
 +1 flow(storage5_electricityBus_0_1)
+-1 flow(electricityBus_storage5_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
--1 flow(electricityBus_storage5_0_2)
 +1 flow(storage5_electricityBus_0_2)
+-1 flow(electricityBus_storage5_0_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(electricityBus_storage5_0)_:
 -1 InvestmentFlowBlock_invest(electricityBus_storage5_0)
 +1 InvestmentFlowBlock_total(electricityBus_storage5_0)
 = 110
 
-c_e_InvestmentFlowBlock_total_rule(storage5_electricityBus_0)_:
--1 InvestmentFlowBlock_invest(storage5_electricityBus_0)
-+1 InvestmentFlowBlock_total(storage5_electricityBus_0)
-= 100
+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 InvestmentFlowBlock_total(electricityBus_storage5_0)
 +1 flow(electricityBus_storage5_0_0)
+-1 InvestmentFlowBlock_total(electricityBus_storage5_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage5_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage5_0)
 +1 flow(electricityBus_storage5_0_1)
+-1 InvestmentFlowBlock_total(electricityBus_storage5_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage5_0_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage5_0)
 +1 flow(electricityBus_storage5_0_2)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage5_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage5_electricityBus_0)
-+1 flow(storage5_electricityBus_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage5_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage5_electricityBus_0)
-+1 flow(storage5_electricityBus_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage5_electricityBus_0_2)_:
--1 InvestmentFlowBlock_total(storage5_electricityBus_0)
-+1 flow(storage5_electricityBus_0_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage5_0)
 <= 0
 
 c_e_GenericStorageBlock_balance(storage5_0_0)_:
--1 GenericStorageBlock_storage_content(storage5_0)
-+1 GenericStorageBlock_storage_content(storage5_1)
--1 flow(electricityBus_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)
--1 flow(electricityBus_storage5_0_1)
-+1 flow(storage5_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1 flow(storage5_electricityBus_0_2)
 = 0
 
 c_e_GenericStorageBlock_balanced_cstr(storage5)_:
@@ -88,26 +88,23 @@ c_e_GenericStorageBlock_balanced_cstr(storage5)_:
 = 0
 
 c_e_GenericStorageBlock_power_coupled(storage5_0)_:
++1.1 InvestmentFlowBlock_total(storage5_electricityBus_0)
 -1 InvestmentFlowBlock_total(electricityBus_storage5_0)
-+1.1000000000000001 InvestmentFlowBlock_total(storage5_electricityBus_0)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_storage5_0_0) <= +inf
-   0 <= flow(electricityBus_storage5_0_1) <= +inf
-   0 <= flow(electricityBus_storage5_0_2) <= +inf
+   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 <= InvestmentFlowBlock_invest(electricityBus_storage5_0) <= +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 <= InvestmentFlowBlock_total(storage5_electricityBus_0) <= +inf
-   0 <= GenericStorageBlock_storage_content(storage5_0) <= 10000
    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
index e8df545e..ec6eebef 100644
--- a/tests/lp_files/storage_invest_5_multi_period.lp
+++ b/tests/lp_files/storage_invest_5_multi_period.lp
@@ -9,33 +9,52 @@ objective:
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage5_0_0)
 +1 flow(storage5_electricityBus_0_0)
+-1 flow(electricityBus_storage5_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage5_0_1)
 +1 flow(storage5_electricityBus_0_1)
+-1 flow(electricityBus_storage5_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_2)_:
--1 flow(electricityBus_storage5_1_2)
 +1 flow(storage5_electricityBus_1_2)
+-1 flow(electricityBus_storage5_1_2)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_3)_:
--1 flow(electricityBus_storage5_1_3)
 +1 flow(storage5_electricityBus_1_3)
+-1 flow(electricityBus_storage5_1_3)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_4)_:
--1 flow(electricityBus_storage5_2_4)
 +1 flow(storage5_electricityBus_2_4)
+-1 flow(electricityBus_storage5_2_4)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_5)_:
--1 flow(electricityBus_storage5_2_5)
 +1 flow(storage5_electricityBus_2_5)
+-1 flow(electricityBus_storage5_2_5)
+= 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_total_rule(electricityBus_storage5_0)_:
@@ -45,35 +64,28 @@ c_e_InvestmentFlowBlock_total_rule(electricityBus_storage5_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_storage5_1)_:
 -1 InvestmentFlowBlock_invest(electricityBus_storage5_1)
-+1 InvestmentFlowBlock_old(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_old(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_invest(storage5_electricityBus_0)
-+1 InvestmentFlowBlock_total(storage5_electricityBus_0)
-= 100
+c_e_InvestmentFlowBlock_old_rule_end(storage5_electricityBus_0)_:
++1 InvestmentFlowBlock_old_end(storage5_electricityBus_0)
+= 0
 
-c_e_InvestmentFlowBlock_total_rule(storage5_electricityBus_1)_:
--1 InvestmentFlowBlock_invest(storage5_electricityBus_1)
-+1 InvestmentFlowBlock_old(storage5_electricityBus_1)
--1 InvestmentFlowBlock_total(storage5_electricityBus_0)
-+1 InvestmentFlowBlock_total(storage5_electricityBus_1)
+c_e_InvestmentFlowBlock_old_rule_end(storage5_electricityBus_1)_:
++1 InvestmentFlowBlock_old_end(storage5_electricityBus_1)
 = 0
 
-c_e_InvestmentFlowBlock_total_rule(storage5_electricityBus_2)_:
--1 InvestmentFlowBlock_invest(storage5_electricityBus_2)
-+1 InvestmentFlowBlock_old(storage5_electricityBus_2)
--1 InvestmentFlowBlock_total(storage5_electricityBus_1)
-+1 InvestmentFlowBlock_total(storage5_electricityBus_2)
+c_e_InvestmentFlowBlock_old_rule_end(storage5_electricityBus_2)_:
++1 InvestmentFlowBlock_old_end(storage5_electricityBus_2)
 = 0
 
 c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage5_0)_:
@@ -88,16 +100,16 @@ 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)
+c_e_InvestmentFlowBlock_old_rule_exo(storage5_electricityBus_0)_:
++1 InvestmentFlowBlock_old_exo(storage5_electricityBus_0)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(storage5_electricityBus_1)_:
-+1 InvestmentFlowBlock_old_end(storage5_electricityBus_1)
+c_e_InvestmentFlowBlock_old_rule_exo(storage5_electricityBus_1)_:
++1 InvestmentFlowBlock_old_exo(storage5_electricityBus_1)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(storage5_electricityBus_2)_:
-+1 InvestmentFlowBlock_old_end(storage5_electricityBus_2)
+c_e_InvestmentFlowBlock_old_rule_exo(storage5_electricityBus_2)_:
++1 InvestmentFlowBlock_old_exo(storage5_electricityBus_2)
 = 0
 
 c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage5_0)_:
@@ -112,22 +124,28 @@ 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)
+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_exo(storage5_electricityBus_1)_:
-+1 InvestmentFlowBlock_old_exo(storage5_electricityBus_1)
+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_exo(storage5_electricityBus_2)_:
-+1 InvestmentFlowBlock_old_exo(storage5_electricityBus_2)
+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_e_InvestmentFlowBlock_old_rule(electricityBus_storage5_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -142,124 +160,106 @@ c_e_InvestmentFlowBlock_old_rule(electricityBus_storage5_2)_:
 -1 InvestmentFlowBlock_old_exo(electricityBus_storage5_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule(storage5_electricityBus_0)_:
-+1 InvestmentFlowBlock_old(storage5_electricityBus_0)
--1 InvestmentFlowBlock_old_end(storage5_electricityBus_0)
--1 InvestmentFlowBlock_old_exo(storage5_electricityBus_0)
-= 0
+c_u_InvestmentFlowBlock_max(storage5_electricityBus_0_0)_:
++1 flow(storage5_electricityBus_0_0)
+-1 InvestmentFlowBlock_total(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_u_InvestmentFlowBlock_max(storage5_electricityBus_0_1)_:
++1 flow(storage5_electricityBus_0_1)
+-1 InvestmentFlowBlock_total(storage5_electricityBus_0)
+<= 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(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_u_InvestmentFlowBlock_max(electricityBus_storage5_0_0)_:
--1 InvestmentFlowBlock_total(electricityBus_storage5_0)
 +1 flow(electricityBus_storage5_0_0)
+-1 InvestmentFlowBlock_total(electricityBus_storage5_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage5_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage5_0)
 +1 flow(electricityBus_storage5_0_1)
+-1 InvestmentFlowBlock_total(electricityBus_storage5_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage5_1_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage5_1)
 +1 flow(electricityBus_storage5_1_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage5_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage5_1_3)_:
--1 InvestmentFlowBlock_total(electricityBus_storage5_1)
 +1 flow(electricityBus_storage5_1_3)
+-1 InvestmentFlowBlock_total(electricityBus_storage5_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage5_2_4)_:
--1 InvestmentFlowBlock_total(electricityBus_storage5_2)
 +1 flow(electricityBus_storage5_2_4)
+-1 InvestmentFlowBlock_total(electricityBus_storage5_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage5_2_5)_:
--1 InvestmentFlowBlock_total(electricityBus_storage5_2)
 +1 flow(electricityBus_storage5_2_5)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage5_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage5_electricityBus_0)
-+1 flow(storage5_electricityBus_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage5_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage5_electricityBus_0)
-+1 flow(storage5_electricityBus_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage5_electricityBus_1_2)_:
--1 InvestmentFlowBlock_total(storage5_electricityBus_1)
-+1 flow(storage5_electricityBus_1_2)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage5_electricityBus_1_3)_:
--1 InvestmentFlowBlock_total(storage5_electricityBus_1)
-+1 flow(storage5_electricityBus_1_3)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage5_electricityBus_2_4)_:
--1 InvestmentFlowBlock_total(storage5_electricityBus_2)
-+1 flow(storage5_electricityBus_2_4)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage5_electricityBus_2_5)_:
--1 InvestmentFlowBlock_total(storage5_electricityBus_2)
-+1 flow(storage5_electricityBus_2_5)
+-1 InvestmentFlowBlock_total(electricityBus_storage5_2)
 <= 0
 
 c_e_GenericStorageBlock_balance(storage5_0_0)_:
--1 GenericStorageBlock_storage_content(storage5_0)
-+1 GenericStorageBlock_storage_content(storage5_1)
--1 flow(electricityBus_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)
--1 flow(electricityBus_storage5_0_1)
-+1 flow(storage5_electricityBus_0_1)
 = 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)
--1 flow(electricityBus_storage5_1_2)
-+1 flow(storage5_electricityBus_1_2)
 = 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)
--1 flow(electricityBus_storage5_1_3)
-+1 flow(storage5_electricityBus_1_3)
 = 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)
--1 flow(electricityBus_storage5_2_4)
-+1 flow(storage5_electricityBus_2_4)
 = 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)
--1 flow(electricityBus_storage5_2_5)
-+1 flow(storage5_electricityBus_2_5)
 = 0
 
 c_e_GenericStorageBlock_balanced_cstr(storage5)_:
@@ -268,68 +268,65 @@ c_e_GenericStorageBlock_balanced_cstr(storage5)_:
 = 0
 
 c_e_GenericStorageBlock_power_coupled(storage5_0)_:
++1.1 InvestmentFlowBlock_total(storage5_electricityBus_0)
 -1 InvestmentFlowBlock_total(electricityBus_storage5_0)
-+1.1000000000000001 InvestmentFlowBlock_total(storage5_electricityBus_0)
 = 0
 
 c_e_GenericStorageBlock_power_coupled(storage5_1)_:
++1.1 InvestmentFlowBlock_total(storage5_electricityBus_1)
 -1 InvestmentFlowBlock_total(electricityBus_storage5_1)
-+1.1000000000000001 InvestmentFlowBlock_total(storage5_electricityBus_1)
 = 0
 
 c_e_GenericStorageBlock_power_coupled(storage5_2)_:
++1.1 InvestmentFlowBlock_total(storage5_electricityBus_2)
 -1 InvestmentFlowBlock_total(electricityBus_storage5_2)
-+1.1000000000000001 InvestmentFlowBlock_total(storage5_electricityBus_2)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_storage5_0_0) <= +inf
-   0 <= flow(electricityBus_storage5_0_1) <= +inf
-   0 <= flow(electricityBus_storage5_1_2) <= +inf
-   0 <= flow(electricityBus_storage5_1_3) <= +inf
-   0 <= flow(electricityBus_storage5_2_4) <= +inf
-   0 <= flow(electricityBus_storage5_2_5) <= +inf
+   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 <= InvestmentFlowBlock_invest(electricityBus_storage5_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage5_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage5_2) <= +inf
+   0 <= flow(electricityBus_storage5_2_5) <= +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_total(electricityBus_storage5_0) <= +inf
    0 <= InvestmentFlowBlock_total(electricityBus_storage5_1) <= +inf
-   0 <= InvestmentFlowBlock_total(electricityBus_storage5_2) <= +inf
-   0 <= InvestmentFlowBlock_total(storage5_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_total(storage5_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_total(storage5_electricityBus_2) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_storage5_0) <= +inf
    0 <= InvestmentFlowBlock_old(electricityBus_storage5_1) <= +inf
+   0 <= InvestmentFlowBlock_total(electricityBus_storage5_2) <= +inf
    0 <= InvestmentFlowBlock_old(electricityBus_storage5_2) <= +inf
-   0 <= InvestmentFlowBlock_old(storage5_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_old(storage5_electricityBus_1) <= +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_end(electricityBus_storage5_0) <= +inf
+   0 <= InvestmentFlowBlock_old_end(electricityBus_storage5_1) <= +inf
+   0 <= InvestmentFlowBlock_old_end(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 <= GenericStorageBlock_storage_content(storage5_0) <= 10000
+   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(storage5_electricityBus_0) <= +inf
+   0 <= InvestmentFlowBlock_old(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
    0 <= GenericStorageBlock_storage_content(storage5_4) <= 10000
diff --git a/tests/lp_files/storage_invest_6.lp b/tests/lp_files/storage_invest_6.lp
index fdd5361c..59262db9 100644
--- a/tests/lp_files/storage_invest_6.lp
+++ b/tests/lp_files/storage_invest_6.lp
@@ -2,64 +2,64 @@
 
 min 
 objective:
-+145 GenericInvestmentStorageBlock_invest(storage6_0)
 +99 InvestmentFlowBlock_invest(electricityBus_storage6_0)
++145 GenericInvestmentStorageBlock_invest(storage6_0)
 
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage6_0_0)
 +1 flow(storage6_electricityBus_0_0)
+-1 flow(electricityBus_storage6_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage6_0_1)
 +1 flow(storage6_electricityBus_0_1)
+-1 flow(electricityBus_storage6_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
--1 flow(electricityBus_storage6_0_2)
 +1 flow(storage6_electricityBus_0_2)
+-1 flow(electricityBus_storage6_0_2)
 = 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(electricityBus_storage6_0)_:
 -1 InvestmentFlowBlock_invest(electricityBus_storage6_0)
 +1 InvestmentFlowBlock_total(electricityBus_storage6_0)
 = 110
 
-c_e_InvestmentFlowBlock_total_rule(storage6_electricityBus_0)_:
--1 InvestmentFlowBlock_invest(storage6_electricityBus_0)
-+1 InvestmentFlowBlock_total(storage6_electricityBus_0)
-= 100
+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 InvestmentFlowBlock_total(electricityBus_storage6_0)
 +1 flow(electricityBus_storage6_0_0)
+-1 InvestmentFlowBlock_total(electricityBus_storage6_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage6_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage6_0)
 +1 flow(electricityBus_storage6_0_1)
+-1 InvestmentFlowBlock_total(electricityBus_storage6_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage6_0_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage6_0)
 +1 flow(electricityBus_storage6_0_2)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage6_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage6_electricityBus_0)
-+1 flow(storage6_electricityBus_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage6_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage6_electricityBus_0)
-+1 flow(storage6_electricityBus_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage6_electricityBus_0_2)_:
--1 InvestmentFlowBlock_total(storage6_electricityBus_0)
-+1 flow(storage6_electricityBus_0_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage6_0)
 <= 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage6_0)_:
@@ -68,29 +68,29 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage6_0)_:
 = 10000
 
 c_u_GenericInvestmentStorageBlock_init_content_limit(storage6)_:
-+1 GenericInvestmentStorageBlock_init_content(storage6)
 -1 GenericInvestmentStorageBlock_invest(storage6_0)
++1 GenericInvestmentStorageBlock_init_content(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_0)
-+1 flow(storage6_electricityBus_0_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)
--1 flow(electricityBus_storage6_0_1)
-+1 flow(storage6_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1 flow(storage6_electricityBus_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage6)_:
@@ -99,43 +99,40 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage6)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_power_coupled(storage6_0)_:
++1.1 InvestmentFlowBlock_total(storage6_electricityBus_0)
 -1 InvestmentFlowBlock_total(electricityBus_storage6_0)
-+1.1000000000000001 InvestmentFlowBlock_total(storage6_electricityBus_0)
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage6_0)
 -1 GenericInvestmentStorageBlock_total(storage6_0)
++1 GenericInvestmentStorageBlock_storage_content(storage6_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage6_1)
 -1 GenericInvestmentStorageBlock_total(storage6_0)
++1 GenericInvestmentStorageBlock_storage_content(storage6_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_0_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage6_2)
 -1 GenericInvestmentStorageBlock_total(storage6_0)
++1 GenericInvestmentStorageBlock_storage_content(storage6_2)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_storage6_0_0) <= +inf
-   0 <= flow(electricityBus_storage6_0_1) <= +inf
-   0 <= flow(electricityBus_storage6_0_2) <= +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 <= InvestmentFlowBlock_invest(electricityBus_storage6_0) <= +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 <= InvestmentFlowBlock_total(storage6_electricityBus_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_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_total(storage6_0) <= +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
index f3eda648..24c767b3 100644
--- a/tests/lp_files/storage_invest_6_multi_period.lp
+++ b/tests/lp_files/storage_invest_6_multi_period.lp
@@ -2,43 +2,62 @@
 
 min 
 objective:
-+177.35448256334197 GenericInvestmentStorageBlock_invest(storage6_0)
-+173.87694368955096 GenericInvestmentStorageBlock_invest(storage6_1)
-+170.46759185250093 GenericInvestmentStorageBlock_invest(storage6_2)
 +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(electricityBus_storage6_0_0)
 +1 flow(storage6_electricityBus_0_0)
+-1 flow(electricityBus_storage6_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage6_0_1)
 +1 flow(storage6_electricityBus_0_1)
+-1 flow(electricityBus_storage6_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_2)_:
--1 flow(electricityBus_storage6_1_2)
 +1 flow(storage6_electricityBus_1_2)
+-1 flow(electricityBus_storage6_1_2)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_3)_:
--1 flow(electricityBus_storage6_1_3)
 +1 flow(storage6_electricityBus_1_3)
+-1 flow(electricityBus_storage6_1_3)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_4)_:
--1 flow(electricityBus_storage6_2_4)
 +1 flow(storage6_electricityBus_2_4)
+-1 flow(electricityBus_storage6_2_4)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_5)_:
--1 flow(electricityBus_storage6_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)_:
@@ -48,35 +67,28 @@ c_e_InvestmentFlowBlock_total_rule(electricityBus_storage6_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_storage6_1)_:
 -1 InvestmentFlowBlock_invest(electricityBus_storage6_1)
-+1 InvestmentFlowBlock_old(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_old(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_total_rule(storage6_electricityBus_0)_:
--1 InvestmentFlowBlock_invest(storage6_electricityBus_0)
-+1 InvestmentFlowBlock_total(storage6_electricityBus_0)
-= 100
+c_e_InvestmentFlowBlock_old_rule_end(storage6_electricityBus_0)_:
++1 InvestmentFlowBlock_old_end(storage6_electricityBus_0)
+= 0
 
-c_e_InvestmentFlowBlock_total_rule(storage6_electricityBus_1)_:
--1 InvestmentFlowBlock_invest(storage6_electricityBus_1)
-+1 InvestmentFlowBlock_old(storage6_electricityBus_1)
--1 InvestmentFlowBlock_total(storage6_electricityBus_0)
-+1 InvestmentFlowBlock_total(storage6_electricityBus_1)
+c_e_InvestmentFlowBlock_old_rule_end(storage6_electricityBus_1)_:
++1 InvestmentFlowBlock_old_end(storage6_electricityBus_1)
 = 0
 
-c_e_InvestmentFlowBlock_total_rule(storage6_electricityBus_2)_:
--1 InvestmentFlowBlock_invest(storage6_electricityBus_2)
-+1 InvestmentFlowBlock_old(storage6_electricityBus_2)
--1 InvestmentFlowBlock_total(storage6_electricityBus_1)
-+1 InvestmentFlowBlock_total(storage6_electricityBus_2)
+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)_:
@@ -91,16 +103,16 @@ c_e_InvestmentFlowBlock_old_rule_end(electricityBus_storage6_2)_:
 +1 InvestmentFlowBlock_old_end(electricityBus_storage6_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(storage6_electricityBus_0)_:
-+1 InvestmentFlowBlock_old_end(storage6_electricityBus_0)
+c_e_InvestmentFlowBlock_old_rule_exo(storage6_electricityBus_0)_:
++1 InvestmentFlowBlock_old_exo(storage6_electricityBus_0)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(storage6_electricityBus_1)_:
-+1 InvestmentFlowBlock_old_end(storage6_electricityBus_1)
+c_e_InvestmentFlowBlock_old_rule_exo(storage6_electricityBus_1)_:
++1 InvestmentFlowBlock_old_exo(storage6_electricityBus_1)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_end(storage6_electricityBus_2)_:
-+1 InvestmentFlowBlock_old_end(storage6_electricityBus_2)
+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)_:
@@ -115,22 +127,28 @@ c_e_InvestmentFlowBlock_old_rule_exo(electricityBus_storage6_2)_:
 +1 InvestmentFlowBlock_old_exo(electricityBus_storage6_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule_exo(storage6_electricityBus_0)_:
-+1 InvestmentFlowBlock_old_exo(storage6_electricityBus_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_exo(storage6_electricityBus_1)_:
-+1 InvestmentFlowBlock_old_exo(storage6_electricityBus_1)
+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_exo(storage6_electricityBus_2)_:
-+1 InvestmentFlowBlock_old_exo(storage6_electricityBus_2)
+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(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)_:
@@ -145,82 +163,64 @@ c_e_InvestmentFlowBlock_old_rule(electricityBus_storage6_2)_:
 -1 InvestmentFlowBlock_old_exo(electricityBus_storage6_2)
 = 0
 
-c_e_InvestmentFlowBlock_old_rule(storage6_electricityBus_0)_:
-+1 InvestmentFlowBlock_old(storage6_electricityBus_0)
--1 InvestmentFlowBlock_old_end(storage6_electricityBus_0)
--1 InvestmentFlowBlock_old_exo(storage6_electricityBus_0)
-= 0
+c_u_InvestmentFlowBlock_max(storage6_electricityBus_0_0)_:
++1 flow(storage6_electricityBus_0_0)
+-1 InvestmentFlowBlock_total(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_u_InvestmentFlowBlock_max(storage6_electricityBus_0_1)_:
++1 flow(storage6_electricityBus_0_1)
+-1 InvestmentFlowBlock_total(storage6_electricityBus_0)
+<= 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_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 InvestmentFlowBlock_total(electricityBus_storage6_0)
 +1 flow(electricityBus_storage6_0_0)
+-1 InvestmentFlowBlock_total(electricityBus_storage6_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage6_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage6_0)
 +1 flow(electricityBus_storage6_0_1)
+-1 InvestmentFlowBlock_total(electricityBus_storage6_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage6_1_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage6_1)
 +1 flow(electricityBus_storage6_1_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage6_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage6_1_3)_:
--1 InvestmentFlowBlock_total(electricityBus_storage6_1)
 +1 flow(electricityBus_storage6_1_3)
+-1 InvestmentFlowBlock_total(electricityBus_storage6_1)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage6_2_4)_:
--1 InvestmentFlowBlock_total(electricityBus_storage6_2)
 +1 flow(electricityBus_storage6_2_4)
+-1 InvestmentFlowBlock_total(electricityBus_storage6_2)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage6_2_5)_:
--1 InvestmentFlowBlock_total(electricityBus_storage6_2)
 +1 flow(electricityBus_storage6_2_5)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage6_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage6_electricityBus_0)
-+1 flow(storage6_electricityBus_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage6_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage6_electricityBus_0)
-+1 flow(storage6_electricityBus_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage6_electricityBus_1_2)_:
--1 InvestmentFlowBlock_total(storage6_electricityBus_1)
-+1 flow(storage6_electricityBus_1_2)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage6_electricityBus_1_3)_:
--1 InvestmentFlowBlock_total(storage6_electricityBus_1)
-+1 flow(storage6_electricityBus_1_3)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage6_electricityBus_2_4)_:
--1 InvestmentFlowBlock_total(storage6_electricityBus_2)
-+1 flow(storage6_electricityBus_2_4)
-<= 0
-
-c_u_InvestmentFlowBlock_max(storage6_electricityBus_2_5)_:
--1 InvestmentFlowBlock_total(storage6_electricityBus_2)
-+1 flow(storage6_electricityBus_2_5)
+-1 InvestmentFlowBlock_total(electricityBus_storage6_2)
 <= 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage6_0)_:
@@ -230,16 +230,16 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage6_0)_:
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage6_1)_:
 -1 GenericInvestmentStorageBlock_invest(storage6_1)
-+1 GenericInvestmentStorageBlock_old(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_old(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)_:
@@ -267,9 +267,9 @@ c_e_GenericInvestmentStorageBlock_old_rule_exo(storage6_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_old_rule(storage6_0)_:
-+1 GenericInvestmentStorageBlock_old(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)_:
@@ -285,145 +285,135 @@ c_e_GenericInvestmentStorageBlock_old_rule(storage6_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_balance(storage6_0_1)_:
--1 GenericInvestmentStorageBlock_storage_content(storage6_0)
-+1 GenericInvestmentStorageBlock_storage_content(storage6_1)
--1 flow(electricityBus_storage6_0_1)
 +1 flow(storage6_electricityBus_0_1)
+-1 flow(electricityBus_storage6_0_1)
++1 GenericInvestmentStorageBlock_storage_content(storage6_1)
+-1 GenericInvestmentStorageBlock_storage_content(storage6_0)
 = 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)
--1 flow(electricityBus_storage6_1_2)
-+1 flow(storage6_electricityBus_1_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)
--1 flow(electricityBus_storage6_1_3)
-+1 flow(storage6_electricityBus_1_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)
--1 flow(electricityBus_storage6_2_4)
-+1 flow(storage6_electricityBus_2_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)
--1 flow(electricityBus_storage6_2_5)
-+1 flow(storage6_electricityBus_2_5)
 = 0
 
 c_e_GenericInvestmentStorageBlock_power_coupled(storage6_0)_:
++1.1 InvestmentFlowBlock_total(storage6_electricityBus_0)
 -1 InvestmentFlowBlock_total(electricityBus_storage6_0)
-+1.1000000000000001 InvestmentFlowBlock_total(storage6_electricityBus_0)
 = 0
 
 c_e_GenericInvestmentStorageBlock_power_coupled(storage6_1)_:
++1.1 InvestmentFlowBlock_total(storage6_electricityBus_1)
 -1 InvestmentFlowBlock_total(electricityBus_storage6_1)
-+1.1000000000000001 InvestmentFlowBlock_total(storage6_electricityBus_1)
 = 0
 
 c_e_GenericInvestmentStorageBlock_power_coupled(storage6_2)_:
++1.1 InvestmentFlowBlock_total(storage6_electricityBus_2)
 -1 InvestmentFlowBlock_total(electricityBus_storage6_2)
-+1.1000000000000001 InvestmentFlowBlock_total(storage6_electricityBus_2)
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage6_0)
 -1 GenericInvestmentStorageBlock_total(storage6_0)
++1 GenericInvestmentStorageBlock_storage_content(storage6_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage6_1)
 -1 GenericInvestmentStorageBlock_total(storage6_0)
++1 GenericInvestmentStorageBlock_storage_content(storage6_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_1_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage6_2)
 -1 GenericInvestmentStorageBlock_total(storage6_1)
++1 GenericInvestmentStorageBlock_storage_content(storage6_2)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_1_3)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage6_3)
 -1 GenericInvestmentStorageBlock_total(storage6_1)
++1 GenericInvestmentStorageBlock_storage_content(storage6_3)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_2_4)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage6_4)
 -1 GenericInvestmentStorageBlock_total(storage6_2)
++1 GenericInvestmentStorageBlock_storage_content(storage6_4)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage6_2_5)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage6_5)
 -1 GenericInvestmentStorageBlock_total(storage6_2)
++1 GenericInvestmentStorageBlock_storage_content(storage6_5)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_storage6_0_0) <= +inf
-   0 <= flow(electricityBus_storage6_0_1) <= +inf
-   0 <= flow(electricityBus_storage6_1_2) <= +inf
-   0 <= flow(electricityBus_storage6_1_3) <= +inf
-   0 <= flow(electricityBus_storage6_2_4) <= +inf
-   0 <= flow(electricityBus_storage6_2_5) <= +inf
+   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 <= InvestmentFlowBlock_invest(electricityBus_storage6_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage6_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage6_2) <= +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_total(electricityBus_storage6_2) <= +inf
-   0 <= InvestmentFlowBlock_total(storage6_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_total(storage6_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_total(storage6_electricityBus_2) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_storage6_0) <= +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(storage6_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_old(storage6_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_old(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_end(storage6_electricityBus_0) <= +inf
    0 <= InvestmentFlowBlock_old_end(storage6_electricityBus_1) <= +inf
    0 <= InvestmentFlowBlock_old_end(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_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 <= 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
-   0 <= GenericInvestmentStorageBlock_invest(storage6_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_invest(storage6_1) <= +inf
-   0 <= GenericInvestmentStorageBlock_invest(storage6_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_total(storage6_2) <= +inf
-   0 <= GenericInvestmentStorageBlock_old(storage6_0) <= +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
@@ -431,4 +421,11 @@ bounds
    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_1) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage6_0) <= +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 e603a411..9711a6c3 100644
--- a/tests/lp_files/storage_invest_all_nonconvex.lp
+++ b/tests/lp_files/storage_invest_all_nonconvex.lp
@@ -2,43 +2,38 @@
 
 min 
 objective:
-+20 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0)
-+30 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0)
-+10 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0)
 +10 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0)
-+10 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_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_0)_:
--1 flow(bus1_storage_all_nonconvex_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(bus1_storage_all_nonconvex_0_1)
 +1 flow(storage_all_nonconvex_bus1_0_1)
+-1 flow(bus1_storage_all_nonconvex_0_1)
 = 0
 
 c_e_BusBlock_balance(bus1_0_2)_:
--1 flow(bus1_storage_all_nonconvex_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_0)_:
--1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0)
-+5 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0)
-<= 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_maximum_rule(bus1_storage_all_nonconvex_0)_:
-+1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0)
--30 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_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_maximum_rule(storage_all_nonconvex_bus1_0)_:
@@ -46,44 +41,49 @@ c_u_InvestmentFlowBlock_maximum_rule(storage_all_nonconvex_bus1_0)_:
 -20 InvestmentFlowBlock_invest_status(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_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_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_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_0_0)_:
--1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0)
-+1 flow(bus1_storage_all_nonconvex_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_0_1)_:
--1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0)
-+1 flow(bus1_storage_all_nonconvex_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_0_2)_:
--1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0)
-+1 flow(bus1_storage_all_nonconvex_0_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_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_0_0)_:
--1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_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 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0)
 +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_0_2)_:
--1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0)
 +1 flow(storage_all_nonconvex_bus1_0_2)
+-1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0)
+<= 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_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)_:
@@ -92,29 +92,29 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_all_nonconvex_0)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_init_content_limit(storage_all_nonconvex)_:
-+1 GenericInvestmentStorageBlock_init_content(storage_all_nonconvex)
 -1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0)
++1 GenericInvestmentStorageBlock_init_content(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_0)
-+1 flow(storage_all_nonconvex_bus1_0_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)
--1 flow(bus1_storage_all_nonconvex_0_1)
-+1 flow(storage_all_nonconvex_bus1_0_1)
 = 0
 
 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_0_2)
-+1 flow(storage_all_nonconvex_bus1_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_all_nonconvex)_:
@@ -123,18 +123,18 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_all_nonconvex)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_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_storage_content(storage_all_nonconvex_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_0_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_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_0)_:
@@ -147,31 +147,28 @@ c_l_GenericInvestmentStorageBlock_limit_min(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_0) <= +inf
-   0 <= flow(bus1_storage_all_nonconvex_0_1) <= +inf
-   0 <= flow(bus1_storage_all_nonconvex_0_2) <= +inf
+   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 <= InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) <= 30
-   0 <= InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) <= 20
-   0 <= InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) <= +inf
+   0 <= flow(bus1_storage_all_nonconvex_0_2) <= +inf
    0 <= InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0) <= 1
-   0 <= InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) <= 1
+   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_0) <= 100
-   0 <= GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_init_content(storage_all_nonconvex) <= +inf
-   0 <= GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0) <= 1
 binary
-  InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0)
   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
index 7229540d..84eabdec 100644
--- a/tests/lp_files/storage_invest_all_nonconvex_multi_period.lp
+++ b/tests/lp_files/storage_invest_all_nonconvex_multi_period.lp
@@ -2,72 +2,57 @@
 
 min 
 objective:
-+24.462687250116133 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0)
-+23.983026715800129 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_1)
-+23.512771290000128 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_2)
-+30 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0)
-+29.411764705882351 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_1)
-+28.83506343713956 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_2)
-+12.231343625058066 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0)
-+11.991513357900065 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_1)
-+11.756385645000064 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_2)
 +12.231343625058066 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0)
-+11.991513357900065 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_1)
-+11.756385645000064 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_2)
-+10 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0)
-+9.8039215686274499 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_1)
-+9.6116878123798539 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_2)
 +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)
++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)
++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(bus1_storage_all_nonconvex_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(bus1_storage_all_nonconvex_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(bus1_storage_all_nonconvex_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(bus1_storage_all_nonconvex_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(bus1_storage_all_nonconvex_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(bus1_storage_all_nonconvex_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)
@@ -83,19 +68,19 @@ c_u_InvestmentFlowBlock_minimum_rule(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)
+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)_:
-+1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_1)
--30 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_1)
+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_maximum_rule(bus1_storage_all_nonconvex_2)_:
-+1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_2)
--30 InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_2)
+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_maximum_rule(storage_all_nonconvex_bus1_0)_:
@@ -113,24 +98,20 @@ c_u_InvestmentFlowBlock_maximum_rule(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_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_e_InvestmentFlowBlock_total_rule(bus1_storage_all_nonconvex_1)_:
--1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_1)
-+1 InvestmentFlowBlock_old(bus1_storage_all_nonconvex_1)
--1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0)
-+1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_1)
-= 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_e_InvestmentFlowBlock_total_rule(bus1_storage_all_nonconvex_2)_:
--1 InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_2)
-+1 InvestmentFlowBlock_old(bus1_storage_all_nonconvex_2)
--1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_1)
-+1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_2)
-= 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_e_InvestmentFlowBlock_total_rule(storage_all_nonconvex_bus1_0)_:
 -1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0)
@@ -139,28 +120,35 @@ c_e_InvestmentFlowBlock_total_rule(storage_all_nonconvex_bus1_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(storage_all_nonconvex_bus1_1)_:
 -1 InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_1)
-+1 InvestmentFlowBlock_old(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_old(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)
+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_old_rule_end(bus1_storage_all_nonconvex_1)_:
-+1 InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_1)
+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_old_rule_end(bus1_storage_all_nonconvex_2)_:
-+1 InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_2)
+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_old_rule_end(storage_all_nonconvex_bus1_0)_:
@@ -175,16 +163,16 @@ 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)
+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_exo(bus1_storage_all_nonconvex_1)_:
-+1 InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_1)
+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_exo(bus1_storage_all_nonconvex_2)_:
-+1 InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_2)
+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_exo(storage_all_nonconvex_bus1_0)_:
@@ -199,28 +187,22 @@ 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(bus1_storage_all_nonconvex_0)
--1 InvestmentFlowBlock_old_end(bus1_storage_all_nonconvex_0)
--1 InvestmentFlowBlock_old_exo(bus1_storage_all_nonconvex_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(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)
+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(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)
+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(storage_all_nonconvex_bus1_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -235,64 +217,82 @@ c_e_InvestmentFlowBlock_old_rule(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 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0)
-+1 flow(bus1_storage_all_nonconvex_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_0_1)_:
--1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0)
-+1 flow(bus1_storage_all_nonconvex_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_1_2)_:
--1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_1)
-+1 flow(bus1_storage_all_nonconvex_1_2)
-<= 0
-
-c_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_1_3)_:
--1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_1)
-+1 flow(bus1_storage_all_nonconvex_1_3)
-<= 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_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_2_4)_:
--1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_2)
-+1 flow(bus1_storage_all_nonconvex_2_4)
-<= 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_u_InvestmentFlowBlock_max(bus1_storage_all_nonconvex_2_5)_:
--1 InvestmentFlowBlock_total(bus1_storage_all_nonconvex_2)
-+1 flow(bus1_storage_all_nonconvex_2_5)
-<= 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_u_InvestmentFlowBlock_max(storage_all_nonconvex_bus1_0_0)_:
--1 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_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 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_0)
 +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 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_1)
 +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 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_1)
 +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 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_2)
 +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 InvestmentFlowBlock_total(storage_all_nonconvex_bus1_2)
 +1 flow(storage_all_nonconvex_bus1_2_5)
+-1 InvestmentFlowBlock_total(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_e_GenericInvestmentStorageBlock_total_storage_rule(storage_all_nonconvex_0)_:
@@ -302,16 +302,16 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_all_nonconvex_0)_:
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_all_nonconvex_1)_:
 -1 GenericInvestmentStorageBlock_invest(storage_all_nonconvex_1)
-+1 GenericInvestmentStorageBlock_old(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_old(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)_:
@@ -339,9 +339,9 @@ c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_all_nonconvex_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_old_rule(storage_all_nonconvex_0)_:
-+1 GenericInvestmentStorageBlock_old(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)_:
@@ -357,68 +357,68 @@ c_e_GenericInvestmentStorageBlock_old_rule(storage_all_nonconvex_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_balance(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_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_1)
+-1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_0)
 = 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)
--1 flow(bus1_storage_all_nonconvex_1_2)
-+1 flow(storage_all_nonconvex_bus1_1_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)
--1 flow(bus1_storage_all_nonconvex_1_3)
-+1 flow(storage_all_nonconvex_bus1_1_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)
--1 flow(bus1_storage_all_nonconvex_2_4)
-+1 flow(storage_all_nonconvex_bus1_2_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)
--1 flow(bus1_storage_all_nonconvex_2_5)
-+1 flow(storage_all_nonconvex_bus1_2_5)
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage_all_nonconvex_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_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_storage_content(storage_all_nonconvex_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_storage_content(storage_all_nonconvex_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_storage_content(storage_all_nonconvex_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_storage_content(storage_all_nonconvex_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_storage_content(storage_all_nonconvex_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)_:
@@ -451,72 +451,65 @@ c_l_GenericInvestmentStorageBlock_limit_min(storage_all_nonconvex_2)_:
 -20 GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_2)
 >= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(bus1_storage_all_nonconvex_0_0) <= +inf
-   0 <= flow(bus1_storage_all_nonconvex_0_1) <= +inf
-   0 <= flow(bus1_storage_all_nonconvex_1_2) <= +inf
-   0 <= flow(bus1_storage_all_nonconvex_1_3) <= +inf
-   0 <= flow(bus1_storage_all_nonconvex_2_4) <= +inf
-   0 <= flow(bus1_storage_all_nonconvex_2_5) <= +inf
+   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 <= 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 <= 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 <= InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_0) <= 30
-   0 <= InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_1) <= 30
-   0 <= InvestmentFlowBlock_invest(bus1_storage_all_nonconvex_2) <= 30
-   0 <= InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_0) <= 20
-   0 <= InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_1) <= 20
-   0 <= InvestmentFlowBlock_invest(storage_all_nonconvex_bus1_2) <= 20
-   0 <= InvestmentFlowBlock_total(bus1_storage_all_nonconvex_0) <= +inf
-   0 <= InvestmentFlowBlock_total(bus1_storage_all_nonconvex_1) <= +inf
-   0 <= InvestmentFlowBlock_total(bus1_storage_all_nonconvex_2) <= +inf
+   0 <= flow(bus1_storage_all_nonconvex_2_5) <= +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(bus1_storage_all_nonconvex_0) <= +inf
+   0 <= InvestmentFlowBlock_old(storage_all_nonconvex_bus1_2) <= +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_old(storage_all_nonconvex_bus1_0) <= +inf
-   0 <= InvestmentFlowBlock_old(storage_all_nonconvex_bus1_1) <= +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_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_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_invest_status(bus1_storage_all_nonconvex_0) <= 1
-   0 <= InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_1) <= 1
-   0 <= InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_2) <= 1
-   0 <= InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_0) <= 1
-   0 <= InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_1) <= 1
-   0 <= InvestmentFlowBlock_invest_status(storage_all_nonconvex_bus1_2) <= 1
-   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
-   0 <= GenericInvestmentStorageBlock_invest(storage_all_nonconvex_0) <= 100
-   0 <= GenericInvestmentStorageBlock_invest(storage_all_nonconvex_1) <= 100
-   0 <= GenericInvestmentStorageBlock_invest(storage_all_nonconvex_2) <= 100
+   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(storage_all_nonconvex_bus1_0) <= +inf
+   0 <= InvestmentFlowBlock_old(bus1_storage_all_nonconvex_0) <= +inf
    0 <= GenericInvestmentStorageBlock_total(storage_all_nonconvex_0) <= +inf
    0 <= GenericInvestmentStorageBlock_total(storage_all_nonconvex_1) <= +inf
-   0 <= GenericInvestmentStorageBlock_total(storage_all_nonconvex_2) <= +inf
-   0 <= GenericInvestmentStorageBlock_old(storage_all_nonconvex_0) <= +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
@@ -524,16 +517,20 @@ bounds
    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_invest_status(storage_all_nonconvex_0) <= 1
-   0 <= GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_1) <= 1
-   0 <= GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_2) <= 1
+   0 <= GenericInvestmentStorageBlock_old(storage_all_nonconvex_0) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_1) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage_all_nonconvex_0) <= +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)
+  InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_0)
+  InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_1)
+  InvestmentFlowBlock_invest_status(bus1_storage_all_nonconvex_2)
   GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_0)
   GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_1)
   GenericInvestmentStorageBlock_invest_status(storage_all_nonconvex_2)
diff --git a/tests/lp_files/storage_invest_minimum.lp b/tests/lp_files/storage_invest_minimum.lp
index 4f22b801..b20a7966 100644
--- a/tests/lp_files/storage_invest_minimum.lp
+++ b/tests/lp_files/storage_invest_minimum.lp
@@ -7,18 +7,18 @@ objective:
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage1_0_0)
 +1 flow(storage1_electricityBus_0_0)
+-1 flow(electricityBus_storage1_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage1_0_1)
 +1 flow(storage1_electricityBus_0_1)
+-1 flow(electricityBus_storage1_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
--1 flow(electricityBus_storage1_0_2)
 +1 flow(storage1_electricityBus_0_2)
+-1 flow(electricityBus_storage1_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
@@ -27,29 +27,29 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_init_content_limit(storage1)_:
-+1 GenericInvestmentStorageBlock_init_content(storage1)
 -1 GenericInvestmentStorageBlock_invest(storage1_0)
++1 GenericInvestmentStorageBlock_init_content(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_0)
-+1 flow(storage1_electricityBus_0_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)
--1 flow(electricityBus_storage1_0_1)
-+1 flow(storage1_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1 flow(storage1_electricityBus_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage1)_:
@@ -58,34 +58,31 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage1)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_0)
 -1 GenericInvestmentStorageBlock_total(storage1_0)
++1 GenericInvestmentStorageBlock_storage_content(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_1)
 -1 GenericInvestmentStorageBlock_total(storage1_0)
++1 GenericInvestmentStorageBlock_storage_content(storage1_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_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_0) <= +inf
-   0 <= flow(electricityBus_storage1_0_1) <= +inf
-   0 <= flow(electricityBus_storage1_0_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_0) <= 200
-   0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf
-   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
index 4104411f..25e1482b 100644
--- a/tests/lp_files/storage_invest_minimum_multi_period.lp
+++ b/tests/lp_files/storage_invest_minimum_multi_period.lp
@@ -3,39 +3,39 @@
 min 
 objective:
 +212.02333722461535 GenericInvestmentStorageBlock_invest(storage1_0)
-+207.86601688687779 GenericInvestmentStorageBlock_invest(storage1_1)
-+203.79021263419389 GenericInvestmentStorageBlock_invest(storage1_2)
++207.8660168868778 GenericInvestmentStorageBlock_invest(storage1_1)
++203.7902126341939 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)
+-1 flow(electricityBus_storage1_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage1_0_1)
 +1 flow(storage1_electricityBus_0_1)
+-1 flow(electricityBus_storage1_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_2)_:
--1 flow(electricityBus_storage1_1_2)
 +1 flow(storage1_electricityBus_1_2)
+-1 flow(electricityBus_storage1_1_2)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_3)_:
--1 flow(electricityBus_storage1_1_3)
 +1 flow(storage1_electricityBus_1_3)
+-1 flow(electricityBus_storage1_1_3)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_4)_:
--1 flow(electricityBus_storage1_2_4)
 +1 flow(storage1_electricityBus_2_4)
+-1 flow(electricityBus_storage1_2_4)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_5)_:
--1 flow(electricityBus_storage1_2_5)
 +1 flow(storage1_electricityBus_2_5)
+-1 flow(electricityBus_storage1_2_5)
 = 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
@@ -45,16 +45,16 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_1)_:
 -1 GenericInvestmentStorageBlock_invest(storage1_1)
-+1 GenericInvestmentStorageBlock_old(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_old(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)_:
@@ -82,9 +82,9 @@ c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_old_rule(storage1_0)_:
-+1 GenericInvestmentStorageBlock_old(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)_:
@@ -100,100 +100,90 @@ c_e_GenericInvestmentStorageBlock_old_rule(storage1_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_balance(storage1_0_1)_:
--1 GenericInvestmentStorageBlock_storage_content(storage1_0)
-+1 GenericInvestmentStorageBlock_storage_content(storage1_1)
--1 flow(electricityBus_storage1_0_1)
 +1 flow(storage1_electricityBus_0_1)
+-1 flow(electricityBus_storage1_0_1)
++1 GenericInvestmentStorageBlock_storage_content(storage1_1)
+-1 GenericInvestmentStorageBlock_storage_content(storage1_0)
 = 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)
--1 flow(electricityBus_storage1_1_2)
-+1 flow(storage1_electricityBus_1_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)
--1 flow(electricityBus_storage1_1_3)
-+1 flow(storage1_electricityBus_1_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)
--1 flow(electricityBus_storage1_2_4)
-+1 flow(storage1_electricityBus_2_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)
--1 flow(electricityBus_storage1_2_5)
-+1 flow(storage1_electricityBus_2_5)
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_0)
 -1 GenericInvestmentStorageBlock_total(storage1_0)
++1 GenericInvestmentStorageBlock_storage_content(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_1)
 -1 GenericInvestmentStorageBlock_total(storage1_0)
++1 GenericInvestmentStorageBlock_storage_content(storage1_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_2)
 -1 GenericInvestmentStorageBlock_total(storage1_1)
++1 GenericInvestmentStorageBlock_storage_content(storage1_2)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_3)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_3)
 -1 GenericInvestmentStorageBlock_total(storage1_1)
++1 GenericInvestmentStorageBlock_storage_content(storage1_3)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_4)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_4)
 -1 GenericInvestmentStorageBlock_total(storage1_2)
++1 GenericInvestmentStorageBlock_storage_content(storage1_4)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_5)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_5)
 -1 GenericInvestmentStorageBlock_total(storage1_2)
++1 GenericInvestmentStorageBlock_storage_content(storage1_5)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 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
+   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 <= 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
-   100 <= GenericInvestmentStorageBlock_invest(storage1_0) <= 200
-   100 <= GenericInvestmentStorageBlock_invest(storage1_1) <= 200
-   100 <= GenericInvestmentStorageBlock_invest(storage1_2) <= 200
+   0 <= flow(electricityBus_storage1_2_5) <= +inf
    0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf
    0 <= GenericInvestmentStorageBlock_total(storage1_1) <= +inf
-   0 <= GenericInvestmentStorageBlock_total(storage1_2) <= +inf
-   0 <= GenericInvestmentStorageBlock_old(storage1_0) <= +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
@@ -201,4 +191,11 @@ bounds
    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_1) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage1_0) <= +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
index b1acd498..983ada94 100644
--- a/tests/lp_files/storage_invest_multi_period.lp
+++ b/tests/lp_files/storage_invest_multi_period.lp
@@ -2,41 +2,41 @@
 
 min 
 objective:
-+351.53628135238012 GenericInvestmentStorageBlock_invest(storage1_0)
-+341.96150336108451 GenericInvestmentStorageBlock_invest(storage1_1)
++250.0 ONE_VAR_CONSTANT
++351.53628135238 GenericInvestmentStorageBlock_invest(storage1_0)
++341.9615033610845 GenericInvestmentStorageBlock_invest(storage1_1)
 +332.6786079381219 GenericInvestmentStorageBlock_invest(storage1_2)
-+250 ONE_VAR_CONSTANT
 
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage1_0_0)
 +1 flow(storage1_electricityBus_0_0)
+-1 flow(electricityBus_storage1_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage1_0_1)
 +1 flow(storage1_electricityBus_0_1)
+-1 flow(electricityBus_storage1_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_2)_:
--1 flow(electricityBus_storage1_1_2)
 +1 flow(storage1_electricityBus_1_2)
+-1 flow(electricityBus_storage1_1_2)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_3)_:
--1 flow(electricityBus_storage1_1_3)
 +1 flow(storage1_electricityBus_1_3)
+-1 flow(electricityBus_storage1_1_3)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_4)_:
--1 flow(electricityBus_storage1_2_4)
 +1 flow(storage1_electricityBus_2_4)
+-1 flow(electricityBus_storage1_2_4)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_5)_:
--1 flow(electricityBus_storage1_2_5)
 +1 flow(storage1_electricityBus_2_5)
+-1 flow(electricityBus_storage1_2_5)
 = 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
@@ -46,16 +46,16 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_1)_:
 -1 GenericInvestmentStorageBlock_invest(storage1_1)
-+1 GenericInvestmentStorageBlock_old(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_old(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)_:
@@ -83,9 +83,9 @@ c_e_GenericInvestmentStorageBlock_old_rule_exo(storage1_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_old_rule(storage1_0)_:
-+1 GenericInvestmentStorageBlock_old(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)_:
@@ -101,68 +101,68 @@ c_e_GenericInvestmentStorageBlock_old_rule(storage1_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_balance(storage1_0_1)_:
--1 GenericInvestmentStorageBlock_storage_content(storage1_0)
-+1 GenericInvestmentStorageBlock_storage_content(storage1_1)
--1 flow(electricityBus_storage1_0_1)
 +1 flow(storage1_electricityBus_0_1)
+-1 flow(electricityBus_storage1_0_1)
++1 GenericInvestmentStorageBlock_storage_content(storage1_1)
+-1 GenericInvestmentStorageBlock_storage_content(storage1_0)
 = 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)
--1 flow(electricityBus_storage1_1_2)
-+1 flow(storage1_electricityBus_1_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)
--1 flow(electricityBus_storage1_1_3)
-+1 flow(storage1_electricityBus_1_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)
--1 flow(electricityBus_storage1_2_4)
-+1 flow(storage1_electricityBus_2_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)
--1 flow(electricityBus_storage1_2_5)
-+1 flow(storage1_electricityBus_2_5)
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_0)
 -1 GenericInvestmentStorageBlock_total(storage1_0)
++1 GenericInvestmentStorageBlock_storage_content(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_1)
 -1 GenericInvestmentStorageBlock_total(storage1_0)
++1 GenericInvestmentStorageBlock_storage_content(storage1_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_2)
 -1 GenericInvestmentStorageBlock_total(storage1_1)
++1 GenericInvestmentStorageBlock_storage_content(storage1_2)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_1_3)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_3)
 -1 GenericInvestmentStorageBlock_total(storage1_1)
++1 GenericInvestmentStorageBlock_storage_content(storage1_3)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_4)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_4)
 -1 GenericInvestmentStorageBlock_total(storage1_2)
++1 GenericInvestmentStorageBlock_storage_content(storage1_4)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_2_5)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_5)
 -1 GenericInvestmentStorageBlock_total(storage1_2)
++1 GenericInvestmentStorageBlock_storage_content(storage1_5)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_overall_storage_maximum(storage1_0)_:
@@ -181,36 +181,27 @@ c_l_GenericInvestmentStorageBlock_overall_minimum(storage1)_:
 +1 GenericInvestmentStorageBlock_total(storage1_2)
 >= 10
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 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
+   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 <= 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
-   100 <= GenericInvestmentStorageBlock_invest(storage1_0) <= 200
-   100 <= GenericInvestmentStorageBlock_invest(storage1_1) <= 200
-   100 <= GenericInvestmentStorageBlock_invest(storage1_2) <= 200
+   0 <= flow(electricityBus_storage1_2_5) <= +inf
    0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +inf
    0 <= GenericInvestmentStorageBlock_total(storage1_1) <= +inf
-   0 <= GenericInvestmentStorageBlock_total(storage1_2) <= +inf
-   0 <= GenericInvestmentStorageBlock_old(storage1_0) <= +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
@@ -218,4 +209,11 @@ bounds
    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_1) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage1_0) <= +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 bfed3cc5..2dbed4e9 100644
--- a/tests/lp_files/storage_invest_unbalanced.lp
+++ b/tests/lp_files/storage_invest_unbalanced.lp
@@ -7,58 +7,58 @@ objective:
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage1_0_0)
 +1 flow(storage1_electricityBus_0_0)
+-1 flow(electricityBus_storage1_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage1_0_1)
 +1 flow(storage1_electricityBus_0_1)
+-1 flow(electricityBus_storage1_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
--1 flow(electricityBus_storage1_0_2)
 +1 flow(storage1_electricityBus_0_2)
+-1 flow(electricityBus_storage1_0_2)
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(electricityBus_storage1_0)_:
--1 InvestmentFlowBlock_invest(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_invest(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 InvestmentFlowBlock_total(electricityBus_storage1_0)
 +1 flow(electricityBus_storage1_0_0)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 +1 flow(electricityBus_storage1_0_1)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(electricityBus_storage1_0_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 +1 flow(electricityBus_storage1_0_2)
+-1 InvestmentFlowBlock_total(electricityBus_storage1_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 +1 flow(storage1_electricityBus_0_0)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_1)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 +1 flow(storage1_electricityBus_0_1)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 <= 0
 
 c_u_InvestmentFlowBlock_max(storage1_electricityBus_0_2)_:
--1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 +1 flow(storage1_electricityBus_0_2)
+-1 InvestmentFlowBlock_total(storage1_electricityBus_0)
 <= 0
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
@@ -67,74 +67,71 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage1_0)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_init_content_fix(storage1)_:
-+1 GenericInvestmentStorageBlock_init_content(storage1)
 -0.5 GenericInvestmentStorageBlock_invest(storage1_0)
++1 GenericInvestmentStorageBlock_init_content(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_0)
-+1 flow(storage1_electricityBus_0_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)
--1 flow(electricityBus_storage1_0_1)
-+1 flow(storage1_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1 flow(storage1_electricityBus_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage1_0)_:
--1 GenericInvestmentStorageBlock_total(storage1_0)
 +1 InvestmentFlowBlock_total(electricityBus_storage1_0)
+-1 GenericInvestmentStorageBlock_total(storage1_0)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_outflow(storage1_0)_:
--1 GenericInvestmentStorageBlock_total(storage1_0)
 +1 InvestmentFlowBlock_total(storage1_electricityBus_0)
+-1 GenericInvestmentStorageBlock_total(storage1_0)
 = 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_0)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_0)
 -1 GenericInvestmentStorageBlock_total(storage1_0)
++1 GenericInvestmentStorageBlock_storage_content(storage1_0)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_1)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_1)
 -1 GenericInvestmentStorageBlock_total(storage1_0)
++1 GenericInvestmentStorageBlock_storage_content(storage1_1)
 <= 0
 
 c_u_GenericInvestmentStorageBlock_max_storage_content(storage1_0_2)_:
-+1 GenericInvestmentStorageBlock_storage_content(storage1_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_0) <= +inf
-   0 <= flow(electricityBus_storage1_0_1) <= +inf
-   0 <= flow(electricityBus_storage1_0_2) <= +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 <= InvestmentFlowBlock_invest(electricityBus_storage1_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(storage1_electricityBus_0) <= +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_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_total(storage1_0) <= +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 dfe713b8..18cc0c96 100644
--- a/tests/lp_files/storage_invest_with_offset.lp
+++ b/tests/lp_files/storage_invest_with_offset.lp
@@ -2,14 +2,14 @@
 
 min 
 objective:
-+145 GenericInvestmentStorageBlock_invest(storage_non_convex_0)
-+5 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0)
 +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.
 
@@ -28,44 +28,44 @@ c_e_BusBlock_balance(electricityBus_0_2)_:
 +1 flow(storage_non_convex_electricityBus_0_2)
 = 0
 
-c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_0)_:
--1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0)
-+1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-= 0
-
 c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_0)_:
--1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0)
 +1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0)
+-1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0)
 = 0
 
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_0)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 flow(electricityBus_storage_non_convex_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 flow(electricityBus_storage_non_convex_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 flow(electricityBus_storage_non_convex_0_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_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0)
 +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_0_2)_:
--1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0)
 +1 flow(storage_non_convex_electricityBus_0_2)
+-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0)
+<= 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_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)_:
@@ -74,29 +74,29 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_0)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_init_content_limit(storage_non_convex)_:
-+1 GenericInvestmentStorageBlock_init_content(storage_non_convex)
 -1 GenericInvestmentStorageBlock_invest(storage_non_convex_0)
++1 GenericInvestmentStorageBlock_init_content(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_0)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_0_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.96999999999999997 flow(electricityBus_storage_non_convex_0_1)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_non_convex)_:
@@ -105,43 +105,43 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_non_convex)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_0)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
+-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 +1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0)
--0.90000000000000002 GenericInvestmentStorageBlock_total(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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 0
 
 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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 0
 
 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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 0
 
 c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_0)_:
@@ -154,9 +154,6 @@ c_l_GenericInvestmentStorageBlock_limit_min(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_storage_non_convex_0_0) <= +inf
    0 <= flow(electricityBus_storage_non_convex_0_1) <= +inf
@@ -164,17 +161,17 @@ bounds
    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 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) <= +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_total(storage_non_convex_electricityBus_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_0) <= 1454
-   0 <= GenericInvestmentStorageBlock_total(storage_non_convex_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_init_content(storage_non_convex) <= +inf
-   0 <= GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) <= 1
 binary
   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
index a7c706ce..9686a957 100644
--- a/tests/lp_files/storage_invest_with_offset_multi_period.lp
+++ b/tests/lp_files/storage_invest_with_offset_multi_period.lp
@@ -2,24 +2,24 @@
 
 min 
 objective:
-+177.35448256334197 GenericInvestmentStorageBlock_invest(storage_non_convex_0)
-+173.87694368955096 GenericInvestmentStorageBlock_invest(storage_non_convex_1)
-+170.46759185250093 GenericInvestmentStorageBlock_invest(storage_non_convex_2)
-+5 GenericInvestmentStorageBlock_invest_status(storage_non_convex_0)
-+4.901960784313725 GenericInvestmentStorageBlock_invest_status(storage_non_convex_1)
-+4.805843906189927 GenericInvestmentStorageBlock_invest_status(storage_non_convex_2)
 +56 flow(electricityBus_storage_non_convex_0_0)
 +56 flow(electricityBus_storage_non_convex_0_1)
-+54.901960784313722 flow(electricityBus_storage_non_convex_1_2)
-+54.901960784313722 flow(electricityBus_storage_non_convex_1_3)
-+53.825451749327179 flow(electricityBus_storage_non_convex_2_4)
-+53.825451749327179 flow(electricityBus_storage_non_convex_2_5)
++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.068050749711649 flow(storage_non_convex_electricityBus_2_4)
-+23.068050749711649 flow(storage_non_convex_electricityBus_2_5)
++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.
 
@@ -53,54 +53,42 @@ c_e_BusBlock_balance(electricityBus_2_5)_:
 +1 flow(storage_non_convex_electricityBus_2_5)
 = 0
 
-c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_0)_:
--1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0)
-+1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-= 0
-
-c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_1)_:
--1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_1)
-+1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_1)
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1)
-= 0
-
-c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_2)_:
--1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_2)
-+1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_2)
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1)
-+1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2)
-= 0
-
 c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_0)_:
--1 InvestmentFlowBlock_invest(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_invest(storage_non_convex_electricityBus_1)
-+1 InvestmentFlowBlock_old(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_invest(storage_non_convex_electricityBus_2)
-+1 InvestmentFlowBlock_old(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_old_rule_end(electricityBus_storage_non_convex_0)_:
-+1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_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_old_rule_end(electricityBus_storage_non_convex_1)_:
-+1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_1)
+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_old_rule_end(electricityBus_storage_non_convex_2)_:
-+1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_2)
+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)_:
@@ -115,16 +103,16 @@ 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_exo(electricityBus_storage_non_convex_0)_:
-+1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_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_exo(electricityBus_storage_non_convex_1)_:
-+1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_1)
+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_exo(electricityBus_storage_non_convex_2)_:
-+1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_2)
+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)_:
@@ -139,28 +127,22 @@ 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(electricityBus_storage_non_convex_0)_:
-+1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_0)
--1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_0)
--1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_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(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)
+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(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)
+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(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)_:
@@ -175,64 +157,82 @@ c_e_InvestmentFlowBlock_old_rule(storage_non_convex_electricityBus_2)_:
 -1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_2)
 = 0
 
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_0)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 flow(electricityBus_storage_non_convex_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 flow(electricityBus_storage_non_convex_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_1_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1)
-+1 flow(electricityBus_storage_non_convex_1_2)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_1_3)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1)
-+1 flow(electricityBus_storage_non_convex_1_3)
-<= 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_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_2_4)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2)
-+1 flow(electricityBus_storage_non_convex_2_4)
-<= 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_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_2_5)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2)
-+1 flow(electricityBus_storage_non_convex_2_5)
-<= 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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0)
 +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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1)
 +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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1)
 +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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2)
 +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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2)
 +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)_:
@@ -242,16 +242,16 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_0)_:
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_1)_:
 -1 GenericInvestmentStorageBlock_invest(storage_non_convex_1)
-+1 GenericInvestmentStorageBlock_old(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_old(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)_:
@@ -279,9 +279,9 @@ c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_non_convex_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_old_rule(storage_non_convex_0)_:
-+1 GenericInvestmentStorageBlock_old(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)_:
@@ -297,128 +297,128 @@ c_e_GenericInvestmentStorageBlock_old_rule(storage_non_convex_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_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_0_1)
+-0.97 flow(electricityBus_storage_non_convex_0_1)
 +1.1627906976744187 flow(storage_non_convex_electricityBus_0_1)
++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1)
+-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0)
 = 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.96999999999999997 flow(electricityBus_storage_non_convex_1_2)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_1_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.96999999999999997 flow(electricityBus_storage_non_convex_1_3)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_1_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.96999999999999997 flow(electricityBus_storage_non_convex_2_4)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_2_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.96999999999999997 flow(electricityBus_storage_non_convex_2_5)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_2_5)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_0)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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.90000000000000002 GenericInvestmentStorageBlock_total(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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_1)
 <= 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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_1)
 <= 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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_2)
 <= 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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_2)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_1)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_1)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_2)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_2)
 <= 0
 
 c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_0)_:
@@ -451,9 +451,6 @@ c_l_GenericInvestmentStorageBlock_limit_min(storage_non_convex_2)_:
 -19 GenericInvestmentStorageBlock_invest_status(storage_non_convex_2)
 >= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
    0 <= flow(electricityBus_storage_non_convex_0_0) <= +inf
    0 <= flow(electricityBus_storage_non_convex_0_1) <= +inf
@@ -467,50 +464,46 @@ bounds
    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 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_2) <= +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_total(electricityBus_storage_non_convex_2) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_storage_non_convex_0) <= +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(storage_non_convex_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_old(storage_non_convex_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_old(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_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_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_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 <= 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(storage_non_convex_0) <= 1454
-   0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_1) <= 1454
-   0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_2) <= 1454
+   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_total(storage_non_convex_2) <= +inf
-   0 <= GenericInvestmentStorageBlock_old(storage_non_convex_0) <= +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
@@ -518,9 +511,13 @@ bounds
    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_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
+   0 <= GenericInvestmentStorageBlock_old(storage_non_convex_0) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_1) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) <= +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)
diff --git a/tests/lp_files/storage_invest_without_offset.lp b/tests/lp_files/storage_invest_without_offset.lp
index 128f4afd..248ce684 100644
--- a/tests/lp_files/storage_invest_without_offset.lp
+++ b/tests/lp_files/storage_invest_without_offset.lp
@@ -2,13 +2,13 @@
 
 min 
 objective:
-+141 GenericInvestmentStorageBlock_invest(storage_non_convex_0)
 +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.
 
@@ -27,44 +27,44 @@ c_e_BusBlock_balance(electricityBus_0_2)_:
 +1 flow(storage_non_convex_electricityBus_0_2)
 = 0
 
-c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_0)_:
--1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0)
-+1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-= 0
-
 c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_0)_:
--1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0)
 +1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0)
+-1 InvestmentFlowBlock_invest(storage_non_convex_electricityBus_0)
 = 0
 
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_0)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 flow(electricityBus_storage_non_convex_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 flow(electricityBus_storage_non_convex_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 flow(electricityBus_storage_non_convex_0_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_u_InvestmentFlowBlock_max(storage_non_convex_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0)
 +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_0_2)_:
--1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0)
 +1 flow(storage_non_convex_electricityBus_0_2)
+-1 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0)
+<= 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_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)_:
@@ -73,29 +73,29 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_0)_:
 = 0
 
 c_u_GenericInvestmentStorageBlock_init_content_limit(storage_non_convex)_:
-+1 GenericInvestmentStorageBlock_init_content(storage_non_convex)
 -1 GenericInvestmentStorageBlock_invest(storage_non_convex_0)
++1 GenericInvestmentStorageBlock_init_content(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_0)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_0_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.96999999999999997 flow(electricityBus_storage_non_convex_0_1)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_0_2)
 = 0
 
 c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_non_convex)_:
@@ -104,43 +104,43 @@ c_e_GenericInvestmentStorageBlock_balanced_cstr(storage_non_convex)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_0)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
+-0.9 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 +1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0)
--0.90000000000000002 GenericInvestmentStorageBlock_total(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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 0
 
 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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 0
 
 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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 0
 
 c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_0)_:
@@ -153,9 +153,6 @@ c_l_GenericInvestmentStorageBlock_limit_min(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_0) <= +inf
    0 <= flow(electricityBus_storage_non_convex_0_1) <= +inf
@@ -163,16 +160,16 @@ bounds
    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 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) <= +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_total(storage_non_convex_electricityBus_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_0) <= 244
-   0 <= GenericInvestmentStorageBlock_total(storage_non_convex_0) <= +inf
-   0 <= GenericInvestmentStorageBlock_init_content(storage_non_convex) <= +inf
    0 <= GenericInvestmentStorageBlock_invest_status(storage_non_convex_0) <= 1
 binary
   GenericInvestmentStorageBlock_invest_status(storage_non_convex_0)
diff --git a/tests/lp_files/storage_invest_without_offset_multi_period.lp b/tests/lp_files/storage_invest_without_offset_multi_period.lp
index 87ca2f0f..327b74c9 100644
--- a/tests/lp_files/storage_invest_without_offset_multi_period.lp
+++ b/tests/lp_files/storage_invest_without_offset_multi_period.lp
@@ -2,21 +2,21 @@
 
 min 
 objective:
-+172.46194511331876 GenericInvestmentStorageBlock_invest(storage_non_convex_0)
-+169.08033834639093 GenericInvestmentStorageBlock_invest(storage_non_convex_1)
-+165.76503759450091 GenericInvestmentStorageBlock_invest(storage_non_convex_2)
 +56 flow(electricityBus_storage_non_convex_0_0)
 +56 flow(electricityBus_storage_non_convex_0_1)
-+54.901960784313722 flow(electricityBus_storage_non_convex_1_2)
-+54.901960784313722 flow(electricityBus_storage_non_convex_1_3)
-+53.825451749327179 flow(electricityBus_storage_non_convex_2_4)
-+53.825451749327179 flow(electricityBus_storage_non_convex_2_5)
++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.068050749711649 flow(storage_non_convex_electricityBus_2_4)
-+23.068050749711649 flow(storage_non_convex_electricityBus_2_5)
++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.
 
@@ -50,54 +50,42 @@ c_e_BusBlock_balance(electricityBus_2_5)_:
 +1 flow(storage_non_convex_electricityBus_2_5)
 = 0
 
-c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_0)_:
--1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0)
-+1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-= 0
-
-c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_1)_:
--1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_1)
-+1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_1)
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1)
-= 0
-
-c_e_InvestmentFlowBlock_total_rule(electricityBus_storage_non_convex_2)_:
--1 InvestmentFlowBlock_invest(electricityBus_storage_non_convex_2)
-+1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_2)
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1)
-+1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2)
-= 0
-
 c_e_InvestmentFlowBlock_total_rule(storage_non_convex_electricityBus_0)_:
--1 InvestmentFlowBlock_invest(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_invest(storage_non_convex_electricityBus_1)
-+1 InvestmentFlowBlock_old(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_invest(storage_non_convex_electricityBus_2)
-+1 InvestmentFlowBlock_old(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_old_rule_end(electricityBus_storage_non_convex_0)_:
-+1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_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_old_rule_end(electricityBus_storage_non_convex_1)_:
-+1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_1)
+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_old_rule_end(electricityBus_storage_non_convex_2)_:
-+1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_2)
+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)_:
@@ -112,16 +100,16 @@ 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_exo(electricityBus_storage_non_convex_0)_:
-+1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_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_exo(electricityBus_storage_non_convex_1)_:
-+1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_1)
+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_exo(electricityBus_storage_non_convex_2)_:
-+1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_2)
+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)_:
@@ -136,28 +124,22 @@ 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(electricityBus_storage_non_convex_0)_:
-+1 InvestmentFlowBlock_old(electricityBus_storage_non_convex_0)
--1 InvestmentFlowBlock_old_end(electricityBus_storage_non_convex_0)
--1 InvestmentFlowBlock_old_exo(electricityBus_storage_non_convex_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(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)
+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(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)
+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(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)_:
@@ -172,64 +154,82 @@ c_e_InvestmentFlowBlock_old_rule(storage_non_convex_electricityBus_2)_:
 -1 InvestmentFlowBlock_old_exo(storage_non_convex_electricityBus_2)
 = 0
 
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_0)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 flow(electricityBus_storage_non_convex_0_0)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_0_1)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_0)
-+1 flow(electricityBus_storage_non_convex_0_1)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_1_2)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1)
-+1 flow(electricityBus_storage_non_convex_1_2)
-<= 0
-
-c_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_1_3)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_1)
-+1 flow(electricityBus_storage_non_convex_1_3)
-<= 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_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_2_4)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2)
-+1 flow(electricityBus_storage_non_convex_2_4)
-<= 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_u_InvestmentFlowBlock_max(electricityBus_storage_non_convex_2_5)_:
--1 InvestmentFlowBlock_total(electricityBus_storage_non_convex_2)
-+1 flow(electricityBus_storage_non_convex_2_5)
-<= 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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_0)
 +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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1)
 +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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_1)
 +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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2)
 +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 InvestmentFlowBlock_total(storage_non_convex_electricityBus_2)
 +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)_:
@@ -239,16 +239,16 @@ c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_0)_:
 
 c_e_GenericInvestmentStorageBlock_total_storage_rule(storage_non_convex_1)_:
 -1 GenericInvestmentStorageBlock_invest(storage_non_convex_1)
-+1 GenericInvestmentStorageBlock_old(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_old(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)_:
@@ -276,9 +276,9 @@ c_e_GenericInvestmentStorageBlock_old_rule_exo(storage_non_convex_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_old_rule(storage_non_convex_0)_:
-+1 GenericInvestmentStorageBlock_old(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)_:
@@ -294,128 +294,128 @@ c_e_GenericInvestmentStorageBlock_old_rule(storage_non_convex_2)_:
 = 0
 
 c_e_GenericInvestmentStorageBlock_balance(storage_non_convex_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_0_1)
+-0.97 flow(electricityBus_storage_non_convex_0_1)
 +1.1627906976744187 flow(storage_non_convex_electricityBus_0_1)
++1 GenericInvestmentStorageBlock_storage_content(storage_non_convex_1)
+-0.87 GenericInvestmentStorageBlock_storage_content(storage_non_convex_0)
 = 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.96999999999999997 flow(electricityBus_storage_non_convex_1_2)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_1_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.96999999999999997 flow(electricityBus_storage_non_convex_1_3)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_1_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.96999999999999997 flow(electricityBus_storage_non_convex_2_4)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_2_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.96999999999999997 flow(electricityBus_storage_non_convex_2_5)
-+1.1627906976744187 flow(storage_non_convex_electricityBus_2_5)
 = 0
 
 c_e_GenericInvestmentStorageBlock_storage_capacity_inflow(storage_non_convex_0)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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)_:
--0.16666666666666666 GenericInvestmentStorageBlock_total(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.90000000000000002 GenericInvestmentStorageBlock_total(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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_1)
 <= 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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_1)
 <= 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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_2)
 <= 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.90000000000000002 GenericInvestmentStorageBlock_total(storage_non_convex_2)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_0)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_1)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_1)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_2)
 <= 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.10000000000000001 GenericInvestmentStorageBlock_total(storage_non_convex_2)
 <= 0
 
 c_l_GenericInvestmentStorageBlock_limit_max(storage_non_convex_0)_:
@@ -448,9 +448,6 @@ c_l_GenericInvestmentStorageBlock_limit_min(storage_non_convex_2)_:
 -12 GenericInvestmentStorageBlock_invest_status(storage_non_convex_2)
 >= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
    0 <= flow(electricityBus_storage_non_convex_0_0) <= +inf
    0 <= flow(electricityBus_storage_non_convex_0_1) <= +inf
@@ -464,50 +461,43 @@ bounds
    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 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_0) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_1) <= +inf
-   0 <= InvestmentFlowBlock_invest(electricityBus_storage_non_convex_2) <= +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_total(electricityBus_storage_non_convex_2) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_total(storage_non_convex_electricityBus_2) <= +inf
-   0 <= InvestmentFlowBlock_old(electricityBus_storage_non_convex_0) <= +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(storage_non_convex_electricityBus_0) <= +inf
-   0 <= InvestmentFlowBlock_old(storage_non_convex_electricityBus_1) <= +inf
-   0 <= InvestmentFlowBlock_old(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_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_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_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 <= 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(storage_non_convex_0) <= 244
-   0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_1) <= 244
-   0 <= GenericInvestmentStorageBlock_invest(storage_non_convex_2) <= 244
+   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_total(storage_non_convex_2) <= +inf
-   0 <= GenericInvestmentStorageBlock_old(storage_non_convex_0) <= +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
@@ -515,6 +505,13 @@ bounds
    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_1) <= +inf
+   0 <= GenericInvestmentStorageBlock_storage_content(storage_non_convex_0) <= +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
diff --git a/tests/lp_files/storage_level_constraint.lp b/tests/lp_files/storage_level_constraint.lp
index 8310c561..e64ec8e9 100644
--- a/tests/lp_files/storage_level_constraint.lp
+++ b/tests/lp_files/storage_level_constraint.lp
@@ -1,24 +1,24 @@
 \* Source Pyomo model name=Model *\
 
-min
+min 
 objective:
-+0.25 flow(in_0_multiplexer_0_0)
-+0.25 flow(in_0_multiplexer_0_1)
 -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.25 GenericStorageBlock_storage_content(storage_1)
 +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.25 GenericStorageBlock_storage_content(storage_2)
 +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)_:
@@ -32,22 +32,22 @@ c_u_multiplexer_output_active_constraint(out_1_1)_:
 <= 0
 
 c_u_multiplexer_output_constraint(out_0_0_0)_:
-+4 flow(multiplexer_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 flow(multiplexer_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 flow(multiplexer_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 flow(multiplexer_out_1_0_1)
++8.0 flow(multiplexer_out_1_0_1)
 -1 multiplexer_active_output(out_1_1)
 <= 0
 
@@ -61,74 +61,71 @@ c_u_multiplexer_input_active_constraint(in_1_1)_:
 <= 0.25
 
 c_u_multiplexer_input_constraint(in_1_0_0)_:
-+8 flow(in_1_multiplexer_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)_:
-+8 flow(in_1_multiplexer_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(in_0_multiplexer_0_0)
-+1 flow(in_1_multiplexer_0_0)
 -1 flow(multiplexer_out_0_0_0)
 -1 flow(multiplexer_out_1_0_0)
--1 flow(multiplexer_storage_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(in_0_multiplexer_0_1)
-+1 flow(in_1_multiplexer_0_1)
 -1 flow(multiplexer_out_0_0_1)
 -1 flow(multiplexer_out_1_0_1)
--1 flow(multiplexer_storage_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(multiplexer_storage_0_0)
 +1 flow(storage_multiplexer_0_0)
-= 3
+-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(multiplexer_storage_0_1)
 +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
 
-c_e_ONE_VAR_CONSTANT:
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(in_0_multiplexer_0_0) <= 0.5
-   0 <= flow(in_0_multiplexer_0_1) <= 0.5
-   0 <= flow(in_1_multiplexer_0_0) <= 0.125
-   0 <= flow(in_1_multiplexer_0_1) <= 0.125
-   0 <= flow(multiplexer_out_0_0_0) <= 0.25
-   0 <= flow(multiplexer_out_0_0_1) <= 0.25
-   0 <= flow(multiplexer_out_1_0_0) <= 0.125
-   0 <= flow(multiplexer_out_1_0_1) <= 0.125
-   0 <= flow(multiplexer_storage_0_0) <= +inf
-   0 <= flow(multiplexer_storage_0_1) <= +inf
-   0 <= flow(storage_multiplexer_0_0) <= +inf
-   0 <= flow(storage_multiplexer_0_1) <= +inf
+   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 <= GenericStorageBlock_storage_content(storage_1) <= 4
-   0 <= GenericStorageBlock_storage_content(storage_2) <= 4
+   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)
diff --git a/tests/lp_files/storage_multi_period.lp b/tests/lp_files/storage_multi_period.lp
index c86aeff0..8fc17051 100644
--- a/tests/lp_files/storage_multi_period.lp
+++ b/tests/lp_files/storage_multi_period.lp
@@ -4,16 +4,16 @@ min
 objective:
 +56 flow(electricityBus_storage_no_invest_0_0)
 +56 flow(electricityBus_storage_no_invest_0_1)
-+54.901960784313722 flow(electricityBus_storage_no_invest_1_2)
-+54.901960784313722 flow(electricityBus_storage_no_invest_1_3)
-+53.825451749327179 flow(electricityBus_storage_no_invest_2_4)
-+53.825451749327179 flow(electricityBus_storage_no_invest_2_5)
++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.068050749711649 flow(storage_no_invest_electricityBus_2_4)
-+23.068050749711649 flow(storage_no_invest_electricityBus_2_5)
++23.06805074971165 flow(storage_no_invest_electricityBus_2_4)
++23.06805074971165 flow(storage_no_invest_electricityBus_2_5)
 
 s.t.
 
@@ -48,52 +48,49 @@ c_e_BusBlock_balance(electricityBus_2_5)_:
 = 0
 
 c_e_GenericStorageBlock_balance(storage_no_invest_0_0)_:
-+1 GenericStorageBlock_storage_content(storage_no_invest_1)
--0.96999999999999997 flow(electricityBus_storage_no_invest_0_0)
+-0.97 flow(electricityBus_storage_no_invest_0_0)
 +1.1627906976744187 flow(storage_no_invest_electricityBus_0_0)
-= 34800
++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.96999999999999997 flow(electricityBus_storage_no_invest_0_1)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_0_1)
 = 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.96999999999999997 flow(electricityBus_storage_no_invest_1_2)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_1_2)
 = 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.96999999999999997 flow(electricityBus_storage_no_invest_1_3)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_1_3)
 = 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.96999999999999997 flow(electricityBus_storage_no_invest_2_4)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_2_4)
 = 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.96999999999999997 flow(electricityBus_storage_no_invest_2_5)
-+1.1627906976744187 flow(storage_no_invest_electricityBus_2_5)
 = 0
 
 c_e_GenericStorageBlock_balanced_cstr(storage_no_invest)_:
 +1 GenericStorageBlock_storage_content(storage_no_invest_6)
-= 40000
-
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
+= 40000.0
 
 bounds
    0 <= flow(electricityBus_storage_no_invest_0_0) <= 16667
@@ -108,10 +105,10 @@ bounds
    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 <= 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 <= GenericStorageBlock_storage_content(storage_no_invest_4) <= 100000
-   0 <= GenericStorageBlock_storage_content(storage_no_invest_5) <= 100000
-   0 <= GenericStorageBlock_storage_content(storage_no_invest_6) <= 100000
+   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 4689b667..dfe57f12 100644
--- a/tests/lp_files/storage_unbalanced.lp
+++ b/tests/lp_files/storage_unbalanced.lp
@@ -7,53 +7,51 @@ objective:
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage1_0_0)
 +1 flow(storage1_electricityBus_0_0)
+-1 flow(electricityBus_storage1_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage1_0_1)
 +1 flow(storage1_electricityBus_0_1)
+-1 flow(electricityBus_storage1_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_2)_:
--1 flow(electricityBus_storage1_0_2)
 +1 flow(storage1_electricityBus_0_2)
+-1 flow(electricityBus_storage1_0_2)
 = 0
 
 c_e_GenericStorageBlock_balance(storage1_0_0)_:
--1 GenericStorageBlock_storage_content(storage1_0)
-+1 GenericStorageBlock_storage_content(storage1_1)
--1 flow(electricityBus_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)
--1 flow(electricityBus_storage1_0_1)
-+1 flow(storage1_electricityBus_0_1)
 = 0
 
 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_0_2)
-+1 flow(storage1_electricityBus_0_2)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_storage1_0_0) <= +inf
-   0 <= flow(electricityBus_storage1_0_1) <= +inf
-   0 <= flow(electricityBus_storage1_0_2) <= +inf
+   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 <= GenericStorageBlock_storage_content(storage1_0) <= 1111
+   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
index f4f9a488..3cb5b79b 100644
--- a/tests/lp_files/storage_unbalanced_multi_period.lp
+++ b/tests/lp_files/storage_unbalanced_multi_period.lp
@@ -2,100 +2,98 @@
 
 min 
 objective:
-+0 ONE_VAR_CONSTANT
++0.0 ONE_VAR_CONSTANT
 
 s.t.
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
--1 flow(electricityBus_storage1_0_0)
 +1 flow(storage1_electricityBus_0_0)
+-1 flow(electricityBus_storage1_0_0)
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_1)_:
--1 flow(electricityBus_storage1_0_1)
 +1 flow(storage1_electricityBus_0_1)
+-1 flow(electricityBus_storage1_0_1)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_2)_:
--1 flow(electricityBus_storage1_1_2)
 +1 flow(storage1_electricityBus_1_2)
+-1 flow(electricityBus_storage1_1_2)
 = 0
 
 c_e_BusBlock_balance(electricityBus_1_3)_:
--1 flow(electricityBus_storage1_1_3)
 +1 flow(storage1_electricityBus_1_3)
+-1 flow(electricityBus_storage1_1_3)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_4)_:
--1 flow(electricityBus_storage1_2_4)
 +1 flow(storage1_electricityBus_2_4)
+-1 flow(electricityBus_storage1_2_4)
 = 0
 
 c_e_BusBlock_balance(electricityBus_2_5)_:
--1 flow(electricityBus_storage1_2_5)
 +1 flow(storage1_electricityBus_2_5)
+-1 flow(electricityBus_storage1_2_5)
 = 0
 
 c_e_GenericStorageBlock_balance(storage1_0_0)_:
--1 GenericStorageBlock_storage_content(storage1_0)
-+1 GenericStorageBlock_storage_content(storage1_1)
--1 flow(electricityBus_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)
--1 flow(electricityBus_storage1_0_1)
-+1 flow(storage1_electricityBus_0_1)
 = 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)
--1 flow(electricityBus_storage1_1_2)
-+1 flow(storage1_electricityBus_1_2)
 = 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)
--1 flow(electricityBus_storage1_1_3)
-+1 flow(storage1_electricityBus_1_3)
 = 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)
--1 flow(electricityBus_storage1_2_4)
-+1 flow(storage1_electricityBus_2_4)
 = 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)
--1 flow(electricityBus_storage1_2_5)
-+1 flow(storage1_electricityBus_2_5)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 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
+   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 <= GenericStorageBlock_storage_content(storage1_0) <= 1111
+   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
diff --git a/tests/lp_files/summed_min_source.lp b/tests/lp_files/summed_min_source.lp
index e14bd4ad..f2cf9022 100644
--- a/tests/lp_files/summed_min_source.lp
+++ b/tests/lp_files/summed_min_source.lp
@@ -32,11 +32,8 @@ c_l_SimpleFlowBlock_full_load_time_min_constr(electricityBus_excess)_:
 +1 flow(electricityBus_excess_0_2)
 >= 30
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_excess_0_0) <= 8
-   0 <= flow(electricityBus_excess_0_1) <= 8
-   0 <= flow(electricityBus_excess_0_2) <= 8
+   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
index 8adcc672..ed2085dc 100644
--- a/tests/lp_files/summed_min_source_multi_period.lp
+++ b/tests/lp_files/summed_min_source_multi_period.lp
@@ -53,14 +53,11 @@ c_l_SimpleFlowBlock_full_load_time_min_constr(electricityBus_excess)_:
 +1 flow(electricityBus_excess_2_5)
 >= 30
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   0 <= flow(electricityBus_excess_0_0) <= 8
-   0 <= flow(electricityBus_excess_0_1) <= 8
-   0 <= flow(electricityBus_excess_1_2) <= 8
-   0 <= flow(electricityBus_excess_1_3) <= 8
-   0 <= flow(electricityBus_excess_2_4) <= 8
-   0 <= flow(electricityBus_excess_2_5) <= 8
+   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
index 3f5f3380..9e8231ab 100644
--- a/tests/lp_files/transformer.lp
+++ b/tests/lp_files/transformer.lp
@@ -60,79 +60,76 @@ c_e_BusBlock_balance(thermalBus_0_2)_:
 = 0
 
 c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(biomassBus_powerplantGasBiomass_0_0)
--0.10000000000000001 flow(powerplantGasBiomass_electricityBus_0_0)
+-0.1 flow(powerplantGasBiomass_electricityBus_0_0)
++0.3 flow(biomassBus_powerplantGasBiomass_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(biomassBus_powerplantGasBiomass_0_1)
--0.10000000000000001 flow(powerplantGasBiomass_electricityBus_0_1)
-= 0
-
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_2)_:
-+0.29999999999999999 flow(biomassBus_powerplantGasBiomass_0_2)
--0.10000000000000001 flow(powerplantGasBiomass_electricityBus_0_2)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_0)_:
+-0.4 flow(powerplantGasBiomass_electricityBus_0_0)
++0.3 flow(gasBus_powerplantGasBiomass_0_0)
 = 0
 
 c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_0)_:
+-0.1 flow(powerplantGasBiomass_thermalBus_0_0)
 +0.5 flow(biomassBus_powerplantGasBiomass_0_0)
--0.10000000000000001 flow(powerplantGasBiomass_thermalBus_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_1)_:
-+0.5 flow(biomassBus_powerplantGasBiomass_0_1)
--0.10000000000000001 flow(powerplantGasBiomass_thermalBus_0_1)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_0)_:
+-0.4 flow(powerplantGasBiomass_thermalBus_0_0)
++0.5 flow(gasBus_powerplantGasBiomass_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_2)_:
-+0.5 flow(biomassBus_powerplantGasBiomass_0_2)
--0.10000000000000001 flow(powerplantGasBiomass_thermalBus_0_2)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_1)_:
+-0.1 flow(powerplantGasBiomass_electricityBus_0_1)
++0.3 flow(biomassBus_powerplantGasBiomass_0_1)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(gasBus_powerplantGasBiomass_0_0)
--0.40000000000000002 flow(powerplantGasBiomass_electricityBus_0_0)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_1)_:
+-0.4 flow(powerplantGasBiomass_electricityBus_0_1)
++0.3 flow(gasBus_powerplantGasBiomass_0_1)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(gasBus_powerplantGasBiomass_0_1)
--0.40000000000000002 flow(powerplantGasBiomass_electricityBus_0_1)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_1)_:
+-0.1 flow(powerplantGasBiomass_thermalBus_0_1)
++0.5 flow(biomassBus_powerplantGasBiomass_0_1)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_2)_:
-+0.29999999999999999 flow(gasBus_powerplantGasBiomass_0_2)
--0.40000000000000002 flow(powerplantGasBiomass_electricityBus_0_2)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_1)_:
+-0.4 flow(powerplantGasBiomass_thermalBus_0_1)
++0.5 flow(gasBus_powerplantGasBiomass_0_1)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_0)_:
-+0.5 flow(gasBus_powerplantGasBiomass_0_0)
--0.40000000000000002 flow(powerplantGasBiomass_thermalBus_0_0)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_2)_:
+-0.1 flow(powerplantGasBiomass_electricityBus_0_2)
++0.3 flow(biomassBus_powerplantGasBiomass_0_2)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_1)_:
-+0.5 flow(gasBus_powerplantGasBiomass_0_1)
--0.40000000000000002 flow(powerplantGasBiomass_thermalBus_0_1)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_2)_:
+-0.4 flow(powerplantGasBiomass_electricityBus_0_2)
++0.3 flow(gasBus_powerplantGasBiomass_0_2)
+= 0
+
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_2)_:
+-0.1 flow(powerplantGasBiomass_thermalBus_0_2)
++0.5 flow(biomassBus_powerplantGasBiomass_0_2)
 = 0
 
 c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_2)_:
+-0.4 flow(powerplantGasBiomass_thermalBus_0_2)
 +0.5 flow(gasBus_powerplantGasBiomass_0_2)
--0.40000000000000002 flow(powerplantGasBiomass_thermalBus_0_2)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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
-   0 <= flow(powerplantGasBiomass_electricityBus_0_0) <= +inf
-   0 <= flow(powerplantGasBiomass_electricityBus_0_1) <= +inf
-   0 <= flow(powerplantGasBiomass_electricityBus_0_2) <= +inf
-   0 <= flow(powerplantGasBiomass_thermalBus_0_0) <= 50000000000
-   0 <= flow(powerplantGasBiomass_thermalBus_0_1) <= 50000000000
-   0 <= flow(powerplantGasBiomass_thermalBus_0_2) <= 50000000000
 end
diff --git a/tests/lp_files/transformer_invest.lp b/tests/lp_files/transformer_invest.lp
index beabc278..5ca83c5c 100644
--- a/tests/lp_files/transformer_invest.lp
+++ b/tests/lp_files/transformer_invest.lp
@@ -24,18 +24,6 @@ c_e_BusBlock_balance(coalBus_0_2)_:
 +1 flow(coalBus_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(gasBus_0_0)_:
 +1 flow(gasBus_powerplant_gas_coal_0_0)
 = 0
@@ -48,6 +36,18 @@ 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
@@ -61,63 +61,63 @@ c_e_BusBlock_balance(thermalBus_0_2)_:
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0_0)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0_0)
+-0.2 flow(powerplant_gas_coal_electricityBus_0_0)
++0.3 flow(coalBus_powerplant_gas_coal_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0_1)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0_1)
-= 0
-
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_2)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0_2)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0_2)
+c_e_TransformerBlock_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_TransformerBlock_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.20000000000000001 flow(powerplant_gas_coal_thermalBus_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_1)_:
-+0.5 flow(coalBus_powerplant_gas_coal_0_1)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_0_1)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_2)_:
-+0.5 flow(coalBus_powerplant_gas_coal_0_2)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_0_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0_0)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0_0)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0_1)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0_1)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_2)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0_2)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_0)_:
-+0.5 flow(gasBus_powerplant_gas_coal_0_0)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_0_0)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_1)_:
-+0.5 flow(gasBus_powerplant_gas_coal_0_1)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_0_1)
+c_e_TransformerBlock_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_TransformerBlock_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_TransformerBlock_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.57999999999999996 flow(powerplant_gas_coal_thermalBus_0_2)
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_:
@@ -126,36 +126,33 @@ c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0)
 +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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0)
 +1 flow(powerplant_gas_coal_electricityBus_0_2)
+-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) <= 1000
+   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/transformer_invest_multi_period.lp b/tests/lp_files/transformer_invest_multi_period.lp
index 8f1c0c55..5de36391 100644
--- a/tests/lp_files/transformer_invest_multi_period.lp
+++ b/tests/lp_files/transformer_invest_multi_period.lp
@@ -3,12 +3,12 @@
 min 
 objective:
 +24.462687250116133 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0)
-+23.983026715800129 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_1)
++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.019607843137251 flow(powerplant_gas_coal_electricityBus_1_2)
-+49.019607843137251 flow(powerplant_gas_coal_electricityBus_1_3)
++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)
@@ -44,30 +44,6 @@ c_e_BusBlock_balance(coalBus_2_5)_:
 +1 flow(coalBus_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(gasBus_0_0)_:
 +1 flow(gasBus_powerplant_gas_coal_0_0)
 = 0
@@ -92,6 +68,30 @@ 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
@@ -117,123 +117,123 @@ c_e_BusBlock_balance(thermalBus_2_5)_:
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0_0)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0_0)
+-0.2 flow(powerplant_gas_coal_electricityBus_0_0)
++0.3 flow(coalBus_powerplant_gas_coal_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0_1)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0_1)
-= 0
-
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_1_2)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_1_2)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_1_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_1_3)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_1_3)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_1_3)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_2_4)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_2_4)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_2_4)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_2_5)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_2_5)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_2_5)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_0)_:
-+0.5 flow(coalBus_powerplant_gas_coal_0_0)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_0_0)
+c_e_TransformerBlock_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_TransformerBlock_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.20000000000000001 flow(powerplant_gas_coal_thermalBus_0_1)
 = 0
 
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_1_2)_:
-+0.5 flow(coalBus_powerplant_gas_coal_1_2)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_1_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_1_3)_:
-+0.5 flow(coalBus_powerplant_gas_coal_1_3)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_1_3)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_2_4)_:
-+0.5 flow(coalBus_powerplant_gas_coal_2_4)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_2_4)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_2_5)_:
-+0.5 flow(coalBus_powerplant_gas_coal_2_5)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_2_5)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0_0)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0_0)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0_1)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0_1)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_1_2)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_1_2)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_1_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_1_3)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_1_3)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_1_3)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_2_4)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_2_4)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_2_4)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_2_5)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_2_5)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_2_5)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_0)_:
-+0.5 flow(gasBus_powerplant_gas_coal_0_0)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_0_0)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_1)_:
-+0.5 flow(gasBus_powerplant_gas_coal_0_1)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_0_1)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_1_2)_:
-+0.5 flow(gasBus_powerplant_gas_coal_1_2)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_1_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_1_3)_:
-+0.5 flow(gasBus_powerplant_gas_coal_1_3)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_1_3)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_2_4)_:
-+0.5 flow(gasBus_powerplant_gas_coal_2_4)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_2_4)
+c_e_TransformerBlock_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_TransformerBlock_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_TransformerBlock_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.57999999999999996 flow(powerplant_gas_coal_thermalBus_2_5)
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_:
@@ -243,16 +243,16 @@ c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_1)_:
 -1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -280,9 +280,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_coal_electricityBus_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(powerplant_gas_coal_electricityBus_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -298,51 +298,39 @@ c_e_InvestmentFlowBlock_old_rule(powerplant_gas_coal_electricityBus_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0)
 +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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1)
 +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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1)
 +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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2)
 +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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2)
 +1 flow(powerplant_gas_coal_electricityBus_2_5)
+-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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
@@ -355,14 +343,22 @@ bounds
    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 <= 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(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_total(powerplant_gas_coal_electricityBus_2) <= +inf
-   0 <= InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_0) <= +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
@@ -370,4 +366,5 @@ bounds
    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/transformer_invest_with_existing.lp b/tests/lp_files/transformer_invest_with_existing.lp
index 0087c2ec..5299b97b 100644
--- a/tests/lp_files/transformer_invest_with_existing.lp
+++ b/tests/lp_files/transformer_invest_with_existing.lp
@@ -24,18 +24,6 @@ c_e_BusBlock_balance(coalBus_0_2)_:
 +1 flow(coalBus_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(gasBus_0_0)_:
 +1 flow(gasBus_powerplant_gas_coal_0_0)
 = 0
@@ -48,6 +36,18 @@ 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
@@ -61,63 +61,63 @@ c_e_BusBlock_balance(thermalBus_0_2)_:
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0_0)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0_0)
+-0.2 flow(powerplant_gas_coal_electricityBus_0_0)
++0.3 flow(coalBus_powerplant_gas_coal_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0_1)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0_1)
-= 0
-
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_2)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0_2)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0_2)
+c_e_TransformerBlock_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_TransformerBlock_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.20000000000000001 flow(powerplant_gas_coal_thermalBus_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_1)_:
-+0.5 flow(coalBus_powerplant_gas_coal_0_1)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_0_1)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_2)_:
-+0.5 flow(coalBus_powerplant_gas_coal_0_2)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_0_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0_0)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0_0)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0_1)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0_1)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_2)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0_2)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_0)_:
-+0.5 flow(gasBus_powerplant_gas_coal_0_0)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_0_0)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_1)_:
-+0.5 flow(gasBus_powerplant_gas_coal_0_1)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_0_1)
+c_e_TransformerBlock_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_TransformerBlock_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_TransformerBlock_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.57999999999999996 flow(powerplant_gas_coal_thermalBus_0_2)
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_:
@@ -126,36 +126,33 @@ c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_:
 = 200
 
 c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0)
 +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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0)
 +1 flow(powerplant_gas_coal_electricityBus_0_2)
+-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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 <= InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0) <= 1000
+   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/transformer_invest_with_existing_multi_period.lp b/tests/lp_files/transformer_invest_with_existing_multi_period.lp
index 1757b593..f5f4ac93 100644
--- a/tests/lp_files/transformer_invest_with_existing_multi_period.lp
+++ b/tests/lp_files/transformer_invest_with_existing_multi_period.lp
@@ -3,12 +3,12 @@
 min 
 objective:
 +20.601980198019806 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_0)
-+20.198019801980202 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_1)
++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.019607843137251 flow(powerplant_gas_coal_electricityBus_1_2)
-+49.019607843137251 flow(powerplant_gas_coal_electricityBus_1_3)
++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)
@@ -44,30 +44,6 @@ c_e_BusBlock_balance(coalBus_2_5)_:
 +1 flow(coalBus_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(gasBus_0_0)_:
 +1 flow(gasBus_powerplant_gas_coal_0_0)
 = 0
@@ -92,6 +68,30 @@ 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
@@ -117,123 +117,123 @@ c_e_BusBlock_balance(thermalBus_2_5)_:
 = 0
 
 c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0_0)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0_0)
+-0.2 flow(powerplant_gas_coal_electricityBus_0_0)
++0.3 flow(coalBus_powerplant_gas_coal_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_0_1)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_0_1)
-= 0
-
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_1_2)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_1_2)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_1_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_1_3)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_1_3)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_1_3)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_2_4)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_2_4)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_2_4)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_electricityBus_2_5)_:
-+0.29999999999999999 flow(coalBus_powerplant_gas_coal_2_5)
--0.20000000000000001 flow(powerplant_gas_coal_electricityBus_2_5)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_0_0)_:
-+0.5 flow(coalBus_powerplant_gas_coal_0_0)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_0_0)
+c_e_TransformerBlock_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_TransformerBlock_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.20000000000000001 flow(powerplant_gas_coal_thermalBus_0_1)
 = 0
 
-c_e_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_1_2)_:
-+0.5 flow(coalBus_powerplant_gas_coal_1_2)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_1_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_1_3)_:
-+0.5 flow(coalBus_powerplant_gas_coal_1_3)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_1_3)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_2_4)_:
-+0.5 flow(coalBus_powerplant_gas_coal_2_4)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_2_4)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_coalBus_thermalBus_2_5)_:
-+0.5 flow(coalBus_powerplant_gas_coal_2_5)
--0.20000000000000001 flow(powerplant_gas_coal_thermalBus_2_5)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0_0)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0_0)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_0_1)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_0_1)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_1_2)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_1_2)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_1_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_1_3)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_1_3)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_1_3)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_2_4)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_2_4)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_2_4)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_electricityBus_2_5)_:
-+0.29999999999999999 flow(gasBus_powerplant_gas_coal_2_5)
--0.57999999999999996 flow(powerplant_gas_coal_electricityBus_2_5)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_0)_:
-+0.5 flow(gasBus_powerplant_gas_coal_0_0)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_0_0)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_0_1)_:
-+0.5 flow(gasBus_powerplant_gas_coal_0_1)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_0_1)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_1_2)_:
-+0.5 flow(gasBus_powerplant_gas_coal_1_2)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_1_2)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_1_3)_:
-+0.5 flow(gasBus_powerplant_gas_coal_1_3)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_1_3)
+c_e_TransformerBlock_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_TransformerBlock_relation(powerplant_gas_coal_gasBus_thermalBus_2_4)_:
-+0.5 flow(gasBus_powerplant_gas_coal_2_4)
--0.57999999999999996 flow(powerplant_gas_coal_thermalBus_2_4)
+c_e_TransformerBlock_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_TransformerBlock_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_TransformerBlock_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.57999999999999996 flow(powerplant_gas_coal_thermalBus_2_5)
 = 0
 
 c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_:
@@ -243,16 +243,16 @@ c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_0)_:
 
 c_e_InvestmentFlowBlock_total_rule(powerplant_gas_coal_electricityBus_1)_:
 -1 InvestmentFlowBlock_invest(powerplant_gas_coal_electricityBus_1)
-+1 InvestmentFlowBlock_old(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_old(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)_:
@@ -281,9 +281,9 @@ c_e_InvestmentFlowBlock_old_rule_exo(powerplant_gas_coal_electricityBus_2)_:
 = 0
 
 c_e_InvestmentFlowBlock_old_rule(powerplant_gas_coal_electricityBus_0)_:
-+1 InvestmentFlowBlock_old(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)_:
@@ -299,51 +299,39 @@ c_e_InvestmentFlowBlock_old_rule(powerplant_gas_coal_electricityBus_2)_:
 = 0
 
 c_u_InvestmentFlowBlock_max(powerplant_gas_coal_electricityBus_0_0)_:
--1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_0)
 +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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1)
 +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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_1)
 +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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2)
 +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 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2)
 +1 flow(powerplant_gas_coal_electricityBus_2_5)
+-1 InvestmentFlowBlock_total(powerplant_gas_coal_electricityBus_2)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
-   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_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
@@ -356,14 +344,22 @@ bounds
    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 <= 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(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_total(powerplant_gas_coal_electricityBus_2) <= +inf
-   0 <= InvestmentFlowBlock_old(powerplant_gas_coal_electricityBus_0) <= +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
@@ -371,4 +367,5 @@ bounds
    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/transformer_multi_period.lp b/tests/lp_files/transformer_multi_period.lp
index 73a73ca1..0635e894 100644
--- a/tests/lp_files/transformer_multi_period.lp
+++ b/tests/lp_files/transformer_multi_period.lp
@@ -4,8 +4,8 @@ min
 objective:
 +50 flow(powerplantGasBiomass_electricityBus_0_0)
 +50 flow(powerplantGasBiomass_electricityBus_0_1)
-+49.019607843137251 flow(powerplantGasBiomass_electricityBus_1_2)
-+49.019607843137251 flow(powerplantGasBiomass_electricityBus_1_3)
++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)
@@ -114,129 +114,138 @@ c_e_BusBlock_balance(thermalBus_2_5)_:
 = 0
 
 c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(biomassBus_powerplantGasBiomass_0_0)
--0.10000000000000001 flow(powerplantGasBiomass_electricityBus_0_0)
+-0.1 flow(powerplantGasBiomass_electricityBus_0_0)
++0.3 flow(biomassBus_powerplantGasBiomass_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(biomassBus_powerplantGasBiomass_0_1)
--0.10000000000000001 flow(powerplantGasBiomass_electricityBus_0_1)
-= 0
-
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_1_2)_:
-+0.29999999999999999 flow(biomassBus_powerplantGasBiomass_1_2)
--0.10000000000000001 flow(powerplantGasBiomass_electricityBus_1_2)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_0)_:
+-0.4 flow(powerplantGasBiomass_electricityBus_0_0)
++0.3 flow(gasBus_powerplantGasBiomass_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_1_3)_:
-+0.29999999999999999 flow(biomassBus_powerplantGasBiomass_1_3)
--0.10000000000000001 flow(powerplantGasBiomass_electricityBus_1_3)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_0)_:
+-0.1 flow(powerplantGasBiomass_thermalBus_0_0)
++0.5 flow(biomassBus_powerplantGasBiomass_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_2_4)_:
-+0.29999999999999999 flow(biomassBus_powerplantGasBiomass_2_4)
--0.10000000000000001 flow(powerplantGasBiomass_electricityBus_2_4)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_0)_:
+-0.4 flow(powerplantGasBiomass_thermalBus_0_0)
++0.5 flow(gasBus_powerplantGasBiomass_0_0)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_2_5)_:
-+0.29999999999999999 flow(biomassBus_powerplantGasBiomass_2_5)
--0.10000000000000001 flow(powerplantGasBiomass_electricityBus_2_5)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_0_1)_:
+-0.1 flow(powerplantGasBiomass_electricityBus_0_1)
++0.3 flow(biomassBus_powerplantGasBiomass_0_1)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_0)_:
-+0.5 flow(biomassBus_powerplantGasBiomass_0_0)
--0.10000000000000001 flow(powerplantGasBiomass_thermalBus_0_0)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_1)_:
+-0.4 flow(powerplantGasBiomass_electricityBus_0_1)
++0.3 flow(gasBus_powerplantGasBiomass_0_1)
 = 0
 
 c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_0_1)_:
+-0.1 flow(powerplantGasBiomass_thermalBus_0_1)
 +0.5 flow(biomassBus_powerplantGasBiomass_0_1)
--0.10000000000000001 flow(powerplantGasBiomass_thermalBus_0_1)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_1_2)_:
-+0.5 flow(biomassBus_powerplantGasBiomass_1_2)
--0.10000000000000001 flow(powerplantGasBiomass_thermalBus_1_2)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_1)_:
+-0.4 flow(powerplantGasBiomass_thermalBus_0_1)
++0.5 flow(gasBus_powerplantGasBiomass_0_1)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_1_3)_:
-+0.5 flow(biomassBus_powerplantGasBiomass_1_3)
--0.10000000000000001 flow(powerplantGasBiomass_thermalBus_1_3)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_1_2)_:
+-0.1 flow(powerplantGasBiomass_electricityBus_1_2)
++0.3 flow(biomassBus_powerplantGasBiomass_1_2)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_2_4)_:
-+0.5 flow(biomassBus_powerplantGasBiomass_2_4)
--0.10000000000000001 flow(powerplantGasBiomass_thermalBus_2_4)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_1_2)_:
+-0.4 flow(powerplantGasBiomass_electricityBus_1_2)
++0.3 flow(gasBus_powerplantGasBiomass_1_2)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_2_5)_:
-+0.5 flow(biomassBus_powerplantGasBiomass_2_5)
--0.10000000000000001 flow(powerplantGasBiomass_thermalBus_2_5)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_1_2)_:
+-0.1 flow(powerplantGasBiomass_thermalBus_1_2)
++0.5 flow(biomassBus_powerplantGasBiomass_1_2)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_0)_:
-+0.29999999999999999 flow(gasBus_powerplantGasBiomass_0_0)
--0.40000000000000002 flow(powerplantGasBiomass_electricityBus_0_0)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_1_2)_:
+-0.4 flow(powerplantGasBiomass_thermalBus_1_2)
++0.5 flow(gasBus_powerplantGasBiomass_1_2)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_0_1)_:
-+0.29999999999999999 flow(gasBus_powerplantGasBiomass_0_1)
--0.40000000000000002 flow(powerplantGasBiomass_electricityBus_0_1)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_1_3)_:
+-0.1 flow(powerplantGasBiomass_electricityBus_1_3)
++0.3 flow(biomassBus_powerplantGasBiomass_1_3)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_1_2)_:
-+0.29999999999999999 flow(gasBus_powerplantGasBiomass_1_2)
--0.40000000000000002 flow(powerplantGasBiomass_electricityBus_1_2)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_1_3)_:
+-0.4 flow(powerplantGasBiomass_electricityBus_1_3)
++0.3 flow(gasBus_powerplantGasBiomass_1_3)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_1_3)_:
-+0.29999999999999999 flow(gasBus_powerplantGasBiomass_1_3)
--0.40000000000000002 flow(powerplantGasBiomass_electricityBus_1_3)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_1_3)_:
+-0.1 flow(powerplantGasBiomass_thermalBus_1_3)
++0.5 flow(biomassBus_powerplantGasBiomass_1_3)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_2_4)_:
-+0.29999999999999999 flow(gasBus_powerplantGasBiomass_2_4)
--0.40000000000000002 flow(powerplantGasBiomass_electricityBus_2_4)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_1_3)_:
+-0.4 flow(powerplantGasBiomass_thermalBus_1_3)
++0.5 flow(gasBus_powerplantGasBiomass_1_3)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_2_5)_:
-+0.29999999999999999 flow(gasBus_powerplantGasBiomass_2_5)
--0.40000000000000002 flow(powerplantGasBiomass_electricityBus_2_5)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_2_4)_:
+-0.1 flow(powerplantGasBiomass_electricityBus_2_4)
++0.3 flow(biomassBus_powerplantGasBiomass_2_4)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_0)_:
-+0.5 flow(gasBus_powerplantGasBiomass_0_0)
--0.40000000000000002 flow(powerplantGasBiomass_thermalBus_0_0)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_2_4)_:
+-0.4 flow(powerplantGasBiomass_electricityBus_2_4)
++0.3 flow(gasBus_powerplantGasBiomass_2_4)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_0_1)_:
-+0.5 flow(gasBus_powerplantGasBiomass_0_1)
--0.40000000000000002 flow(powerplantGasBiomass_thermalBus_0_1)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_2_4)_:
+-0.1 flow(powerplantGasBiomass_thermalBus_2_4)
++0.5 flow(biomassBus_powerplantGasBiomass_2_4)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_1_2)_:
-+0.5 flow(gasBus_powerplantGasBiomass_1_2)
--0.40000000000000002 flow(powerplantGasBiomass_thermalBus_1_2)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_2_4)_:
+-0.4 flow(powerplantGasBiomass_thermalBus_2_4)
++0.5 flow(gasBus_powerplantGasBiomass_2_4)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_1_3)_:
-+0.5 flow(gasBus_powerplantGasBiomass_1_3)
--0.40000000000000002 flow(powerplantGasBiomass_thermalBus_1_3)
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_electricityBus_2_5)_:
+-0.1 flow(powerplantGasBiomass_electricityBus_2_5)
++0.3 flow(biomassBus_powerplantGasBiomass_2_5)
 = 0
 
-c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_2_4)_:
-+0.5 flow(gasBus_powerplantGasBiomass_2_4)
--0.40000000000000002 flow(powerplantGasBiomass_thermalBus_2_4)
+c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_electricityBus_2_5)_:
+-0.4 flow(powerplantGasBiomass_electricityBus_2_5)
++0.3 flow(gasBus_powerplantGasBiomass_2_5)
+= 0
+
+c_e_TransformerBlock_relation(powerplantGasBiomass_biomassBus_thermalBus_2_5)_:
+-0.1 flow(powerplantGasBiomass_thermalBus_2_5)
++0.5 flow(biomassBus_powerplantGasBiomass_2_5)
 = 0
 
 c_e_TransformerBlock_relation(powerplantGasBiomass_gasBus_thermalBus_2_5)_:
+-0.4 flow(powerplantGasBiomass_thermalBus_2_5)
 +0.5 flow(gasBus_powerplantGasBiomass_2_5)
--0.40000000000000002 flow(powerplantGasBiomass_thermalBus_2_5)
 = 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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
@@ -249,16 +258,4 @@ bounds
    0 <= flow(gasBus_powerplantGasBiomass_1_3) <= +inf
    0 <= flow(gasBus_powerplantGasBiomass_2_4) <= +inf
    0 <= flow(gasBus_powerplantGasBiomass_2_5) <= +inf
-   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 <= flow(powerplantGasBiomass_thermalBus_0_0) <= 50000000000
-   0 <= flow(powerplantGasBiomass_thermalBus_0_1) <= 50000000000
-   0 <= flow(powerplantGasBiomass_thermalBus_1_2) <= 50000000000
-   0 <= flow(powerplantGasBiomass_thermalBus_1_3) <= 50000000000
-   0 <= flow(powerplantGasBiomass_thermalBus_2_4) <= 50000000000
-   0 <= flow(powerplantGasBiomass_thermalBus_2_5) <= 50000000000
 end
diff --git a/tests/lp_files/variable_chp.lp b/tests/lp_files/variable_chp.lp
index 7931be33..9ec030a3 100644
--- a/tests/lp_files/variable_chp.lp
+++ b/tests/lp_files/variable_chp.lp
@@ -53,90 +53,88 @@ c_e_BusBlock_balance(heatBus_0_2)_:
 
 c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_0_0)_:
 +1 flow(commodityBus_variable_chp_gas1_0_0)
--2 flow(variable_chp_gas1_electricityBus_0_0)
--0.80000000000000004 flow(variable_chp_gas1_heatBus_0_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 flow(variable_chp_gas1_electricityBus_0_1)
--0.80000000000000004 flow(variable_chp_gas1_heatBus_0_1)
-= 0
+-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 flow(variable_chp_gas1_electricityBus_0_2)
--0.80000000000000004 flow(variable_chp_gas1_heatBus_0_2)
-= 0
+-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 flow(variable_chp_gas2_electricityBus_0_0)
--0.80000000000000004 flow(variable_chp_gas2_heatBus_0_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 flow(variable_chp_gas2_electricityBus_0_1)
--0.80000000000000004 flow(variable_chp_gas2_heatBus_0_1)
-= 0
+-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 flow(variable_chp_gas2_electricityBus_0_2)
--0.80000000000000004 flow(variable_chp_gas2_heatBus_0_2)
-= 0
+-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.59999999999999998 flow(variable_chp_gas1_heatBus_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.59999999999999998 flow(variable_chp_gas1_heatBus_0_1)
++0.6 flow(variable_chp_gas1_heatBus_0_1)
 <= 0
 
 c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_0_2)_:
 -1 flow(variable_chp_gas1_electricityBus_0_2)
-+0.59999999999999998 flow(variable_chp_gas1_heatBus_0_2)
++0.6 flow(variable_chp_gas1_heatBus_0_2)
 <= 0
 
 c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_0_0)_:
 -1 flow(variable_chp_gas2_electricityBus_0_0)
-+0.59999999999999998 flow(variable_chp_gas2_heatBus_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.59999999999999998 flow(variable_chp_gas2_heatBus_0_1)
++0.6 flow(variable_chp_gas2_heatBus_0_1)
 <= 0
 
 c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas2_0_2)_:
 -1 flow(variable_chp_gas2_electricityBus_0_2)
-+0.59999999999999998 flow(variable_chp_gas2_heatBus_0_2)
++0.6 flow(variable_chp_gas2_heatBus_0_2)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.0
-
 bounds
+   1 <= ONE_VAR_CONSTANT <= 1
    0 <= flow(commodityBus_variable_chp_gas1_0_0) <= 100
-   0 <= flow(commodityBus_variable_chp_gas1_0_1) <= 100
-   0 <= flow(commodityBus_variable_chp_gas1_0_2) <= 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_gas1_electricityBus_0_1) <= +inf
-   0 <= flow(variable_chp_gas1_electricityBus_0_2) <= +inf
-   0 <= flow(variable_chp_gas1_heatBus_0_0) <= +inf
-   0 <= flow(variable_chp_gas1_heatBus_0_1) <= +inf
-   0 <= flow(variable_chp_gas1_heatBus_0_2) <= +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
index 73a355b5..dee45b69 100644
--- a/tests/lp_files/variable_chp_multi_period.lp
+++ b/tests/lp_files/variable_chp_multi_period.lp
@@ -37,235 +37,233 @@ c_e_BusBlock_balance(commodityBus_2_5)_:
 = 0
 
 c_e_BusBlock_balance(electricityBus_0_0)_:
-+1 flow(variable_chp_gas1_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_gas1_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_gas1_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_gas1_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_gas1_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_gas1_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_gas1_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_gas1_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_gas1_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_gas1_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_gas1_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_gas1_heatBus_2_5)
 +1 flow(variable_chp_gas2_heatBus_2_5)
-= 0
-
-c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_0_0)_:
-+1 flow(commodityBus_variable_chp_gas1_0_0)
--2 flow(variable_chp_gas1_electricityBus_0_0)
--0.80000000000000004 flow(variable_chp_gas1_heatBus_0_0)
-= 0
-
-c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_0_1)_:
-+1 flow(commodityBus_variable_chp_gas1_0_1)
--2 flow(variable_chp_gas1_electricityBus_0_1)
--0.80000000000000004 flow(variable_chp_gas1_heatBus_0_1)
-= 0
-
-c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_1_2)_:
-+1 flow(commodityBus_variable_chp_gas1_1_2)
--2 flow(variable_chp_gas1_electricityBus_1_2)
--0.80000000000000004 flow(variable_chp_gas1_heatBus_1_2)
-= 0
-
-c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_1_3)_:
-+1 flow(commodityBus_variable_chp_gas1_1_3)
--2 flow(variable_chp_gas1_electricityBus_1_3)
--0.80000000000000004 flow(variable_chp_gas1_heatBus_1_3)
-= 0
-
-c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_2_4)_:
-+1 flow(commodityBus_variable_chp_gas1_2_4)
--2 flow(variable_chp_gas1_electricityBus_2_4)
--0.80000000000000004 flow(variable_chp_gas1_heatBus_2_4)
-= 0
-
-c_e_ExtractionTurbineCHPBlock_input_output_relation(variable_chp_gas1_2_5)_:
-+1 flow(commodityBus_variable_chp_gas1_2_5)
--2 flow(variable_chp_gas1_electricityBus_2_5)
--0.80000000000000004 flow(variable_chp_gas1_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 flow(variable_chp_gas2_electricityBus_0_0)
--0.80000000000000004 flow(variable_chp_gas2_heatBus_0_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 flow(variable_chp_gas2_electricityBus_0_1)
--0.80000000000000004 flow(variable_chp_gas2_heatBus_0_1)
-= 0
+-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 flow(variable_chp_gas2_electricityBus_1_2)
--0.80000000000000004 flow(variable_chp_gas2_heatBus_1_2)
-= 0
+-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 flow(variable_chp_gas2_electricityBus_1_3)
--0.80000000000000004 flow(variable_chp_gas2_heatBus_1_3)
-= 0
+-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 flow(variable_chp_gas2_electricityBus_2_4)
--0.80000000000000004 flow(variable_chp_gas2_heatBus_2_4)
-= 0
+-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 flow(variable_chp_gas2_electricityBus_2_5)
--0.80000000000000004 flow(variable_chp_gas2_heatBus_2_5)
-= 0
+-2.0 flow(variable_chp_gas2_electricityBus_2_5)
+-0.8 flow(variable_chp_gas2_heatBus_2_5)
+= 0.0
 
-c_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_0_0)_:
--1 flow(variable_chp_gas1_electricityBus_0_0)
-+0.59999999999999998 flow(variable_chp_gas1_heatBus_0_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_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_0_1)_:
--1 flow(variable_chp_gas1_electricityBus_0_1)
-+0.59999999999999998 flow(variable_chp_gas1_heatBus_0_1)
-<= 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_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_1_2)_:
--1 flow(variable_chp_gas1_electricityBus_1_2)
-+0.59999999999999998 flow(variable_chp_gas1_heatBus_1_2)
-<= 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_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_1_3)_:
--1 flow(variable_chp_gas1_electricityBus_1_3)
-+0.59999999999999998 flow(variable_chp_gas1_heatBus_1_3)
-<= 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_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_2_4)_:
--1 flow(variable_chp_gas1_electricityBus_2_4)
-+0.59999999999999998 flow(variable_chp_gas1_heatBus_2_4)
-<= 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_u_ExtractionTurbineCHPBlock_out_flow_relation(variable_chp_gas1_2_5)_:
--1 flow(variable_chp_gas1_electricityBus_2_5)
-+0.59999999999999998 flow(variable_chp_gas1_heatBus_2_5)
-<= 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.59999999999999998 flow(variable_chp_gas2_heatBus_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.59999999999999998 flow(variable_chp_gas2_heatBus_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.59999999999999998 flow(variable_chp_gas2_heatBus_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.59999999999999998 flow(variable_chp_gas2_heatBus_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.59999999999999998 flow(variable_chp_gas2_heatBus_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.59999999999999998 flow(variable_chp_gas2_heatBus_2_5)
++0.6 flow(variable_chp_gas2_heatBus_2_5)
 <= 0
 
-c_e_ONE_VAR_CONSTANT: 
-ONE_VAR_CONSTANT = 1.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_gas1_0_1) <= 100
-   0 <= flow(commodityBus_variable_chp_gas1_1_2) <= 100
-   0 <= flow(commodityBus_variable_chp_gas1_1_3) <= 100
-   0 <= flow(commodityBus_variable_chp_gas1_2_4) <= 100
-   0 <= flow(commodityBus_variable_chp_gas1_2_5) <= 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_gas1_electricityBus_0_0) <= +inf
-   0 <= flow(variable_chp_gas1_electricityBus_0_1) <= +inf
-   0 <= flow(variable_chp_gas1_electricityBus_1_2) <= +inf
-   0 <= flow(variable_chp_gas1_electricityBus_1_3) <= +inf
-   0 <= flow(variable_chp_gas1_electricityBus_2_4) <= +inf
-   0 <= flow(variable_chp_gas1_electricityBus_2_5) <= +inf
-   0 <= flow(variable_chp_gas1_heatBus_0_0) <= +inf
-   0 <= flow(variable_chp_gas1_heatBus_0_1) <= +inf
-   0 <= flow(variable_chp_gas1_heatBus_1_2) <= +inf
-   0 <= flow(variable_chp_gas1_heatBus_1_3) <= +inf
-   0 <= flow(variable_chp_gas1_heatBus_2_4) <= +inf
-   0 <= flow(variable_chp_gas1_heatBus_2_5) <= +inf
    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
index 2c26dc2d..ac776fc9 100644
--- a/tests/multi_period_constraint_tests.py
+++ b/tests/multi_period_constraint_tests.py
@@ -12,11 +12,11 @@ SPDX-License-Identifier: MIT
 import logging
 import re
 import warnings
-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
 
@@ -78,70 +78,29 @@ class TestsMultiPeriodConstraint:
                     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="",
-                        )
-                    ),
-                )
+                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_transformer(self):
         """Constraint test of a Transformer without Investment."""
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 a65acab5..23b2d896 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
@@ -189,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"] == 2808
-    assert meta["problem"]["Number of constraints"] == 2809
+    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"
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 20ea93f9..4cfca338 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
@@ -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"
['tests/lp_files/fixed_source_variable_sink_multi_period.lp', 'tests/lp_files/linear_transformer_invest_multi_period.lp', 'tests/lp_files/summed_min_source_multi_period.lp', 'tests/lp_files/linear_transformer_invest.lp', 'tests/lp_files/min_max_runtime_multi_period.lp', 'tests/lp_files/transformer_invest_with_existing.lp', 'tests/lp_files/periodical_investment_limit_with_dsm_DIW.lp', 'tests/lp_files/storage_invest_4_multi_period.lp', 'tests/lp_files/shared_limit.lp', 'tests/lp_files/emission_limit_no_error.lp', 'tests/lp_files/storage_invest_minimum_multi_period.lp', 'tests/lp_files/dsm_module_DIW.lp', 'tests/lp_files/summed_min_source.lp', 'tests/lp_files/max_source_min_sink.lp', 'tests/lp_files/storage_invest_all_nonconvex_multi_period.lp', 'tests/lp_files/periodical_investment_limit_with_dsm_oemof.lp', 'tests/lp_files/storage_invest_1_multi_period.lp', 'tests/lp_files/variable_chp_multi_period.lp', 'tests/lp_files/dsm_module_DIW_extended_multi_period.lp', 'tests/lp_files/min_max_runtime.lp', 'tests/lp_files/periodical_investment_limit_with_dsm_DLR.lp', 'tests/lp_files/dsm_module_DLR_delay_time.lp', 'tests/lp_files/dsm_module_DLR_extended.lp', 'tests/lp_files/equate_flows.lp', 'tests/lp_files/linear_transformer_chp_multi_period.lp', 'tests/lp_files/storage_level_constraint.lp', 'tests/lp_files/maximum_shutdowns_multi_period.lp', 'tests/lp_files/dsm_module_DIW_invest.lp', 'tests/lp_files/nominal_value_to_zero_multi_period.lp', 'tests/lp_files/transformer.lp', 'tests/lp_files/dsm_module_oemof_multi_period.lp', 'tests/lp_files/periodical_emission_limit.lp', 'tests/lp_files/maximum_startups_multi_period.lp', 'tests/lp_files/invest_source_fixed_sink_multi_period.lp', 'tests/lp_files/activity_costs.lp', 'tests/lp_files/fixed_costs_sources.lp', 'tests/lp_files/dsm_module_DLR_multi_period.lp', 'tests/lp_files/dsm_module_oemof_extended_multi_period.lp', 'tests/lp_files/transformer_multi_period.lp', 'tests/lp_files/investment_limit_with_dsm_DLR.lp', 'tests/lp_files/storage_invest_unbalanced.lp', 'tests/lp_files/nonequidistant_timeindex.lp', 'tests/lp_files/piecewise_linear_transformer_cc_multi_period.lp', 'tests/lp_files/storage_invest_multi_period.lp', 'tests/lp_files/dsm_module_DIW_multi_period.lp', 'tests/lp_files/maximum_startups.lp', 'tests/lp_files/connect_investment.lp', 'tests/lp_files/piecewise_linear_transformer_cc.lp', 'tests/lp_files/storage_invest_6.lp', 'tests/lp_files/flow_invest_with_offset_no_minimum_multi_period.lp', 'tests/lp_files/flow_count_limit_multi_period.lp', 'tests/lp_files/integer_source.lp', 'tests/lp_files/fixed_source_invest_sink_multi_period.lp', 'tests/lp_files/flow_nonconvex_invest_bounded_transformer.lp', 'tests/lp_files/offsettransformer.lp', 'tests/lp_files/transformer_invest_with_existing_multi_period.lp', 'tests/lp_files/storage_invest_5_multi_period.lp', 'tests/lp_files/storage_invest_minimum.lp', 'tests/lp_files/investment_limit.lp', 'tests/lp_files/linear_transformer.lp', 'tests/lp_files/storage_invest_with_offset.lp', 'tests/lp_files/fixed_source_variable_sink.lp', 'tests/lp_files/investment_limit_with_dsm_DIW.lp', 'tests/lp_files/dsm_module_oemof_invest.lp', 'tests/lp_files/connect_investment_multi_period.lp', 'tests/lp_files/linear_transformer_invest_multi_period_old.lp', 'tests/lp_files/offsettransformer_multi_period.lp', 'tests/lp_files/dsm_module_DIW_invest_multi_period.lp', 'tests/lp_files/storage_invest_without_offset.lp', 'tests/test_scripts/test_solph/test_storage_investment/test_storage_investment.py', 'tests/lp_files/linear_transformer_chp.lp', 'tests/test_scripts/test_solph/test_storage_investment/test_storage_with_tuple_label.py', 'tests/lp_files/storage_invest_with_offset_multi_period.lp', 'tests/lp_files/dsm_module_oemof_extended.lp', 'tests/lp_files/flow_invest_without_offset.lp', 'tests/lp_files/piecewise_linear_transformer_dcc_multi_period.lp', 'tests/lp_files/storage_invest_3.lp', 'tests/lp_files/storage_invest_6_multi_period.lp', 'tests/lp_files/dsm_module_DLR_extended_multi_period.lp', 'tests/lp_files/flow_invest_with_offset_no_minimum.lp', 'tests/lp_files/inactivity_costs.lp', 'tests/lp_files/shared_limit_multi_period.lp', 'tests/constraint_tests.py', 'tests/lp_files/dsm_module_DLR.lp', 'tests/lp_files/flow_invest_without_offset_multi_period.lp', 'tests/lp_files/fixed_source_invest_sink.lp', 'tests/lp_files/dsm_module_DLR_invest.lp', 'tests/lp_files/storage_unbalanced_multi_period.lp', 'tests/lp_files/emission_budget_limit.lp', 'tests/lp_files/invest_source_fixed_sink.lp', 'tests/lp_files/storage.lp', 'tests/lp_files/storage_invest_5.lp', 'setup.py', 'tests/lp_files/investment_limit_with_dsm_oemof.lp', 'tests/lp_files/storage_invest_1.lp', 'tests/lp_files/generic_invest_limit.lp', 'tests/lp_files/storage_fixed_losses_multi_period.lp', 'tests/lp_files/storage_invest_without_offset_multi_period.lp', 'tests/lp_files/nominal_value_to_zero.lp', 'tests/lp_files/dsm_module_oemof.lp', 'tests/lp_files/link.lp', 'tests/lp_files/activity_costs_multi_period.lp', 'tests/lp_files/dsm_module_oemof_invest_multi_period.lp', 'tests/lp_files/linear_transformer_chp_invest.lp', 'tests/lp_files/piecewise_linear_transformer_dcc.lp', 'tests/lp_files/max_source_min_sink_multi_period.lp', 'tests/lp_files/dsm_module_DLR_invest_multi_period.lp', 'tests/lp_files/flow_reaching_lifetime.lp', 'tests/lp_files/storage_invest_2.lp', 'tests/lp_files/transformer_invest.lp', 'tests/lp_files/linear_transformer_multi_period.lp', 'tests/lp_files/storage_invest_all_nonconvex.lp', 'tests/lp_files/variable_chp.lp', 'tests/lp_files/invest_non_convex_flow.lp', 'tests/lp_files/source_with_nonconvex_gradient_multi_period.lp', 'tests/lp_files/dsm_module_DIW_extended.lp', 'tests/lp_files/transformer_invest_multi_period.lp', 'tests/lp_files/storage_fixed_losses.lp', 'tests/multi_period_constraint_tests.py', 'tests/lp_files/source_with_gradient.lp', 'tests/lp_files/emission_limit.lp', 'tests/lp_files/flow_reaching_lifetime_initial_age.lp', 'tests/lp_files/storage_invest_2_multi_period.lp', 'tests/lp_files/storage_multi_period.lp', 'tests/lp_files/storage_invest_1_fixed_losses.lp', 'tests/lp_files/source_with_gradient_multi_period.lp', 'tests/lp_files/storage_invest_3_multi_period.lp', 'tests/lp_files/flow_invest_with_offset.lp', 'tests/lp_files/maximum_shutdowns.lp', 'tests/lp_files/periodical_investment_limit.lp', 'tests/lp_files/storage_invest_4.lp', 'tests/lp_files/storage_unbalanced.lp', 'tests/lp_files/source_with_nonconvex_gradient.lp', 'tests/lp_files/inactivity_costs_multi_period.lp', 'tests/lp_files/flow_count_limit.lp', 'tests/lp_files/linear_transformer_chp_invest_multi_period.lp', 'tests/lp_files/flow_invest_with_offset_multi_period.lp']