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
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Leanden »

I have to ask because i am uncertain. Will this Cargodest patch only direct cargo to stations which are linked? Or will it predetermine where it wants the cargo to go, and then you have to make the links to match the industries request?
Image
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Zuu »

The answer is in the first post in this thread.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Leanden »

Yea i know, i just wanted to check i'd read it properly. I like the idea, i just dont especially like the idea of the game deciding where i should make my transport links. Thats what subsidies are for ;)

Not all the time anyway. For some games it'd be nice, but the option between YACD and Cargodest/dist style would be nice.
Image
damerell
Traffic Manager
Traffic Manager
Posts: 190
Joined: 22 Feb 2008 23:09

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by damerell »

Leanden wrote:For some games it'd be nice, but the option between YACD and Cargodest/dist style would be nice.
I was pondering this. I think the reality lies somewhere inbetween - before any transport links are built, cargo (and especially pax and mail) should choose its own destinations YACD-style, but once links are built they should inform the preferences of cargo (even pax).

Of course, I realise that's a bit trickier than this (impressive) project.
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by fonso »

I'm going to provide a version of YACD which provides an option to choose its destinations in the existing network (cargodist style) instead of fixing them in advance. You can find it in my git repository at git://github.com/fonsinchen/openttd-cargodist.git in the branch "distyacd". You can already see something there. I've reworked my proof-of-concept code to use a saner search algorithm and I've checked it for industries (but not for passengers this time). There's no way to switch between the different styles, yet, but it correctly removes links now and it prevents any YACD-style destinations.

I'll follow Michi_cc's style of constantly rewriting history to make the commit log look nice, so don't expect to be able to cleanly pull from it.
The guy on the picture is not me, it's Alonso.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Michi_cc »

Eddi wrote:i'm having another weird effect, this time i updated to 1.1 to make sure.

in this savegame i have added coal trains from Wiedhof Ost to Loisachkirchen Fabrik, and coal ships from Loisachkirchen Fabrik to Wörnitzkirchen Mühle, on a route previously serviced by ore ships. but the coal trains are not picking up any coal, only after i unshare the coal ship orders from the ore ship orders, the coal transport starts
It looks like 1.1 is already getting this right (for vehicles/orders added with 1.1). 1.0 was missing a route link pre-fill on adding a vehicle to a shared order list, but with 1.1 all code paths I checked properly update the links. To fix the save, just append a dummy order to the order list and directly remove it again.
Eddi wrote:i had an industry chain A->B, and A said it produces cargo for B, but it didn't actually produce anything until i put all of B into the catchment area of my station, just some of it didn't work. this is kind of a serious deviation from trunk behaviour.
Delivery works just fine even if you remove that extra station tile, it's just that the delivery statistics for the first demand destination wasn't updated for industries. Will be fixed in the next release. It became visible because for some unknown reason the industries in your save are missing the link to "other destinations" (which should internally be the first demand destination). I've also changed the code to make sure it's created even if destinations already exist.
acabin wrote:In a game the first journey of any line has not income?
Looks like I accidentally broke that with another change. Will be fixed.

-- Michael Lutz
jui-feng
Engineer
Engineer
Posts: 35
Joined: 01 Feb 2009 15:20
Location: Germany

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by jui-feng »

fonso wrote:I'm going to provide a version of YACD which provides an option to choose its destinations in the existing network (cargodist style) instead of fixing them in advance.
Does that mean it will be conceptually equivalent to CargoDist when enabling that feature? (I see that there are technical differences, like the way load balancing is done, or the GUI, or the mini map.)

I love the CargoDist concept, but now I realize that I also love the YACD concept, as it is a new challenge and more realistic.

Although I have to admit that I dislike the de facto competition between both patches. If both concepts can be merged into one patch, that'd be wonderful. It's a pity there are two independent patches and one of them will probably die sooner or later (both have probably cost their developer a lot of time and effort). That's just the way it is, I guess. :?
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Eddi »

two? i count at least 6 destination patches...


there needs to be some minimum ratio for production links, i frequently have industries that are the sole provider of a cargo, but some of their destinations get 0 cargo.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Michi_cc »

