Skip to content

Commit

Permalink
Fixes fuel cell stack amount demanded in inventories.
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Aug 8, 2022
1 parent 3c3918d commit 0da5bfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions carculator_truck/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
)

Expand Down
4 changes: 2 additions & 2 deletions dev/HBEFA trucks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -551,7 +551,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.9.1"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 0da5bfe

Please sign in to comment.