Skip to content

Commit

Permalink
Merge pull request #831 from openego/fix/#830-fix-emob-load-ts
Browse files Browse the repository at this point in the history
Fix/#830 fix emob load ts
  • Loading branch information
nesnoj committed Jul 8, 2022
2 parents 08962a7 + 98d9e76 commit 992e4a1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ Bug Fixes
Use db.next_etrago_id in fill_etrago_gen
`#798 <https://github.com/openego/eGon-data/issues/798>`_
`#776 <https://github.com/openego/eGon-data/issues/776>`_
* Fix model load timeseries in motorized individual travel
`#830 <https://github.com/openego/eGon-data/issues/830>`_

.. _PR #692: https://github.com/openego/eGon-data/pull/692
.. _#343: https://github.com/openego/eGon-data/issues/343
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def generate_model_data_tasks(scenario_name):

super().__init__(
name="MotorizedIndividualTravel",
version="0.0.1",
version="0.0.2",
dependencies=dependencies,
tasks=(
create_tables,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
EgonPfHvStoreTimeseries,
)
from egon.data.datasets.mv_grid_districts import MvGridDistricts

# from egon.data.datasets.scenario_parameters import get_sector_parameters


Expand Down Expand Up @@ -269,8 +270,11 @@ def generate_load_time_series(
# (I) Preserve SoC while driving
if location == "driving":
# Full band while driving
# soc_min_absolute[drive_start:drive_end+1] += soc_end * bat_cap * ev_count
# soc_max_absolute[drive_start:drive_end+1] += soc_start * bat_cap * ev_count
# soc_min_absolute[drive_start:drive_end+1] +=
# soc_end * bat_cap * ev_count
#
# soc_max_absolute[drive_start:drive_end+1] +=
# soc_start * bat_cap * ev_count

# Real band (decrease SoC while driving)
soc_min_absolute[drive_start : drive_end + 1] += (
Expand Down Expand Up @@ -698,7 +702,7 @@ def write_load():
load_id=emob_load_id,
temp_id=1,
p_set=(
hourly_load_time_series_df.load_time_series.to_list()
hourly_load_time_series_df.driving_load_time_series.to_list()
),
)
)
Expand Down

0 comments on commit 992e4a1

Please sign in to comment.