agentlib_flexquant.data_structures package

Submodules

agentlib_flexquant.data_structures.flex_kpis module

pydantic model agentlib_flexquant.data_structures.flex_kpis.FlexibilityData[source]

Bases: BaseModel

Class containing the data for the calculation of the flexibility.

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field electricity_price_series: Series = None

Profile of the electricity price

field flex_offer_time_grid: ndarray = None

Time grid of the flexibility offer

field kpis_neg: FlexibilityKPIs = FlexibilityKPIs(direction='negative', power_flex_full=KPISeries(name='power_flex_full', value=None, unit='kW', direction='negative', dt=None), power_flex_offer=KPISeries(name='power_flex_offer', value=None, unit='kW', direction='negative', dt=None), power_flex_offer_max=KPI(name='power_flex_offer_max', value=None, unit='kW', direction='negative'), power_flex_offer_min=KPI(name='power_flex_offer_min', value=None, unit='kW', direction='negative'), power_flex_offer_avg=KPI(name='power_flex_offer_avg', value=None, unit='kW', direction='negative'), energy_flex=KPI(name='energy_flex', value=None, unit='kWh', direction='negative'), power_flex_within_boundary=KPI(name='power_flex_within_boundary', value=None, unit='-', direction='negative'), electricity_costs_series=KPISeries(name='electricity_costs_series', value=None, unit='ct/h', direction='negative', dt=None), costs=KPI(name='costs', value=None, unit='ct', direction='negative'), corrected_costs=KPI(name='corrected_costs', value=None, unit='ct', direction='negative'), costs_rel=KPI(name='costs_rel', value=None, unit='ct/kWh', direction='negative'), corrected_costs_rel=KPI(name='corrected_costs_rel', value=None, unit='ct/kWh', direction='negative'))

KPIs for negative flexibility

field kpis_pos: FlexibilityKPIs = FlexibilityKPIs(direction='positive', power_flex_full=KPISeries(name='power_flex_full', value=None, unit='kW', direction='positive', dt=None), power_flex_offer=KPISeries(name='power_flex_offer', value=None, unit='kW', direction='positive', dt=None), power_flex_offer_max=KPI(name='power_flex_offer_max', value=None, unit='kW', direction='positive'), power_flex_offer_min=KPI(name='power_flex_offer_min', value=None, unit='kW', direction='positive'), power_flex_offer_avg=KPI(name='power_flex_offer_avg', value=None, unit='kW', direction='positive'), energy_flex=KPI(name='energy_flex', value=None, unit='kWh', direction='positive'), power_flex_within_boundary=KPI(name='power_flex_within_boundary', value=None, unit='-', direction='positive'), electricity_costs_series=KPISeries(name='electricity_costs_series', value=None, unit='ct/h', direction='positive', dt=None), costs=KPI(name='costs', value=None, unit='ct', direction='positive'), corrected_costs=KPI(name='corrected_costs', value=None, unit='ct', direction='positive'), costs_rel=KPI(name='costs_rel', value=None, unit='ct/kWh', direction='positive'), corrected_costs_rel=KPI(name='corrected_costs_rel', value=None, unit='ct/kWh', direction='positive'))

KPIs for positive flexibility

field mpc_time_grid: ndarray = None

Time grid of the mpcs

field power_profile_base: Series = None

Base power profile

field power_profile_flex_neg: Series = None

Power profile of the negative flexibility

field power_profile_flex_pos: Series = None

Power profile of the positive flexibility

field stored_energy_profile_base: Series = None

Base profile of the stored electrical energy

field stored_energy_profile_flex_neg: Series = None

Profile of the stored electrical energy for negative flexibility

field stored_energy_profile_flex_pos: Series = None

Profile of the stored elctrical energy for positive flexibility

field switch_time: float | None = None

Time of the switch between the preparation and the market time

class Config[source]

Bases: object

arbitrary_types_allowed = True
calculate(enable_energy_costs_correction: bool, calculate_flex_cost: bool) [<class 'agentlib_flexquant.data_structures.flex_kpis.FlexibilityKPIs'>, <class 'agentlib_flexquant.data_structures.flex_kpis.FlexibilityKPIs'>][source]

Calculate the KPIs for the positive and negative flexibility.

Returns:

positive KPIs, negative KPIs

format_mpc_inputs(series: Series) Series[source]

Format the input of the mpc to unify the data.

Parameters:

series – Input series from a mpc.

Returns:

Formatted series.

format_predictor_inputs(series: Series) Series[source]

Format the input of the predictor to unify the data.

Parameters:

series – Input series from a predictor.

Returns:

Formatted series.

get_kpis() dict[str, KPI][source]
pydantic model agentlib_flexquant.data_structures.flex_kpis.FlexibilityKPIs[source]

Bases: BaseModel

Class defining the indicator KPIs.

Fields:
field corrected_costs: KPI = KPI(name='corrected_costs', value=None, unit='ct', direction=None)

Corrected costs of flexibility considering the stored energy in the system

field corrected_costs_rel: KPI = KPI(name='corrected_costs_rel', value=None, unit='ct/kWh', direction=None)

Corrected costs of flexibility per energy

field costs: KPI = KPI(name='costs', value=None, unit='ct', direction=None)

Costs of flexibility

field costs_rel: KPI = KPI(name='costs_rel', value=None, unit='ct/kWh', direction=None)

Costs of flexibility per energy

field direction: Literal['positive', 'negative'] = None

Direction of the shadow mpc

field electricity_costs_series: KPISeries = KPISeries(name='electricity_costs_series', value=None, unit='ct/h', direction=None, dt=None)

Costs of flexibility

field energy_flex: KPI = KPI(name='energy_flex', value=None, unit='kWh', direction=None)

Energy flexibility equals the integral of the power flexibility

field power_flex_full: KPISeries = KPISeries(name='power_flex_full', value=None, unit='kW', direction=None, dt=None)

Power flexibility

field power_flex_offer: KPISeries = KPISeries(name='power_flex_offer', value=None, unit='kW', direction=None, dt=None)

Power flexibility

field power_flex_offer_avg: KPI = KPI(name='power_flex_offer_avg', value=None, unit='kW', direction=None)

Average power flexibility

field power_flex_offer_max: KPI = KPI(name='power_flex_offer_max', value=None, unit='kW', direction=None)

Maximum power flexibility

field power_flex_offer_min: KPI = KPI(name='power_flex_offer_min', value=None, unit='kW', direction=None)

Minimum power flexibility

field power_flex_within_boundary: KPI = KPI(name='power_flex_within_boundary', value=None, unit='-', direction=None)

Variable indicating whether the baseline power and flex power align at the horizon end

calculate(power_profile_base: Series, power_profile_shadow: Series, electricity_price_series: Series, mpc_time_grid: ndarray, flex_offer_time_grid: ndarray, stored_energy_base: Series, stored_energy_shadow: Series, enable_energy_costs_correction: bool, calculate_flex_cost: bool)[source]

Calculate the KPIs based on the power and electricity input profiles. Time grids needed for indexing of the power flexibility profiles.

get_kpi_dict(identifier: bool = False) dict[str, KPI][source]

Get the KPIs as a dictionary with names or identifier as keys.

Parameters:

identifier – If True, the keys are the identifiers of the KPIs, otherwise the name of the kpi.

get_name_dict() dict[str, str][source]
Returns:

Dictionary of the kpis with names as keys and the identifiers as values.

pydantic model agentlib_flexquant.data_structures.flex_kpis.KPI[source]

Bases: BaseModel

Class defining attributes of the indicator KPI.

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field direction: Literal['positive', 'negative'] | None = None

Direction of the shadow mpc / flexibility

field name: str = None

Name of the flexibility KPI

field unit: str = None

Unit of the flexibility KPI

field value: float | None = None

Value of the flexibility KPI

class Config[source]

Bases: object

arbitrary_types_allowed = True
get_kpi_identifier()[source]
pydantic model agentlib_flexquant.data_structures.flex_kpis.KPISeries[source]

Bases: KPI

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field dt: Series | None = None

Time differences between the timestamps of the series in seconds

field value: Series | None = None

Value of the flexibility KPI

avg() float[source]

Calculate the average value of the KPI over time.

integrate(time_unit: Literal['seconds', 'minutes', 'hours', 'days'] = 'seconds') float[source]

Integrate the value of the KPI over time by summing up the product of values and the time difference.

max() float[source]
min() float[source]

