:py:mod:`eelib.data.csv_reader.csv_reader_simulator` ==================================================== .. py:module:: eelib.data.csv_reader.csv_reader_simulator .. autoapi-nested-parse:: Mosaik interface for the eELib csv-reader model. Simulator for communication between orchestrator (mosaik) and csv-reader entities. Within this interface mosaik functionalities are used. Copyright (c) LGPL | 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.csv_reader.csv_reader_simulator.Sim Attributes ~~~~~~~~~~ .. autoapisummary:: eelib.data.csv_reader.csv_reader_simulator.META .. py:data:: META .. py:class:: Sim Bases: :py:obj:`mosaik_api_v3.Simulator` Simulator class for eELib csv-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) Initializes parameters for an object of the CSV-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 csv-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 csv-reader entity :type init_vals: list :returns: created entities :rtype: dict .. py:method:: get_entity_by_id(entity_id: str) Searches for a requested entity id and gives back the entity model. :param entity_id: id of the entity to be searched for :type entity_id: str :returns: entity model if found, None otherwise :rtype: object .. py:method:: step(time, inputs, max_advance) Performs simulation step calling the eELib csv-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 (NOT NEEDED FOR CSV-READER MODEL) :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