Skip to content

Commit

Permalink
Migration to ei39
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Jan 23, 2024
1 parent 29e8c37 commit 19336d8
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 79 deletions.
16 changes: 6 additions & 10 deletions carculator_truck/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,28 +360,24 @@ def fill_in_A_matrix(self):
# Charging infrastructure
# Plugin BEV trucks
# The charging station has a lifetime of 24 years
# Hence, we calculate the lifetime of the bus
# Hence, we calculate the lifetime of the truck
# We assume two trucks per charging station

self.A[
np.ix_(
np.arange(self.iterations),
self.find_input_indices(("EV charger, level 3, plugin, 200 kW",)),
self.find_input_indices("charger, for electric vehicles, level 3, plugin, 200 kW",),
self.find_input_indices(
contains=("Truck, ",),
),
)
] = (
-1
/ (
24
* (
2100
/ self.array.sel(parameter="electric energy stored")
)
* self.array.sel(parameter="kilometers per year")
self.array.sel(
parameter=["kilometers per year"],
) * 2 * 24
)
* (self.array.sel(parameter="electricity consumption") > 0)
)
) * (self.array.sel(parameter="combustion power") == 0)

print("*********************************************************************")
171 changes: 102 additions & 69 deletions dev/test.ipynb

Large diffs are not rendered by default.

0 comments on commit 19336d8

Please sign in to comment.