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

ldog

I understand that maybe this was not the right thread to post these questions but with all due respect there is no need to be a jerk about it. Expecting exactly this kind of response was why I dragged my feet for 2 weeks posting any of these questions.

I was going to post these questions in the traffic thread poll but since you requested discussion be posted here so as to not derail the poll thread any further than it has been I complied with your request. I suppose I didn't make clear my questions and my reasoning for the questions is less about Sim Z and more about the traffic sim in general. The way things are going it looks like there will only be 1 traffic simulator for the NAM.

I figured you were the person to ask but if you don't want to help me, well you certainly don't owe me or anyone else here anything.
Saying that there is no point in answering my questions, that the Z sim is the ultimate, there is nothing else that can be done with the traffic sim, that I don't have a clue what I am messing with and should just leave it to the expert (you) and toddle off and go work on some other mod is HIGHLY pretentious.

I understand plenty enough about how most of this game works including the traffic sim. Every time I make a change to the traffic exemplar I also go and make the relevant derived changes to a bunch of other files as well (the data viewer, transit switches,etc) so that everything is in tune. There is not a single piece of content that I have downloaded and used without tweaking it in some way. Most of how this game actually works I have figured out by pouring over exemplars with ilives reader. So uhh yeah, I really take offense at "you obviously have no clue what you are doing and shouldn't mess with any of it"

I am not by any means knocking all your hard work. Many of the changes you have made are brilliant. I did however realize pretty quickly though that it is designed for something completely different than what I want to accomplish. I realize I may not have phrased some of my questions very clearly but I thought most of them were pretty much yes/no or simple answers that I would expect someone who thinks they know the traffic simulator inside and out to know off the top of their head. Also while I have made every effort to be thorough in reading the 2+ years of discussion threads about the sim I know that I might have missed some relevant information because I have to skip over all the useless posts in a discussion thread. I did not find any mention of some of these things anywhere.

I have been generally happy with the results I am obtaining but I am just looking for clarification and trying to understand or make sure I understand everything properly.

Question 1 was pretty cut and dry. I am asking if "nearest destination attractiveness" is the pathfinding heuristic. I am not asking what the pathfinding heuristic is, how it works. I am not even interested in changing the value from yours since I think you hit it on the head. I simply want to know where in the exemplar it is defined because I do not see "pathfinding heuristic" in the reader.
I know you know the answer to this since you have worked with it. No hours of work here. Would it really have been that difficult to answer that question?

Question 2...well I can see how maybe you might take offense and see that as an attack on your sim, which was not my intent and if so I apologize. I am trying to determine what is the needed travel distance because my goal for my traffic simulator is just to rebalance and make the game fun but challenging. While I have some interest in realism, my personal feeling is that realism is good so long as it does not conflict with fun (if I wanted strict realism I would stay in the real world). So I have no interest in making an accurate to scale city recreation, which is what the Z sim is designed for and apparantly damn good at. Someday I will probably install the CAM and all kinds of other things that right now I have no interest in using and then yes, your sim will be the perfect sim for that. Right now it isn't. I am not asking you to redesign your sim for me. I am asking for help in designing my sim for me. I am also not looking to "compete" with you and come out and say here is my sim which is better than your sim. While I put it up for download at some point, it is only by the reasoning that if even 1 other person likes it and wants to use it then it was worth sharing but I am doing this for myself and even if noone else is interested it is still worth the effort.

Question 3 I thought was very valid and if it was mentioned in any discussion I can't seem to find it. Perhaps noone has even thought about it. Depending how the game engine handles it, it is either a very relevant question or it is completely irrelevant. Judging by the fact that you set yours to 60 that implies that you know it is irrelevant (because maybe there are way more time units in a game day, or the commute time unit has nothing at all to do with the game day time unit) OR you know it is relevant but you don't care (which I doubt) OR you don't know. Those are really the only 3 possible answers.

Question 4...ok this was kinda malformed. I went back and reread some of the relevant discussion. I pretty much understand how it works. Between what others have said and my own experimentation it is really not relevant to say "how many commuters per hour do I want passing through this network before it becomes congested" all you really need to determine is how many you want per commute (day or evening or just take whatever total you want and divide it by 2). I guess I was just looking for a bit of clarification on setting a realistic number, but really the deciding factor for me on it is how often I want to be bugged by congestion messages.

