News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

[r3481?] Wrong loading of passengers into trains

Started by Václav, July 05, 2010, 05:17:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Václav

I found something very strange in 3481 (but I think I noticed it also in few older versions) - passenger trains (EMU, DMU or classical) don't load all capacity if train has the same length as platform.

I use platforms long 8 tiles for intercity trains - and those trains are long 8 tiles (as at all times before) - but last car stays empty - as if it think that train is too long.

For example I have bought EMU class 471 (by TommPa9; generation I; click on author's name for download); length of each vehicle of this unit is 3/4 of game tile. Max. number of cars in unit for length 8 is 10 (full length of such unit is 7,5 game tiles). Capacity of unit long 8 tiles is 2144 people - but only 1929 people is loaded.

PS: for gaining such unit use following sequence of cars: 2*( front - middle - end ) + 2*(front - end).

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

prissi

The depot will tell you how many tiles need. The train length is maybe 8,5 internally, and thus the last will not load. The formula in depot and in the convoi routine are the same.

Václav

#2
Of course ... for train long 7,5 tiles I wrote depot shows number 8 (that is length I use) - and train really fit to platform because platform is of half tile longer than train - but last car is not loaded regardless of it.

But how that train can be long 8,5 tiles if 10*0,75 = 7,5? What do you think by word internally?

-->
Train called above was EMU class 471 - that really fit to platform. But train assembled from locomotive and classical passenger cars are longer than 8 tiles - but only on screen - meanwhile game see it long only 8 tiles. It is strange.

-->
I prepared picture

The first train should be showed as long 9 tiles - but it is showed as only 8 tiles long
The second one should be showed as long 8 tiles

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Dwachs

What prissi tried to tell you was:

You should compare the number shown in depot window with the number of platform tiles.

If then the platform is long enough but not all wagons are filled, then there is a bug.

The train length does not depend on the graphics but solely on the number that is specified in the dat/pak.
Parsley, sage, rosemary, and maggikraut.

Václav

#4
Depot shows length of train 8 and platform has 8 tiles - but last car is not filled regardless of it.

And please don't be angry with me for following words: If you don't believe me, visit topic [r3464 and later] Game crash when ending itself], download save file and also pak128 dir archive and test it - only you will need to buy any classical train - because there I have only Shinkanzens by DirrrtyDirk - and they are too short.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

prissi

I bought several classical train when I tested this (becaue the train you used are not part of the distribution.) So any train does not do it for me. You are sure the last tile of your station is not accidentally connected to another station?

Václav

I am sure station is not connected to another station. Sometimes I have problem with connecting to another stations while I build underground network ... but main stations is already built enough outside of city - and city mass transit stations are built after building of railway station.

Currently I try it also with my maglev vehicles (where length of all vehicles is the same - 12 // 3/4 of tile) and result is the same ... but I have not sample by post and freight trains yet (because amount of post is not enough to train would be full - and freight trains will appear later in game, about ten years).

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Dwachs

#7
I can reproduce this bug (it appears with 10 wagons/locomotives of length 13).

The problem is, that internally there are two lengths of trains:
(1) one that is used for reserving tracks
(2) one that is used to decide whether a wagon of the train is inside a station.

The value of (1) is used in the depot window to show max tile length. However, for the train in question, the value of (2) is actually bigger than that for (1):

The train has 10 wagons of length 13.

Value (1) = (9*13 + 8 )/16 = 7.8125 -> 8 tiles needed
Value (2) = (10*13)/ 16 = 8.1250 -> 9 tiles needed
(both values are rounded to the next larger integer number)

The problem is that for reserving tracks the length of the last wagon does not matter, while it matters when it comes to loading this wagon.

@prissi: I see two possible solutions:
(a) let the depot window show the max of the two values above
(b) change the loading routing, which has the disadvantage that trains will get loaded that are visually not entirely in the station.

Edit: Patch for case (a) attached.
Parsley, sage, rosemary, and maggikraut.

Václav

I have one another idea (how to solve it) partly based on real world - people cannot aboard passenger car if it is out of platform - but if they have at least one door for aboarding ...

So if train would not be longer than platform of one half of tile, that it would be fully loaded too.
For example: train 8,5 against 8 of platform - but no more.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

prissi

Actually, at one point there have been same formula for station and depot, so I think the right value should be shown in depot, which is the longer one. At least for shorter vehicles, the second was larger. THus it appears that for the last vehicles max(8,length) shoudl be added.

Dwachs

Incorporated in 3509.

@Vaclav: Please test. The depot window should now display length=9 for the train combination as you wrote. (The bug was in the depot window, that claimed the train fits in stations of length 8).
Parsley, sage, rosemary, and maggikraut.

Václav


Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

nitromefan

Quote from: VaclavMacurek on July 05, 2010, 05:17:52 PM
I found something very strange in 3481 (but I think I noticed it also in few older versions) - passenger trains (EMU, DMU or classical) don't load all capacity if train has the same length as platform.

I use platforms long 8 tiles for intercity trains - and those trains are long 8 tiles (as at all times before) - but last car stays empty - as if it think that train is too long.

Why the last car stays empty is because the train is 8.5. So to resolve this is to stop adding cars when it gets to 8. Even though it says still 8 after you add another car it actually can't fit in a station. Why it says 8 there still is because in simutrans there is no decimals for lengths of stations. :D