:py:mod:`eelib.data.influx_reader.influx_reader_simulator` ========================================================== .. py:module:: eelib.data.influx_reader.influx_reader_simulator .. autoapi-nested-parse:: Mosaik interface for the eELib influx-reader model. Simulator for communication between orchestrator (mosaik) and influx-reader entities. | Author: elenia@TUBS | Copyright 2024 elenia | This file is part of eELib, which is free software under the terms of the GNU GPL Version 3. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: eelib.data.influx_reader.influx_reader_simulator.Sim Functions ~~~~~~~~~ .. autoapisummary:: eelib.data.influx_reader.influx_reader_simulator.set_meta_attrs Attributes ~~~~~~~~~~ .. autoapisummary:: eelib.data.influx_reader.influx_reader_simulator.META .. py:data:: META .. py:function:: set_meta_attrs(init_vals: list) Method to dynamically set the attributes of the simulator. Should be called before the simulation begins. :param init_vals: initial variables and their values. :type init_vals: list .. py:class:: Sim Bases: :py:obj:`mosaik_api_v3.Simulator` Simulator class for eELib influx-reader model. .. py:attribute:: entities .. py:method:: init(sid: str, scenario_config: dict, time_resolution: int = 1) -> dict Initializer for influx-Reader:Sim class. :param sid: ID of the created entity of the simulator (e.g. LoadSim-0) :type sid: str :param scenario_config: scenario configuration data, like resolution or step size :type scenario_config: dict :param time_resolution: Time resolution of current scenario. :type time_resolution: int :returns: description of the simulator :rtype: dict .. py:method:: create(num: int, model_type: str, init_vals: dict) -> dict Creates entities of the eELib influx-reader model. Core function of mosaik. :param num: number of load models to be created :type num: int :param model_type: type of created instance (e.g. "household") :type model_type: str :param init_vals: list with initial values for each influx-reader entity :type init_vals: dict :raises ValueError: If entity ID is already existing :returns: created entities :rtype: dict .. py:method:: step(time: int, inputs: dict, max_advance: int = 1) -> int Performs simulation step calling the eELib influx-reader model. Core function of mosaik. :param time: current simulation time (given by mosaik) :type time: int :param inputs: allocation of return values to specific models :type inputs: dict, optional :param max_advance: simulation time until the simulator can safely advance it's internal time without causing any causality errors. :type max_advance: int, optional :returns: next timestep (when orchestrator calls again) :rtype: int .. py:method:: get_data(outputs: dict) -> dict Gets the data for the next connected model. Core function of mosaik. :param outputs: dictionary with data outputs from each entity :type outputs: dict :raises ValueError: error if attribute not in model metadata :returns: dictionary with simulation outputs :rtype: dict