agentlib_flexquant.data_structures.flex_offer module

pydantic model agentlib_flexquant.data_structures.flex_offer.FlexOffer[source]

Bases: BaseModel

Data class for the flexibility offer

Config:
  • arbitrary_types_allowed: bool = True

Fields:
field base_power_profile: Series = None

Power profile of the baseline MPC

field neg_diff_profile: Series = None

Power profile for the negative difference

field neg_price: float | None = None

Price for negative flexibility

field pos_diff_profile: Series = None

Power profile for the positive difference

field pos_price: float | None = None

Price for positive flexibility

field status: OfferStatus = 'Not Accepted'

Status of the FlexOffer

class Config[source]

Bases: object

arbitrary_types_allowed = True
as_dataframe()[source]

Returns the offer as a dataframe. Scalar values are written on the first timestep

class agentlib_flexquant.data_structures.flex_offer.OfferStatus(value)[source]

Bases: Enum

accepted_negative = 'Accepted Negative'
accepted_positive = 'Accepted Positive'
not_accepted = 'Not Accepted'

agentlib_flexquant.data_structures.flex_results module

class agentlib_flexquant.data_structures.flex_results.Results(flex_config: str | Annotated[Path, PathType(path_type=file)] | dict | None, simulator_agent_config: str | Annotated[Path, PathType(path_type=file)] | dict | None, generated_flex_files_base_path: str | Annotated[Path, PathType(path_type=file)] | None = None, results: str | Annotated[Path, PathType(path_type=file)] | dict[str, dict[str, DataFrame]] | Results | None = None, to_timescale: Literal['seconds', 'minutes', 'hours', 'days'] = 'seconds')[source]

Bases: object

baseline_agent_config: AgentConfig
baseline_module_config: BaseMPCConfig
convert_timescale_of_dataframe_index(to_timescale: Literal['seconds', 'minutes', 'hours', 'days'])[source]

Convert the time in the dataframes to the desired timescale

Keyword arguments: timescale – The timescale to convert the data to

create_instance_with_skipped_validation(model_class: Type[BaseModel], config: Dict[str, Any], skip_fields: List[str] | None = None) BaseModel[source]

Create a Pydantic model instance while skipping validation for specified fields.

This function allows partial validation of a model’s config dictionary by validating all fields except those listed in skip_fields. Skipped fields are set on the instance after construction without triggering their validators.

Parameters:
  • model_class (Type[BaseModel]) – The Pydantic model class to instantiate.

  • config (Dict[str, Any]) – The input configuration dictionary.

  • skip_fields (Optional[List[str]]) – A list of field names to exclude from validation. These fields will be manually set after instantiation.

Returns:

An instance of the model_class with validated and skipped fields assigned.

Return type:

BaseModel

current_timescale_of_data: Literal['seconds', 'minutes', 'hours', 'days'] = 'seconds'
df_baseline: DataFrame
df_baseline_stats: DataFrame
df_indicator: DataFrame
df_market: DataFrame
df_neg_flex: DataFrame
df_neg_flex_stats: DataFrame
df_pos_flex: DataFrame
df_pos_flex_stats: DataFrame
df_simulation: DataFrame
generator_config: FlexQuantConfig
get_intersection_mpcs_sim() dict[str, dict[str, str]][source]

Get the intersection of the MPCs and the simulator variables. returns a dictionary with the following structure: Key: variable alias (from baseline) Value: {module id: variable name}

indicator_agent_config: AgentConfig
indicator_module_config: FlexibilityIndicatorModuleConfig
market_agent_config: AgentConfig
market_module_config: FlexibilityMarketModuleConfig
neg_flex_agent_config: AgentConfig
neg_flex_module_config: BaseMPCConfig
pos_flex_agent_config: AgentConfig
pos_flex_module_config: BaseMPCConfig
simulator_agent_config: AgentConfig
simulator_module_config: SimulatorConfig
agentlib_flexquant.data_structures.flex_results.load_indicator(file_path: str | Annotated[Path, PathType(path_type=file)]) DataFrame[source]

Load the flexibility indicator results from the given file path

agentlib_flexquant.data_structures.flex_results.load_market(file_path: str | Annotated[Path, PathType(path_type=file)]) DataFrame[source]

