From e37c2c930b0e59cadfc9b6a5fd7c043f4984d930 Mon Sep 17 00:00:00 2001
From: "christoph.von.oy" <christoph.von.oy@rwth-aachen.de>
Date: Mon, 15 Apr 2024 16:18:57 +0200
Subject: [PATCH] Removed FixedCapacity logic

Can be expressed by setting min_capacity and max_capacity to the same
value
---
 Model_Library                    |  2 +-
 examples/BusChargingIMC/IMC.json |  8 --------
 examples/BusChargingIMC/runme.py | 20 ++++++++++++++------
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/Model_Library b/Model_Library
index 78fd0af070..beef809b18 160000
--- a/Model_Library
+++ b/Model_Library
@@ -1 +1 @@
-Subproject commit 78fd0af070bffc2bef76d1e12707928f8459b8d0
+Subproject commit beef809b18396d8a3c74d8d751375a2dbfa501c2
diff --git a/examples/BusChargingIMC/IMC.json b/examples/BusChargingIMC/IMC.json
index a28793f4c6..2b18d799df 100644
--- a/examples/BusChargingIMC/IMC.json
+++ b/examples/BusChargingIMC/IMC.json
@@ -304,14 +304,6 @@
                     "input": 1
                 }
             ]
-        },
-        "bus_1_moter_inverter_capacity": {
-            "type": "FixedCapacity",
-            "component": "bus_1_motor_inverter"
-        },
-        "bus_2_moter_inverter_capacity": {
-            "type": "FixedCapacity",
-            "component": "bus_1_motor_inverter"
         }
     }
 }
\ No newline at end of file
diff --git a/examples/BusChargingIMC/runme.py b/examples/BusChargingIMC/runme.py
index e9b43ab89d..c42d25390a 100644
--- a/examples/BusChargingIMC/runme.py
+++ b/examples/BusChargingIMC/runme.py
@@ -79,16 +79,24 @@ with open(
     prosumer_dict["LaTreille"]["components"]["bus_1_motor_inverter"]["model"]
 ) as f:
     inverter_1_efficiency = json.load(f)["efficiency"]
-prosumer_dict["LaTreille"]["additional_model_logic"]["bus_1_moter_inverter_capacity"][
-    "capacity"
-] = (max_driving_consumpion / inverter_1_efficiency)
+bus_1_moter_inverter_capacity = max_driving_consumpion / inverter_1_efficiency
+prosumer_dict["LaTreille"]["components"]["bus_1_motor_inverter"][
+    "min_capacity"
+] = bus_1_moter_inverter_capacity
+prosumer_dict["LaTreille"]["components"]["bus_1_motor_inverter"][
+    "max_capacity"
+] = bus_1_moter_inverter_capacity
 with open(
     prosumer_dict["LaTreille"]["components"]["bus_2_motor_inverter"]["model"]
 ) as f:
     inverter_2_efficiency = json.load(f)["efficiency"]
-prosumer_dict["LaTreille"]["additional_model_logic"]["bus_2_moter_inverter_capacity"][
-    "capacity"
-] = (max_driving_consumpion / inverter_2_efficiency)
+bus_2_moter_inverter_capacity = max_driving_consumpion / inverter_2_efficiency
+prosumer_dict["LaTreille"]["components"]["bus_2_motor_inverter"][
+    "min_capacity"
+] = bus_2_moter_inverter_capacity
+prosumer_dict["LaTreille"]["components"]["bus_2_motor_inverter"][
+    "max_capacity"
+] = bus_2_moter_inverter_capacity
 
 prosumer_main = ProsumerMain(prosumer_dict, dynamic)
 
-- 
GitLab