Question 5 once again, very simple question, very relevant. If each person who gets on the bus is their own bus, then having the bus generate congestion defeats the main purpose of the bus (which is to reduce congestion). That is why Maxis set them not to. That is also why they privileged the bus with extra speed (I concur with you that the bus doesn't need the extra speed as it is already privileged enough...but I am not interested in making it slower "for realism" as you did) I know somewhere you stated that you had found some suitable workaround (for the congestion effect) but you did not say what. I also can't extrapolate it from the exemplar. Being as everything else in the NAM is mostly RUL files and concerns network segments themselves leads me to the conclusion that everything about the traffic simulator that is not in the exe is contained in the single exemplar file. So you know the answer to this. No hours of work here either.

Question 6 & 7 I did not express myself well at all. My bad. Also, once again I don't have the game here in front of me at work so I may not be asking about the variables I mean to ask about, but let me try this again.

6. Since pedestrians do not generate and are not affected by traffic (in your sim, my sim, default sim, anyone elses sim that I've seen). They either are going to be affected by the lowest congestion speed factor (1.3 at 0% for example) OR they are going to completely ignore the congestion values and always run around at their stated speed. There are NO OTHER possible answers. Either you know or you don't. So all you had to do was say A, B or I don't know. Now I thought about it and I think I can pretty easily whip up a test mod to find out (do not allow any other traffic type to reach destination, see how far they walk) and maybe that is what I will do when I get home tonight.

7. While this would seem to be a no-brainer, because if you don't generate traffic then you won't count towards the congestion total obviously. That applies to a network segment. But RTMT and other stations are not network segments, they are lots. So really what I am asking is how does lot capacity work. Considering you give estimates for station cap and have pretty much taken over the RTMT as well I would expect that you this unless you are just pulling station capacity number out of your ass. While I understand this can't all be done purely by mathematics becase there are too many interelated factors to consider and in the end it all comes down to how it works out in the game you must have come at some rudimentary formula to determine station capacity vs network capacity.

Also here is not a question I posted because I know the answer but an example of why I am doing my own sim and that I do understand at least some of the relationships between values in the simulator. As you have it one-ways and avenues have no advantage over roads and therefore no usefulness under sim Z. I understand this was done in anticipation of the NWM which is why I did not pose the question. However A the NWM is not out yet and B I really have no interest in using it. My solution? I set 1-ways to have 1.5x the capacity of a road, the avenue to have 2x road capacity and about 30% higher "speed limit". This to me is a good balance. I came up with these figures on Mott's "1200 per lane, 1800 per lane unrestricted left turns". While I may vary the capacity, I always stick to this ratio. The one-way costs the same as a road (plop and maintenance) but is less flexible so therefore should have some advantage. The avenue costs way more, it also takes up 2 tiles. While the capacity should be the same as two roads, it needs some advantage still or it is a waste of money. Also 2 one-ways would still have higher capacity so the extra speed needed to be added to compensate for that as well. Going further from that a highway is 2 one-way roads but of course with much higher speed and so I worked highway cap and speed off of that. I could go further but I think you can see where I am going with this and I don't want to bore everyone.

So if you say you don't want to share your information that's fine. I'd have a lot more respect if you just said so instead of patronizing me and giving me BS about how it would take you hours of work that you don't want to do. Which I am not asking you to do either, I am pretty sure you have already done the hours of work and I was just hoping you would answer a few questions. Like I said I realize you don't owe me anything. Honestly, you have already given me a lot because I've learned a lot just comparing your values to the default values, reading your posts, etc. So let me say thanks for making the sim and sharing it, even if I don't use it.

If you don't want to continue this discussion (which I suspect you don't since you blew me off the first time) I will respect your wishes and trouble your thread no further. I would repost my questions elsewhere but it would seem to me that you really are the only one actively working on the traffic simulator so I don't expect to get answers anywhere else on this forum.

z

OK, I'd like to meet you at least half way here.  Answering your basic questions is not difficult, as you pointed out; I can do that rather simply.  It is explaining why the decisions were made that is so time-consuming.  But I will give you the basic answers to your questions; I think other people may be interested in these answers as well.  It will have to be later today, though, when I have a bit more time.

jplumbley

Steve, considering where you and I started out, I would have thought you'd be more willing to help people learn more about the Simulators.  I learned through our dealings that I made a mistake in the way I responded to you when you first started posting, you are following the same road I did.  I hope you hear this as advice and help Idog out and give him the chance I didn't give you.


Quote from: ldog on October 20, 2009, 10:25:08 AM
1. I keep seeing the pathfinding heuristic mentioned but I cannot find it in ilives reader. I am assuming based on the values observed and in discussion threads that it is the "nearest destination attractiveness" but I just want to be sure.

It is in the Traffic Simulator Exemplar, probably about halfway down in the list of properties.  Basically, the lower the value the harder the Simulator looks for the shortest possible route, the more routes it compares.

Quote2. If commute time is reset after leaving the tile then isn't 60 WAY overkill? The maximum trip length for a large tile is 1024 (256 up, 256 across x2). Even a maximum congested highway in Z would only need 31 time units to cross the tile and back.

Simulator Z has attempted to use realistic values to create realistic paths.  It has done it's job finding the right paths and making sure that every Sim finds a job within a realistic physical distance.  The side effect of the overkill in such a high commute time is it almost negates abandonment in the game, making it much easier to play and keep pretty looking cities.  A lot of people like this and is probably part of the reason why Simulator Z is so popular in usage, especially for MDs.  It may not completely remove abandonment in the game, but it definitely minimizes it greatly because Sims will travel everywhere no matter the congestion.  Simulator A on the other hand, which is very similar to Simulator Z in many ways has a lower commute time (still higher than the Default) but refined for a large city tile.  It works with the limits of a large city tile to keep the challenge of abandonment a part of the game for those who are not interested in "sandbox" MDs but just playing the game and more focussed on the traffic and network portions of the game.

Quote3. Are commute time units independant from the timeclock for a sim day (and I am talking about the actual calendar day not the day/night day) ? I have not seen any mention of this anywhere. If they aren't I'm thinking that there are only 48 units in a sim day. I'm basing this off Maxis statement that "sims will only commute about 2.5 hours a day" and the default max commute of 6. Consider their "about 2.5 hrs" to actually mean 3 hrs and you get a 30 minute time unit (because I don't think that they arbitrarily picked 6). If this is the case then the max commute really should not be altered at all so speeds should be increased instead of time units?

To be honest, it is not really easy to compare the units in game to real life units.  But, let's make an example and do the math to find out the "real" travel time would be.

If we were to compare, let's use a network speed of 50 tiles per unit of time to make it easy (roughly the speed of a car in game).  Each tile is 16m in length and that would mean that a Sim would travel at 800m per unit of time.

So, what do you want to base your calculations as being the "real" value?  Do you want the 50 to mean 50 km/h?  Do you want the unit of time to equal, 1-minute, 30-minutes, 1-hour?  The reason I say that everything is unitless, is because it really can be viewed from many different points of view.  All that matters, is the number of tiles per unit of time, because that is how the game interprets it.

Just for fun, let's assume MAXIS tried to make the speed 50 mean 50 km/h.  If we reduce this to meters per minute:

50,000/60 would be 833.33 meters per minute

This makes it seem like MAXIS attempted to make the Speed and Commute Time roughly equal, km/h and minutes respectively.  That means, that the actual round-trip commute time they had in the default Simulator is 6 minutes. 

Why did they do that?

