From 5b1741222d6ca06526555860531b989632fb7c08 Mon Sep 17 00:00:00 2001 From: cwasicki <126617870+cwasicki@users.noreply.github.com> Date: Tue, 26 May 2026 23:58:17 +0200 Subject: [PATCH 1/2] Add start and end times to microgrid component configs Add start_time and end_time fields to PV, wind, battery, and microgrid metadata configs. Signed-off-by: cwasicki <126617870+cwasicki@users.noreply.github.com> --- src/frequenz/gridpool/_microgrid_config.py | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/frequenz/gridpool/_microgrid_config.py b/src/frequenz/gridpool/_microgrid_config.py index b99e6d2..f83fe8f 100644 --- a/src/frequenz/gridpool/_microgrid_config.py +++ b/src/frequenz/gridpool/_microgrid_config.py @@ -7,6 +7,7 @@ import re import tomllib from dataclasses import field +from datetime import datetime from pathlib import Path from typing import Any, ClassVar, Literal, Self, Type, cast, get_args @@ -111,6 +112,12 @@ def is_valid_type(cls, ctype: str) -> bool: class PVConfig: """Configuration of a PV system in a microgrid.""" + start_time: datetime | None = None + """Start time of the PV system installation.""" + + end_time: datetime | None = None + """End time of the PV system installation.""" + peak_power: float | None = None """Peak power of the PV system in Watt.""" @@ -123,8 +130,15 @@ class PVConfig: @dataclass(frozen=True) class WindConfig: + # pylint: disable=too-many-instance-attributes """Configuration of a wind turbine in a microgrid.""" + start_time: datetime | None = None + """Start time of the wind turbine installation.""" + + end_time: datetime | None = None + """End time of the wind turbine installation.""" + turbine_model: str | None = None """Model name of the wind turbine.""" @@ -151,6 +165,12 @@ class WindConfig: class BatteryConfig: """Configuration of a battery in a microgrid.""" + start_time: datetime | None = None + """Start time of the battery installation.""" + + end_time: datetime | None = None + """End time of the battery installation.""" + capacity: float | None = None """Capacity of the battery in Wh.""" @@ -184,6 +204,12 @@ class Metadata: altitude: float | None = None """Geographic altitude of the microgrid.""" + start_time: datetime | None = None + """Start time of the microgrid operation.""" + + end_time: datetime | None = None + """End time of the microgrid operation.""" + @dataclass class MicrogridConfig: From b40a08f0717f90d75f4646485f71fbf63ad499b0 Mon Sep 17 00:00:00 2001 From: cwasicki <126617870+cwasicki@users.noreply.github.com> Date: Wed, 27 May 2026 00:10:33 +0200 Subject: [PATCH 2/2] Update release notes Signed-off-by: cwasicki <126617870+cwasicki@users.noreply.github.com> --- RELEASE_NOTES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 3bec7e4..09896ab 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -6,11 +6,11 @@ ## Upgrading -* Change the `curtailable` flag default of the PV config to `None`. + ## New Features - +* Add start and end time to microgrid configs. ## Bug Fixes