Skip to content

Commit

Permalink
Merge pull request #136 from openego/features/#3-really-get-dumb-emob…
Browse files Browse the repository at this point in the history
…ility

assure dumb charging for status2019
  • Loading branch information
ClaraBuettner authored Oct 19, 2023
2 parents 7fc4fb1 + 6591257 commit 112e800
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def generate_model_data_tasks(scenario_name):

super().__init__(
name="MotorizedIndividualTravel",
version="0.0.7",
version="0.0.8",
dependencies=dependencies,
tasks=tasks,
)
Original file line number Diff line number Diff line change
Expand Up @@ -734,33 +734,37 @@ def write_load(
# * load timeseries:
# * regular (flex): use driving load
# * lowflex: use dumb charging load
if write_lowflex_model is False:
emob_bus_id = write_bus(scenario_name=scenario_name)
write_link(scenario_name=scenario_name)
write_store(scenario_name=scenario_name)
write_load(
scenario_name=scenario_name,
connection_bus_id=emob_bus_id,
load_ts=(
hourly_load_time_series_df.driving_load_time_series.to_list() # noqa: E501
),
)
elif scenario_name=='status2019':
# * status2019: also dumb charging

if scenario_name=='status2019':
write_load(
scenario_name=scenario_name,
connection_bus_id=etrago_bus.bus_id,
load_ts=hourly_load_time_series_df.load_time_series.to_list(),
)
)
else:
# Get lowflex scenario name
lowflex_scenario_name = DATASET_CFG["scenario"]["lowflex"][
"names"
][scenario_name]
write_load(
scenario_name=lowflex_scenario_name,
connection_bus_id=etrago_bus.bus_id,
load_ts=hourly_load_time_series_df.load_time_series.to_list(),
)
if write_lowflex_model is False:
emob_bus_id = write_bus(scenario_name=scenario_name)
write_link(scenario_name=scenario_name)
write_store(scenario_name=scenario_name)
write_load(
scenario_name=scenario_name,
connection_bus_id=emob_bus_id,
load_ts=(
hourly_load_time_series_df.driving_load_time_series.to_list() # noqa: E501
),
)

else:
# Get lowflex scenario name
lowflex_scenario_name = DATASET_CFG["scenario"]["lowflex"][
"names"
][scenario_name]
write_load(
scenario_name=lowflex_scenario_name,
connection_bus_id=etrago_bus.bus_id,
load_ts=hourly_load_time_series_df.load_time_series.to_list(),
)

def write_to_file():
"""Write model data to file (for debugging purposes)"""
Expand Down

0 comments on commit 112e800

Please sign in to comment.