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
ChillCore
Tycoon
Tycoon
Posts: 2872
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Cargo Distribution

Post by ChillCore »

Powerout is unlikely ... unless you have reboot on powerout enabled.
Then still automatic plumbs do not switch themselves on after a shortcut. ;)
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.
User avatar
alemaaltevinden
Engineer
Engineer
Posts: 12
Joined: 07 May 2012 17:34

Re: Cargo Distribution

Post by alemaaltevinden »

ChillCore wrote:Powerout is unlikely ... unless you have reboot on powerout enabled.
Then still automatic plumbs do not switch themselves on after a shortcut. ;)
I meant powerout in like, there wasn't any electricity in a short time.

Mm, lol, I can only join the server trough a 192.168 ip, but someone just joined, could someone confirm wheter they can join or not?
OggVorbis
Engineer
Engineer
Posts: 16
Joined: 26 Nov 2007 19:11

Re: Cargo Distribution

Post by OggVorbis »

Yes I can join. However I cannot find the game from before the power outage, where I ruled the world with my great company. Is that game lost forever now?
User avatar
alemaaltevinden
Engineer
Engineer
Posts: 12
Joined: 07 May 2012 17:34

Re: Cargo Distribution

Post by alemaaltevinden »

OggVorbis wrote:Yes I can join. However I cannot find the game from before the power outage, where I ruled the world with my great company. Is that game lost forever now?
I'll take a look for you if it saved.

I have a few autosaves, you want me to send it to you?
OggVorbis
Engineer
Engineer
Posts: 16
Joined: 26 Nov 2007 19:11

Re: Cargo Distribution

Post by OggVorbis »

No thank you. I also have a few local savegames, but of course I'd like to continue with active competitors. I was hoping the server would continue with the last game, instead of starting a completely new one.
User avatar
alemaaltevinden
Engineer
Engineer
Posts: 12
Joined: 07 May 2012 17:34

Re: Cargo Distribution

Post by alemaaltevinden »

OggVorbis wrote:No thank you. I also have a few local savegames, but of course I'd like to continue with active competitors. I was hoping the server would continue with the last game, instead of starting a completely new one.
It always throws an error when i try to load a game.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: Cargo Distribution

Post by Alberth »

While the conversation is most interesting, may I suggest to use a PM for this?
No need to alert everybody at the forum of new messages which are in fact a conversation between two people.
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Cargo Distribution

Post by FLHerne »

What does CargoDist do with conditional orders? In particular, surely an 'if load % not 0' can just be ignored because any following stations will always be visited if some cargo wants to go there - does this work?

Thanks
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: 8289
Joined: 17 Jan 2007 00:14

Re: Cargo Distribution

Post by Eddi »

conditional orders totally destroy any prefillng of the connectivity graph. you cannot analyze them correctly, except in some very narrow corner cases, which mayy or may not be useful enough to bother.

instead, it has to rely on a vehicle actually taking this route at least once, to send any cargo there...
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

It depends on the condition. For most conditions the algorithm just evaluates the condition based on the current state of the vehicle and then assumes the result for prefilling. For conditions based on load percentage to be evaluated while the vehicle is loading it takes the alternative which leads to most cargo being loaded at the current station.
The rationale is that most conditions change slowly enough to be approximated well enough by just assuming the current state of the vehicle. The questions which cargo to load based on next hop and where to go based on the amount of cargo loaded are in conjunction undecidable, so I've just taken some pragmatic approach there. Predicting the load percentage at some later stop is practically impossible (and being able to do so would create the same undecidable problem), so the algorithm might as well take a random guess when it sees a load percentage condition for some later hop while trying to guess a non-loading vehicle's next hops. Just evaluating it on the spot is apparently random enough. At least no one has complained so far.

So, to answer your question. In fact you might be able to do that trick, because loading something is more than loading nothing. However, if the vehicle is empty and cannot load any cargo (for example if there is none at the current station) when the condition is evaluated it might also prefill the other route. You have to show a savegame where it either works or not and then I can explain why it does what it does.
The guy on the picture is not me, it's Alonso.
User avatar
YNM
Tycoon
Tycoon
Posts: 3574
Joined: 22 Mar 2012 11:10
Location: West Java

Re: Cargo Distribution

Post by YNM »

I have a problem with savegame compatibility :

old sav version : g7efff971-cd
loading version : ge2371f40-cd

when loading in the loading version, it says "broken savegame - invalid chunk size", are there any cause of this ?
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: Cargo Distribution

Post by Arie- »

Builds (usually) are not saveagame compatible, use the old executable or start a new game.
User avatar
YNM
Tycoon
Tycoon
Posts: 3574
Joined: 22 Mar 2012 11:10
Location: West Java

