News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Handling of overcrowded stops

Started by jamespetts, December 18, 2008, 09:10:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

Although providing sufficient transport capacity is undoubtedly one of the important gameplay features of Simutrans, the current handling of overcrowded stops has some drawbacks. The main problems are: (1) there is no disincentive to let stops become overcrowded, even to hundreds or thousands of times their capacity; and (2) there is nothing to prevent stops where there a greater supply of cargo/passengers than there is transport capacity for them from accumulating indefinitely in ever increasing numbers, which, for passengers and perishable cargo, is not realistic.

I am considering writing a patch for the code to alter the handling of overcrowded stops to address both issues, and I should be interested in any feedback on the best ways of doing so. For problem (1), I have so far considered two alternative methods: (a) applying an overcrowding penalty to all cargo/passengers transported from overcrowded stops, using the same measurement for the penalty as is used for the speed bonus (so that the higher the speed bonus and the greater the degree of overcrowding, the greater the penalty, and that, if the cargoes have no speed bonus by definition, they receive no penalty); or (b) simply reducing the speed bonus for cargoes coming from an overcrowded station. The former is currently my preferred option, as the latter would not provide sufficient disincentive, especially where the transport type has a low speed bonus in any event, and it would be difficult to handle where there would be a negative speed bonus.

As problem (2), I also have two possible alternative solutions: (a) apply a cap on overcrowded stops, such that, when a stop becomes overcrowded to a particular extent, no new passengers/cargo are added because it is full; or (b) remove any cargo/passengers that have been at the stop without being picked up for more than either (i) a fixed period of time; or (ii) a period of time that varies depending on the speed bonus amount of that particular type of cargo, such that cargoes (such as coal) with no speed bonus can continue to accumulate indefinitely.

Any thoughts on these measures would be much appreciated.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Lmallet

I wholeheartedly agree that the handling of overcrowded stops is a problem, and some sort of penalty should be applied. 

On the problem of overcrowding (problem 1), I don't think a monetary overcrowding penalty (à la speedbonus) makes much sense.  I don't know of any transport service who charges less because they have too many customers at one station.  I could see something like a time penalty (ie. trains have to stay longer at a station, because of the mayhem caused by an overcrowded platform, in big stations it could mean more congestion). 

A Transport Tycoon inspired idea would be to have each city give a rating of a transport company.  Overcrowding lowers rating, therefore the city could either cut the amount of passengers/cargo for x period of time, or prevent said transport company from expanding in the city.   This would most likely require a lot of programming, and I am certainly not going to ask for this  :)

As for preventing stops from having a greater supply than its capacity (problem 2):  This actually makes sense, but needs more discussion.  When you think about it, doing this would void the overcrowding problem, as you would never be overcrowded (since you are always under the station's capacity).  And what happens to the excess cargo/passengers?  Do they simply disappear in thin air?  Do they generate more city cars?  Is some sort of penalty imposed?





prissi

There are already few provisions for a player rating. Thus could be easily programmed, including also the coverage of the city and other factors. However, forbidding to build seems not a good solution; at least I hated it in TTD.

Combuijs

QuoteOvercrowding lowers rating

The problem is: which company is causing the overcrowding? For player owned stations this is obvious, but for public stations this can not be decided (Is it the company bringing too many passengers into the station, or is it the company that picks up too few passengers from the station)?.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



jamespetts

Thank you both for your interesting replies. I am particularly interested to learn from Prissi that there are provisions for a player rating: that seems as if it might be most worthwhile. Possible uses for player ratings include passengers using it as a weighting factor when deciding whether to use one or another transport company when both provide routes to their destination, or passengers using it as a weighting factor to decide whether or not to use private cars or not. It could also be a valuable tool in scenarios. One possible difficulty with going to far in loading times at crowded stations, however, is that, if it takes too long to load vehicles in a crowded station, there may come a point in which it is not possible to load passengers/goods onto the vehicles faster than they accumulate, leading to irreversible overcrowding. For this reason, any time penalty must be fairly modest, and cannot be sufficient in itself to be the only limiting factor on overcrowding.

The idea of trains taking longer to load at crowded stations is certainly a good one: there might well be some scope for having variable loading times for different sorts of vehicles in any event (another way, in effect, of distinguishing between long-distance and local vehicles, and an area in which vehicles can become more technically advanced with time), and crowding would be a useful factor to add to that.

As to capacity limitation: like other features of Simutrans, the purpose is to provide an abstracted representation of the aspects of reality that they are simulating and at the same time balance the gameplay. In real life, passengers will not wait weeks on end at a station so overcrowded that the first hundred trains that come in are too full to take any more passengers - people would simply leave and either find another mode of transport or abandon their journeys entirely. Perishable goods would perish if they had to wait too long to be transported, and would not sit around for weeks in the station and then pay differential rates depending on whether the journey took one or two hours once they were eventually loaded. So, whilst it should be quite possible for stations to become overcrowded, there should be some limit to how long that goods/passengers will wait and accumulate.

In respect of rates, it seems to me somewhat contradictory to have a speed bonus system in which passengers and cargo pay more or less depending on the speed of their journey, but then ignore the time spent waiting at an overcrowded station in the calculation of that amount. The idea of an overcrowding penalty for revenue would be to bring the performance of stops in line with the performance of vehicles in terms of revenue calculation, and also provide a strong financial disincentive to players to allow overcrowded stops: at present, there is no such disincentive.

Finally, to answer Combuijs' point, the solution to that in respect of public service stations would be to determine responsibility for overcrowding by checking the destinations of the passengers/cargo against the destinations served by lines serving the station: any company with lines serving that station with destinations including the destination of passengers whose numbers are so great as to cause overcrowding is partly responsible for that overcrowding.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

isidoro

Tracking the time a piece of goods or passengers has been waiting is not feasible, I think.  That would complicate the information stored.  Now all cargo/people with same destination at a station are joined in a single data structure.

I agree with Lmallet in that a monetary penalty is not appropriate.  I would prefer some automatic feedback so the system won't grow and stabilize itself if you don't look at it for some time.  A stable system without overcrowding if you don't want to develop it would be ideal.  Sometimes, specially when the game is well advanced, I feel overwhelmed.  I would prefer something more relaxed.

With respect to goods (2), my opinion, already expressed in threads similar to this one, is that something alike to what happens with factory production should be applied here:

  • When the store for a certain input product of a factory is full, it simply doesn't order more of it.  That works now that way
  • The idea for avoiding overcrowded stations is simple.  If a station is full, no goods/passengers with destination there, will load at origin.  Simple

jamespetts

#6
Isidoro,

thank you for your feedback: much appreciated. The idea that you put forward is a sensible one, and should help to prevent players from being overwhelmed (I was looking back at an old savegame of mine from earlier in the year and found a passenger station with 27,000 or so people waiting. I remember that there were quite a few unconnected towns, and that I had plenty of money to connect them, but was reluctant to do so because of how much that that would inundate the rest of the network with new passengers). Thank you also for pointing out the impracticality of checking how long that individual passengers/goods have been waiting - that has saved me some time, I imagine.

As to your suggestion, what might work well is a system in which, at any amount below the station's capacity rating, the number of passengers generated is unaltered; that at a fixed point above the normal capacity (configurable in simuconf.tab, but by default, perhaps, 200% of capacity) no new passengers will be generated, and between that, a proportionately smaller number will be generated.

The question then is how to feed this into unhappy passenger handling. Perhaps Prissi could assist here: would there be an issue if the passengers who did not accumulate at the station because of the crowding but who otherwise would have done are nonetheless added to the numbers of unhappy passengers for that month? It would be a useful way then for the player to track how many people are being turned away, and would help the rating system (for the growth of towns, etc.) to work as intended.

On a final note, about being overwhelmed, overcrowded stop handling is only part of the solution. Another important part of the solution is a passenger generation system that does not generate too many passengers in the first place. I have been experimenting with code that will allow the passenger level to be set to a much lower level without it being too difficult for the player in the early stages: in other words, dampen the network effect whereby the number of passengers increases exponentially for each new town added to the network, leading to very low passenger numbers in the beginning, but very high passenger numbers later on. I will be posting a patch shortly.

Edit: I am still considering adding a financial penalty for overcrowding for the reasons stated above, but making it configurable in speedbonus.tab so that it can be turned off.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

mjhn

Just a question: does, at any point during the passenger generation routine, the game hold the complete route of a passenger. If it does, then an option would be to make the passenger not travel (and show up as an unhappy face) if any of the stations on the route are overcrowded. This would be a penaly because if a major station is overcrowded, then other routes would start running less full. at the same time this would eliminate a problem I often see where a hub is overcrowded but more and more passengers keep on coming in to it (the sitation is actually worse for goods).

Combuijs

#8
Quotedoes, at any point during the passenger generation routine, the game hold the complete route of a passenger

No, only destination is known (and first transfer step), not how he/she got so far.

QuoteAs to your suggestion, what might work well is a system in which, at any amount below the station's capacity rating, the number of passengers generated is unaltered; that at a fixed point above the normal capacity (configurable in simuconf.tab, but by default, perhaps, 200% of capacity) no new passengers will be generated,

If I understand this correctly (but I doubt it), this is more or less the current behaviour: if a station is full no new passengers for this station are generated. The problem is not in the passenger generation of the overcrowded stations, but the fact that passengers are transported from non-overcrowded stations to overcrowded stations. What am I missing here?
Bob Marley: No woman, no cry

Programmer: No user, no bugs



jamespetts

#9
Combuijs,

ahh, interesting - so, the problem can't be solved by simple capping? It looks like the only thing to do is to reduce the speed bonus for passengers and goods collected from an overcrowded station, unless anyone can think of another way...?

Edit: One thing that I was wondering, actually, is whether it would be possible to check during the route finding algorithm whether any stop along the route is overcrowded, and refuse to route via that stop if it is?

Edit 2: I have been looking into this, but the code in this area is especially complicated. I should be grateful if Prissi or another developer could assist with understanding how some of the routing in simhalt.cc works to see whether it would be possible to check a halt during routing to see whether an intermediate stop is overcrowded.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

isidoro

Thanks, jamespetts, for your kind remarks.  Regarding the routing problem, I think that the solution can be simpler:

  • If a generated passenger has a destination to an overcrowded station or the first transfer station is overcrowded, he becomes unhappy.  In fact, an overcrowded station is treated this way like a "no connection"
  • If, subsequently, he arrives at the transfer station and the first new transfer station or destination is overcrowded, he becomes unhappy (abandon transportation)
Even, to simplify, one can ignore destination and work only with the next transfer.

For goods, it wouldn't be so easy, since goods cannot become unhappy...  can only disappear, à la David Copperfield  ;)

jamespetts

Isidoro, thank you for your reply. One possible difficulty with treating an overcrowded stop as "no connexion" is that it would treat passengers routed through it as "no route" rather than as "unhappy", which would be confusing and not properly affect the player's rating. Also, it ought not affect passengers if their destination is crowded, since a crowded destination does not stop passengers from getting where they want in time: they do not have to queue to get off the train because the destination is overcrowded! The problem with overcrowding is that there are more people at the stop than can fit on the next train, so passengers have to wait a long time, and/or more people waiting at the stop than can comfortably fit in it. Passengers who get off will not be waiting at the station, but departing from it.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

isidoro

You're right in both things.  Only transfer people should be affected and the should be marked as unhappy.  The real equivalence would be that they get disappointed and hire a private car to finish the journey (abandon collective transportation).

The easy patch I made yesterday deals with both things.


jamespetts

Isidoro - thank you for replying :-) I haven't had chance to look at your patch because I'm trying to rework the code for cornering to make it more realistic. But, in the meantime, I noticed on the screenshot that you helpfully provided that the number of unhappy passengers went down and the number of happy passengers went up after your patch was applied - is that intended? Surely, if the stop is overcrowded, the number of unhappy passengers should go up?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

isidoro

It happens a curious side effect.  For big transfer stations, once the patch is applied,  there is a temporal rise of unhappy passengers (a bump), but as the station becomes to be uncrowded, they go to zero there.  And also there is a rise of happy people, but I think that is because other stations become uncrowded too.

When you have time, look at the patch, because I think it would be quite easy to do what you intend (refuse to travel if any station of the route is crowded).

The routing algorithm can be tweaked quite easily if I'm right.  I would like to do something so that when in a public station, some passengers refuse to ride on empty vehicles of a company if the service is poorer than the service of another one (witch quicker and more frequent vehicles)...

colonyan

#15
*Economic Penalty: I see in game station overcrowding as real world delay of train at the fault of company. Doesn't they pay back entirely or partially if the fault is purely on the company?  I'm with economic penalty.



colonyan

Bringing back old ideas.

In previous overcrowding station thread, someone proposed this really simple approach.
The idea was to assign higher value of transfer point for overcrowded stations depending on its severity.
Default maximum transfer point was 9.
So assigning value high enough will successfully hider the passenger going through problematic
stations.

It can work? Any savvy person can comment? 

VS

#17
This is a mere guess: it might be easy and fast - all at the same time. I'll just look at code... of course information about overflowing would have to be cached.

EDIT: Hehehe, that was easy, really. It appears crowded status is already cached, and furthermore the whole logic is already inside station object... even easier. Only it will be interesting to see how it handles under stress, since that is the most important part of Simutrans.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

colonyan

#18
Ohoh, it sounds we will see some breakthrough without waiting months one after another.
I will look forward on this. Thanks!

Edit----------
Hum..... it seems like patch which test uncrowdedness of all transfer station is on study right now.
Are those idea being converge later?
I'm just so curious how this will go. (being perplexed :-\ :-\ :-\ not being able to understand nor program)

VS

I just noticed... since this was just a small change on one line, I guess the other patch is better.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!