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 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: