Menu

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

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

0 Members and 1 Guest are viewing this topic.

Offline mott

Commute engine tweaking for NWM
« on: October 13, 2007, 03:27:51 PM »
Some of the NWM team members have made mention of changing network speeds in the NAM to make the new RHW/MIS/TLA/1-way networks better interact with each other.  This is probably a good idea - I've long suspected that some of those "pathfinding" plugins are effectively redundant or ill-advised.  They were made a long time ago, after all, and much has been learned since.

I've done a lot of research in the pathfinding area, and if you don't mind, I'd like to brain-dump on this topic. 

First, background: It always bothered me that Sims can drive directly to a job, as this makes realistic traffic patterns (and parking garage use) somewhat difficult to achieve.  So I set up my game so that only pedestrians can reach jobs; if they want to drive to work they're going to have to park nearby and walk from there, just like in real life.  When I did this, I found I had to re-balance the entire transportation system:  The parking lots needed an "entry cost" so the Sims can't all use the same parking space, then that privileged transit so I had to give all the stations an entry cost too, then the Sims all headed to neighbor connections to avoid the parking and transit delays so I had to make transit-enabled on-network delay lots (toll booths) to slow down off-map commuting, and it all had to balance.  Then congestion curves had to be dealt with... and I think I finally got it all working correctly. 

I wouldn't turn this mod loose on the general public for obvious reasons, not the least of which is that it requires patching every custom transit station a person wishes to use and I really don't care to support it among the "plop nothing but CO$$$ towers and wonder why they abandon" crowd.  But I learned a lot about how to balance the commute networks from doing it, and this NWM project has just approached something I might be able to contribute to.

So, getting on with the interesting NAM-related info:

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!

So - change the speeds, and you really have to mod every transit switch lot that has an "entry cost" to compensate.  The 10x speed plugin needs a 1/10 delay Toll Booth (0.02 entry cost), in order to remain "balanced."  The only other Maxis lot that has an entry cost is the Ferry Terminal, but that's controlled by the EXE apparently.  So the 10x speed plugin is going to make ferries 10x slower relative to the other modes of transit, and there's nothing to be done about it as far as I know right now.  Ferries are the transportation of last resort anyway.

Now, looking at the commute time graphs that people always wonder about, what is a true "minute" in this context?  The answer is, "It depends."

The game calculates commute time by looking at how much of a maximum commute trip is used.  Say, the total map step cost of a commute trip is 3, which is exactly half of the default maximum 6.  This ratio 3/6 is projected onto a scale of 0-255, yielding 127, which is then presented to the user as 127 minutes.  There are at least two places (the pathfinding exemplar and the map exemplar) where opportunities to scale this value are presented; set the multipliers to 1 and you'll see the raw 0-255 commute time projection.

Which means: If you use the "10x Commute" version of the plugin, you just changed what a "minute" is!  Now that Sim's trip is 3 tiles out of a maximum of 60, projecting to 12.7 on a scale of 0-255, and you should see 12.7 "minutes" on the graph and have divided every "Transit Switch Entry Cost" by 10 (a toll booth is .02 of 60 now, not .02 of 6).  If you used the 10x Speeds version instead, you see the same commute time effect on the graph, but have also in effect multiplied every "Transit Switch Entry Cost" by 10, relative to other routes.

Increasing network speeds also reduces freight trip lengths, while increasing max commute does not.  Since dirty industry and farms can't abandon, this is pretty much irrelevant, except that the higher speed version gives realistic freight trip times and thus lets industry develop much farther away from connections and/or rail/seaports.  [BTW, anyone know how to make it so dirty industry will abandon with lack of demand again, like it did in pre-patch SC4 vanilla?  Any chance on farms too?]

So what's a "commute minute?"  That depends on the maximum commute, and the network speeds.  We already know what the dimensions of a tile are (approx. 64 tiles/km, 100 tiles/mile), and we know what time is.  Knowing those constants, we can work backward to figure out what the network speeds and max commute should be.  As these two variables are dependent on each other, we just need to "peg" one.

I find that the 10x speed mod is the best for realistic time reports, as it also affects freight trips, so we'll use that for a baseline.  If we let pedestrians walk at a speed of "40" (just to make the math easier; default is 3.5 so 10x would be 35), that's a "step cost" of 1/40 per tile.  In real life, an adult human walks about 5 tiles/minute, so one minute would be a "map distance" of 5/40 (1/8), or 0.125 "map steps."  So what should the "maximum commute" be?  Let's say 1.5 hours each way, for a total of 3 hours.  If a minute is a "map cost" of 1/8, then 180 minutes is a "map cost" of 180/8, or 22.5!  Set the max commute to 22.5, the rest of the network speeds to 10x values, and a  (uncongested) Maxis toll booth's 0.2 delay will work out to something around 90-100 seconds delay to slow down, pay the toll, and re-accelerate again, which isn't that far off from reality.  Commute time and real time converge, and you're "balanced."  Pick different speeds, and re-work it.  Or, pick a different max commute and determine the needed speeds from that.  It doesn't matter; they're dependent variables.

Doing this same math, the 10x Speed, 10x Commute version of the NAM pathfinding plugin has a highway step cost of 1/1000 and a maximum commute of 60, which works out to a 30,000 tile commute on an unobstructed highway.  That's 480km/300 miles!  And monorail allows twice that!  As everything is relative, an uncongested toll booth takes around 12 seconds to traverse with this plugin, and will have very little effect.  I'm not surprised that people report "freezing" problems with this one as their cities grow!

The ultimate point is, if there's messing about to be done with the NAM pathfinding plugins anyway, I don't think it's necessary to have so many of these "Max Commute" and "Max Speed" versions, since the two settings are intimately related.  We could probably knock it down to a few major variations (The Maxis default 6, 12, and 24 max commutes have been good values in my testing; they're easy to translate to minutes and at 10x speeds, a max of 24 is sufficient to model all of the greater Los Angeles are to scale).  Lot makers could then be supplied with the proper "Entry Cost" constants required for things like the RTMT lots to balance with the various pathfinding plugins so they don't privelege one route over another.  That would also require overriding every Maxis transit exemplar to have balanced delays so as not to privilege other transit types and stations over the RTMT ones, but that's quite easy. 

This is getting long, and somewhat hard to follow probably, so I'll wrap it up here and take questions if there are any.  I hope I wrote something that's useful to someone.  Or at least, comprehensible.

Offline Meastro444

Re: Commute engine tweaking for NWM
« Reply #1 on: October 13, 2007, 04:03:43 PM »
if this is implemented, ive read nearl anytihng, and it is very interesting.

i hope you can make it into a mod, because it makes it so much more realistic.
did you had to mod every station you had into this 'mod'?

if yuo do release it, i'd be gratefull!
Friend of the Certified Drama Queen :)

Offline jplumbley

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1438
  • Total likes: 12
  • Reputation: 43
  • "RULer 10000002"
  • CL: Plum Fierce
Re: Commute engine tweaking for NWM
« Reply #2 on: October 13, 2007, 04:20:46 PM »
Hello Mott,

This has been a very well thought out and presented post.  I have read it and followed you on most of it.. hehe.

Now, I like your thuroughness and amount of thought you have put into this!  It covers pretty much everything that I can think of.  If you would so like, it sounds like a good task for you to come up with a good balanced network Pathfinding Simulator.  And then with a very good explaination as you have here Im sure the Transit Stations will be able to be modified to work within the structure of this new Pathfinding Engine (build it they will come).

I have one question for you.  With the Network Widening Mod, we have decided to equalize Road, OWR and Avenue Networks.  The reason for this is because for the wider networks like TLA-7 it needs a 3-tile base network, which is impossible.  But we have found a way for the overrides to work on 3 Road networks side by side.  Now, in theory TLA-7 would have a greater speed and capacity compared to a normal avenue or at very minimum it would be equal speed and capacity per tile.  So, due to the implementation we would be required to equalize all the Road and the Avenue network.  This will obviously throw off the balance to an extent.  What are your thoughts on this?  I dont see much in the way of a workaround for this implementation.
"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 Shadow Assassin

  • NAM Team
  • Forums Guru
  • *
  • Posts: 3232
  • Total likes: 12
  • Reputation: 25
  • Needs more cowbell.
  • CL: The Grid Reaper
Re: Commute engine tweaking for NWM
« Reply #3 on: October 13, 2007, 08:39:41 PM »
Mott's just given us the reason for why the 10x pathfinding simulator makes pedestrians walk a ridiculously long distance to their work. Sure we'll get healthier pedestrians, but it doesn't really work?

Quote
I doubt that this was known when the plugins were made?

I doubt it was known, too. It's mainly because the NAM team had different objectives in the creation of the modified pathfinding engine. In fact, I think they implemented a lot of T7T's original work in the NAM, modifying it further to provide options.

It's most likely we'll have to retain the original NAM pathfinding modifications, then adding the stuff that you've been working on.

Quote
Any chance on farms too?

I find that farms actually can abandon due to lack of demand. Dirty industry, on the other hand... can be very difficult to abandon, but it is really dependent on demand. There are additional things that come into play, such as traffic.

Quote
(uncongested) Maxis toll booth's 0.2 delay will work out to something around 90-100 seconds delay to slow down, pay the toll, and re-accelerate again, which isn't that far off from reality.

