Skip to content

Commit

Permalink
use default toep_engine for database connections in EDisGo class
Browse files Browse the repository at this point in the history
  • Loading branch information
joda9 committed Jan 15, 2025
1 parent 80c4948 commit 1357f8e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions edisgo/edisgo.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
pypsa_io,
timeseries_import,
)
from edisgo.io.db import engine as toep_engine
from edisgo.io.ding0_import import import_ding0_grid
from edisgo.io.electromobility_import import (
distribute_charging_demand,
Expand Down Expand Up @@ -568,7 +569,7 @@ def set_time_series_active_power_predefined(
self,
fluctuating_generators_ts,
fluctuating_generators_names,
engine=kwargs.get("engine"),
engine=kwargs.get("engine", toep_engine()),
timeindex=kwargs.get("timeindex", None),
)
if dispatchable_generators_ts is not None:
Expand All @@ -583,7 +584,7 @@ def set_time_series_active_power_predefined(
loads_ts_df = timeseries_import.electricity_demand_oedb(
edisgo_obj=self,
scenario=kwargs.get("scenario"),
engine=kwargs.get("engine"),
engine=kwargs.get("engine", toep_engine()),
timeindex=kwargs.get("timeindex", None),
load_names=conventional_loads_names,
)
Expand Down Expand Up @@ -984,7 +985,7 @@ def import_generators(self, generator_scenario=None, **kwargs):
else:
generators_import.oedb(
edisgo_object=self,
engine=kwargs.get("engine"),
engine=kwargs.get("engine", toep_engine()),
scenario=generator_scenario,
)

Expand Down

0 comments on commit 1357f8e

Please sign in to comment.