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
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Cargo Distribution

Post by DJ Nekkid »

hi... got a crash when placeing a sign (!!) in cargodist r18625

crash.* and the most recent autosave...

ps. to load it you probably gonna need a nightly of the 2cc set, or from one of the last posts in the 2cc dev thread
Attachments
OpenTTD.7z
(201.08 KiB) Downloaded 76 times
autosave14.sav
(108.99 KiB) Downloaded 75 times
Member of the
ImageImage
xZise
Engineer
Engineer
Posts: 57
Joined: 19 Mar 2009 16:52
Location: Bad Schwartau

Re: Cargo Distribution

Post by xZise »

DJ Nekkid wrote:[...]placeing a sign (!!) in cargodist r18625 [...]
Every sign? Or only sometimes when you are building signs? And does it crash when you doesn't use 2cc? And why you are using this "old" version?

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

Re: Cargo Distribution

Post by fonso »

DJ Nekkid wrote:got a crash when placeing a sign (!!) in cargodist r18625 crash.* and the most recent autosave.
Thanks. Unfortunately I can't reproduce it and the crash dump gives me a corrupted backtrace. However, I'm missing the exact version of the dutch tram set grf you're using which might be the reason I'm unable to reproduce the problem (I have a different version which is also called "release candidate 1"). Could you send it to me?

In the crash log it says it's an assertion failure in LoadUnloadVehicle. Thus the crash should be deterministic unless something is seriously wrong. Did anyone see any desyncs with cargodist lately?
xZise wrote:I got a crash while building a airport on a multiplayer game (2 Humans). We're using r18708 with dedicated server via Internet.
Could you please post an earlier savegame? The crash seems to come from the AI system. Which versions of which AIs are you using? Did you change anything about the setup during the game? Did the game crash for the other player, too?
The guy on the picture is not me, it's Alonso.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

After lots of help from fonso, I got my first git-checked-out game running!
Attachments
cargodist_first_run.png
Roelmb
Engineer
Engineer
Posts: 20
Joined: 10 Aug 2009 11:40

Re: Cargo Distribution

Post by Roelmb »

Was it that difficult petert to get the git? I do it with tortoisegit.
I'm already trying to get other patches on it. For a new GD patch xD.

and can somebody look at the trafficlights patch? It crashes when patched too the latest cargodist. I think it was crashing in the trafficlights.h file but I'm not sure need to check that.

and at the moment I can't check it (not at home)
xZise
Engineer
Engineer
Posts: 57
Joined: 19 Mar 2009 16:52
Location: Bad Schwartau

Re: Cargo Distribution

Post by xZise »

fonso wrote:
xZise wrote:I got a crash while building a airport on a multiplayer game (2 Humans). We're using r18708 with dedicated server via Internet.
Could you please post an earlier savegame? The crash seems to come from the AI system. Which versions of which AIs are you using? Did you change anything about the setup during the game? Did the game crash for the other player, too?
Okay, we are using the dummy AI because I forget to disable the AIs :P Now we are playing with four players :mrgreen:
And a recent save is only a yearly autosave... I'm searching for it.

Sincerely
xZise
xZise
Engineer
Engineer
Posts: 57
Joined: 19 Mar 2009 16:52
Location: Bad Schwartau

Re: Cargo Distribution

Post by xZise »

Hello,
okay here is the autosave from 1. Jan 1942 just before the game crashs. But before I'm uploading it, I want to know, if the rcon-Password is saved in the savefile.

ehr... The password was bad so no problem if I maybe publish it here now :)

Sincerely
xZise
Attachments
autosave8.sav
(3.21 MiB) Downloaded 78 times
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Roelmb wrote:Was it that difficult petert to get the git? I do it with tortoisegit.
I'm already trying to get other patches on it. For a new GD patch xD.
I can obtain the source, that's fine. But when compiling, MSYS didn't know the "git" command, so there was no version number after it was done compiling.
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Cargo Distribution

Post by Rubidium »

petert wrote:MSYS didn't know the "git" command
Then install it. Just like you can install unix2dos if it's not there, or zip, or ...
It's done by the compile farm in MSYS, so you must be able to do the same.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Hi again,
That previous screenshot, that was compiled with MSYS, and it worked. But when compiling with MSVC and opening openttd.exe, the title is called "OpenTTD norev000". Is there a way to make MSVC recognize git?
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Cargo Distribution

Post by Rubidium »

Maybe something like adding it to the global path? Anyway, it works for the compile farm, so you should be able to get it to work too.
xZise
Engineer
Engineer
Posts: 57
Joined: 19 Mar 2009 16:52
Location: Bad Schwartau

Re: Cargo Distribution

