Hi everyone, Software Engineer Alexander Harkness here. It’s been sometime since I last posted about the SimCity
traffic system, so I wanted to give you all an update on how the system currently works and also to talk a little about the upcoming changes scheduled for Update 7 later this month. For those who want a little refresher on how the traffic system is working currently, look back over my previous blog.
In Update 7, we are including a change which will improve the behaviour of all the vehicles. Basically the change allows vehicles to claim a spot in a unit far in advance of arriving at a destination. It doesn’t sound like much, but this means that the routing map can be updated so it doesn’t include those units where all the spots have been claimed. So, for other vehicles that do not yet have a destination, we can send them to an alternative unit instead of their current behaviour where they all flock to the same destination and then change their minds.
What this means for you is that you should see less clumping together of police vehicles, buses and other service vehicles such as garbage trucks. You may still see all the police vehicles flocking to a crime but once one of them claims the arrest, then the remaining police cars will return to patrolling. The garbage trucks will be one area where you should see big improvements as they will claim every open spot along an entire side of one path where their current carrying capacity allows. So you may still see two garbage trucks picking up on the same street, but one should be on the right side and the other on the left.
Above you can see how the behaviour is altered. In the before
picture, both the red and green car take the same path to the closest job, however the red cars get to the job first and so the green car is forced to u-turn and travel back along the street it has already travelled to get to the other job.
In the after
picture, because the red car has already claimed the job, the green car can simply travel straight to the only other available job and can dismiss the job that has been taken already.
Update 3 Routing Improvements
Routing was one of the major changes we made in Update 3. It allowed us to produce much improved routing data for the vehicles compared to the previous model. As you may recall from the previous routing system, it did not allow us to really take into account correctly the congestion on the roads without some influence in how the roads were created. The system also didn’t let us take into account roads which had medians and where the vehicles would have to stop or enter a unit from a particular side of the road.
If we look at the scenario used in the previous blog, then I can show how these changes affect the vehicles. Again, the Sims are driving to work from the residential to the industrial, and as in the previous blog, they will still travel through segments 5, 6, 2 and 1 in order to get to their destination.
In this updated picture you can see the new routing values in black with the route the vehicle will travel highlighted in green, but they are no longer related to the points that mark the ends of the segment and instead are values associated with the segment itself and have a value for each side of the path.
Now if we imagine that segment six is very congested, we can easily make it more costly to travel from segment five to segment two by making segment six more expensive. The result means you no longer have to use those horrible techniques to influence the values.
Hope you all enjoy these fixes when they appear in Update 7 later this month.