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

z

Quote from: ldog on October 22, 2009, 11:19:33 PM
At the moment I am testing just because I want to see what kind of difference bus adding to congestion vs bus not adding to congestion makes. If you have detailed data you want to share I'd love to see it but your last example of a screenshot of 2 different simulators that work very differently from each other is not the answer I am looking for.

I understand - I was just trying to show relative appearance.  But that doesn't answer the question you're asking here.  I did those tests, but unfortunately, I did not keep screenshots of them.  However, the results can be summarized as follows:  In simulators other than Z, traffic congestion shoots up dramatically on major routes; overall congestion gets much worse.  It was bad enough that I thought that this feature would never work.  However, eventually I did get it to work.  The result was that in Simulator Z, congestion was the same whether or not buses contributed to traffic.  How can this be?  Investigation showed that the pathfinder simply spread out traffic a bit more to reduce congestion, and did it in a way that wasn't noticeable.  The Z pathfinder is set to be very smart, so this wasn't hard.

QuoteOf course now the idea has formed that I should test all the traffic simulators, not just about the bus thing but about how they work overall and do a comparison.

Here I can help you a lot more.  It is generally acknowledged (including by Jason) that Simulators A and B are very similar in their performance.  I have also verified this myself.  So I did extensive comparisons of Simulator Z against Simulator A, and recorded the results in this post.  This is an extremely important post, as it graphically illustrates all sorts of comparisons.  And although the title says it's the Beta 1 version of Simulator Z, no bugs were ever found in it, so it eventually became the release version.  The version of Simulator A that I tested against is the one currently in use.  You may also find the post following that one useful as well; it's a report from my main tester.

QuoteWhat I was asking was A: If any of you know how long a "game day" is and B: does the "game day" have anything to do with the "commute day"

What you're calling a "game day" is a somewhat arbitrary unit of time, especially since you can speed it up and slow it down.  You are correct in that it has nothing to do with the commute day.

But here's a surprise:  There actually isn't a commute day!  The Sims don't go from their houses to work and back every day or every time period or whatever.  They never go anywhere.  The game simply calculates what things would be like if they did, and then uses those calculations at various other places in the game (such as the automata).  But the traffic simulator just calculates a set of paths every few months, and leaves it at that.  No commuting actually happens.  For more details on this, you can see this post.

ldog

Quote from: z on October 23, 2009, 12:50:22 AM
I understand - I was just trying to show relative appearance.  But that doesn't answer the question you're asking here.  I did those tests, but unfortunately, I did not keep screenshots of them.  However, the results can be summarized as follows:  In simulators other than Z, traffic congestion shoots up dramatically on major routes; overall congestion gets much worse.  It was bad enough that I thought that this feature would never work.  However, eventually I did get it to work.  The result was that in Simulator Z, congestion was the same whether or not buses contributed to traffic.  How can this be?  Investigation showed that the pathfinder simply spread out traffic a bit more to reduce congestion, and did it in a way that wasn't noticeable.  The Z pathfinder is set to be very smart, so this wasn't hard.

After having some time to think more about it (and probably more importantly get some sleep) I do realize it is a lot more complex than just "the congestion on this segment the buses run along will change if you toggle them causing congestion on or off". Indeed the engine is going to recalculate every single stinkin route for everything because of the domino effect. So I understand what you are saying.

Quote from: z on October 23, 2009, 12:50:22 AM
Here I can help you a lot more.  It is generally acknowledged (including by Jason) that Simulators A and B are very similar in their performance.  I have also verified this myself.  So I did extensive comparisons of Simulator Z against Simulator A, and recorded the results in this post.  This is an extremely important post, as it graphically illustrates all sorts of comparisons.  And although the title says it's the Beta 1 version of Simulator Z, no bugs were ever found in it, so it eventually became the release version.  The version of Simulator A that I tested against is the one currently in use.  You may also find the post following that one useful as well; it's a report from my main tester.

Thanks. I had read that discussion, but I needed a reminder that it was there. It actually does save me a lot of trouble. Indeed I have been going back over and rereading a lot of the earlier discussions because now knowing a bit more about what is being discussed makes what I am reading more understandable. It is also becoming easier to figure out the timeline a bit and sort which are things that have been proved or disproved. The hardest thing about getting good information around these forums is the fact that there are years of relevant posts to go through and one has to very carefully check the dates of the posts they read; especially when you are comparing multiple threads about similar topics.

Quote from: z on October 23, 2009, 12:50:22 AM
What you're calling a "game day" is a somewhat arbitrary unit of time, especially since you can speed it up and slow it down.  You are correct in that it has nothing to do with the commute day.

But here's a surprise:  There actually isn't a commute day!  The Sims don't go from their houses to work and back every day or every time period or whatever.  They never go anywhere.  The game simply calculates what things would be like if they did, and then uses those calculations at various other places in the game (such as the automata).  But the traffic simulator just calculates a set of paths every few months, and leaves it at that.  No commuting actually happens.  For more details on this, you can see this post.

??? You can go from paused to cheetah, but that does not change how long it takes the game to advance 1 day, it only changes our perception of it. Or to put it another way how it relates to the real world of the player but it does not change internally how long it takes (relative to everything else in the game).

Read that post too, also a very good read and worth rereading. Really when you think about it in those terms; basicly NOTHING ever happens in the game LOL.
There aren't even any sims for that matter (compared to say Children of the Nile where the automata actually are "real" in the sense of how they interact with the game engine). It is all a kind of smoke and mirrors trick to make it look like there is a game. There is no game. Very Zen.

You're right of course. Although of course now I wonder just exactly what is the interval for traffic engine updates. I know you said 4 months in that post but it surely must be more often than that. I am just trying to get my head around things from the ground up.

So to add more to my "why" I can say what started as "what can I do with the traffic simulator to improve my game" has turned into "what can I do with the traffic simulator, just to see what can I do with the traffic simulator". I am finding the traffic simulator itself is very interesting.

z

Quote from: ldog on October 23, 2009, 11:09:29 AM
After having some time to think more about it (and probably more importantly get some sleep) I do realize it is a lot more complex than just "the congestion on this segment the buses run along will change if you toggle them causing congestion on or off". Indeed the engine is going to recalculate every single stinkin route for everything because of the domino effect.

That's close, but there is no domino effect.  Instead, the finite state machine runs in parallel, computing new routes across the game based on old routes.  The results of the new route calculations don't affect the calculations of other routes in the same pathfinder run.  However, in order to avoid the herding effect, where the pathfinder would independently decide that the same route is best for lots and lots of Sims, thereby ending up with a lot of congestion on that route, the pathfinder will only increase the amount of traffic on a given route by a certain amount during any given run.  As a result, when major changes are made (such as switching simulators), it will take about five years for the traffic simulator to complete its rerouting, with the delayed routing part happening in chunks approximately 11 months apart.  This shows up as a staircase effect on the Traffic Volume Graph.  Combined with the route invalidation and adjustment that happens before this period, you get the eight years that I mentioned earlier.

Meanwhile, although many routes remain uncalculated during this time, the Sims still have jobs, and the query tool simply shows their old routes.  Yet at the same time, the volume will be shown realistically (which may as low as zero) on the affected networks.

Quote??? You can go from paused to cheetah, but that does not change how long it takes the game to advance 1 day, it only changes our perception of it. Or to put it another way how it relates to the real world of the player but it does not change internally how long it takes (relative to everything else in the game).

True, but the vast majority of the time is just spent running the automata all over town.  There are obviously various other things that happen other than the traffic simulator, but they typically don't take much time.  That's why cheetah mode can run so fast.

QuoteYou're right of course. Although of course now I wonder just exactly what is the interval for traffic engine updates. I know you said 4 months in that post but it surely must be more often than that. I am just trying to get my head around things from the ground up.

It's easy to verify that traffic simulator runs are many months apart; the effect is most obvious, once again, in large cities.  If you run your city in Cheetah mode, you'll notice that every few months the game slows down.  That's the traffic simulator kicking in.  There's a more precise way of seeing exactly when it runs, and again it works best in large cities.  Use the route query tool to check the volume of a number of routes.  When the traffic simulator runs, most of these volumes will change at least a little bit.  But you'll find that they don't change at all for months at a time, because the traffic simulator doesn't run then.

ldog

 &idea Oh wow, that last post really made things click.
I know you are reiterating what you said in http://sc4devotion.com/forums/index.php?topic=2763.msg177981#msg177981 which I did read a few weeks before I made my first post. The problem was that then I was really not in a position to understand the impact and implications and the sheer volume of information I was trying to go through just made it impossible to digest it all clearly (not to mention I was putting myself through a lot of sleep deprivation).

