Cargo Distribution

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
kamnet
Moderator
Moderator
Posts: 6641
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Cargodist/YACD/ChillPP playing strategies

Post by kamnet » 27 Sep 2014 05:51

This thread (Cargodist/YACD/ChillPP Playing Strategies) is completely out of date. Since Cargodist was accepted as the preferred method of advanced distribution of pax/mail/cargo, YACD is no longer developed by its author. Cargodist has also been significantly improved since its days as just a patch, and ChillCore's Patch Pack is also a few years out of date.

If you're having an issue in an OpenTTD stable build that you believe is due to CargoDist, you may want to post about it in the CargoDist development topic.
Last edited by kamnet on 27 Sep 2014 16:08, edited 1 time in total.

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9278
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Cargodist/YACD/ChillPP playing strategies

Post by planetmaker » 27 Sep 2014 07:12

le_harv wrote: I don't use any patches, and use the latest stable release of 1.4.3. I have a handful of newgrfs that I use too and can provide a list if needs be.
kamnet wrote:If you're having an issue in an OpenTTD stable build that you believe is due to CargoDist, you may want to post about it in the CargoDist development topic.
As that's the case, I moved these two posting to this thread which you indicated. Thanks for finding the proper topic :)

User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso » 27 Sep 2014 19:42

I don't really think the other thread is out of date. I should just change the title. Anyway, the link dropping should be resolved by now as I've committed the respective patch as r25901 on Oct 22, 2013. Can I see a savegame, please?
The guy on the picture is not me, it's Alonso.

le_harv
Engineer
Engineer
Posts: 64
Joined: 27 Sep 2014 05:16
Location: Calgary, Canada

Re: Cargo Distribution

Post by le_harv » 29 Sep 2014 02:20

Firstly, thank you to whoever moved my post around as at least now I am having the conversation. The other thread has the best description of my issue contained in it.
fonso wrote:I don't really think the other thread is out of date. I should just change the title. Anyway, the link dropping should be resolved by now as I've committed the respective patch as r25901 on Oct 22, 2013. Can I see a savegame, please?
You certainly can. See attached. A couple of things that have occurred to me that you will see in the save.
  1. I am using stations in orders to represent headshunts and sidings (like British intermodal terminals) but this does add a bunch of complexity to the orders and route finding
  2. I use order to prevent the trains from unloading and loading at these 'stations' as they aren't really stations
But like I said initially. This totally worked at first, goods were flowing between the two transfers but then it stopped and i can't easily get it to work again. If you figure out that its my way of doing things, I would love to hear any tips you may have. I don't have any earlier versions of the save with the distribution working as intended but I will recreate at some point.
Transfer 1.sav
(282.41 KiB) Downloaded 57 times
EDIT: I recreated a very similar setup in the following savegame and you can see the cargodist working nicely with goods moving between the two transfers
Transfer 2.sav
(280.33 KiB) Downloaded 63 times

User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso » 29 Sep 2014 18:05

None of your stations accept goods. There is simply no feasible distribution scheme for goods anymore. Probably the two towns used to accept goods in the past and when they stopped your routing broke. There might still be a bug here. The route through Transfer B shouldn't have been completely removed but rather reduced to 1 crate. Do you have an earlier save from before it broke?
The guy on the picture is not me, it's Alonso.

User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso » 29 Sep 2014 18:10

Did you destroy and rebuild Transfer B as a different station at some point after the towns stopped accepting goods? That would explain it.
The guy on the picture is not me, it's Alonso.

le_harv
Engineer
Engineer
Posts: 64
Joined: 27 Sep 2014 05:16
Location: Calgary, Canada

Re: Cargo Distribution

Post by le_harv » 30 Sep 2014 02:06

fonso wrote:None of your stations accept goods. There is simply no feasible distribution scheme for goods anymore. Probably the two towns used to accept goods in the past and when they stopped your routing broke. There might still be a bug here. The route through Transfer B shouldn't have been completely removed but rather reduced to 1 crate. Do you have an earlier save from before it broke?
I am very embarrassed, you're absolutely right. I moved the stations so they could accept goods and the problem solved itself immediately. Teach me to turn those notifications off. I have attached the earliest autosave I could find which is about 10 game years behind the original save. I also stored some of the others I could find.
fonso wrote:Did you destroy and rebuild Transfer B as a different station at some point after the towns stopped accepting goods? That would explain it.
I didn't rebuild any stations but I did destroy and rebuild trains.

Again sorry for the wasting time with the easiest solution to the problem.
Attachments
Transfer1a.sav
(254.16 KiB) Downloaded 60 times

Logital82
Engineer
Engineer
Posts: 58
Joined: 15 Feb 2010 12:03
Location: Germany, Berlin

Re: Cargo Distribution

Post by Logital82 » 19 Nov 2014 15:17

In our Game...

http://www.tt-forums.net/viewtopic.php?f=47&t=71747

... i planned that every city has an unique industrial focus so that the consequence is that from this city the produced goods and foods should be shipped out to the rest of my country.
The problem is that Cargodist dont route any goods or foods to far distant cities but ships way to much goods in a small city nearby.

Do I have a chance to handle decentral cargos like food and goods in a way that tgey are fairly shared over all linked city not only the nearest?

Does the "effect of distance" only influence passenger and mail?

Eddi
Tycoon
Tycoon
Posts: 7396
Joined: 17 Jan 2007 00:14

Re: Cargo Distribution

Post by Eddi » 19 Nov 2014 17:31

"effect of distance" applies to all cargos. set it to 0 if you want to handle goods and food. but be aware that this will probably hopelessly overload your passenger network
You might not exactly be interested in Ferion, but if you are, have fun :)

Logital82
Engineer
Engineer
Posts: 58
Joined: 15 Feb 2010 12:03
Location: Germany, Berlin

Re: Cargo Distribution

Post by Logital82 » 19 Nov 2014 17:35

Eddi wrote:"effect of distance" applies to all cargos. set it to 0 if you want to handle goods and food. but be aware that this will probably hopelessly overload your passenger network
Hm, would be nice to have different distance regulator for passengers and goods.

Eddi
Tycoon
Tycoon
Posts: 7396
Joined: 17 Jan 2007 00:14

Re: Cargo Distribution

Post by Eddi » 19 Nov 2014 17:54

sure, lots of things would be "nice", and the current settings are by no means optimal, but there's a tricky balance to not have a completely overloaded and confusing range of settings.

there are other ways you may adress this, like supply nearby and far away destinations from separate origin stations and networks. (each origin industry can supply two stations roughly equally with cargo)
You might not exactly be interested in Ferion, but if you are, have fun :)

Logital82
Engineer
Engineer
Posts: 58
Joined: 15 Feb 2010 12:03
Location: Germany, Berlin

Re: Cargo Distribution

Post by Logital82 » 19 Nov 2014 17:58

Eddi wrote:
there are other ways you may adress this, like supply nearby and far away destinations from separate origin stations and networks. (each origin industry can supply two stations roughly equally with cargo)
Ah! Just waiting for this tip. I will try this.

Hafting
Engineer
Engineer
Posts: 102
Joined: 13 Feb 2014 11:22

Re: Cargodist/YACD/ChillPP playing strategies

Post by Hafting » 21 Nov 2014 07:15

le_harv wrote:
JGR wrote: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 have seen this problem too, playing with FIRS. Fortunately, it goes away. "Unrouted cargo" is only created in the beginning, after some train/truck 'opens' a station for production. After a while, only routed cargo is generated.

There are workarounds:
1. Manually unload trains containing unrouted cargo, by temporarily changing the order for the station to 'unload+no loading' or 'transfer'. The unrouted goods come off. When the trucks arrive, they will pick it up and bring it to the real destination. Could be lots of work though.

2. For a more automatic solution: Set trains to "unload+load" at any stations that may have to transfer unrouted cargo. As all cargo comes off, any waiting truck will pick up. If trucks aren't present, the train will re-load the unrouted cargo - but it will try again and again until the unrouted stuff is gone. This is what I usually do. This wastes time, as the train also unload its routed cargo, and immediately re-loads it. So it pays to remove the 'unload' when there is no more unrouted cargo being sent.

A solution for the developers, would be to always unload "unrouted cargo", if the station is serviced by any other vehicle capable of picking it up. If the other vehicle is present, it will load. If not, the train might load the stuff back, and try again at the next stop. Anyway, the unrouted cargo will eventually reach a destination - without forcing trains to also unload all other cargo.
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.
Nasty how? The cargo should still be generated - but as routed cargo then. Don't wait till trains/transports have made a roundtrip - produce 'routed cargo' much earlier. When the first transport arrives and 'starts production' somewhere, start routing to any accepting destinations that this transport visits. Without waiting for the transport to actually make its first roundtrip. And, a destination don't need to have a industry to be 'accepting', being serviced by another pickup transport would be enough. basically, create the routing graph wihtout the need for unrouted cargo to be shipped around first.

dasy2k1
Transport Coordinator
Transport Coordinator
Posts: 334
Joined: 20 Sep 2006 23:43
Location: UK
Contact:

Re: Cargo Distribution

Post by dasy2k1 » 09 Dec 2014 09:36

Using ECS the type of gameplay for that would very much benifit from having goods food and other town accepted cargo as a seperate routing option (like pax mail and armoured is at the moment)

so for example my coal and sand dosent care which glassworks i deliver it to and the glass dosent care which factoy i drop it off at,
but the goods produced by the factory have a set destination

so for me i would set

Pax Symmetrical
Mail Symetrical
Armoured Asymetrical
Town accepted cargos (goods and food in ECS) asymetrical
other manual

McZapkie
Tycoon
Tycoon
Posts: 1175
Joined: 18 Jan 2014 18:10

Re: Cargo Distribution

Post by McZapkie » 09 Dec 2014 10:47

dasy2k1 wrote: Town accepted cargos asymetrical
other manual
Great idea.
what for we need Cargo Distribution?
For cargo distribution along the network.
Usually we don't need distribution of coal etc along whole network (usually it have more flaws then profits),
but often we need to distribute goods/food etc for many cities.
Town growth effect qualifier is easy to check AFAIK.

User avatar
te_lanus
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jul 2012 18:04
Location: The Elizabeth Arkham Asylum for the Criminally Insane

Re: Cargo Distribution

Post by te_lanus » 09 Dec 2014 11:34

Food and to an extent supplies (IE farming supplies) would be "nice" to have as an extra argument.

McZapkie
Tycoon
Tycoon
Posts: 1175
Joined: 18 Jan 2014 18:10

Re: Cargo Distribution

Post by McZapkie » 09 Dec 2014 11:55

te_lanus wrote:Food and to an extent supplies (IE farming supplies) would be "nice" to have as an extra argument.
There was previously mentioned, that there is no possibility (yet) to distinguish precisely, which cargo type/class belong to "supply".
However "express" cargo class can be used (but it would include "primary" fish cargo).


McZapkie
Tycoon
Tycoon
Posts: 1175
Joined: 18 Jan 2014 18:10

Re: Cargo Distribution

Post by McZapkie » 09 Dec 2014 15:25

andythenorth wrote:
McZapkie wrote:However "express" cargo class can be used (but it would include "primary" fish cargo).
And Tourists ;)
Aren't tourist already included via passenger class?

dasy2k1
Transport Coordinator
Transport Coordinator
Posts: 334
Joined: 20 Sep 2006 23:43
Location: UK
Contact:

Re: Cargo Distribution

Post by dasy2k1 » 21 Dec 2014 01:03

i can see the problem although i think that having express as an option would be better than not having it avalable, seems to me that its FISH that is wrongly catogorised, should be piece goods/refrigirated not express (ok I know fish was histroically treated as express cargo but this is one of those cases where gameplay outweighs historical accuracy, the need to avoid the fish going bad would be better placed in the cargo payment scale with it having a very sharp fall off)

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests