CitiesSkylinesMods / TMPE

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

Faster emergency vehicles / Off- and Half lanes #185

Closed VictorPhilipp closed 5 years ago

VictorPhilipp commented 5 years ago

Hi,

I had some ideas how to solve the problems of emergency vehicles stuck on red lights. I tried to formalize the real-world behaviour. However, I have no knowledge of CSL or TMPR internals.

Here I have 3 pictures, the left one are the regular lanes as known.

The middle one I call half lanes. In this case the emergency vehicle tells all cars in range to switch from regular lanes to the half-lanes, so they switch to the outer lanes, in this case the sidewalk. The speedlimit might be reduced to veeeeery slow in this case. Other halflanes might be bicycle lanes, bus lanes, tram lanes or just sand, depending on road type. Smaller roads might have no space for half lanes at all.

The right picture shows what I call off lane. In this case the emergency vehicle blocks traffic from the front on the juction (if in range) and - when the lane has cleared - drives to the junction on the lhs. Other offlanes could be sidewalks, single-lane one-way roads, medians (painted, grass or hard-edge), etc.

grafik

Maybe some ideas are slightly possible, would love to see them in game

https://github.com/VictorPhilipp/Cities-Skylines-Traffic-Manager-President-Edition/issues/178

VictorPhilipp commented 5 years ago

Random interjection: IRL, 'invisible bus lanes' (a.k.a. 'virtual bus lanes') operate in similar manner, albeit with the aid of special "pre-signals": https://www.citylab.com/transportation/2018/05/dedicated-bus-lanes-without-the-extra-lane/561509/

VictorPhilipp commented 5 years ago

Nice idea! I had a similar one a while ago but have not had yet the time to look into this. Regarding half lanes: I think this could be feasible but what if the road has parking spaces, especially if they are occupied?

Regarding off-lanes: Oncoming traffic would have to know that an emergency vehicle is currently using their lane.

In any case vehicles would have to know their position in relation to other vehicles. This is something I bet would be quite cost-intensive.

VictorPhilipp commented 5 years ago

Jfarias (Traffic++ dev) was experimenting with this at one point and I think he managed to get it working to some extent (not sure if the code ever made it to github or how performant it was).

From vague recollection, he edited the emergency service vehicle (ESV) AI so that if the strobe lights were on (ie. responding to emergency), it would scan for traffic (no idea how) on the current segment and next segment of the ESV's path and somehow signal that traffic to get out of the way (drive towards pavement, in similar way to hearses when picking up a corpse)... and then after the ESV left the segment, the traffic was signalled to resume normal service.

I assume since CO made the change so that ESVs could lane change to dodge traffic, the code to identify traffic on a segment can be found in vanilla game. It might be that if that code returns a "not enough room to dodge traffic" the additional step could be taken to tell the un-dodgeable traffic to get out of the way?

Just a random guess, but how are ESV audible sirens handled? Do they only come on when the ESV gets traffic jammed? Telling other vehicles to get out of way could coincide with audible sirens being activated. Sirens could act like an audiable traffic light for upcoming junctions too?

originalfoo commented 5 years ago

Duplicate of #64