YACD - Yet Another CargoDestinations (v2.3 released)

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
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by FooBar »

Logital82 wrote:Anybody here have a binary with 24h clock or better integrated in CPP?
That would be great! :bow:
Shouldn't you ask that in the CPP thread? As that has nothing to do with YACD development...
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by oberhümer »

I get "out of memory" errors trying to load games from nightly OpenTTD, it is always attempted to allocate 4294967295 bytes no matter how small the map is. The ancient trunk intro game works.

I ran OpenTTD in debug mode, and it seems to happen when loading industries (INDY chunk).
Attachments
crash.log.txt
(7.16 KiB) Downloaded 151 times
coredmp.txt
(48.81 KiB) Downloaded 131 times
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by oberhümer »

I've succeeded in going from "out of memory" to "invalid chunk size", and everything from 1.1.3 works, so not that big of a deal. But there's still a nice crash right in the main menu when in debug mode (-d 4)... need to check it out a bit more.
Attachments
crash.log.txt
(7.14 KiB) Downloaded 166 times
crash.png
crash.png (272.88 KiB) Viewed 1455 times
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by ostlandr »

Been looking back through the thread, and didn't find the answer; if I missed it, I apologize.

I started a line hauling iron ore to a steel mill by rail, then used trucks to feed wood and coal to that station for distribution beyond the steel mill. For some reason the trucks load up at the source, partially unload at the railhead, then haul cargo back. Eventually they get full of cargo that they won't unload. (Will post a screen shot later.) I wasn't using any transfer or load orders. I tried to fix this situation by using "unload and no load" at the railhead, but the trucks ignored this order. Any suggestions?
Who is John Galt?
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by Eddi »

please post a savegame and state the exact version you are using.
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by oberhümer »

Checked again, it's a desync error with the "StationCargoList" cache.

Here's the updated patch (r22944) anyhow...
Attachments
yacd.diff
(339.71 KiB) Downloaded 147 times
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by bokkie »

Since I was wondering about current status I searched the IRC logs and came across the following:

