Jump to content
Sign In to follow this  
the7trumpets

Commuting through neighbor connections

14 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

I've done some extensive testing recently on this subject, and I think I've narrowed down the two main issues or bugs which currently exist that you have to watch out for to keep from seeing the 'dissapearing' simms phenomenon.


The first is more of a limitation of the programing. For some reason, the number of sims commuting through a neighbor connection was stored as a UNIT16 number in the dat file, which basically means that you can't have more than 65535 sims going out or coming into a city at a single neighbor connection tile.

The second is far more complex. Somehow, the building development engine, which decides where and when to build new buildings to satisfy demand is feeding the pathfinding engine strange and bogus data for short spurts of time right after buildings begin to develop or fill (I'm not sure which). The result is that upon entering a working city, and seeing a bunch of C or I buildings develop, route querrying the connection point will reveal intermittent jumps (and very occasional dips) in the number of sims using the connection point. It doesn't seem to settle down and go back to the actual number of sims coming into the city until all development ceases, which usually means that all demand is satisfied.

The problem with this is that if you happen to pause the game during one these spurts, the commute data never gets rectified again. Once you have many sims commuting into a city, it is also quite disconcerting to see your traffic congestion graph go from green and yellow to mostly red for an instant, and then back down. When I had about 150,000 sims coming into a region, it would regularly spike up to about 280,000 sims, and then go back down. If you pause and save it when it's spurted, your a gonner.

It doesn't stick at the high number, usually it goes way low as a result. I'm not really sure why or how yet, but hopefully soon I'll post up some pictures and have some plausable explinations. For now, make sure development is not going on, and that your incoming neighbor connections are completely static before pausing and saving a city. Otherwise, your regional commute data will be incorrect, which contributes to nasty things, like sims assuming thier commute is 120 minutes because they can't actually get to the city to see how long it is. In theory, this 'could' be a cause for some zones showing long commute times when others do not, but only if those sims are commuting to another city to work.



Happy playing! 3.gif

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    32.gif


    After much more testing, I've decided that if any neighbor connection gets above 65535 and you happen to save it, your region is toast. Same thing if you save it during one of the 'spikes' of traffic after development.

    In a few test regions I set up, I simply could not get it to rectify itself by buldozing the neghbor connection and creating new ones. I even buldozed both sides of the neighbor connection, and then proceded to delete the working city, which is where the incorrect traffic numbers were. Then I recreated the connection and rebuilt the working city, and the traffic sim was off by the same ammount.

    oh well

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Are you saying it's a bad idea to have one city with nothing but residential traveling to another city with nothing but commercial?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    It's not that it's a 'bad' thing at all. Just that if you're not extremely careful to make sure that you don't save during development, or when there are more than 65525 sims leaving a city through a single connection tile, you will never get correct commute numbers again in this region.



    My hypothesis for why this happens:


    The reason the route querry tool shows 65535 sims exiting a residential city is that those numbers come from the traffic sim actually calculating the number of sims on the road, so it is accurate, with the exception of the 65535 (0xFFFF) display limit. A transit enabled lot on the network verifies that it is an accurate count.

    However, as soon as you save the residential city, it takes its 0x00016A54 number (for example) of sims exiting the residential city and tries to save that in the UNIT16 space for the neighbor connection. What I have noticed is that if there is only one connection, it truncates it (to 0x6A54 sims). However, if there is more than one connection, all the traffic on the neighbor connections gets wacky, none of them seem to line up with the corresponding connections in the residential city. This makes me think that all the UNIT16 variables for traffic entering are stored next to each other in the city file, because one connection would get 0x0001, while another would get 0x6A54, etc. No telling exactly what is going on though, one could be getting 0x16A5, while another is getting 0x4###, etc. Somehow, it's all getting screwed up.

    The thing that still confuses me, is why if you have saved the residential city with more than 65535 sims exiting a single connection tile, and have not yet saved any other cities, you cannot go back into that city and rectify the situation, resaving the city. My only guess is that once you save the residential city with more than 65535 residents exiting a single connection tile, its neighbor connection part of the residential saved city is actually corrupted somehow, to the point where even destroying the connections does not reset the bogus neighbor connection numbers.




    Is there any good news in all of this?

    Well, hopefully. I'm currently experimenting with using custom transit enabled lots to 'limit' the number of sims that can exit through a single connection. I do this by setting the capacity to '1' and adding two extra reps in the exemplar property in the traffic simulator exemplar which controls the speed multiplier when congested. The two extra reps read 65000, and 0.0, meaning that once 65000 sims try to pass through this lot, nobody can get through. It's highly unlikely that any other transit tile would be congested 65,000 times the default capacity, so it doesn't really factor in to the rest of the traffic sim.

    However, I'm not 100% sure if sims going through transit enabled lots get slower according to this property or not. It might be that transit enabled lots always pass sims at the same speed, but I hope not. If this theory works, then even though it's ugly, there is a way to create 'idiot proof' neighbor connections using these transit enabled lots and multiple road connections. With 10 road connections, you could in theory, pass 655,000 sims through from one connection 'array' to another city, never having to worry if any one connection tile got above 65535. Then all you'd have to worry about is to ensure that you're not saving during a traffic spike due to development.

    [edit]
    It seems as though these transit enabled lots have a hard limit of some sort at around 600-800% usage. Not sure exactly why, but it may come in handy. That means I can just set the capacity of a transit enabled lot to somewhere around 8000 and it won't let more than about 64000 cars through. We'll see if this works in practice ;)
    [/edit]



    Again, I really appologize for being so vague, and not providing pictures. I've just been testing so many different possibilities, being dumbfounded at every turn, that I get fed up with the game quite frequently. I'll try to get something up here soon that more people can understand and relate to, or at least so that I can understand it more 3.gif.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    This explains why I sometimes notice that the tarffic density graph suddenly drops by about 20% for a few months, and then goes back up ; and also why in one of my cities I have 10,000 sims using the same avenue while there's just a tiny street on the other side.

    However, does it explain why, in times of development, the sims can use a road which is a dead end on the other side?


    But can 65535 sims use the same road even in a well-built city with many connections? And does it also occurs with subway, trains and highways?

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    Date: 9/16/2004 6:09:26 AM
    Author: simmax

    However, does it explain why, in times of development, the sims can use a road which is a dead end on the other side?

    quote>


    Well, honestly these two 'issues' don't explain that, that's more because of how the pathfinding works. Each city knows if there are available jobs in each wealth type in each of its neighbors. Once you create a neighbor connection to a neighbor with at least one job of a wealth type that the sims need, the sims in your city will begin commuting there.

    Upon entering the neighbor city, the simulator will only allow as many sims in as it has jobs for within that city and in its neighbors. This is usually not a problem, unless the road is a dead end. In that case, no sims will come through the connection point. Connect the road to the rest of your transit network, so that the sims can get to the job that is in your city, and to your other neighbor connections, and immediately the same number of sims who were exiting the region connection in the residential city will be entering in the working city, provided you're not looking at it during one of the development spurts.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    Date: 9/15/2004 1:42:57 PM
    Author: the7trumpets

    Again, I really appologize for being so vague, and not providing pictures. I've just been testing so many different possibilities, being dumbfounded at every turn, that I get fed up with the game quite frequently. I'll try to get something up here soon that more people can understand and relate to, or at least so that I can understand it more 3.gif.
    quote>

    I've believed for a long time, that there's something fishy about this game when it comes to neighbour connections, but have had a hard time trying to prove it. The issue you've bought up is only just one of them (regarding neighbour connections), but none the less something I don't think is really apparent. So I for one can totally relate to vagueness n whatnot of it all ;).

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Ya, there are issues Tropod 3.gif


    I just wish I could find a way to rectify them once it's messed up. As near as I can tell, the problem occurs when you save a city that is recieving sims when the wrong number of sims are coming into that city. After that, deleting network connections, destroyong one or the other city, etc, has zero effect, it's toast from there on out.

    This has big implications. If you have a large commercial district that depends on traffic to pay tolls to support the city financially, as well as sustain the desirability for CS and CO by contributing to high traffic, saving at an inopportune moment can mean disaster. When running several of these tests, I had my budget go from +20,000 to -30,000 a month, and desirability for CO$$$ just went away, causing many of the buildings to abandon.

    Unfortunately it is very doubtful that we will be able to fix this, because I seriously doubt this part of the commuting engine would be stored in an LUA or script of some sort.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    does congestion has anything to do with the numbers? I have a city that has 100% congestion both directions on one side(city) and on the other side(city) it has 36% and 35% congestion. I wonder why they are not consistant?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    1st - a clue on how the hardware works - your 32 bit number 0x00016a54, when writen to a save file should look like 0x54-0x6a-0x01-0x00;  meaning that you could get a 0x0001 and a 0x6a54 back from it - but propably not a 0x??00, 0x016a or 0x54??.
     
    If when you save a 0x00016a54 - you get back 0x0001 and 0x6a54 - then these values are stored next to each other and without a length-factor/flag on them.  This is probably a good indication that the save function is working corrrectly, and that the actual bug is in the load function (i.e. you can corrrectly save 32-bits - but the loader will only pickup 16-bits at a time).
     
    My experience has been that neighbor connection problems only go away when the causitive city AND ALL of it's neighbors are totally deleted (or, sometimes, replacing all of these with backup copies will work).
     
    I'm pretty sure (VERY CERTAIN) that when you save a city, any actually existing neighbor cities save files also get altered (appended to - based on effects observed).  Since RH came out I have become suspicous that SC4-RH is saving some region data somewhere other than in the current region folder - but I haven't really had time to verify this.
     
    Another flacky side effect of these region connections:
    If you make a connection from a working city, save that city, enter the connected - but still in God Mode pre-city (you may see the connections pop-in) and save it and exit to the region (without starting this city) then replace the original city  with a pre-city copy - it will have neighbor connections pop-in when you open it; A nice (tricky?22.gif) way to get SimNation to pay for your landbased (Power, Water, Road, Highway, Rail, Elevated Rail, Monorail, and Subway) neighbor connections?
     
    Did you know 37.gif - that if you save a pre-city (still in God Mode) with neighbor connections already established - that you can export and import this saved-city, complete with already existing neighbor connections?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     
    Stupid piece of crap...
     
    I believe it's UINT, not UNIT, btw.
     
    Anyways, I think we deciphering the save files would help figure this stuff out. I'd gladly help, if I can only find time...

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    Date:9/16/2004 2:16:50 PM
    Author:the7trumpets

    Ya, there are issues Tropod 3.gif


    I just wish I could find a way to rectify them once it's messed up.  As near as I can tell, the problem occurs when you save a city that is recieving sims when the wrong number of sims are coming into that city.  After that, deleting network connections, destroyong one or the other city, etc, has zero effect, it's toast from there on out.

    This has big implications.  If you have a large commercial district that depends on traffic to pay tolls to support the city financially, as well as sustain the desirability for CS and CO by contributing to high traffic, saving at an inopportune moment can mean disaster.  When running several of these tests, I had my budget go from +20,000 to -30,000 a month, and desirability for CO$$$ just went away, causing many of the buildings to abandon.

    Unfortunately it is very doubtful that we will be able to fix this, because I seriously doubt this part of the commuting engine would be stored in an LUA or script of some sort.
    quote>

    When will there be a modd etc that will fix that ?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Okay, I know this is a very old thread, but I've been trying to reproduce the problem and have been unable to do so.

    I took an existing region with a big residential city, and a big commercial city, that were connected with a single gound highway.

    I couldn't get enough sims to use the highway, as it was too congested for them to bother with. (They preferred bussing it.) So, I modded the highway to allow it 10x the normal capacity.

    This caused car use to spike, and a query indicated 65535 cars (plus a few thousand busses) were using it. I presume this means more than that were using it, as 65535 is 0xFFFF in hex, and that appears to be the largest displayable amount.

    I saved both cities, then removed the mod. Car use went back down again. I reconnected these cities to the rest of the region as they were before.

    Commute time in all cities went back down to about where it was before (around 100 minutes). I couldn't get anything to mess up the region.

    Has this bug been fixed by the patch? Or, am I not doing the experiment correctly? As far as I can tell, there doesn't appear to be a bug with highway "overflows".

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    This is interesting ,as i am familiar with the figure 65535 ,i think  the time to save the city ,or not to save the city is when the simulator is recalculating Cummuter No,s ,usually after developement of neighbour tiles ,commuter graph levels dive during this period of recalculation ,i think  what the 7thTrumpet is saying is if u save during this period it will toast your  region,and rightly so as i have been there with my current region it took absoulute years to rectify,ive learned never to save until after the dip , also when the dip is likely to occour,sometimes il even play a city tile ,and add development ,and if i dont get the right vibes, so to say, il exit without, If you try to build a large residential city ,surrounded by Large commercial cities ,this is a common problem.That can be avioded 95% of the time .Most of the connections in my largest city tile read 65535 ,lol.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections