• 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 4 Guests are viewing this topic.

ldog

Quote from: SC4BOY on November 01, 2009, 07:30:01 AM
Don't forget the "across the border" commuters .. and especially if your network design allows "commuter loops" you can have HUGE commute times

I didn't but once they are in the tile don't they follow the same rules as trips that originate inside the tile?

z

Quote from: ldog on November 01, 2009, 06:56:51 AM
Ok, what I don't really get is how in Z you could ever not be able to find a valid route.
Valid route defined as "A there and back route you can complete without running out of time"

In Simulator Z v1.2, about the only way you can't find a valid route is if there is none - e.g., there aren't enough jobs for your particular wealth level of Sim.  This concerns commuting within a single city.  Between multiple cities, it should still work this way; Sims have been observed commuting across four large city tiles in Simulator Z.  But for a more definitive answer, I (or someone else) will have to do a lot more testing; my current region doesn't qualify, because it was built with CAM when there was no known solution to the CAM demand bug.  I would have to build a whole new region, which I hope to do someday, but which will take months on my schedule (assuming I am doing no development work or posting).

There are other factors in the traffic simulator besides maximum commute time and the pathfinding heuristic that can prevent you from finding a valid route, even when one exists.  From my experience, I think I have fixed them all in v1.2, but it will be a while before I can say that for sure.

For those who question how realistic this commute model is, I will be addressing this issue (complete with documentation) in the post where I publish my latest test results (which are turning more and more interesting).

Quote from: SC4BOY on November 01, 2009, 07:30:01 AM
Don't forget the "across the border" commuters .. and especially if your network design allows "commuter loops" you can have HUGE commute times

Quote from: ldog on November 01, 2009, 07:47:22 AM
I didn't but once they are in the tile don't they follow the same rules as trips that originate inside the tile?

Since commute time is reset whenever a Sim crosses a tile border, these commuters don't form a special case as far as commute time is concerned.

SC4BOY

Quote from: z on November 01, 2009, 11:10:42 AM
Since commute time is reset whenever a Sim crosses a tile border, these commuters don't form a special case as far as commute time is concerned.

I speculated on this.. so when a commuter is "thrown over the border" he is automatically judged to  have "found a job"?

ldog

Hey stupid question.
Z 1.2 is what is in the current NAM download right?

z

Quote from: SC4BOY on November 01, 2009, 01:47:50 PM
I speculated on this.. so when a commuter is "thrown over the border" he is automatically judged to  have "found a job"?

Correct.

Quote from: ldog on November 01, 2009, 02:06:47 PM
Hey stupid question.
Z 1.2 is what is in the current NAM download right?

Not a stupid question at all, especially since the answer is "no."  It will be in the next NAM release.  However, it's such a big improvement over the previous version that I'm recommending it to all Simulator Z users; you can get it here.

xxdita

#265
Quote from: z on November 01, 2009, 02:22:43 AM
I appreciate your contributing here, Nate, especially as I consider this a real opportunity to talk to a very skilled player who is quite enthusiastic about Simulator A.  This most recent discussion started out with some tests trying to determine what the differences between Simulators A and Z actually are in a quantifiable way.  The general subject of this thread is the development of Simulator Z, as I'm always looking for ways to improve it.  I'd like to ask you a few questions here, basically for research purposes.  You are obviously quite happy with your current simulator, and I assure you that I am not here to debate you on any points.  But I think that knowing what a player such as yourself looks for and likes in a simulator could be very useful information for further simulator development, especially since you have gone to the trouble to design your own simulator.  So if you wouldn't mind answering the following questions, I would be very grateful.  And this is a one-time request; I do not intend to turn this into a discussion.

You've obviously used other traffic simulators.  Could you please list which ones (and the capacity levels, where appropriate it?)

If the above list contains the Low version of Simulator Z, what didn't you like about it?  (Again, there will be no response from me.   $%Grinno$%)