Post by xZise »

And there was another crash (not my computer). Unfortunately the most recent save is from 1,7 years before :(

Sincerely
xZise
Attachments
OpenTTD.7z
Without the savegame because of the filesize
(503.03 KiB) Downloaded 314 times
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Rubidium wrote:Maybe something like adding it to the global path? Anyway, it works for the compile farm, so you should be able to get it to work too.
Thank you so much, Rubidium. It works like a charm. Here is a new binary, g8b866db7-cargodist.

Disclaimer:
If CargoDist crashes, do not report it to the OpenTTD developers. Report it to this thread. When making your post about the crash, please upload the crash.dmp, crash.log, crash.sav, and crash.png (only available as of r18184, so if you are using a build older than that, don't bother). These files are vital to finding what happened during the crash. For developers, you can find the PDB file and other files at this site: http://users.tt-forums.net/petert/dev/

Peter
Attachments
g8b866db7-cargodist_win32.rar
(3.04 MiB) Downloaded 108 times
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Cargo Distribution

Post by Wasila »

Fonso, I must once again commend you for your excellent work, but I have a couple of questions/suggestions:

1) If deemed mature and stable, would Cargo Dist be added to trunk? What I mean is, do devs reject Cargo Dist on principal?

2) How about a feature where demand to a station is increased if there are more destinations from that station? So major hub stations would be more popular than end of line services, even if the cities are equally sized.

3) I know that when a passenger reaches his destination money is deducted to make the overall fare as if it had been one, direct route. What I'm wondering is that is time spent waiting at a station factored into the equation? So if a passenger has to wait in a station for a long time, does that reduce how much money you get?

Thanks,
Wasila

EDIT: Read original post and realised something: is 2) already on the to-do list?
bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: Cargo Distribution

Post by bokkie »

excellent work indeed!

I'm not Fonso (or a dev) but this is what I think/know:

1) Probably. Devs seem to like a cargodist-type feature. This because Celestar (dev) started a similar patch a while ago, but didn't finish it. It might be that devs don't like the current implementation, but I haven't seen any objects yet. Problem is, 'mature' and 'stable' is pretty hard to achieve with such a large patch. Thoroughly testing by users is very important, and there must be a dev willing to review the code after that. It's the question whether there's a dev interested enough with enough spare time to do this. Possible problems I see before trunk inclusion are
- somewhat unclear options (mind you, I know what they do but new users probably don't at first sight)
- unexpected behavior for some people when not using non-stop orders. People are warned for this in-program, but I can imagine devs wanting a more elegant solution.
- slowness in some situations (don't know exactly but sometimes a lot of calculations have to be done for the link graph I believe. There were some posts by people surprised by that.)
This is just me guessing though, I don't really have a clue ;).

2) The to-do list includes a plan to increase the number of created passengers when more destinations can be reached. This isn't what you mean. What you want, isn't that already implemented? More people travel via the station with more destinations simply because people wanting to those destinations, pass the major hub.

3) Isn't factored in as far as I know. This is regular OpenTTD behavior.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Cargo Distribution

Post by Wasila »

If Cargo Distribution was ever implemented into trunk I'd assume an on/off feature and when on there would be no need for non-stop orders - they would automatically be so?

I see what you mean about 2)... it is already going to be naturally more popular.

EDIT: One more thing: when on a train's cargo information it says for each wagon 'x passengers from <station x>'. Is this just where the majority of people on that wagon are from? I assume that the cargo distribution is not limited to wagon blocks?
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

There is an on/off switch. Set the demand function to "unhandled" for all cargo and you don't get any cargodist. The cargo shown in the train cargo information is about the first cargo packet in the waggon. It doesn't say anything about quantities. This is a problem of trunk, though. You don't need cargodist to load packets of different origins into one vehicle.
The guy on the picture is not me, it's Alonso.
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Cargo Distribution

Post by Kogut »

About warning... It is possible to improve it - from "it is BAD idea" to "non-stop orders are required by cargodist to work"
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

They aren't required. In special cases you might want a nondeterministic order. Cargodist just behaves differently if you use nondeterministic orders.
The guy on the picture is not me, it's Alonso.
kucir
Engineer
Engineer
Posts: 4
Joined: 11 Jan 2010 16:20

Re: Cargo Distribution

Post by kucir »

hi anybody :-)
what about binnary with cargodest and infrastructure sharing (http://www.tt-forums.net/viewtopic.php?f=33&t=42254) for win32 (and maybe linux for server)? must i compile it by myself? (it is not so easy for me) :bow:

edit: later i found one try at http://new.tt-forums.net/viewtopic.php? ... s&start=20
i hope it is more stable than they said
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests