From 0da5bfeec7024503230d1a7b4d4687b364647506 Mon Sep 17 00:00:00 2001 From: romainsacchi Date: Mon, 8 Aug 2022 19:15:41 +0200 Subject: [PATCH] Fixes fuel cell stack amount demanded in inventories. --- carculator_truck/inventory.py | 6 ++---- dev/HBEFA trucks.ipynb | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/carculator_truck/inventory.py b/carculator_truck/inventory.py index 51a2a1f..91c740a 100644 --- a/carculator_truck/inventory.py +++ b/carculator_truck/inventory.py @@ -3470,9 +3470,8 @@ def set_inputs_in_A_matrix(self, array): self.inputs[("Stack", "GLO", "kilowatt", "Stack")], -self.number_of_cars :, ] = ( - array[self.array_inputs["fuel cell stack mass"], :] + array[self.array_inputs["fuel cell power"], :] * (1 + array[self.array_inputs["fuel cell lifetime replacements"]]) - / 1.02 / array[self.array_inputs["lifetime kilometers"], :] / (array[self.array_inputs["total cargo mass"], :] / 1000) * -1 @@ -4971,9 +4970,8 @@ def set_inputs_in_A_matrix_for_export(self, array): if "duty truck" in i[0] and i[2] == "unit" ], ] = ( - array[self.array_inputs["fuel cell stack mass"], :] + array[self.array_inputs["fuel cell power"], :] * (1 + array[self.array_inputs["fuel cell lifetime replacements"]]) - / 1.02 * -1 ) diff --git a/dev/HBEFA trucks.ipynb b/dev/HBEFA trucks.ipynb index f322ae0..84f1706 100644 --- a/dev/HBEFA trucks.ipynb +++ b/dev/HBEFA trucks.ipynb @@ -537,7 +537,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -551,7 +551,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.3" + "version": "3.9.1" } }, "nbformat": 4,