starling_sim.basemodel.trace.events
This module contains event classes that compose agents’ traces
Module Contents
Classes
This class represents the events contained in the trace. |
|
This abstract event describes an event that takes place over several time steps. |
|
This event describes the generation of a traced element. |
|
This event describes an agent moving |
|
This event describes the route of an agent |
|
This event describes a position change of an agent |
|
This event describes the a waiting agent |
|
This event describes an idle agent |
|
This event describes a status change of an agent service. |
|
This event describes a user request |
|
This event describes the processing of a Stop |
|
This event describes a staff operation |
|
This event describes an agent getting a vehicle |
|
This event describes an agent returning a vehicle |
|
This event describes an agent leaving the simulation |
|
This event describes an agent reaching its destination |
|
This event describes an agent leaving the simulation. |
- class starling_sim.basemodel.trace.events.Event(time)
This class represents the events contained in the trace.
It should be extended to describe the different kinds of events of the simulation.
- property name
- property xml_attrib
- to_xml() xml.etree.ElementTree.Element
- _get_xml_attrib() dict
- _xml_sub_elements() list | None
- __str__()
Return str(self).
- class starling_sim.basemodel.trace.events.DurationEvent(time)
Bases:
Event
,abc.ABC
This abstract event describes an event that takes place over several time steps.
- property total_duration
Get the total duration of the event.
- Returns:
integer describing the total event duration
- abstract _total_duration() int
- class starling_sim.basemodel.trace.events.InputEvent(time, agent)
Bases:
Event
This event describes the generation of a traced element.
- class starling_sim.basemodel.trace.events.MoveEvent(time, origin, destination, move_distance, move_duration, mode)
Bases:
DurationEvent
This event describes an agent moving
- _total_duration() int
- class starling_sim.basemodel.trace.events.RouteEvent(time, route_data, mode)
Bases:
MoveEvent
This event describes the route of an agent
- set_route_data(route_data)
- get_route_data_in_interval(start_time, end_time)
- _xml_sub_elements() list | None
- _get_xml_attrib()
- class starling_sim.basemodel.trace.events.PositionChangeEvent(time, origin, destination, distance, duration, mode)
Bases:
MoveEvent
This event describes a position change of an agent
- class starling_sim.basemodel.trace.events.WaitEvent(time, reason, waiting_time)
Bases:
DurationEvent
This event describes the a waiting agent
- _total_duration()
- class starling_sim.basemodel.trace.events.IdleEvent(time, idle_duration)
Bases:
Event
This event describes an idle agent
- class starling_sim.basemodel.trace.events.ServiceEvent(time, former_status, new_status)
Bases:
Event
This event describes a status change of an agent service.
- class starling_sim.basemodel.trace.events.RequestEvent(time, request)
Bases:
DurationEvent
This event describes a user request
- _total_duration()
- class starling_sim.basemodel.trace.events.StopEvent(time, operator, service_vehicle, trip, stop)
Bases:
Event
This event describes the processing of a Stop
- set_dropoffs(dropoffs, dropoff_time)
- set_pickups(pickups, pickup_time)
- _xml_sub_elements() list | None
- _get_xml_attrib()
- class starling_sim.basemodel.trace.events.StaffOperationEvent(time, staff, total, goal, targets=None, structure=None)
Bases:
Event
This event describes a staff operation
- class starling_sim.basemodel.trace.events.GetVehicleEvent(time, agent, vehicle)
Bases:
Event
This event describes an agent getting a vehicle
- class starling_sim.basemodel.trace.events.LeaveVehicleEvent(time, agent, vehicle)
Bases:
Event
This event describes an agent returning a vehicle
- class starling_sim.basemodel.trace.events.LeaveSystemEvent(time)
Bases:
Event
This event describes an agent leaving the simulation