Understanding CargoDist - Questions Inside

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

Moderator: OpenTTD Developers

Post Reply
User avatar
Slippy
Engineer
Engineer
Posts: 9
Joined: 13 May 2021 21:13

Understanding CargoDist - Questions Inside

Post by Slippy »

I recently got into OpenTTD and been enjoying it. I wanted to try and create a passenger network with CargoDist but I am having some issues understanding how some things work. These are my questions so if anyone can help that would be great!

1. I understand the difference between symmetric and asymmetric. However I have a question about symmetric. CargoDist states that that with symmetric enabled it will try and send the same amount of cargo back as receives. Does this mean that it generates extra passengers at the station or does it actually mean 'it will try and send back cargo in the same ratio as it has available?
EG - 90 passengers go from station A to B (full unload, no transfer to anywhere else). Station B also received 10 passengers from Station C (same as before, final destination) However Station B is a small village and only produces 10 passengers a month. Does this mean that of the 10 passengers, 90% should go back to station A and 10% should go back to Station C? Or does it create new passengers (so an extra 100) to send back in the same way?

2. I am trying to understand the cargo flow diagram. The colours all make sense but which line refers to inbound and outbound? I have also noticed stations with passengers piling up but the cargo flow line still shows it as being a healthy green! Is this because the next arrival to the station (perhaps a high capacity ship) is due to take them all away? Or has it not had a chance to calculate?

3. With CargoDist what is the best way to handle a passenger network without it getting overloaded quickly? For building the network I try and make some connections, satisfy the demand before making new connections. I usually build a train network to run from town to town with local buses to pick up passengers from trains to distribute to parts of the towns or nearby small villages. However this usually overwhelms the network pretty fast. Would I be better to build multiple routes doing the same thing (so a web rather than perhaps stars with one connection to another star).

Any help is appreciated! I am pretty new to all this but I love the idea of what CargoDist brings to the table, however I struggle to keep demand under wraps with even small networks. I dont have this issue with the basic manual setting but I feel that isnt right for passenger networks and I want to build something semi 'real'
Taschi
Route Supervisor
Route Supervisor
Posts: 425
Joined: 11 Oct 2014 22:58

Re: Understanding CargoDist - Questions Inside

Post by Taschi »

Slippy wrote: 14 May 2021 11:02 2. I am trying to understand the cargo flow diagram. The colours all make sense but which line refers to inbound and outbound? I have also noticed stations with passengers piling up but the cargo flow line still shows it as being a healthy green! Is this because the next arrival to the station (perhaps a high capacity ship) is due to take them all away? Or has it not had a chance to calculate?
Maybe the passengers waiting are routed "to any station" - this generally happens at fairly new stations. They'll show up red in the station window if you check the passengers' destination. But it is also possible that you just have high fluctuation of passengers waiting due to intervals between large-capacity services, like you said.
3. With CargoDist what is the best way to handle a passenger network without it getting overloaded quickly? For building the network I try and make some connections, satisfy the demand before making new connections. I usually build a train network to run from town to town with local buses to pick up passengers from trains to distribute to parts of the towns or nearby small villages. However this usually overwhelms the network pretty fast. Would I be better to build multiple routes doing the same thing (so a web rather than perhaps stars with one connection to another star).
Reduce the "Town cargo generation factor" and / or increase the "Effect of distance on demand". My current values are -0.5 for the former and 175% for the latter - they still generate an amount of passengers that is challenging on main routes, but also allow for fairly low-demand branch lines. Generally, my impression is that with cargodist, far more passengers are generated than without it and those settings somewhat mitigate that.

(Disclaimer, I play with JGR's patchpack and am not sure if those settings exist in vanilla.)
Auge
Director
Director
Posts: 633
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Understanding CargoDist - Questions Inside

Post by Auge »

Hello
Slippy wrote: 14 May 2021 11:02 3. With CargoDist what is the best way to handle a passenger network without it getting overloaded quickly? For building the network I try and make some connections, satisfy the demand before making new connections. I usually build a train network to run from town to town with local buses to pick up passengers from trains to distribute to parts of the towns or nearby small villages. However this usually overwhelms the network pretty fast. Would I be better to build multiple routes doing the same thing (so a web rather than perhaps stars with one connection to another star).
You have to bear in mind the fundamental difference between the original distribution mode and CargoDist.

In the original distribution mode (leaving transfer orders aside) a cargo item (passenger, mail, whatever) enters a vehicle at station A and leaves it at the next station B. This means also, that it frees its place in the vehicle for the next cargo item that "wants" to enter the vehicle. Using CargoDist means (in many cases) a caro item remains in the vehicle at station B because its planned destination is station C or D or …. That means you will need (much) more transportation space (and because of that (much) more vehicles) in your network to transport the same amount of cargo that the game generates (there is no change at this point).

Beside of that you can tweak a few settings.

Tschö, Auge
User avatar
Slippy
Engineer
Engineer
Posts: 9
Joined: 13 May 2021 21:13

Re: Understanding CargoDist - Questions Inside

Post by Slippy »


Reduce the "Town cargo generation factor" and / or increase the "Effect of distance on demand". My current values are -0.5 for the former and 175% for the latter - they still generate an amount of passengers that is challenging on main routes, but also allow for fairly low-demand branch lines. Generally, my impression is that with cargodist, far more passengers are generated than without it and those settings somewhat mitigate that.

(Disclaimer, I play with JGR's patchpack and am not sure if those settings exist in vanilla.)
Ah I knew about the effect of distance on demand but not the town cargo generation factor. Ill see if that can be altered in vanilla that could be exactly what I need. I too have noticed that passenger generation goes through the roof but mail stays really low.
Taschi
Route Supervisor
Route Supervisor
Posts: 425
Joined: 11 Oct 2014 22:58

Re: Understanding CargoDist - Questions Inside

Post by Taschi »

Slippy wrote: 14 May 2021 11:29 I too have noticed that passenger generation goes through the roof but mail stays really low.
Note that mail will only be generated at stations that are served by vehicles that can transport it. Buses generally can't.
User avatar
Slippy
Engineer
Engineer
Posts: 9
Joined: 13 May 2021 21:13

Re: Understanding CargoDist - Questions Inside

Post by Slippy »

Hello
Slippy wrote: 14 May 2021 11:02 3. With CargoDist what is the best way to handle a passenger network without it getting overloaded quickly? For building the network I try and make some connections, satisfy the demand before making new connections. I usually build a train network to run from town to town with local buses to pick up passengers from trains to distribute to parts of the towns or nearby small villages. However this usually overwhelms the network pretty fast. Would I be better to build multiple routes doing the same thing (so a web rather than perhaps stars with one connection to another star).
You have to bear in mind the fundamental difference between the original distribution mode and CargoDist.

In the original distribution mode (leaving transfer orders aside) a cargo item (passenger, mail, whatever) enters a vehicle at station A and leaves it at the next station B. This means also, that it frees its place in the vehicle for the next cargo item that "wants" to enter the vehicle. Using CargoDist means (in many cases) a caro item remains in the vehicle at station B because its planned destination is station C or D or …. That means you will need (much) more transportation space (and because of that (much) more vehicles) in your network to transport the same amount of cargo that the game generates (there is no change at this point).

Beside of that you can tweak a few settings.

Tschö, Auge
Thank you for your help! I guess I just need to rethink how I work things. Its usually only passengers I have the problem with - mail and cargo I can manage very smoothly
Taschi wrote: 14 May 2021 11:33
Slippy wrote: 14 May 2021 11:29 I too have noticed that passenger generation goes through the roof but mail stays really low.
Note that mail will only be generated at stations that are served by vehicles that can transport it. Buses generally can't.
That could be it, I tend to run more bus stops rather than lorry stops which is keeping my mail generation low. Thank you :)
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 495
Joined: 11 Aug 2019 18:15
Contact:

Re: Understanding CargoDist - Questions Inside

Post by 2TallTyler »

Slippy wrote: 14 May 2021 11:022. I am trying to understand the cargo flow diagram. The colours all make sense but which line refers to inbound and outbound?
The lines correspond to whatever side of the road vehicles drive on. This isn't explained anywhere — I had to look at the code to figure this out! There are some potential fixes here.
User avatar
Slippy
Engineer
Engineer
Posts: 9
Joined: 13 May 2021 21:13

Re: Understanding CargoDist - Questions Inside

Post by Slippy »

2TallTyler wrote: 14 May 2021 13:11
Slippy wrote: 14 May 2021 11:022. I am trying to understand the cargo flow diagram. The colours all make sense but which line refers to inbound and outbound?
The lines correspond to whatever side of the road vehicles drive on. This isn't explained anywhere — I had to look at the code to figure this out! There are some potential fixes here.
Ah there we go! That makes sense. So I guess in the case of a single rail track going back and forth the logic would say that (on a left hand drive map) the left colour would relate to the ‘to’ and the right colour would relate to the ‘back’ journey.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Understanding CargoDist - Questions Inside

Post by Eddi »

Slippy wrote: 14 May 2021 11:021. I understand the difference between symmetric and asymmetric. However I have a question about symmetric. CargoDist states that that with symmetric enabled it will try and send the same amount of cargo back as receives. Does this mean that it generates extra passengers at the station or does it actually mean 'it will try and send back cargo in the same ratio as it has available?
no, cargodist does not generate extra passengers. let's make a simple example:
  • you have 3 towns: A, B, C. each town has one station, and they are all connected with each other.
  • town A and B generate 1000 passengers. town C generates 100 passengers.
  • we ignore distance effect for this example.
so now with asymmetric distribution, each town sends half its passengers in each direction, so you get a distribution:
  • A->B 500
  • A->C 500
  • B->A 500
  • B->C 500
  • C->A 50
  • D->A 50
you see that this is very unbalanced, 500 passengers go one way, and 50 passengers go back. symmetric distribution tries to balance this:
  • A->B 950
  • A->C 50
  • B->A 950
  • B->C 50
  • C->A 50
  • D->A 50
it's still the same number of passengers going around, but the chosen destinations are different
User avatar
Slippy
Engineer
Engineer
Posts: 9
Joined: 13 May 2021 21:13

Re: Understanding CargoDist - Questions Inside

Post by Slippy »

Eddi wrote: 15 May 2021 02:55
no, cargodist does not generate extra passengers. let's make a simple example:
  • you have 3 towns: A, B, C. each town has one station, and they are all connected with each other.
  • town A and B generate 1000 passengers. town C generates 100 passengers.
  • we ignore distance effect for this example.
so now with asymmetric distribution, each town sends half its passengers in each direction, so you get a distribution:
  • A->B 500
  • A->C 500
  • B->A 500
  • B->C 500
  • C->A 50
  • D->A 50
you see that this is very unbalanced, 500 passengers go one way, and 50 passengers go back. symmetric distribution tries to balance this:
  • A->B 950
  • A->C 50
  • B->A 950
  • B->C 50
  • C->A 50
  • D->A 50
it's still the same number of passengers going around, but the chosen destinations are different
Thank you for the reply! Seems like I didn’t understand it, my previous understanding was that symmetrical distribution worked like in your 2nd example with asymmetrical just being completely random. With that explained that would be by why when you add a new station to the network which generates a small number of passengers it suddenly becomes overloaded with incoming cargo because the algorithm hasn’t updated the fact that it might only be sending 10 passengers out (for example).
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 11 guests