: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) 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: dict .. py:class:: Sim Bases: :py:obj:`mosaik_api_v3.Simulator` Simulator class for eELib influx-reader model. :param mosaik_api_v3: defines communication between mosaik and simulator :type mosaik_api_v3: module :raises ValueError: Unknown output attribute, when not described in META of simulator .. py:method:: init(sid, scenario_config, time_resolution=1.0) 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: float :returns: description of the simulator :rtype: meta .. py:method:: create(num, model_type, init_vals) 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: list :returns: created entities :rtype: dict .. py:method:: step(time, inputs, max_advance=1) 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 time step (when orchestrator calls again) :rtype: int .. py:method:: get_data(outputs) 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