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

xmirakulix
Engineer
Engineer
Posts: 36
Joined: 06 Jan 2010 18:06

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

Post by xmirakulix »

After automatic orders were renamed to implicit orders in trunk, yacd 2.2 no longer cleanly merges with upstream.
(svn r22473) -Codechange: Automatic orders are better called implicit orders as no real order influencing path finding is added
Attached the changes needed to resolve the merging conflicts.
Attachments
implicit-orders_yacd22_trunk_r22525.diff
(3.39 KiB) Downloaded 144 times
Chris_Booth
Engineer
Engineer
Posts: 6
Joined: 24 Aug 2009 22:30

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

Post by Chris_Booth »

I was playing a YACD passenger game, and I merged two cmopanies. The routes from company one are now not shown in the route link map, as shown in the image below:Image
I have attached saves of berfor and after the merger. The most strange thing is there is still a demand and a route, so trains are still running at a profit.
YACD Pre Error.sav
(2.76 MiB) Downloaded 169 times
YACD Error.sav
(2.78 MiB) Downloaded 135 times
Chris Booth Transport, 2nd Sep 1943.png
(130.36 KiB) Downloaded 1 time
User avatar
Lupin III
Engineer
Engineer
Posts: 66
Joined: 11 Jul 2007 16:36

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

Post by Lupin III »

After two games with YACD I tried a "normal" game. Delivering everything to a single point almost felt like cheating and not really challenging! I love YACD.

But as stated before: something needs to be done about passengers. I built a city loop line with trains an many stops and trams servicing the area not covered by the train stations. Did the same to another city and connected them by rail. I spammed the tracks with as many vehicles as they could take (ok, I didn't try a 12x12 passenger only station though). Still could never get rid of all the passengers. Counting all waiting passengers on all stations of a city, there were more people waiting than the city had population!

On the other hand getting freight trains to make money is hard. I also had FIRS enabled. It lowers production (esp. of farms) quite A LOT but on the other hand clusters primary industries together (nice having "corn belts" on the map). But due to the farms all wanting to ship their cargo to very different (and far away) secondary industries, it's hard to setup a useful service. Most trams in the cities make more money than most of the freight trains.

I've seen there are many more options in openttd.cfg. Where can I find a description what they do? Maybe some of the problems can already be solved by tweaking them.
Michi_cc
OpenTTD Developer
OpenTTD Developer
Posts: 619
Joined: 14 Jun 2004 23:27
Location: Berlin, Germany
Contact:

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

Post by Michi_cc »

Here's the bug fix release 2.3. Sorry, no new features right now. The usual rambling about the git repo applies.

Notable changes:
  • Changed settings defaults: economy.cargodest.ind_nearby_dist to 4096 and economy.cargodest.ind_chances to "90,95,100".
  • Fix cargo being routed back to the originating station.
  • Route links are now properly reassigned on company take-overs.
  • Transported cargo numbers of industries should match up better now.
The problem Progman reported regarding implicit orders is fixed in trunk now.

-- Michael Lutz
Attachments
yacd_v2_3_r22532.patch
git patch, apply with -p1
(303.92 KiB) Downloaded 169 times
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

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

Post by Wasila »

I might start playing with this patch as soon as I get some free time (now this and Chillcore's pack - that would be great :D). Are all the versions savegame compatible with each other?
User avatar
Tafidis
Traffic Manager
Traffic Manager
Posts: 157
Joined: 19 Oct 2010 19:49

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

Post by Tafidis »

New version? Great! Although I have to restart my new game now ...

Anyway, attached screenshot of subsidy issue (v2.2): No passengers want to go form Senington to Hedingville, but a subsidy is offered nevertheless ...
Attachments
Little Tronnwell Transport, 16th May 1930.png
(165.34 KiB) Downloaded 1 time
Citizens Celebrate! First train arrives in <insert your favourite town/station name here>!
User avatar
lawton27
Tycoon
Tycoon
Posts: 1418
Joined: 03 Aug 2009 14:29
Location: Manchester

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

Post by lawton27 »

What about the 4 to 'other destinations' It's not abundantly clear but one would assume some of these are for the other town.
Creat
Traffic Manager
Traffic Manager
Posts: 141
Joined: 26 Oct 2009 16:33

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

Post by Creat »

First of all thank you for taking the time to make this patch!

I haven't played a game without CargoDist in years, so this provides a welcome alternative in approach. I haven't made up my mind on which one I prefer (especially since this is still in it's early stages). I usually play with destinations only enabled for Pax/Mail (also with CargoDist) as I prefer to have control over what goes where with freight.

I still have a question concerning destinations for freight though: You said in a previous post somewhere that YACD takes stock pile sizes of receiving industries into account. Can you be a bit more specific? I'd be interested in the extent it is included in the decision, but most of all which stockpiles are supported. Does it work with FIRS? And ECS Vectors?

I usually play with ECS Vectors (including the agricultural vector). One of the shortcomings of CargoDist is (or was?), that it can't properly handle the fishing grounds (unless I set the distribution for passengers to 'asymmetric', which has side effects I don't want/like). They are a unusual construct for a OpenTTD industry, as they only produce passengers after you supplied passengers before (resembling workers). They also need those to increase the production to any meaningful level. I have only played two games so far and didn't use them, but that was mainly due to the fact that I couldn't find a town that would supply passengers that want to go there (and there isn't a reverse lookup yet). Will YACD create traffic to a destination if that that destination doesn't have any output (yet)? This is kind of like the hen & egg problem, as I can't send passengers there, so I don't get any passengers which would case passengers to want to go there and so on... :)

Also one request - more of a plea actually - please oh god PLEASE use the main view overlay mechanic fonso coded to display the links and statistics and stuff in the main view (in his repository, the branch is linkgraph-overlay I think). If you start a CargoDist game, you can select 'Link graph legend' from the map-button-menu. There you can pick one (or more) companies and cargoes whose links should be shows. This is the most helpful visual aid possible, as I can leave it on as I work on my network since it doesn't require an extra window or anything. It also provides a great intuitive color scale to represent various levels of usage. I know you still need a better data source (at some point) than 'waiting packets' at stations/links, but there is just nothing better for visualizing that data once it's available than this approach!
This might also allow displaying abstract graphs for planning a network (once you get to the coding of eye-candy/usability features, past core-functionality): Select a cargo and then pick a city or industry, display links to towns/industries to which the selected one wants to send stuff [outgoing] and (possibly in a different color) those who want to send stuff to it [incoming]. It would only be a matter of adding this functionality to the "Ling graph legend" window, as the information is available anyway. This representation is much more intuitive than a potentially really long list with town/industry names in the info window!
Using this overlay over the minimap has the unbeatable advantage that you never have to transpose the minimap position of an object (town, industry, ...) to the main view position, which - lets be honest - is required to judge distance and feasibility of a link/network - in addition to not requiring a (usually rather large) window taking up valuable screen space.
Well enough promotion for the inclusion of that feature, I just hope you'll take a look and see how awesome that is!

Finally a (minor) bug report: As mentioned I'm usually playing with destinations enabled only for pax/mail. I still see destinations displayed for some industries, even though as far as I can tell the entries don't mean anything (see screenshot). So I think this is just a visual issue. To reproduce it just start a game with all freight cargo destinations disabled and take a look at a few industries (can provide a savegame if you can't reproduce it).
Attachments
freight_destinations.jpg
freight_destinations.jpg (146.59 KiB) Viewed 4483 times
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 »

FIRS does not stockpile.
Dewin
Engineer
Engineer
Posts: 17
Joined: 31 Jul 2006 05:05

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

Post by Dewin »

I keep thinking of ideas for how cargo destinations could be determined and not getting around to posting them. I'm not sure if this is the ideal thread for it, but I figure I should post regardless. I also haven't figured out specifics.

What if destinations were determined by the purchaser of an cargo rather than the producer. Such that:
* Each industry has a random 'cost' for producing a given cargo. This can be measured in arbitrary units.
* Purchasers favor the lower overall costs for most items. This usually means nearby goods, but in some cases it's cheaper for them to import from a long distance.
* Nearby industries of the same type tend to have the same average manufacturing cost with some degree of random variance.

Thus, cargo destinations isn't so much "I want to send X% of this coal to power station Y" as it is "It's not economical for us to import coal from coal mine Z".

Different cargoes or industries can have different variances -- some industries might focus on more exotic (far away) goods, or perhaps there can be a 'quality' measure as well -- in some industries, quality may trump cost to some degree or another. This can mostly be hidden and/or approximated but is just an idea on how to determine cargo destinations.

For passengers, I imagine it'd be more a case of being related to city distance/population, and passenger generation is (typically) symmetric. However, some towns could randomly be tourist destinations and thus more likely to attract passengers from far away (the amount of 'touristiness' could reduce the effects of distance for travel plans to that town)

Just a wild idea, apologies if it derails this thread.
jmurrayufo
Engineer
Engineer
Posts: 22
Joined: 24 May 2008 23:06

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

Post by jmurrayufo »

I like Dewin's idea about having industries pick where they buy stuff from, but I do question if that is within the scope of the patch. That makes it seem like this is now moving into the economic simulation aspects of things. It would be a fun new dynamic to play with, especially if the players had a means to influence the effects.
User avatar
Expresso
Tycoon
Tycoon
Posts: 1760
Joined: 09 Aug 2004 00:14
Location: Gouda, the Netherlands

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

Post by Expresso »

Hit a slight cosmetic/practical issue here...

I'm running on the humble resolution of 1024x768 (windowed mode) and (as you can see) the window is larger then the screen. In addition the window isn't wide enough to contain the complete text of some destinations.

So, a scrollbar and the ability to resize the window would be GREATLY appreciated.

edit: I've got to correct myself... The resize button fell of the screen for me :S some fix for this would be apprecated, though
Attachments
Poodlesgate Transport, 13th May 2091.png
Poodlesgate Transport, 13th May 2091.png (71.1 KiB) Viewed 1428 times
User avatar
Tafidis
Traffic Manager
Traffic Manager
Posts: 157
Joined: 19 Oct 2010 19:49

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

Post by Tafidis »

Another issue (see the pic in the post directly above - saves me the trouble of posting another pic)

The numbers in the town window don't "add up": Passengers last month: 86 max: 1252

and directly below: "outgoing cargo last month: 199 out of 263 passengers to ..."

I think the total pax generated (above) should be the total of the outgoing pax for all destinations (in this case 199). Am I wrong?
Citizens Celebrate! First train arrives in <insert your favourite town/station name here>!
User avatar
Lupin III
Engineer
Engineer
Posts: 66
Joined: 11 Jul 2007 16:36

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

Post by Lupin III »

Expresso wrote:Hit a slight cosmetic/practical issue here...
It's not only cosmetic. You can't reach the button for the authorities, when there's too many destinations. I had to change the font size to almost unreadable and restart OTTD to access the button for some cities (and change it back after I built my statue, no city can live without my statue ;) ). So it would really be good if the list would be scrollable (or collapseable). And maybe it could be sorted by passenger/mail count instead of destination name.

An overlay for the map showing all the possible connections would also be nice. It would also make it much easier to see where industries want to deliver to. What happens to me A LOT (with multiple same industries per town enabled) are e.g. multiple farms that seem to want to deliver to the same factory, only to find out that it's actually two different factories in the same town area (although this is the fault of the landscape generator that names the industries the same in the first place).

Btw. I altered the parameters base_ind_links, base_town_links, city_town_links in the config file (increased them for testing) and started a game. I like the map but the many destinations makes it even harder. If I change the paramters back to default, load the game and reinitialize YACD (it seems to be possible by setting destinations to "original" and back to "fixed destinations" again; at least industries have different destinations after that), I still get the previous higher number of destinations, not the number I set in the config file. Any way to get this to a lower number without starting a completely new game?
User avatar
bulb
Engineer
Engineer
Posts: 68
Joined: 21 Jan 2007 13:15
Location: Europe/Prague

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

Post by bulb »

Thanks for new attempt at cargo destinations. I never liked the game without it.

I tried playing it and have three issues:

1. I am also seeing the problem reported by Creat few posts ago, but since I wanted to play pith pax+mail+town accepted cargo with destinations, it's more of an issue, because I am than not sure whether it correctly selected which cargos are town-accepted.

2. Town-accepted cargos is somewhat vaguely defined in FIRS. Both food and goods are accepted by cities in arctic or with TTRS, while in temperate with default houses, only goods are and to reduce effect of this difference, FIRS has warehouses and petrol stations to accept both. So maybe instead of defining "town accepted cargos", shouldn't it be based on the cargo classes (i.e. express in this case)? Also separate setting for armoured class which is behaves more similarly to pax and mail in default temperate could be nice.

3. Despite the production levels being quite low in FIRS at the game start, there are often two many destinations, leaving the rate per destination too low to utilize trains while using the early trucks in eGRVTS or LongVehicles4 still means having heaps of them. Is there a way to configure the destination selection to not (or only with low probability) add new destination for cargo before there's say 60 units/destination? This might also be nice to only apply to non-express cargo only.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

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

Post by Zuu »

Lupin III wrote:Btw. I altered the parameters base_ind_links, base_town_links, city_town_links in the config file (increased them for testing) and started a game. I like the map but the many destinations makes it even harder. If I change the paramters back to default, load the game and reinitialize YACD (it seems to be possible by setting destinations to "original" and back to "fixed destinations" again; at least industries have different destinations after that), I still get the previous higher number of destinations, not the number I set in the config file. Any way to get this to a lower number without starting a completely new game?
If you want to change settings in a running game, you cannot do that by modifying your config file. Instead pull down the console inside the game and type

Code: Select all

set <config-var> <new value>
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Lupin III
Engineer
Engineer
Posts: 66
Joined: 11 Jul 2007 16:36

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

Post by Lupin III »

Zuu wrote:

Code: Select all

set <config-var> <new value>
Thanks, but does not work. Either YACD is not really "reinitialized" by switching it off and on in the options (I just observed that it changed "something"), or the console does not work with list parameters (I read this somewhere, but don't know when and where). Or both.

I like the idea of the number of destinations for an industry being dependent on production level and not be a fixed number. In FIRS farms produce around 20 units of cargo a month (although they are clustered). Divide that by multiple destinations and you'll have a single truck waiting for month for a full load for one destination.

The number, when a new "link" is created, should also be somewhat random, just with higher probability for more links at higher production. So not every industry with up to 60 has one link, up to 120 two aso. Links should also have a probabilty of being closed if badly serviced (and industry reduces production).

This would (not scope of this patch, I think) also play nicely with subsidies (already mentioned somewhere earlier). Somtimes new links could be subsidized. Or a producing industry signs a contract with a secondary, which will create an "exclusive" link for some years.

First one or two links links should always be VERY local. Only then should links to farther destinations be created.

Another thing, as I like FIRS, and more like a question to all playing with it: this set has cargo like "farming supplies", "manufacturing supplies". They are supposed to be delivered in small quantities to every industry. How should they be handled?

Btw. I would also do away with the "every industry has at least one supplying industry". If supplying industries have enough production to support more links, the secondary industry will eventually get "targeted". If not they will close some time. Nothing is more annoying of a factory opening on the other end of the map and half of your farms suddenly want to deliver to it :(


And I still can't get "rid" of all the passengers. Convering two cities with tram and train stations and connect the two, will create 1000+ passengers at every station, even if it just a single tram stop. With YACD as soon as you have two cities connected, the trains make money faster than you can spend it. Cities will also grow like crazy: cover a city with bus/tram stops and no 10 years later the city will be five times the size than another city that initially had an equivalent number of people.
This could be the consequence of how "standard" OTTD generates passengers and calculates town growth. Maybe YACD should tweak on these numbers.
spobo77
Engineer
Engineer
Posts: 8
Joined: 13 Jun 2011 09:15

FIRS - transport chain with YACD

Post by spobo77 »

Hi

sth is not working , do you know what might be wrong


coal mine A - steel mill B - machine shop C
coal mine D - machine shop C
steel mill E

train 1 picking up coal at A , going to B , deload , reload with coal from train 2 - going to steel mill E , deload - restart circle.
train 2 picking up metal at B , going to C - switched to coal - pick up coal from train 3 at C - going to B - unload coal for train 1 - switch to metal - restart circle
train 3 picking up coal at D , going to C for unloading.

train 3 refuses to pick up coal at D.

where is the mistake ?

Best regards
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: FIRS - transport chain with YACD

Post by Alberth »

YACD is a patch currently under development.
The best thing you can do is post in the YACD development thread, with the details you explained here, and a save game so the developer (and others) can have a look themselves.

(this to some extent also holds for your previous post about FIRS, it is normal to post in the thread of the patch or the newgrf you have a question about.
In this way, all communication about a topic stays together.)
spobo77
Engineer
Engineer
Posts: 8
Joined: 13 Jun 2011 09:15

Re: FIRS - transport chain with YACD

Post by spobo77 »

Is it possible a forum-mod shifts my posts ?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 9 guests