starling_sim.basemodel.trace.events

This module contains event classes that compose agents’ traces

Module Contents

Classes

Event

This class represents the events contained in the trace.

DurationEvent

This abstract event describes an event that takes place over several time steps.

InputEvent

This event describes the generation of a traced element.

MoveEvent

This event describes an agent moving

RouteEvent

This event describes the route of an agent

PositionChangeEvent

This event describes a position change of an agent

WaitEvent

This event describes the a waiting agent

IdleEvent

This event describes an idle agent

ServiceEvent

This event describes a status change of an agent service.

RequestEvent

This event describes a user request

StopEvent

This event describes the processing of a Stop

StaffOperationEvent

This event describes a staff operation

GetVehicleEvent

This event describes an agent getting a vehicle

LeaveVehicleEvent

This event describes an agent returning a vehicle

LeaveSystemEvent

This event describes an agent leaving the simulation

DestinationReachedEvent

This event describes an agent reaching its destination

LeaveSimulationEvent

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

class starling_sim.basemodel.trace.events.DestinationReachedEvent(time)

Bases: Event

This event describes an agent reaching its destination

class starling_sim.basemodel.trace.events.LeaveSimulationEvent(time, cause)

Bases: Event

This event describes an agent leaving the simulation.