Page 51 of 154
Re: Cargo Distribution
Posted: 25 Nov 2009 21:51
by iranair777
petert wrote:iranair777 wrote:
I installed the latest cargodest
Did you install CargoD
Est or CargoD
Ist? They are not the same thing.
sorry for not mentioning it, it was your file above, cargodist_r18286_win32.rar
Re: Cargo Distribution
Posted: 25 Nov 2009 22:38
by tsjook
fonso wrote:tsjook, I'd really like to know how you got that crash.sav . Obviously it's the title game. However, it's loaded with about 20 grfs, among which are 2 train grfs. At the same time the "multiple engine sets" option is off. Furthermore one of the trains is also listed as a tram in the savegame and as a truck in the vehicle list (train 9/ rv 20).
As you see, I was not actually playing the title game (sorry if I was unclear before) but I was not in a game at all, when I clicked economy in advanced settings (from the main menu) the game crashed.
The 'flow' was as such.
-> Started OpenTTD (mentioned version with cargodist) -> Started/opened game in temperate -> Played for a short while -> Left for main menu (it's called 'Abort game' or something) -> Clicked Advanced Settings -> Clicked 'Economy' category -> Crash
It's quite probable that it has absolutely nothing to do with cargodist. Sorry if I wasted your time.
After this crash I restarted the same version of OpenTTD and started a game which is still running smoothly after 20+ game years and multiple times saving and loading.

Re: Cargo Distribution
Posted: 26 Nov 2009 00:07
by petert
iranair777 wrote:petert wrote:iranair777 wrote:
I installed the latest cargodest
Did you install CargoD
Est or CargoD
Ist? They are not the same thing.
sorry for not mentioning it, it was your file above, cargodist_r18286_win32.rar
Ok, can you also provide a save of this incident?
Re: Cargo Distribution
Posted: 26 Nov 2009 07:28
by Auge
Hello
iranair777 wrote:Hiya all,
I installed the latest cargodest and set up a simple test run in the west of england and am wondering why is it when I transport passengers from a station, that stations passenger numbers doesn't decrease? I have about 7 buses on a route and none of the two stations pax decrease

Did you set the orders for the vehicle with "non stop"? Without non-stop-orders the passengers will be unloaded and loaded again to the vehicle. This is mentioned some times in this thread and (in ugly (and in basic forum style) unreadable red colour) in the opening posting too.
Tschö, Auge
Re: Cargo Distribution
Posted: 26 Nov 2009 08:02
by fonso
Auge wrote:...
... Also you get a warning if you start a game with "orders are non-stop by default" off and cargodist on.
Re: Cargo Distribution
Posted: 26 Nov 2009 20:54
by Coco-Banana-Man
I seem to have a problem with the lastest version of CargoDist (r12186-win32-binary by petert).
I'm trying to start a game with much bigger cities (5x), but the generated towns only have up to 2000 inhabitants instead of 8000-10000.
Re: Cargo Distribution
Posted: 26 Nov 2009 20:56
by petert
Ok, a couple of things:
Coco-Banana-Man wrote:(r12186-win32-binary by petert).
The binary was r18186, right?
Coco-Banana-Man wrote:I'm trying to start a game with much bigger cities (5x), but the generated towns only have up to 2000 inhabitants instead of 8000-10000.
Looking at your picture, I see that you have some town GRFs, could you take a screenshot of your GRFs and post them here?
Re: Cargo Distribution
Posted: 26 Nov 2009 21:14
by Coco-Banana-Man
petert wrote:Ok, a couple of things:
The binary was r18186, right?
Err... it says 18286... so we both were wrong
petert wrote:
Looking at your picture, I see that you have some town GRFs, could you take a screenshot of your GRFs and post them here?
sure.. here it is.
By the way.. I've tried to start a game without NewGRFs... the town were with highest multiplier setting (10x) even smaller: the biggest was 942.
EDIT: I've just noticed that the nightly has the same problem.. so it doesn't seem to be CargoDist's fault.
Thanks for helping, petert

Re: Cargo Distribution
Posted: 26 Nov 2009 21:43
by petert
Whew! Quite a bit of work I've done. Here is the flyspray:
FS#3328
Re: Cargo Distribution
Posted: 26 Nov 2009 22:49
by petert
SmatZ has fixed the bug in r18302, so here are some files:
Re: Cargo Distribution
Posted: 27 Nov 2009 00:44
by Expresso
I might have a solution for the problem of pax/cargo not picking a destination where no train has orders for.
Why not simply insert those orders when a station is encountered which is not in the order list, along with a count of how many tiles it took to arrive there from the previous station where the train stopped?
This behavior could simply be ignored if the next order is a non-stop order.
If the train takes x (percent) more tiles to reach the next station, the order could automatically be dropped if it was automatically inserted.
Now, this could be a simple switch which can be turned on and of for each train - this might help with trains which lost these automatically inserted orders for whatever reason.
Re: Cargo Distribution
Posted: 27 Nov 2009 08:55
by fonso
Expresso wrote:I might have a solution for the problem of pax/cargo not picking a destination where no train has orders for.
Why not simply insert those orders when a station is encountered which is not in the order list, along with a count of how many tiles it took to arrive there from the previous station where the train stopped?
...
"Shadow orders" ... That's indeed the only sensible solution for the nondeterminism problem. However they are very prone to failure as you can easily construct a line where the vehicle alternates between two stations on each run and there's no way (short of simulating the whole game up to the point of decision) to know what way it'll take in advance.
Also if you have a look at the order code you'll see that it'll be a lot of work to implement them. They need reasonable timeouts, they have to be saved and loaded, they shouldn't interfer with the normal order system. Du to above mentioned problem you either need several parallel shadow orders and some heuristics on their probability or you need a heuristic to decide between "real" and "fake" nondeterminism where fake nondeterminism can be handled by shadow orders while the real one cannot. That's not as easy as it sounds. If some vehicle goes a different route only rarely it might be due to user intervention and not due to inherent nondeterminism. A lot of vehicles will visit some other stations right after their purchase or during construction work. You need some threshold there.
And finally I believe there are few people who consciously use orders without non-stop. For me it's not worth the hassle to implement a special workaround for those. I'm trying to get everyone who doesn't know the difference anyway to use "non-stop". That's far less work for greater benefit. But if someone steps up and gives me a working implementation of shadow orders I'll at least have a look at it.
I got a spontaneous idea there: In cargodist terms there is another trick you can do: You can record for each vehicle the links it has visited and how often (or for each link the vehicles). Then you can apply the moving average to the "how often" part in order to time out the information in a sensible way. If you encounter a nondeterministic order you can check how many outgoing links of that station the vehicle has been visiting. If it's only one you have fake nondeterminism and can load cargo for that link. That's much easier than real shadow orders, but it has a drawback: A vehicle might go some sort of "8" pattern where it visits several outgoing links of the central station, but the next hop is still deterministic each time. Or you can do the same thing with orders instead of vehicles, which might remedy this, but it needs some more thought ...
Re: Cargo Distribution
Posted: 27 Nov 2009 19:16
by Hamilton2007
Getting a crash with build r18209-Win32, i used al lot less trainsetgrf's then my previous games that kept crashing with the other builds, but have no idea why this one keeps crashing. Altough i played a lot longer on the game then the previous builds, started 1920, crash 1936 or so...
Re: Cargo Distribution
Posted: 27 Nov 2009 19:57
by fonso
Hamilton2007 wrote:...
You have a train with invalid length again. I guess it's the same problem as before. Could you provide an earlier save? At the time of the crash.sav the problematic event is already over and I can't easily find its cause as the crash log is meaningless due to missing debug symbols. And what is "proj1000.grf"? I can't find it.
Once again: as long as this thread is full of crash reports, please do build with debug symbols:
Re: Cargo Distribution
Posted: 27 Nov 2009 20:08
by petert
fonso wrote:And what is "proj1000.grf"? I can't find it.
It's PikkaBird's recently done GRF. Project 1000:
http://www.tt-forums.net/viewtopic.php?f=26&t=45637
Re: Cargo Distribution
Posted: 27 Nov 2009 20:16
by fonso
Ah, thanks. With all the grfs present, the train looks normal again and the crash save doesn't crash ... This isn't much better, though. I need an earlier save and a more detailed description of what happened or a meaningful crash log.
Re: Cargo Distribution
Posted: 27 Nov 2009 20:31
by Hamilton2007
So you think that it's two conflicting trainset GRF's that are causing the crashes?
I don't understand what you are meaning with this:
"Once again: as long as this thread is full of crash reports, please do build with debug symbols:
Code:
./configure --enable-debug=3"
Re: Cargo Distribution
Posted: 27 Nov 2009 21:00
by John
Hamilton2007 wrote:So you think that it's two conflicting trainset GRF's that are causing the crashes?
I don't understand what you are meaning with this:
./configure --enable-debug=3"
It's an option you can set when you compile the game yourself.
If you use petert's builds however I suggest you ignore it.
Re: Cargo Distribution
Posted: 27 Nov 2009 21:13
by Auge
Hello
I play g40a1117b since a week without any trouble (crashwise). But, in difference to Hamilton2007, I use only one set for trains, airplanes and so on at a time.
Hamilton2007 wrote:I don't understand what you are meaning with this:
"Once again: as long as this thread is full of crash reports, please do build with debug symbols:
Code:
./configure --enable-debug=3"
If you compile the game yourself you should enable the debug mode. Otherwise (downloaded binary) the one who compiled it should use this mode.
John wrote:If you use petert's builds however I suggest you ignore it.
But, as many people use his builds, he shouldn't.
Tschö, Auge
Re: Cargo Distribution
Posted: 27 Nov 2009 21:45
by petert
I'm afraid I can't upload the enable debug build because the exe is 70 mb. You will either have to keep using my builds or build yourself.