From 703cac4c7e201ed5f570c071db7a2ee0cfb57862 Mon Sep 17 00:00:00 2001 From: "Julian.Endres" Date: Mon, 4 Dec 2023 13:20:22 +0100 Subject: [PATCH 1/3] Change 0.0 to 0 in some lp files After a previous pyomo update some 0 value had to be changed to 0.0. After a new update, this changes back. --- .../extraction_investment_brown_field.lp | 8 ++++---- .../extraction_investment_green_field.lp | 8 ++++---- ...ion_investment_brown_field_multi_period.lp | 20 +++++++++---------- ...ion_investment_green_field_multi_period.lp | 18 ++++++++--------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/tests/_files/lp_files/extraction_investment_brown_field.lp b/tests/_files/lp_files/extraction_investment_brown_field.lp index 11d53b3d..787e54a5 100644 --- a/tests/_files/lp_files/extraction_investment_brown_field.lp +++ b/tests/_files/lp_files/extraction_investment_brown_field.lp @@ -1,6 +1,6 @@ \* Source Pyomo model name=Model *\ -min +min objective: +50 InvestmentFlowBlock_invest(extraction_electricity_0) +0.6 flow(gas_extraction_0_0) @@ -69,19 +69,19 @@ c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_0)_: +1 flow(gas_extraction_0_0) -0.5714285714285713 flow(extraction_heat_0_0) -2.0 flow(extraction_electricity_0_0) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_1)_: +1 flow(gas_extraction_0_1) -0.5714285714285713 flow(extraction_heat_0_1) -2.0 flow(extraction_electricity_0_1) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_2)_: +1 flow(gas_extraction_0_2) -0.5714285714285713 flow(extraction_heat_0_2) -2.0 flow(extraction_electricity_0_2) -= 0.0 += 0 c_u_ExtractionTurbineCHPBlock_out_flow_relation(extraction_0_0)_: +1.142857142857143 flow(extraction_heat_0_0) diff --git a/tests/_files/lp_files/extraction_investment_green_field.lp b/tests/_files/lp_files/extraction_investment_green_field.lp index 731bfc06..a0c0c5be 100644 --- a/tests/_files/lp_files/extraction_investment_green_field.lp +++ b/tests/_files/lp_files/extraction_investment_green_field.lp @@ -1,6 +1,6 @@ \* Source Pyomo model name=Model *\ -min +min objective: +50 InvestmentFlowBlock_invest(extraction_electricity_0) +0.6 flow(gas_extraction_0_0) @@ -69,19 +69,19 @@ c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_0)_: +1 flow(gas_extraction_0_0) -0.5714285714285713 flow(extraction_heat_0_0) -2.0 flow(extraction_electricity_0_0) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_1)_: +1 flow(gas_extraction_0_1) -0.5714285714285713 flow(extraction_heat_0_1) -2.0 flow(extraction_electricity_0_1) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_2)_: +1 flow(gas_extraction_0_2) -0.5714285714285713 flow(extraction_heat_0_2) -2.0 flow(extraction_electricity_0_2) -= 0.0 += 0 c_u_ExtractionTurbineCHPBlock_out_flow_relation(extraction_0_0)_: +1.142857142857143 flow(extraction_heat_0_0) diff --git a/tests/_files/lp_files/multi-period/extraction_investment_brown_field_multi_period.lp b/tests/_files/lp_files/multi-period/extraction_investment_brown_field_multi_period.lp index a406ae10..22be9cb2 100644 --- a/tests/_files/lp_files/multi-period/extraction_investment_brown_field_multi_period.lp +++ b/tests/_files/lp_files/multi-period/extraction_investment_brown_field_multi_period.lp @@ -1,6 +1,6 @@ \* Source Pyomo model name=Model *\ -min +min objective: +393187.4631175658 ONE_VAR_CONSTANT +561.5105784699618 InvestmentFlowBlock_invest(extraction_electricity_0) @@ -237,55 +237,55 @@ c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_0)_: +1 flow(gas_extraction_0_0) -0.5714285714285713 flow(extraction_heat_0_0) -2.0 flow(extraction_electricity_0_0) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_1)_: +1 flow(gas_extraction_0_1) -0.5714285714285713 flow(extraction_heat_0_1) -2.0 flow(extraction_electricity_0_1) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_2)_: +1 flow(gas_extraction_0_2) -0.5714285714285713 flow(extraction_heat_0_2) -2.0 flow(extraction_electricity_0_2) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_1_3)_: +1 flow(gas_extraction_1_3) -0.5714285714285713 flow(extraction_heat_1_3) -2.0 flow(extraction_electricity_1_3) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_1_4)_: +1 flow(gas_extraction_1_4) -0.5714285714285713 flow(extraction_heat_1_4) -2.0 flow(extraction_electricity_1_4) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_1_5)_: +1 flow(gas_extraction_1_5) -0.5714285714285713 flow(extraction_heat_1_5) -2.0 flow(extraction_electricity_1_5) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_2_6)_: +1 flow(gas_extraction_2_6) -0.5714285714285713 flow(extraction_heat_2_6) -2.0 flow(extraction_electricity_2_6) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_2_7)_: +1 flow(gas_extraction_2_7) -0.5714285714285713 flow(extraction_heat_2_7) -2.0 flow(extraction_electricity_2_7) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_2_8)_: +1 flow(gas_extraction_2_8) -0.5714285714285713 flow(extraction_heat_2_8) -2.0 flow(extraction_electricity_2_8) -= 0.0 += 0 c_u_ExtractionTurbineCHPBlock_out_flow_relation(extraction_0_0)_: +1.142857142857143 flow(extraction_heat_0_0) diff --git a/tests/_files/lp_files/multi-period/extraction_investment_green_field_multi_period.lp b/tests/_files/lp_files/multi-period/extraction_investment_green_field_multi_period.lp index dc761dad..3d404373 100644 --- a/tests/_files/lp_files/multi-period/extraction_investment_green_field_multi_period.lp +++ b/tests/_files/lp_files/multi-period/extraction_investment_green_field_multi_period.lp @@ -1,6 +1,6 @@ \* Source Pyomo model name=Model *\ -min +min objective: +561.5105784699618 InvestmentFlowBlock_invest(extraction_electricity_0) +386.89361416194254 InvestmentFlowBlock_invest(extraction_electricity_1) @@ -236,13 +236,13 @@ c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_0)_: +1 flow(gas_extraction_0_0) -0.5714285714285713 flow(extraction_heat_0_0) -2.0 flow(extraction_electricity_0_0) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_1)_: +1 flow(gas_extraction_0_1) -0.5714285714285713 flow(extraction_heat_0_1) -2.0 flow(extraction_electricity_0_1) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_2)_: +1 flow(gas_extraction_0_2) @@ -254,37 +254,37 @@ c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_1_3)_: +1 flow(gas_extraction_1_3) -0.5714285714285713 flow(extraction_heat_1_3) -2.0 flow(extraction_electricity_1_3) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_1_4)_: +1 flow(gas_extraction_1_4) -0.5714285714285713 flow(extraction_heat_1_4) -2.0 flow(extraction_electricity_1_4) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_1_5)_: +1 flow(gas_extraction_1_5) -0.5714285714285713 flow(extraction_heat_1_5) -2.0 flow(extraction_electricity_1_5) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_2_6)_: +1 flow(gas_extraction_2_6) -0.5714285714285713 flow(extraction_heat_2_6) -2.0 flow(extraction_electricity_2_6) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_2_7)_: +1 flow(gas_extraction_2_7) -0.5714285714285713 flow(extraction_heat_2_7) -2.0 flow(extraction_electricity_2_7) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_2_8)_: +1 flow(gas_extraction_2_8) -0.5714285714285713 flow(extraction_heat_2_8) -2.0 flow(extraction_electricity_2_8) -= 0.0 += 0 c_u_ExtractionTurbineCHPBlock_out_flow_relation(extraction_0_0)_: +1.142857142857143 flow(extraction_heat_0_0) From 032ba55da16c90b6de646353adef5a5cd93d085c Mon Sep 17 00:00:00 2001 From: "Julian.Endres" Date: Mon, 4 Dec 2023 13:26:42 +0100 Subject: [PATCH 2/3] Add changelog entry --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 58456454..42b99fe2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -16,6 +16,7 @@ Features Fixes * Remove specific dirs from flake8 & isort `#136 `_ +* Update lp-files to pyomo6.7 `#148 `_ From 2b5fc4ec3a21de9909cea6ffe471c8de634f8903 Mon Sep 17 00:00:00 2001 From: "Julian.Endres" Date: Mon, 4 Dec 2023 13:28:20 +0100 Subject: [PATCH 3/3] Fix missed 0 --- .../extraction_investment_green_field_multi_period.lp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_files/lp_files/multi-period/extraction_investment_green_field_multi_period.lp b/tests/_files/lp_files/multi-period/extraction_investment_green_field_multi_period.lp index 3d404373..59300348 100644 --- a/tests/_files/lp_files/multi-period/extraction_investment_green_field_multi_period.lp +++ b/tests/_files/lp_files/multi-period/extraction_investment_green_field_multi_period.lp @@ -248,7 +248,7 @@ c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_0_2)_: +1 flow(gas_extraction_0_2) -0.5714285714285713 flow(extraction_heat_0_2) -2.0 flow(extraction_electricity_0_2) -= 0.0 += 0 c_e_ExtractionTurbineCHPBlock_input_output_relation(extraction_1_3)_: +1 flow(gas_extraction_1_3)