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
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Arie- wrote:... Connected with the client and when moving around then the game almost immediately crashed.

Code: Select all

sync_err: 000b4fdf; 2e
There we've got a desync, congratulations. And an easy one as it happens right after loading. Can you post the "save/NO PSWD INC, 2029-08-14.sav" you're loading there, please? The "crash on desync" issue has been fixed in recent versions of trunk, btw. It'll be included in the next version of cargodist.
The guy on the picture is not me, it's Alonso.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

NekoMaster wrote:What revision of openttd is the most recent build (22 Nov) of cargodist in the openttd bundles based off of?
r21293, as you could have looked up here: https://github.com/fonsinchen/openttd-c ... ERSION.txt
The guy on the picture is not me, it's Alonso.
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: Cargo Distribution

Post by Arie- »

And the savegame!
Attachments
NO PSWD INC, 2029-08-14.sav
(239.5 KiB) Downloaded 74 times
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Re: Cargo Distribution

Post by Cadde »

How long does it generally take for the Link map to realize a certain link doesn't exist anymore?
I decided to rebuild my intercity lines to make use of a subway that would take passengers to a offsite trainstation...

Town 1 -> Town 2 -> Train station transfer point -> Town 3
Town 1 and 2 are connected with a subway and each Town has Buses taking passengers to the areas not in catchment by the subway/train station.

I am running a very slow paced game with daylength x 10 and i have set Link update interval to 1 day, yet after 2 whole months it still thinks the link Town 2 -> Town 3 still exists and passengers keep piling up thinking they can somehow teleport past the Transfer station.

Can i forcibly delete a link in the linkgraph? And if so, how?
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

