Skip to content

SimMobility Agents

smart-fm edited this page Nov 9, 2018 · 11 revisions

SimMobility is predominantly a time stepped simulation platform. The interval of time in each step varies drastically between each of short, mid and long term levels. Generally speaking, an agent is any entity in the simulation which has some task to do in every time step (or periodically every few time steps) of the simulation. The concept of agents is used as a powerful encapsulation technique to model anything which temporally changes state.

Software agents are entities which

  • can sense the world around them
  • can interact with other agents
  • make their own decisions based on data and interaction
  • perform actions based on data and interaction

Disambiguation: The word agent in this document does not (only) refer to persons making trips and activities in the simulation. The word refers to SimMobility software agents which include a wide range of entities like persons, traffic lights, loop-detectors, bus and train controllers, bus-stop and train-station agents etc.

Agent class hierarchy

agent class hierarchy

The base for all agents is the Entity class. It encapsulates fundamental data members like agent id, start time etc., and functions like update() which are common to all agents across SimMobility levels. Every entity is a message handler and an event listener by way of inheritance. A message handler can receive and react to messages sent to it through our messaging system. An event listener can subscribe to events and react to the occurrence of a subscribed event.

We have distinct agent base classes for long-term and short & mid-term. The Agent and Agent_LT classes are derived from the Entity class. Agent class forms the base for all software agents in the short and mid-term. Both short-term and mid-term has a supply simulator to simulate the road network traffic and there is considerable overlapping in the functionality of agents to necessitate a common base class. On the other hand, Agent_LT class is the base for all agents in the long-term. Agent_LT is very different in functionality from the short and mid-term agents and therefore is kept separate.

Below are short descriptions about a few important agents with links to more detailed pages.

Person is a type of agent representing an individual person in the simulation. The person class encapsulates the characteristics of a person which influences the travel behavior and decisions taken by him in the course of the simulation. There are separate person classes specific to short-term and mid-term derived from the base person class. These classes contain level specific properties and functions of the corresponding level.

Signal class represents a traffic signal in the road network. This class is functional only in the short-term.

Conflux is a data-structure and an agent managing traffic on links immediately upstream to a single node in the network. Confluxes are used only in the mid-term.

BusController is a singleton class responsible for dispatching PT buses across the road network as per the schedule defined as part of input data.

Clone this wiki locally