• 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

Quote from: plutino on January 12, 2010, 06:09:33 PM
My question is, should bus usage be discounted for its contribution to congestions? Say, ten bus usages count as one car usage?  Isn't this more reasonable?

Ideally, yes.  However, this is not possible in SC4, as xxdita has just noted.  We have basically two choices:  Buses can count toward congestion the same as cars, or they can not count at all.  Although neither choice is very good, the second one is actually worse, as it distorts the traffic simulation, since the traffic simulator can stuff an infinite number of Sims into buses with no penalty.  This has a number of various subtle negative effects.

QuoteWith the current 1:1 ratio (I assume), there isn't much reason to use bus to solve traffic problem.

That's actually not completely true.  First, a certain proportion of each wealth level of Sims prefers mass transit, and they pay a time penalty getting to work if there's no mass transit available.  Secondly, buses can be used as feeder lines to rapid transit (subway, commuter rail, etc.), which is much faster than car travel.  Although cars can drive to these places, they need garages or parking lots in order to use them.

xxdita

But would it be so bad if trucks didn't add to congestion?

z

Trucks have added to congestion since the original Maxis simulator.  But here it's a slightly different case.  Trucks don't carry Sims; they carry freight.  And there's a lot less freight than Sims on the roads, so you don't have the 1:1 capacity anomaly that you do with buses.  Also, trucks certainly contribute to congestion in the real world.  So it seems reasonable to me to keep this setting.  I think it adds to the realism of the game; if your trucks are causing too much congestion, you may need to create another route for them.

plutino

Thanks for the explanation.  Actually, I didn't realize that subway needs parking lot for car to access as I always have a bus system before subway. 

Quote from: z on January 12, 2010, 10:14:35 PM
Ideally, yes.  However, this is not possible in SC4, as xxdita has just noted.  We have basically two choices:  Buses can count toward congestion the same as cars, or they can not count at all.  Although neither choice is very good, the second one is actually worse, as it distorts the traffic simulation, since the traffic simulator can stuff an infinite number of Sims into buses with no penalty.  This has a number of various subtle negative effects.

That's actually not completely true.  First, a certain proportion of each wealth level of Sims prefers mass transit, and they pay a time penalty getting to work if there's no mass transit available.  Secondly, buses can be used as feeder lines to rapid transit (subway, commuter rail, etc.), which is much faster than car travel.  Although cars can drive to these places, they need garages or parking lots in order to use them.

z

It turns out that there's another reason to have ordinary bus routes as well.  If the Sims who prefer mass transit use only the various types of rail lines, these aren't road traffic, and so they don't increase the customer count of commercial businesses.  (Even trams aren't considered road traffic.)  But if Sims take buses through their commercial areas, this increases the customer count of the businesses that the buses pass.  This makes the businesses need more workers (technically, it increases their desirability), and so they hire more Sims.  This in turn increases residential demand.  So buses are useful for a variety of reasons - just not exactly the same ones as in RL.

xxdita

Steve, there was a traffic simulator posted to the STEX not too long ago, which allowed Sims to reach their destinations by using the bus (buses would let them off in front). I don't think any other changes were made from the RH traffic simulator, but it is an idea that I haven't seen tested yet.
Have you had a look at it, and if so, what are your thoughts?

z

No, I haven't seen it.  It sounds like it's essentially turning buses into taxis, though.  There is a taxi download on the STEX, where Sims walk up to a taxi stand and then get driven directly to their destination, but it's implemented as cars, not mass transit.  This sounds like the MT version of the same thing.  Buses worked this way in SC3K; that may be where the idea came from.  I think that the current system is more realistic, especially considering that buses are single-passenger and don't stop at intervening bus stops.  If passengers could get off anywhere, they would be just like taxis.  So taxis are there for those who want them; I've actually used them, and I think they work quite well.  But I think it would be best to leave buses as they are.  The current system also allows the players to make some semblance of bus routes, whereas if buses could go directly to the Sim's destination, they could go anywhere on the map.

z

#467
Release of Simulator Z v2.2

Brief Summary:  This release of Simulator Z increases highway usage significantly, making it resemble real-life highway traffic much more closely.  This was done in a way so as not to affect the usage of mass transit.  Both standard and European versions of the simulator are available in the package at the end of this post.

Details:  With the original Maxis traffic simulator, highways were a thing of awe to Sims - they would stand and gaze up at them, but they had no idea what they were for.  This was obvious because except in rare circumstances, they were never used.  Things improved with the introduction of the various NAM simulators, because as pathfinding improved, the Sims became smart enough to see that highways were a fast way of getting places.

However, their usage still remained far below what it is in RL.  Whereas normally highways are among the first routes to get congested, in SC4, if highways were not either on or very close to a direct line of travel, traffic rarely became excessive.  One of the reasons for this was the speed limits on the highways, which were proportionately lower compared to other means of transportation than in RL.  Yet this seemed to be necessary, because if the speed limits were raised too much and the highways connected to other cities, Sims would just stay on the highways and cross into the neighboring city rather than going to work at local jobs.  This is one of the problems discovered a while ago in sumwonyuno's region of Capitalis, and one of the solutions I used at the time (Simulator Z v2.0) was to lower the speed limit of highways from 120 to 110 kph. This helped that problem, and it also got rid of the problem where thousands of pedestrians were crossing into other cities in undesirable ways.  But it seemed to put an upper limit on highway speeds, and highway use remained relatively low.

However, I then discovered that what Tropod and I had been using as the perfect pathfinding heuristic was in fact not correct, and by extensive experimentation I found the real perfect PH, accurate to six decimal places.  This made a huge difference in almost every aspect of the traffic simulator; large parts of it behave completely differently than they did before.  For example, the value of Commute Trip Max Time previously had a huge effect on how fast the simulator ran; the values in existing simulators were responsible for up to a four- or five-fold difference in speed.  But when the PH was set to the new perfect value (the .005797 I mentioned in the release announcement for Simulator Z v2.1), the simulator always ran at top speed regardless of the setting of Commute Trip Max Time.  This was surprising at first, but understanding how A* pathfinding works in SC4, it made sense.

Switching to the true perfect PH meant that more Sims would use the highways, simply because they were faster.  But then I wondered if it would be possible to increasae the highway speed without running into the problems I did before.  Sure enough, it was.  I raised the highway speed from 110 kph not to 120 kph, but to 150 kph, where it is proportionate with the other network speeds.  It's important to remember that road and street traffic is affected by stop lights and stop signs, so that even if someone drives at the speed limit wherever possible, their average speed is going to be much less.  This means, in effect, that SC4 speeds are about 50% higher than real world speeds.  The recent change in one-way road speeds took into account that it is possible to drive at a speed much closer to the speed limit on them, and the new highway speed is exactly twice that of the one-way road speed.  This corresponds to the fact that in the real world, highway speed limits are about twice that of road speed limits.  (This varies from city to city, of course.)  The speed of 150 kph also has another advantage.  At maximum congestion, highway speeds drop to 45 kph, just below the 50 kph of uncongested roads.  This helps to make highways unattractive to Sims at maximum congestion.

It turns out that the problems I observed at 120 kph didn't exist at 150 kph when I switched to the new perfect PH.  For example, in sumwonyuno's city, highway usage increased, yet employment at local downtown businesses increased as well.  And the problem with pedestrians did not return.  The new perfect PH was automatically optimizing all sorts of things.

You may wonder why I didn't just reduce all speeds by a third and then have speeds equivalent to real-world speeds.  The problem here is that the game has certain numbers hard-wired into it, and reducing all the speeds would cause the destination finder to erroneously conclude that the Sims could no longer reach certain destinations, leading to either reduced desirability for residences or outright abandonment.

Then there's the question of what effect this change has on other networks and travel types.  At 150 kph, the highway speed was starting to get close enough to the monorail/HSR/BTM speed of 200 kph that it was attracting some Sims away from this network.  Raising the monorail speed to 225 kph eliminated this problem.  The only other travel type affected was buses, whose volume actually increased.  This made sense, due to the way that bus usage is biased in the simulator; also, buses traveling on highways are now significantly faster than subways.

The only other effect noticed was that general residential desirability increased slightly.  I believe that this is due to the fact that the higher speed limits overcome some of the hard-wired throttling present in the destination finder; this throttling was put there for efficiency purposes, but is really not needed at this point, and it prevents the simulator from working as well as it could.

That's the long story.  In my Chicago region, I've noticed highway usage increase substantially, including on portions of Lake Shore Drive that previously never had any usage.  This is especially significant, because Lake Shore Drive (being on the lake) is often far from any residences or businesses, yet it is a heavily used artery in Chicago.  It's wonderful to see so many Sims finally taking LSD!  (The highway, that is.  ::))

