News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Which passengers are loaded first?

Started by VMann, September 21, 2014, 08:21:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

VMann

I am playing standard (not experimental) Simutrans, version is 112.3, with pak128

When a bus stops at a station with more passengers than the bus can load, and the passengers want to go to different stations which are on the route the bus takes, which passengers are allowed to enter the bus?

Leartin

Those who exit at the next stop enter first, then those who exit at the stop after that, and so on.

DrSuperGood

As a result of the above mentioned behaviour you may notice some strange line behaviour, especially when new convoys are added to a crowded line.

Especially when trying to collapse crowding at crowded transfers there can be considerable knock-on issues resulting in some earlier stops not being services on the way to monuments. For example if a transfer has a lot of people for a town hall, all stops before the town hall might become over crowded until the backlog for people to the town hall is cleared as it will transit through those stops full with people for the town hall stop so cannot take on any more passengers.

All you can do in this situation is wait for the people at the transfer to clear.

Ters

Quote from: DrSuperGood on September 21, 2014, 11:56:02 PM
All you can do in this situation is wait for the people at the transfer to clear.

One can also redesign the network to minimize the effect. Sometimes, the stop "everyone" wants to go to is the last, or in the second half of the schedule. For a circle line, one can then reverse the schedule, or add another line serving the same stops in the reverse order. The effectiveness of this diminishes the more stops there are on the line.

Markohs

The thing in circular lines, is this preference in passenger loading tends to make the line scale not so good when adding extra convois to the line, I've found that adding a extra circular  line with the same stops in reverse order, helps a lot to make it work way better. In cities, where you don't use to have enough room to make a reverse direction line, I just build them underground, under the first line.

This behaviour also make lines that share the same path, and have different lenght, perform poorly like one thing I was trying yesterday, that's:

City A (BIG) <=> City B (MEDIUM) <=> City C (SMALL)

I just made one big line that had as schedule A,B,C,B. The problem is C is a relatively small city and most of traffic goes from A to B. To try to solve this I bought a second convoi, but most of the times the travel from B to C made the line unprofitable.

So I tried make two lines, one:

A > B , a huge convoi, very profitable.
A > B > C > B , a medium sized convoi, that was suposed to load at A, all passengers heading to C, and just help with extra space in the A<=>B passenger traffic.

This ofc performs poorly as exposed by you, since the second convoi gave priority to passengers to B, instead of C, when it catched passengers at A, so passengers to C at A, began to pile up.

Sometimes I think the only good solution, it's just making lines with two stops, it's the only thing that really performs good in big distances, in Simutrans.

I wish there was a way to fine-grain this preference in loading, per-line, has some one thought of exploring this idea, and adding it to the game? Or is there a much easier and simple solution?

Sarlock

I wonder if a toggle option could be added for "load cargo from most distant in schedule first"?  This would allow you to add convoys to the same line that preferentially load for the most distant locations first... sort of an express line.... except that it's still one line, just different settings for the convoys in it.
Current projects: Pak128 Trees, blender graphics

DrSuperGood

QuoteThe thing in circular lines, is this preference in passenger loading tends to make the line scale not so good when adding extra convois to the line, I've found that adding a extra circular  line with the same stops in reverse order, helps a lot to make it work way better. In cities, where you don't use to have enough room to make a reverse direction line, I just build them underground, under the first line.
The reason for this is that the line has a finite transport capacity. You can think of it like a pipe where at most X units per second can be moved. The problem with circular pickup lines is that each stop (a tap that adds stuff to the pipe) are very prone to reaching this maximum transport capacity (filling the pipe up to capacity so nothing more can be transported after a certain distance). Obviously it then clears when it reaches the transfer.

With drop off a similar problem occurs. The transfer loads the line to capacity (fills the pipe) and then the stops along the way slowly trickle out the goods (taps release the pressure of the pipe) until eventually nothing is left from the transfer (all the pressure in the pipe has gone due to the previous taps pulling goods out).

