From a0fb6c67aa97541664777abde5ac2e4d34aaba7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20H=C3=B6ning?= Date: Sun, 2 Oct 2022 12:27:42 +0200 Subject: [PATCH] remove default resolution of 15M, for now pass in what you want MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nicolas Höning --- flexmeasures/data/models/planning/utils.py | 2 +- flexmeasures/data/services/scheduling.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/flexmeasures/data/models/planning/utils.py b/flexmeasures/data/models/planning/utils.py index b221a7b50..783033a6d 100644 --- a/flexmeasures/data/models/planning/utils.py +++ b/flexmeasures/data/models/planning/utils.py @@ -85,7 +85,7 @@ def ensure_sensor_is_set(sensor) -> Sensor: else: specs["soc_at_start"] = 0 - # init targets + # init default targets if "soc_targets" not in specs or specs["soc_targets"] is None: specs["soc_targets"] = pd.Series( np.nan, diff --git a/flexmeasures/data/services/scheduling.py b/flexmeasures/data/services/scheduling.py index 741604843..0efbe8c9c 100644 --- a/flexmeasures/data/services/scheduling.py +++ b/flexmeasures/data/services/scheduling.py @@ -26,17 +26,13 @@ This might re-enqueue the job or try a different model (which creates a new job). """ -DEFAULT_RESOLUTION = timedelta( - minutes=15 -) # make_schedule can also fallback to sensor.event_resolution, trigger_schedule also uses that - def create_scheduling_job( sensor_id: int, start_of_schedule: datetime, end_of_schedule: datetime, belief_time: datetime, - resolution: timedelta = DEFAULT_RESOLUTION, + resolution: timedelta, consumption_price_sensor: Optional[Sensor] = None, production_price_sensor: Optional[Sensor] = None, inflexible_device_sensors: Optional[List[Sensor]] = None,