Cities: Skylines

Cities: Skylines

Traffic++
leftbehind May 5, 2015 @ 5:16pm
(WIP) Traffic management with Traffic++
This is a work in progress that I'm going to chip away at over next few weeks, and obviously continue to update as T++ gets ever more awesome.

I could definitely use help, suggestions and feedback - post your wisdom in the comments below.

Ultimately I hope to put a version of this in the main Guides section, so I'll be keeping track of and listing any contributors.

-----------

"That's the wonderful thing about traffic micro management: If you put enough effort in, you can create the most incredible and spread out gridlocks." – ItalianGuy

In this guide we're going to review all the options available to you for pedestrian and vehicle roads, including some special features added by the popular Traffic++ mod. There's lots of ways to improve your traffic, but you need to understand the basics first in order to know which techniques to apply for different situations...

Pathfinding basics

Each cim has their own sat nav, probably the popular MightWatch brand which tracks their every move ...for their own safety, of course. Before starting a journey they program in their route and the sat nav finds them the *quickest* route from A to B. It does this based on a combination of distance and speed.

Just for fun, the programmers at MightWatch also added some randomness to their sat nav. Every so often cims will be taken on a slight detour when they reach an intersection, and that detour could end up changing their route drastically. Thanks MightWatch, that's just great.

The sat nav knows about speed limits, one way systems, lane restrictions and segment/intersection routing; unlike cargo ships it won't land road vehicles in the middle of a field somewhere. Sadly, however, your cims didn't splash out for the expensive model that avoids traffic jams, traffic lights, road works and busy pedestrian crossings.

This means that your cims prefer fast roads to slow roads based purely on speed limit and distance. They might take a longer highway route than a shorter small road route if doing so means they'll reach their destination quicker. When lots of other cims have the same idea, you get traffic jams. And a few cims will find themselves taking random scenic routes.

Road Speeds

The faster a road is, the more likely it is to attract traffic...

Pedestrian Paths (Parks menu):
* Gravel path - ?
* Pedestrian path - ?

Small Roads (2 lanes):
* Small gravel road - 30 km/h
* Gravel road - 30 km/h
* Pedestrian road - 30 km/h
* Two lane road - 40 km/h
* Small busway - 40 km/h

Medium Roads (4 lanes):
* Four lane avenues - 50 km/h

Large Roads (6 lanes):
* Six lane - 60 km/h
* Six lane with busway - 60 km/h

Highways (1 & 3 lanes):
* Highway ramp - 80 km/h
* Highway - 100 km/h

Capacity vs. Speed

Large road (two-way) = moderate capacity at moderate speed; Highway = moderate capacity at high speed; Large road (one-way) = high capacity at moderate speed. Know which to use and when.

Lane Speed Restrictions (Traffic++)

<this is due in an upcoming release, will flesh this out more once released, you will freak when you see the awesome UI :)>

By default, all lanes on a road are set at the same speed limit as the road itself. However, with Traffic++ you can change that and give each lane it's own speed limit; either faster or slower than the default road speed.

Road Angles

Vehicles will slow down if they have to navigate a sharp direction change, so keep roads as straight as possible. If you must curve them (let's face it, curved roads look nicer don't they?) then try and use gentle curves to prevent adverse effects on traffic speed. Y-shaped intersections are significantly faster than their T-shaped counterparts.

Sharp road angles can become particularly problematic at intersections, where traffic will often be moving slowly to start with. A sharp angle here will result in traffic staying on the intersection for longer, causing even more traffic to back up.

Interestingly, the highway ramp road doesn't seem to suffer any of these problems, it can make quite sharp direction changes without having much effect on the vehicle speed.

Traffic Patterns

There are several traffic patterns you should be aware of and plan for whilst building your city...

Should I drive today?

Your cims will jump in their cars to travel if that's the fastest choice. If you give them footpaths leading to public transport, and have well designed public transport routes and hubs, they'll use them so long as speed is comparable or faster. If the non-car route has more than 3 or 4 transfers between different public transport routes, your cims might go back to using the car as it's less hassle.

Residents

Your cims like to travel from their homes (residential zones) to their place of work (primarily industry/office zones) and then on their way home they often want to go shopping (commercial zones). They also like to visit parks. Bear this in mind when creating zones and transport networks.