So here's the new version of Simulator Z.  I think that RHW users will especially like it - you'll finally get to fill up all those lanes.  Enjoy!

Korot

Quote from: z on January 25, 2010, 01:36:44 AM
Release of Simulator Z v2.2
So here's the new version of Simulator Z.  I think that RHW users will especially like it - you'll finally get to fill up all those lanes.  Enjoy!

Weren't Traffic Generators used for the later purpose?
My SC4 computer is currently being updated (hardware) by a friend, and thus isn't available right now, but I'll download it when I can.

Regards,
Korot

k808j

@Korot

You lose cool points for having someone else update your computer.  :P

L i s t e n  T o  O u r  F a m o u s  T h e m e
http://www.supload.com/listen?s=PVfnXk">We Are Borg

Korot

Quote from: k808j on January 27, 2010, 11:47:54 AM
@Korot

You lose cool points for having someone else update your computer.  :P

When he buys the parts, he doesn't have to pay as much as I would. And he has done it before.

Regards,
Korot

z

#471
Quote from: Korot on January 27, 2010, 11:30:35 AM
Weren't Traffic Generators used for the later purpose?

Traffic Generators increase the automata so that the roads look like they're being used, but they don't actually increase the traffic on them.  If you check your Traffic Congestion and Volume Data Views before and after using a traffic generator, you'll find that they're unchanged.  This release of Simulator Z fills up the lanes with more automata while preserving the relation of automata to actual traffic.

Korot

Quote from: z on January 27, 2010, 12:48:46 PM
Traffic Generators increase the automata so that the roads look like they're being used, but they don't actually increase the traffic on them.  If you check your Traffic Congestion and Volume Data Views before and after using a traffic generator, you'll find that they're unchanged.  This release of Simulator Z fills up the lanes with more automata while preserving the relation of automata to actual traffic.

Well, I meant that the main reason to build large, unused RHW-8's is for them to look good, for CJ's and such. And in that case, you don't care how the cars got on the highway, as long as they are there, and thus Traffic Generators are used. I already knew that they don't increase the usage.

Regards,
Korot

z

#473
In an earlier post I indicated that with the new perfect pathfinding figure, which was introduced in Simulator Z V2.1, Sims are more likely to look for jobs in the current city before they look for jobs in neighboring cities.  Since then, experiments have shown that this effect reduces the prevalence of eternal commuter loops.  It is by no means a cure for this problem, but it does make it easier to fix these loops, and to make them less severe when they occur.

z

Coming soon...



Functionality is almost complete; full details will be announced at the time of release.  As you can see from the Data View section, this configuration tool includes options for the data views not available in the NAM Installer.  It also allows whole new capabilities to be used, including new types of toll roads.

CaptCity

Z, this looks absolutely fantastic. It will definitely give all the transportation "nuts" something new to play with  ;) .

Thanks

tamorr

well well... looks like a whole lot has been happening while I was shortly gone... It is nice to see the program is finally coming along... Although is there going to be a readme with a brief summurization of the options?
  "It is wiser to think about your actions before doing them, but be warned One must act quickly before another takes action for you."
  "Knowledge may be Power, but it is how you use that Knowledge that makes One Powerful."
  "I am a Philosopher, Punnist, Poet, and Rambler so keep in mind I think ahead and backwards to point where communication is sometimes not completely understood, even if Enlish is my primary language, it doesn't mean I know it well N proper."
  "Always do your best to acheive your goals and Dreams one at a time."
"Patience is a virtue."

z

Quote from: tamorr on February 06, 2010, 04:03:48 PM
Although is there going to be a readme with a brief summurization of the options?

The Help menu item (visible in the upper left) contains an entry that will display a complete but concise user guide.

tamorr

Alright that will help quite a bit, thanks. :)
  "It is wiser to think about your actions before doing them, but be warned One must act quickly before another takes action for you."
  "Knowledge may be Power, but it is how you use that Knowledge that makes One Powerful."
  "I am a Philosopher, Punnist, Poet, and Rambler so keep in mind I think ahead and backwards to point where communication is sometimes not completely understood, even if Enlish is my primary language, it doesn't mean I know it well N proper."
  "Always do your best to acheive your goals and Dreams one at a time."
"Patience is a virtue."

sumwonyuno

I'm intrigued by the new views for subway and zones.


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

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