2011-10-17 21:20:28 <+michi_cc> Elukka: YACD is waiting on some inspiration on how to make the algorithms at least twice as fast (or for somebody to rewrite the core game loop with multi-core support).
2011-10-17 21:26:01 <+michi_cc> YACD speed is directly related to number of active cargo packets and number of cargo producers (which in practice means house count, in comparison those few industries don't really matter).
2011-10-17 21:29:40 <+michi_cc> Terkhen: Most of the YACD cargo pathfinding could be done parallel if the events that modify link graph woudn't be all over the place. This especially means vehicle movement where movement, stopping, loading/unloading is all done serially on each vehicle instead of first moving all vehicles, then checking station state, then loading etc.
2011-10-17 21:45:14 <+michi_cc> YACD profile: http://www.icosahedron.de/openttd/patch ... meloop.png (created with KCachegrind, source data http://www.icosahedron.de/openttd/patch ... .callgrind )

Posted it here since maybe there's inspiration in the development forum ;), and clarification for other people not on IRC.
Glenn Keen
Engineer
Engineer
Posts: 8
Joined: 31 Oct 2010 18:35

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by Glenn Keen »

Started playing with YACD and really like the idea, but so far I've failed to find a way to make any kind of transport system oay for its self.

I start my games in 1830, and so far trying to run passenger services has turned out to be a bust as there are never the numbers of passengers to make any system work. At best I might get 20 passengers to move in a month even from one large town to another.

It's a similar story with any industry, as none produce enough to make the system carrying them viable.

Any ideas, hints tips, or settings I may have messed up.


Cheers for any info.

Glenn.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by andythenorth »

Glenn Keen wrote:Started playing with YACD and really like the idea, but so far I've failed to find a way to make any kind of transport system oay for its self.
It's very hard in 1830 :) You need good RVs and there aren't any.

At the start of a YACD game, you need to find a cluster of towns where the passengers want to travel mostly in the cluster.

Then spend all your cash connecting them as completely as possible, as cheaply as possible. You need to cover as much of each town as possible to get the maximum coverage of destinations. Get as many passengers onto the network as possible and then let YACD work its routing magic.

Don't waste cash at the early stage on *separate* networks or point-to-point lines. Just connect one network really intensively, mostly with cheap trams or buses.
Glenn Keen
Engineer
Engineer
Posts: 8
Joined: 31 Oct 2010 18:35

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by Glenn Keen »

Thanks for the advise.

I'll give that a try tonight.
fieari
Engineer
Engineer
Posts: 9
Joined: 01 Nov 2011 06:14

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by fieari »

Question... anyone know of any public servers running YACD? I know some running CargoDist, but I've found I vastly prefer YACD, with its predetermined destinations.

The trouble seems to be that patchpacks all seem to include CargoDist instead of YACD. ;(
fieari
Engineer
Engineer
Posts: 9
Joined: 01 Nov 2011 06:14

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by fieari »

Sorry to double post, but I've been playing this more, and noticing that while it works fine for passengers, other kinds of cargo... don't seem to work properly. By that I mean, vehicles will suddenly stop loading cargo at all. I've found it's particularly repeatable with situations where cargo must be transferred between multiple vehicles... oil by train to a dock, picked up by ship for example. The ship, after the 2nd or 3rd load, will simply wait at the dock forever while the train keeps depositing more and more oil. The oil states it is headed for the ship's destination, but it never gets picked up, and with a "Full Load" order, the ship just stays at dock doing nothing.

Is this a known issue?
User avatar
The Irish
Tycoon
Tycoon
Posts: 2092
Joined: 14 Apr 2004 16:06
Location: Bonn, Germany
Contact:

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by The Irish »

Is there any plan on introducing a cargo reduction parameter? I have played 20 game years and some of my pax stations are already overloaded and I really can`t put more trains on my network anymore.
*** Ce French Train Set ***
*** Visit my transport related pictures on Flickr ***
ImageImageImageImageImage
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
"A committee is a group of men who individually can do nothing but as a group decide that nothing can be done" (Fred Allen 1894-1956 US radio comic).
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by bokkie »

There is a patch floating around this forum and also a NewGRF, to which I cannot find a link somehow... it's called townpassmail.grf and I believe it was based on the EarlyHouses NewGRF.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by Alberth »

The Irish wrote:Is there any plan on introducing a cargo reduction parameter? I have played 20 game years and some of my pax stations are already overloaded and I really can`t put more trains on my network anymore.
This is not a problem of YACD, but of OpenTTD in a more general sense.
It should be solved independently.
User avatar
The Irish
Tycoon
Tycoon
Posts: 2092
Joined: 14 Apr 2004 16:06
Location: Bonn, Germany
Contact:

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by The Irish »

Alberth wrote:
The Irish wrote:Is there any plan on introducing a cargo reduction parameter? I have played 20 game years and some of my pax stations are already overloaded and I really can`t put more trains on my network anymore.
This is not a problem of YACD, but of OpenTTD in a more general sense.
It should be solved independently.
Might be, but it is not a problem in normal OTTD games without pax destination, as all trains take all available cargo. But with the change of that logic, the generated cargo is in no relation to the possible services any longer. Therefore, it should be part of the patch introducing the destination that corresponding reductions can be done. Cargodist has it, and so does the old cargodest patch.
*** Ce French Train Set ***
*** Visit my transport related pictures on Flickr ***
ImageImageImageImageImage
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
"A committee is a group of men who individually can do nothing but as a group decide that nothing can be done" (Fred Allen 1894-1956 US radio comic).
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by Eddi »

The Irish wrote:Cargodist has it, and so does the old cargodest patch.
actually no. it has always been a separate patch. never been part of any cargod*st.
User avatar
The Irish
Tycoon
Tycoon
Posts: 2092
Joined: 14 Apr 2004 16:06
Location: Bonn, Germany
Contact:

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by The Irish »

you`re right. sorry about that. Still don`t see a reason for not including it in this patch, though.
*** Ce French Train Set ***
*** Visit my transport related pictures on Flickr ***
ImageImageImageImageImage
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
"A committee is a group of men who individually can do nothing but as a group decide that nothing can be done" (Fred Allen 1894-1956 US radio comic).
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2868
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by ChillCore »

Simply because destination/distribution of cargo is a totally different concept than reducing the amount of cargo being generated.

Commits to trunk are never a combination of two features and even larger patches are split up in smaller commits.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
falconne
Engineer
Engineer
Posts: 6
Joined: 14 Nov 2011 05:35

Re: YACD - Yet Another CargoDestinations (v2.3 released)

Post by falconne »

I'm new to the game so I apologise if this has been asked before. I notice that NoAI integration is still a todo item according to the first post... does this mean that none of the current AIs know how to deal with cargo destinations? I'm trying my first game with this patch and all the AIs seem to be stagnating or going bankrupt because they are building very unprofitable passenger routes... routes that probably would have been profitable in the base game since they are in big towns.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 13 guests