Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat

Author Topic: Commute engine tweaking for NWM  (Read 40933 times)

0 Members and 1 Guest are viewing this topic.

Offline jplumbley

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1438
  • Total likes: 13
  • Reputation: 43
  • "RULer 10000002"
  • CL: Plum Fierce
Re: Commute engine tweaking for NWM
« Reply #80 on: November 12, 2007, 01:16:51 PM »
Sooner than later.  ::)
"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

Offline Starmanw402007

Re: Commute engine tweaking for NWM
« Reply #81 on: November 12, 2007, 01:47:36 PM »
Cool, Just Keep Up the great work with it :thumbsup:

Your Friend;
Mayor Of Steven's Point & Maxiston
(Proud To Be Cities Of Sim Nation!) :)
Your Friend;
Mayor Of Steven's Point & Maxiston
(Proud To Be Cities Of Sim Nation!)

Offline debutterfly

  • Forums Councilmember
  • *
  • Posts: 123
  • Total likes: 0
  • Reputation: 0
  • "Nobody will expect the butterfly" -Bart Simpson
Re: Commute engine tweaking for NWM
« Reply #82 on: November 12, 2007, 02:17:20 PM »
Sooner than later...lol...Tarkus says sooner is far away like 2008 so I will be surprised if it came out this month. Also will the U-Turn problem be fixed by the TLA? I saw the pathfinding for the TLA and it seems like it would rid the game of the U-Turn problem...Also will the TLA replace the Avenue or will it be like the GLR starter piece? And I like pictures every now and then even if it isn't that exciting. I just like to see the progress first hand. Oh and what do you program in...I thought I heard C or C++.

Offline Tarkus

  • Administrator
  • Forums Legend
  • *
  • Posts: 11491
  • Total likes: 5131
  • Reputation: 73
  • NAM Team Tankadillo
    • NAM HQ
  • CL: Dr. PuzzlePiece
Re: Commute engine tweaking for NWM
« Reply #83 on: November 12, 2007, 02:41:55 PM »
You should know by now that we don't set specific release dates. :D  We like to surprise people. ;) 

debutterfly, the TLA-3 is based on a puzzle drag like the GLR and SAM starter pieces, while the TLA-5 is based on a side-by-side override (like the RHW) but with the Road network.  It will indeed be a solution to the U-Turn problem, as cars can cut across the TLAs width with the included crossover paths.  As far as asking for development pics . . . well, again, we like to surprise people.  But I haven't really had anything at all to show on the TLA end--it's been of low priority to me as of late, since I've been putting all my focus into getting the new RHW version with the Modular Interchange System (MIS) ready. 

As far as what we program in, we actually haven't had to use any programming languages at all for these projects--it's mainly been through syntax Maxis set up with the game's internal files that we've learned. 

Hope that answers some questions.

-Alex (Tarkus)

Offline jplumbley

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1438
  • Total likes: 13
  • Reputation: 43
  • "RULer 10000002"
  • CL: Plum Fierce
Re: Commute engine tweaking for NWM
« Reply #84 on: November 12, 2007, 02:47:44 PM »
Oh and what do you program in...I thought I heard C or C++.
We dont program in any real language, it is essentially "IF = THEN" statements which we define in the RULs Overrides for the Network system, which were provided by MAXIS when they released the game.  We are just taking advantage of the abilities of the RULs that others have overlooked or felt were not worth persuing.
"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

Offline mott

Re: Commute engine tweaking for NWM
« Reply #85 on: November 12, 2007, 03:58:04 PM »
There's a clear explanation of RULs, written by the person who invented them, at:

http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Road_rules

A quick read through this page will explain why it takes so long to get the new networks working properly. ;)

Offline debutterfly

  • Forums Councilmember
  • *
  • Posts: 123
  • Total likes: 0
  • Reputation: 0
  • "Nobody will expect the butterfly" -Bart Simpson
Re: Commute engine tweaking for NWM
« Reply #86 on: November 12, 2007, 04:05:15 PM »
I will be majoring in Math and Computer Science so I will definitely look in to learning this. I would like to be of some help if you need any on algorithms or if-then statements. I've made simulators before so this shouldn't be too hard for me to learn. btw I taught myself Java, TI-Basic, QBasic, Visual Basic and I'm only a freshman.

Offline jplumbley

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1438
  • Total likes: 13
  • Reputation: 43
  • "RULer 10000002"
  • CL: Plum Fierce
Re: Commute engine tweaking for NWM
« Reply #87 on: November 12, 2007, 04:17:22 PM »
I will be majoring in Math and Computer Science so I will definitely look in to learning this. I would like to be of some help if you need any on algorithms or if-then statements. I've made simulators before so this shouldn't be too hard for me to learn. btw I taught myself Java, TI-Basic, QBasic, Visual Basic and I'm only a freshman.

