This is incredible, I put a cone in the middle of the road and realized the nightmare I had caused, and then quickly removed it. But the nightmare just continued to ripple through space and time. This explains all those mysterious traffic jams I've been in that seemed to defy reason.
This does a great job of demonstrating how increasing acceleration decreases traffic. 2m/s/s is 5mph/s, and helps a lot: Cars in front get out of the way faster. Lazy acceleration, while more accurate to what I see on the road, causes gridlock and traffic waves.
Perhaps more surprisingly, /reducing/ comf(ortable?) deceleration keeps things running smoother than higher values.
My gut tells me that you should just gravitate towards the area of less cars. If the road ahead is clear or clearer, higher acceleration is better for everyone. If the road ahead is saturated but clearer behind, lower acceleration is better. If it's saturated in front and behind, good luck.
>/reducing/ comf(ortable?) deceleration keeps things running smoother than higher values
This is basically what the dynamic speed limits do on motorways in the UK - if there's congestion, the speed limit is reduced on the section of road leading up to the congestion. It reduces the number of cars flowing into the traffic jam temporarily, which helps to smooth out the overall flow.
This is a neat toy simulation. I do enjoy the depth of the drivers' behavior. I am a traffic engineer and traffic simulation is a large portion of my job. Professionally I use PTV Vissim. [1] It allows me to build just about any road network configuration imaginable.
I've been looking for a decent traffic simulator. Can you modify driver behavior? I am really curious how much traffic could be reduced by changing driver behavior, and simple vehicle modifications.
For example, how much time could be saved if at red lights, when the light changes green, if all cars accelerate at the same time and speed, instead of the accordion behavior. This is something basic driver AI could handle and might help with pollution and traffic, while fully autonomous driving is still underway.
Lol. I really enjoy these online traffic simulators. Specifically, I like seeing how people manipulate them to suit their own ideas about "proper" driving.
There is no easy answer. Aggressive driving = bad. Tailgating = bad. But see what happens when you crank up the acceleration and decrease distance between cars. Then do the opposite. Simple little simulations like this teach us that bad driving is actually good for traffic.
One very interesting lesson is that speed seems largely irrelevant to traffic flow. So long as people don't leave gaps, that they all follow each other closely and accelerate/brake like racers, net flow is divorced from speed.
There is an easy answer. Put a computer in charge of it (well, okay, we're all mostly software engineers and we all know it's not that easy - but - you get the point).
Aggressive driving and tailgating are bad because humans are not capable of making good choices at those distances/speeds. If you could 10x our reaction speed, then those actions would not be as looked down upon (going 6-8 over the speed limit is technically illegal most states, but nobody on the road is going to think you're some kind of maniac).
Simple little simulations like this teach us that simple little simulations do not account for reality and the complex nature of the meatbags in control of each vehicle. A more realistic simulator might be able to roll the dice that a driver might not notice an obstacle in time, and crash straight into it - putting more debris and obstacles on the road for every other driver to avoid/crash into[1]. The gains in net flow from have everyone drive like madmen would probably immediately be wiped out from the hour(s) spent getting emergency vehicles onto the scene, redirecting traffic, treating the driver, towing the vehicle, etc. Not to mention that there would almost certainly be multiple scenes down the road - as there usually already are during rush hour - and we already condone this type of behavior!
I noticed the same thing re: high acceleration, but that + decreased distance between cars in real world would lead to increased collisions, I'd assume.
Simulators like this (and seeing ideal simulation behavior deviate from correct real-world behavior) concern me re: the coming mix of AV and human drivers.
Having literally just coming back from India after two weeks there, turning the politeness to zero perfectly described the traffic flows (and lack there-of) I saw there.
I’ve seen a bunch of things like this that all seem to imply entry to a round about is governed by stop signs - they’re meant to be governed by “give way”/yield so that they don’t impede traffic when there isn’t significant load, so they always end up showing similar characteristics to stop signs (not quite as bad, but that’s not a high bar)
Personally though I’ve always wanted to make a genetic algorithm implementation that models this but where card can evolve when and what signals they give and how they respond to those signals. Fitness function would be speed to get to destination, crashing would be a failure.
I think it would be interesting to see what happened
It was built about 20 years ago, and I was living in the area back then.
Before the "roundabout" was built, being a traditional intersection it used to be a major accident hotspot, despite having a speed limit of just 50km/h. Crossing the main road was nightmare, I can tell you that.
With the new topology, which is a very elongated roundabout, the speed limit on the main axis could actually be raised to 80km/h yet accidents now rarely happen there and traffic flow is much improved
In many places, road engineers deliberately obscure visibility of the roundabout from the approaches. So even if it is legally a 'yield', in practice, stopping is enforced by unaccountable manipulation.
Yet another example of LCD governance imposed by the crazy minority - in this case, those who would not yield correctly (see Skin In The Game, NNTaleb). Always remember that 50% of drivers are below average intelligence.
I've pondered a similar question: is pulling up right behind the car in front of you the optimal behavior for a red light? What if you could get everyone to leave a large gap (on the order of several car lengths)? Could you increase the number of cars that make it through a light while it's green? Or would it not matter?
Human nature is to pull as far forward as you can, within certain limits at least. But is that actually optimal? If not, with self-driving cars or some other technological assistance, maybe we could increase the efficiency of intersections that use signals.
When an intersection light turns green - all cars should begin rolling together
Will not work. The safe distance between cars is negligible in traffic lights but a lot more in moving traffic. At least two seconds is considered reasonable although in reality much lower distances are seen.
The "rolling together" would only work if the queue to the traffic light would copy the distance needed by moving cars.
That is, the cars would be spaced 10-40 meters apart while waiting for green. Only then all cars could floor it and accelerate together without having to wait for the first units to run away first.
Waiting for cars in front of you is for safety and would be the case even with fully automated nationally adopted self driving electric cars.
When you're stopped you don't need a buffer so much for when things go wrong, but at higher speeds you need a bigger buffer, and having space helps avoid mass catastrophes when some freak storm knocks a tree branch onto the road or a car malfunctions or mechanical failure/wear and tear.
Scania, and probably others, are working on platooning trucks. From what I know it is not trivial, for example most of communication methods we have have too long round trip delays and are not 100% reliable so a backup is needed maybe in the form of autonomous breaking system.
> When an intersection light turns green - all cars should begin rolling together.
Agreed. I've always suspected/known this. Just play with the acceleration settings in the simulation for proof.
I hate when the light goes green and people wait for a gap before driving. Just go, you are barely going 20km/h at this stage.
If everyone accelerated quickly until they were on the other side of the traffic light, you could get double the amount of cars through. No need to break the speed limit.
I’m really impressed with this simulation. It’s an excellent illustration of the dynamics of traffic flow.
The default examples are good too. The kind of bunching you get due to merging traffic onto higher speed roads, and the kind you get from traffic slowing down to exit on a slower speed road, both of these are great examples that come up in the real world very frequently.
Politeness restricts the issue to one lane without making it worse for everyone else. You and all of your lane mates suffer, but everyone gets to get to their destination at a normal time.
After even a slight slowdown, I was unable to ever restore the vehicles to steady traffic again. Adding lanes, quick stop lights to ease the flow. It was maddening (like real traffic I guess...)
Anyone know a good traffic simulator for cities that includes pedestrian behavior?
I always wonder if, at busy pedestrian intersections, it would make more sense to have the pedestrian flow stages and the vehicle flow stages be totally separated. Cars waiting to turn right for ~30s as pedestrians walk is kinda crazy.
The problem with scrambles is that people hate waiting and get tempted to jaywalk because the cycle times get really high. Hence why they tend only to be used at places with more than 4 ways intersecting.
New York uses Leading Pedestrian Intervals, which give pedestrians the green before the cars can turn right; by the time a driver starts turning pedestrians are actively crossing the street and no longer in the blind spot. Another good way to increase pedestrian safety is just to ban right-on-red altogether.
Have a look at Sumo, its free, open source, and comprehensive. Also Aimsun [1] but I've never used it and don't think it's free although I'm unsure about that.
Not a simulation, but I have observed that some of the intersections around UCLA are set up like this, so it makes sense to at least one traffic engineer in the world.
There's a big roundabout in my city that's in construction so some lanes are closed, when there's no traffic cops, people entering it cut you off, creating deadlocks, I've been stuck in that roundabout for >15min some times.
I'd love to see an addition to this for motorcycle lane-splitting. I assume that's illegal in Germany though. Still though, if you want to keep your CO2 emissions down in exchange for a somewhat higher risk of death or dismemberment, motorcycles are a great choice. Oh and they're cool so there's that.
Not related, but this is traffic micro simulation Reinforcement learning framwork that my previous research group started: https://m.youtube.com/watch?v=P7xx9uH2i7w
It's a neat simulation and great for seeing traffic ripples. But, I'm finding putting a cone in a single lane blocks cars forever. That would never happen. The car at the cone would force their way into an unblocked lane.
It depends which settings you use. If you turn politeness all the way down, then the people in the blocked lane will force themselves into an unblocked lane.
While looking for the 'best' settings, I found that flow and speed are calculated every 30 in-game seconds. Reducing the timewarp (sim speed) value increases the flow value (there is also some relationship to the density value that couldn't figure out).
I was curious so I tested the 'on ramp' strategy that seems to be in place on UK motorways at rush hour - namely that they are traffic light controlled, but that they always seem to be Green for ~3 cars, Red for ~6 cars.
Always seemed really pointless.
Turns out that was the only way I could get traffic going again on the curved road with the on-ramp (even though I could only control the main traffic, not actually the on-ramp). Even dropping the speed limit had no effect on clearing the congestion at the junction.
In all the traffic light controlled on-ramps I've seen in the USA, the lights specifically only allow 1 car per green (and they have signs indicating such).
They make a lot of sense. Traffic entering an on-ramp will usually come in bursts from traffic light. A burst of cars will have a much harder time merging with traffic than a trickle. So rather than creating, for example, a group of 20 cars every 60 seconds trying to merge at once, the on-ramp traffic light throttles that to 1 car every 3 seconds. Total throughput is the same, but the effect on existing highway traffic is significantly reduced.
In the US we call this ramp metering. It is usually a dynamic system that monitors the upstream traffic density and only allows as many vehicles as can be added to reach a maximum density. We usually allow only 1 car per green signal. There have been some attempts to use them on roundabouts too.
Somehow incredibly road rage inducing that you get squanch points forming on completely steady state unimpeded circuit and everyway I tried altering the parameters made it worse.
Really awesome simulation of this problem. I constantly think about how traffic would be optimized once full automation is possible and this is a nice way to play around with the levers the AI would optimize.
As highway-driving AI approaches perfection I'd expect:
- Acceleration/nausea approaches zero
- Number of lane changes approaches zero
- Distance between cars approaches zero (when necessary in crowded areas)
- Maximum speed approaches physical limit
It will be satisfying to watch these happen over time.
[+] [-] siavosh|7 years ago|reply
[+] [-] jdashg|7 years ago|reply
Perhaps more surprisingly, /reducing/ comf(ortable?) deceleration keeps things running smoother than higher values.
[+] [-] jrootabega|7 years ago|reply
[+] [-] IneffablePigeon|7 years ago|reply
This is basically what the dynamic speed limits do on motorways in the UK - if there's congestion, the speed limit is reduced on the section of road leading up to the congestion. It reduces the number of cars flowing into the traffic jam temporarily, which helps to smooth out the overall flow.
[+] [-] canofbars|7 years ago|reply
[+] [-] takk309|7 years ago|reply
[1] http://vision-traffic.ptvgroup.com/en-us/products/ptv-vissim...
[+] [-] jordan801|7 years ago|reply
For example, how much time could be saved if at red lights, when the light changes green, if all cars accelerate at the same time and speed, instead of the accordion behavior. This is something basic driver AI could handle and might help with pollution and traffic, while fully autonomous driving is still underway.
[+] [-] sandworm101|7 years ago|reply
There is no easy answer. Aggressive driving = bad. Tailgating = bad. But see what happens when you crank up the acceleration and decrease distance between cars. Then do the opposite. Simple little simulations like this teach us that bad driving is actually good for traffic.
One very interesting lesson is that speed seems largely irrelevant to traffic flow. So long as people don't leave gaps, that they all follow each other closely and accelerate/brake like racers, net flow is divorced from speed.
[+] [-] nexuist|7 years ago|reply
Aggressive driving and tailgating are bad because humans are not capable of making good choices at those distances/speeds. If you could 10x our reaction speed, then those actions would not be as looked down upon (going 6-8 over the speed limit is technically illegal most states, but nobody on the road is going to think you're some kind of maniac).
Simple little simulations like this teach us that simple little simulations do not account for reality and the complex nature of the meatbags in control of each vehicle. A more realistic simulator might be able to roll the dice that a driver might not notice an obstacle in time, and crash straight into it - putting more debris and obstacles on the road for every other driver to avoid/crash into[1]. The gains in net flow from have everyone drive like madmen would probably immediately be wiped out from the hour(s) spent getting emergency vehicles onto the scene, redirecting traffic, treating the driver, towing the vehicle, etc. Not to mention that there would almost certainly be multiple scenes down the road - as there usually already are during rush hour - and we already condone this type of behavior!
[1] https://en.wikipedia.org/wiki/Rubbernecking
[+] [-] licyeus|7 years ago|reply
Simulators like this (and seeing ideal simulation behavior deviate from correct real-world behavior) concern me re: the coming mix of AV and human drivers.
[+] [-] thestepafter|7 years ago|reply
Second, removing all of the politeness has an interesting effect. I think I can learn some lessons from this, thank you!
Third, they should use this in driver education classes.
[+] [-] atoav|7 years ago|reply
[+] [-] KallDrexx|7 years ago|reply
[+] [-] olliej|7 years ago|reply
Personally though I’ve always wanted to make a genetic algorithm implementation that models this but where card can evolve when and what signals they give and how they respond to those signals. Fitness function would be speed to get to destination, crashing would be a failure.
I think it would be interesting to see what happened
[+] [-] datenwolf|7 years ago|reply
https://www.google.com/maps/@48.4324714,13.0948723,637m
It was built about 20 years ago, and I was living in the area back then.
Before the "roundabout" was built, being a traditional intersection it used to be a major accident hotspot, despite having a speed limit of just 50km/h. Crossing the main road was nightmare, I can tell you that.
With the new topology, which is a very elongated roundabout, the speed limit on the main axis could actually be raised to 80km/h yet accidents now rarely happen there and traffic flow is much improved
[+] [-] mikhailfranco|7 years ago|reply
Yet another example of LCD governance imposed by the crazy minority - in this case, those who would not yield correctly (see Skin In The Game, NNTaleb). Always remember that 50% of drivers are below average intelligence.
[+] [-] teakdust|7 years ago|reply
When an intersection light turns green - all cars should begin rolling together. Waiting for cars in front of you in succession is burning time.
[+] [-] adrianmonk|7 years ago|reply
Human nature is to pull as far forward as you can, within certain limits at least. But is that actually optimal? If not, with self-driving cars or some other technological assistance, maybe we could increase the efficiency of intersections that use signals.
[+] [-] yason|7 years ago|reply
Will not work. The safe distance between cars is negligible in traffic lights but a lot more in moving traffic. At least two seconds is considered reasonable although in reality much lower distances are seen.
The "rolling together" would only work if the queue to the traffic light would copy the distance needed by moving cars.
That is, the cars would be spaced 10-40 meters apart while waiting for green. Only then all cars could floor it and accelerate together without having to wait for the first units to run away first.
[+] [-] VierScar|7 years ago|reply
When you're stopped you don't need a buffer so much for when things go wrong, but at higher speeds you need a bigger buffer, and having space helps avoid mass catastrophes when some freak storm knocks a tree branch onto the road or a car malfunctions or mechanical failure/wear and tear.
[+] [-] mariefred|7 years ago|reply
https://www.scania.com/group/en/platooning-automated-driving...
https://platooningensemble.eu/news/using-its-g5-for-efficien...
[+] [-] executesorder66|7 years ago|reply
Agreed. I've always suspected/known this. Just play with the acceleration settings in the simulation for proof.
I hate when the light goes green and people wait for a gap before driving. Just go, you are barely going 20km/h at this stage.
If everyone accelerated quickly until they were on the other side of the traffic light, you could get double the amount of cars through. No need to break the speed limit.
[+] [-] unknown|7 years ago|reply
[deleted]
[+] [-] techdragon|7 years ago|reply
The default examples are good too. The kind of bunching you get due to merging traffic onto higher speed roads, and the kind you get from traffic slowing down to exit on a slower speed road, both of these are great examples that come up in the real world very frequently.
[+] [-] amelius|7 years ago|reply
[+] [-] noxToken|7 years ago|reply
[+] [-] jaden|7 years ago|reply
[+] [-] habosa|7 years ago|reply
I always wonder if, at busy pedestrian intersections, it would make more sense to have the pedestrian flow stages and the vehicle flow stages be totally separated. Cars waiting to turn right for ~30s as pedestrians walk is kinda crazy.
[+] [-] zukzuk|7 years ago|reply
[+] [-] bobthepanda|7 years ago|reply
New York uses Leading Pedestrian Intervals, which give pedestrians the green before the cars can turn right; by the time a driver starts turning pedestrians are actively crossing the street and no longer in the blind spot. Another good way to increase pedestrian safety is just to ban right-on-red altogether.
[+] [-] globuous|7 years ago|reply
- Microscopic simulator: https://sumo.dlr.de/index.html
- Flow (abstraction of RLlib and Sumo): https://flow-project.github.io/
Have a look at Sumo, its free, open source, and comprehensive. Also Aimsun [1] but I've never used it and don't think it's free although I'm unsure about that.
[1] https://www.aimsun.com/aimsun-next/
[+] [-] 0xffff2|7 years ago|reply
[+] [-] mk89|7 years ago|reply
Interesting to see this in practice and to just give the rule "ring has priority" for granted.
[+] [-] Franciscouzo|7 years ago|reply
[+] [-] ghostly_s|7 years ago|reply
[+] [-] User23|7 years ago|reply
[+] [-] maxtollenaar|7 years ago|reply
[+] [-] tokyodude|7 years ago|reply
[+] [-] executesorder66|7 years ago|reply
[+] [-] godelmachine|7 years ago|reply
Do they use Poisson distribution, by any chance?
[+] [-] Sohcahtoa82|7 years ago|reply
[+] [-] poglet|7 years ago|reply
These are the 'best' settings I could find (almost 500k veh/h): https://i.imgur.com/eqM8nbb.jpg
To reproduce, set the timewarp to 0.2 and density to 0 then wait for 30 in-game seconds.
[+] [-] herghost|7 years ago|reply
Always seemed really pointless.
Turns out that was the only way I could get traffic going again on the curved road with the on-ramp (even though I could only control the main traffic, not actually the on-ramp). Even dropping the speed limit had no effect on clearing the congestion at the junction.
[+] [-] Sohcahtoa82|7 years ago|reply
They make a lot of sense. Traffic entering an on-ramp will usually come in bursts from traffic light. A burst of cars will have a much harder time merging with traffic than a trickle. So rather than creating, for example, a group of 20 cars every 60 seconds trying to merge at once, the on-ramp traffic light throttles that to 1 car every 3 seconds. Total throughput is the same, but the effect on existing highway traffic is significantly reduced.
[+] [-] takk309|7 years ago|reply
[+] [-] gHosts|7 years ago|reply
[+] [-] dylanwenzlau|7 years ago|reply
As highway-driving AI approaches perfection I'd expect:
- Acceleration/nausea approaches zero
- Number of lane changes approaches zero
- Distance between cars approaches zero (when necessary in crowded areas)
- Maximum speed approaches physical limit
It will be satisfying to watch these happen over time.
edit: formatting
[+] [-] fmduifaheuri|7 years ago|reply
I've made something simpler yet similar way back (hit "refresh" after the initial load, sorry for that bug):
http://sinelaw.github.io/jammed/src/
In my simulation each car has a "personality", which affects lane passing, following distance/time, speed, acceleration, etc.
Did it as an exercise in JavaScript + HTML Canvas programming...
[+] [-] mysterydip|7 years ago|reply