flexmeasures.data.schemas.scheduling

Modules

flexmeasures.data.schemas.scheduling.process

flexmeasures.data.schemas.scheduling.storage

Classes

class flexmeasures.data.schemas.scheduling.FlexContextSchema(*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool | None = None, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet | None = None, unknown: str | None = None)

This schema lists fields that can be used to describe sensors in the optimised portfolio

_get_variable_quantity_unit(field: str, variable_quantity: ur.Quantity | list[dict | Sensor]) str

Gets the unit from the variable quantity.

_try_to_convert_price_units(data)

Convert price units to the same unit and scale if they can (incl. same currency).

check_prices(data: dict, **kwargs)

Check assumptions about prices.

  1. The flex-context must contain at most 1 consumption price and at most 1 production price field.

  2. All prices must share the same currency.