Might wanna point out that this may not really work with electronic tollbooths. :P I find that realistically, we take about 60-70 seconds to pay the toll (unless we're hunting around for change/or gave the toll attendant a $50 note, in which they have to give us the change)... I suppose 90-100 would work great.

Finally, this possibility would allow busways to work quite well. In the past, I've found that buses don't like taking the dedicated busways I've set aside for them... even if it's the quickest route through the city tile, which can most likely be attributed to the transit-enabled tile entry cost.... Sims won't use the buses because it's "too slow".

What would happen if I set the entry cost for the blocker lot (which allows only buses and pedestrians) to 0? What would be the effect of doing so? I'm kind of trying to encourage buses to use the busway as a favoured route to get to places. I have the network set up so that there are direct connections between major areas and residential areas.
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!

Offline jplumbley

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1438
  • Total likes: 12
  • Reputation: 43
  • "RULer 10000002"
  • CL: Plum Fierce
Re: Commute engine tweaking for NWM
« Reply #4 on: October 13, 2007, 08:54:06 PM »
What would happen if I set the entry cost for the blocker lot (which allows only buses and pedestrians) to 0? What would be the effect of doing so? I'm kind of trying to encourage buses to use the busway as a favoured route to get to places. I have the network set up so that there are direct connections between major areas and residential areas.

The entry cost of 0 would mean there is no cost added to using that transit enabled lot.  The would then become a "shortcut"...  The cost of the tile is probably set at 1.  If a bus travels at 31 tiles for 1 minute then your bus will go out of its way by 31 tiles to avoid using the transit enabled lot.  If there is no cost for that tile then the entire trip is actually considered as Distance-the number of tiles for the TE Lot because there is no cost for travelling through the number of tiles of that TE Lot.
"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 Shadow Assassin

  • NAM Team
  • Forums Guru
  • *
  • Posts: 3232
  • Total likes: 12
  • Reputation: 25
  • Needs more cowbell.
  • CL: The Grid Reaper
Re: Commute engine tweaking for NWM
« Reply #5 on: October 13, 2007, 11:48:14 PM »
Ah, exactly what I wanted to hear!

That'll fix the little bus lane issue I'm having, which I mentioned earlier.
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!

Offline flame1396

  • 3RR Team
  • Forums Governor
  • *
  • Posts: 511
  • Total likes: 0
  • Reputation: 2
  • SC4ever
Re: Commute engine tweaking for NWM
« Reply #6 on: October 14, 2007, 12:47:34 AM »
Interesting... I read it all thinking it was Tarkus... lol.
The most astounding and unique aspect of the human race is our fervent application of our ingenuity to kill each other, thus completely defying the near-universally proven fact that the ultimate goal of a member of a species is to ensure the survival of the species.

Offline mott

Re: Commute engine tweaking for NWM
« Reply #7 on: October 14, 2007, 01:41:21 AM »
Sorry for my absence after posting; unexpected company... wow, someone thought I was Tarkus?  I'll take that as a compliment, thank you. :)

And it just occurred to me that a default Maxis toll booth is 0.2 delay, not 0.02.  Apologies for that. 

@Maestro: If people really want to try this "make them park and walk" mod idea, I'm willing to roll up whatever I can.  I'm having a bit of trouble getting the congestion response set just right at the moment, it's not hard, it just takes a couple of hours of play-testing to fully evaluate each modification.  Fortunately, when I find the right curve, it should be useful to jplumbley for the TLA project. 

@ShadowAssassin: A transit switch entry cost of zero would just make your bus-blocker a "free tile,"  taking no time to traverse, and being immune to congestion delay.  Buses and peds don't generate congestion anyway (by default), so it really doesn't matter that much.  If you want to be completely accurate, whatever your bus speed is set to on that network type, divide 1 by that, and set your transit-switch entry cost to the result, rounded down so the bus lane is always just slightly faster than the road next to it.  In a default game, 0.03 should be close enough, 0.003 if you use the 10x speed mod.   Oh, and there's a way to make toll booths (and everything else) faster if they are under 100% use, the same way they can be slower if over 100% use, so your estimated numbers may yet see the light of day.  Sure, faster than 70-90 seconds or so, as long as it's a mostly empty road so you're not waiting for the idiot in front of you to find his other quarter.  :)

@jplumbley: I see the issue with speeds, and I'd be honored to roll something up for you.   While I was tuning parking lots, I realized that the same way congestion slows down traffic, lack of congestion can be used to speed it up.  An open road, no traffic... people *speed.*   I've found that by setting the response curve to increase speeds by 25% on an open road (or under-used parking lot, train station...), and slowing to the speed limit as usage nears 100%, makes Good Things happen.  For example: since zones can radiate congestion in their immediate vicinity, it slows the Sims down when going through areas that have "frontage," even before the road is fully saturated.  And through traffic starts using the bypass route (if any) that much sooner.   I think your answer may lie in this area.

EDIT: And if you widen a road (say, convert a 2-tile OWR-5(?) into a 3-tile OWR, the traffic will redistribute evenly across the tiles, usage % will drop, and the speeds will increase.  I think that's what you want?   

As for capacities, the way I see it, what's important is whether cross-traffic can make uncontrolled left (or right, UK) turns in front of oncoming traffic - real-world nominal lane capacity is ~1200 vehicles/hr if such turns are allowed, ~1800 per lane if not.  So I'd say those are good numbers to start with.  As for speeds, the slightly lower lane capacity of a TLA combined with the congestion radiated by any frontage (if present) will slow cars sooner on TLAs as traffic increases, even if you set the network speed the same as on all the other types.  And if there's no frontage, then there's no need to use a TLA in the first place, so the capacity mismatch won't matter.   It's just a matter of tuning the capacities, congestion response curves, and the amount of congestion radiated by zones.   Road usage itself will do the rest. 

One thing I need to figure out, is if it's possible to change the congestion display chart colors, so that green is 0% usage, yellow 100%, and red 200%, instead of the current situation where they don't turn yellow until 200% or red until 300%.  By the time usage nears 100%, it's time to start thinking about upgrade options SOON, so 100% should be yellow.  In the real world, 200% usage means walking speed, that should be red, and the yellow warning color should appear long before then.  I tried just making 200% usage the "new 100%" by dividing all capacities in half, but this messed up traffic noise and commercial desirability so I'm going to have to go back and do it correctly.   At least I'm *close* to getting this all right.  :)

I have to do family stuff and then prep a few work-related things for Monday; I should have some free time to mess with this some more on Tuesday and Wednesday.
« Last Edit: October 14, 2007, 01:47:10 AM by mott »

Offline jplumbley

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1438
  • Total likes: 12
  • Reputation: 43
  • "RULer 10000002"
  • CL: Plum Fierce
Re: Commute engine tweaking for NWM
« Reply #8 on: October 14, 2007, 12:43:39 PM »
Mott gets a  :thumbsup: +Karma from me!

I really like the idea of "Park and Rides" actually being Park and Rides, or the fact that you have to deal with parking in a downtown area.  In SAM I tried to make parking a bit more desirable by making a draggable parking lot in which sims could actually use as a street.  The downside to it is I cannot make it function as a parking lot due to limitations on a T21 Exemplar (Network Lot).  If you get this mod setup, I gaurentee I will use it.

I never knew you could allow people to speed, that is freaking cool!  I see MAXIS usedit to an extent... They used it to decrease traffic when a network is becoming congested.  They started it little late on that one!

Original MAXIS Stats of the Congestion vs Speed property:
0, 1 = At 0% capacity traffic travels at 100% speed
1, 1 = At 100% capacity traffic travels at 100% speed
2, 0.65 = At 200% capacity traffic travels at 65% speed
3, 0.30 = At 300% capacity traffic travels at 30% speed

So, lets use my home "highways" as an example.  The speed is 100 km/h on the highways, but in about 0 to 50% capacity people go anywhere from 120 to 150 km/h, the average being somewhere between at about 130 to 135 km/h.  When capacity is nearing 75% I would say the cars generally are about 110 to 120 km/h.  But when we get to 100% saturation I would have to assume we are starting to lose speed and I would say we'd be about 95 km/h.  At probably around 125% capacity we are running down around 75km/h, at 150% capacity I would say we are down to 50 km/h and at 200% I would say around 20 km/h.  There is no way our highways hit 300% capacity it would be a parking lot and in most cases this would be the cause of an accident.

JPlumbley's suggested stats:
0, 1.4
0.25, 1.3
0.5, 1.2
0.75, 1.1
1, 0.95
1.25, .75
1.5, .5
1.75, .35
2, .2
3, 0 = This one will make it so no road will ever be able to reach 300% capacity because it will be a dead stop.

Now, Mott.  I would like to make it so that sims can travel to the opposite side of a large tile, which means a travel distance of 512 tiles and 1024 diagonally from corner to corner.  512 tiles I think should be the equivenlent of travelling at 60 km/h on a surface road or avenue.  So by this logic, the travel distance of a highway at speed 100 km/h should be equal to 853 tiles.  A street of 40 km/h would equal about 341 tiles.  And a pedestrian at 5 km/h 4would equal 43 tiles of travel.

So, how do we get to these numbers.  Well, lets make the speed equal to the REAL km/h.  Here would be my suggestions:

Walking Speed = 5,0,0,5,0,0,5,0,0,0,5,0,0
Driving Speed = 60,0,100,40,0,0,60,0,0,0,60,100,100
Bus Speed = 55,0,90,35,0,0,55,0,0,0,55,90,90
Truck Speed = 55,0,90,35,0,0,55,0,0,0,55,90,90

Now, we go into adjusting the Max Commute to equal the distance we have just calculated.  Since 512/60 = 8.53 that would equal about a 17 Max Commute Time value for the there and back trip.

In real life, the maximum amount of time someone will commute is normally between 1 hour and 1 and a half hours.  So if we were to estabilsh that 512 tiles is the distance you could travel in 1 and a half hours then you would get travel distance of 341.33 tiles in 1 hour.  This, I think if I did my calculation correctly works out to be a Trip Length to Minutes Display Multiplier with a value of 10.54.
_______________________________

On another note, I have notice that there is a Transit Switch vs Funding multiplier.  Now, the thing about this property we should be able to control the TE Lot Switch Cost with this property and Standardize the Lot Switch Costs at the same time.

For example we set it up so that the Switch Cost for ALL lots be based on the number of tiles and the type of lot it is.  So if the maximum distance through atTE Lot is 1 tile then the Transit Swicth should be equal to 1*1 for a station, but if it is 2 tiles then it should be 2*1 for a station.   Then, for the Transit Simulator we change the multiplying values to suit the plugin you are installing.  This will keep all Transit Station (TE Lots) inline with the editing of the Traffic Simulator.
_______________________________

EDIT:  I have just done a test of my numbers from a scratch city.  I setup a Large city tile where, on one side I had all residential and the other side I had all I-D and CS$.  I did not build education because there was no need for this test.  I made 2 connections, one by Avenue and one by G-Highway.  I havent played for very long about 50 years of game time and made it to population 12,000.  I have CAM installed but that will have no effect on commutes.

In the beginning I built more development so that the Avenue was directly through the middle of the developement and the highway would be an offset of 12 tiles extra to travel.  At first I had about 75 to 85% of my commuters using the Avenue, but as I began to expand that number became much closer to 50%.  The simulator was working alot better in my opinion and sims were actually using the highway.  Commute times started at around 70 minutes and by 12,000 people I had around 95 minutes.  This increase in time was due to two things, more commuters on the road and that development was expanding outwards away from the Avenue and Highway.  If there was no change in the average distance I would expect that the time change would not be all that drastic, but it would still be up around 80 minutes compared to 70 minutes.

This new simulator seemed to spread the sims out alot better and they travelled the full 500 tiles or so to get to work.  It looks as if it will allow for the "downtown" atmosphere where you can have suburbs at one side of the tile and a downtown business district on the otherside.  It will also keep everything in balance.

The pathfinding looks realistic too.  I tested putting 2 busstops in, one for sims to get on and one to get off and walk to work.  They walked about 15 tiles or so away.  They could walk further but the Commute Time was probably a bit too far and the car would have been faster anyways.  This will allow you to atleast not have a busstop on every block and allow you to have a semi-realistic bus layout.


Oh... and I havent added the park and ride thing yet either.  It would be nice to force your sims to park in a downtown parking lot and then walk the rest of the way to work.  That will be my next test.
« Last Edit: October 14, 2007, 02:11:55 PM by jplumbley »
"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 ssc4k

Re: Commute engine tweaking for NWM
« Reply #9 on: October 14, 2007, 02:04:49 PM »
i don't get what jplumpley said but im sure its nice... i think :P
(\__/)
(='.'=)
(")_(")
This is Bunny. Copy and paste bunny into your signature and help him gain world domination.

Offline mott

Re: Commute engine tweaking for NWM
« Reply #10 on: October 14, 2007, 09:12:06 PM »
@jplumbley:

Well, I'm a little ahead of schedule so I just want to check in with you.  Sounds like you've got it figured out pretty well already - and that "speeding" thing works wonders, doesn't it?  I first discovered it when I was trying to make Sims start using the next parking lot over, before the first one had saturated.  What it did to commute patterns in general was a pleasant surprise.

Reverting to the original Maxis "speed" settings was a good idea, as I think I just figured out what the "pathfinding heuristic" magic number is about, and staying inside the general Maxis-supplied range of values is probably a good idea.  So I'll work from the numbers you supplied.  90 minute max commute each way sounds about right - it's exactly the amount of time it would take to walk a large city tile across the diagonal, and back.  Perfect.   It's all simple algebra from there, really.

The more I think about it, the more I like the idea of keeping road/TLA the same basic speed as the rest, but having them carry 1/3 fewer vehicles (2400/tile vs. 3600, for example).  Then if a one-way pair (or equivalent) enters town and becomes a TLA, you'll need to widen the road an extra tile to a TLA-7 to maintain that same 3600 capacity each direction.  The middle lanes would be less affected by frontage-related congestion, too, so traffic would prefer them slightly and through travelers would tend to move into the centermost lanes.  That's  realistic, but would people complain about the width requirement?

On the congestion vs. speed front, I did some research in my area... the Eastshore Freeway (design speed 50 MPH) moves at 65-70 when clear (only at 3:45 am), the design 50 when saturated to 100%, and 12-15 when at 150%, call that 1/4 speed at 150% use?  The San Diego Freeway down in LA does hit 200% usage, and as the joke goes, it's called the 405 because you're doing 4 or 5 mph.  1/16th design speed, then, at 200%, and 1/64th at 300%?  By 1/64th speed, it's be faster to walk, or nearly so.  I've had good luck with these ratios in my testing.

Oh, and I found where I can make congestion show up sooner on the data view, to support the above numbers.  100% use will now be bright yellow, 150% an ominous glowing orange, and 200%, pure red.  At least, as soon as I can figure out the 0-255 scale it's on internally.  Currently, pure yellow is usage 0x1A, or 26.  I think that color hits at 260% normally; I'll have to trial-and-error it. 

You mentioned accident rate.  There are three entries for this in the commute tuning exemplar.  These are:

* Accident probability (range 0-1, default 1).  The probability that an accident that should happen actually will.  This can be used to scale the global accident rate without affecting the other tuning ratios. 

* Congestion vs. Accident Probability curve.   Maps congestion to an accident probability.  I'm thinking 100% usage should have 4x the accident rate of an open road, and 150% usage 16x, 200% usage 64x, something like that?  Any ideas here?

* Capacity vs. Accident Probability curve.  Maps capacity to accident probability.  The highest-capacity road is the Maxis highway, which should probably have 25% the accident rate of a normal road, if I remember real-world accident statistics properly, and the RHW and 1-way/ave, what, maybe half?  Not sure here.  Roads and TLAs should probably have more accidents than the networks with medians, due to the uncontrolled turns, so setting the road capacity to something different than 1-ways  - even if it's only a single vehicle difference - would allow us to make divided roads safer than undivided ones like TLA.  Those response curves don't have to be smooth and even, so by making each network type even just a single vehicle different in capacity, we can give them their own unique accident rates.

Any thoughts about what the general default accident rate for a regular road at 100% usage should be, or what the curves should look like?  I wish I knew what the unit was here... probability of an accident occurring (per trip?  per tile?  probably per tile, I think, but what's the time frame?  Probability of an accident per second?  Minute? Hour?  Day?).  At least it we get the curves set up correctly, the global scalar can be used to tune the rate up or down.

The "Map Distance To Minutes" multiplier (default 25) seems to be what the "map distance" is multiplied by to determine the freight trip time that is given when you query industrial zones.  This is clearly on a 0-255 scale since with no connections, you see freight trips of 255 minutes.    Someone made a mod that gives you detailed query info for all zone types; I need to check to see if it's used there as well - if so, we need this multiplier to be tuned correctly as well, in order to avoid causing R$$$ abandonment issues based on perceived commute time. 

The "transit switch cost vs. funding" curves would allow players to make transit stations relatively faster or slower with funding.  The problem is, it also leads to rail damage if the slider is set below 67%.  By default, you don't have to keep your transportation funding any higher than that to avoid damage (there's a curve for funding/damage as well that can be altered though).  We could probably have some fun with the funding/delay curve in the 67%-120% funding range, if we wanted to.

Traffic noise is going to be a balancing act, since a resident's "noise" is the same as a business's "customers."  This should be fun.

Thanks for the good karma, and I'll give you a chance to respond, then I'm going to make an alpha version for you to bang on.  Less talk, more do, and all that. :)

PS: One neat consequence of the "park and ride" mod: If it's impossible to drive anywhere because there are no parking facilities, all the Sims will walk to work.  There can be no road neighbor connections or they'll drive off-map, but passenger ferries are OK.  This makes no-car, transit-only cities possible, except you can't get garbage deals due to lack of road connections.  In any case, with the park-and-ride mod, you'll at least be able to decide when (if?) cars are "invented."  Until you plop that first parking lot or make a car-based neighbor connection, they haven't been, and people just walk.  I'm not sure how R$$$ Sims would react to this.  A little cheat-testing may be in order to find out.

Offline jplumbley

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1438
  • Total likes: 12
  • Reputation: 43
  • "RULer 10000002"
  • CL: Plum Fierce
Re: Commute engine tweaking for NWM
« Reply #11 on: October 14, 2007, 10:54:59 PM »
Well, I'm a little ahead of schedule so I just want to check in with you.  Sounds like you've got it figured out pretty well already - and that "speeding" thing works wonders, doesn't it?  I first discovered it when I was trying to make Sims start using the next parking lot over, before the first one had saturated.  What it did to commute patterns in general was a pleasant surprise.

As it turns out in my testing of the simulator I wrote based on the calculations I posted earlier, my sims will not reach 200% capacity on the road system.  In fact if forces them to use busses if the road becomes too congested.  I had more than 50,000 sims in my test today and I had total about 24,000 commuters across town.  There was 1 avenue, 1 G-highway, 1 rail and 1 monorail.  The rail and monorail combined had about 3,000 commuters.  Car traffic was sitting at about 6,800 on the highway and 3,500 on the Avenue.  The bus traffic on the avenue was breaking 4,200 and on the highway about 5,700.  I had saturated the Avenue and Highway with cars and anything I added was going to the Rail, Monorail or Busses.

I looked back at the Capacities of the Avenue and the Highway which were respectively 2,500 and 4,000 commuters per tile.  Since the Highway had a higher speed it would explain the little bit extra capacity % it was able to handle before becoming saturated.  Also, due to the over-saturated road there speeds were way down to less than 50% normal speed (this includes the busses) so the time as I added more and more sims started going off the charts.  Im not sure why I wasnt starting to get abandonment, the commute time was over 200 minutes due to the amount of traffic and the distance they were required to drive.

Anyways...

On the congestion vs. speed front, I did some research in my area... the Eastshore Freeway (design speed 50 MPH) moves at 65-70 when clear (only at 3:45 am), the design 50 when saturated to 100%, and 12-15 when at 150%, call that 1/4 speed at 150% use?  The San Diego Freeway down in LA does hit 200% usage, and as the joke goes, it's called the 405 because you're doing 4 or 5 mph.  1/16th design speed, then, at 200%, and 1/64th at 300%?  By 1/64th speed, it's be faster to walk, or nearly so.  I've had good luck with these ratios in my testing.

Oh, and I found where I can make congestion show up sooner on the data view, to support the above numbers.  100% use will now be bright yellow, 150% an ominous glowing orange, and 200%, pure red.  At least, as soon as I can figure out the 0-255 scale it's on internally.  Currently, pure yellow is usage 0x1A, or 26.  I think that color hits at 260% normally; I'll have to trial-and-error it. 

On the Congestion vs Speed, I dont know how far we need to look into this its something relative to driving styles around the world but it will be very close in every situation.  I think we need to find something that will fit within the guidelines to prevent traffic from overuse of one road and look for more options when it gets overused.  MAXIS did not implement this well, in fact the numbers I implemented from above seemed to work very well throughout my developement test.  Sims, tended to follow the the quickest way and held a fairly even split amoungst the different options.

But, you failed to mention the name of your Congestion Color property.  Do tell!!  Id like to play with it.

About Accidents... They are a fairly random occurance, we probably have on average 4 on major highways across the GTA a day, for those who live in the GTA obviously there are those messed up day where there are many more but then there are oter days where there might not be any.  I would not consider a bumper banger as a type of accident for SC4.  For Congestion vs Accident Probability, I think it would be best to trial and error this one.  The stats I would tend to use would be low.

Congestion vs Accident Probability:
0% = 0% chance
25% = 1% chance
50% = 3% chance
100% = 9% chance
200% = 25% chance

You dont want the chance of an accident to be too high as it would cause accidebts on all roads.  I would also assume the accident rate is per commute (Mornig then Evening) or 2 per day.

The "Map Distance To Minutes" multiplier (default 25) seems to be what the "map distance" is multiplied by to determine the freight trip time that is given when you query industrial zones.  This is clearly on a 0-255 scale since with no connections, you see freight trips of 255 minutes.    Someone made a mod that gives you detailed query info for all zone types; I need to check to see if it's used there as well - if so, we need this multiplier to be tuned correctly as well, in order to avoid causing R$$$ abandonment issues based on perceived commute time.  

Well for this one I already calculated it to be 10.54 with my previous post and suggestions in that post.

The "transit switch cost vs. funding" curves would allow players to make transit stations relatively faster or slower with funding.  The problem is, it also leads to rail damage if the slider is set below 67%.  By default, you don't have to keep your transportation funding any higher than that to avoid damage (there's a curve for funding/damage as well that can be altered though).  We could probably have some fun with the funding/delay curve in the 67%-120% funding range, if we wanted to.

What I meant by using this property, we can use it as the variable.  By standardizing the TE Lots to have certain Switch Costs per tile we can adjust this property by the factor the "Max Commute Time" or "Speeds" have been multiplied.  I hope that makes a little more sense.

You were saying earlier that you dont want to have to manually change all the TE Lot to conform. Well this is a way we can have the updated once to be standardized and then never have to touch them again.


BTW, have I mentioned that you didnt tell me the property name of the Congestion Color so thar I could play with it?

Keep up the good investigations, we should have a new simultor built that is really balanced and works well for the game.  One property I would like to find is the on that handles the Cost of entering a neighbor.  I thought I saw it once but I havent seen it recently.
"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 RippleJet

Re: Commute engine tweaking for NWM
« Reply #12 on: October 15, 2007, 12:23:11 AM »
PS: One neat consequence of the "park and ride" mod: If it's impossible to drive anywhere because there are no parking facilities, all the Sims will walk to work.  There can be no road neighbor connections or they'll drive off-map, but passenger ferries are OK.  This makes no-car, transit-only cities possible, except you can't get garbage deals due to lack of road connections.  In any case, with the park-and-ride mod, you'll at least be able to decide when (if?) cars are "invented."  Until you plop that first parking lot or make a car-based neighbor connection, they haven't been, and people just walk.  I'm not sure how R$$$ Sims would react to this.  A little cheat-testing may be in order to find out.

