• Welcome to SC4 Devotion Forum Archives.

A New Traffic Volume View

Started by z, August 05, 2008, 08:27:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

z

As many people know (especially the NAM team, and especially those who've worked on the current Traffic Congestion View), Maxis didn't seem to finish the job completely when it comes to traffic volumes and their display.  A prime example is the whole problem that led to the creation of the new Traffic Congestion View.  But other problems still remain.  The "Morning Commute" and "Evening Commute" buttons in this view do nothing at all; the view appears to represent total daily traffic.  Meanwhile, the route query tool will show different routes depending on whether you select Morning or Evening Commute, as it should.  But if you use it to find the current volume on a particular path, it always reports the volume of the Morning Commute, regardless of the setting of these buttons.  As far as I know, there's no way to get the exact volume for the evening commute, and therefore for the total daily commute.

Theoretically, the Traffic Volume View could help a lot here.  It shows networks on an individual basis, and it differentiates properly between morning and evening commutes.  But the way it's currently implemented, its value is somewhat limited.  What capacity does a particular shade of blue represent?  Can you really tell the difference between that and the next shade of blue?  And what scale is being used?

Poking around in SimCity_1.dat reveals some of these answers.  The top of the scale is 120% of the capacity of the network being viewed.  But here we're talking about the original Maxis capacity of the network, not the capacity implemented by whatever traffic simulator you're using.  So that's why for people who use higher capacities for their networks, this view tends to max out very early in terms of usage.  At a minimum, different versions of this view should be available with different capacity simulators, so that it's possible to get a decent amount of information from it.

But if we're going to modify this view at all, there's actually a lot more we can do to make it useful.  First of all, even a novice GUI designer knows that gray scales (which is what this view really is) convey a lot less information than color scales.  So let's change the color ramp to make use of this knowledge.  (Fortunately, there's only one color ramp for all networks; it's duplicated in each exemplar.)  And if we're going to use a range of colors, why not coordinate this view with the traffic congestion view?  For example, right now the traffic congestion view can only tell you if there's congestion on a certain tile.  Since tiles can contain up to three networks (subways plus two others), it's not always immediately apparent where the congestion is.  Furthermore, the Traffic Volume View has the advantage that the Morning and Evening Commute buttons actually work, so you can see at what time of day the congestion actually occurs.  Put that together with the very useful moving dots of this view, and you can usually tell which travel direction the congestion is in.

So here's what I propose:  We change the color ramp for the Traffic Volume View, while still keeping the current color ramp as part of that view.  The current color ramp would be used to describe traffic volume from 0% to 50% of network capacity.  From 50% to 100%, the color would gradually change from blue to the solid green found in the congestion graph.  Above 100%, the colors would match those in the congestion graph.

Among other things, using the same colors in both graphs would allow for easy comparison when switching between them.  (However, it is not possible always to guarantee that the colors will match up; see the following post for details.)  The additional colors available in the Traffic Volume View would also allow the user to get a much better idea of what traffic levels were, and even where congestion was, and what time of day it occurred.  In fact, these changes in total should make the Traffic Congestion View much less necessary.  Its main advantage over the Traffic Volume View would be that it would show data from all networks at once, which is certainly very useful, and its congestion data would be more accurate, for reasons explained in the following post.  But to get more detailed information on traffic congestion, or on traffic flow in general, the Traffic Volume View would be extremely useful.

So what do people think of this idea?  All it would take is making a file of all the Traffic Volume Views (there's one for each network), building the color ramp, and setting the capacities for each network properly.  Piece of cake.   ::)   I've played around enough with the Traffic Congestion View so that I should have no trouble doing this myself, but I thought it would be a good idea to get some feedback before I started.  So here's your chance...

z

#1
The following is a technical note on the implementation details of the above proposal, for those who are interested.  (Yes, both of you.)

When I say "network capacity," exactly what am I referring to in this context?  Do I mean the nominal network capacity, or do I mean the network capacity for one commute period, which is half the nominal network capacity?

It turns out that neither number will give you the results you want all the time.  Nor will any number in between.  The problem has a lot to do with the way that the traffic simulator algorithms implement congestion, which is overly simplistic.  This is very much connected to the reason why jplumbley and mott had to create a new Traffic Congestion View.

In the real world, congestion is determined by cars per lane, and varies from minute to minute.  In SC4, congestion is determined by cars (actually Sims) per tile, and is determined on an average daily basis.  This leads to several interesting anomalies.

For the sake of simplicity, for the following examples, assume a road capacity of 1000 cars, each containing one Sim.  Then if you have a road where the total daily traffic consists of 900 cars in one lane and no cars in the opposite lane, that road is considered not to be congested.  Yet if you have a road with a total daily traffic of 700 cars in each lane, for a total of 1400 cars, that road is considered to be heavily congested.  This clearly does not correspond to the real world; the "congested" road has less traffic per lane than the "uncongested" road.  Yet that's how SC4 works.

Here's a second example:  Consider a one-way road, also with a capacity of 1000.  Now if that road carries 900 Sims in the morning and none in the evening, it is considered uncongested.  But if it carries 700 Sims during each commute, it is considered heavily congested.  Again, this does not make sense in real world terms.

For the Traffic Congestion View, which displays data on a day-long basis, these differences are averaged out, and it's possible to have a reasonably consistent (though not completely accurate) view of traffic congestion.  For the Traffic Volume View, it's much harder, since you're only dealing with one commute period.  And coordinating the two views perfectly becomes impossible.  No matter what number you pick for network capacity, some networks will appear congested in the Traffic Volume View that don't appear congested in the Traffic Congestion View, or vice versa.

So what to do?   ()what()   I've decided to define "network capacity" as half the nominal network capacity for the Traffic Volume View.  For networks that are used about equally during both commute periods, this will be the correct choice, and they will show up with the same colors on both the Traffic Volume View and Traffic Congestion View.  For networks with asymmetrical traffic flow during the two commute periods, it's a little more complicated.  Networks which are congested over a day-long basis may not be congested during a particular commute period, and will therefore show green or blue.  This is perfectly correct, since there is no real congestion during that commute period.  The problem comes when you networks that are over half capacity during one commute period, but carry little or no traffic during the other, so that the total traffic is under 100% capacity.  Although these networks are not congested, and do not show up as congested in the Traffic Congestion View, they will show yellow or orange for the higher traffic period in the Traffic Volume View.

I think that this is one of those problems that just can't be solved.  To some extent, though, we can define it away.  After all, this is the Traffic Volume View, and as such, is not supposed to represent congestion exactly.  It can't.  So here, yellow simply means heavier traffic, possibly (but not necessarily) congested.  (If you see red in this view, though, you can be quite sure that that network is congested.)  And wherever your map is blue or green, you can be assured that there is no congestion during that commute period.  But to see congestion the way the game sees it, you need to use the Traffic Congestion View.  The Traffic Volume View is designed to give you a very good idea of what the traffic volume is for a given commute period, and that it will do.  In many cases, the colors displayed in both views will correspond, but that cannot be guaranteed.   $%Grinno$%

b22rian

I think its a great idea...

And I agree with all the necessary changes as you articulated them in your post..

i have found myself in recent games rarely using the traffic volume graphs..

i think the main reason for this as you pointed out .. is that there has been many recent changes

with the nam and all the new traffic sims that have come out.. To me, virtually making the traffic volume

graph irrelevant really.. However i for one would use the new volume graph quite a lot... if your able to

implement all the necessary changes you suggested in your well explained posting..

z

#3
Having received a 100% positive response to my proposal  ;D, I am ready to ahead.  &hlp

However, the plot has thickened.   %confuso

The more I look at the Traffic Volume View, the more it looks like an unfinished product.  I think that by the time Maxis created this view, they knew there were inconsistencies in the way they handled traffic volume and congestion, but they didn't know how to address them.  So they didn't.

In my first post, I said, "The top of the scale is 120% of the capacity of the network being viewed."  I based this statement on looking at the parameter Dataview: Maximum Scale, which appears in each traffic type exemplar.  I saw it set to 1200 for cars, buses, and road traffic, so I thought, "OK, they're using 120% of network capacity here."  This seemed to be the obvious conclusion, since it was a parameter that could vary with each traffic type.

Unfortunately, it was wrong.  That parameter is set to 1200 for every single traffic type.  So Maxis put in a parameter that it didn't bother to adjust appropriately for each traffic type - it didn't bother to adjust it at all.  Highways, subways, it doesn't matter - the scale tops out at 1200.  It was easy to verify this in the game.  This means that if you're using Simulator A or B on the Easy setting, the Traffic Volume View tops out at less than 10% of a subway's capacity, and only a little better than that for highways.

Meanwhile, there's a problem that the Traffic Volume View displays traffic types, but a number of these run on networks of different capacities.  Specifically, you have cars, buses, and freight trucks, all of which can run on streets, roads, or highways.  Maxis just ignored the problem, setting every capacity to 1200.  I don't think I can solve this particular problem, but at least I can do better than Maxis; I'll normalize everything for the true capacity of road traffic.  As long as the user knows what's being done, the data can still be interpreted usefully.  That's as opposed to the current situation, where everything above 1200 is essentially infinity.

The other thing I've been thinking about is the scale for this view.  One thing you have to credit the current view with is that it's good at showing gradations at low volumes.  As I expand the capacity of the graph, I don't want to lose this ability.  For example, a user is going to be much more interested in seeing a change in volume from 100 to 200 than a change from 5100 to 5200.  So some sort of logarithmic scale seems to be in order here.  This would only be needed until the network capacity is reached; after that, a linear scale that matches the Traffic Congestion View (and the colors of that view as well) would be sufficient.

Oh yes, then there are pedestrians and ferries.  Any suggestions as to what "capacities" should be used for these?

b22rian

   Z....

Thanks for explaining what your limitations are with the traffic volume view..

I can still assure you all of us will be most appreciated whatever improvements your able to make..

Brian

mightygoose

good idea, in fact you wouldnt need the congestion view at all really as congestion is based on percentage over capacity....
NAM + CAM + RAM + SAM, that's how I roll....

videosean

Quote from: z on August 07, 2008, 12:31:12 AM
Having received a 100% positive response to my proposal  ;D, I am ready to ahead.  &hlp
ROFL ur funny  :D
I do like the sound of your ideas :)

b22rian

Quote from: mightygoose on August 07, 2008, 04:03:59 AM
good idea, in fact you wouldnt need the congestion view at all really as congestion is based on percentage over capacity....


I was wondering the same myself as I read through the changes..

if you able to make all these changes would the current "congestion view be sorta like a sub set of the traffic

volume view.. or do you think there would be reasons for using both Z ?..

thanks Brian

z

Quote from: jplumbley on August 07, 2008, 04:47:08 PM
About the "Congestion" Data View...  You propose to use it between Morning and Evening Commutes.  Well in the simulator there is no difference between Morning and Evening, it doesnt exist.  Congestion is determined based on the physical number of trips that pass through any given tile (morning and evening are calculated together in the same calculation).  This means, no matter whether the sims are travelling in the morning or in the evening they are still counted towards congestion.  There is no possible way to separate this.
Just a quick note now...

I don't propose to modify the Traffic Congestion View at all.  I had discovered exactly the facts you state here, and I am in complete agreement with them.  Some people have responded in recent posts that they thought that my Traffic Volume View would make the Traffic Congestion View obsolete, but of course it won't (as I did indicate in earlier posts), for exactly the reasons you describe (among others).  I had planned to detail this more in a later post.

As for the colors, I'll just have to try it out.  If I can't get additional colors in the ramp, I'll have to do something along the lines of what you suggest.

More later...  (And sorry about writing too much.   ()sad() )

z

Quote from: jplumbley on August 07, 2008, 04:47:08 PM
What I gather is that you want to change the colorof the "Traffic Volume" Data View.  This is not entirely possible, given the current research that I have done and to my knowledge I am the only one who has modified (successfully) the "Traffic Congestion" Data View.  I had attempted to add more colors to the original "Traffic Congestion" Data View, when I did so I broke it entirely andit would not show anything on the map.  Im not exactly sure why, but for some reason you *must* use the colors already determined in the ramp as far as I am aware and remember.
I agreed with everything you said in my last message.  This time I have to disagree.

First of all, in conjunction with the new traffic simulator I'm developing (which I assume you've spotted on this board), I created my own color ramp for the Traffic Congestion View.  (It was tricky, I'll give you that.)  I modified this view for two reasons:  1) I use a different congestion vs. speed curve, so I need my colors to cover a different range; and 2) I liked the greater number of color gradations that were present in the original color ramp.  However, since the basic premise behind your color ramp is correct, I was careful to conform to that.  It was this success in modifying the Traffic Congestion View that encouraged me to tackle the Traffic Volume View.  I didn't announce this before now, so that's why you thought you were the only one who was successful in modifying the Traffic Congestion View.

Second, your research on the Traffic Congestion View was apparently incomplete, and this led you to erroneous conclusions.  I had no trouble adding a new color to this view on the first try.  I changed the uncongested pure green to a dark blue.  (The yellow congestion really stands out this way.   ;) )  If you want to duplicate my results, all you have to do is change the second color in the color ramp from 0x9900FF00 to 0xBB2E37F9.

Third, it appears that there will be no problem adding a full-spectrum color ramp to the Traffic Volume View.  For a quick test, I copied the color ramp from the Traffic Congestion View to one of the entries in the Traffic Volume View, trimmed off the last ten entries so that the size was right, and fired up SC4.  Sure enough, when I clicked on the network I had changed, I got a range from green to dark orange, which was exactly what I was expecting, since I had chopped off the red end of the spectrum.  Furthermore, it appears that I may not need a logarithmic scale after all, as the program interpolates the colors very nicely.  On a network with a capacity of 14,000 the scale tops off at half of that, since this is just one commute period.  Yet I could see color changes for about every 50 Sims of capacity, which is probably fine enough.

So everything looks good for completing this project according to the (excruciatingly long) specification I posted above.

b22rian

Hi Z....

     First let me congratulate on your work with the color ramps and also your modifications of the  traffic congestion
data view.. i have a question for you though .. In time, once you have finished all your changes to both the traffic
volume and congestion maps will it be possible to dl these as separate downloads or will you have to dl and use
your new traffic sim in order to use these ? As i stated in the other thread , in time I would very much like to try
your new traffic sim, but i think with my existing region and cities I'm planning on staying with mott's traffic sim..,

thanks for all the time and work you have put into all this research and development and also to
          Jplumbley as well...

Brian

Shadow Assassin

Quote

11223344

First 2 Digits are Red, 2nd two are Green and 3rd two are Blue... i forget what the 4th pair is, but if i remember correctly it is Transparency.

Hm. I wonder if the fourth pair can be manipulated to create maps (as in, creating overview maps of the entire region)? :P

As far as I know, the colour overlay isn't entirely opaque, it's more translucent. It could affect how well it shows up on the game view rather than the map view?
New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dedgren ♦ dmscopio ♦ Ennedi
emilin ♦ Heblem ♦ jplumbley ♦ moganite ♦ M4346 ♦ papab2000
Shadow Assassin ♦ Tarkus ♦ wouanagaine
See my uploads on the LEX!

z

Quote from: b22rian on August 08, 2008, 03:25:50 AM
In time, once you have finished all your changes to both the traffic
volume and congestion maps will it be possible to dl these as separate downloads or will you have to dl and use
your new traffic sim in order to use these ? As i stated in the other thread , in time I would very much like to try
your new traffic sim, but i think with my existing region and cities I'm planning on staying with mott's traffic sim..,
It will certainly be possible to use the new Traffic Volume View with any simulator, including Simulators A and B.  However, in order to do so, the Traffic Volume View will need to be modified for each simulator (although A and B will use the same settings).  The main reason is that network capacity for each network has to be coded into the Traffic Volume View for each simulator, and the simulators tend to use different network capacities.  This also means that there needs to be a different Traffic Volume View for each of the levels Easy, Medium, and Hard in Simulators A and B.  Finally, I have my color ramp topping out at 150% of the nominal network capacity.  Since this is for a single commute period, it corresponds to 300% of the daily network capacity.  This is perfect for my simulator, but it is larger than the range for the color ramps being used in Simulators A and B.  However, volumes for a single commute tend to vary more than for the daily commute as a whole, so jplumbley may find that this range works for him also.  If not, he'll have to change it to what he thinks is best.

My Traffic Congestion View is designed specifically for my traffic simulator, and at this point I see no need for distributing it separately.

As for the Traffic Volume View, I'll have to consult with the Powers That Be to find out what is the proper way to distribute this, both for testing and for general use.  Ditto for my traffic simulator.  It may be necessary to get permission, in the same way it is in order to be able to upload to the LEX.  And it may be that uploading to the LEX is the proper way to distribute these anyway.  I'll keep you all posted on this.

b22rian

Quote from: z on August 08, 2008, 11:51:25 AM

As for the Traffic Volume View, I'll have to consult with the Powers That Be to find out what is the proper way to distribute this, both for testing and for general use.  Ditto for my traffic simulator.  It may be necessary to get permission, in the same way it is in order to be able to upload to the LEX.  And it may be that uploading to the LEX is the proper way to distribute these anyway.  I'll keep you all posted on this.

Ok Z, thanks for explaining all that..

When your ready to test the volume graph, I can be a tester for you if you want..

I have a pretty large city with a varied and well balanced transport system..

Brian

z

#14
Quote from: jplumbley on August 08, 2008, 12:42:36 AM
I assume you have figured out what the HEX code for the colors:

It is a HEX RGB code.

11223344

First 2 Digits are Red, 2nd two are Green and 3rd two are Blue... i forget what the 4th pair is, but if i remember correctly it is Transparency.
Actually, it's not RGB, it's BRG:

11223344

One clue is that the last entry for all red has 0xFF in the second position, not the first.

The fourth pair probably is transparency; I haven't really checked that out.

z

#15
The new Traffic Volume View graph is now done, and is attached at the bottom of this message.  It has everything I mentioned in my orignal proposal, plus more.  I had originally planned to include a full description of what I put in and why I did it the way I did, but that's going to take a while.  So in the mean time, feel free to try this out.  It should be quite self-explanatory.  I've tested it extensively, and there are no known bugs.  Let me know if you find any, or what you think in general.

EDIT:  The exact way I implemented the transition from blue to green in the color ramp differs slightly from what I described in the first post in order to make the color ramp work better.  Details to follow.

b22rian

What do I think ?

well, i haven't had the time to look at it in detail yet..cause i have to be off for work soon..
But my first impression is, its totally awesome ! &apls..

I'm sure it must have been a lot of work to do all this ??

But compared to the maxis volume graph .. which lately I had been hardly using,, this is a VAST
Improvement and im sure i"m understating things.. The colors you used are great.. there quite easily
distinguishable from 1 another.. And I really like what you did in general which was to simply take the different
network capacities and Half them, to try and represent the different commutes (morning and evening) or
(too and from work) if you will..Quite easy to understand for about everyone I should think..

As I said I haven't had time to really look at a lot of detail yet,but it seems to report the volumes spot on
in accuracy from what i can tell so far.. No problems at all ..

I like how you used the road capacity for all the car travel too , as for most people Like myself I'm sure roads
would be used the most often in people's cities.. it was logical to me to use that capacity as sorta the base
volume for all road traffic..

I have one question for you though, and I know your very busy so answer this when you can..
I'm curious as i read in another post of yours , exactly how you were able to estimate the evening commutes
within about 10 % of their actual values.. i think you stated that only the morning commute numbers are
actually available in the games programming right ?

I can see I'm going to be late for work LOL.. this is utterly fantastic Z what you have done with this !!

You should feel a sense of satisfaction and accomplishment .. the enjoyment you have added playing this
game ,to the people of this community..

Ill try to give you more feedback on this later after work..

I can't thank you enough,

regards, Brian

catty

I downloaded the new Traffic Volume View graph last night and have been running it in my city since then, so far no problems to report and it is giving me a very clear idea where my traffic problems are, as you can see from the picture

I meant," said Ipslore bitterly, "what is there in this world that truly makes living worthwhile?" DEATH thought about it. "CATS," he said eventually, "CATS ARE NICE.

b22rian

Z....

  Now that Ive had a chance to relax and have a better look at your new traffic volume View , I see what
you mean about still making use of both this and the congestion graph.. and how both will still be valuable to
us.... You can now look at overall congestion..but also broken down into both the evening and morning
commutes with your new volume graph ( I'm trusting in your 10 % error or less formulas for the evening
commutes as being accurate).. i think your volume graph though gives far more information now for city
transportation planning.. as amongst other things it will give you quite specific and accurate information
for all the different transport systems in the game.. its harder to do anything with that as you know with
our current congestion views.. but for a player like myself who likes to make use of a variety of transport
options.. this is quite valuable to me now that you have totally over hauled this from what maxis ended up
with..

Brian

z

#19
@b22rian:  Glad you like it!  And thanks for the kind words.

Quote from: b22rian on August 13, 2008, 04:25:38 AM
I have one question for you though, and I know your very busy so answer this when you can..
I'm curious as i read in another post of yours , exactly how you were able to estimate the evening commutes
within about 10 % of their actual values.. i think you stated that only the morning commute numbers are
actually available in the games programming right ?

I simply tested out the morning commutes, for which I can get the actual numbers, and found that after a while, by looking at the Traffic Volume View colors, I was able to estimate the morning commute volumes within about 10%.  Since evening commutes work exactly the same as morning commutes in terms of color vs. volume, I know that I can make an estimation of the evening commute with the same accuracy.  I would think that other people will quickly find that they're able to do this as well.

EDIT:  In a very informative exchange with jplumbley, I discovered that I was wrong about the availability of the evening commute volume numbers.  It turns out that both are available with the route query tool after all, depending on which commute period is selected in the legend box.  I remember trying this and getting the same result from both buttons; since the numbers were in the thousands, I interpreted this as meaning I was getting the same number regardless of the setting.  Instead, the roads I tested simply had identical traffic volumes during each commute period.  My fault for not doing better testing, and thanks to jplumbley for pointing out my mistake.

--------------

@catty:  I'm glad this is working for you.  And thanks for the very nice picture upload!  I was planning to do this eventually, but your picture is as good as anything I would have shown.

A word of caution, though.  I notice that you have the "Road Traffic" view selected.  As the name implies, this shows all road traffic - specifically, cars, buses, and freight trucks.  Buses don't count toward congestion, though, so this is not the best view to determine where your road traffic problems are (unless you don't use buses).  Instead, generally the "Car" traffic view is best for this purpose, with maybe a quick look at freight trucks to make sure that they're not contributing a significant amount of traffic (they usually aren't).  If you do this, then by averaging what you see in the morning and evening commute views, you can get a very accurate idea of what road congestion is.

I can't change the radio buttons or their captions, but I can change the graph headers.  I think that to help avoid confusion on this issue, I'll change the header "Road Traffic Volume Data" to "Car, Bus, and Freight Truck Volume Data."  The radio button will still say "Road Traffic."  When I make this change, I'll replace the upload with the new files, and I'll add a note to the bottom of this post to indicate that that's been done.  This should happen within the next couple of hours.

EDIT:  OK, the modified files have been created, tested, and uploaded.  You can still download them from the same place on the previous page.  The only thing that's changed is the title of the Road Traffic view.  Functionality is identical.