CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
577 stars 85 forks source link

Timed Traffic Light: Smart Adaptive Switching #1049

Open wschmrdr opened 3 years ago

wschmrdr commented 3 years ago

Describe your idea

Allow the Timed Traffic Light to have a "smart" adaptive switching, where the only paths taken into consideration are the ones that will imminently turn red.

Notes: Case Study

I have a major arterial (6-lane road) connected via traffic signal to a neighborhood road (small heavy 4-lane from NExt, but this could be any sort of small road) in a 3-way intersection (neighborhood road on one side only), using a timed traffic signal. I would like to have a protected leading left turn onto the neighborhood road. I have a 3-phase signal with green lights set up as such:

Phase 1: 1-5 seconds if no flow: arterial one direction with protected left turn onto neighborhood road Phase 2: 25-50 seconds if more wait than flow: arterial straight in both directions and right onto neighborhood road, no left turns Phase 3: 1-15 seconds if no flow: neighborhood road either direction onto arterial

Ideally, I would like to be able to have phase 1 end early if no one is turning left despite traffic wishing to go straight, because straight is still green in phase 2. Right now, phase 1 continues because traffic is still flowing straight but no one turns left.

This would have other good uses, such as a Diverging Diamond Interchange using http://attap.umd.edu/wp-content/uploads/2018/02/DDI-signal.pdf for how to set it up (all signals on the same timed system).

If I have to do a protected lagging left turn (swapping phases 1 and 2) as a workaround, so be it, however many of the real life signal setups in my area have protected leading left turns, so it'd be good to have that as a possibility.

miloaisdino commented 3 years ago

agreed! I have the same issue with leading right turn from south when split phasing is involved (westbound straight through and left) at the same time. tmpe wouldnt switch to the northbound phase after that even though it also allows vehicles to turn right!

kianzarrin commented 2 years ago

@wschmrdr

Can I just add option to exclude near turn from flow calculations? I already have code for this. see https://github.com/CitiesSkylinesMods/TMPE/issues/1580