Tourists

Tourists arrive via highways (from the edge of the map), train stations, passenger docks and airports. They travel – via multiple modes of transport – to tourist attractions such as unique buildings and certain parks. Having good public transport routes between tourist sources and their destinations will greatly reduce road traffic.

Cargo transit

Cargo transport is generated by industry, cargo train stations, cargo docks and off-map highway connections. All those sources can also be consumers, and also commercial zones.

Cargo from specialised industry travels to generic industry (where it's processed in to different types of cargo) and also off-map consumers (via highway, train or ship).

Should ore or oil industry run exhaust the local resources, those resources will be brought in from off-map connections, often leading to a massive increase in inbound cargo traffic' when this happens consider converting the district back to generic industry.

Cargo generated by specialised industry will primarily travel to your generic industry which will then process the resources in to different types of cargo. Some will be delivered to off-map consumers via docks, stations and highways.

When deliveries are made to stations and docks, you will often get a sudden flood of cargo traffic as a result; think about road types (capacity, speed) and cargo destinations and develop your transport accordingly.

Cims aren't put off by long distance travel...

You might expect that cims would avoid too much travel, but this is not the case. For example, they'll happily travel to the other side of the map if that's where the nearest work or shops are.

https://www.youtube.com/watch?v=iOuOEHbWKuw

...Neither are service vehicles

When placing services (garbage, healthcare, deathcare, police, fire, ambulance) you would expect them to focus on their local area. Sadly, this isn't the case. The green road highlight shown while placing the service buildings indicates where happiness will increase, but as far as the service vehicles are concerned the whole map is fair game.

Recommended mods:

* [ARIS] Improved Hearse AI – keep hearses local and more organised
* [ARIS] Improved Garbage Truck AI – keep dumpsters local and more organised

Highway from Hell

Connecting your city to the main highway network opens a can of worms; you'll get traffic of all kinds (cargo, residents, tourists, services) arriving from highway intersections and then trying to navigate to different areas of your city. Likewise, you'll have all kinds of traffic from your city trying to get to the highway. Try and provide separate highway intersections for different sources and destinations – for example, don't force cargo trucks to drive through your residential areas, give them intersections closer to commercial and industrial zones.

Separate traffic types and routes

It should be obvious by now, but you can solve a lot of problems by keeping different types of traffic, and different traffic routes, separate from each other. In particular, keep cargo and passenger transport apart. Make sure passengers have a clear route to work, shops and parks, and that cargo has a clear route between stations/harbours, industry and offices.

You can achieve this by careful transport infrastructure design (for example, tempting cargo to use a different route by using faster roads that lead more directly to cargo consumers), but Traffic++ provides some extra tools, such as precise vehicle restrictions, that allow you to take it to a whole new level.

Recommended mods:

* Traffic Report Tool – find out where people are coming from and going to, and how and why.

Pedestrian Paths

Paths are the unsung heroes of your transport infrastructure - they are found on the Paths tab in the Parks menu.

Pedestrians will make a point of using paths, especially if they provide a shortcut to somewhere useful; paths drastically reduce traffic because pedestrians will walk to and from work, shops and parks instead of driving.

Gravel path

<pic>

These are extremely adaptable to complex terrain and are ideal for use in park assets, rural walkways and scenic countryside walks. They can also be used in a purely aesthetic role wherever you want to add some gravel texture (eg. next to rail tracks or construction sites).

<pic>

* No zoning or parking
* Restricted to pedestrians
* Very slow, low capacity

Concrete path

<pic>

These are extremely useful for providing shortcuts through zoned areas, and they can also be used to provide pedestrian bridges over busy roads. Pedestrians prefer them to pavements, and will often go out of their way to use them.

* No zoning or parking
* Restricted to pedestrians
* Very slow, moderate capacity

Small Roads (2 lane)

Small roads are ideal for local connections within zoned areas, however they lack the capacity for district and interstate traffic.

Gravel roads

<pic>

There are two gravel roads, a small one (Traffic++) and a normal one. They look awesome when used in rural areas, particularly in small villages and farmland, however their low speed and low capacity limits their application to primarily aesthetic use.

* Zoneable, Roadside parking
* All vehicles and pedestrians allowed
* Very slow, very low capacity (small one) or low capacity (normal one)

Pedestrian road (Traffic++)

<pic>

These are basically a gravel road that's had concrete poured on top. They're ideal for residential suburbs – their slow speed means that traffic generally avoids them unless absolutely necessary.

If you place commerce buildings on these roads, remember to customise them to allow cargo vehicles. There are also some <link>config options available to alter the default behaviour of these roads.

* Zoneable, No parking (unless you allow "residents" cars)
* Restricted to buses, service vehicles and pedestrians
* Very slow, low capacity

Normal roads

<pic>

These are ideal for short local connections, dead ends and areas where only light traffic is expected.

Three variants are provided; normal, grass and trees. The normal variant enables roadside parking, while the grass and tree variants reduce the amount of noise pollution caused by the road. Their capacity can be doubled by setting them as one-way.

* All vehicles and pedestrians allowed
* Zoneeable, Roadside parking on normal variant only
* Low speed, low capacity (set as one-way for moderate capacity)

Small busways (Traffic++)

<pic>

These red roads are essentially a normal road that's restricted to buses and emergency use (police, ambulance and fire - but only when responding to an emergency). Their capacity can be doubled by setting them as one-way.

They look amazing when used in bus terminals and transport hubs, and you can also run them through the middle of built-up areas to provide hassle free transport routes.

Protip: Use them to crete short cuts to allow service vehicles to avoid busy normal roads.

* Not zoneable, No parking
* Restricted to buses, pedestrians and emergency use
* Low speed, low capacity (set as one-way for moderate capacity)

Medium Roads (4 lanes)

Medium roads have two lanes set as one-way on either side. They are ideal for connecting local networks of small roads together and also providing links to larger roads.

Avenues

<pic>

Avenues have two 2-lane one-way roads, side by side. They come in three variants – normal, grass and trees. The normal variant allows roadside parking, while the grass and trees variants reduce the amount of noise pollution caused by the road.

* Zoneable, Roadside parking on normal variant only
* All vehicles and pedestrians allowed
* Moderate speed, moderate capacity

Large Roads (6 lanes)

These huge roads can cope with massive amounts of traffic when properly used. They are ideal for main arterial routes through and between districts.

6 Lane Road

<pic>

<to-do>

* Zoneable, Roadside parking on normal variant only
* All vehicles and pedestrians allowed
* Moderate speed, moderate capacity (set as one-way for high capacity)

6 Lane with Busway (Traffic++)

<pic>

This road has two bus lanes, one either side, which provide an uncongested route for public transport and emergency use.

* Zoneable, No parking
* All vehicles and pedestrians allowed, except on bus lanes.
* Moderate speed, moderate capacity

Highways (1 and 3 lanes)

These are by far the fastest roads in the game, almost twice as fast as a 6-lane.

Highway (3 lanes, one-way)

These roads are primarily designed for interstate ("off map") connections. They can also be used for connections between districts and they are widely used for 3-lane roundabouts.

Unlike other roads, highways are always one-way, so you have to place two side by side for bi-directional traffic. Two variants are available – normal and sound barrier. The sound barrier increases costs, but reduces the amount of noise pollution created by the road - which is very useful there are nearby residential zones.

* Not zoneable, No parking
* All vehicles allowed, but no pedestrians
* High speed, moderate capacity

Highway ramp (1 lane, one-way)

These are specially designed to help traffic get on and off a highway. If you start using them for other purposes, you'll likely run in to all sorts of problems.

Don't connect more than one highway ramp to the same intersection on a normal road, it will cause huge merging issues. Stagger the connections to the normal road system, ideally using a roundabout, and ensure there is a decent length of road between each connection.

If you must connect highway ramps to the same intersection, it's best to connect them to a 4-lane avenue road in a Y-junction format. This minimises the angle between lanes, avoids traffic lights, and also gives similar capacity on the avenue to that of the highway ramps.

* Not zoneable, No parking
* All vehicles allowed but no pedestrians
* High speed, low capacity

Bridges

Almost all roads, and even some paths, can be turned in to bridges simply by elevating them. By default, using the PageUp and PageDown keys (customisable in game options) while placing a them will cause this effect, but sometimes it will happen automatically if you run the them over a valley or uneven terrain.

The bridge has the same basic properties as a normal road or path, however zoning, parking and bus stops will be disabled for the length of the bridge.

The main benefit of bridges, aside from being able to reach places roads can't normally reach, is that they allow roads to cross over/under each other without causing an intersection. This is very handy when you don't want the two streams of traffic to interact with each other.

<does road incline/decline affect traffic speed?>

The following roads/paths can NOT be used for bridges:

* Gravel Path
* Gravel Roads
* Pedestrian Road

Recommended mods/assets:

* Fine road heights
* NoPillars
* Custom bridge collection

Dead ends (Cul de sacs)

There is a tendency to always connect both ends of roads, but you don't have to. Dead end roads (where one end is not connected to any other road) ensure that vehicles only use them when absolutely necessary.

You can create clusters of dead-end roads in a similar pattern to the veins on a leaf, where one central dead-end spawns several other dead ends along its length. While this leads to lots of intersections, and thus slower moving traffic, it all happens away from your main roads and the only traffic in the 'leaf' is that with absolutely needs to be there (making cargo deliveries, collecting trash, etc).

Small 2-lane roads are ideal for dead ends, however if you're making a 'leaf' consider using a 4-lane avenue as the central road.

Intersections & Crossings

There are several types of intersections, most of which allow traffic to change lanes and/or switch to a different road. Intersections also occur where different modes of transport intersect, such as paths crossing rail track, or rail track crossing roads – you can prevent this happening by using bridges or tunnels.

Invisible intersections

What looks like a single stretch of road, path or rail is usually several shorter stretches joined together by "invisible intersections".

On roads, they allow traffic to change lanes before reaching a normal intersection; this is useful, but it can also cause major traffic jams – especially on roundabouts and highways. We'll see later how that can be fixed using intersection routing.

Pedestrian crossings

Pedestrians can cross the road in several ways, their preferred method being raised walkways (so they don't have to dodge hotdog vans). If there aren't any nearby raised walkways they'll use the nearest striped pedestrian crossing at a road junction, and if all else fails they'll sometimes resort to crossing at an invisible intersection.

In the case of rail tracks, pedestrians can only cross if there's a level crossing (more on those later).

<future: would be nice if T++ provided a decent implementation of pedestrian crossings toggling at normal/invisible intersections).

Road Intersections

Road intersections are highly visible due to the striped pedestrian crossings on each road connected to them.

<more later>

Rail intersections (Level Crossings)

Intersection Spacing

When traffic is busy, cims won't drive across an intersection until they're sure that there is enough room on the exit road. This can cause major headaches, traffic jams and verbal profanities. So, make sure there's a decent stretch of road between each intersection - it helps traffic flow more smoothly.

Intersection Complexity

Wherever possible limit intersections to 3 roads, like a T-Junction. This greatly simplifies the traffic flow. As you start adding more roads (more specifically: more lanes) to an intersection, you get more traffic cutting across each lane, slowing everything down and causing chaos.

You can greatly improve traffic flow at intersections – even small ones – by using Traffic++ intersection routing tool (see later) which provides precise control of how the lanes connect to each other.

Roundabouts

A roundabout should ideally use a similar speed road to the surrounding roads. Using highways for all your roundabouts might seem like a great idea, but they will act like traffic magnets for your cim's sat navs, drawing significantly more traffic to the roundabout and potentially clogging up the slower roads in the vicinity.

The roundabout should have at least 2 lanes; anything less risks gridlock, especially on small compact roundabouts. In most cases, a maximum of 3 lanes (highway) will suffice for all but the biggest and most complex of roundabouts. Traffic will rarely use more than 3 lanes on a roundabout.

Try to arrange roads so that most of the traffic entering the roundabout will exit at the next intersection or use the innermost lane to travel further round; this will free up the outer lane for traffic entering at the next intersection and generally reduce the overall amount of traffic on the roundabout at any given time.

You can massively improve roundabout performance using Traffic++ road customisation tools (see later), in particular by guiding traffic in to lanes most suitable for various destinations and also controlling lane changes within the roundabout itself.

Recommended Mods/Assets:

* Road Protractor (simplifies creation of roundabouts)
* One way street arrows
* Roundabout Adornments

One-way roads

One way roads are a somewhat blunt way to increase capacity of existing roads and achieve some basic control over traffic flow.

Pros:
* Roundabouts would be scary without them
* Doubles road capacity... in one direction

Cons:
* Eradicates road capacity... in the opposite direction
* Changes local traffic flow, often in unpredictable ways
* Often causes traffic bottlenecks in unexpected places
* Can make intersection routing somewhat difficult (see later)

Recommended Mods:
* One way street arrows - much better visualisation of one way systems
* Extended road upgrade - more intuitive management of one-way systems

Segment routing

What looks like a long stretch of road is often comprised of several segments of road that are joined together. Where the segments join, an "invisible intersection" is created, allowing traffic to switch lanes. This often results in this kind of mess:

<pic of single file traffic jam>

Luckily, Traffic++ provides a tool for taming these hidden monsters.

<more to follow at later date>

Pros:
* Quickly tame mid-road lane changing

Cons:
* Occasionally causes strange traffic patterns in local vicinity
* Can sometimes mess up bus routes

Intersection routing (Traffic++)

Arguably the most powerful traffic management tool, this lets you fully customise traffic routing at an intersection. But with great power comes great responsibility...

<pic>

<more to follow later>

Pros:
* Precise control over traffic routing
* Can drastically improve traffic flow at the intersection and nearby roads

Cons:
* Can be confusing when used near one-way systems
* Can cause wildly unpredictable traffic flow in surrounding area
* If not careful, it merely relocates the traffic problem elsewhere

Lane restrictions

<waiting until next release before starting this section>

Scratchpad

just a place to dump stuff that needs adding...

short vs long public transport routes

short: heavy civilian traffic routes, routes requiring high frequency (effectively increase capacity), for low-capacity transit (eg. buses)

long: routes with less traffic, high capacity transport (trains, metro)

example: a bus taking a really long route will be filled quickly and not have capacity for subsequent stops later in the route

also factor in acceleration/deceleration; longer routes benefit slower acc/dec vehicles

passengers don't like lots of transfers, they will often resort to driving cars if public transport has more than 3 or 4 transfers.

road-based routes (buses) will suffer more disruption the longer the route (more chance of hitting traffic jams, etc)

Circular routes

* covers more area than linear line
* good for collecting people in that area and delivering to transport hub
* goes in one direction, so need another route going opposite direction to avoid overcrowding
* can increase journey time to point where cims prefer cars
* good for local bus and metro, undesirable for trains

Linear routes

* ideal for bi-directional transport along arterial route
* connect hubs and other areas of high demand
* covers less area (use circular lines to get people to hubs)
* great for trains, metro. also ok for bus, but keep route short

very random stuff, ideas & pondering

does having bus depot in high traffic area cause problems (spawned busses get stuck in traffic)? how often do new busses go out to a route, or return from a route? is there any point in having multiple bus depots?

would be cool to have buses (and later other types) need to include a depot in the route, and have control over when they need to visit the depot (once per trip, or only when required - eg. end of shift / need repairs). depot should have finite fleet of vehicles, repair time depends on time since last repair, etc.

would be cool if there were vehicle breakdowns (particularly busses), repair/tow trucks, etc.

would be cool if you had to buy vehicles at each depot, also ability to sell vehicles, and also ability to define how many vehicles per route

would be cool if there was some sort of customer satisfaction with public transport - eg. overcrowded bus route / long waiting times / etc. would reduce satisfaction, people would be less likely to use that route (could be implemented by a speed penalty in pathfinder)

would be cool if we had more control over ticket pricing (free public transport is too blunt a tool) - set per depot applies to all routes, ability to individually override for a route. higher prices make more profit per person, but make route less desirable depending on wealth (would interact with satisfaction too). cheaper tickets attract more customers, at risk of overcrowding, etc...

wealthier customers should be more choosy with transport (eg. less likely to take bus, more likely to travel by train/car); economy affects wealth... Less wealthy customers should be less likely to have car, more likely to use bus, less likely to use train, etc. --- transport mode preference based on social group, wealth, age, etc.

if t++ ever goes in to rail customisation territory, some great info and links about rail signalling here: https://wiki.openttd.org/Signals - would also be cool if 'waypoints' along the rail network could be provided to get more control over train routes (like how bus stops are defined, allow same sort of thing for a rail track - define both which side of track and specific route) - train obviously wouldn't stop at a waypoint.

when editing intersections / lane restrictions, would be cool to show any bus routes being affected whilst editing (maybe a much thinner version of current routing line?) - this would let you see if the customisations are going to mess up a route while editing, rather than having to manually do before/after checks.

would be nice if default intersection routes were depicted as thin grey or white lines so that any uncustomised sources would show what their default destinations are.

http://imgur.com/gallery/mFFRO/

Contributors

Huge thanks to everyone who contributed, including: jfarias, WTFBrutus, and Reddit users cantab314, christoy123, Beheska, mitchells00.
Last edited by leftbehind; May 20, 2015 @ 11:21am
< >
Showing 1-10 of 10 comments
FretfulShrimp  [developer] May 6, 2015 @ 2:43am 
Amazing work as always! :)
I'll keep an eye on this discussion and help with whatever I can think of. For starters:

