• Welcome to SC4 Devotion Forum Archives.

NAM Traffic Simulator Development and Theory

Started by z, August 02, 2008, 05:07:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

z

In the original Maxis traffic simulator, pathfinding was often poor at best - I remember Sims deserting their residences due to lack of jobs even though there were suitable jobs available literally right across the street.  Later traffic simulators improved this situation greatly, but the no-job zots were merely reduced, not eliminated, and it was generally a good strategy to put in as much mass transit in a city as you could afford, and hope that the Sims would find their way to at least a good portion of it.

Simulator Z has improved pathfinding to the point where no-job zots are a rarity in properly built cities, and the Sims can generally be counted on to take the fastest route to work.  The Maxis simulator gave the Sims all of three minutes to get to their jobs; if they couldn't find a suitable job in that amount of time, they were fired, and forced to leave town, resulting in a no-job zot.  Later traffic simulators extended this commute time limit, but it wasn't until Simulator Z that it was extended far enough so that the Sims could take a real-world amount of time to get to their jobs.

Making these improvements had an unanticipated side effect, though.  Since the rails (subway, el rail, commuter rail, and monorail and its variants) were always faster than roads, even highways, the increased pathfinding efficiency of Simulator Z means that the Sims now travel by various forms of rail whenever they can.  The result, as many people have noticed, is that there is much less road traffic in a city running Simulator Z than in a real city, as long as the SC4 city has a fair amount of rail networks.

Right now, there are two ways to remedy this.  Experienced SC4 players often overbuild rail networks, especially subways, as in the past that has been necessary for optimum traffic flow.  With previous versions of Simulator Z, I have increased the monthly cost of subways to discourage this practice, until this cost currently stands at six times the original Maxis cost.  But it is still not hard to have a thriving, profitable city with lots of subways and other rails, and with the roads barely used.

One way to restore balance is to reduce the amount of rail networks in a city, forcing the Sims back onto the roads.  If a realistic amount of rail networks is used, then this will happen.  Another way to restore balance is to use the Low version of Simulator Z, thereby limiting the use of rail networks, and again, forcing more Sims onto the roads.

The only problem with these methods is that they are rather artificial.  Ideally, the traffic simulator should produce a reasonable balance of traffic distribution, as long as you have provided sufficient traffic capacity for your city.  The traffic simulator even has properties that allow the Sims' preference for travel types to be weighted toward cars or mass transit, and these properties can be set for each wealth level.  From its initial release, Simulator Z increased the Sims' preference for cars, and at first, this had a real effect.  But as the efficiency of Simulator Z's pathfinder increased in subsequent releases, it overwhelmed these preferences.  So I have spent a while looking at the dynamics of this situation, doing a lot of testing and seeing where the problem lay, and in the end I have come up with what appears to be a better version of Simulator Z.

Hints of what the source of the problem is can be seen in the problem's description above.  In earlier traffic simulators, rails had to be significantly faster than roads to attract Sims to them.  That is no longer the case.  Simulator Z started with the same speeds for rails as the old CAM simulator, which is what I used as my starting point for Simulator Z.  These speeds were either greater or equal to those of the original Maxis speeds.  Through my experiments, I have found that reducing them significantly helps balance traffic automatically.  And it does so without causing any performance degradation; in fact, cities appear even more robust using Simulator Z with the lower rail speeds.  I believe that this is due to the fact that the game intrinsically likes to see traffic on the roads, and increasing this traffic has various positive effects.

What is a "significant" reduction?  For all rails except monorail and its variants, it's 30%.  This makes most rails slower than highways for the first time.  Monorails were a tricky question; in the real world, they aren't significantly faster than el rail or subway.  (For example, an official of the Seattle monorail recently stated that the monorail's average speed, including stops, was 27 mph (43 kph).  This was in response to a charge that its average speed was only around 20 mph (32 kph).)  However, monorails also serve as the basis of High Speed Rail, and according to Wikipedia, the minimum cruising speed of high speed rail is 200 kph.  What to do?

First of all, in general all the speeds in Simulator Z are based on cruising speed, and do not include stops.  Furthermore, in this new release of Simulator Z, all vehicle speeds are actually around the upper limit of their real-world cruising speed.  But this still leaves a huge gap between real-world monorail speed and the minimum speed of high speed rail.  It's clear that Maxis intended that the monorail be a high speed form of transit, and countless cities are built with that assumption in mind.  So what I did was to use the minimum cruising speed of high speed rail, or 200 kph.  This represents a 20% reduction from the current monorail speed, as opposed to the 30% reduction for other rails.  And coincidentally, it just happens to be the original monorail speed used by Maxis.

In general, reducing the speeds of the rails reduced their usage slightly.  But monorail usage actually went up significantly!  Part of this is undoubtedly due to the fact that monorail speeds were not reduced as much as other rail speeds, but part was also undoubtedly due to the fact that there are fixed time costs in transit that did not change, and a fast monorail becomes even more attractive under those circumstances.

Finally, there's the Bullet Train Mod (BTM).  Technically, a bullet train is just another name for high speed rail, and runs at the same speed.  But in SC4, it has been used to designate an extra-fast form of high speed rail.  I decreased the speed of the BTM by 25% to 300 kph, which happens to be the original speed of the BTM in SC4.  Like the monorail, I would expect to see its usage increase in the new Simulator Z.

Bus speeds were unchanged; as a result, bus usage tends to increase a bit over time along with car usage.

To summarize, here are the speeds (in kph) of the rails in the original Maxis simulator, the current Simulator Z, and the new Simulator Z:

[tabular type=2]
[row] [head]Simulator[/head] [head]Subway[/head] [head]El Train[/head] [head]Freight Train[/head] [head]Commuter Rail[/head] [head]Monorail[/head] [head]Bullet Train[/head] [/row]
[row] [data]Maxis[/data] [data]150[/data] [data]150[/data] [data]150[/data] [data]150[/data] [data]200[/data] [data]200[/data] [/row]
[row] [data]Simulator Z v1.1.1[/data] [data]150[/data] [data]150[/data] [data]150[/data] [data]200[/data] [data]250[/data] [data]400[/data] [/row]
[row] [data]Simulator Z v1.2[/data] [data]105[/data] [data]105[/data] [data]105[/data] [data]140[/data] [data]200[/data] [data]300[/data] [/row]
[/tabular]

I have done extensive testing of these new speeds on my cities using the different capacities of Simulator Z, and I find it to be a distinct improvement, though in general, the difference was subtle, and in no case was it drastic.  But it was always positive.  As might be expected, the biggest difference was in highway usage.  Furthermore, changes were gradual; it typically took about ten years for real changes to be seen.  At the ten year point, change in traffic patterns was continuing in a positive way, but this was as far as I took my tests.

I would like to encourage as many people as possible to try out the new version of Simulator Z, as I think it is a real improvement over the current version.  It's recommended to run it at least ten years (and possibly longer) before evaluating it; the Traffic Volume Graph is one of the most useful tools for seeing what's going on here.  It would be very helpful for some people to run their cities with this simulator for 20 years or longer to see what happens.  Please post your experiences with this simulator in this thread, along with any other comments you may have.  If no problems are found with this version of the simulator, it should be released as the standard Simulator Z in the next NAM release.

To use the new version of Simulator Z, download the attached zip file, which contains all capacities and types of the simulator.  It is important to already have the current version of Simulator Z installed via the NAM installer, as this way it will be in sync with the other files that get installed along with it.  Then replace the version of Simulator Z in your Network Addon Mod folder with the identically named file from the attached zip archive.  If you are using the BTM, you should pick the file that has the same name but also has "BTM" in it.  Good luck!

pierreh

I have installed the V1.2 Beta version of the Simulator, High setting, no BTM and no Park-and-Ride, and I am eager to see the effects.

A question: for the tests do you prefer 20 years of running on a 'static' city, i.e. no further zoning, roadway layout, etc, or can one keep developing the city during those 20 years? (It means quite a bit of play time, and in my case it will mean running in multiple successive sessions: is that a problem?)

z

The ideal test would be on a static city.  But as you point out, that is quite a bit of play time.  A lot can be learned through normal play, especially if the city is already large.  My tests were all on static cities, so if people want to run this simulator in dynamic cities, I think a lot of useful data can still be obtained.  The main thing is to verify that the new settings don't make anything worse.

One thing that I noticed is that the proportion of high-wealth Sims tends to steadily increase under this simulator.  I'd be very interested to know if other people see this effect, or if it's just due to the type of cities I'm running.  The easiest way to see this is to look at the Jobs & Pop graph.

z

Quote from: Trio3D on August 13, 2009, 01:00:57 PM
I've tested the new version in all build-up city tiles for at least 10 ingame years (longer only if expansion was planned) and so far the difference is barely noticeable. If both EL/GLR and heavy rail are running parallel for some length - in some cases I "retrofitted" parts of rapid transit into former four-track corridors in older cities -, EL/GLR usage ceased at all compared to v1.1.1. In general the number of rail road commuters, who switched to cars or buses, went down by max. 10%, but after reading your explanation I really expected a more significant change. Maybe it is due to my rather small cities (103.000 in the biggest one, most are well under 50.000), relatively close proximity of workplaces; a habit that still remains from playing with the old Maxis simulator; and only a small number of railway lines? On the other hand I encountered no problems or strange game behavior.

Yes, your experience is what I would expect, especially considering the city configuration you described.  The biggest difference will be seen in large, spread-out cities, and even then, as I mentioned earlier, it won't be a drastic difference.

Some of you may recall that a few months ago, I made a request in this thread for volunteers to test a new version of Simulator Z.  People volunteered and did the tests, and my thanks to all of them for their work.  At the time, the tests showed no significant difference from the standard Simulator Z.

In my post announcing the Beta 1 version of Simulator Z v1.2, I mentioned that the simulator's efficiency combined with the large differences in vehicle speed overwhelmed overwhelmed some of the preferences expressed in some of the simulator's other parameters.  But with the speed ranges reduced in Beta 1, I decided to revisit the other change I had been considering.  Sure enough, it now had an undeniable effect, although still small.  And the setting the had the best effect had been hinted at in the initial results a few months ago.  Combined with the speed reductions, there is slightly more road traffic, along with an even greater increase in monorail/HSR/BTM usage.  As a result, I am incorporating this change into what is now Beta 2 of Simulator Z v1.2.  Aside from this one addition, everything else is the same as in Beta 1, including the new travel type speeds.  I expect this to be the last beta for this version of Simulator Z, and I would appreciate it if people would test it out and let me know how it works for them.  Don't be surprised if the differences are small enough in some cities not to be noticeable.  Please see the end of the first thread on this page (the part after the chart) for how to install and test the beta version.  All feedback is appreciated.  Thanks!

sumwonyuno

#164
Hey z, it's me again.

The traffic situation in my region is pretty much the same (overloaded roadways, high bus use in certain corridors, no rapid transit, yet).  I've tested beta 2 on a few city tiles in my region. 

My Downtown is "stable", no development occurs when I unpause.  Traffic from other city tiles sometime fluctuates, but then revert back to previous levels.  During the 10 years, population percentages/numbers stayed the same.  Automobile use is up slightly, pedestrian and bus use dropped slightly.  Traffic congestion stayed about the same, though in certain areas, distribution among streets changed.  Looking at the volume views, pedestrian volumes were a bit less.  But previously, some roadways had buses at red and orange levels, and now nothing's over yellow.  Auto and overall roadway volumes look similar.  The one big difference was that commute time dropped from 65 minutes to 20.

Though, in another stable city tile, all the trends are the same, but commute time only dropped a few minutes.  Other city tiles were inconclusive because of either neighboring tiles completely changing commute patterns or they were really static, and car-only.

z, I've been wondering.  I know we can't get real region-wide pathfinding.  I've been thinking of ways to get around the limitations and force traffic to city tiles with available jobs.  Is there a way to adjust the penalty to commute to another city tile?  I've basically avoided unpausing, then resaving certain ones because they route intercity traffic to undesired places.  It's one thing I want to experiment with.  Though, I can see a problem there, because it would undoubtedly kill multi-tile commuting.  Another alternative could be modifying toll booths and putting on certain neighbor connections.  Because of the linear nature of my region, limited roadways and heavy directional traffic from the suburbs, the toll booths would discourage commuters from going the wrong city tile (just because it has a couple of commercial jobs) and possibly get them going the desired way (to town and jobs).


The City & County of Honolulu, a Mayor Diary based on Honolulu, Hawai'i.

mark's memory address - I've created a blog!

z

What you describe in general makes sense to me for cities with your layout and no rapid transit.  However, I haven't seen the cities (at least not recently), and I don't know what capacity version of Simulator Z you're using.

Don't pay too much attention to the commute time graph.  I've fixed it as much as I could, but due to a game bug, it's never going to show you the proper times.  And with Simulator Z, commute time is nowhere near as important as it is with other traffic simulators.

As for forcing traffic to city tiles with available jobs, the game is supposed to do that automatically.  The main cases in which this doesn't work are when people are using CAM, and the CAM demand bug skews everything.  I certainly wouldn't recommend giving up CAM, but we may need to wait for a fix for this bug before this feature works properly.

There is no way to adjust the cost of commuting to another city tile.  And the only real effect toll booths have (aside from the income) is a congestion effect; only to that extent do they affect traffic flow.

In the relatively near future, I'll be polishing up my ESURE package.  This package includes express subways, which are extremely helpful for intercity commuting.  Once I've got ESURE working the way I want, I'll post it on the LEX, and that will help you out at least to some extent.  The fix for the CAM demand bug should also make a big difference, though I have no idea when that will be ready.

sumwonyuno

Thanks for clearing all of that for me.


The City & County of Honolulu, a Mayor Diary based on Honolulu, Hawai'i.

mark's memory address - I've created a blog!

pierreh

Here are the results of 20 years of running the latest version of Simulator Z, V 1.2 Beta 2 freshly dowloaded, High setting.

City data: This is a mature city occupying most of its tile; it is an early development with lots of things that I would no longer do, or do quite differently. The subway was installed later on the mature city, replacing the busiest bus flows, but it still left out some areas of the city. Railroad lines are relatevely underdeveloped. The city has connections to two other smaller cities, one east, the other west of it.

Population: 527'699 at start of test, 544.752 at end of test (20 years + 3 months later). The population rose towards 540.000 in the first 5 years, then remained stable and started again to grow slowly in the last 5-6 years.

Aside from fixing schools (budget and adding the city university when the game university overflowed) and health (adding hospitals and clinics) and deleting two or three abandoned buildings I did not interfere with the city during the test. All pictures below were taken at the end of test.

City zoning, showing the global layout:



Road traffic flow, showing that there is very little congestion



Road traffic global volume:



Bus traffic:



Subway traffic, showing also the subway network; only one 'line' is well used, the others much less:



Train traffic:



Jobs and population:



Travel time:



And finally the graph that is surely the most interesting, that of the Traffic density. The previously Simulator setting was Z High (V1.1 if I recall correctly). The effect of the new version of the Simulator is quite clearly visible.



I'll be interested in the interpretation of these results. I have a couple of other cities on which I could perform a similar test some time next week.

Eagle

OK, I tested v1.2 beta.  Before the test, the city was running on v1.1a high with one modification: bus speed was bumped up to 5 kph below car speed.  The city has a good bus & passenger rail network.  It ran for ten years & here are the numbers:
Before--->After. Population(655k--->638k). Cars(230k--->235k). Bus (175k--->150k).
Passenger rail(210k--->200k). 
I think the large drop in bus traffic was due partly to the speed difference as noted above.  No ill effects noticed with running v1.2 beta.

z

#169
Quote from: Douzerouge on August 16, 2009, 03:03:56 AM
Here are the results of 20 years of running the latest version of Simulator Z, V 1.2 Beta 2 freshly dowloaded, High setting...

Everything looks good here, except that that last graph (which is the only one containing historical data) makes no sense at all, for at least a dozen different reasons.  The most likely explanation I can think of is that the city was not previously running Simulator Z V1.1 High, as you thought.  Could you please try rerunning it with that Simulator (or v1.1.1, which is identical for these purposes) and see what you get?  The version in the current NAM would work fine for this test.

@Eagle:  Those results look good.  The reduction in the bus traffic is only about 15%, which isn't too much, especially considering that the previous result was with your mod.  And bus ridership is still about 64% of car traffic, which seems quite reasonable.

pierreh

I installed the version of Simulator Z High dated from 16 January 2009, that came with the March 2009 release of NAM. And I reran the 20 years test on the same city. The results for Travel Time and Traffic Density are not very much different from the previous test:





I cannot think of a dozen different reason why the graphs make no sense at all, I can only think of one: game speed. I normally play at low speed, because I like to see things developing at a pace I can control, and adjust/correct if it does not go the way I would like to have it. For the 20 years tests I played at high speed. Could it be that, depending on the game speed, some computations that take a lot of juice (and if I recall correctly, paths computations in the Simulator are among the most processor-intensive tasks in the game) are not performed at the same pace relatively to the game's calendar, or are performed differently, or even not at all in some cases? Pure conjecture on my part of course - although not entirely, because when running a previous simulator test (involving a monorail parameter) I had noticed differences in stations occupation and traffic figures for the same period of city time, depending on the speed of the test.

I intend to rerun the first five years of the test, using the 1.2 beta version of the Simulator, at low speed, and produce 10 year graphs which will show the last 5 years before the test and the first 5 years of the test. I can try to fit this in my schedule for tomorrow. During the last 5 years prior to the test at least, the city was running with Simulator Z high, most likely the above mentioned version.

pierreh

I performed the 5-year test at slow speed, with Beta 2 of version 1.2. I find the results interesting. Here are the two 10-year graphs:




Since the test was performed for exactly 5 years, the beginning of the test, T0, is right at the middle of the graphs. This shows that the 'singularity', when travel time increased substantially and traffic densities changes also markedly, happened before the beginning of the test - about 3 years before. What caused that singularity, I have no recollection, having played in recent times with several cities concurrently, for development as well as for various tests.

The fact that the singularity happened before the testing period was less visible on the 50-year graphs for the 20-year tests. T0 on these graphs is at 3/5ths of the horizontal scale; however, without measuring exactly, one can see that the singularity occurs before 3/5ths of the graph are reached.

Contrary to what I assumed, game speed does not appear to have much effect, if at all. The 5-year graphs show by and large the same variations as the 50-year graphs during the 5 years following T0.

Does the 50-year traffic density graph now make more sense?

z

Yes, all your results now make sense.  The version of Simulator Z in the January NAM is 1.0, and for most cities, there will not be a significant difference between v1.0 and the current v1.2 beta.  This is the main reason I'm not calling it v2; it's essentially just a better tuned release.  If you look at the traffic volume graphs for the January NAM version of Simulator Z and the ones using v1.2, you see that they are quite similar - there is hardly any difference at all.  This does make sense.  It's the part before what you term the singularity that didn't make sense, as you originally thought that that was an earlier version of Simulator Z.  But it couldn't have been - your later experiments used the earliest released version of Simulator Z, and it behaved much like the current version.  So either the part before the singularity was an early alpha version of Simulator Z, or, more likely, it was a different simulator altogether.  The pattern of traffic usage before the singularity does not look like that of any version of Simulator Z, but it does look a lot like that of many of the other simulators.

Does this make sense to you?

pierreh

Absolutely!

I did not keep a journal of what I did to the city in previous game years, so I would of course never swear that it had been run with Simulator Z for a long time, and evidence shows that it did not, until about 3 years before the start of the test: strange but conceivable. We will never know but that is irrelevant.

Do you need more testing? I intend to apply V1.2 to the city with the monorail line, that was already used for an earlier test.

z

No, I don't think any more testing is needed.  Thanks for your help!

z

The Beta 3 release of Simulator Z v1.2 is now available.  Like each of the previous two betas, it optimizes a different part of the simulator.  Beta 3 specifically adjusts a parameter that directly affects commercial and residential demand; the result should be a slightly better balance.  The biggest change was made to the Ultra version of Simulator Z; successively smaller changes were made to the High and Medium versions; and no change was made to the Low version.  Although the parameter changed specifically affects demand, simulator parameters often have unexpected effects on seemingly unrelated aspects of the game.  I always test these versions thoroughly before releasing them even for beta test, but my range of cities is obviously limited.  Please let me know what effects you observe from this change; I am particular interested in hearing from users of the Ultra version of the simulator, where the effects should be most noticeable.  I have noticed what seems to be a slight increase in car usage, but it's hard to tell if this is statistically significant; I'd be interested in hearing if other people noticed the same thing.  In any case, I'd be interested in hearing about any changes you observe.  Thanks!

sumwonyuno

#176
I have pictures this time!  I tested in 3 side-by-side city tiles (called in-town Capitalis) with Ultra for at least 10 years each.  I did not save after each test.  Basically, all the trends were the same as w/ beta 2: flat population/jobs, slight increase in car usage, slight drop in ped/buses.

Here's the zoning layout:


There is a single east-west freeway that cuts through the middle of the city tiles.  Basically, my preferred commute patterns are for the west, north and east suburban commuters to converge in town.  What ends up happening is that commuters from the valleys to the north automatically go to the closest neighbor connection.  Most commuters from the eastern suburbs go westbound on the freeway, stay on it, and go to the next city tile.  Vacant jobs are plentiful along the southern shore.  Commuters go past the left edge of the map and then they are in the western suburbs.  As for western suburban commuters, many do go eastbound, but many others go westbound as well.  To the west of the picture there are a lot of industrial jobs on the south edge of the map (ignored by the commuters).  But there is a big potential for an eternal commuter loop, and that is the reason why I've been wanting commuters to go toward town to find jobs.

Anyways, here are before and after graphs:

Congestion:




Road Volume:




[Removed other graphs]

And also, what exactly is that commercial/resdential parameter?  I don't know if I experienced something out of the ordinary.


The City & County of Honolulu, a Mayor Diary based on Honolulu, Hawai'i.

mark's memory address - I've created a blog!

z

This all looks reasonable to me.  Your before and after pictures are very close, and as there is some randomness even in running the same simulator from the same starting point, I see nothing to be concerned about here.

The one thing that surprises me is that your industrial jobs are unfilled - they're close enough to residences that Sims should be using them.  The most likely explanation is lack of industrial demand.  Could you post a picture of your RCI Demand Graph?

As for the parameter, it's the Customers/Traffic Noise Coefficient.  And aside from the lack of industrial workers (which is not affected by this parameter), you do not appear to be experiencing anything out of the ordinary.

Thanks for testing the new beta!

sumwonyuno

#178
Oh, that parameter.

All three city tiles are victims of the aftermath of removing the Residential Halver mod.  Census repository shows messed up stats in all three.  I've actually tried the CAM/Simcity_1.dat patch thing, it does fix the workforce and residential capacity, but commute patterns are virtually the same.

Left city tile:

Taxes:  R$, CS$, CS$$, I-Ag, I-D, I-M @ 9.0%, the rest at 15/20% to discourage them

Middle city tile:

Taxes:  Generally <=9.0%, but CS$$$ at 9.9%

Right city tile:

Taxes:  All 9.0%

The industrial along the shore include all the three types.  There might be an over-supply of manufacturing, but all three industries have many vacant jobs.  Commuters not taking industrial jobs is something I've always experienced throughout playing SC4.


The City & County of Honolulu, a Mayor Diary based on Honolulu, Hawai'i.

mark's memory address - I've created a blog!

z

I think that first graph tells the whole story.  But your tax policies have created that situation.  So I don't think there's anything to blame beyond the tax policies here, unless you change them and still have a problem.