Also like I said above having gone back and reread those 2 posts you linked as well as a few others, and also reading some of the linked posts that I hadn't read as well I did gain a lot more understanding. I can also see why some of my questions didn't seem to make much sense...sometimes I can be a little dense...but I also try to look at things from a lot of different angles.

Z, thanks for indulging me. Thank you Jason for taking an interest as well. I have actually learned quite a lot more with our few days discussion than I could have alone with the editor in weeks.

I've also got some great ideas that are starting to form into a more concrete plan of how to proceed. But right now I've got quite a bit of reading to catch up on so it'll probably be a while before I bug you with anymore questions  :D

jplumbley

Quote from: ldog on October 22, 2009, 11:19:33 PM
One thing I did pick up pretty quick is that A hates the bus. My entry cost for this test is .02 which is actually .96/48 hmmm...how did I get that number...oh...yeah..J's bus speed on street was 35, which gives .027 and I just decided to round it down for some reason. Anyway that should work fine. Of course A has a much higher starting cost for car prefered (his is 1.75, mine was .1 I'm sorry I forget what yours was and I don't have it handy at the moment) and then the bus speed is slightly slower so he has depriveledged the bus quite a lot. Now I know when I was playing with Z-low they love the bus.

Alright, I have done a couple things that may affect this a little bit.  First was I cut both Car and MT preffered penalties from 1.7 to 0.85.  This shouldn't change much, but may allow more "Car Preferred" traffic to take the bus and more "MT Preferred" traffic to take the car, which in esence may just balance out and do nothing really.  The second thing I changed was the speeds of buses, and I equalized them on all networks to Cars.  This will make it so there is no preference from speed either way.

So, attached is a test version for ldog and whoever else would like to test it and see if it promotes more bus traffic.
"You learn something new everyday."

http://img517.imageshack.us/img517/169/nhpjplumbleykv3.gif
Bringing the new horizons closer to reality.

Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio jplumbley ♦ moganite ♦ M4346 ♦ Dedgren ♦ Ennedi Shadow Assassin ♦  Tarkus ♦ wouanagaine
Street Addon Mod - SAM

ldog

Quote from: jplumbley on October 23, 2009, 05:40:30 PM
Alright, I have done a couple things that may affect this a little bit.  First was I cut both Car and MT preffered penalties from 1.7 to 0.85.  This shouldn't change much, but may allow more "Car Preferred" traffic to take the bus and more "MT Preferred" traffic to take the car, which in esence may just balance out and do nothing really.  The second thing I changed was the speeds of buses, and I equalized them on all networks to Cars.  This will make it so there is no preference from speed either way.

So, attached is a test version for ldog and whoever else would like to test it and see if it promotes more bus traffic.

Cool I'll give it a whirl. Although like I told you in PM, I really don't think it was inappropriate that they hated the bus. As Z points out my 100k pop city is not a proper testbed for anything yet.

Also as it is past time for Z to show us the door for being offtopic and he has really been a good sport about it, I went ahead and started a new thread:
http://sc4devotion.com/forums/index.php?topic=9179.0

Please Z, J and anyone else interested don't be a stranger, drop in and leave your comments.

z

#226
And now we return to our regular programming. :)

I've mentioned earlier how the NAM Tool is going to have many options for adjusting parameters that are safe for players to adjust.  Some of these are more important than others.  One of the most important is the Bus Multiplier, which will affect the proportion of buses to cars in cities.  In Simulator Z, Sims will pretty much automatically use any rapid transit that is built, since it's generally the fastest form of travel.  This is one way that mayors can differentiate, for example, American cities from European ones.  But right now, there's no way for the player to adjust the proportion of buses to cars.  The Bus Multiplier feature will solve that.  However, what's the ideal value of the Bus Multiplier for a typical European city?  The NAM Team is currently looking into revising the traffic simulator selection process by using a wizard-style interface.  So, for example, you would specify whether you were going to be building American or European style cities, and not have to worry about the Bus Multiplier.  For this to work, I need to know what's considered fairly standard for a European-style city, and I ask your assistance in determining this.  Attached to the bottom of this post is the first release of

Simulator Z - The European Version

I would appreciate it if people building European-style cities (especially Europeans :)) would give this simulator a try and let me know what they think of the bus usage.  If you think it's somewhat off, please try telling me by about how much, and in which direction.  Also, if people in other parts of the world think that a different setting is needed for their region, please let me know, and please give me an idea of what seems right (i.e., 20% more buses, etc.).  We are trying to make as many choices available as possible in as simple a way as possible.

An interesting property of the European version is that while buses still contribute to traffic and congestion, they now do so less than cars.  It's very much in the spirit of this simulator.




And now for something completely different.  Some people have found that Simulator Z (Low) is too easy for them, and they want something more challenging.  For these daring souls, I present

Simulator Z Classic

This version of Simulator Z has the low capacities of the original Maxis simulator, but without the bugs.  The capacities have been adjusted slightly so that the simulator is completely compatible with NWM; it is compatible with RHW as well.

Since the bugs in the original Maxis simulator are not present here, you no longer get situations where users exclaim, "My Sims are so stupid, they couldn't find a job if their lives depended on it!"  Instead, if you run this in a big city, you get traffic jams.  Big traffic jams.  HUGE traffic jams.  In fact, this simulator allows you to create the worst traffic jams of any traffic simulator in SC4.

Why is this?  In all the other low capacity simulators, excessive congestion leads to abandonment.  So you can't have really big cities with low capacity simulators; Sims will abandon them.  But does bad traffic lead to people abandoning Los Angeles in droves? Or New York?  Or Chicago?  Or London?  Or Paris?  No, people just sit in traffic all day.  And now your Sims can too!  Watch your transportation advisor go absolutely apoplectic as your streets turn to red, your roads turn to red, and your avenues turn to red.  And yet your city will still function, just like the major cities I listed above.  Of course, how well it functions depends on you.  So for those who like a challenge, check this one out!

And for smaller cities and towns, the NAM Tool will allow even lower capacities.  Until then, you can have quite a bit of fun with Simulator Z Classic.  Please let me know what you think of it.  ;D

sumwonyuno

Simulator Z Classic is evil, but delightfully evil because there's none of that mass abandonment that I had back in the day.

What congestion view level should it be to use classic?

I've chosen Low congestion view.  Before I unpaused, the city tile had been running with Simulator Z Ultra.

Here are the results:
Initial Conditions with Ultra:




About 2 years in with Classic:




After 10 years with Classic:






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

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

z

Quote from: sumwonyuno on October 25, 2009, 10:18:00 PM
Simulator Z Classic is evil, but delightfully evil because there's none of that mass abandonment that I had back in the day.

Yes, that's exactly the point!  ;D

QuoteWhat congestion view level should it be to use classic?

That's a good question.  Technically, it should have its own, and if people like this, I'll make one for it.  In the mean time, the "Standard" data view, which was designed for the Maxis simulator, is almost perfect.  "Z_Low" is actually much too high.

And of course, you're actually referring to the volume data views, as I can also tell from your pictures.  As you can see, the congestion data view is automatically set correctly.

sumwonyuno

Heh, now traffic volume view with the Standard View is much more red.  I'll be testing with Classic across my region to to how it works out in getting commuters to where I intend them to go.

For Honolulu "metro" commuters, ~10% take TheBus, 15% carpool, 7% walk, 2% bike, and the remaining ~66% drive alone.  I'm guessing, though, it's still American in terms of commuter travel type percentages.


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

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

z

#230
Quote from: sumwonyuno on October 25, 2009, 11:30:50 PM
I'm guessing, though, it's still American in terms of commuter travel type percentages.

That's right.  But we wouldn't want our European friends to feel left out, would we?  So here is

Simulator Z - The Classic European Version

:D $%Grinno$% :D

Note:  This simulator is not in compliance with the Simulator Reduction Act of 2009.

pierreh

I will download and test the European Z simulator (non-standard) as soon as I have some time for it - this week is very loaded with RL duties so it will take a while, but I'll report my findings.

Meanwhile, if various people could contribute their views on how what is considered as fairly standard for a European-style city (from the point of view of using mass transit etc - traffic simulator-related facts), I for one would be interested to read about them. Time allowing I will put in my two cents' worth into that issue.

NBAFAN

Where do I put Simulator Z Classic?  Do I put it in the NAM folder or the NAM\Plugins folder?  Do I have to get rid of the other Sim. Z file?

z

You put it in the NAM folder, and move your other traffic simulator to a safe place outside your Plugins folder, in case you want to restore it.  If you want an accurate Data Volume View to go with the new simulator, you should use the "Standard" view from the NetworkAdddonMod Volume Data View and move the existing Volume Data View out of the way.