A bi-directional flow improves this to a great extent. First two lines means double the transport capacity (two pipes) which already is a huge help. Secondly it also halves the worst case transport distance (taps into the pipe with the shortest distance to end stop) which means that the average transport capacity cost of goods, shipping effort or goods*distance, from stops is also approximately halved (goods will be in the pipe for less time to reach its destination). This means that the same transport capacity will be able to move more goods.

Markohs

I was thinking on adding that to the game, sarlock, a extra property on the convoi or maybe on the schedule that lets you choose in favouring loading short distance passengers or long distance ones. On real life this is maybe done making long distance tickets more expensive than short distance ones, or having a longer travel time. But on simutrans(standard) those factors don't exist. I was just interested if this feature makes sense, and is desired before I get my hands on implementing it. Anyone has any other oppinion on this?

Ters

Quote from: Markohs on September 22, 2014, 03:36:23 PM
I was thinking on adding that to the game, sarlock, a extra property on the convoi or maybe on the schedule that lets you choose in favouring loading short distance passengers or long distance ones. On real life this is maybe done making long distance tickets more expensive than short distance ones, or having a longer travel time. But on simutrans(standard) those factors don't exist. I was just interested if this feature makes sense, and is desired before I get my hands on implementing it. Anyone has any other oppinion on this?

The notion of express trains have been brought up several times, but apparently nobody has been able to demonstrating a working algorithm, except perhaps the more complicated (and expensive) routing that experimental has. In those cases where I really could need express routes, I have troubles actually making the expresses faster than the others, because they end up stuck behind them. There might not be room for an extra road/track only for the expresses.

Markohs

Well, my aim is just being able to target convois *or* schedules (maybe schedules is just enough), to give priority to long distance passengers over the ones that will travel short distances. Doing something more complicated will make simutrans even more hard to manage that is right now to our players. While loading short distance passengers first might be the best option for trams/urban buses, reversing the situation on trains (but being able to change it simply with a click on the schedule window), might be a very simple solution, that requires no extra CPU time, nor alters the game in a big way. Dunno, it's just an idea, might be a bad one. :)

Ters

As a property on schedules, it can possibly be applied for both individual vehicles as well as lines.

Such an option will however not really have much of an effect on the problem I see discussed above. That is all down to capacity. What it will have an effect on is situations where there is one line going A-B-C and another going just A-B. It those situations, vehicles on the former may fill up with passengers for B when loading at A, and then run almost empty from B to C. Meanwhile, the vehicles on the latter line arriving at A shortly after will find there are almost no passenger for B, only C which it doesn't serve, and will run almost empty to B. So you get two vehicles operating with lots of unused capacity, and yet a crowding of passengers for C at A.

Vladki

I was also thinking that sometimes it might be useful to load long distance passsengers first. I thing that the scenario described by Ters is the most typical. Another could be a local bus line with many stops runnig parallel to longer-distance train with fewer stops. Having express and commuter services on the same road is not practical, unless busses could be overtaken at stops. Also train overtaking is not a simple task.

And a fact from real life. I occasionaly travel by express buses (in Czechoslovakia) and if the bus is getting crowded, the bus driver often asks people travelling further (>100 km) to enter first, eventually leaving short distance passengers to wait for slower regional bus.

Markohs

Well, the same scenario described on trains can really be factible on buses, long distance buses. It can be useful too on air lines, or boat. I think the idea is worth trying, specially since we don't override the old behavior, this just adds the chance to change some lines, he wants to.

I was thinking in a checkbox in the "Schedule" window, "Long distance" help text: "Priorize long distance passengers over short distance ones on loading."

DrSuperGood

Passenger traffic should be symmetrical. As such for every person you drop off there should approximately be one waiting for pickup. The symmetry is only lost if you have been a bad transport manager and allowed stations to overcrowd in which case you never picked up some passengers to act as return flow in which case you disserve to have to run convoys empty, possibly even at a loss.

That said it is down to "luck" as well, however the disparity for any given location should generally be no worse than 20%.

On an interesting note industries appear to have an inherit disparity which makes no sense. The monthly figures quoted do not match the actual arrival and departure statistics with generally more mail arriving than is sent.

