Calculation of transport duration (exact start time)

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
EmpireTrans
Engineer
Engineer
Posts: 1
Joined: 26 Feb 2018 12:30

Calculation of transport duration (exact start time)

Post by EmpireTrans »

Dear all,
being fairly new to OpenTTD, I was wondering how exactly the travel time of cargo is calculated, more exactly: When does it start?
At the time being available for loading at a station?
At the time being loaded onto a train?
At the time the train actually leaves the station?

Background for this question is the "Full load" order option. I am wondering cargo price already drops while a train is waiting to be fully loaded.

I tried findin the exact calculation of the time. I digged through the wiki (https://wiki.openttd.org/Cargo_income and https://wiki.openttd.org/Game_mechanics ... ment_rates) and also the source code of the relevant classes (here: economy.cpp --> GetTransportedGoodsIncome Talk is of "time_in_transit" but I fail to find the calculation of this variable in the source code). I could however not find an exact answer.

Can anybody here help me? Thanks in advance :-)
User avatar
acs121
Tycoon
Tycoon
Posts: 1957
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Calculation of transport duration (exact start time)

Post by acs121 »

Travel time is calculated from moment where cargo was loading IIRC.
So yes, cargo is already dropping price while full loading. A train directly taking up to it's 100% of wood will give better income than the same train, taking more time to load up to 100%.
User avatar
Chrill
Moderator
Moderator
Posts: 15980
Joined: 18 Dec 2004 17:35
Location: Stockholm, Sweden
Contact:

Re: Calculation of transport duration (exact start time)

Post by Chrill »

acs121 is right. This is also why a full load order on a passenger train may be a bad idea but a coal train should definitely be fully loaded. Coal drops very little over time but passenger travel requires quick transport times.
Image
My Scenarios:
Archipiélago Hermoso (Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)
ST2
Engineer
Engineer
Posts: 63
Joined: 07 Apr 2011 14:17

Re: Calculation of transport duration (exact start time)

Post by ST2 »

IMO, trains full load on pax (passengers+mail) service on one side (usually the bigger town side). Train sizes (in this case) must be measured accordingly to what town produces, in a way to keep a good loading time and not making a travel half empty.

That's why it's always a good idea to have feeder stations (that transfer passengers and mail, with rail or RV) from same town (or another close one) to main station for the big haul (distance is the OpenTTD key for big cash). Personally I'm impressed that Chrill didn't mentioned the Game mechanics. Transfers are a "thing", allowed, and that way you can have your main station filled of pax.

On my opinion, don't use full load orders on feeder service stations, but make sure mains station is fulfilled for a Full Load on vehicle's there.

About the payment on transfers and all, Devs can say the exact amount. :)
User avatar
acs121
Tycoon
Tycoon
Posts: 1957
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Calculation of transport duration (exact start time)

Post by acs121 »

Chrill wrote:acs121 is right. This is also why a full load order on a passenger train may be a bad idea but a coal train should definitely be fully loaded. Coal drops very little over time but passenger travel requires quick transport times.
Except AIs, almost nobody uses full-load orders on passengers or mail. Even openttdcoop on their wiki don't reccomend using them. However, for industrial products, be it wood, vehicles (FIRS or ECS) or even goods, i highly reccomend full load.

I never use transfers, mainly because i use JGR's patchpack, which gives town cargo generation factor - i set it to 2.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 10 guests