NBAFAN

QuoteIf you want an accurate Data Volume View to go with the new simulator, you should use the "Standard" view from the NetworkAdddonMod Volume Data View and move the existing Volume Data View out of the way.
Is this included with the June2009 NAM?

z

Yes, the proper Volume Data View is automatically added depending on which traffic simulator you choose.

You could also simply rerun the NAM installer and choose Simulator C (Standard), which is actually the Maxis simulator.  This will automatically get you the correct Volume Data View, and this has the advantage that it will include the new Subway and Subway Building views as well, both tuned for Simulator Z Classic.  It's actually a somewhat better approach than the one I first mentioned.

Shadow Assassin

#236
Bwahahahahaha!

Sim Z Classic is PERFECT. I want traffic jams in my lovely rural towns.  ;D


By the way:

QuoteAlso, if people in other parts of the world think that a different setting is needed for their region, please let me know, and please give me an idea of what seems right (i.e., 20% more buses, etc.).  We are trying to make as many choices available as possible in as simple a way as possible.

Australia is approximately halfway in between the Americans and Europeans when it comes to transit mode usage, though buses are used more commonly than rail (the next most common), cars are the most common, probably about 40-50% use cars.

I don't know yet what the usage percentages for bus/rail/etc break down into, so I'm not sure if that's basically identical to Sim Z Classic. :P
New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dedgren ♦ dmscopio ♦ Ennedi
emilin ♦ Heblem ♦ jplumbley ♦ moganite ♦ M4346 ♦ papab2000
Shadow Assassin ♦ Tarkus ♦ wouanagaine
See my uploads on the LEX!

jplumbley

Quote from: redraider147 on August 26, 2008, 02:43:36 PM
ok so lets bring some of my test results to the public....

1. one interesting side effect that i've been able to reproduce over and over again is that my game and cities load twice as fast (if not faster) than before when i was using the NAM traffic simulators...curious...it was the only thing changed.

2. while commute time dropped only slightly over NAM simulator AP, traffic volume decreased, congestion decreased, and population increased. how if all my transportation volume categories decreased is my population rising?

3. my population is increasing, but the amount of abandoned buildings is increasing (all due to commute time)...weird...and commute times are decreasing from before...

4. one curious thing i noticed is that my sims take the freeway to work, but not home...ramps are exactly the same on both sides as i use the feeder road system. they all want to take avenues home from work...

5. is there a park and ride aspect that i might be missing? that seems like it should be my problem...it looks like what happened when i installed the AP simulator and hadn't placed parking garages and lots...


More results to come...

You have the park and ride version installed, you need to place parking garages for Sims to drive to before they reach their destinations.  If there is no parking lots, your Sims will walk to work instead of drive.  Many of your buildings will abandon in this case since they are walking and many of them wont walk past 10 or 12 tiles give or take.  Your population may be rising because the buildings within range of jobs will either rebuild with a higher capacity building or they will just fill up instead of being on 70-80% at capacity.  Your congestion will go away due to the Sims walking.
"You learn something new everyday."

http://img517.imageshack.us/img517/169/nhpjplumbleykv3.gif
Bringing the new horizons closer to reality.

Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio jplumbley ♦ moganite ♦ M4346 ♦ Dedgren ♦ Ennedi Shadow Assassin ♦  Tarkus ♦ wouanagaine
Street Addon Mod - SAM

Shadow Assassin

Just a question - it seems using Z Classic had an unintended consequence: are people supposed to riot as a result of traffic?

Or is this unrelated?
New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dedgren ♦ dmscopio ♦ Ennedi
emilin ♦ Heblem ♦ jplumbley ♦ moganite ♦ M4346 ♦ papab2000
Shadow Assassin ♦ Tarkus ♦ wouanagaine
See my uploads on the LEX!

z

There's not a direct connection between rioting and traffic, although traffic can have an effect here.  Riots occur when the Mayor Rating of one or more tiles reaches -50.  (That's a minus 50.)  The Mayor Rating is affected by all sorts of things; included within these are commute time and traffic noise.  Commute time will definitely go up with Simulator Z Classic, because that's an effect of congestion.  I don't believe traffic noise is affected.  But the traffic factors by themselves are not enough to cause riots; put together, they can drop your Mayor Rating on a tile by 14 points at most.