Re: Cargo Distribution

Post by YNM »

Arie- wrote:Builds (usually) are not saveagame compatible, use the old executable or start a new game.
How could it be that I already upgraded it once before ? Is it because too far gap between the sav and the load ?
The only time I upgrading it is that they're in sequence.... do I need to do this too (and downloading about ~6 of the versions between) ?
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Cargo Distribution

Post by planetmaker »

Yoursnotmine wrote:
Arie- wrote:Builds (usually) are not saveagame compatible, use the old executable or start a new game.
How could it be that I already upgraded it once before ? Is it because too far gap between the sav and the load ?
The only time I upgrading it is that they're in sequence.... do I need to do this too (and downloading about ~6 of the versions between) ?
You simply might have been lucky. Generally different builds of patches are not savegame compatible, especially if the underlying trunk version changed
User avatar
YNM
Tycoon
Tycoon
Posts: 3574
Joined: 22 Mar 2012 11:10
Location: West Java

Re: Cargo Distribution

Post by YNM »

planetmaker wrote:
Yoursnotmine wrote: How could it be that I already upgraded it once before ? Is it because too far gap between the sav and the load ?
The only time I upgrading it is that they're in sequence.... do I need to do this too (and downloading about ~6 of the versions between) ?
You simply might have been lucky. Generally different builds of patches are not savegame compatible, especially if the underlying trunk version changed
So it is a luck ?( Oh my, what a nice one. :o
Thank you, will be remembered next time....
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
Nat AS
Engineer
Engineer
Posts: 6
Joined: 24 May 2012 07:01

Re: Cargo Distribution

Post by Nat AS »

FLHerne wrote:What does CargoDist do with conditional orders? In particular, surely an 'if load % not 0' can just be ignored because any following stations will always be visited if some cargo wants to go there - does this work?

Thanks
Eddi wrote:conditional orders totally destroy any prefillng of the connectivity graph. you cannot analyze them correctly, except in some very narrow corner cases, which mayy or may not be useful enough to bother.

instead, it has to rely on a vehicle actually taking this route at least once, to send any cargo there...
Wow, I'll have to say this is the first time searching through forms brought up a current discussion of the exact problem I happened to be looking for.

I enjoy using cargodist, but when distributing goods or food down the line, I notice that it dumps all the cargo at the first stop the first time, and then does the actual distribution the second time. However when I was building a rail line on an island with a food plant but no factory, that receved shipments of goods from the mainland via boat, I decided I would save room and have the Food train refit itself to carry the goods.

Each time it finished it's route, it would refit to goods, stop at the station and pick up any goods that were there, if there were no goods avalable, it would go back, refit to food, and continue on as normal, if there were goods, it would carry them down the same route it would take the food.

However when I did this, it seemed to be dumping all the food (or goods), onto the first station, dragging empty cars the rest of the way.

Although, on rare instances it would decided to distribute the cargo properly, although this seems to be random.


Will this ever be fixed? or is it a hard limit? I love cargodist and have a hard time enjoying OTTD without it. but I wish it didn't break like this.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Please provide a savegame! There are certain conditional orders that can be supported and others that can't. The problem is complicated and I can't guess what is happening in your game or even what you are trying to achieve.

It sounds like you have a condition based on load percentage after an order for loading. Cargodist cannot decide what to do there. It can either load cargo and fulfill one branch of the condition or not load it and fulfill the other branch (and if you think "it's clear it should load" then imagine multiple such conditions in a row with different stations and amounts of available cargo). In the end it doesn't know what you want it to do there. I'm willing to implement some kind of pragmatic solution to that ("load whatever you can and see where it gets you") but I need an example showing the problem.

And for the record: Eddi is wrong there. Conditional orders don't necessarily "totally destroy any prefilling of the connectivity graph". Certain conditional orders make prefilling extremely hard, though.
The guy on the picture is not me, it's Alonso.
User avatar
JacobD88
Chief Executive
Chief Executive
Posts: 710
Joined: 16 Aug 2008 17:51
Location: Long Eaton, Nottinghamshire. UK
Contact:

Re: Cargo Distribution

Post by JacobD88 »

Crash for you Fonso with CD version g6def25ed-cd

When accessing the Advanced Settings->Cargo Distribution from the main menu

I get a CTD as soon as i click to expand the options and the message

Code: Select all

Assertion Failed at Line 59 of c:\bamboo-agent-home\xml-data\build-dir\ottd3pt-cd-w32bit-\src\strings_func.h: <= parent.num_param - parent.offset
And the following crash files...
crash.png
(520.84 KiB) Downloaded 1 time
crash.dmp
(1.45 MiB) Downloaded 79 times
Here's the log

Code: Select all

*** OpenTTD Crash Report ***

Crash at: Thu May 24 15:18:22 2012
In game date: 2051-05-09 (27)

Crash reason:
 Exception: E1212012
 Location:  7C812AFB
 Message:   Assertion failed at line 59 of c:\bamboo-agent-home\xml-data\build-dir\ottd3pt-cd-w32bit\src\strings_func.h: size <= parent.num_param - parent.offset

OpenTTD version:
 Version:    g6def25ed-cd (0)
 NewGRF ver: 13005ec6
 Bits:       32
 Endian:     little
 Dedicated:  no
 Build date: May 20 2012 02:19:51

Registers:
 EAX: 0013DF9C EBX: 00000016 ECX: 00000000 EDX: 00C629A0
 ESI: 00000000 EDI: 00000000 EBP: 0013DFEC ESP: 0013DF98
 EIP: 7C812AFB EFLAGS: 00200246

 Bytes at instruction pointer:
 5E C9 C2 10 00 85 FF 0F 8E 36 93 FF FF 8B 55 FC 89 55 0C 0F B7 16 8B 7D

Stack trace:
 00C6227C E1212012 00000000 00000000 7C812AFB 00000000 00000028 000A0712
 00000000 00CC7B88 00C1A298 00000010 00000000 00000000 00000000 00000000
 00000000 7C90D80A 7C9132F0 FFFFFFFF 00000024 0013E04C 005E9378 E1212012
 00000000 00000000 00000000 006BD4AC 00000016 FC711FDB 0013E064 00000200
 00000000 0013E038 7E466579 00000000 7C90D80A 005E9368 00000001 0013E00C
 0013DBB4 0013E5B4 006C2A30 FCA00D17 FFFFFFFE 0013E264 006BCA75 00000016
 0043D2BF 00000000 0013E97C 65737341 6F697472 6166206E 64656C69 20746120
 656E696C 20393520 6320666F 61625C3A 6F6F626D 6567612D 682D746E 5C656D6F
 2D6C6D78 61746164 6975625C 642D646C 6F5C7269 33647474 632D7470 33772D64
 74696232 6372735C 7274735C 73676E69 6E75665F 3A682E63 7A697320 3D3C2065
 72617020 2E746E65 5F6D756E 61726170 202D206D 65726170 6F2E746E 65736666
 7C910074 014D06E8 7C91005D 0AC42330 0013E250 00000000 0013F03F 0013F040
 000007CF 0013F03F 00000042 00000000 00000000 00000000 00000000 0013E150
 0013E148 0013E14C 00000000 7C9100B8 016D4EE8 0013E218 7C910041 014D06E8
 7C91005D 0AC42330 0013E2A8 00000000 00000000 7C9100B8 016DA218 0013E240
 7C910041 014D06E8 00000005 0AC63FC0 0013E2D0 00000000 006BCFEF 0013F09F
 00000003 00BE12C4 00000000 0013E1F0 00000005 00450CCF 00000000 00000018
 00000010 0013E1F0 00000003 000012C4 00000000 0AC42330 0013F09F 0013E58C
 00000000 01F9B4E0 014D0000 0013DFDC 00000028 0000E58C 00000000 0AC63FC0
 00010003 0013E5B4 00000018 7C0001E0 014D0000 0013E004 006B882F 0013E5B4
 7C90E920 7C9101E0 FFFFFFFF 7C9101DB 006B882F 014D0000 00000000 00000010
 00000000 00000000 00000000 0013E260 006B8EB3 00000010 00000000 00000000
 0013E2BC 0013E2BC 016DA220 0013E5C4 00451049 00BACBDC 0000003B 00BDB938
 00BEB770 00452938 00008856 0013E97C 00000000 00000001 0013F091 0013E97C

Operating system:
 Name:     Windows
 Release:  5.1.2600 (Service Pack 3)
 Compiler: MSVC 1600

Configuration:
 Blitter:      8bpp-optimized
 Graphics set: OpenGFX (978)
 Language:     C:\Program Files\OpenTTD\OpenTTD CargoDist\lang\english.lng
 Music driver: dmusic
 Music set:    NoMusic (0)
 Network:      no
 Sound driver: win32
 Sound set:    OpenSFX (87)
 Video driver: win32

AI Configuration (local: 0):
  0: Human

Libraries:
 FreeType:   2.4.5
 ICU:        4.4.2
 LZMA:       5.0.3
 LZO:        2.05
 PNG:        1.5.4
 Zlib:       1.2.5

Module information:
 C:\Program Files\OpenTTD\OpenTTD CargoDist\openttd.exe handle: 00400000 size: 8814080 crc: CCCFC4E5 date: 2012-05-20 02:24:05
 C:\WINDOWS\system32\ntdll.dll handle: 7C900000 size: 718336 crc: EA097CED date: 2010-12-09 15:15:09
 C:\WINDOWS\system32\kernel32.dll handle: 7C800000 size: 989696 crc: 8A0508E5 date: 2009-03-21 14:06:58
 C:\WINDOWS\system32\WINMM.dll handle: 76B40000 size: 176128 crc: 2D7A3E5F date: 2011-10-14 14:47:29
 C:\WINDOWS\system32\ADVAPI32.dll handle: 77DD0000 size: 617472 crc: C9027432 date: 2009-02-09 12:10:48
 C:\WINDOWS\system32\RPCRT4.dll handle: 77E70000 size: 590848 crc: E9ECB923 date: 2010-08-16 08:45:00
 C:\WINDOWS\system32\Secur32.dll handle: 77FE0000 size: 56832 crc: 3D0002B7 date: 2009-06-25 08:25:26
 C:\WINDOWS\system32\GDI32.dll handle: 77F10000 size: 286720 crc: B5F6B116 date: 2008-10-23 12:36:14
 C:\WINDOWS\system32\USER32.dll handle: 7E410000 size: 578560 crc: F7C72264 date: 2008-04-14 00:12:08
 C:\WINDOWS\system32\WS2_32.dll handle: 71AB0000 size: 82432 crc: 7C519ECA date: 2008-04-14 00:12:10
 C:\WINDOWS\system32\msvcrt.dll handle: 77C10000 size: 343040 crc: 0B7B1677 date: 2008-04-14 00:12:01
 C:\WINDOWS\system32\WS2HELP.dll handle: 71AA0000 size: 19968 crc: 3F24E096 date: 2008-04-14 00:12:10
 C:\WINDOWS\system32\SHELL32.dll handle: 7C9C0000 size: 8462336 crc: A88619FE date: 2011-01-21 14:44:37
 C:\WINDOWS\system32\SHLWAPI.dll handle: 77F60000 size: 474112 crc: BDFA6F45 date: 2009-12-08 09:23:28
 C:\WINDOWS\system32\IMM32.DLL handle: 76390000 size: 110080 crc: C1486DA0 date: 2008-04-14 00:11:54
 C:\Program Files\Prio\prio.dll handle: 10000000 size: 10960 crc: 751FC9A7 date: 2010-07-28 15:36:30
 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll handle: 773D0000 size: 1054208 crc: 350BBD1B date: 2010-08-23 16:12:02
 C:\WINDOWS\system32\comctl32.dll handle: 5D090000 size: 617472 crc: B00C920E date: 2010-08-23 16:12:04
 C:\Program Files\PC Tools\PC Tools Security\TFEngine\TfWah.dll handle: 01280000 size: 406880 crc: CCF7EA3D date: 2011-11-22 18:20:04
 C:\WINDOWS\system32\ole32.dll handle: 774E0000 size: 1288704 crc: E6DBC40A date: 2011-11-01 16:07:10
 C:\WINDOWS\system32\OLEAUT32.dll handle: 77120000 size: 551936 crc: B6E16806 date: 2010-12-20 17:32:15
 C:\WINDOWS\system32\SHFolder.dll handle: 76780000 size: 25088 crc: 8009EA65 date: 2008-04-14 00:12:05
 C:\WINDOWS\system32\uxtheme.dll handle: 5AD70000 size: 218624 crc: A4A915A5 date: 2008-04-14 00:12:08
 C:\WINDOWS\system32\MSCTF.dll handle: 74720000 size: 297984 crc: 392BE0B0 date: 2008-04-14 00:11:58
 C:\WINDOWS\system32\apphelp.dll handle: 77B40000 size: 125952 crc: 30CDC203 date: 2008-04-14 00:11:49
 C:\WINDOWS\system32\msctfime.ime handle: 755C0000 size: 177152 crc: 8C1D2F99 date: 2009-02-27 04:56:38
 C:\Program Files\Common Files\PC Tools\Lsp\PCTLsp.dll handle: 01960000 size: 329656 crc: 414E587C date: 2011-11-22 19:41:44
 C:\WINDOWS\system32\mswsock.dll handle: 01A30000 size: 245248 crc: 8244D3EE date: 2008-06-20 16:02:47
 C:\WINDOWS\system32\hnetcfg.dll handle: 662B0000 size: 344064 crc: 96358152 date: 2008-04-14 00:11:54
 C:\WINDOWS\System32\wshtcpip.dll handle: 01A70000 size: 19456 crc: F5533E87 date: 2008-04-14 00:12:10
 C:\WINDOWS\system32\WINTRUST.dll handle: 76C30000 size: 178176 crc: 23DCB601 date: 2012-02-29 14:08:49
 C:\WINDOWS\system32\CRYPT32.dll handle: 77A80000 size: 599552 crc: 47BCF042 date: 2011-09-28 07:05:47
 C:\WINDOWS\system32\MSASN1.dll handle: 77B20000 size: 58880 crc: 63D6A79F date: 2009-09-04 21:03:36
 C:\WINDOWS\system32\IMAGEHLP.dll handle: 76C90000 size: 148480 crc: ACE30C7D date: 2012-02-29 14:08:49
 C:\WINDOWS\system32\wdmaud.drv handle: 72D20000 size: 23552 crc: EEB914CA date: 2008-04-14 00:12:46
 C:\WINDOWS\system32\msacm32.drv handle: 72D10000 size: 20480 crc: D5406BAE date: 2002-08-29 12:00:00
 C:\WINDOWS\system32\MSACM32.dll handle: 77BE0000 size: 71680 crc: EDE4B266 date: 2008-04-14 00:11:58
 C:\WINDOWS\system32\midimap.dll handle: 77BD0000 size: 18944 crc: 2E6D5FD1 date: 2008-04-14 00:11:57
 C:\WINDOWS\system32\CLBCATQ.DLL handle: 76FD0000 size: 498688 crc: F43789FF date: 2008-04-14 00:11:50
 C:\WINDOWS\system32\COMRes.dll handle: 77050000 size: 792064 crc: 868482D5 date: 2008-04-14 00:11:51
 C:\WINDOWS\system32\VERSION.dll handle: 77C00000 size: 18944 crc: 558B1DAF date: 2008-04-14 00:12:08
 C:\WINDOWS\system32\dmime.dll handle: 5C570000 size: 181248 crc: A021AC64 date: 2008-04-14 00:11:52
 C:\WINDOWS\system32\DSOUND.dll handle: 73F10000 size: 367616 crc: 33C2A52C date: 2008-04-14 00:11:52
 C:\WINDOWS\system32\dmusic.dll handle: 6C980000 size: 104448 crc: E9A2B682 date: 2008-04-14 00:11:52
 C:\WINDOWS\system32\KsUser.dll handle: 73EE0000 size: 4096 crc: BD8E6BD9 date: 2008-04-14 01:11:56
 C:\WINDOWS\system32\dmsynth.dll handle: 6C9A0000 size: 103424 crc: 3E2BFB05 date: 2008-04-14 00:11:52
 C:\WINDOWS\system32\dmloader.dll handle: 6CA10000 size: 35840 crc: 9271DC2B date: 2008-04-14 00:11:52
 C:\WINDOWS\system32\psapi.dll handle: 76BF0000 size: 23040 crc: 75BBDCAD date: 2008-04-14 00:12:03

---- gamelog start ----
Tick 62675: game loaded
     Conversion from OTTD savegame without gamelog: version 4, 1
     Revision text changed to g6def25ed-cd, savegame version 183, not modified, _openttd_newgrf_version = 0x13005ec6
     New game mode: 0 landscape: 1
     Added NewGRF: GRF ID 4A44FAB1, checksum 1EC99A40D2E18175B7D1EBFAC72080F8, filename: newcc_set-0.1\newcc.grf (md5sum matches)
     Added NewGRF: GRF ID 686D6301, checksum ECFF8464F08FD6772E7A133C46FA43F2, filename: more_british_town_names-1.0\morebritishtownnames_1.grf (md5sum matches)
     Added NewGRF: GRF ID 4F472B34, checksum 4D0A47280C2396F4ED898276A757C209, filename: opengfx_landscape-0.2.3\ogfx-landscape.grf (md5sum matches)
     Added NewGRF: GRF ID F1250005, checksum 4F0505BB9EE5F1AA279953BB6A3E6A5B, filename: firs_industry_replacement_set-0.7.5\firs.grf (md5sum matches)
     Added NewGRF: GRF ID 44442303, checksum 90300B85C4DE1DD192691827B054522D, filename: uk_railway_set_tracks-2.0\pb_trax.grf (md5sum matches)
     Added NewGRF: GRF ID 19060801, checksum 6CFC6328D999C140851BFE6514BA277A, filename: Infastructure\bigdepot.grf (md5sum matches)
     Added NewGRF: GRF ID 534C5444, checksum DC5123AF6235DFB62EA2326C2B594EDF, filename: Infastructure\tramdpw.GRF (md5sum matches)
     Added NewGRF: GRF ID FBFB0301, checksum B93D40A1E45A701279D7B08F4FED19AC, filename: foobars_tram_tracks-1.0.0\foobarstramtracks.grf (md5sum matches)
     Added NewGRF: GRF ID 4D656F6E, checksum 6A1FD7EADF9CBB9A0704FAA644B77AE6, filename: Climate\treesw.grf (md5sum matches)
     Added NewGRF: GRF ID 53410100, checksum 8A164DE1903BA2A944BAB805A30A4C8F, filename: Infastructure\infra_foundations.grf (md5sum matches)
     Added NewGRF: GRF ID 504A0103, checksum F71C0D2E93CAD70B7001299FF48B5AA7, filename: Climate\isrdock.grf (md5sum matches)
     Added NewGRF: GRF ID 74677462, checksum A2396FFDCC0F1BA37A2A89EF525CDF21, filename: total_bridge_renewal_set.1.12\total_bridges.grf (md5sum matches)
     Added NewGRF: GRF ID 44442411, checksum BE3D8201BDE0ABB92F8D9696D93524CC, filename: tai_uk_houses-0.3\tai_uk.grf (md5sum matches)
     Added NewGRF: GRF ID 554B524C, checksum 934F973D33A42EB858B80031F904F057, filename: Infastructure\UKRoadswSigns.grf (md5sum matches)
     Added NewGRF: GRF ID 504A4348, checksum 992CA1748EB3A25F349B529DD5BB0481, filename: Infastructure\highhqw.grf (md5sum matches)
     Added NewGRF: GRF ID 44573553, checksum EF7529EBEAF35758EE07E628B25F608D, filename: dwenewobjects-v0.1\dwe_newobj.grf (md5sum matches)
     Added NewGRF: GRF ID 6D620C00, checksum C5987ACC9C19F4720085C6456EE915D8, filename: Infastructure\maricow.grf (md5sum matches)
     Added NewGRF: GRF ID 53430101, checksum CF293FF57A05F8190CEC974468CDA78A, filename: Climate\sacsobjects1w.grf (md5sum matches)
     Added NewGRF: GRF ID 57425120, checksum 0F9A2AC5468C2F98363F2B71C8C2B6DE, filename: Climate\TTD_landscapew.grf (md5sum matches)
     Added NewGRF: GRF ID 444E0C00, checksum B5D2AB5FC93A09E1FAB5F0DB82307ECF, filename: vast_fences-0.2.0\vastfences.grf (md5sum matches)
     Added NewGRF: GRF ID 444E0800, checksum B0DB930C8D8987D6FB4CAC6CA15589D1, filename: Infastructure\VASTobjects.grf (md5sum matches)
     Added NewGRF: GRF ID 52571201, checksum C1C7D8C53EB7E74EEE2F0EF29638B466, filename: RoadVeh\egrvts.grf (md5sum matches)
     Added NewGRF: GRF ID 52571208, checksum DC83DAB2933FACCB91678D4F75ABCCC6, filename: generic_cars-0.4\cars.grf (md5sum matches)
     Added NewGRF: GRF ID 41501202, checksum 7FD3A30F749BFA5D5E1DF61326AD9B08, filename: heqs_heavy_equipment_set-1.5.1\heqs.grf (md5sum matches)
     Added NewGRF: GRF ID 44440401, checksum C860AE279528E08E10360CB4BE507EBE, filename: RoadVeh\pb_hovs.grf (md5sum matches)
     Added NewGRF: GRF ID 4E474C56, checksum B780A10427B64320EE8529AD9711868E, filename: light_road_vehicle_set-0.2beta2\lrvs-0.2.grf (md5sum matches)
     Added NewGRF: GRF ID 4F472B32, checksum 809FE326606D15B5E6E5DAF6FD393E2E, filename: opengfx_road_vehicles-0.3.1\ogfx-rv.grf (md5sum matches)
     Added NewGRF: GRF ID 4D420000, checksum BCB0AC917F3DA91A3197C6A07D06BCE8, filename: bobs_random_vehicles_-0.9\brbvw.grf (md5sum matches)
     Added NewGRF: GRF ID 4D420100, checksum 296442A501F47FAD50238A273FC369C7, filename: bobs_british_buses-0.2\bbbw.grf (md5sum matches)
     Added NewGRF: GRF ID 4D42000A, checksum BC3A0E791C74C1A04A3B90C3B2FA83A6, filename: bats-0.4\batsv0.4w.grf (md5sum matches)
     Added NewGRF: GRF ID 52570103, checksum EDB2D26F9D81423734CA12412F309CF3, filename: RoadVeh\generictrams_v0.4.grf (md5sum matches)
     Added NewGRF: GRF ID 4642FB21, checksum 117F6F1F07C18A9C15ADC6127AFBAE97, filename: modern_tram_set-3.1\motraset_r3.1.grf (md5sum matches)
     Added NewGRF: GRF ID 54560301, checksum ED22416EE087725E4B5A9AF8F0357F29, filename: trolleybus_set-0.2\trolley.grf (md5sum matches)
     Added NewGRF: GRF ID 414E0101, checksum 5D665C64693A438E3046C22666F46E08, filename: fish_ship_set-0.9.2\fish.grf (md5sum matches)
     Added NewGRF: GRF ID 6D620004, checksum 70649F1AFC954942173B0AA89C1E8B14, filename: newships-1.0\newshipsw.grf (md5sum matches)
     Added NewGRF: GRF ID 4A4D0101, checksum B89CE49DC4A45FA3BF4EB3A7BC853D38, filename: sailing_ships-0.5\sailing_ships.grf (md5sum matches)
     Added NewGRF: GRF ID 43415463, checksum 3B752FE1D762319ECCA615B1B2340073, filename: Stations\CanStn.grf (md5sum matches)
     Added NewGRF: GRF ID 43485053, checksum D7BD4CA0A4CE96866B9F1D741F68471A, filename: chips_station_set-0.7.0\chips.grf (md5sum matches)
     Added NewGRF: GRF ID 504E0002, checksum 6E6944E09CE6C3AC130DF72C542EE4B1, filename: Stations\buffers.grf (md5sum matches)
     Added NewGRF: GRF ID 4A430002, checksum EFB21CFA6828362FDA9B2D629B5EEEB4, filename: industrial_stations_renewal-0.8.1\indstatr.grf (md5sum matches)
     Added NewGRF: GRF ID 44573452, checksum 48CF5FC0DEB895136F337A7E563FC66D, filename: dwestationtiles_industrial_ter-v0.7\dwe_stat_r.grf (md5sum matches)
     Added NewGRF: GRF ID 504A0106, checksum A9B31ACE79E92522F859D7549FBB4F3E, filename: Climate\ISR_objects_v1_3.grf (md5sum matches)
     Added NewGRF: GRF ID 4A5A0401, checksum 54BC35DCCB000AA83ED9A25B8B697B06, filename: Stations\jstatsw.grf (md5sum matches)
     Added NewGRF: GRF ID 58534D00, checksum 6F4C28B41F5127046DED0320D0BE533B, filename: Stations\modern_set.grf (md5sum matches)
     Added NewGRF: GRF ID 6D620601, checksum 44EB2F155862E4D4F0AB671D7021AF54, filename: Stations\newstatsw.grf (md5sum matches)
     Added NewGRF: GRF ID 52455200, checksum 0E5A9C5ACD2BCAF7FA0658C3F905A660, filename: Stations\ae_ruraw.GRF (md5sum matches)
     Added NewGRF: GRF ID 52455300, checksum 37C0B839B13C4B18051580C81EEDF427, filename: Stations\ae_subuw.GRF (md5sum matches)
     Added NewGRF: GRF ID 45520100, checksum 790525F9E9045CE49AD2776459C07436, filename: Stations\pgs2w.GRF (md5sum matches)
     Added NewGRF: GRF ID 52455400, checksum 1600687C50C5AB1E72EDD487CAD50E2A, filename: Stations\ae_cityw.GRF (md5sum matches)
     Added NewGRF: GRF ID 504E0001, checksum E7781323D2B0086E2E76342DAA036054, filename: Stations\ukwaypointsw.grf (md5sum matches)
     Added NewGRF: GRF ID 444E0400, checksum 735D3D74D5DCADBF1FD6EF7A9C5A3519, filename: vast_station_tiles-0.2.0\vast.grf (md5sum matches)
     Added NewGRF: GRF ID 44441000, checksum 1EA0E056EE9F4A3DC4AA9FFB7F1DF1AB, filename: ukrs2__the_uk_railway_set-1.01\proj1000.grf (md5sum matches)
     Added NewGRF: GRF ID 44441001, checksum AF6916E347B9F130997C6D95D2E7CC8D, filename: ukrs2_uk_railway_addon_set-centaur\pj1kadd.grf (md5sum matches)
     Added NewGRF: GRF ID 4A44E801, checksum 36E1A192D8DE7D70C6F39B7C591C8D5C, filename: invisible_leading_engine-0.21\blank-engine.grf (md5sum matches)
     Added NewGRF: GRF ID 43415000, checksum C6AE1C574FD881A706AA2B623FB83BC1, filename: climate_dependant_airports-0.3.0\airportsplus.grf (md5sum matches)
     Added NewGRF: GRF ID 504A0101, checksum 2F347F0D112211BA4824F0E45647ADF4, filename: Airports\seaplaneairport_v1_1.grf (md5sum matches)
     Added NewGRF: GRF ID 44440A01, checksum ECEB9DF262403B15841B9610C1300BDF, filename: av8_aviators_aircraft_set-2.11\pb_av8w.grf (md5sum matches)
     Added NewGRF: GRF ID 44440A11, checksum D701E3219A08351B1705A7860644A9A2, filename: general_av8ion-1.0\genav8.grf (md5sum matches)
---- gamelog end ----

*** End of OpenTTD Crash Report ***

Decoded stack trace:
[00] ???                  0x7C812AFB RaiseException + 82
[01] ???                  0x005E9378
[02] ???                  0x006BCA75
[03] ???                  0x00451049
[04] ???                  0x00451ED3
[05] ???                  0x0045144C
[06] ???                  0x004528F2
[07] ???                  0x00451ED3
[08] ???                  0x0045144C
[09] ???                  0x0045147D
[10] ???                  0x004B271A
[11] ???                  0x004B2496
[12] ???                  0x004B2450
[13] ???                  0x004B298F
[14] ???                  0x004B2B62
[15] ???                  0x00464C7E
[16] ???                  0x0046877E
[17] ???                  0x0046937B
[18] ???                  0x00420142
[19] ???                  0x0046B8F0

*** End of additional info ***
Nat AS
Engineer
Engineer
Posts: 6
Joined: 24 May 2012 07:01

Re: Cargo Distribution

Post by Nat AS »

fonso wrote:Please provide a savegame! There are certain conditional orders that can be supported and others that can't. The problem is complicated and I can't guess what is happening in your game or even what you are trying to achieve.

It sounds like you have a condition based on load percentage after an order for loading. Cargodist cannot decide what to do there. It can either load cargo and fulfill one branch of the condition or not load it and fulfill the other branch (and if you think "it's clear it should load" then imagine multiple such conditions in a row with different stations and amounts of available cargo). In the end it doesn't know what you want it to do there. I'm willing to implement some kind of pragmatic solution to that ("load whatever you can and see where it gets you") but I need an example showing the problem.

And for the record: Eddi is wrong there. Conditional orders don't necessarily "totally destroy any prefilling of the connectivity graph". Certain conditional orders make prefilling extremely hard, though.
http://dl.dropbox.com/u/24299180/OTTD/ ... 202082.sav Here is the savegame, Version is g1de4d2a5-cd
This savegame uses a bunch of newgrfs, but they should all be findable. The Tropic Refurbishment Set however does have a small issue with one of it's locomotives somehow being refitted to oil, But I don't think it's related to this one.

The train in question is Train5 in the Macintosh Fruit group. It's a 4 tile long container train on the small network in the island to the northwest, And it's orders look something like this

Code: Select all

1>Go non stop to the factory and full load
2>Go non stop the to the nearest depot and maintain as needed
3>Go non stop to the first town
4>Go non stop the to the nearest depot and maintain as needed
5>Go non stop to the second town
6>Go non stop the to the nearest depot and maintain as needed
7>Go non stop to the forth town
8>Go non stop the to the nearest depot and refit to goods
9>Go non stop to the factory
10>Jump to order 12 when load is equal to zero (Check the factory for goods, and if none are available, go back to carrying food)
11>Jump to order 3 when load is equal to zero (Now I'm really confused, I don't know what I was thinking last night, but this seems like it would break it, but it does not, strange. I have tried changing it for less bad orders, and nothing seems to change)
12>Go no stop to nearest train depot and refit to food (this resets the cycle)
The idea is that a train full loads with food, then at the end of it's route it refits to goods and stops at the port to see if there are any available, If there are none, it goes back to the depot, refits back to food, and starts it's network from the beginning once more. If there are goods, it takes them along it's normal route untill it runs out and refits back to food.

Upon re-examining my order list, I'm not even sure how it's supposed to accomplish that, but it does somehow, with the exception that it does not consistently distribute the cargo like it normally did before i added the goods part.

The idea is
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Well, Net AS, you must have made some mistake with your orders there. Order 11 of train 5 can never be reached so it cannot actually take the "shortcut" back to order 3. Thus the train will always refit to food, no matter if it has loaded any goods at order 9. You might as well drop orders 10 and 11. If trunk behaves differently here then that's a bug in trunk.
The guy on the picture is not me, it's Alonso.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 13 guests