Class TrafficSimulator

java.lang.Object
org.episteme.social.architecture.traffic.TrafficSimulator
All Implemented Interfaces:
Serializable

public class TrafficSimulator extends Object implements Serializable
Microscopic traffic simulation engine implementing the Intelligent Driver Model (IDM) for longitudinal car-following and MOBIL for lateral lane-changing logic.

References:

  • Treiber, M., Hennecke, A., invalid input: '&' Helbing, D. (2000). Congested traffic states in empirical data and microscopic simulation.
  • Kesting, A., Treiber, M., invalid input: '&' Helbing, D. (2007). General Lane-Changing Model MOBIL for Heterogeneous Traffic Flow.
* @version 2.0
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • TrafficSimulator

      public TrafficSimulator(Quantity<Length> trackLength, int numLanes)
      Initializes a circular track simulator.
      Parameters:
      trackLength - the total circumference of the track
      numLanes - the number of available traffic lanes
  • Method Details

    • initCars

      public void initCars(int count)
      Populates the track with a set of vehicles at random positions and lanes.
      Parameters:
      count - the number of cars to spawn
    • perturb

      public void perturb()
      Introduces a disturbance into the system by significantly slowing down the lead car, allowing for the observation of shockwave formation.
    • update

      public void update(Quantity<Time> dt)
      Updates the simulation by a fixed time step.
      Parameters:
      dt - the time delta for progress
    • getCars

      public List<TrafficSimulator.Car> getCars()