Load the market results from the given file path

agentlib_flexquant.data_structures.flexquant module

pydantic model agentlib_flexquant.data_structures.flexquant.FlexQuantConfig[source]

Bases: BaseModel

Class defining the options to initialize the FlexQuant generation.

Config:
  • json_encoders: dict = {<class ‘pathlib.Path’>: <class ‘str’>}

  • extra: str = forbid

Fields:
Validators:
field baseline_config_generator_data: BaselineMPCData [Required]

Baseline generator data config file or dict

Validated by:
field delete_files: bool = True

If generated files should be deleted afterwards

Validated by:
field flex_base_directory_path: Path | None [Optional]

Base path where generated flex data is stored

Validated by:
field flex_event_duration: int = 7200

Flexibility event duration

Constraints:
  • ge = 0

Validated by:
field flex_files_directory: Path = PosixPath('created_flex_files')

Directory where generated files (jsons) should be stored

Validated by:
field indicator_config: FlexibilityIndicatorConfig | Path [Required]

Path to the file or dict of flexibility indicator config

Validated by:
field market_config: FlexibilityMarketConfig | Path | None = None

Path to the file or dict of market config

Validated by:
field market_time: int = 900

Time for market interaction

Constraints:
  • ge = 0

Validated by:
field overwrite_files: bool = False

If generated files should be overwritten by new files

Validated by:
field prep_time: int = 1800

Preparation time before the flexibility event

Constraints:
  • ge = 0

Validated by:
field results_directory: Path = PosixPath('results')

Directory where generated result files (CSVs) should be stored

Validated by:
field shadow_mpc_config_generator_data: ShadowMPCConfigGeneratorConfig [Required]

Shadow mpc generator data config file or dict

Validated by:
validator adapt_paths_and_create_directory  »  all fields[source]

Adjusts and ensures the directory structure for flex file generation and results storage.

This method: - Updates flex_files_directory and results_directory paths so they are relative to the base flex directory, using only the directory names (ignoring any user-supplied paths). - Creates the base, flex files, and results directories if they do not already exist.

validator check_config_file_extension  »  all fields[source]

Validates that the indicator and market config file paths have a ‘.json’ extension.

Raises:

ValueError – If either file does not have the expected ‘.json’ extension.

pydantic model agentlib_flexquant.data_structures.flexquant.FlexibilityIndicatorConfig[source]

Bases: BaseModel

Class defining the options for the flexibility indicators.

Config:
  • json_encoders: dict = {<class ‘pathlib.Path’>: <class ‘str’>, <class ‘agentlib.core.agent.AgentConfig’>: <function FlexibilityIndicatorConfig.<lambda> at 0x7fae95b1ad40>}

  • extra: str = forbid

Fields:
Validators:
field agent_config: AgentConfig [Required]
Validated by:
field name_of_created_file: str = 'indicator.json'

Name of the config that is created by the generator

Validated by:
validator check_file_extension  »  all fields[source]
pydantic model agentlib_flexquant.data_structures.flexquant.FlexibilityMarketConfig[source]

Bases: BaseModel

Class defining the options to initialize the market.

Config:
  • extra: str = forbid

Fields:
field agent_config: AgentConfig [Required]
field name_of_created_file: str = 'flexibility_market.json'

Name of the config that is created by the generator

class agentlib_flexquant.data_structures.flexquant.ForcedOffers(value)[source]

Bases: Enum

negative = 'negative'
positive = 'positive'
pydantic model agentlib_flexquant.data_structures.flexquant.ShadowMPCConfigGeneratorConfig[source]

Bases: BaseModel

Class defining the options to initialize the shadow mpc config generation.

Config:
  • json_encoders: dict = {<class ‘agentlib_mpc.data_structures.mpc_datamodels.MPCVariable’>: <function ShadowMPCConfigGeneratorConfig.<lambda> at 0x7fae95b1aa20>}

  • extra: str = forbid

Fields:
Validators:
field neg_flex: NFMPCData = None

Data for NF-MPC

Validated by:
field pos_flex: PFMPCData = None

Data for PF-MPC

Validated by:
field weights: List[MPCVariable] = []

Name and value of weights

Validated by:
validator assign_weights_to_flex  »  all fields[source]

agentlib_flexquant.data_structures.globals module

Script containing global variables

agentlib_flexquant.data_structures.globals.return_baseline_cost_function(power_variable, comfort_variable)[source]

agentlib_flexquant.data_structures.market module

pydantic model agentlib_flexquant.data_structures.market.CustomOptions[source]

Bases: BaseModel

Config:
  • extra: str = allow

Fields:
field type: Literal['custom'] [Required]
pydantic model agentlib_flexquant.data_structures.market.MarketSpecifications[source]

Bases: BaseModel

Fields:
Validators:
field cooldown: int = 6

cooldown time (no timesteps) after a provision

Validated by:
field minimum_average_flex: float = 0

minimum average of an accepted offer

Validated by:
field options: RandomOptions | SingleOptions | CustomOptions [Required]

Market options, changes depending on ‘type’

Validated by:
field type: str = None

Name of market type

Validated by:
validator set_options_type  »  all fields[source]
pydantic model agentlib_flexquant.data_structures.market.RandomMarket[source]

Bases: MarketSpecifications

Fields:
Validators:

field type: str = 'random'
Validated by:
pydantic model agentlib_flexquant.data_structures.market.RandomOptions[source]

Bases: BaseModel

Fields:
field offer_acceptance_rate: float = 0.5

Determines the likelihood of an accepted offer

Constraints:
  • ge = 0

  • le = 1

field pos_neg_rate: float = 0

Determines the likelihood positive and the negative flexibility.A higher rate means that more positive offers will be accepted.

Constraints:
  • ge = 0

  • le = 1

field random_seed: int = None

Random seed for reproducing experiments

field type: Literal['random'] [Required]
pydantic model agentlib_flexquant.data_structures.market.SingleOptions[source]

Bases: BaseModel

Fields:
field direction: Literal['positive', 'negative'] = 'positive'

Direction of the flexibility

field start_time: float [Required]

After this time, the first available flex offer is accepted

field type: Literal['single'] [Required]

agentlib_flexquant.data_structures.mpcs module

pydantic model agentlib_flexquant.data_structures.mpcs.BaseMPCData[source]

Bases: BaseModel

Base class containing necessary data for the code creation of the different mpcs

Config:
  • json_encoders: dict = {<class ‘agentlib_mpc.data_structures.mpc_datamodels.MPCVariable’>: <function BaseMPCData.<lambda> at 0x7fae95b19a80>}

Fields:
field class_name: str [Required]
field config_inputs_appendix: List[MPCVariable] = []
field config_parameters_appendix: List[MPCVariable] = []
field created_flex_mpcs_file: str = 'flex_agents.py'
field module_id: str [Required]
field module_types: dict [Required]
field name_of_created_file: str [Required]
field power_alias: str [Required]
field results_suffix: str [Required]
field stored_energy_alias: str [Required]
field weights: List[MPCVariable] = []

Name and value of weights

pydantic model agentlib_flexquant.data_structures.mpcs.BaselineMPCData[source]

Bases: BaseMPCData

Data class for Baseline MPC

Config:
  • json_encoders: dict = {<class ‘agentlib_mpc.data_structures.mpc_datamodels.MPCVariable’>: <function BaselineMPCData.<lambda> at 0x7fae95b19bc0>}

Fields:
Validators:
field class_name: str = 'BaselineMPCModel'
Validated by:
field comfort_variable: str = None

Name of the slack variable representing the thermal comfort in the baseline config

Validated by:
field config_inputs_appendix: List[MPCVariable] = [MPCVariable(name='_P_external', type=None, timestamp=None, unit='W', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=0, alias='_P_external', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>), MPCVariable(name='in_provision', type=None, timestamp=None, unit='Not defined', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=False, alias='in_provision', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>), MPCVariable(name='rel_start', type=None, timestamp=None, unit='s', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=0, alias='rel_start', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>), MPCVariable(name='rel_end', type=None, timestamp=None, unit='s', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=0, alias='rel_end', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>)]
Validated by:
field config_parameters_appendix: List[MPCVariable] = []
Validated by:
field module_id: str = 'Baseline'
Validated by:
field module_types: dict = {'agentlib_mpc.minlp_mpc': 'agentlib_flexquant.baseline_minlp_mpc', 'agentlib_mpc.mpc': 'agentlib_flexquant.baseline_mpc'}
Validated by:
field name_of_created_file: str = 'baseline.json'
Validated by:
field power_alias: str = '_P_el_base'
Validated by:
field power_unit: str = 'kW'

