Skip to content

Commit

Permalink
Merge pull request #377 from hazemakhalek/bright
Browse files Browse the repository at this point in the history
adapt default trasnport demand for final energy
  • Loading branch information
cpschau authored Sep 25, 2024
2 parents af44bad + 6dd4e3a commit 666526c
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions scripts/prepare_transport_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,23 @@ def prepare_transport_data(n):

# divide out the heating/cooling demand from ICE totals
# and multiply back in the heating/cooling demand for EVs
ice_correction = (transport_shape * (1 + dd_ICE)).sum() / transport_shape.sum()

if snakemake.config["custom_data"]["transport_demand"]:
energy_totals_transport = nodal_energy_totals["total road"]

transport = transport_shape.multiply(energy_totals_transport) * 1e6 * Nyears
else:
energy_totals_transport = (
nodal_energy_totals["total road"]
+ nodal_energy_totals["total rail"]
- nodal_energy_totals["electricity rail"]
)
transport = (
(transport_shape.multiply(energy_totals_transport) * 1e6 * Nyears)
.divide(efficiency_gain * ice_correction)
.multiply(1 + dd_EV)
)
ice_correction = (transport_shape * (1 + dd_ICE)).sum() / transport_shape.sum() # currently not used same for dd_EV

# if snakemake.config["custom_data"]["transport_demand"]:
energy_totals_transport = nodal_energy_totals["total road"]

transport = transport_shape.multiply(energy_totals_transport) * 1e6 * Nyears
# else:
# energy_totals_transport = (
# nodal_energy_totals["total road"]
# + nodal_energy_totals["total rail"]
# - nodal_energy_totals["electricity rail"]
# )
# transport = (
# (transport_shape.multiply(energy_totals_transport) * 1e6 * Nyears)
# .divide(efficiency_gain * ice_correction)
# .multiply(1 + dd_EV)
# )

# derive plugged-in availability for PKW's (cars)

Expand Down Expand Up @@ -205,8 +205,8 @@ def prepare_transport_data(n):
snakemake = mock_snakemake(
"prepare_transport_data",
simpl="",
clusters="74",
demand="AB",
clusters="11",
demand="NI",
planning_horizons=2030,
)

Expand Down

0 comments on commit 666526c

Please sign in to comment.