The programmers at MightWatch thought it would be funny to add some randomness to the path finding algorithm. Luckily, they left low random values so this is barely noticeable with all the traffic but keep in mind that vehicles might not use the road you expect them to.
leftbehind May 6, 2015 @ 4:28am 
I was thinking about mentioning the randomness but was worried it would lead to some people taking it as an excuse to call out 'single file traffic' where on an otherwise empty highway the traffic piles in to a single lane.
FretfulShrimp  [developer] May 6, 2015 @ 4:58am 
Ah, I see. Well, it's your guide. You decide what goes in and what stays out of it. I was just trying to help. :)
Maybe it's a good idea to explain why the single line jams happen and how to avoid it. But I'm guessing you have that planned for the intersection routing section. Let me know if you need anything from me.
leftbehind May 6, 2015 @ 7:50am 
I'm not sure how to tackle that issue TBH, it seems to split people's opinions with many just flatly demanding that the game should mimic human behaviour and use free lanes. My assumption is that at some point CO will change the traffic AIs (maybe even the pathfinder?) to jump to empty lanes in an attempt to jump queues.
FretfulShrimp  [developer] May 6, 2015 @ 11:23am 
I, too, am expecting CO to improve traffic AI but I think your guide should focus on how the game behaves now. You can always update it later.

IMO, you shouldn't let people's opinion of something external to your guide factor into it. They can't blame you for the way the game is. All you're doing is providing a solution.
Brutus, why? May 7, 2015 @ 11:54am 
Awesome, looking forward to seeing how this progresses.

Gravel roads, at least the default ones in the vanilla game, are zoneable (currently you have it as a ?)
Gallonidas May 7, 2015 @ 8:47pm 
Wouldn't this be easier if you allowed us to choose the Vehicles' Top Speed and Acceleration with slider for each type?? I guess nobody would complain about "they are too slow now, correct it!" like I've seen in other mods. We decide our own, and we are the only ones to blame ! ;-)
leftbehind May 8, 2015 @ 4:29am 
@WTFBrutus - thanks for infos, added to guide

@Gallonidas - The vehicle speed is independent of road speed, and most vehicles are already able to go faster than most roads currently allow. Lane speed customisation is being worked on (you will love the UI that @jfarias is developing for a future release, it looks amazing!) and that in itself should fulfill most people's needs without the need to customise each individual vehicle type or category. For example, you could set an inside lane to be slower than normal, and an outside lane to be faster than normal. It's possible as that feature develops that the pathfinder could be adapted to make vehicles choose the most appropriate lane for the type of vehicle, so slower vehicles will use slow lanes, and faster vehicles will use fast lanes, the result being that lanes are much more fully utilised to take better advantage of the road's true capacity.
Last edited by leftbehind; May 8, 2015 @ 4:31am
leftbehind May 15, 2015 @ 6:55pm 
road speeds updated (should all be correct now, thanks to Reddit) and a bunch of other stuff added. will keep chipping away at it over next few weeks.
< >
Showing 1-10 of 10 comments
Per page: 1530 50