I've tracked the desync down to a bug in trunk that was fixed one (!) revision after that version you are playing. The point about the nondeterminism you're seeing there is that you have to connect while a hovercraft is loading in order to trigger the bug. There is a hovercraft that starts loading shortly after the point the savegame you posted is at. So if you connect, then disconnect and reconnect shortly after (as you did; I can tell from the server's command log) you'll get the desync. If you connect and stay you don't desync.
The guy on the picture is not me, it's Alonso.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: Cargo Distribution

Post by Zephyris »

That is one very random bug! I'm glad its resolved though :)
Logital82
Engineer
Engineer
Posts: 58
Joined: 15 Feb 2010 12:03
Location: Germany, Berlin

Re: Cargo Distribution

Post by Logital82 »

Please look at the picture. The train brings many goods from a far factory to this terminal which is a hub for trucks to about 6 citys. But the cargodistribution always says "to any station after unloading the goods from the train. What settings do i have to make? what are amroured goods and express goods and what is the meaning of syymetric and asymmetric?
Attachments
Logital Verkehr AG, 22. Nov 2116.png
(354.2 KiB) Downloaded 1 time
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: Cargo Distribution

Post by Arie- »

Ok, I'm quitting the server and starting a new game with a newer binary. Server info
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Cargo Distribution

Post by Eddi »

I have thought about this practically from the beginning of passenger destinations, and possibly i have said this before:

For a lack of proper handling of out-of-schedule stations, i think it is better to handle "non-non-stop" orders the same as "non-stop" orders, instead of saying "it's indeterministic." so instead of "load all cargo" behaviour you get "load cargo only for stations in the schedule" behaviour.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Logital82 wrote:Please look at the picture. The train brings many goods from a far factory to this terminal which is a hub for trucks to about 6 citys. But the cargodistribution always says "to any station after unloading the goods from the train. What settings do i have to make? what are amroured goods and express goods and what is the meaning of syymetric and asymmetric?
Make sure that all vehicles have "non-stop" orders. Please post a save game and the version string if anything is wrong. I can't see a thing in this screenshot. "Symmetric distribution" means that the same amount of cargo goes both ways between any two stations. You should use that for passengers and mail. "Asymmetric distribution" means that cargo mostly goes only in one direction. You should use that for most cargos.
Eddi wrote:I have thought about this practically from the beginning of passenger destinations, and possibly i have said this before:
For a lack of proper handling of out-of-schedule stations, i think it is better to handle "non-non-stop" orders the same as "non-stop" orders, instead of saying "it's indeterministic." so instead of "load all cargo" behaviour you get "load cargo only for stations in the schedule" behaviour.
OK, you win. I'll implement it. Let's see if that's really better then.
The guy on the picture is not me, it's Alonso.
Creat
Traffic Manager
Traffic Manager
Posts: 141
Joined: 26 Oct 2009 16:33

Re: Cargo Distribution

Post by Creat »

fonso wrote:
Eddi wrote:I have thought about this practically from the beginning of passenger destinations, and possibly i have said this before:
For a lack of proper handling of out-of-schedule stations, i think it is better to handle "non-non-stop" orders the same as "non-stop" orders, instead of saying "it's indeterministic." so instead of "load all cargo" behaviour you get "load cargo only for stations in the schedule" behaviour.
OK, you win. I'll implement it. Let's see if that's really better then.
YAY finally :D
I also think this will go a long way in making it more easily accessible to new(er) players and those just new to the cargodist aspect of it all. Can also possible help to get Cargodist closer to a state where it can be included in trunk (where it belongs) I hope...
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

There you go. I had to force-push the "cd" branch after removing "warning-sign". That's sort of bad as now you can't just pull or rebase from it if you have local modifications ... brrrr. Maybe I'll find a better way to handle that problem.
The guy on the picture is not me, it's Alonso.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

I've changed the station GUI some. Maybe you can give me some feedback on that. Among other things I've removed the "sent" mode as you could hardly see anything useful there. Did anyone actually use it?
The guy on the picture is not me, it's Alonso.
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: Cargo Distribution

Post by Arie- »

Well in my last game, I have occasionally looked at the diagram on the map, but actually only looked at the color of the lines. Furthermore, I'm currently a bit hooked on FM11 as well busy with a lot of educational stuff, I haven't had time to play a lot on the server again. (Which btw is acting all weird with ports (forwarding) related stuff, but I can't figure out why and haven't got the time to do so.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

OK, Kimby and fjb: I have solved the problems with multiple stops at the same station and the vehicle not loading or loading the wrong things when it is (not) expected to.

Each vehicle remembers the last station where it could leave with cargo loaded. When checking for the next station it will stop at it now looks ahead up to a station which is different from the current one. So it will load at the first stop, even if it will stop again at the same station (you can prevent it from doing that by stating "no loading"). It will even do that if the next order is conditional, provided that the next different station is the same in all branches. When visiting a station and finding out that the same station was visited just before, the sent count for cargo kept in the vehicle won't be updated, as obviously we have already done that. Quite simple, eh?

No, I won't bet on that being actually correct, as I have messed it up three times before and only noticed after I had already implemented it. But this time the problem is at least not obvious enough for me to immediately see it.
The guy on the picture is not me, it's Alonso.
Mojhave
Engineer
Engineer
Posts: 10
Joined: 11 Dec 2010 17:44

Re: Cargo Distribution

Post by Mojhave »

Hello, i am a huge Fan of Fonso's Project. Right now i am having a little Problem:

My Passenger Network is A - B - C. If i order a train to go from A - B - C - B he doesn't load any Passengers from A to C and they pile up in A. I tried all combination of orders and load/unload settings but i am not able to solve this. Can someone help me with this?

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

Re: Cargo Distribution

Post by fonso »

Mojhave: please post a savegame showing the problem and tell me what version you are using (you can see that in the header of the main menu). Also please tell me which stations in the savegame are affected.
The guy on the picture is not me, it's Alonso.
Mojhave
Engineer
Engineer
Posts: 10
Joined: 11 Dec 2010 17:44

Re: Cargo Distribution

Post by Mojhave »

Sry, but stupid me already updated the cargodist version and now i neither can't load the savegame nor can i tell what version that happened with. I will try to reproduce the situation and post the necessary files if successful.
Anunnaki
Engineer
Engineer
Posts: 64
Joined: 16 Aug 2005 16:09
Location: Prague, Czech Republic

Re: Cargo Distribution

Post by Anunnaki »

Hi there ...

i see that Cargo Distribution mod use GIT (repositary CD GIT trunk), which complicate whole think further ...

I know basic work with SVN, like aplying/creating patches and other busic stuff.

Questions:
a) is there CargoDistribution SVN patch/diff file to OTTD SVN trunk ?
b) when not, is there a way, how i can simple create CD SVN patch/diff file against OTTD SVN trunk from source CD GIT trunk somehow ?

I wish to create version with this CargoDistribution mod and InfrastructureSharing mod too.

I have created InfrastrucuteSharing SVN patch/diff file for OTTD SVN trunk, and it is working good (32/64 bit version tested).

c) how can i apply IS SVN patch to CD GIT trunk ?

I have installed TortoiseSVN and TortoiseGIT (msmygit too), i have localy cloned OTTD SVN trunk (with and withouth IS mod implemented) and in another folder cloned CD GIT trunk. But is there way how to combine this two ?

Thank you for any help.
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: Cargo Distribution

Post by Arie- »

Have you read the first post? I think what you want is this:
I have my own patch generation system based on git which produces patches of each commit in a separate branch "patches". In particular you can always download a patch against a recent trunk version here. The trunk version the patch applies to is always recorded here.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Semrush [Bot] and 11 guests