The International Simutrans Forum

 

Author Topic: Prohibiting passengers from taking the same train which they took before  (Read 1121 times)

0 Members and 1 Guest are viewing this topic.

Offline THLeaderH jp

  • Coder/patcher
  • Devotee
  • *
  • Posts: 332
  • Languages: JP,EN
Hello, everyone. I want to propose changing passenger/goods loading algorithm. In current simutrans, routing of passengers are based on route cost. Taking a vehicle costs 9 and stopping once costs 1.

Assume that there are 13 stations, from station 1 to station 13 sequentially. A passenger wants to go from station 1 to station 13. Local trains stop at every stations from 1 to 13. Also, express trains are operated, which stop only at station 2 and station 13. In this case, going with a local train without any transfer costs 9 (taking a local) + 12 (twelve stops) = 21 route cost. On the other hand, transferring to an express at station 2 costs 9 (taking a local) + 1 (sta.1->2) + 9 (taking an express) + 1 (sta.2->13) = 20. Therefore, this passenger gets out at station 2 and transfer to get to station 13.

This transfer at station 2 is intended to take an express train. However, in current simutrans, the passenger gets off a local train at station 2 and immediately take the same local train because station 13 is reachable with the local train. As a result, the passenger meaninglessly continues taking the local train and express trains cannot take passengers.

There are some solutions for this. One is limiting lines which passengers/cargo can take, but I think this is too strict. Im my opinion, it is adequate to prohibit passengers/goods from taking the same train which they took previously. This proposal make it possible to take advantage of express trains.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9531
  • Languages: De,EN,JP
Well thez get out an check when then next train goes. Nothing is coming, and after loading all stations before 13, there is still space left, so they will board. Makes perfectly sense in terms of transporting as much as possible.

There was the discussion about having get off stops in the schedule, which could force such a routing. But those were prone to exploits, was the verdict.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1262
  • PAK-DEV P192C
  • Languages: DE, EN
Makes perfectly sense in terms of transporting as much as possible.
I think you are confusing "loading a vehicle as full as possible" with "transporting as much as possible".
Express trains are faster, so pax reach their goal sooner. When they do, their spot is free again. If you factor in time, pax taking a slower vehicle than they could wastes capacity over time, because they exist longer. So if you want to transport as many pax as possible, you also want them to arrive as quickly as possible (only considering travel time, waiting in stations can be ignored) - this means pax should switch to a 'faster' vehicle whenever possible, or at least if the fastness makes up for the switching, as routing does.

The problem really is that pax route a certain way, but then take different vehicles than they routed for, just because they go to the same destination. This gets chaotic, you can't properly plan for it. Reasonably, pax should only enter a vehicle with their destination if it is the optimal vehicle, since that's what they routed for and is always consistent. Anyway, there is a problem, and even if there is no reasonable way to solve it, please don't act as if it does not exist.
THLeaders approach mitigates an the issue. It's not a fix, and it's still chaotic. Perhaps it's less chaotic combined with schedules. While I would rather see a different solution that would make this obsolete, I see nothing wrong with it.

Offline THLeaderH jp

  • Coder/patcher
  • Devotee
  • *
  • Posts: 332
  • Languages: JP,EN
As Leartin put it, my proposal mitigates the issue but does not solve it. For example, if another local train arrives at station 2 earlier than an express, the passengers take the second local train and they just waste time at station 2. One solution is that the passengers can take only the line which has the smallest route cost, but this gathers all passengers to a single line. Assume that we operate semi-express trains, which stops at station 2, 7, and 13. Taken time with the semi express is almost same as express, but semi express trains will be empty.
Another solution is that prohibiting passengers from taking the “line” they took before. In this case, passengers can take both express and semi express train. I think this can be another reasonable solution, but we have to recalculate when the operation of express is stopped.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1262
  • PAK-DEV P192C
  • Languages: DE, EN
One solution is that the passengers can take only the line which has the smallest route cost, but this gathers all passengers to a single line. Assume that we operate semi-express trains, which stops at station 2, 7, and 13. Taken time with the semi express is almost same as express, but semi express trains will be empty.
One could have a check for smallest route cost, but allow a deviation. Though any solution will always come with new problems.
Other than that, there won't be unused lines, since the express trains don't visit most stations. All traffic from or to them still requires the regional trains. There would be a clear division.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9531
  • Languages: De,EN,JP
This routing cost routing is more or less the algorithm Extended is using. It has problems that the ideal route changes often, depending on congestion and waiting times.

Usually, one will built an express route between major hubs. These hubs get much more passengers than the smaller places in between. Hence a local train will be usually full of the local passengers and most of the express passengers  will wait for the express naturally. Unlike in Japanese realility in most contries local train does not run long distance. At best they run the entire route between two hub.

Still in terms of using capacity, loading all trains full (if possible) will win. Also waiting for an express could built up quite a backlog, since it may run fewer times.

Solving all this issues was the beginning of the extended brach. Since this is realised there, I see little need to do this in standard.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5535
  • Languages: EN, NO
When I get into these kinds of problems, it is not the starting hub that is the problem. With hub A and C and local station B, there might be more passengers going between B and C, than between A and B. A "local" train on the A-B-C run, might load full of passengers for C because it came right after some other train loaded A full of passengers for C. When it reaches B, it can't pick up the passengers going from B to A, because is is already full. The next "express" train going A-C runs empty past B. The return journey works better, since there will be lots of passengers at C going to B. The end result is that B overflows with passengers for C, while the "express" train runs with a loss due to being empty a theoretical quarter of the time, assuming it is a 50% chance for either train being the first at A when new passengers arrive. However the "local" train tends to often be first in practice, for various reasons, so the "express" train runs empty even more of the time.

If people going A-C boarded the "express" train rather than the "local" train all the time, the "express" train will run full all the way. However, now the "local" train will run mostly empty between A and B, thereby being the one to lose money. This means that there is too many trains running between A and B in the first place.

In most cases, I am unable to make a train serving three stations run full enough on all legs to not lose money. Since they only run between two stations, I don't get the local/express problem.