ActiveBussesMetric#
- class wattson.analysis.metrics.power_grid.active_busses_metric.ActiveBussesMetric(minimum_timestamp: float | None = None)#
Bases:
WattsonMetric
Methods
add_event
calculate
Returns the percentage value of this metric at the given timestamp.
get_percentages
get_state_color
observe
remove_event
remove_event_index
set_events
- __init__(minimum_timestamp: float | None = None)#
- get_percentage(timestamp: float | None = None) float | None #
Returns the percentage value of this metric at the given timestamp.
- Parameters:
timestamp (Optional[float], optional) – The timestamp to return this metric for. If None, the latest known state is returned. (Default value = None)
- Returns:
This metric’s value as a percentage. [0, 100]. If the timestamp is out of bounds, None is returned.
- Return type:
Optional[float]