:py:mod:`starling_sim.basemodel.output.information_factory` =========================================================== .. py:module:: starling_sim.basemodel.output.information_factory Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: starling_sim.basemodel.output.information_factory.InformationFactory starling_sim.basemodel.output.information_factory.ActivityInformation starling_sim.basemodel.output.information_factory.StockInformation starling_sim.basemodel.output.information_factory.DelayInformation .. py:class:: InformationFactory(information_key=None) Bases: :py:obj:`abc.ABC` Generic structure of a geojson information factory. Its subclasses put together specific information to add in the geojson features, in the 'information' property. .. py:attribute:: DEFAULT_KEY :value: 'key' .. py:method:: setup(simulation_model) Setup method called during simulation setup. :param simulation_model: .. py:method:: get_dict() Get the dict to add in the 'information' property. :return: dict with keys 'values' and 'timestamps'. .. py:method:: new_information_dict() Reset the structures containing the information. .. py:method:: append_value_and_timestamp(value, timestamp) Append a value and its timestamp to the information structures. Avoids appending only one of the structures. :param value: :param timestamp: .. py:method:: update(event, agent) Update the information structures according to the event content and agent. :param event: :param agent: .. py:class:: ActivityInformation(information_key=None) Bases: :py:obj:`InformationFactory` This factory traces the activity of agents. .. py:attribute:: DEFAULT_KEY :value: 'activity' .. py:method:: update(event, agent) Update the information structures according to the event content and agent. :param event: :param agent: .. py:class:: StockInformation(information_key=None) Bases: :py:obj:`InformationFactory` This factory traces the stock of vehicles and stations. .. py:attribute:: DEFAULT_KEY :value: 'stock' .. py:method:: update(event, agent) Update the information structures according to the event content and agent. :param event: :param agent: .. py:class:: DelayInformation(information_key=None) Bases: :py:obj:`InformationFactory` This factory traces the delay of service vehicles compared to the timetable. .. py:attribute:: DEFAULT_KEY :value: 'delay' .. py:method:: update(event, agent) Update the information structures according to the event content and agent. :param event: :param agent: