Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

## Upgrading

* Change the `curtailable` flag default of the PV config to `None`.
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->

## New Features

<!-- Here goes the main new features and examples or instructions on how to use them -->
* Add start and end time to microgrid configs.

## Bug Fixes

Expand Down
26 changes: 26 additions & 0 deletions src/frequenz/gridpool/_microgrid_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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."""

Expand All @@ -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."""

Expand All @@ -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."""

Expand Down Expand Up @@ -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:
Expand Down
Loading