A car-free city is possible already today (with just RH), and this is how I'm usually playing:
- The roads from residential areas only go to border crossings, and likewise in all cities.
- The roads to commercial and indstrial areas are blocked for everything else but pedestrians.
- Freight from industrials go out of town by rail (every industrial lot has direct access to the railroad).
- All commute within the city is handled by subways, and even R§§§ are willing to take the subway if that's the only option.

Offline Tarkus

  • Administrator
  • Forums Legend
  • *
  • Posts: 11408
  • Total likes: 4652
  • Reputation: 73
  • NAM Team Tankadillo
    • NAM HQ
  • CL: Dr. PuzzlePiece
Re: Commute engine tweaking for NWM
« Reply #13 on: October 15, 2007, 01:10:47 AM »
Mott, this is a very insightful and intriguing post, and I'm still making my way through all the information here. :D  You did good. :thumbsup:

I'm in total agreement about equalizing the Road/OWR/Avenue capacities and speeds--otherwise, the TLA-5 would end up with 40% of the capacity of the normal Avenue, which doesn't make any sense at all.  In general, I kind of thought that the advantages that Maxis gave the OWR and Avenue networks were unrealistic given the number of lanes they had in comparison to the Road network. 

The settings I'm currently using with my prototype NWM Simulator have the Road/OWR/Avenue capacity set to 1500, and the speed set to 70, assuming a kilometer-per-hour measurement (based on what Swamper77 had told me).  The game has been acting quite favorably with the new settings, though I do need to do more testing.  I'll get some screenies up soon. 

I haven't really messed with any of the other settings yet, though seeing what you've done here, I may just have to try it. ;)  My methods of building cities and transportation networks is also rather "unorthodox" at times, so I'm looking forward to comparing some notes. :)

And I too want to know what this congestion color property is.  It would be nice to have an even more accurate Traffic DataView. ;)

A lot of what you've found out here is very reassuring news for those of us working on the NWM, too. :)

-Alex (Tarkus)

Offline mott

Re: Commute engine tweaking for NWM
« Reply #14 on: October 15, 2007, 03:22:58 AM »
@Ripplejet: Quite right; I'd forgotten about the "blocker" lot method.  Correction: Park-and-Ride Mod will let you do walking-only cities without having to plop blocking lots all over the place.  Instead, you'll get to plop parking lots all over the place to allow driving.  Would you like fries with that micro-management?  ;D

@Tarkus: If it weren't for the NAM Team, my game would have been on a shelf under a pile of dust for years now.  I am very glad to be able to give something back.  I love where the RHW/MIS is headed too; you're just one set of left-exits away from perfection!  *poke*  (everyone has a "pet feature" they lobby for; I'll pick "left exits.") EDIT: I'll also close my parentheses, and question whether teasing the guy who just gave me karma is really a good idea. ;)

@jplumbley: The exemplar you seek is a type 0x10 called "DataView: Traffic."  It is located in SimCity1.dat; its TGI is 6534284A:690F693F:4A0B6809. 

In that file, the property you probably want to look at is the one called "Colour ramp."  It has 24 reps, formatted as 12 value pairs.  The first element in a pair is an integer in the range 0-255 that represents "usage" somehow, and the second is a color value.  Where "100% usage" occurs on a scale of 0-255, I have not yet properly determined.  All I know for sure is that 0 = no color at all, 1 = pure green, and 1A (26 decimal) is the pure yellow, and those are the first three pairs.  The remainder is a long slow transition through shades of orange and into pure red, which occurs at 255 usage.  The only way I can think of to determine for sure what 100% is on this scale, would be to alter the table so it changes from green to red instantly at some known point, then run a test city and see what % usage is required to get there, then adjusting and re-running the test.  I have a feeling that 100% = 10 (decimal), or somewhere near it.  This table really only needs 3 or 4 entries in it: none at no usage, green at the first vehicle, yellow at 100%, and red at 200%, and red again at the 255 marker, whatever % that is.  Maxis stops adding time penalties after 300% usage so people can get away with some incredible congestion, hence all those shades of orange-red that we won't need because it's just not going to be possible to get there with our special little mod, is it?  Good, it shouldn't be. 

There's also a 9-rep listing of "legend colors" that is nothing but a list of RGB values for the color scale presented to the user in the dialog box that appears in the Traffic View.  It will probably need some adjusting too - and maybe changing of the legend so instead of "low usage" to "high usage" it's "0 - 300%", or something like that, with the appropriate color scale presented to the player.

