Battery๏ƒ

class emflow.assets.battery.Battery(*, id: uuid.UUID = <factory>, name: str | None = None, timeseries: list[timedatamodel.timeseries.TimeSeries] = <factory>, geometry: shapely.geometry.base.BaseGeometry | None = None, extra: dict = <factory>, lat: dataclasses.InitVar[float | None] = None, lon: dataclasses.InitVar[float | None] = None, commissioning_date: datetime.date | None = None, members: list[energydatamodel.element.Element] = <factory>, tz: datetime.tzinfo | None = None, storage_capacity: float | None = None, min_soc: float | None = None, max_charge: float | None = None, max_discharge: float | None = None, charge_efficiency: float | None = None, discharge_efficiency: float | None = None)[source]๏ƒ

Bases: NodeAsset

storage_capacity: float | None = None๏ƒ
min_soc: float | None = None๏ƒ
max_charge: float | None = None๏ƒ
max_discharge: float | None = None๏ƒ
charge_efficiency: float | None = None๏ƒ
discharge_efficiency: float | None = None๏ƒ
add_child(obj: Element) None๏ƒ

Attach a child. Override in subclasses that support children.

property centroid: Point | None๏ƒ

Centroid of geometry, or None if no geometry.

children() list๏ƒ

Child elements for tree walking. Override in subclasses with children.

commissioning_date: date | None = None๏ƒ
classmethod from_json(data: dict) Element๏ƒ

Deserialize from a JSON-compatible dict.

geometry: BaseGeometry | None = None๏ƒ
geometry_to_geojson(geometry)๏ƒ
index()๏ƒ

Build a dict[UUID, Element] index of the subtree rooted at self.

Use to resolve Reference objects against this tree.

lat: InitVar[float | None] = None๏ƒ
property latitude: float | None๏ƒ

Latitude, if geometry is a shapely Point; else None.

lon: InitVar[float | None] = None๏ƒ
property longitude: float | None๏ƒ

Longitude, if geometry is a shapely Point; else None.

name: str | None = None๏ƒ
to_dataframe()๏ƒ
to_geojson(exclude_none: bool = True)๏ƒ
to_json(*, exclude_fields: set | None = None) dict๏ƒ

Serialize to a JSON-compatible dict.

to_properties() dict๏ƒ

Domain-specific fields as a dict (excludes infra + children fields).

to_tree() str๏ƒ

Return the hierarchy rendered as an indented tree string.

Use print(element.to_tree()) to display it. In a notebook, printing the element directly (element) also renders the tree via __repr__.

tz: datetime.tzinfo | None = None๏ƒ
members: list[Element]๏ƒ
id: UUID๏ƒ
timeseries: list[TimeSeries]๏ƒ
extra: dict๏ƒ