Eddi wrote:there needs to be some minimum ratio for production links, i frequently have industries that are the sole provider of a cargo, but some of their destinations get 0 cargo.
A principal problem is that industries only produce 8 or 9 times each month, which currently only goes to a single destination. You can tweak those two settings I gave in http://www.tt-forums.net/viewtopic.php?p=944203#p944203, especially the min weight, to make the weights more equal. If that isn't helping enough, I'll have to think about splitting each production run into several destination.

-- Michael Lutz
etran
Engineer
Engineer
Posts: 19
Joined: 25 Feb 2010 22:09

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by etran »

Does dynamic cargo routing check for connections via multiple companies?

Like, if stations of different companies are in theirs catchment areas passengers could switch between them if one provides destination that other one doesn't or provides but is more expensive.
This way behaviour is more realistic, also it enables cargo stealing (so, more competition) and it's infrastructure sharing patch friendly (if it ever gets in trunk).

Cheers!
:D
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Eddi »

cargo does not magically jump between stations, as such the complete question is moot.

the problem with Infrastructure Sharing is never about the routing, that would be trivial to achieve. It is about who gets paid which fraction for the transport, which, to my knowled, no patch has ever adressed yet. and this is completely independent from destinations.
etran
Engineer
Engineer
Posts: 19
Joined: 25 Feb 2010 22:09

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by etran »

OK, passengers surely can jump, as for other cargo, stations must be connected (or maybe we can assume that it's locally transported). Just some thoughts... :|
IS I mentioned because there's station sharing which would probably cause mess if the two paches were merged.

Anyway, cargodist - cargodest are great as they are, I don't complain. :wink:
User avatar
Gord
Chairman
Chairman
Posts: 775
Joined: 15 Aug 2007 10:14
Location: Upper Gornal, Dudley

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Gord »

One of the early passenger destination patches had passengers walking between different stations. You could specify how many tiles passengers could walk for, it worked between different company's stations too.

I'm loving this new destination patch by the way. It is very addictive.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Michi_cc »

Gord wrote:One of the early passenger destination patches had passengers walking between different stations. You could specify how many tiles passengers could walk for, it worked between different company's stations too.
Cargo routing is already the thing using most CPU in YACD games, adding transfers between different stations would make that even worse.

Anyway, the problem with transferring cargo between different companies is purely a problem of how to handle payment. Paying each company leg separately means that you can simply dump all cargo at another company's station that has a route to the destination, and you'd still get unlimited money even if that cargo is never actually delivered by the other company. Paying only at the final destination is equally bad, just don't transport the cargo to the destination and all other companies that transfer to you won't get any money.

-- Michael Lutz
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by bokkie »

Nice! Just started a game with 1.1. I noticed that 'Predetermined tile-to-tile cargo destinations' change every month. Popular destinations stay popular but there is a huge difference each month. In one city, out of 174 passengers, 96 had local destinations in one month. Another month, it was 27 out of 215. Is it supposed to change this much?
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Eddi »

from 174 to 215 isn't that big of a change, but when your network doesn't cover the whole (expanding!) town, then you will not get all passengers.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Yexo »

Eddi wrote:from 174 to 215 isn't that big of a change, but when your network doesn't cover the whole (expanding!) town, then you will not get all passengers.
The change was actually "96 out of 174" to "27 out of 215". So from 55% local destination to 13%. That is a pretty big change imo.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Eddi »

that is, of course, difficult to judge without savegame. but it could be that new houses were built outside of any catchment radius. then it would both increase the total number of passengers, as well as decrease the actually transported passengers. or the station rating was dropping somewhere.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by Michi_cc »

Yexo wrote:The change was actually "96 out of 174" to "27 out of 215". So from 55% local destination to 13%. That is a pretty big change imo.
The weight of local cargo is also dependent on the size of the other destination towns, i.e. how many passengers the other destinations can take. If all the other towns are growing and thus have a bigger pax number, the local percentage will fall.

-- Michael Lutz
User avatar
romazoon
Tycoon
Tycoon
Posts: 1291
Joined: 20 Jun 2010 23:16

Re: YACD - Yet Another CargoDestinations (v1.1 released)

Post by romazoon »

Hi there, very nice patch !

unfortunately i found a probably unexpected behaviour... i have two different ways to go from one city to another... but people keep using only one of them (and many are waiting).

problem lies between Wali and Zion... Bus service is saturated and airplane stay empty . They don t leave and head to same station (connected though by city bus services) but they do leave and head to the same cities

here is savegame
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Amazon [Bot] and 9 guests