Markohs

Passenger traffic should be symetrical yet it's hard to achieve that situation in reality, in the game. The farther you are from the "centers" of the networks, the more passengers will want to travel in direction to the center than go to the outer part. Overcrowded stations make it worse, yes, partially because they stop passenger generation (not passenger "attraction" to them). But... Isn't that super-common in all our users networks? I don't really know, but I'd say it is.

This change, is only a tool, that can be useful in certain situations. What I'm not really sure, if it's worth adding an additional feature that maybe no one will really use (and can maybe confuse users). Or maybe once our players have it available, will begin to use it. No idea.

Ters

Quote from: Vladki on September 22, 2014, 08:56:16 PM
Another could be a local bus line with many stops runnig parallel to longer-distance train with fewer stops.

This should solve itself, as the train can only handle the long distance passengers, while the bus will take care of short distance passengers first.

Quote from: Markohs on September 22, 2014, 10:50:50 PM
Passenger traffic should be symetrical yet it's hard to achieve that situation in reality, in the game. The farther you are from the "centers" of the networks, the more passengers will want to travel in direction to the center than go to the outer part. Overcrowded stations make it worse[...]

For every passenger in Simutrans, there is another passenger wanting to travel in the exact opposite direction, so this should not be the case unless overcrowding consistently prevents passengers going in one of the directions from spawning (unless both passengers are then not spawned).

Combuijs

If you look at this discussion http://forum.simutrans.com/index.php?topic=11194.0 there is a valid third option: Load per destination proportional to the number of passengers waiting for that destination.

In this discussion they talk about which goods to load, which is certainly not the same as to which destination passengers should go, but I see similarities.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Markohs

That was an interesting read, Combuijs. Looks like that implementation is on hold, no? I have the option I suggested (load in reverse order), almost finished, adding a checkbox in the schedule window. Another side effect of this is savegame version have to be stepped up since we have to store that boolean in the savegame, so its persistant.

Combuijs

Quotesince we have to store that boolean in the savegame, so its persistant

If you make it an integer, then you could provide more options than two in the future  :) .
Bob Marley: No woman, no cry

Programmer: No user, no bugs



hreintke

Markohs,

If you make it an integer option of the schedule I can revive my work on proportional loading and adapt it to your implementation.

Herman

Markohs

Sure, so far I just implemented a boolean and a checkbox but we can change to a select box to switch the loading style to:

Passenger loading priority:

- Short distance (default)
- Long distance
- Proportional

I'd keep short distance as the default value, so the impact on CPU is minimal, and only affects on convois the user desires to explicitly change behavior.

To be hones, I just had the GUI part implemented so far, since I'm more a top-down programmer, the value is stored in the schedule, but it's not used yet.

If you are curious this is the work so far (ignore simloop and changes in simmain.cc, they are not related to this). Here

Ters

Quote from: Combuijs on September 23, 2014, 07:34:02 AM
If you look at this discussion http://forum.simutrans.com/index.php?topic=11194.0 there is a valid third option: Load per destination proportional to the number of passengers waiting for that destination.

I can't see how that helps for anything, although it is perhaps the most realistic when there is only one line serving the stop.

Markohs

Quote from: Ters on September 23, 2014, 04:05:08 PM
I can't see how that helps for anything, although it is perhaps the most realistic when there is only one line serving the stop.

I have no idea if that algorithm is better, or not, what I know is it won't hurt anyone adding it into the game, since we can just keep the current one as default, and enable only on select convois, Ters.


Vladki

Proportional loading may be very interesting for mixed cargo trains, to keep all industries supplied proportionally. It might be even better in combination with JIT2.

I wonder whether it is possible to know which passengers (cargo) came first so that there could be a fourth option - FIFO loading. Load those that are waiting for the longest time.

prissi

kierongreen did a long try in said thread on proportional loding: ANd in the end with heavy demand it lead to slightly more waiting.

DrSuperGood

QuoteI wonder whether it is possible to know which passengers (cargo) came first so that there could be a fourth option - FIFO loading. Load those that are waiting for the longest time.
As far as I can tell cargo going to the same place gets merged when in a stop to save memory so I doubt it is possible.

