Transport Fever 2

Transport Fever 2

LineManager
This topic has been locked
GordonDry 6 Jul, 2022 @ 10:48am
Solved: When (oldest) vehicle is sold, does the mod check for cargo load?
Example scenario:
I switch from a [R:400] truck line to a manually set up rail line.
I change the truck line to not load anymore, only unload at the destination.
I also set the rate of the truck line from [R:400] to [R:40] and hope that the mod only sells those trucks that are empty.
Why?
The truck line got over 400 trucks. Yes, 400. I don't want to manually check for empty trucks and sell them when I clicked the whole list.
I just want the mod make the amount of trucks shrink over the time without selling loaded trucks so I can focus on other stuff.
Last edited by GordonDry; 10 Aug, 2022 @ 8:17am
< >
Showing 1-10 of 10 comments
GordonDry 6 Jul, 2022 @ 11:47am 
The selling rate is really slow. After an hour from the 420 trucks only 20 are already sold.
The majority of vehicles is empty now, just 10% are still loaded.
CARTOK  [developer] 7 Jul, 2022 @ 5:28am 
No, the mod doesn't check for cargo - only for oldest vehicle. There is a chance to get a race condition (i.e. excessive number of vehicles) if there is significant congestion causing rate to go down. This can happen also with the default rules, if congestion occurs after the vehicles have loaded up = high average load factor, despite slow movement.

To avoid weird (and expensive) self-oscillations, vehicle addition/removal only happens one at a time every 6 updates (game months, by default). I've tried many versions of settings and time frames, and the current settings yield the most consistent, predictable, and economical result so far = suitable standard/default rules. If you want to go really nitty-gritty, you can relatively easily develop your own rules - check "rules.lua", almost everything you need to create new rules is contained within that file.

An option I could consider is to add a "[X]" rule to tell LineManager that this line is being wound down, and it can sell vehicles as they become empty (instead of waiting for more samples and slow/steady increase/decrease), for instance.

From the top of my head, this should be relatively (tm) simple, but as I'm going on vacation, I can only look at it in a couple of weeks.
Last edited by CARTOK; 7 Jul, 2022 @ 5:29am
GordonDry 7 Jul, 2022 @ 5:44am 
I just wanted to ask for a new rule, now you suggest one; I would highly appreaciate it.
Patience is bliss.
Have a good vacation.

Especially after the mod Rail & Track Industry[www.transportfever.net] came out which creates a huge demand for trucks at the start of a new game as rails have to be produced before rail tracks can be built.
As soon as the iron ore and coal mines are connected by rail all those hundreds of trucks can be sold.
Last edited by GordonDry; 7 Jul, 2022 @ 5:45am
CARTOK  [developer] 7 Jul, 2022 @ 9:41am 
I appreciate your continued feedback, and it's admittedly satisfying to have a happy user (for what was initially intended for my personal use only)! I'll take a look at this when "back in office" again, thanks for the support!
Last edited by CARTOK; 7 Jul, 2022 @ 9:41am
CARTOK  [developer] 1 Aug, 2022 @ 11:16am 
Just pushed an update adding a [X] rule - This rule will stop adding vehicles, and remove all empty vehicles on the line. Let me know how it works.
GordonDry 1 Aug, 2022 @ 11:43am 
Thank you. I will check tomorrow. Perhaps anybody else is quicker.
GordonDry 3 Aug, 2022 @ 7:25am 
I was not able to check yet. Yesterday I only had a short time to play at all and in my actual playthrough I already got rid off all horse coaches (it's 1870).

I assume that it works as all of your updates worked. So I change the title of this thread for now.
CARTOK  [developer] 3 Aug, 2022 @ 7:33am 
No problem at all. Appreciate any feedback you have in due time.
GordonDry 10 Aug, 2022 @ 8:16am 
Good, the algorithm was optimized by the observation of @nhoffmann
CARTOK  [developer] 10 Aug, 2022 @ 8:50am 
Good to hear! I'll close this one (to keep things tidy), feel free to open a new one if you notice anything further. Thanks for your feedback!
< >
Showing 1-10 of 10 comments
Per page: 1530 50