All the simulators I've used since joining Simtropolis in 2003?
I'm quite sure I've used all of them at one point or another. Better pathfinding, perfect pathfinding... once I found CAM, I tended to use Promote Cycling. Most of the time I played using the sim allowing for the highest capacities. Since Simulator A's release, though I continued testing newer sims, nothing's panned out for me. Sorry, I can't give you specifics on your own sim, but I just don't remember the details. i'll probably be looking into it again soon though.

QuoteWhat do you see as the biggest strength(s) of Simulator A?

It's more balanced, for a fairly realistic style of gameplay. Jason took the traffic sim back to Vanilla and started from scratch, using more of an evidence-based practice to decide which changes needed to be made, one at a time, and to what extent.

QuoteWhat are the problems with other simulators that you referred to?

Too many commuters leaving town, speeds/capacities too high or low... Have you looked at or tried to use the traffic sims that came with the CAM installer? You'll see what I mean.

QuoteWere you ever able to build large cities (1 million Sims or more) on large tiles with Simulator A that had no abandonment due to commute time?

99% of what I build are large Metropolis cities. A large tile with only 1 million people on it means I'm probably less than 20 years into the city. I have medium tiles at 3,850,000 Sims. The most populated large tile I have played lately is closer to 12 million right now.
I'd have to say that the only times I've experienced any serious abandonment issues has been when going back into a city that was started using an older traffic sim.

Quote
Which factors led you to design your own simulator, and what does it do?

I've been tinkering around with traffic sims since I learned how to use Reader.

The reasons for this specific traffic sim being developed all had to do with my style of play, and figuring out what kind of traffic sim will be needed for at least one version of CAM 2.0. I generally only use it for large tiles, though I've tested it on medium tiles with fairly good results. It can lead to more commuters leaving town than I like, especially in a city's early growth.
The first changes were to the capacities of the networks I actually use. Once I figured out how to use the Street Addon Mod, it frustrated me when all the work I had done would be pointless as soon as an upper stage building was grown. Now, it's not necessary to upgrade. I've also upped the capacity of avenues and subways, which serve as the primary arteries
of my cities.
I've adjusted some speeds a little here & there...
walking is 7, and subways 220. (Major emphasis on mass transit)


Of course I've also had to remod some subway & bus stations to take full advantage of the new capacities.

New Capacities:
10800,13500.10800,10800,0,0,32000,13500,13500,10800,10800,10800

Simulator A Easy Capacities:
5600.13500,10800,2250,0,0,5600,13500,13500,13500,5600,10800,10800

QuoteWould you be willing to attach a copy of your simulator to your reply?  I always like looking at other simulators...  ;D

It's still a work in progress, designed for use with another work in progress (CAM 2.0), as well a mod I've been working on, and not intended for distribution... but I don't have a problem with that.

QuoteThe new tests I am currently running have been designed to separate out many of these factors.  It appears that the PH is involved a lot more than anyone thought, including me.  Part of the reason that this has been missed is that the PH affects congestion, which of course affects commute time.  So the utlimate effect may be that the Sims do exceed their maximum commute time, but the original cause of all this may be that the PH is too high.

There's not enough data at this point from your old city to say how much of a part the PH played.  (Unless you've still got the old CAM version around, which I realize is pretty unlikely.)  However, the experiments I'll be displaying in the next day or so should give a good idea of how this functions in general.

Thanks for taking the time to read this, and thanks for whatever input you can give.

Not a problem. Truth be told, had I not been invited to join BSC, I probably would've ended up being a gearhead like you guys...

Remind me to thank  Barby & Tage for the intervention.

- Edit... forgot to attatch the file...

RippleJet

Quote from: xxdita on November 02, 2009, 12:40:45 AM
Remind me to thank  Barby & Tage for the intervention.

Thank you for joining!

ldog

D'oh!
Lot of files in there Steve.
Is there a breakdown of what's what somewhere?

z

Well, you've got your four capacities, which are documented in the NAM, plus two variations.  Files with "_ZP_" in their names are Park & Ride - I don't think you want that.  And files with "BTM" in their name are for the Bullet Train Mod.

ldog

Quote from: z on November 03, 2009, 05:27:03 PM
Well, you've got your four capacities, which are documented in the NAM, plus two variations.  Files with "_ZP_" in their names are Park & Ride - I don't think you want that.  And files with "BTM" in their name are for the Bullet Train Mod.

LOL, yeah I couldn't for the life of me figure out what BTM meant. I was guessing the ZP was park&ride, but I wasn't sure.
I actually am interested in the p&r, I haven't bothered to mention it in discussion because I've got enough on my plate at the moment (and then some) but I find the concept quite intriguing.

Of course now I have to go look at Nate's traffic sim too, so much to do, so much to see. :D

And thanks Nate and Tage for making me go blind :P

pierreh

Meanwhile... over a week ago the Z Euro Simulator was presented, and we were asked to check in particular the bus usage.

I ran a comparative test with the Z Euro High and the Z Standard High, on the same city. At the start of the test the population of the city is a bit over 214k sims; this is an unfinished city in the sense that there is still plenty of room to expand it, however what there is of it is fully functional. Originally public transportation was essentially bus, with a bit of railroad (playing a relatively minor role). Recently I started to implement a GLR network in the city. Both tests were run for the same duration, 6 years and 4 months - this is because the first test had to be stopped after that much game time. It may be not enough to verify the effect of applying the Euro simulator. Aside from building two additional medical centers because the nurses gave me a hard time, I did not interfere with the city during the tests.

Here are, one below the other, some pictures of the 'standard' test and the 'euro' test:

Travel Time graph





Bus volume





GLR volume





Bus, GLR and passenger train density





The most visible difference seems to be that of the travel time – to the extent where the graph can be trusted. Travel time with the Euro Simulator is somewhat less than with the Standard one. Otherwise, the pictures and graphs are quite similar. At the end of the tests, the values for the bus and GLR densities are identical with both Simulators.

The volumes may not be sufficient to show significant differences in bus usage (and in GLR usage). I have another larger city with a subway network and buses, on which I could run the same series of tests – if possible for a minimum of 10 years (even though it is boring to just watch the calendar run, without any intervention).

z

Thanks for the testing, Douzerouge!  This is the first feedback I've received on this simulator.  The results were quite surprising.  I had expected a fair increase in bus usage, or at least some, but there really was none at all in your tests.  This could partially be due to the layout of your city and the way your subway lines run, but there should still be a noticeable increase.  And your city size is certainly big enough.  The only explanation I can think of is that the average length of a bus trip in your city is small enough so that the changes I made (which I just verified) weren't sufficient to make an impact on bus usage.

Quote from: Douzerouge on November 05, 2009, 12:19:10 PM
The most visible difference seems to be that of the travel time – to the extent where the graph can be trusted. Travel time with the Euro Simulator is somewhat less than with the Standard one.

What the graph says makes sense, although it's not terribly accurate.  Bus speeds have been increased, so the Sims who take buses have shorter commutes.  Yet this wasn't enough to cause more Sims to take buses.  But the shorter bus commutes should have an impact on average commute time, and it appears that they did.  This would seem to say that we're on the right track; the speeds just need to be raised a bit more.  This whole process is nonlinear; there's a point where the speeds become high enough for the average trip that there's a large movement to buses.  We may not be far from that point; we'll see.

QuoteThe volumes may not be sufficient to show significant differences in bus usage (and in GLR usage).

They should be - I don't think another test is needed.  The fact that there is no increase at all in your Traffic Volume Graph says that the changes I made were insufficient, even though they might show up somewhat more on larger cities.  So I've made another version of the Euro simulators, with significantly bigger changes.  I'd appreciate it if people would try these out, and report back their findings.  These new simulators should definitely make a difference - if anything, I may have overshot a bit.  Only testing will tell.

Douzerouge, your pictures were very helpful.  The only request I have concerns your Traffic Volume Graph.  Next time, could you please include cars as well?  Thanks!

pierreh

I will use the latest version of the Euro Simulator from your last post, in the other, larger, city I was mentioning last night, and do another comparative test. This will however be delayed because of many RL activities - not a few of which, incidentally, have to do with public transportation issues.

schack

#273
Hello

I'm for some reason having troubles with Traffic Simulator Z, both v1.1 in the NAM install and the v1.2 beta3. For both of them I've used Ultra until I know how it works.
Now, the problem is quite simply that people forget where they work. I have my city split in a city (well, town for now) in the south east corner with residential and commercial areas and the industry (dirty and manufacturing) is located by a river on the west side of the map as illustrated here:

The pink circles are tunnel entrances.

For starters there was a nice rural highway between the areas and about a thousand people were commuting without issues. Then after adding some commerce in the centre of the city, some people went to work there and the rest just forgot they had a job at the industrial site and complained about a lack of jobs. So I built the northern most RHW to the industrial area and all was well in tiny town again. Now 2k people commuted via this road and things were looking bright. Adding a bit more commercial zones in the centre of town and the same thing repeated. Some people go to work there, the rest forget they work at the industrial site.
From 2k to 0 flat in a matter of months.

I've had this issue in previous cities as well and it seems pretty consistent. If I make a residential neighbourhood some way away where they aren't likely to get within easy reach of commercial development they'll stick to working at the industry, but it seems to reset every time they get close to commercial zones and I'm completely lost as to why. I like the concept of Sim Z a lot because it allows me to play with split neighbourhoods and if there is a job, they will find it.
But alas, while having some 4.5k jobs at the industry and people not filling them leaves me quite perplexed because this shouldn't happen. Even less so as they seem to just abandon their jobs and then whine to the mayor.

I hope someone has a clue as to what on earth is going on.

Edit:
To be on the safe side, since I'd already sent my complete plugin package to a friend so he could get an easy start on the game, I decided to also send him my region and have him run it for 10 years, just in case it may be my aging laptop being the culprit. Alas it wasn't.
I should add, that seeing as 99.9% of people seem to run Sim Z just fine, I don't exactly think it has to do with it, but perhaps something interacting with it in weird ways, and I reckon people reading this thread are generally the most knowledgable and can hopefully aid.
Also, after the original post, I decided to add another residential area smack bang in between my town centre and the industrial area, connected solely to the RHW4 running between the two latter. As expected and hoped, most of the workforce picked up a job at the industrial area. Oddly enough, about 15% couldn't find a job while their neighbour connected to the same stretch of street could. Not entirely sure what went wrong there. A total of 1009 people commuted to the industrial area.
Sadly as expected as well, after adding 3 commercial buildings in the town centre, 2 (two!) people from the new neighbourhood got a job in town, which meant that over the next 6 months, the remaining 1007 people slowly decided to not bother with the trip to the industrial area, instead opting to sit at home in front of the telly, voicing their discontent at the mayor.
I'm really really at a loss as to why this is happening.

Edit 2:
Things are getting absurd now. I severed the connection to my western most neighbourhood and the town centre completely so they could only go to the industrial area, and they duly did. All 2.3k of them. That meant the other neighbourhoods could start working in the city centre, and they quickly occupied all 3k commercial jobs there. I let it run for a few years at max speed and things seemed ok. Then I reattached the western most neighbourhood and immediately (!) they simply kicked out all the others from the commercial jobs in the city centre and moved in, giving up their industrial jobs and leaving the rest of the population jobless and too lazy to go to the industrial area. That really is absurd.
But after running some clean tests on a new map with very few plugins, increasingly adding plugins, I just couldn't reproduce it (despite it affecting my last 3 maps). I start doubting I'll ever figure out what's causing it.

ldog