Simply put... What is the actual size of a City tile, 1km for small, 2 km for medium and 4km for large.   You physically do not have the "real" distances we have in real life travel.  So, they scaled it down to make it work in-game and make it challenging.

Quote4. Is capacity per time unit or for total day or half the day or what? Going by (I think it was) Motts figures, let's say I want 2400 cars per hour on road. Do I figure out my commute time into hours and then multiply the capacity by that? One-ways since they are theoreticly only used half the day do I set the capacity at what I want or double it or half of it? Something that seems very simple, cut and dried actually turns out to be quite complicated.

Capacity is a difficult thing again...  It is hard to compare it to per hour, per day, etc. in real life terms.  In the game it is "per day" which is both morning and evening commutes combined.  If you had 1000 cars on the road in the morning commute and 250 cars on the road during the evening commute the total for the day for the purpose of calculating "congestion" would be 1250 cars.  So, if you had a 2500 car capacity on a given network and you had the same 1250 cars on that road between morning and evening commutes you would end up with a congestion of 50% and your Congestion vs Speed curve would act accordingly.

Quote5. Doesn't making bus generate traffic defeat their purpose? If each sim that rides a bus still count as a vehicle then you aren't reducing the congestion any. I remember you saying you found a workaround but going through the file in the reader I could not find any variable that would seem to effect it.

I have to agree with you on this "defeating the purpose".  But, on the contrary it could be considered a "cheat" to have bus traffic not effected by congestion because it literally makes bus traffic unlimited.  To be honest, in real life, busses follow specific routes and reduce traffic.  There is no way in game to really emulate something like that.  To me they really act like a taxi service instead and if that was the case, then they really could change the skins and change the name of bus stations to taxi depots.

There is no direct "workaround" for this.  Either you add to traffic congestion or you don't, there are no ifs, ands or buts.  A possibility that Z might have used is reducing the amount of traffic created by each Sim in a building, but I don't know if that is what he has done or not.

Quote6. Type does not generate traffic(or is it not affected by traffic? I'm sorry I am at work right now)==not affected by congestion? Or in other words: Are my pedestrians (and bus if I decouple from traffic) going to run around at 130% speed because there is never any congestion for them or are they completely unaffected by the congestion modifier?

I am not entirely sure on this one.  My assumption would be that they will run around at 100% Speed not 130% Speed because it is "unaffected by congestion".

Quote7. If type doesn't generate traffic (i.e. peds again) should they not count against capacity (i.e. transit switches) and therefore station capacitys should never have to be inflated for the peds? (like RTMT for instance)

Transit Switches are special....  They have their own properties for "Speed" and "Capacity", but congestion works funny in them, if at all.  With all Transit Switches you will "Max" them out at roughly 10x the Capacity of the Lot, so if the Capacity equals 100, you can have up to roughly 1000 Sims passing through it.  I am not sure how the lots count Sims coming in or out of a station, there are a lot of bugs with the Transit Switches that are known, especially with how it counts Sims passing through and the numbers "counted" by the lot compared with the morning and evening commute queries, don't always align.


For those wondering, it took me roughly 1 hour interrupted by watching TV to answer the above questions.  I hope they provided some insight.
"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

z

Thank you for your assistance, Jason.  I write much slower than most people, so such a post would have taken me much longer.  However, my answers to a number of ldog's questions are different from yours, and as I promised him my answers, I will give them to him here.

Quote from: ldog on October 20, 2009, 10:25:08 AM
2. If commute time is reset after leaving the tile then isn't 60 WAY overkill? The maximum trip length for a large tile is 1024 (256 up, 256 across x2). Even a maximum congested highway in Z would only need 31 time units to cross the tile and back.

Although much of what Jason said here is correct, there are a few points that he left out.  The maximum commute time, like many properties in SC4, controls more than just the maximum commute time.  Specifically, it also affects the likelihood that Sims will commute into adjoining tiles, and therefore has a big effect on intercity travel.  My experiments showed that a max commute time of 180 was necessary to get substantial intercity rapid transit, and that a max commute time of 600 was necessary to achieve the same with cars.

Interestingly, the last value is not that different from the values used in one of Tropod's simulators.  This simulator used 10x speed and 10x commute time.  As Mott showed, increasing speed is similar to increasing commute time, though it introduces other complications.  So 10x speed and 10x commute time gives the Sims the same range as 1x speed and 100x commute time, which is what Simulator Z uses.

As for the challenge of a lower commute time, such as that used in Simulators A and B, the question is a bit more complex here.  The extra "challenge" introduced here is easily overcome by placing zones closer together.  Then it's as easy to run a city as it is in Simulator Z.  But real cities usually don't have their zones always placed that close together.  That means that it's impossible to build those cities without getting widespread abandonment.  That's not a challenge, since it simply can't be done; that's a limitation.  Do we really want a game that will not allow you to build real cities, or build cities with zones spaced the way they are in the real world?

Then there's the whole question of abandonment due to commute time.  Whole neighborhoods do get abandoned, but not because their residents decide that their jobs are too far away (especially when "too far away" is defined as a 9-minute commute; see below for details).  So why did Maxis introduce this?  Most likely for the same reason they introduced a lot of features; computing power of the average PC at the time of the game's release (almost seven years ago) required limitations of this sort.  But they aren't required today.  Do we really want them for the purpose of introducing artificial challenges?  There are plenty of realistic challenges in Simulator Z, many of which are not present in other simulators.  Personally, I think that the traffic simulator should not introduce unnecessary artificial challenges into the game, when it is capable of introducing so many real challenges (such as network cost, network capacities, travel fares, etc.)

Nevertheless, if people really do want this limitation, it could always be added to the NAM Tool, so that people could set their own max commute times.  I would be interested in hearing from people on whether or not they wanted this.

Quote
3. Are commute time units independant from the timeclock for a sim day (and I am talking about the actual calendar day not the day/night day) ? I have not seen any mention of this anywhere. If they aren't I'm thinking that there are only 48 units in a sim day. I'm basing this off Maxis statement that "sims will only commute about 2.5 hours a day" and the default max commute of 6. Consider their "about 2.5 hrs" to actually mean 3 hrs and you get a 30 minute time unit (because I don't think that they arbitrarily picked 6). If this is the case then the max commute really should not be altered at all so speeds should be increased instead of time units?

The Commute Trip Max Time property is well documented and refers to the round trip commute time in minutes.  Note that when you click on it in the Reader, in the bottom panel it specifically says, "Maximum time for a commute trip in minutes."  Now you can't believe everything you read in this game, so it's necessary to do a little checking, especially since the Prima Guide (which mentions the 2.5 hour figure) directly contradicts the internal documentation.  (Hint:  In such cases, it's generally quite safe to bet on the internal documentation.)  The one thing we know for sure is that the size of a square is 16 m on each side.  Not only is this documented extensively, but you can measure the scale of large buildings to verify it.  From here, you can use experiments to verify that the speed really is expressed in kph, which I did, and which is also what the Prma Guide states.  And from there, it's a trivial step to prove that Commute Trip Max Time is the round trip time in minutes.

From Jason:

QuoteThe reason I say that everything is unitless, is because it really can be viewed from many different points of view.

The experiments I have done have shown that this statement is not true; the units are as I have described them, which is consistent with the internal documentation in the game.  You can take that to the bank.

So the Maxis Commute Trip Max Time value of 6 means that Sims have exactly three minutes to get from their home to their job, door to door.  Again, the only reasonable explanation for Maxis' having done this is available computing power at the time.  The round trip figure of 2.5 hours (which is reflected to some extent in the Commute Time Graph, which was scaled specifically to show this) was devised to make things sound more realistic.  But it bears no relation to the reality of the game.

There are many reasons why you don't want to raise the speeds.  Mott mentioned some of them, including the Transit Switch Entry Cost.  But there are many others.  And there's no reason to raise speeds, when raising commute time accomplishes what you want without any side effects.

Quote
4. Is capacity per time unit or for total day or half the day or what? Going by (I think it was) Motts figures, let's say I want 2400 cars per hour on road. Do I figure out my commute time into hours and then multiply the capacity by that? One-ways since they are theoreticly only used half the day do I set the capacity at what I want or double it or half of it? Something that seems very simple, cut and dried actually turns out to be quite complicated.

What Jason said here is correct; capacity is per day.  A while ago, we all tried to figure out how long a commute period was, and we eventually gave up, because there's not enough information to determine that.  Fortunately, that information isn't required anywhere.

To be continued soon...

jplumbley

Quote from: z on October 21, 2009, 07:00:55 PM
Personally, I think that the traffic simulator should not introduce unnecessary artificial challenges into the game, when it is capable of introducing so many real challenges (such as network cost, network capacities, travel fares, etc.)

I think you said it most correctly here....  Not everyone thinks the same way.  This is why we should not reduce the Simulators down to one.  And you know my feelings on the NAM Tool being used to let people change the values themselves, especially when they haven't read into things.  Simulator A and B work just fine, they are a hybrid essentially of Simulator Z and the default Simulator from MAXIS.  We all know your view that your work is the best, now you must understand that others may feel the same way about their own work too, but are still willing to accept yours as exceptional work, just something different.
"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

z

#205
First, to answer Jason's recent post:  Yes, we are in at least partial agreement here, and I used the word "personally" quite deliberately.  Since Simulator Z is designed for everyone, if people don't share my opinion, then the option I mentioned can be introduced.  People here seem to really like the idea of being able to tweak the simulator's values; why not let them if it can be done safely?  There are certain ways that these tweaks can be done safely; we can discuss that on the NAM board later.  And there's certainly room for everyone in Simulator Land; if people think something's the best, or simply the best for them, then it can be made available, whether it's yours, mine, or anyone's.  Again, we have the same goal here: give the players what they want, but do it safely.  I'll be elaborating more on the NAM board soon.

And now back to ldog's questions:

Quote5. Doesn't making bus generate traffic defeat their purpose? If each sim that rides a bus still count as a vehicle then you aren't reducing the congestion any. I remember you saying you found a workaround but going through the file in the reader I could not find any variable that would seem to effect it.

Ah, buses.  Jason summarized some of the problems inherent here.  But I've noticed that the people who've objected to having buses contribute to traffic have done so on a theoretical basis - no one has pointed out a situation where it has actually caused problems.  To the contrary, this feature is implemented in Simulator Z along with other features so that buses appear to reduce congestion.  Take the following example; the first picture is a city of two million running Simulator A at Hard capacity:



And here's Simulator Z running in the same city, at the same period of time, with Low capacity, which is very similar to Simulator A's Hard:



There is far less congestion in the Simulator Z version of the city than in the Simulator A version, even though buses are counting towards traffic and congestion in Simulator Z and not in Simulator A.  To the user who doesn't look underneath the hood, it looks like buses have reduced congestion.  So I don't think this is a real issue.

However, it is actually possible to reduce the amount of congestion caused by buses compared to that caused by cars, for those who really want to do so.  Congestion is essentially the part of a network's volume that is in excess of the network's capacity.  But as any traffic engineer will tell you, the capacity of a network is dependent on the speed of the vehicles in the network.  So by using the Bus Multiplier in the upcoming NAM tool to raise bus speeds, their contribution to both traffic and congestion is lowered, while that of cars is unaffected.  And that's how you can do what seems to be impossible if you just look at the traffic simulator's exemplar.

Quote
6. Type does not generate traffic(or is it not affected by traffic? I'm sorry I am at work right now)==not affected by congestion? Or in other words: Are my pedestrians (and bus if I decouple from traffic) going to run around at 130% speed because there is never any congestion for them or are they completely unaffected by the congestion modifier?

Pedestrians are just like any other travel type.  However, in Simulator Z (and I believe all the other simulators as well), they are not affected by traffic, so they always move at a constant speed.

Quote
7. If type doesn't generate traffic (i.e. peds again) should they not count against capacity (i.e. transit switches) and therefore station capacitys should never have to be inflated for the peds? (like RTMT for instance)

Pedestrians don't contribute to traffic, and as a result, I'm fairly sure that they don't count toward station capacity.  But I haven't seen anything on this, nor have I tested it.  However, station capacities aren't what they seem anyway, as Jason and other will confirm.  Briefly, stations don't suffer service degradation at all (despite what the queries show) until they reach at least 400% of capacity (it varies by station in a way that has yet to be determined), at which point they simply stop accepting passengers for the day.  Pedestrians don't seem to play a big role in this process.

As for one-way roads, once again, capacity is determined by speed.  In RL, one-way roads have higher effective capacities than two-way roads with the same speed limit because they don't have the same slowdown at intersections; sometimes they're assisted by timed stoplight cycles.  Neither of these options is available to us in SC4.  However, the fact that volume is calculate on a per-commute time basis while capacity (and congestion) are calculated on a per-day basis means that anywhere that traffic on two-way roads is at all asymmetrical during either commute period, putting in pairs of one-way roads will increase the total effective capacity, even though the nominal capacity is the same.  And in most cases, I've noticed that the effective capacity is increased by about the same amount that it is in RL.  I initially didn't like having to make the nominal capacities of one-way and two-way roads the same just because of NWM, but once I saw how this worked, I realized that it was the right thing to do, regardless of whether or not NWM ever existed.

Please understand that I have no objections to sharing my information - to the contrary, I think it would be wonderful if everyone understood everything about how Simulator Z worked.  It really is simply a time issue for me.  In retrospect, I should have given you brief answers to your questions; I hope that these posts have given you what you wanted.

k808j

We  ()borg() have been very much educated on Sim Z from this particular discussion and appreciate everyones
comments

BTW good job on the RTMT 3.60 release Z.

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

ldog

Z and J, thank you both for replying.
You did go into far more detail than I was expecting, and I can certainly respect your time. I know I just never seem to have enough time for everything I want to do.
I really do wish I had started playing like a year ago when these discussions were current, I'm sorry if it seems like beating a dead horse or just rehashing old conversations.
So thank you (and you as well J) for all the time put into that.
It certainly helps clear up a lot and has given me much food for thought.

Of course I still have some questions...

Still can't find any variable defined as pathfinding heuristic. Is it maybe reader version difference? As I've said I am fairly certain the var defined as "nearest destination attractiveness" IS the pathfinding heuristic y'all keep referring to. The values in the various sims vs what is said in the discussion threads would support that. I'm sorry if I'm being dense and they actually mean the same thing. Like I said, I'm comfortable with it, just looking for confirmation.

Although some of what I've asked I thought it was just that my wording was bad but J really made it very clear to me that I was thinking about things in the wrong kind of context. When I was speaking in terms of the "2.5 hour commute" I know that it isn't 2.5 hours of course. I was speaking of it in the way the game is trying to present it to us, even though under the hood it really has nothing to do with it.

What I was trying to say is taking the 6 time unit x 25 display multiplier = 150 minutes max commute (yes I know it is nonsensical please bear with me...I also strongly suspect the display multiplier doesn't actually work). I was then saying they fudged it, probably for display purposes (by their graph noone will ever go to a 1.0 commute, which if you inject reality makes sense...it is possible for example to commute 4,5,6 however hours a day, and believe me I have known some people who lived out in the boonies that drove 3 hours each way to work but I sure as hell am unwilling to do it) and a time unit was actually 30 minutes. So then there would be 48 time units in a sim day IF the traffic sim time was directly related to the game day time. So that was how I arrived at that (mis)conclusion.

So what you are saying Z, is that the game day is actually 1440 time units (1 time unit is 1 minute).
And J, although it is technically inaccurate to say it is unitless, I understand what you mean by it. That really does sum up why I am asking these questions; I am trying to define the units.

On #2 , according to your observations, logic would dictate that the commute time does NOT get reset when you leave the tile. If the commute time got reset everytime you changed tiles then all you need to do is get off the current tile and you can do another full trip. So now I'm more confused.

In regards to abandonment, what about the mod that reduces that? I've been playing with it a bit but I have only poked under the hood slightly. My thinking though is that tweaking those values in tandem with the traffic sim can tune the abandonment factor more finely than trying to do it by the traffic sim alone. Once again Z, don't think I am trying to get you to change your simulator to suit me, I just think it is easier to answer my questions if you understand my reasoning. I also chose you to "pick on" I guess because when I installed the NAM, the documentation led me to believe that all the other sims were old and outdated and that z-sim was the general purpose controller. Naturally that is the one I popped in and so that is where most of my comparisons come from. I will unpack and start looking more closely at the other traffic sims this weekend as well.

I understand the capacity better now, thanks to both of you. Very wierd the way Maxis did that (congestion and volume both should have been for evening/night or both per day but not seperated) but the old adage of "change the things you can change, accept the things you can't" really applys. I'm working on the "have the wisdom to know the difference" part. At any rate, this goes along with one of those things to just not try to put into reallife terms and just go with values that "feel right".

#5 Isn't a valid comparison. The only way to get an apples to apples comparison would be to take the same traffic sim and run it once with buses not adding to congestion, and again with buses adding to congestion. Like you've said, there is a lot more to it than just capacity. Again, don't take any of this as a personal attack, you are happy with the way you are handling it then that is all that matters as far as your simulator is concerned so don't feel like you have to defend yourself or your reasoning.

I'm sorry I'm so longwinded, once again thank you both for the time and discussion.

On an unrelated note: I made a real boner 2 nights ago. Somehow I got an extra copy of the traffic sim in the nam plugins (probably careless dragging and dropping), I also because of the fact that I have been putting in and taking out pieces of the NAM (I decided I wanted the road turnlanes in so I had to run the evil installer again) so I moved and renamed your traffic controller and data plugin to my own directory. Well let me tell y'all the game will run still but it crashes constantly. I couldn't figure out why I kept getting extra subway tubes in the menu (because I agree with and kept your more expensive subway segments). The moral of this story, it was EXTREMELY good advice to do your testing with a clean plugins directory and it was pretty stupid of me to disregard that advice. So needless to say a lot of my prior testing is invalid.





Tarkus

Quote from: ldog on October 22, 2009, 09:28:08 AM
I also because of the fact that I have been putting in and taking out pieces of the NAM (I decided I wanted the road turnlanes in so I had to run the evil installer again

Try using the Mac version of the NAM instead, if you're planning on tinkering with different plugins a bunch.  It's basically just a .zip with all the files inside, sans installer.

-Alex

ldog

Quote from: Tarkus on October 22, 2009, 12:08:21 PM
Try using the Mac version of the NAM instead, if you're planning on tinkering with different plugins a bunch.  It's basically just a .zip with all the files inside, sans installer.

-Alex

Well that would have never occurred to me.  &idea
Thanks for the tip :thumbsup:

z

Quote from: ldog on October 22, 2009, 09:28:08 AM
Still can't find any variable defined as pathfinding heuristic.

Depending on how your version of the Reader is set up, it may appear as "Nearest Destination Attractiveness."

Quote
So what you are saying Z, is that the game day is actually 1440 time units (1 time unit is 1 minute).

Yes, although we don't know how much of that forms a commute period.

QuoteOn #2 , according to your observations, logic would dictate that the commute time does NOT get reset when you leave the tile. If the commute time got reset everytime you changed tiles then all you need to do is get off the current tile and you can do another full trip. So now I'm more confused.

No, commute time is completely reset when you leave the tile.  What I was saying was that the value of the maximum commute time affects the probability that the Sims will leave the tile.

Quote
In regards to abandonment, what about the mod that reduces that? I've been playing with it a bit but I have only poked under the hood slightly. My thinking though is that tweaking those values in tandem with the traffic sim can tune the abandonment factor more finely than trying to do it by the traffic sim alone. Once again Z, don't think I am trying to get you to change your simulator to suit me, I just think it is easier to answer my questions if you understand my reasoning. I also chose you to "pick on" I guess because when I installed the NAM, the documentation led me to believe that all the other sims were old and outdated and that z-sim was the general purpose controller. Naturally that is the one I popped in and so that is where most of my comparisons come from. I will unpack and start looking more closely at the other traffic sims this weekend as well.

My experience with these mods is that they cause unpredictable complications with the traffic simulators, and with the game in general.  With Simulator Z, they are definitely not necessary, as long as you build your city well.

The NAM documentation on Simulator Z is quite accurate and backed up by lots of experimental evidence.  Simulator Z was built using the lessons and technology learned from previous simulators, plus a lot of original research.  But how you interpret that is completely up to you.

tamorr

   From what I understand of the simulator Z, I usually call it "Divide and Conquer" as per the decription that you gave when you were developing Z. What I mean by that term is the relavent dividing of Mass transit. Saying that sims will even spread among the various types, which is why I enjoy the simulator.
   Also I know I mentioned long ago in another post that I went from better pathfinding simulator, which definately reduced traffic by that meathod when I switched to medium Z. I am right in saying that the simulator did indeed evenly distributed the sims, per say to the many Mass transit sytems?
  I may not phrase things well but that is what it appears to me from all the explainations I have gone through since the Z was being proccessed. Anyways thank you for making a great simulator. :)
  "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."

jplumbley

Quote from: ldog on October 22, 2009, 09:28:08 AM
On #2 , according to your observations, logic would dictate that the commute time does NOT get reset when you leave the tile. If the commute time got reset everytime you changed tiles then all you need to do is get off the current tile and you can do another full trip. So now I'm more confused.

If the "clock" never got reset there would never be a problem with the Eternal Commuter Circles.  ::)
"You learn something new everyday."

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

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

ldog

Quote from: z on October 22, 2009, 01:42:20 PM
Depending on how your version of the Reader is set up, it may appear as "Nearest Destination Attractiveness."

THANK YOU!!!

Quote from: z on October 22, 2009, 01:42:20 PM
Yes, although we don't know how much of that forms a commute period.

Well it should be however many time units you set for max commute if they are one and the same. (Or half of it if you are refering to commute period as evening OR morning commute)
I guess you could make them commute all day if you set it to 1440 and if you set it above that the game should crash *shrugs* I may have to go try that just to see if I can make it BSOD but I think tonight I am going to go and do the bus test (adds traffic/doesnt add traffic) myself. I will let you guys know the results.

Quote from: z on October 22, 2009, 01:42:20 PM
No, commute time is completely reset when you leave the tile.  What I was saying was that the value of the maximum commute time affects the probability that the Sims will leave the tile.
AND
Quote from: jplumbley on October 22, 2009, 02:34:27 PM
If the "clock" never got reset there would never be a problem with the Eternal Commuter Circles.  ::)
Great, another factor. So pretty much for everything that is pinned down in the traffic sim there is another thing (or 2 or 3) that are still best guess huh?

jplumbley

Quote from: ldog on October 22, 2009, 03:10:24 PM
Great, another factor. So pretty much for everything that is pinned down in the traffic sim there is another thing (or 2 or 3) that are still best guess huh?

There is always something else that is effected by what ever decisions you make.  That is why it is so important for you to understand what you are changing before you change it, because then you can watch for those side effects.  On the other hand there is always something else to learn about and there are many things that have not been fully tested yet.  Best guesses are the element of the so-called "experts", I think for us it's more like pray and hope it doesnt screw things up too bad...  :D
"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

z

#215
Quote from: ldog on October 22, 2009, 03:10:24 PM
THANK YOU!!!

You're welcome.

[About the length of a commute period]
Quote
Well it should be however many time units you set for max commute if they are one and the same. (Or half of it if you are refering to commute period as evening OR morning commute)
I guess you could make them commute all day if you set it to 1440 and if you set it above that the game should crash *shrugs* I may have to go try that just to see if I can make it BSOD but I think tonight I am going to go and do the bus test (adds traffic/doesnt add traffic) myself. I will let you guys know the results.

I doubt it.  The SC4 simulation is a fairly primitive one, and in general is fleshed out only where it needs to be (and often not even then).  Once you go above a value of 600 for maximum commute time, the game starts slowing down a lot.  (Which really doesn't make any sense, since no one travels that long anyway.)  If you set that value high enough, you certainly might get a BSOD, but I doubt it would be at all related to the number 1440.  There's no need for the commute engine to know how long a day is, so I doubt that it does.

QuoteQuote from: jplumbley on Today at 02:34:27 PM
If the "clock" never got reset there would never be a problem with the Eternal Commuter Circles.   ::)
QuoteANDGreat, another factor. So pretty much for everything that is pinned down in the traffic sim there is another thing (or 2 or 3) that are still best guess huh?

I think that the vast majority of the important stuff is well understood at this point (although in varying degrees by various people).  The less important stuff - that which has little impact on game play - is less understood because, well, it's less important, and our resources are finite.  What Jason said in his quote is certainly true; how does that lead to your "best guess" comment?

I see that Jason has posted while I've been slowly writing this:

Quote from: jplumbley on October 22, 2009, 03:32:57 PM
There is always something else that is effected by what ever decisions you make.  That is why it is so important for you to understand what you are changing before you change it, because then you can watch for those side effects.  On the other hand there is always something else to learn about and there are many things that have not been fully tested yet. 

I agree 100% here.

QuoteBest guesses are the element of the so-called "experts", I think for us it's more like pray and hope it doesnt screw things up too bad...  :D

I'd just like to add that extensive and systematic testing can greatly reduce the need for hope and prayer.  ;)

ldog

Quote from: jplumbley on October 22, 2009, 03:32:57 PM
Best guesses are the element of the so-called "experts", I think for us it's more like pray and hope it doesnt screw things up too bad...  :D

LOL. Yeah, I suppose the only way we will ever find concrete answers to some questions is to track down and kidnap the Maxis programmer who wrote the code. I'm sure a lot of answers are hidden away in the executeable.

Ok so I'm setting up my test case. Being as my mod is really untested and in light of recent discussions I need to rethink and overhaul some things I am going to build a city and run it for a bit with A hard. Then I am going to save, quit, cause bus to generate traffic and go back in and run it a few years. Time permitting I will also do the same 2 tests with Z low as well. To be honest I don't think it really matters which simulator I do it with but as I pointed out above it needs to be the exact same simulator only with the 1 variable changed.

Should I start a seperate thread or is it ok to still clutter yours Z? I will of course provide screenys...now who is going to provide the beer? :P


ldog

Quote from: z on October 22, 2009, 03:45:46 PM
[About the length of a commute period]
I doubt it.  The SC4 simulation is a fairly primitive one, and in general is fleshed out only where it needs to be (and often not even then).  Once you go above a value of 600 for maximum commute time, the game starts slowing down a lot.  (Which really doesn't make any sense, since no one travels that long anyway.)  If you set that value high enough, you certainly might get a BSOD, but I doubt it would be at all related to the number 1440.  There's no need for the commute engine to know how long a day is, so I doubt that it does.

I think that the vast majority of the important stuff is well understood at this point (although in varying degrees by various people).  The less important stuff - that which has little impact on game play - is less understood because, well, it's less important, and our resources are finite.  What Jason said in his quote is certainly true; how does that lead to your "best guess" comment?

I'd just like to add that extensive and systematic testing can greatly reduce the need for hope and prayer.  ;)

Well then so that brings us back to square 1 and the commute trip unit is not a minute or any other measure of time for that matter.
It would be just 1 unit of time in the traffic simulator. What I am getting at is (and yes, this goes with what J said earlier) is that it is "unitless" as far as trying to relate it to realtime, because it doesn't exist outside the traffic simulator.

It is a best guess because we know there is an effect but we don't know specificly what it is. You know that it impacted intercity commuting but you can't break it down to a mathematical formula therefore it is a best guess or guestimate as one of my old professors used to say.

I certainly agree with extensive and systematic testing as well, and I intend to do some :D

z

#218
Quote from: ldog on October 22, 2009, 03:51:25 PM
LOL. Yeah, I suppose the only way we will ever find concrete answers to some questions is to track down and kidnap the Maxis programmer who wrote the code.

I'm not sure that would help...  ::)

QuoteOk so I'm setting up my test case. Being as my mod is really untested and in light of recent discussions I need to rethink and overhaul some things I am going to build a city and run it for a bit with A hard. Then I am going to save, quit, cause bus to generate traffic and go back in and run it a few years. Time permitting I will also do the same 2 tests with Z low as well. To be honest I don't think it really matters which simulator I do it with but as I pointed out above it needs to be the exact same simulator only with the 1 variable changed.

It matters a lot which simulator you use.  I had to make a lot of modifications to Simulator Z to allow it to support adding buses to traffic; as far as I know, it's the only simulator where this can be done.  Before the modifications, adding the buses made congestion far worse in many places, completely exceeding the ability of the traffic simulator to handle it.

There's also so much about testing traffic simulators in general that needs to be understood; I'll summarize just the most important points here.  First, the pathfinder is the most important part of the simulator being tested here, and as the complexity of possible paths rises exponentially with the size of the tile, you need to test on a large tile filled with paths and Sims (at least a million Sims, preferably more) in order to get really meaningful results.  (On small and medium tiles, differences between most things related to the traffic simulator are much more difficult to see, and often vanish into the noise.)  You also need to try a variety of configurations (i.e., cities); some things show up only in certain configurations, and the pathfinding algorithms are complex enough that it's almost impossible to predict what those will be.  Finally, you need to do extensive regression testing (absolutely crucial!) to understand what side effects may be occurring.  Otherwise, your test results don't tell the whole story, and can end up being quite misleading.

You also have to run things for more than a few years; eight years is the minimum on a built-up large tile, and longer is better.

To do this properly will take many, many hours, assuming you already have a fair number of large test cities built.  If you don't, you'll need to add the time required to build them from scratch up past a million Sims.

I'm not quite sure why you're doing these tests.  It sounds to me like you're doing what I've already done, and I could certainly just tell you my results.  What exactly are you trying to find out that you don't think is known?

Quote
Should I start a seperate thread or is it ok to still clutter yours Z? I will of course provide screenys...now who is going to provide the beer? :P

I think a separate thread would probably be good at this point, as this is getting a little off-topic for this one.  But you can certainly answer my last question here.

Quote from: ldog on October 22, 2009, 03:58:41 PM
Well then so that brings us back to square 1 and the commute trip unit is not a minute or any other measure of time for that matter.
It would be just 1 unit of time in the traffic simulator. What I am getting at is (and yes, this goes with what J said earlier) is that it is "unitless" as far as trying to relate it to realtime, because it doesn't exist outside the traffic simulator.

If you follow what I said before, once you see that a square is 16 m on a side, then the unit of time is a minute.  Now of course the squares aren't really 16 m long, but this is all done to scale, and "minutes" fit on this scale perfectly, along with "kph".

QuoteI certainly agree with extensive and systematic testing as well, and I intend to do some :D

OK, I'll be looking forward to the results of your regression testing.  ;D

ldog

Wow uh...yeah...I just thought I would poke my head out before I went off to bed.
It is taking me quite some time. No, I don't have any very built up citys to use and building one is pretty time consuming.
Since my last post I've only built one to 100k (I did pop into the one I was working on last night to see how it worked with A-hard, of course it was a bad idea to go back to this city after removing my Ind-jobs mod (which uses the recommended settings out of the CAM). Massive abandonment. LOL

Now I didn't have any abandonment problems since I rebuilt the city using A from the start although let me tell you it works very diferently from mine even though they seem closer in many values. One thing I did pick up pretty quick is that A hates the bus. My entry cost for this test is .02 which is actually .96/48 hmmm...how did I get that number...oh...yeah..J's bus speed on street was 35, which gives .027 and I just decided to round it down for some reason. Anyway that should work fine. Of course A has a much higher starting cost for car prefered (his is 1.75, mine was .1 I'm sorry I forget what yours was and I don't have it handy at the moment) and then the bus speed is slightly slower so he has depriveledged the bus quite a lot. Now I know when I was playing with Z-low they love the bus.

Thanks for the tips.

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

Of course now the idea has formed that I should test all the traffic simulators, not just about the bus thing but about how they work overall and do a comparison. One thing you have to remember is that for you people who have been playing for years the accumulation of downloaded content was a slow ongoing process. For someone walking in right now like myself there is a staggering amount of things to see and do on this forum. I've only been playing with this game for around a month I think. I spent a few days learning to play on vanilla and then that would have been it for the game. Then I started downloading content, which of course broke my game and so started the process of me finding out why all these wonderful things I downloaded broke my game. There's dependencies to download. There's conflicts to eliminate. There are things that will look like they are working but totally run your city down the drain because the values weren't set on them properly. All these things I'm sure you know very well and came gradualy over time. I've been trying to cram several years of other peoples development into a crash course just so I can figure out what I can and can't play with.

If you mean why everything in general about testing the traffic simulators? Probably the same reasons you did. Partly because I'm looking for a simulator that "feels right" for me. Partly just to learn to how it all really works under the hood. Partly just because moding in general interests me. I am not looking for a sandbox mode to make to scale realistic citys. I personally find the game is far too limited for that to be any fun. The region play is so half-assed that I find the prospect of developing 100 large tiles just to make a decent cross section of an actual metropolitan area to be about as fun as a root-canal. All I am looking for is game balance. But as I have found in many other games my idea of game balance is contrary to what is popular so modding has pretty much become a way of life for me. I know that I am creating much more work for myself (for instance instead of just dropping in the very interesting update to the RTMT I have to wait until I have a chance to tear through it and make it work with whatever I am doing at the moment) but to be honest if I wasn't I would have shelved the game already and moved on.

So my goal right now is understanding the rules (of the traffic sim) so that I can bend them to do what I want. Pretty much the same as any of the rest of you who mod.

I understand what you are saying about the scale and so the time unit is 1 minute although that would still only be correct if your speed matches..if you set the speed to something else then your time is no longer a minute. I think...getting sleepy so brain might not be working properly. For arguments sake I'll say you did the rest of the math and I agree with you.

You still don't get my original question about time though...trying to think how to phrase this better maybe. Considering how many attempts it took me to get the pathfinding heuristic question answered this could take a lot of time.  ;)

Let me break down a few things then. We have several units of time we are dealing with. There is the day and night cycle of the game which makes up a day. However we both know damn well that that is just like the automata; it is eye candy and has nothing to do with what is actually going on under the hood. This is easily proven by pausing the game and watching day and night change. Ok so far? Good.

Then we have units of time in the traffic simulator which I think we can all agree are called "commute time units". One could say that the "commute day" is 6 or 17 or 60 or whatever value you set "commute trip max time" to units long (again for arguments sake I'm going to say I agree with you and call them minutes). The commute day in Vanilla is 6 minutes, in Z it is 60 minutes (I know you keep throwing 180 out there but the version I downloaded it was 60) in A it is 17 minutes.

Next we have the game day. It is the time that it takes for the calendar date to advance by 1 day in the game. We know it takes some period of time. I don't have a clue what it is.

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

Now what I have gathered from the discussion and general observation is that no, they have nothing to do with each other. So it's a moot point at this point. To me it is(was) a very basic and important question because if they were relative it makes a great deal of difference changing the max commute time.

Anyway, yes you are certainly right it is going to take me quite a bit of time to have any results to share.