eelib.data.collector

Simple collector simulator based on the one defined within the mosaik tutorial: https://mosaik.readthedocs.io/en/latest/ Prints all inputs immediately.

@author: elenia@TUBS

Module Contents

Classes

Collector

Collector simualtor to provide simple prints in each step.

Attributes

META

META
class Collector

Bases: mosaik_api_v3.Simulator

Collector simualtor to provide simple prints in each step.

init(sid, time_resolution)

Init of a simulator instance.

Parameters:
  • sid (_type_) – _description_

  • time_resolution (_type_) – _description_

Returns:

_description_

Return type:

_type_

create(num, model)

Create mosaik sim of the collector.

Parameters:
  • num (_type_) – _description_

  • model (_type_) – _description_

Raises:

RuntimeError – If more than one simulators should be initialized.

Returns:

eid and simulator

Return type:

dict

step(time, inputs, max_advance)

Step method of the collector simulator. Prints all inputs.

Parameters:
  • time (_type_) – _description_

  • inputs (_type_) – _description_

  • max_advance (_type_) – _description_

Returns:

max advance until next call of the simulator.

Return type:

int