Ters

Quote from: Markohs on September 23, 2014, 08:00:22 PM
what I know is it won't hurt anyone adding it into the game

I'm not so sure. It's more button and knobs thrown in the face of the player. Simutrans is accumulating so many switches and settings that it's almost like a professional sound mixing table, or perhaps those things next to them at concerts controlling the lights. The former is rather straight forward, it just takes some time to set everything right, the latter seems to only make sense to professionals.

Quote from: Vladki on September 23, 2014, 08:44:17 PM
I wonder whether it is possible to know which passengers (cargo) came first so that there could be a fourth option - FIFO loading. Load those that are waiting for the longest time.

Simutrans doesn't track individual passengers or units of goods, just amounts. So all Simutrans can say is "since someone or something going to Blah came first, we load everyone/everything for Blah first", even if most of them/it came long after all the others.

hreintke

Quote
I wonder whether it is possible to know which passengers (cargo) came first so that there could be a fourth option - FIFO loading. Load those that are waiting for the longest time.

Probably keeping a running "average waiting" time for the cargo/passengers on a halt would give the possibility of proportional loading based on some kind of FIFO.

Markohs

Quote from: Ters on September 24, 2014, 05:05:28 AM
I'm not so sure. It's more button and knobs thrown in the face of the player. Simutrans is accumulating so many switches and settings that it's almost like a professional sound mixing table, or perhaps those things next to them at concerts controlling the lights. The former is rather straight forward, it just takes some time to set everything right, the latter seems to only make sense to professionals.

Maybe its time to implement plug-ins so only people that installs extra features has then? That, and cleaning the game from settings and switches that people doesn't really use or need.

I feel a bit frustrated when I try to change something in this game, this community is very relunctant to change.

DrSuperGood

QuoteI feel a bit frustrated when I try to change something in this game, this community is very relunctant to change.
People (players) in general are reluctant to change recently. Even for commercial games, eg Blizzard makes the smallest change to Diablo III and their forum is quite literally flooded with people complaining about it.

I am not sure why people do it as well. I am guessing they either do not understand the software development process (nothing is perfect first time) or perhaps they come from very conservative backgrounds. However in most cases I think you can simply ignore and not let it drag development down.

Ters

#30
Quote from: Markohs on September 24, 2014, 12:51:09 PM
I feel a bit frustrated when I try to change something in this game, this community is very relunctant to change.

The community isn't reluctant to change, they just want a different change from what you want. (Just to clarify, I here mean you in a general sense, not one particular person or group.) And new users want to be able to understand everything immediately.

But flexibility also becomes a problem for us doing support. To reproduce the problem, you first have to figure out exactly how the other user has tuned everything. And every new feature must take into account how it will work with every other possible variation of existing settings. I don't think this latter concern affects this load sequence option, though.

Markohs

What are the alternatives then, just to know it. Just leave this as it is?

Ters

My objection was with the proportional loading option, which has no clear benefit to compensate for increased complexity. The initial idea of adding inverse loading as an option might have enough merit for inclusion. It does however need some testing first, but for that, we need something to test. Just be a bit open for extensions in the save game format. Don't make it a boolean, but a byte value, so that it's a bit easier to add more options if other possibilities should prove useful later.

prissi

We had fifo loading, because the first thing/person to location x was added first to a list. All latter coming stuff to this location was obviously merged there too.

Did not work well at all.

Markohs

Quote from: Ters on September 25, 2014, 04:35:23 AM
My objection was with the proportional loading option, which has no clear benefit to compensate for increased complexity. The initial idea of adding inverse loading as an option might have enough merit for inclusion. It does however need some testing first, but for that, we need something to test. Just be a bit open for extensions in the save game format. Don't make it a boolean, but a byte value, so that it's a bit easier to add more options if other possibilities should prove useful later.

ok, Ters, thank you.

To not de-rail this thread more, I created a new one here:

http://forum.simutrans.com/index.php?topic=13983.new#new