starling_sim.basemodel.output.information_factory
Module Contents
Classes
Generic structure of a geojson information factory. |
|
This factory traces the activity of agents. |
|
This factory traces the stock of vehicles and stations. |
|
This factory traces the delay of service vehicles compared to the timetable. |
- class starling_sim.basemodel.output.information_factory.InformationFactory(information_key=None)
Bases:
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.
- DEFAULT_KEY = 'key'
- setup(simulation_model)
Setup method called during simulation setup.
- Parameters:
simulation_model –
- get_dict()
Get the dict to add in the ‘information’ property.
- Returns:
dict with keys ‘values’ and ‘timestamps’.
- new_information_dict()
Reset the structures containing the information.
- append_value_and_timestamp(value, timestamp)
Append a value and its timestamp to the information structures.
Avoids appending only one of the structures.
- Parameters:
value –
timestamp –
- update(event, agent)
Update the information structures according to the event content and agent.
- Parameters:
event –
agent –
- class starling_sim.basemodel.output.information_factory.ActivityInformation(information_key=None)
Bases:
InformationFactory
This factory traces the activity of agents.
- DEFAULT_KEY = 'activity'
- update(event, agent)
Update the information structures according to the event content and agent.
- Parameters:
event –
agent –
- class starling_sim.basemodel.output.information_factory.StockInformation(information_key=None)
Bases:
InformationFactory
This factory traces the stock of vehicles and stations.
- DEFAULT_KEY = 'stock'
- update(event, agent)
Update the information structures according to the event content and agent.
- Parameters:
event –
agent –
- class starling_sim.basemodel.output.information_factory.DelayInformation(information_key=None)
Bases:
InformationFactory
This factory traces the delay of service vehicles compared to the timetable.
- DEFAULT_KEY = 'delay'
- update(event, agent)
Update the information structures according to the event content and agent.
- Parameters:
event –
agent –