flexmeasures.data.models.reporting
Modules
Module Attributes
Functions
- flexmeasures.data.models.reporting.read_input_beliefs(sensor: Sensor, search_parameters: dict, **search_criteria) BeliefsDataFrame
Read a report input’s beliefs, cleaned against the bounds that input carries.
An input entry may say how to clean the readings it asks for, the way a forecaster’s regressors and a scheduler’s references can. Those keys are taken out of the search, which would not know what to do with them, and applied to what the search returns. The bounds are read in the sensor’s own unit, and snapping runs before clipping, as everywhere else.
- Parameters:
sensor – The sensor the input names.
search_parameters – What is left of the input entry, which this function takes the bounds out of.
search_criteria – The search criteria the reporter decided on, such as the event window.
- Returns:
The beliefs, with their values snapped and clipped where the input asked for it.
Classes
- class flexmeasures.data.models.reporting.Reporter(config: dict | None = None, save_config=True, save_parameters=False, **kwargs)
Superclass for all FlexMeasures Reporters.
- _compute(check_output_resolution=True, as_job: bool = False, **kwargs) list[dict[str, Any]] | dict[str, Any]
This method triggers the creation of a new report.
The same object can generate multiple reports with different start, end, resolution and belief_time values.
- Parameters:
check_output_resolution – If True, checks each output for whether the event_resolution matches that of the sensor it is supposed to be recorded on.
as_job – If True, queue a reporting job instead of computing immediately.
- Returns:
A dictionary with
job_idandn_jobswhen queued, otherwise the computed report results.