Class TrafficSimulator
java.lang.Object
org.episteme.social.architecture.traffic.TrafficSimulator
- All Implemented Interfaces:
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.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a single vehicle in the traffic simulation. -
Constructor Summary
ConstructorsConstructorDescriptionTrafficSimulator(Quantity<Length> trackLength, int numLanes) Initializes a circular track simulator. -
Method Summary
Modifier and TypeMethodDescriptiongetCars()voidinitCars(int count) Populates the track with a set of vehicles at random positions and lanes.voidperturb()Introduces a disturbance into the system by significantly slowing down the lead car, allowing for the observation of shockwave formation.voidUpdates the simulation by a fixed time step.
-
Constructor Details
-
TrafficSimulator
-
-
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
-
getCars
-