On another topic, your experience with congestion causing bus usage reminded me that a while ago, I modded my pathfinding file so that buses were slower than cars, not faster.  I'd forgotten that I'd done this, and it will change the results you see with buses versus what I see.  If you're feeling experimental, try setting bus speeds to be about half of the driving speeds and see what changes. 

I did it because there's no way to force bus riders to wait through stops like there is for the rail stations that let you drag tracks through them.  (Except the road-top bus stops, but those have other implications that I'd rather avoid).  Sims preferred to stay on the bus than pay the additional time cost of transferring to the train, because there was no time cost involved with waiting through stops.  So I slowed the buses down to reflect frequent stops, until it was faster to transfer to the train than to stay on the bus.  This is unrelated to the tuning changes you need, but I thought I'd mention it because it does change how the Sims react to traffic.

Also I made pedestrians generate traffic and also be affected by it, so drivers will avoid pedestrian-heavy streets, and pedestrians will prefer not to walk on busy streets if they can help it.  All those pedestrians getting off the subways and buses and crossing the street ties up traffic there.  It's a much more realistic model of how transit stops affect street traffic than the Maxis no-traffic-at-all model, or the one-bus-per-Sim disaster that occurs if you change it so buses themselves generate traffic.  Buses don't generate traffic in my game, but all Sims walking around the stops do.  If other people would want this to happen, I don't know.  I like it, and it helps keep pedestrian-mall commercial areas alive.  It also un-privileges driving vs. transit a little bit after I slowed down the buses.   Networks that don't allow pedestrians, such as highways and RHW, take on a new dimension of usefulness.

To further un-privilege drivers vs. transit, there's the "commute trip starting cost by transit type" property in the pathfinding exemplar, and its related entries for car-preferred and transit-preferred trips by transit type.  This is where that hefty time penalty for forcing Sims to use transit instead of driving is assessed.  You'll notice that for the car-preferred strategy, there's a huge trip starting cost for taking transit.  In my game, I removed the penalties, because I don't think artificially inflating commute times is the proper way to reflect people's preference for driving.  Instead, I gave driving a penalty of 1 minute to 90 seconds (I'm still experimenting with it) to reflect the time it takes to open the garage or walk to where you parked, start and warm up the car, pull out... this is assessed whether you wanted to drive or not.   And by the time you've done that, your neighbor who rides the bus has walked to the bus stop on the corner, if it's only 5 or 6 tiles away.   The time it takes to walk to the bus stop and wait for the bus to come is the same whether you wanted to ride the bus or not, and the game already models that reality and it priveleges driving because walking is so slow.  I'll bet that's why Maxis made the buses so fast in the first place, to make up for it.  There are better ways.
 
Now, if you'll excuse me, you said you found a file that contains a setting for the cost of commuting off-map?  That would be very helpful indeed.  If you say you saw it, I have a good idea where to start looking, so I'll just go fishing for it.
« Last Edit: October 15, 2007, 03:50:29 AM by mott »

Offline Shadow Assassin

  • NAM Team
  • Forums Guru
  • *
  • Posts: 3232
  • Total likes: 12
  • Reputation: 25
  • Needs more cowbell.
  • CL: The Grid Reaper
Re: Commute engine tweaking for NWM
« Reply #15 on: October 15, 2007, 05:25:47 AM »
Quote
Congestion vs Accident Probability:
0% = 0% chance
25% = 1% chance
50% = 3% chance
100% = 9% chance
200% = 25% chance

There should still be a very small probability of accidents happening on roads with 0% traffic. After all, quite a few single-car accidents happen from time to time. Maybe it could be set to 0.05% or thereabouts?

Still, I'd recommend this:

0% = 0% chance
50% = 3% chance
100% = 7% chance
150% = 14% chance
200% = 25% chance

That'd make a very nice curve, and would be more or less similar to real world data. This takes in account the speed of people (there may be a margin of error), which is why the crash rate isn't exponentially higher for capacities above 100%. It could be adjusted according to what people want, so long as the ratios remain the same.

Anyways, mott, are you able to send me your transit mod? I'd like to try it out and see how it plays region-wide in one of my regions.
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!

Offline jplumbley

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1438
  • Total likes: 12
  • Reputation: 43
  • "RULer 10000002"
  • CL: Plum Fierce
Re: Commute engine tweaking for NWM
« Reply #16 on: October 15, 2007, 07:12:29 AM »
On another topic, your experience with congestion causing bus usage reminded me that a while ago, I modded my pathfinding file so that buses were slower than cars, not faster.  I'd forgotten that I'd done this, and it will change the results you see with buses versus what I see.  If you're feeling experimental, try setting bus speeds to be about half of the driving speeds and see what changes. 

I did it because there's no way to force bus riders to wait through stops like there is for the rail stations that let you drag tracks through them.  (Except the road-top bus stops, but those have other implications that I'd rather avoid).  Sims preferred to stay on the bus than pay the additional time cost of transferring to the train, because there was no time cost involved with waiting through stops.  So I slowed the buses down to reflect frequent stops, until it was faster to transfer to the train than to stay on the bus.  This is unrelated to the tuning changes you need, but I thought I'd mention it because it does change how the Sims react to traffic.

Also I made pedestrians generate traffic and also be affected by it, so drivers will avoid pedestrian-heavy streets, and pedestrians will prefer not to walk on busy streets if they can help it.  All those pedestrians getting off the subways and buses and crossing the street ties up traffic there.  It's a much more realistic model of how transit stops affect street traffic than the Maxis no-traffic-at-all model, or the one-bus-per-Sim disaster that occurs if you change it so buses themselves generate traffic.  Buses don't generate traffic in my game, but all Sims walking around the stops do.  If other people would want this to happen, I don't know.  I like it, and it helps keep pedestrian-mall commercial areas alive.  It also un-privileges driving vs. transit a little bit after I slowed down the buses.   Networks that don't allow pedestrians, such as highways and RHW, take on a new dimension of usefulness.

To further un-privilege drivers vs. transit, there's the "commute trip starting cost by transit type" property in the pathfinding exemplar, and its related entries for car-preferred and transit-preferred trips by transit type.  This is where that hefty time penalty for forcing Sims to use transit instead of driving is assessed.  You'll notice that for the car-preferred strategy, there's a huge trip starting cost for taking transit.  In my game, I removed the penalties, because I don't think artificially inflating commute times is the proper way to reflect people's preference for driving.  Instead, I gave driving a penalty of 1 minute to 90 seconds (I'm still experimenting with it) to reflect the time it takes to open the garage or walk to where you parked, start and warm up the car, pull out... this is assessed whether you wanted to drive or not.   And by the time you've done that, your neighbor who rides the bus has walked to the bus stop on the corner, if it's only 5 or 6 tiles away.   The time it takes to walk to the bus stop and wait for the bus to come is the same whether you wanted to ride the bus or not, and the game already models that reality and it priveleges driving because walking is so slow.  I'll bet that's why Maxis made the buses so fast in the first place, to make up for it.  There are better ways.

 ;)  I have "un-privilaged" busses already, and they are actually set at close to 10% less speed than cars.  When traffic speed is reduced due to congestion, which busses are affected by, the gap narrows and almost becomes equivelant to driving.  But, the real reason I think I was getting increased bus useage was because my raods just couldnt handle more traffic.  At 200% they would be driving at 20% of the speed so, 12km/h on Avenue and 20km/h on Highway.  The useage was already up in the 175% range and I think the Simulator was essentially preventing the traffic from getting any denser.  This is something we havent really seen before because the Congestion vs Speed Property wasnt implemented properly and this new model is preventing more than 175% of cars because it will be just way too slow.  Now, I can later test lowering the bus speed more to say 20% less and see what the difference is, but to be honest I dont think it will be all that much.

I like the concept you have discussed about the "un-privilaging" of cars.  It makes more sense because Johnny Simalot will walk to a nearby work or grab a nearby bus rather than drive.  I dont know about making the Ped Traffic add to usage, as there would be mixed views across the Community, but I for one would be willing to test it out.  My worry for that would be downtown areas where there will be ALOT of commuters especially with Stage 15 Towers where you can have 20,000 Residents or Workers in a building.  That may cause a traffic nightmare and for a city to work you may need a way around it with Ped Traffic (which doesnt add to usage).  Also, if you think about it your park and ride or park downtown and walk to work would end up screwing you over in the end, making downtowns virtually unattainable because you only have a limited amount of capacity to your roads.

I definately will be playing with the Congestion Colors tonight, that is for darn sure!

There should still be a very small probability of accidents happening on roads with 0% traffic. After all, quite a few single-car accidents happen from time to time. Maybe it could be set to 0.05% or thereabouts?

Still, I'd recommend this:

0% = 0% chance
50% = 3% chance
100% = 7% chance
150% = 14% chance
200% = 25% chance

That'd make a very nice curve, and would be more or less similar to real world data. This takes in account the speed of people (there may be a margin of error), which is why the crash rate isn't exponentially higher for capacities above 100%. It could be adjusted according to what people want, so long as the ratios remain the same.


Hey SA, I dont think you need 0.05% at 0% capacity because, technically there is no traffic and no cars to actually get in an accident.  As this makes a curve anyways it can stay at 0% chance of an accident because at 1% Capacity it will have an Accident Probability of something like 0.1%, I dont wanna actually do the math to work it out but you know what I mean.  Again as i stated earlier, this will be subjective all the time I just threw some numbers there that were guesstimates and are pretty close anyways.  If you notice I multiplied the Capacity by 2 and the Accident Probability by 3 roughly for each increment, making a fairly smooth curve already ;).
"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 #17 on: October 15, 2007, 10:47:49 AM »
I've been monitoring the progress of these project. I admit that there are some things I dont understand either  $%Grinno$%. But Keep Up the Great Work anyways! &apls &apls &apls &apls :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 mott

Re: Commute engine tweaking for NWM
« Reply #18 on: October 15, 2007, 02:13:39 PM »
Hi all, my meeting went well and I'm just one trip to East Oakland to pick up printed materials away from being free, yay!  Just wanted to check in.

Completely O/T: I couldn't find the off-map commute time cost setting.  But while I was looking for it, I found the LUA script that generates those stupid green track checkers around train stations.   So I isolated it into a patch, and commented out the line that makes the track checkers an occupant of train stations.  So now they're gone.  This is not an "invisible model" trick - the game just doesn't make them any more, at all.   I've attached it if anyone wants to give it a test run, and if it works for everyone else, I'll upload it over at ST once we're assured that it's OK for general public consumption.

If any of you are playing with the network speed adjustments right now, I think staying close to the Maxis values for network speeds rather than the 10x speed range is a good idea.  At least, if I'm right about what the magic number known as "Pathfinding Heuristic" represents.  If I'm right, the fact that "perfect pathfinding" occurs at a Heuristic of ~0.003 is not an accident or a coincidence, and it is directly related to Maxis's network speed settings.   Staying close to Maxis's speed scale is probably best, until I can do more research onto that heuristic.  I don't think anyone's ever explained the exact purpose of the number, other than that it has something to do with pathfinding accuracy, and a value of 0.003 does very good things compared to Maxis's magic value of 0.09.  When people pick constants out of thin air, they don't choose 0.09 or 0.003.  These numbers had to be arrived at as a consequence of something else.

Procrastination over.  Me, truck, boxes, freeway, (paycheck!), now.  See you guys in a few hours. 

Offline wouanagaine

  • NHP Team
  • Forums Guru
  • *
  • Posts: 2854
  • Total likes: 7
  • Reputation: 43
  • CL: :computer: SC4 CodeMaster
Re: Commute engine tweaking for NWM
« Reply #19 on: October 15, 2007, 04:28:24 PM »
Heuristic is a term used in A*, a known algorithm for pathfinding. Google for A Star or A* and you'll find tons of reference

The heuristic is a fonction used to estimate the distance to the goal from a point. The estimation can be biaised in order to get to the goal quickly ( leading to poor pathfinding ) or by exploring a a lot of possible paths ( leading to poor performance ).

I have not look into the pathfinding examplar, so I just throw ideas, but 'Heuristic pathfinding' may be that biased factor.
New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dmscopio ♦ dedgren ♦ emilin ♦ Ennedi ♦ Heblem ♦ jplumbley
M4346 ♦ moganite ♦ Papab2000 ♦ Shadow Assassin ♦ Tarkus ♦ wouanagaine
Divide wouanagaine by zero and you will in fact get one...one bad-ass that is - Alek King of SC4