Out of curiosity...
I know it's generally assumed (by me as well) that the starting trip costs only changing walking and car will have any effect, because as stated (I think by Mott as usual) "those are the only 2 types generated by residential".
I'm wondering if anyone actually tried messing with them?
If the engine actually applied them when it started calculating that leg of the trip that involved said MT, then we could bias one form of MT over another.

z

@Schack:  Have you tried Simulator Z v1.2, available here?  It's not in the current NAM, although it will be in the next one.  It offers various improvements in general, but it has also fixed problems for a few people that sound an awful lot like yours.

Quote from: ldog on November 06, 2009, 12:48:24 PM
Out of curiosity...
I know it's generally assumed (by me as well) that the starting trip costs only changing walking and car will have any effect, because as stated (I think by Mott as usual) "those are the only 2 types generated by residential".
I'm wondering if anyone actually tried messing with them?

Yes, I did.  As Mott implied, other types have no effect whatsoever.  When Sims leave their houses, they do so either by walking or using their cars.  Even if a transit stop is right in front of a Sim's house, the Sim has to walk to it - one tile needs to be crossed.  So these are the only possibilities for starting a trip.  And as Mott and I found, "starting a trip" means starting it from the beginning, not just a segment of it.

schack

Yeah, I'm using 1.2 beta 3.

What I did notice though, was that when building a city from scratch and starting with pretty much nothing but NAM and then adding all my plugins after a bit, it seemed to work perfectly. So I think I'll just do that from now and then pray to the higher computing powers. It's really puzzling, but with this many plugins it seems virtually impossible to figure out.

z

Quote from: schack on November 06, 2009, 01:30:04 PM
Yeah, I'm using 1.2 beta 3.

Ah yes, you mentioned this at the beginning of your original post.  I guess it just didn't register.  Sorry about that.  &mmm  But you've now come up with what I think is the crucial information:

Quote
What I did notice though, was that when building a city from scratch and starting with pretty much nothing but NAM and then adding all my plugins after a bit, it seemed to work perfectly. So I think I'll just do that from now and then pray to the higher computing powers. It's really puzzling, but with this many plugins it seems virtually impossible to figure out.

This would definitely tend to say that it's not a simulator problem.  But don't give up yet - there are only a few plugins that can result in this type of problem, and they're all in the "mod" category.  Your city may need to reach a crucial size before they start interfering with the simulator, which would be why you don't see this in a new city.  So, do you have any traffic mods installed?  Or any mods that affect demand?

If the answer to both of those questions is "no," then try restoring half your mods at once, and see if you get the problem.  (This can be done in existing cities, since mods don't involve lots.  I'd recommend trying this in the city that's giving you problems.)  If you do, remove half of the mods and try again.  If you don't, put in half of the mods that you didn't choose the first time and see if you get the problem.  Repeat until the culprit is found.

schack

Hehe, that's actually exactly what I was doing and how I caught that part.
I'd started out a new city in a test region with just NAM, built it up to 20k and then started moving in plugins slowly. After restoring half my plugins and still not seeing an issue, I decided to restore them all... and I couldn't replicate the problem. Mind you, my city started messing up already at 8k inhabitants but just basically kept it up.

What I've done now is Obliterate it and start again with nothing but NAM/SAM/RHW, and following the contours of the land from my previous settlement, recreate my transport network. Then restore all plugins and go ahead. And it works, the city's flourishing and people are driving where the jobs are, preferring closer jobs but certainly not unwilling to commute to the riverside industrial area. So with this workaround I'm a happy man.

And that's why I said I doubted I'd ever find the true reason for this, because that would mean I would have to build a city from scratch for each and every plugin I have :O

But it's interesting in that it seems something can mess up the traffic sim when you start a game, but not in a running game...

Pharaon-Kheops

Little question, Schack: you do not mention the CAM at all does this mean that do not use it? (I have the same problem as yours, so I try to find similarities and differences)
"to be is to do" - Kant
"to do is to be" - Sartre
"to be or not to be" - Shakespeare
"to be do be do" - Sinatra