Sounds like you are ambitious, very good.  :D

The following link will help you understand the most basic RUL the one I deal with most frequently.  RUL 0x10000002 Tutorial
"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

Offline Starmanw402007

Re: Commute engine tweaking for NWM
« Reply #88 on: November 12, 2007, 05:54:03 PM »
Well, I like Surprises anyways.  :).

Your Friend;
Mayor Of Steven's Point & Maxiston
(Proud To Be Cities Of Sim Nation!). :)
Your Friend;
Mayor Of Steven's Point & Maxiston
(Proud To Be Cities Of Sim Nation!)

Offline debutterfly

  • Forums Councilmember
  • *
  • Posts: 123
  • Total likes: 0
  • Reputation: 0
  • "Nobody will expect the butterfly" -Bart Simpson
Re: Commute engine tweaking for NWM
« Reply #89 on: November 13, 2007, 06:45:27 PM »
how far will sims travel before saying "forget it" and abandoning their homes? let's start with 60mph.

Offline jplumbley

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1438
  • Total likes: 13
  • Reputation: 43
  • "RULer 10000002"
  • CL: Plum Fierce
Re: Commute engine tweaking for NWM
« Reply #90 on: November 14, 2007, 07:28:02 AM »
how far will sims travel before saying "forget it" and abandoning their homes? let's start with 60mph.

This is a very loaded question.  It depends on a number of variables determined in the Traffic Simulator.  Mott has explained how this calculation is done in the very first post of this thread, in fact the first 2 pages are a high recommended read if you want to learn more about the Traffic Simulator itself.  The following quote is the explaination you are looking for from Mott's post on the first page:

I really think the "network speeds" as set in the commute tuning exemplars are NOT in kilometers per hour, despite the Reader's assertions.  Rather, given a speed s, the "map distance" for a vehicle/pedestrian to travel over 1 tile is (1/s).  On a transit-enabled lot, the "Transit Switch Entry Cost" applies instead, counted once for the entire lot.  So the commute engine just adds the numbers up, per-tile (and per-lot, for transit-enabled lots) until it either reaches the Sim's job, or hits the cumulative maximum commute (default: 6).

There is an additional maximum mass-transit trip length.  This is described by the Reader as "Maximum mass transit commute raw trip length," but what it really represents is the maximum map distance a pedestrian will go on foot in search of a transit station before he gives up and drives instead.  In a default Maxis installation, pedestrians have a "nework speed" of 3.5, and the maximum "raw" mass transit commute distance is set to 4.  Divide that 4 in half to account for the evening commute, and you have a maximum "map distance" for a pedestrian's initial trip from home to a transit stop being 2.  At a map distance of 1/3.5 per tile walked, that works out to about 7 tiles, which happens to be about as far as a Sim will go to reach a bus stop. 

No wonder the 10x commute speed plugin doesn't speed up pedestrians - they'd walk up to 70 tiles at 10x speed!  To fix this and get it back to 7 tiles, without affecting anything else, divide the maximum raw mass transit trip entry by 10 after accelerating the pedestrians.  It's 4 by default, so replacing this with 0.4 will set the peds back to their original maximum distance.  (I usually set it to (1.6), so that the Sims will walk up to 28 tiles (about 1/4 mile), which is the 5-minute walk that real transit planners expect that people will take to reach transit).  Again, this does not shorten the Sim's trip one he reaches a bus or train.  It's only for that first walk to the initial station.  The Sims won't have to walk at turtle-speed, distorting commute times any more.  I doubt that this was known when the plugins were made?

Next, we can look at roads.  Defaut speed 31, so each tile has a "step cost" of 1/31.  The maximum commute distance is 6, divide by 2 to account for the evening commute back home, and that's three.  To get to 3 in 1/31 increments, that's 93 tiles - this is why on large maps, Sims at one side of the city have trouble reaching jobs on the other side until there are highways or at least avenues.  The 10x speed plugin makes it 930 tiles max commute on road, which is good enough to get across 3 or 4 large city tiles (or as little as 2, if it's a worst-case diagonal commute all the way across the large cities).  It sure solves people's no-job zot problems.

This is where the "Transit Switch Entry Cost" property of transit switch lots (such as train stations and bus stops) comes in.  There is no unit of measure given for this property, but it is analagous to the "step cost" of going through a network tile.  It's just the "map step cost" for traversing the lot.  Large transit-enabled lots require some very careful tuning of this value, lest they function as "teleporters" (too little cost) that suck all traffic through them, or as "blockers" (too much cost) that Sims would prefer to go around. 

Transit enabled lots get complicated this way, because their "transit switch entry cost" in transit switch lots is directly related to network speeds and max commute!  The moment you increase speeds by 10, you also increase the relative  "transit switch entry cost" by 10!  Driving takes 1/10 the time it used to (on road, it went from 0.031/tile to 0.0031/tile), but that Toll Booth at the edge of town has the same .02 cost it always did, and your Sims will now drive 10x farther to avoid it!
"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

Offline debutterfly

  • Forums Councilmember
  • *
  • Posts: 123
  • Total likes: 0
  • Reputation: 0
  • "Nobody will expect the butterfly" -Bart Simpson
Re: Commute engine tweaking for NWM
« Reply #91 on: November 14, 2007, 09:10:39 AM »
got it...thanks

Offline Starmanw402007

Re: Commute engine tweaking for NWM
« Reply #92 on: November 14, 2007, 07:39:35 PM »
RHW-10 (four tiles), is probably what I'll need for my traffix problems  :D. Of Course when it becomes available. Until then, Those Sims of Steven's Point will have to play Demolition Derby :D $%Grinno$%.

Your Friend;
Mayor Of Steven's Point & Maxiston
(Proud To Be Cities Of Sim Nation!)
Your Friend;
Mayor Of Steven's Point & Maxiston
(Proud To Be Cities Of Sim Nation!)

Offline theloolix

Re: Commute engine tweaking for NWM
« Reply #93 on: December 09, 2007, 10:01:42 PM »
i've enjoyed this thread very much.  thanks, mott & jplumbley; it's shed a lot of light on some issues i've been confused on.

lately, i've been playing around with building a city/region based on the reference design presented in http://carfree.com/ and its corresponding book.  the looped city design has helped me give some direction when trying to build a city on a large tile, and as someone who hasn't driven a car in over 10 years the idea of a car-less city intrigues me.

so, i figured this park and ride plugin would be a great match for my new region.

first, i tried out the carfree design with a single large city, and my districts were about 17 tiles squared.  i used the monorail instead of subway so that i could see the trains going by.  with the park-and-ride plugin, i would get no-car zots on many of the zones in these districts and then abandonment.

this happened at about 52k residents, and i could no longer get any residents to move in, despite there being ample demand.

i switched to the normal a03 traffic plugin, and started over with the same district layout, and had no problem getting my city to over 150k residents.  i'm not sure whether cpu usage or something else is the culprit, but i thought i'd let you know about this.

i've moved on to trying to build a region-size city (16kmx16km is just about the recommended city area by that book), but subway capacities are causing a problem.

i have two cities; one with a few residential district, and the other with a residential district near the border with the first city, and with some industrial districts to the south (so most residents from the first city commute through the residential district in the second before reaching their place of employment). 

after the subway stations in the residential district reached about 110%, the traffic volume and commute time graphs started to go a little crazy.  my experience with monorails had been that sims had no problem using stations until about 500% capacity, and the monorail tracks themselves were just about always green on the traffic chart.  are monorails and subways this different, or is this an artifact of the traffic plugin?

also, is the capacity for a station only the number of sims entering/exiting that station, or does it count through traffic?  the carfree book suggests that a metro can handle 20k people per *hour*, so even the 4800 seems pretty low.  (i believe that 20k is in one direction, but i may be mistaken).

there was also mention of another plugin in some thread with this:

> Rail/Subway/EL Rail/Monorail Capacity:16800

but i cannot locate that now; what was that, exactly?

thanks for your time and sorry if i've rambled a bit.

Offline theloolix

Re: Commute engine tweaking for NWM
« Reply #94 on: December 10, 2007, 09:05:54 AM »
And one more thing i forgot:

when i had a lot of monorail usage with the a03 plugin, there was a lot more air pollution from a monorail than i'd expect.

Offline jplumbley

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1438
  • Total likes: 13
  • Reputation: 43
  • "RULer 10000002"
  • CL: Plum Fierce
Re: Alpha 03 is here!
« Reply #95 on: December 10, 2007, 02:55:03 PM »
@theloolix

I will start with the Capacity question you had:

Mott if I remember correctly did not edit the road capacities.  I made some calculations based on RL systems way back when and copied my post here and that is where the 16800 capacity came from.  These capacities are actually included in the CAM Pathfinding update.  Unfortunately the CAM Pathfinding file was not updated with the new information that we found out in this thread due to CAM being released before this thread was even thought of.

I have done some experimenting with the Capacity values.  It seems that these are just as important as everything else when attempting to balance your network system.  If they are too high then people will not spread out and use "uncongested" routes and becomes unrealistic.  If they are too low, it will prevent developement when you get to larger cities because your transit system just cannot handle the traffic.  There seems to be a fine balance and from my testing, the MAXIS values are a little low, but they are not too far away from the proper balance, I cant remember the exact values but I have a fairly balanced Pathfinding engine for a Large City tile.  It is unreleased and will stay that way until atleast the next release of NAM.

My suggestion if you would like to change the capacities for cities 100k+... Set your Capacities to:

Rail/Monorail/Subway/El-Rail:  10,000
Street:  2,500
Road:  6,000
OWR:  6,000
Avenue:  6,000
Highway:  8,000
El-Highway:  8,000
DirtRoad (RHW):  8,000

These numbers will give you a fairly stable and semi-realistic level.  Obviously, there is more testing needed and these numbers are not necessarily going to work 100%.

My only suggestion is that, if you start having capacity issues it means you do not have enough routes for sims to use.  The more routes you have the better your Traffic System and Traffic Simulator will work for you, if you are using the one Mott and I have developed here.

Subway system haywire:

Yes, sir!  Thats what happens when population grows.  I would put my money on your population is spiking in the same fashion.  What can happen is you have created demand for your residents and you need more sims in your region.  But, when your Subway System starts becoming over used it will start slowing your Sims down and could possibly make some of them have long commute times.  If the commute is too long they will abandon and you will have incidentally "recreated" the demand which is a vicious cycle.

What Mott and I have done in this thread is "forced" Sims to use other routes by playing with the Speed vs Congestion.  When you capacity reaches beyond 100% the speed of the network will begin to reduce.  In fact a model I worked up and I think Mott has instituted into his a03 release follows a chart like this:

Congestion:  0%   25%   50%    75%   100%  125%  150%  175%  200%
Speed:      140%  130%  120%  110%  100%  75%    50%   25%   0.1%

This means that if your Congestion is at 110% the speed of the network is approximately 90%.  So if your Sims travel at 150 km/h the actual speed will now be 135 km/h.  Hence and increase in commute time.  When I tested it with 0% speed at 200% capacity I found that sims would start walking or using busses at 175% capacity.  The reason for this is that the busses and walkign do not add to congestion and will not reduce the speed.  Because your Subway system may support a much larger area the Sims may not want to use the network because the commute time is just too far due to the congestion.  What happens when you add a new Subway line?

Monorail Air Pollution:

This is something I dont agree with either.  Monorails are generally electric and do not give off pollution along the length of their lines.  I am not sure why MAXIS included this in the Monorail system but they did.  I have not looked into removing it, just havent had the time.

Abandonment Issues with carless City:

I dont think this was a CPU usage issue.  There are many things that could have contributed to this just playing the game.  With all Pathfinding Engines before the ones created in this thread there are fatal flaws.  Some of them these fatal flaws show earlier than others and at some point the Simulator will just prevent people from reaching work.

The new Traffic Simulators in this thread are much more stable than the MAXIS and NAM created ones.  It is advisable (even though only Alpha Stage) to use the ones from this thread. 
"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

Offline dragonshardz

  • 3RR Team
  • Forums Parliamentarian
  • *
  • Posts: 1385
  • Total likes: 1
  • Reputation: 1
  • Feel free to call me Patrick.
Re: Commute engine tweaking for NWM
« Reply #96 on: December 10, 2007, 05:32:07 PM »
Question: What dat do I load in the Ilive Reader to change those values? Also, what tags inside the dat do I need to change and what value do I change them to?

Offline jplumbley

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1438
  • Total likes: 13
  • Reputation: 43
  • "RULer 10000002"
  • CL: Plum Fierce
Re: Commute engine tweaking for NWM
« Reply #97 on: December 10, 2007, 06:03:23 PM »
@Dragonshardz

If you download one the last zip in this thread (page 3 half way down posted by Mott) it will give you a couple of options for the Pathfinding Engine we have developed here in this thread.  Basically, the main difference between the two is the park and ride feature.  Mott has tested out a park and ride aspect to the game, basically it doesnt allow cars to reach their destination, Sims now must park and then walk the rest of the way or ride a transit system.  This will force you to use parking but will be a little more realistic for some.  Now, you must remember that the other one is a Standard MAXIS Engine tweaked to be with the values we have calculated here and tweaks here and there.

There is only one file in this DAT so this would be the DAT you need to open with iLives Reader.
"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

Offline dragonshardz

  • 3RR Team
  • Forums Parliamentarian
  • *
  • Posts: 1385
  • Total likes: 1
  • Reputation: 1
  • Feel free to call me Patrick.
Re: Commute engine tweaking for NWM
« Reply #98 on: December 10, 2007, 06:07:30 PM »
ok thanks.

Quick question: If i have a slope mod already installed, should I remove it or not?
« Last Edit: December 10, 2007, 06:10:15 PM by dragonshardz »

Offline RippleJet

Re: Commute engine tweaking for NWM
« Reply #99 on: December 10, 2007, 06:14:25 PM »
Quick question: If i have a slope mod already installed, should I remove it or not?

The slope mod has nothing with pathfinding to do.
It only determines the maximum allowed slopes when dragging a network.

So, keep it if you like it! :thumbsup: