Person Events

2 minute read

The following events handle the lifecycle of persons within the simulation. Persons are automatically generated by the simulation based on ride requests — if a ride request specifies five customers, five individual person entities will be created. Each person is placed at the pick-up intersection specified by the ride request and exists in the simulation until they are dropped off at the request target and removed. A person might also be removed from pick up intersection if the customers waiting time expired. At any point in time, a person is either located at an intersection or inside a vehicle.

SIMULATION                              ALL CLIENTS
    |                                        |
    |   (ride request received)              |
    |-- person:add (internal) -------------> |
    |-- person:added ----------------------> |  (person waiting at intersection)
    |                                        |
    |   (taxi arrives, picks up person)      |
    |-- taxi-fleet:picked-up-passengers ---> |  (person now in vehicle)
    |                                        |
    |   (taxi arrives at destination)        |
    |-- taxi-fleet:dropped-off-passengers -> |  (person at destination)
    |-- person:remove (internal) ----------> |
    |-- person:removed --------------------> |  (person removed from simulation)
    |                                        |

Please note that it is possible that a taxi drops a customer off at an intersection different to the target intersection. In this case, the customer will wait at this intersection for further taxis (without issuing a separate request).


person:added

Confirms that a new person has been added to the simulation. This event is emitted after the simulation internally creates the person (via the internal person:add event). The person is placed at the pick-up intersection of the associated ride request and is waiting to be picked up by a taxi.

Senders

  • SIMULATION

Receivers

  • OPTIMIZER
  • SIMULATION
  • VISUALIZATION

Data Fields

Field Type Required Description
id string Yes The unique identifier of the person (e.g., "person-request-1-0").
request-id string Yes The identifier of the ride request that triggered the creation of this person.
intersection-id integer Yes The identifier of the intersection where the person is initially placed.

Example

{
  "category": "person",
  "name": "added",
  "data": {
    "id": "person-request-1-0",
    "request-id": "request-1",
    "intersection-id": 243974386
  }
}

Flow after Triggering

  1. The simulation creates the person internally (person:add).
  2. The simulation sends person:added to all participants.
  3. The person is now waiting at the specified intersection for pick-up.

person:removed

Confirms that a person has been removed from the simulation. This event is emitted after the simulation internally removes the person (via the internal person:remove event). A person is typically removed after being dropped off at their destination intersection.

Senders

  • SIMULATION

Receivers

  • OPTIMIZER
  • SIMULATION
  • VISUALIZATION

Data Fields

Field Type Required Description
id string Yes The unique identifier of the person being removed.
intersection-id integer Yes The identifier of the intersection where the person was dropped off.
properties object No Optional properties associated with the person at the time of removal.

Example

{
  "category": "person",
  "name": "removed",
  "data": {
    "id": "person-request-1-0",
    "intersection-id": 243974397,
    "properties": {}
  }
}

Flow after Triggering

  1. The taxi drops off the person at the destination intersection (taxi-fleet:dropped-off-passengers).
  2. The simulation removes the person internally (person:remove).
  3. The simulation sends person:removed to all participants.

Updated: