Jump to content

Ben1220

Member
  • Content Count

    4
  • Joined

  • Last Visited

Community Reputation

1 Recognised

About Ben1220

  • Rank
    Freshman
  1. Thanks for the responses, Thanks for the link to the forum post I'm finding it very interesting, also thanks about pointing out the max commute time, I will try experimenting with this value and see what I can find out. I'm not sure if you guys 100 percent understand the solution I'm proposing though, since it hasn't really been directly addressed. Sorry about that! I'll try to explain it better but it might need me to use images to explain properly. I'm proposing adding a constant value to all (potential) journeys transferring from one city to another in order to discourage sims being overly keen to leave their current city, while still allowing them to do so when available jobs in their current city are sufficiently far away for it to make sense to commute to the neighboring tile. Basically, it makes them "guess" how far they'll have to go in the next city to find a job, instead of assuming they'll find one the second they step over the boundary which is what they do now, causing a lot of the unnatural behavior we see. From what I know about the traffic simulator, this fix would have to come in at the level of the destination finder, not the pathfinder since its the choice of jobs that we're trying to change (or more accurately, choice to leave the city for a job), not the actual shortest path once a job has been found. See here for more details: http://www.wiki.sc4devotion.com/index.php?title=Tutorial:Understanding_the_Traffic_Simulator Since this would be a global city wide constant (well, more precisely a different one for each neighbor connection, so a moderately low number of constants calculated per map, depending on how many connections you have) It does not require the destination finder to know anything additionally about neighboring tiles, it doesn't require the simulator to calculate shortest paths region wide or across neighbor connections, which, I agree, would not be viable. All it requires is a simple addition to be done to all "potential jobs" leaving the city in order to make them less appealing / less likely to come up as an actual shortest path by the algorithm in the current city. Once you load up the second city the same process would apply, meaning sims who DO still chose to go from city A to B will now be under the same constraints in city B that they were in city A, making ridiculously long commutes that cross multiple map tiles when there are plenty of local jobs available less and less likely As for what this constant could be? As I said you could deal with this either by letting the player pick their own value in the traffic simulator like they can pick their own value for max commute time, maybe a good start default intuitively could be constant = distance from connection to center of neighbour map as the crow flies x speed of network time. The former can be calculated easily using simple Pythagoras theorem / 2 dimensional vector distance , for a small map for example it would be sqrt((32-x)^2+32^2) where x is either the vertical offset of the connection location from the bottom left or right corner in the case of east-west connections or the horizontal offset from the top left or bottom left corner in the case of north/south connections. The latter values are already known to us. This would naturally mean that you'd end up adding a larger constant to connections entering large tiles than to medium or small times, since the distance to the center is larger, and you'd have to experiment a bit to see if this is an appropriate thing to do. It might turn out that you do want larger constants for larger map tiles but you don't want them to scale up so quickly like in this basic solution, which I'd hazard a guess based on my intuition would probably be the case, since you'd be less likely to need to go all the way to the center of a large map to find a job than you would in a small map. Of course this is a very very rough estimate / hacky way of dealing with the problem but I think it's a very good compromise since it doesn't require the simulator to deal with any information about neighboring regions (apart from their tile size, which I assume it already knows since it would need to to know which parts of the edge are boundaries of which city) One possible downside to my suggestion is that it might cause situations where a sim isn't willing to cross the border to a job just on the other side of the border, and instead doubles back to a job a lot further away in their current city. This problem is the opposite of the problem we have now where sims do not take reasonable jobs in their own city when their origin is near the border, yet possible jobs in the next city might actually be a long way away, and it's just a side effect of the lack of knowledge the destination finder has of the location of jobs in the neighboring cities, and there isn't much we can do about it. My first idea of forcing sims to take all jobs in the current city before commuting to the next city would obviously be more likely to cause this problem, my second solution of adding a constant hopefully is a better compromise that minimizes both problems. What my solution does allow us to do though is chose which side we want our sims to be biased towards -- leaving the current city or staying in the current city, depending on our choice of constant, or if we want to use this "fix" at all (we have to pick one unfortunately, without regionwide shortest paths) and theoretically with a very good value of the constant chosen, you could make the commuting behavior very natural and minimize ridiculous situations. Whether or not the problem of sims taking neighbor connections too liberally is more of an issue to you than the flipside problem that would be introduced by my solution by them taking neighbor connections too conservatively will depend on the specifics of how your city is set up, my solution would actually make things worse in some situations. Also I don't think this makes the game any easier in a bad way really, since it's just about minimizing dodgy "unnatural behavior" cases that often come up when you use approximation algorithms, which I think is a good thing. Let me finish with an example of the problem in case you're not clear about what I'm talking about: In this city I have low wealth sims in the city to the east and medium wealth sims in the city to the west. The sims in the subway are traveling east to west from the low wealth city towards the medium wealth city, through the CBD. Many of them do leave the subway in the CBD but as you can see, many of them are still taking the subway through to the medium wealth city to the west, despite there being nearby jobs for them in the current city, this can be seen by the building I queried only being half full by medium wealth sims, coming in from the west, with none of its low wealth jobs being taken. As you'd expect, I am having this problem more in the west side of the city, where the allure of that nearby neighbour connection is way too strong for my low wealth sims to resist. Weighting that subway neighbour connection to the west as higher would deal with this problem by making my sims willing to more fully explore this city for jobs before they moved onto the next.
  2. I've been getting frustrated with having to structure my networks in unnatural ways in order to force sims traveling from city A to B to take jobs in B instead of heading express to C simply because the path to C is slightly quicker than taking a job in B. I was wondering if anyone has ever edited / there is a way to edit the traffic sim in order to force sims to take a job in the city they're in if one is reachable, and THEN use neighbor connections for those sims who can't find jobs in the current city. Another idea that might be even better: Would it be possible to add a constant to the distance for all sims using neighbour connections? The constant could be customizable, chosen by the player (perhaps different for each map) or perhaps a reasonable "average" of what you'd expect the travel time in the next city from the border to a job. This could be as simple as using different values of the constant for different map sizes and connection types (road, rail, pedestrian ect) This would make the simulation a lot more realistic and only requires a very small amount of extra computation from a theoretical CompSci point of view. I know it's a very hacky solution and there would be heaps of situations where it doesn't fix the problem but I think it's a good compromise between what we have now where the border itself is considered an endpoint, and running shortest paths between the cities (which I know is probably impossible since the game doesn't know much about neighboring cities while they're not loaded) also given that the latter would be computationally very difficult. Both of these tweaks could also "fix" the eternal commuter bug, or at the very least they would minimize eternal commuters to only be "remainder" sims who can't find jobs in the current city. The first idea of forcing sims to take jobs in their cities as a priority could cause some unnatural behavior though, with sims near a border doubling back and traveling to the other corner of the current tile map instead of stepping over the border, thats why I like the second solution better since, if a suitable constant was chosen, this problem could be minimized. I hope I explained my ideas clearly! I assume that if this were possible to do someone would have already done it or maybe there's an issue with this I'm not thinking of that makes it worse than what we have now, but I thought I'd share the idea anyway just in case.
  3. Broken Neighbourhood Connection

    Thanks for the speedy reply. The connections aren't RHW they are just normal avenues. The problem is that these sims can't find ANY jobs at all and are leaving due to abandonment, despite there being a large amount of manufacturing jobs a few blocks away. I am skeptical that the simulator is running as it should be since I have plenty of sims who are happy to cross other borders, even if there is a decently long subway trip to get there, yet not a single sim near this particular border is willing to use it, even via subway. I have also tried: Uninstalling and then Reinstalling NAM to force the traffic simulator to reset to no avail. Has anyone else come across this kind of problem before?
  4. I am having a weird problem where sims from city A refuse to travel to city B for work, even though they are literally a block or two away from the border and there are heaps of avaliable jobs right on the other side of the connection. More specifically: City A has a mix of R$, R$$, CS$, CS$$, CO$$ and IHT. City B has R$$, CS$$ and Manufacturing. The RS$$ sims from city B are perfectly happy to travel into city A for employment. The problem is that the RS$ sims in city A right at the border refuse to use the connections (three avenues and a subway) and will instead get no job zots and eventually become abandoned. Freight from city A is perfectly happy to use the connections (and is the only thing using the connections going from A to B) To make the situation even weirder, city A has plenty of other neighbour connections that are working perfectly well, the problem is just with this one particular city, and in this direction. This problem is really frustrating me and I can't seem to figure out how to get the game to reset this glitch. Replacing the connections hasn't worked, letting 10+ in game years pass hasn't worked. I am using NAM improved path-finding. Any insight as to what is causing this problem and how to get the game to overcome it would be appreciated.
×