Cargodist/YACD/ChillPP playing strategies

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
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Cargodist/YACD/ChillPP playing strategies

Post by fonso »

This is the place to discuss about how to play with Cargodist or YACD or one of those in a patch pack and how to deal with the additional challenges. In order to report any bugs or problems with the game itself please post in the respective threads in the development forum.
The guy on the picture is not me, it's Alonso.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Cargodist/YACD/ChillPP playing strategies

Post by JGR »

I recently ran into an interesting problem (for reference using Chill's Patchpack (hca7f5804)).
Rather than using direct point to point links for all freight, I decided to try using a bus type topology, using a single train line, onto which feeder services shuttle cargo in either direction from various nodes along the line. In particular, some cargoes fed onto the train line are not directly accepted at any rail stations. As I'm currently near the start of an ECS game, the number of cargoes and the distances between (some) industries is relatively high, but the quantity of cargo to transport is relatively small. So I'm using (at present) a single freight train (with wagons of the various cargoes) to service the line (the line is also used for passengers).
This works quite well with routed cargo, the snag arises when any unrouted freight is generated.
Whilst it is easy to move such cargo onto the rail line (using transfer & leave empty orders), getting it off the line at the correct station is more difficult, as there is not a mechanism for cargo-specific transfer orders. The cargo then just sits on the train indefinitely and effective blocks the line.
I realise that I could just use one train per cargo or one train per exit node, but this is not really ideal, and soon becomes overly expensive (given how many cargoes ECS has). That however would not work well either in the event that a cargo becomes transferable via more than one node along the line.

I've not been able to come up with a genuinely elegant solution, with the possible exception of just disabling unrouted cargo entirely, however this would have other fairly nasty implications.

Any bright ideas? Have others had any luck with this sort of layout?

Code: Select all

       Λ                         Λ                         Λ
       |                         |                         |
       V                         V                         V
<=================================================================================>
                 Λ                         Λ                         Λ
                 |                         |                         |
                 V                         V                         V
(As an additional disclaimer, I've not previously used ECS before, or really attempted to implement the associated type of distributed freight network using cargodist/cargodest/etc.)
Ex TTDPatch Coder
Patch Pack, Github
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargodist/YACD/ChillPP playing strategies

Post by fonso »

As so many people keep asking me how to cope with the increased amount of passengers generated when Cargodist is switched on I sat down to make a little example. As you can see it not only makes a funny picture when looking at the distribution graph but it also takes away all the passengers. The rail network is still not saturated. For example those "regional" trains aren't really doing anything useful and there are still unused tracks going through the center of Montelimar. Both towns have stopped growing because I didn't provide them with more streets. However, you could continue that pattern ad infinitum, provided you build enough of those growth tunnels.

There is still potential for optimization: In each "cell" quite a few tiles next to the stations are wasted as the towns won't build houses there most of the time. Also local trains with tile length 3 but then more of them could maybe provide a higher overall capacity.

How did I come up with that? The trick is providing short paths from any station to any other station. Avoid star shapes and reserve enough space for the tracks. That automatically leads you to designs like this.
Attachments
example.sav
(140.25 KiB) Downloaded 367 times
example.png
example.png (327.29 KiB) Viewed 10727 times
The guy on the picture is not me, it's Alonso.
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Cargodist/YACD/ChillPP playing strategies

Post by FLHerne »

That only works if you're happy to make a dense grid of railways though - I still think some way of limiting cargo production is needed now CDist is in trunk because it's impractical to transport all that cargo on most other network arrangements, especially if using grfs with lower-than-default capacity. For the last couple of years I've been using the side-effect of one of the Daylength patches to get that control, but that's hardly ideal. :(

Anyway, I normally like to make one or more intersecting mainlines (twin-track pax-only, or quad-track with freight too) passing through major cities, and tram/bus/metro services within those cities. Then small passenger branches from cities to smaller towns, and big freight-marshalling yards where cargo is transferred from 'feeder' branches that serve individual industries onto the long block freights that run between these yards. I tend to use autorefit to move similar cargos (e.g. ore/coal/stone/sand) together on these services, to reduce the amount of waiting time.
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargodist/YACD/ChillPP playing strategies

Post by fonso »

FLHerne wrote:That only works if you're happy to make a dense grid of railways though - I still think some way of limiting cargo production is needed now CDist is in trunk because it's impractical to transport all that cargo on most other network arrangements, especially if using grfs with lower-than-default capacity. For the last couple of years I've been using the side-effect of one of the Daylength patches to get that control, but that's hardly ideal. :(
Alternately, you could also provide few stations and just not cover all of the city. Having a single dual track mainline should actually work. Just restrict the number of stations on the mainline to a minimum. There is one thing you cannot do with cargodist: Deliver passengers to places they don't want to go. You need to provide short connections of adequate capacity to all possible destinations. That also holds for long distance connections.

You could post a "failed" example here. Then I can tell you what exactly is wrong.
The guy on the picture is not me, it's Alonso.
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Cargodist/YACD/ChillPP playing strategies

Post by FLHerne »

fonso wrote:Alternately, you could also provide few stations and just not cover all of the city.
Ah, but I want to transport everyone and everything. :wink:
Mesh networks seem to work well in Cargodist (direct, almost-non-stop routes between most pairs of major cities); 'backbone' sort of networks don't with the default cargo-production rate (the central section gets overloaded because the routes between many pairs of cities overlap on the same services). The catch is, I prefer to build the latter... :P

EDIT: Map of one of my more-developed games (I can't post the save, because it's made with a weird, buggy patchpack that I don't even have the source to anymore...).
That doesn't show the tram systems or freight, but it gives an impression of my general layout style. The section between Strawberry Hill and Berwick via Moreton got overcrowded repeatedly, because the routes of passengers between various city-pairs (e.g. Danby-Bynea and Ashford-Chichester) all overlapped on the same services. I didn't want to build mesh-networks to avoid that, so I just added a patch to reduce cargo and carried on. :D

Image
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargodist/YACD/ChillPP playing strategies

Post by fonso »

I can't properly see the network topology there. However, I spot some things in your response:

1. Trams
Be very careful with those. As trams are usually of lower capacity than trains but go to more popular places usually you'll end up with a jam where people transfer from trains to trams. In order to make that work you need A LOT of trams and big multitile tram stations. (at this point you can as well run trains there after all). To invoke the evil "R"-word: Real life cities are using local trains and subways once the trams can't keep up with the necessary capacity.

2. Star shape
Your network map shows a single "hot spot" and that is also the place where it jams. What about building a Strawberry East - Seven Sisters - Radlett - Berwick Interchange circle line with high capacity? You've already finisched one leg of that. When done it should keep most of those passengers out of Strabwerry Hill and Moreton North. I could invoke the "R"-word again here, but doing so would probably get me banned...
The guy on the picture is not me, it's Alonso.
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: Cargodist/YACD/ChillPP playing strategies

Post by bokkie »

fonso wrote:(...)Real life cities are using local trains and subways once the trams can't keep up with the necessary capacity. (...)
(Emphasis mine). Nice new project? What to do with your spare time now Cargodist is included in trunk? ;) Ofcourse, with trams you can also built a bit subway-style, but it would be nice not to have to demolish half town to be able to transport all passengers. Will maybe post my latest savegame later on.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Cargodist/YACD/ChillPP playing strategies

Post by Eddi »

Trams are highly effective with medium-sized cities. Especially when you employ timetables. The problem with urban train lines is that you often need major restructuring in the town, which due to the company rating may take a while.

I have here an example of a town with only a tram system, and later with two S-Bahn lines connecting the most used transfer points: main station, seaport and airport (not on the picture)

This was a YACD game, a full overview can be seen here (12MB)
Attachments
Loisachkirchen Transport, 4. Aug 1953_3.png
(464.08 KiB) Downloaded 10 times
Loisachkirchen Transport, 25. Jul 1988.png
(413.17 KiB) Downloaded 10 times
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Cargodist/YACD/ChillPP playing strategies

Post by Zuu »

In my last game I play with "Neighbours are important" (NAI) in addition to cargodist. NAI uses an unmodified configuration in that game causing in practice towns other than the very smallest to never grow. At least if you provide many destinations for cargo/pax, then you will never reach the requirements for growth.

In this game I don't have any problem with overflow of passengers.

The important NewGRFs in use are NUTS and eGRVTS. The industries are the default industries.
Attachments
DesertDist.sav
(242.5 KiB) Downloaded 234 times
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
aantono
Traffic Manager
Traffic Manager
Posts: 211
Joined: 15 Apr 2010 21:01
Location: Midwest, US

Re: Cargodist/YACD/ChillPP playing strategies

Post by aantono »

How does CargoDist reacts when you have a one-direction Metro line that goes round the town in a circle?

If you have a map with 4 stations and trains going from A -> B -> C -> D -> A -> ...

Code: Select all

  A -- B
  |    |
  D -- C
With CargoDist is there an issue to be using this topology? (I use a single line circular Metro track to save on space taken by dual rail line). If the city grows large, rebuilding inside it gets tough and has negative effect on town rating.
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargodist/YACD/ChillPP playing strategies

Post by fonso »

If it's unidirectional passengers will have to go a long distance with your metro if they want to go from A to D, from B to A, from C to B or from D to C. There will be a lot of people who will want to do that as those places are probably popular and geographically close. This means your unidirectional metro will need about 50% higher capacity in comparison to a bidirectional one. (People can choose to go 1, 2, or 3 stops; assuming they occur in equal numbers we can sum those to get a measure of congestion. The sum is 6. With both directions available the people otherwise going 3 stops only go 1, making the congestion measure 4). Also you will make less profit as the people going 3 stops instead of 1 will take longer to get to their destination.

However, as I've shown in my own example there are applications for unidirectional cycles. If you can keep them small the above disadvantages may be outweighed by the simplified track layout of unidirectional vs. bidirectional cycles.
The guy on the picture is not me, it's Alonso.
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Cargodist/YACD/ChillPP playing strategies

Post by FLHerne »

andythenorth wrote:
FLHerne wrote: I still think some way of limiting cargo production is needed now CDist is in trunk.
All cargos or just pax?
Well, pax and mail are obviously the most affected, because frequently-stopping services change from empty-and-refill at each stop to accumulating far more passengers during a run. Other cargos are usually moved to a single destination anyway, so don't behave that differently - a patch might as well allow controlling them too though, I envisaged a [ bidirectional | primary | secondary ]* settings similar to the CDist ones for distribution type.

* These would apply per-industry/building, not per-cargo - lowering relative production of secondaries would generally be unwanted, because it would stack with the reduced primary production.
- Bidirectional - same industry accepts and produces cargo.
- Primary - produces cargo not directly proportional to the amount of input cargo(s)
- Secondary - cargo produced in proportion to input of some other cargo.

For grf-compatibility, there'd need to be a variable so industry-grfs could check the multiplier (for stuff like the FIRS supply thresholds), and a mechanism to set an industry type as bidirectional/primary/secondary (many of your FIRS industries are 'primary' despite accepting a cargo).
Not sure how backwards-compatibility would work, perhaps along the lines of autorefit where grf-industries not explicitly specifying their type would simply not be affected - still might break Manual Industries or similar though, does that fiddle with the default industries or define new ones?

Of course, the newgrf-interface bit suddenly makes such a patch much more complicated (I might even try to make one otherwise, but the grf interface looks rather complicated)...

Anyway, you're the industry-grf maker. Criticise! :P
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Cargodist/YACD/ChillPP playing strategies

Post by Eddi »

it would absolutely make no sense for secondary industries, and primary industry production usually pales in comparison to passengers/mail.

i haven't really bothered with mail in a long time, as passengers happily will congest your network anyway. cargo rails only play a rather minor role in my games like the one above, because of that same reason
User avatar
Kevo00
Tycoon
Tycoon
Posts: 5646
Joined: 07 Feb 2004 01:51
Location: East Coast MainLine

Re: Cargodist/YACD/ChillPP playing strategies

Post by Kevo00 »

Surely the basic point here is that, like in real life, traffic needs a variety of alternative routes to avoid gridlock. With careful planning and a bit of patience one can get rid of cargodist overloading. The problem I find with trams is that some of them are very slow loading, so you have to choose your model carefully in the busiest cities. I have had situations where passengers have preferred to use trams rather than underground (this happens sometimes in real life too) and my underground has ended up running at a stonking loss.
User avatar
RBC
Engineer
Engineer
Posts: 48
Joined: 19 Jun 2008 07:52
Location: Eibenstock (Germany)

Re: Cargodist/YACD/ChillPP playing strategies

Post by RBC »

got some experience lately with huge cargodist passenger network (2k x 2k map):
first of all: thanks for that amazing patch! :bow:

general network outfit (see atached picture):
  • one main station per town, which connects all lanes heading to that town
  • direct connection for cities (very (!) high throughput)
  • mainline that connect a few towns - possible are circles, sidelines or a connection between cities - not too long
  • sideline to connect a village to the nearest town
to get more passengers to your station:
  • small cities are fine with 1 station (maybe expand them by station walking or shift+click to cover whole town)
  • normal size towns got some Trams
  • huge cities need S-Bahn/metro plus Tram Service to cover the whole city (also try out ships instead of S-Bahn when city is on the coast, infinite capacity)
Trams:
  • Tram lines not longer than 3-4 stations, else the trams can't handle the passenger numbers
anything else:
  • town growth off (I took it on for 10 years, passenger numbers explode and a had a bad fun time expanding already build parts of the network ;) )
  • some vehicles will make negative income (different travel time for routes all around the map), but does not matter in the end (the percentage of feeder service payment can make this a little bit better)
  • plan your network well, in particular the main station in cities needs much space
  • if neccessary add some mainlines between near towns where no mainline exist yet
Attachments
cargodist_scheme.png
(151.36 KiB) Downloaded 7 times
A Song of Fire And Ice, 10. Jan 2130.png
big city with main station, S-Bahn/metro and Trams
(743.96 KiB) Downloaded 7 times
A Song of Fire And Ice, 15. Jan 2130.png
normal town on mainline, Tram line and a sideline to near mountain village
(813.14 KiB) Downloaded 7 times
btzy1996
Engineer
Engineer
Posts: 20
Joined: 31 Aug 2012 05:09

Re: Cargodist/YACD/ChillPP playing strategies

Post by btzy1996 »

I'm playing with cargodist with passenger connections only. I'm wondering if there are any cases where I would earn less income after I build a new connection.

Here's an example:
I have a long train line between two big cities - A and B. What happens if I build a short (really much shorter) train line from B to a small town C?
A <--------------------------------------------> B <----> C

I'm guessing that the number of passengers produced from B will not increase, so the short train line will "steal" passengers from B that would originally want to go to A, and since C is very near to B, the short train line will steal quite a lot of my passengers -- resulting in a loss in income. I think the effect would be lessened (though I would still earn less income) if I use symmetric distribution instead of asymmetric.

Another example would perhaps be to build a station D (a small town) on my long train line:
A <----------------------------> D <---------> B

I'm not familiar to the cargodist algorithm so can someone enlighten me as to whether my guesses are correct?
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargodist/YACD/ChillPP playing strategies

Post by fonso »

btzy1996 wrote:I'm playing with cargodist with passenger connections only. I'm wondering if there are any cases where I would earn less income after I build a new connection.

Here's an example:
I have a long train line between two big cities - A and B. What happens if I build a short (really much shorter) train line from B to a small town C?
A <--------------------------------------------> B <----> C

I'm guessing that the number of passengers produced from B will not increase, so the short train line will "steal" passengers from B that would originally want to go to A, and since C is very near to B, the short train line will steal quite a lot of my passengers -- resulting in a loss in income. I think the effect would be lessened (though I would still earn less income) if I use symmetric distribution instead of asymmetric.
On the flip side you get additional passengers from C which will go to A and B and increase your profit. The exact numbers depend on the sizes of A, B and C, on your "influence of distance on demand" setting and if passengers are distributed symmetrically or asymmetrically.
btzy1996 wrote:Another example would perhaps be to build a station D (a small town) on my long train line:
A <----------------------------> D <---------> B

I'm not familiar to the cargodist algorithm so can someone enlighten me as to whether my guesses are correct?
The same thing, actually. You get additional people from D travelling to A and B, but part of the people from A and B will only go half the way then. In the long run you're usually happy if people only go a short way as you tend to get flooded with so many passengers that you have trouble delivering them all.
The guy on the picture is not me, it's Alonso.
btzy1996
Engineer
Engineer
Posts: 20
Joined: 31 Aug 2012 05:09

Re: Cargodist/YACD/ChillPP playing strategies

Post by btzy1996 »

Thanks for the reply!
fonso wrote:On the flip side you get additional passengers from C which will go to A and B and increase your profit. The exact numbers depend on the sizes of A, B and C, on your "influence of distance on demand" setting and if passengers are distributed symmetrically or asymmetrically.
I kinda get the idea, but I was wondering whether the additional passengers from C would be worth moving if town C was a lot smaller than city B.

Usually I play with symmetric distribution, but on public multiplayer servers with cargodist it's asymmetric which causes my trains from B to C to be overcrowded but my trains from C to B to be pretty empty.

I'm the kind who usually builds a train line with multiple stations along the way at cities which may not be big like this:
A <-----> X <-----> X <-----> X <----->X <----->X <-----> B
fonso wrote:In the long run you're usually happy if people only go a short way as you tend to get flooded with so many passengers that you have trouble delivering them all.
Anyway, you are right about that so I'll play not only for income but for overall "niceness" of the network.

On a side note, I really love cargodist :D I've been playing the cargodist version of OpenTTD since I heard about it in 2012 and now it's hard to imagine playing without cargodist.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 11 guests