eelib.data.influx_reader.influx_reader_simulator
Mosaik interface for the eELib influx-reader model. Simulator for communication between orchestrator (mosaik) and influx-reader entities.
Module Contents
Classes
Simulator class for eELib influx-reader model. |
Functions
|
Method to dynamically set the attributes of the simulator. |
Attributes
- META
- set_meta_attrs(init_vals: list)
Method to dynamically set the attributes of the simulator. Should be called before the simulation begins.
- Parameters:
init_vals (list) – initial variables and their values.
- class Sim
Bases:
mosaik_api_v3.SimulatorSimulator class for eELib influx-reader model.
- entities
- init(sid: str, scenario_config: dict, time_resolution: int = 1) dict
Initializer for influx-Reader:Sim class.
- Parameters:
sid (str) – ID of the created entity of the simulator (e.g. LoadSim-0)
scenario_config (dict) – scenario configuration data, like resolution or step size
time_resolution (int) – Time resolution of current scenario.
- Returns:
description of the simulator
- Return type:
dict
- create(num: int, model_type: str, init_vals: dict) dict
Creates entities of the eELib influx-reader model. Core function of mosaik.
- Parameters:
num (int) – number of load models to be created
model_type (str) – type of created instance (e.g. “household”)
init_vals (dict) – list with initial values for each influx-reader entity
- Raises:
ValueError – If entity ID is already existing
- Returns:
created entities
- Return type:
dict
- step(time: int, inputs: dict, max_advance: int = 1) int
Performs simulation step calling the eELib influx-reader model. Core function of mosaik.
- Parameters:
time (int) – current simulation time (given by mosaik)
inputs (dict, optional) – allocation of return values to specific models
max_advance (int, optional) – simulation time until the simulator can safely advance it’s internal time without causing any causality errors.
- Returns:
next timestep (when orchestrator calls again)
- Return type:
int
- get_data(outputs: dict) dict
Gets the data for the next connected model. Core function of mosaik.
- Parameters:
outputs (dict) – dictionary with data outputs from each entity
- Raises:
ValueError – error if attribute not in model metadata
- Returns:
dictionary with simulation outputs
- Return type:
dict