Website review
This review may include AI-generated content and is not individually verified. Domain, certificate and other facts come from the observed data on this page.
What is the Microsimulation of Traffic Flow: Onramp?
The Microsimulation of Traffic Flow: Onramp is a browser-based interactive model that simulates how vehicles merge onto a highway and how that merging affects traffic flow. It is built around the onramp scenario: a main road carries through traffic, a ramp feeds vehicles in, and the simulation shows how congestion forms, spreads, and sometimes clears depending on driver behavior and inflow.
What you can do with it
- Watch individual vehicles (cars and trucks) move according to car-following rules, rather than seeing only average speeds.
- Adjust traffic parameters such as maximum speed, desired time gap, maximum acceleration, and the percentage of trucks.
- Tune lane-changing behavior, including politeness, lane-change thresholds, and right-lane bias for cars and trucks.
- Control general inflow and onramp flow, so you can test what happens when the ramp gets busy.
- Use a timelapse view to see patterns over a longer period.
- Play a ramp-metering game, where you decide how much traffic to release from the ramp and see the effect on the mainline.
Who it is for
- Students and teachers in transportation engineering or physics, who want a visual, hands-on way to see concepts like capacity drop, shockwaves, and merge bottlenecks.
- Traffic researchers and practitioners who want a quick sandbox for intuition before running heavier simulations.
- Curious drivers and planners who want to understand why a seemingly small onramp can cause a long backup.
How it relates to other resources
The page is by Martin Treiber, and it connects to the MovSim project and the book Traffic Flow Dynamics (with a German edition, Verkehrsdynamik). The simulation logic reflects the car-following and lane-changing models described in that work. If you want the underlying code, the page points to sources on GitHub. For a broader set of interactive traffic models, the same author maintains Traffic Simulation.
A practical next step
Start with the default settings, then change one variable at a time. For example, raise the onramp flow until a queue forms, then try the ramp-metering game and compare how different release rates affect mainline speed. That single comparison shows the core trade-off: metering can protect mainline throughput, but it shifts delay onto the ramp.
How does the Ramp-Metering Game work and what does it test?
The Ramp-Metering Game is an interactive browser simulation from Microsimulation of Traffic Flow: Onramp that puts you in charge of the traffic lights controlling how many vehicles enter a highway from an on-ramp. You adjust the metering rate, then watch how your choices affect flow on the main road.
What the simulation models
The underlying microsimulation tracks individual vehicles rather than averages. The controls listed on the page let you tune:
- Onramp flow — how much traffic arrives at the ramp
- Truck percentage — the share of heavy vehicles in the mix
- Car-following behavior — maximum speed, desired time gap, and maximum acceleration
- Lane-changing behavior — politeness, lane-change threshold, and right-bias for cars and trucks
These parameters matter because ramp metering is fundamentally about matching inflow to the highway's actual capacity. If you release too many vehicles, the merge zone becomes a bottleneck and triggers a breakdown — stop-and-go waves that reduce throughput for everyone. If you meter too aggressively, the ramp itself backs up.
What it tests
The game tests your intuition for a real traffic-engineering trade-off: maximizing total throughput versus keeping both the highway and the ramp flowing. A useful way to play is to change one variable at a time. Run a baseline with no metering, then add a moderate rate, then a stricter one, and compare how congestion forms and whether it recovers. The truck-percentage and acceleration sliders are especially instructive, since heavier or slower-accelerating vehicles need longer merging gaps.
If you want to go deeper, the page credits Martin Treiber and points to the MovSim simulator and the book Traffic Flow Dynamics for the theory behind the model.
What car-following parameters like max speed, time gap, and max acceleration can I adjust in the simulation?
The onramp simulation at traffic-simulation.de exposes the main car-following parameters through its control panel. The page evidence lists these adjustable settings: Max Speed v0, Time Gap T, and Max Accel a, alongside lane-changing controls such as Politeness, LC Threshold, and separate Right Bias values for cars and trucks. There are also traffic-composition sliders for Truck Perc (truck percentage) and Onramp Flow, plus a Timelapse option.
What each parameter does in practice
- Max Speed v0 sets the desired speed a driver aims for on a free stretch. Lower it to model a slow lane or a speed-limited corridor; raise it to see how faster desired speeds change platoon behaviour and merge conflicts.
- Time Gap T is the desired time headway to the vehicle ahead. Small values produce tight, aggressive following; larger values spread traffic out and reduce rear-end interaction. This is often the single most influential parameter for stability and capacity.
- Max Accel a caps how briskly a vehicle can close a gap or accelerate out of the onramp. Lower values make merges gentler and more hesitant; higher values make them punchier but can trigger harsher braking downstream.
A concrete starting scenario
If you want to study ramp-metering effects, begin with moderate Onramp Flow, a mid-range Truck Perc, and default car-following values. Then change one parameter at a time: raise Max Speed v0 and watch whether the merge zone destabilises; increase Time Gap T and check whether queues on the ramp grow or shrink. The Ramp-Metering Game mode lets you test your own metering decisions against the simulation.
Choosing values
Use smaller T and higher a when you want to reproduce dense, assertive urban traffic; use larger T and lower a for cautious or heavy-vehicle-dominated flow. Because these parameters interact, treat them as a set rather than tuning each in isolation. For deeper background on the underlying model, the page points to the MovSim project and Martin Treiber's book Traffic Flow Dynamics.
A useful next step is to run two short trials with identical traffic volumes but different Time Gap T values, and compare how often the onramp merge forces mainline vehicles to brake.
How does lane-changing behavior, including politeness and right bias, affect the traffic flow in this onramp model?
In this onramp model, lane-changing is not a single rule but a set of adjustable behaviors—politeness, lane-change threshold, and separate right-bias values for cars and trucks—that together determine how smoothly traffic merges and how much capacity the ramp effectively adds. The page exposes these as user-facing controls, so the practical answer is that they change both the number of lane changes and where they happen, which in turn changes queueing on the onramp and the speed of the mainline.
What each control does to flow
- Politeness: governs how much a driver accounts for the inconvenience caused to a driver in the target lane. Low politeness means drivers cut in when it suits them, producing more abrupt lane changes and more forced braking behind them. High politeness makes drivers wait for a larger gap, which reduces disruption per maneuver but can delay merging and build up density on the onramp.
- Lane-change threshold (LC threshold): sets how much better the adjacent lane must look before a driver bothers to change. A low threshold produces frequent, marginal lane changes—traffic redistributes quickly but with more interaction noise. A high threshold keeps drivers in place longer, so lanes can become unevenly loaded and the merge point gets congested.
- Right bias (cars and trucks separately): a preference for keeping right, as in keep-right rules. Strong bias pushes slower vehicles right and keeps the left lane for passing, which usually helps throughput on a multilane mainline. Too strong a bias near an onramp, though, concentrates merging and through traffic in the same right-hand lane and worsens the bottleneck. Trucks are given their own value because their lower acceleration and longer length make their lane choices disproportionately disruptive.
How this plays out at the onramp
The interesting effects appear in combination rather than one control at a time. A high right bias plus low politeness tends to produce a right lane packed with cars and trucks while faster traffic weaves left; the onramp then discharges into an already-saturated lane. Raising politeness in that configuration often helps more than raising the threshold, because it spreads the cost of merging instead of just postponing it. Conversely, with weak right bias, lanes stay more balanced and the onramp merge is easier, but you lose the discipline that keeps slow traffic out of the passing lane.
A concrete way to use it
Set up a scenario with a fixed onramp inflow near the level where you normally see breakdown, then change one parameter at a time and watch two things: the speed on the mainline just upstream of the merge, and the queue length on the ramp. If politeness increases mainline speed without lengthening the ramp queue much, you have found a genuinely better merging regime; if it only shifts congestion onto the ramp, the bottleneck has moved rather than disappeared. The ramp-metering game on the same page is a useful complement, since it lets you feel the trade-off between admitting vehicles and protecting mainline flow.
For background on the underlying car-following and lane-changing logic, the model's author points to the MovSim project and the book Traffic Flow Dynamics; the GitHub sources are the place to check exact formulations. If you want a broader set of interactive traffic scenarios to compare against, Traffic Simulation hosts the wider collection this onramp model belongs to.
Can I run this traffic simulation offline using the GitHub sources or the MovSim book?
Yes, in principle: the page itself points to offline options — it lists "Offline: sources at GitHub" and references the MovSim book alongside the onramp simulation. The browser simulation is a JavaScript/HTML5 canvas app (the page notes "Your browser does not support the HTML5 canvas tag" as a fallback), so the GitHub sources are the realistic route to running it without an internet connection. The MovSim book is a reference text, not an offline runtime — it explains the traffic-flow models the simulation is built on, so it helps you understand or modify the code rather than execute it.
What each option gives you
| Option | What it is | Best for | Trade-off |
|---|---|---|---|
| GitHub sources | The code behind the simulation | Running and editing the model offline | You need to download and serve the files locally; expect setup work |
| MovSim book | A book on traffic flow dynamics | Learning the car-following and lane-changing models | Not a program; no simulation runs from it |
| Browser page | The live onramp simulation | Quick experiments with ramp metering | Requires a connection and a canvas-capable browser |
Practical route
If your goal is offline use, clone or download the GitHub repository, then open the main HTML file in a browser from your local disk or a simple local server. Because the page exposes parameters such as Max Speed v0, Time Gap T, Max Accel a, Politeness, LC Threshold, and separate Right Bias values for cars and trucks, you can reproduce the onramp and ramp-metering experiments without the site. The "Play Ramp-Metering Game" mode is the part most people want offline, so check that the corresponding script and its data files are included in your download.
For background, the same author's broader work is documented at Microsimulation of Traffic Flow, and MovSim itself has an official project presence at MovSim. Use the book to interpret why changing Time Gap or Politeness shifts throughput, rather than expecting it to run anything.
One decision criterion: choose the GitHub sources if you need to run or modify the simulation; choose the book if you only need the theory behind it.
What is the difference between the general inflow and onramp flow settings in this simulation?
The two controls affect different parts of the same simulated road. "Traffic Flow and General Inflow" sets the background traffic already on the main highway, while "Onramp Flow" sets how many vehicles try to merge in from the entrance ramp. Changing the general inflow alters the base density and speed of the mainline stream; changing the onramp flow alters the size of the merging stream that has to find gaps in that mainline traffic.
A practical way to think about it: the general inflow is the demand upstream of the merge, and the onramp flow is the additional demand entering at the merge. The sum of the two is roughly the total traffic the downstream section must carry, but the onramp vehicles must also negotiate lane changes, so their effect on congestion is usually more disruptive per vehicle.
How the distinction plays out
| Setting | What it controls | Typical use |
|---|---|---|
| General inflow | Volume of traffic already on the highway before the ramp | Setting a quiet or busy motorway as the backdrop |
| Onramp flow | Volume of vehicles entering from the ramp | Testing merge pressure, ramp metering, or bottleneck formation |
If you raise only the general inflow, you get a steadily loaded highway. If you raise only the onramp flow, you create a localized disturbance around the merge point, which is where queues and shockwaves tend to appear first.
A useful next step
Run a simple comparison: hold the general inflow fixed at a moderate value, then try a low and a high onramp flow. Watch where the slowdown begins — at the merge or upstream of it — and whether the jam clears when you reduce the ramp demand. That tells you whether your bottleneck is driven by mainline volume or by merging conflict. The simulation is available at Microsimulation of Traffic Flow: Onramp.
User reviews (0)