Unit of the power variable

Validated by:
field power_variable: str = 'P_el'

Name of the variable representing the electrical power in the baseline config

Validated by:
field profile_comfort_weight: float = 1

Weight of soft constraint for discomfort

Validated by:
field profile_deviation_weight: float = 0

Weight of soft constraint for deviation from accepted flexible profile

Validated by:
field results_suffix: str = '_base.csv'
Validated by:
field stored_energy_alias: str = '_E_stored_base'
Validated by:
field weights: List[MPCVariable] = []

Name and value of weights

Validated by:
validator update_config_parameters_appendix  »  all fields[source]
pydantic model agentlib_flexquant.data_structures.mpcs.NFMPCData[source]

Bases: BaseMPCData

Data class for PF-MPC

Config:
  • json_encoders: dict = {<class ‘agentlib_mpc.data_structures.mpc_datamodels.MPCVariable’>: <function NFMPCData.<lambda> at 0x7fae95b19f80>}

Fields:
field class_name: str = 'NegFlexModel'
field config_inputs_appendix: List[MPCVariable] = [MPCVariable(name='in_provision', type=None, timestamp=None, unit='Not defined', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=False, alias='in_provision', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>)]
field config_parameters_appendix: List[MPCVariable] = [MPCVariable(name='prep_time', type=None, timestamp=None, unit='s', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=0, alias='prep_time', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>), MPCVariable(name='market_time', type=None, timestamp=None, unit='s', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=0, alias='market_time', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>), MPCVariable(name='flex_event_duration', type=None, timestamp=None, unit='s', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=0, alias='flex_event_duration', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>)]
field flex_cost_function: str = None

Cost function of the NF-MPC

field module_id: str = 'NegFlexMPC'
field module_types: dict = {'agentlib_mpc.minlp_mpc': 'agentlib_flexquant.shadow_minlp_mpc', 'agentlib_mpc.mpc': 'agentlib_flexquant.shadow_mpc'}
field name_of_created_file: str = 'neg_flex.json'
field power_alias: str = '_P_el_neg'
field results_suffix: str = '_neg_flex.csv'
field stored_energy_alias: str = '_E_stored_neg'
field weights: List[MPCVariable] = []

Name and value of weights

pydantic model agentlib_flexquant.data_structures.mpcs.PFMPCData[source]

Bases: BaseMPCData

Data class for PF-MPC

Config:
  • json_encoders: dict = {<class ‘agentlib_mpc.data_structures.mpc_datamodels.MPCVariable’>: <function PFMPCData.<lambda> at 0x7fae95b19e40>}

Fields:
field class_name: str = 'PosFlexModel'
field config_inputs_appendix: List[MPCVariable] = [MPCVariable(name='in_provision', type=None, timestamp=None, unit='Not defined', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=False, alias='in_provision', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>)]
field config_parameters_appendix: List[MPCVariable] = [MPCVariable(name='prep_time', type=None, timestamp=None, unit='s', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=0, alias='prep_time', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>), MPCVariable(name='market_time', type=None, timestamp=None, unit='s', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=0, alias='market_time', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>), MPCVariable(name='flex_event_duration', type=None, timestamp=None, unit='s', description='Not defined', ub=inf, lb=-inf, clip=False, allowed_values=[], value=0, alias='flex_event_duration', source=Source(agent_id=None, module_id=None), shared=None, rdf_class=None, interpolation_method=<InterpolationMethods.linear: 'linear'>)]
field flex_cost_function: str = None

Cost function of the PF-MPC

field module_id: str = 'PosFlexMPC'
field module_types: dict = {'agentlib_mpc.minlp_mpc': 'agentlib_flexquant.shadow_minlp_mpc', 'agentlib_mpc.mpc': 'agentlib_flexquant.shadow_mpc'}
field name_of_created_file: str = 'pos_flex.json'
field power_alias: str = '_P_el_pos'
field results_suffix: str = '_pos_flex.csv'
field stored_energy_alias: str = '_E_stored_pos'
field weights: List[MPCVariable] = []

Name and value of weights