News:

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

Why do trains always advance to the end of stations?

Started by THLeaderH, October 13, 2018, 12:11:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

Hello. I have a question.

In current simutrans, all rail vehicles go until they reach the end of the stations, even if the destination is the middle of the platform. This is obviously intended as it can be seen in the source code.

// use length 8888 tiles to advance to the end of all stations
return route->calc_route(welt, start, ziel, this, max_speed, 8888 /*cnv->get_tile_length()*/ );


It seems more reasonable for me to use cnv->get_tile_length() than 8888, that forces trains to advance to the end. Could anyone tell me why simutrans does so?

prissi

It has been like that forever. And it does not matter, whether it always goes to the end or just as much as it fits into the station. Going less tiles would be faster (assuming the train returns immeadiately), but alsoo would reduce the revenue (less tiles travelled).

Ters

Quote from: prissi on October 13, 2018, 01:49:26 PMGoing less tiles would be faster (assuming the train returns immeadiately), but alsoo would reduce the revenue (less tiles travelled).
Would it not also reduce the running costs?

DrSuperGood

QuoteWould it not also reduce the running costs?
Yes it would, however due to how running costs and income work in standard it will either mean less loss (revenue less than running cost per tile) or less profit (revenue more than running cost per tile). Since one generally only runs trains with less running cost than revenue per tile on average, going to the end of platform makes sense from that perspective.

This is different in extended however. There journey time plays an important part, and hence stopping earlier would give value even if it means less profit for the above reasons.

THLeaderH

Since the answer to the question whether trains should always advance to the end of platform seems to depend on the situation, why don't we make it configurable? In other words, we prepare "advance_to_end" option and users can choose whether trains go until they reach the end of the stations. True means trains always advance to the end and it is more reasonable to set the default value true, from a perspective of compatibility.

Ters

Every configuration option adds to the list of things that has to be taken into account when doing other changes in the future and tested with all possible values (ideally before every release).

It also means that it gets more difficult to offer help and advice to other players, because the things that work well the way you have configured Simutrans, may be disastrous for someone running with different settings. Just see how DrSuperGood could come up with three different answers to my simple question (although the answers go a bit beyond just answering the question). And I think there are more possible answers depending on the payment mode configuration. The same is true for debugging, when bugs only appear in certain configurations.

THLeaderH

OK, I'm very sorry. There is no need of configuration.

DrSuperGood

If it were implemented it would probably be a per stop setting in the schedule.

Ters

If it wasn't for chose sign(al)s complicating things, one could just let the waypoint decide where the (road) train stops.