Page 90 of 154
Re: Cargo Distribution
Posted: 09 Jul 2010 14:19
by bluebottle
Looks like this thread could do with an updated Ubuntu build.
This is a build of r20016 for Ubuntu 10.04 (Lucid Lynx), with 'vanilla' cargodist (thanks to fonso

).
- As with the distro OpenTTD package, you need to have the data files in /usr/share/games/openttd/data/.
- This build is unstripped to provide better (i.e. useful) core dumps/backtraces. This is similar to including the .pdb file for MSVC builds.
Download: openttd_cargodist-r20016M-no_debug-unstripped-i386.deb
Report bugs/crashes to
this thread first.
Re: Cargo Distribution
Posted: 09 Jul 2010 14:24
by Kogut
Destroyed station connected to linkgraph is in minimap showed in topcorner. I think it may be better to show it in old place or completely disable showing (it is data from r19964M cargodist with sprinkles build).
Re: Cargo Distribution
Posted: 12 Jul 2010 02:03
by ChillCore
Kogut wrote:
Destroyed station connected to linkgraph is in minimap showed in topcorner.
Confirmed. Nice spotting.
I think it may be better to show it in old place ...
If a station is no longer there a linkgraph cannot connect to it so it connects to the invalid tile. Which is what you see in the smallmap gui.
Remembering where destroyed stations were would require Cargodist to remember where all stations are and checking over and over again if they are still there.
IMHO to resource demanding thus bad idea. (Think big games like coop)
... or completely disable showing.
The (bad) linkgraph disappears when the order to go there turns invalid in the order list.
At the same time the station sign is removed from the main gui.
Also the station sign is not removed upon removal of the station to give players the chance to replace a station without having to check/redo all the vehicle orders. (eg. player has by accident removed a station.)
When you rebuild the station near a sign of a destroyed station the name of the station is reused and orders remain valid. See attachment.
This makes me think that it is not a Cargodist problem perse.
A possible solution would be drawing the linkgraphs from station_a sign position to station_b sign position.
fonso?
Re: Cargo Distribution
Posted: 12 Jul 2010 10:20
by fonso
I think it'll be safe and easy to just not show any links to the invalid tile. Links to nonexisting stations are useless anyway. I'll do that in the next version, along with white instead of black text for the link graph "text" mode.
Re: Cargo Distribution
Posted: 14 Jul 2010 06:57
by Kogut
Is it possible to allow setting cargodist relations separetely for every cargo?
I want to use cargodist for passengers, mail, goods and food. With standard industries I can do it thanks to EXPRESS cargo class. Unfortunately it is impossible with FIRS (there are other EXPRESS cargos, other than goods and food). So I have to set all cargos except mail/passengers to manual, or chaoose all EXPRESS cargos to cargodist processing.
Re: Cargo Distribution
Posted: 15 Jul 2010 02:12
by Eddi
IMHO, it makes a lot of sense to have also the "supplies" cargos with destinations, as these are difficult to distribute properly.
It's not feasible to add an option for each cargo type, especially since the advanced settings menu must be independent from newgrfs.
Re: Cargo Distribution
Posted: 15 Jul 2010 04:11
by Kogut
It can be done. For example: menu available after click of RBM on cargo in linkgraph minimap cargo list.
Re: Cargo Distribution
Posted: 15 Jul 2010 16:47
by Creat
Kogut wrote:It can be done. For example: menu available after click of RBM on cargo in linkgraph minimap cargo list.
That would be a very unintuitive solution. I wouldn't ever look in the minimap for options weather or not a cargo type will be handled by cargodist.
Also this creates the problem, that settings can't be saved except in the current savegame (as you may have different NewGRFs loaded in different sessions). So you'd have to make the changes over and over for every game. The only clean solution would be to create a new window for managing this, which still wouldn't solve the saving-problem...
Re: Cargo Distribution
Posted: 15 Jul 2010 17:13
by Kogut
Or other solution
- set cargo with ID 1 to foo
- set cargo with ID 2 to foo
etc
Re: Cargo Distribution
Posted: 16 Jul 2010 09:16
by fonso
The problem is the fixed structure of the settings menu. You cannot easily add or remove things and always displaying 32 cargo entries most of which are unneeded is somewhat ugly. This is why I went for the current solution.
Re: Cargo Distribution
Posted: 16 Jul 2010 19:25
by Kogut
Or maybe from command line?
Re: Cargo Distribution
Posted: 20 Jul 2010 18:53
by keoz
Hi.
I've a little issue with cargodist. The problem comes when i'm using conditional orders, like this one:

- New Swiss Railways, 19-02-1934.png (92.96 KiB) Viewed 3311 times
The train number #5 follows that route: Arosa - St.Gallen - Wohlen - St.Gallen. I use conditional orders in order to send the train to a depot when its reliability is under 50%. In this case, the train arrives at the terminus, unloads without loading, goes to the depot, goes back to the terminus, loads, and take back its route.
I've read in the wiki that conditional orders aren't an issue (= nondeterministic orders) when it is not possible to evaluate at least two
different stations as alternative, which is the case here. But routing falls back to traditional behaviour:
1) In St.-Gallen, all cargos of the arriving train are unloaded (which is weird, at least a part should go to Wohlen).
2) More important, all cargos in St.-Gallen are loaded, though they shouldn't (the are scheduled for Arosa, not Wohlen), as you can see:

- New Swiss Railways, 21-02-1934.png (85.94 KiB) Viewed 3311 times

- New Swiss Railways, 23-02-1934.png (73.79 KiB) Viewed 3311 times
What did I miss ? I'm pretty sure that this kind of orders were working before (or in some other cases ?), using cargodist.
Regards
Re: Cargo Distribution
Posted: 20 Jul 2010 21:55
by Creat
Just out of curiosity, why don't you use the provided mechanism to perform conditional maintenance? You do know you can add a maintenance order, right? In those cases the train only goes to the depot for maintenance if the reliability is below a threshold (can be set in advanced preferences I think). It does almost exactly the same as your conditional orders with the exception that the train won't be empty when maintained. That shouldn't make any noticeable difference as far as income etc. is concerned (unless the depot is half a map away), only if you do this for realism...
Re: Cargo Distribution
Posted: 20 Jul 2010 22:49
by keoz
Creat wrote:Just out of curiosity, why don't you use the provided mechanism to perform conditional maintenance? You do know you can add a maintenance order, right? In those cases the train only goes to the depot for maintenance if the reliability is below a threshold (can be set in advanced preferences I think).
I noticed it already, some time ago, but never really used it. Until one hour ago

. That's the solution i just switched to.
Creat wrote:It does almost exactly the same as your conditional orders with the exception that the train won't be empty when maintained. That shouldn't make any noticeable difference as far as income etc. is concerned (unless the depot is half a map away), only if you do this for realism...
Yes, it was for realism, and also because I didn't explore so much the other depot-orders. Anyway it works for me like this now. But I'd still be interested in understanding what did I miss.
Re: Cargo Distribution
Posted: 22 Jul 2010 06:04
by fonso
keoz' original solution should work. There was a bug in some past version where it didn't but I've fixed that (at least I think so). Which version are you using? Can I get a save game?
Re: Cargo Distribution
Posted: 22 Jul 2010 11:49
by keoz
fonso wrote:keoz' original solution should work. There was a bug in some past version where it didn't but I've fixed that (at least I think so). Which version are you using?
Version and compile date:
Code: Select all
keikoz@kgentoo ~/openttd/openttd-cargodist $ ./findversion.sh
g0e2b4fba 20160 0 g0e2b4fba
keikoz@kgentoo ~/openttd/openttd-cargodist $ ls -l bin/openttd
-rwxr-xr-x 1 keikoz users 5169212 2010-07-18 21:20 bin/openttd
fonso wrote:Can I get a save game?
Unfortunately I removed it. But I made a test right now, with a clean game, a standard openttd.cfg and free of NewGRF: the problem is still present. The 1st savegame uses classical orders, and the cargodist scheduling works. In the 2nd savegame, I used the conditional orders, and the pax dispatching doesn't work anymore.
Re: Cargo Distribution
Posted: 24 Jul 2010 03:45
by erikvanvelzen
From
http://wiki.openttd.org/Passenger_and_c ... stribution
min_rating_cap is a new setting in "Advanced settings" -> "Economy".
I can't find this setting.
I compiled it myself and i got a binary from here but in both versions it's not there. Where do i look?
Re: Cargo Distribution
Posted: 24 Jul 2010 07:05
by Kogut
erikvanvelzen wrote:From
http://wiki.openttd.org/Passenger_and_c ... stribution
min_rating_cap is a new setting in "Advanced settings" -> "Economy".
I can't find this setting.
I compiled it myself and i got a binary from here but in both versions it's not there. Where do i look?
I am not sure but that option was removed.
Re: Cargo Distribution
Posted: 24 Jul 2010 09:22
by fonso
yes, "supply scaling" has been replaced by "external station ratings". The Wiki was outdated.
Re: Cargo Distribution
Posted: 24 Jul 2010 10:38
by fonso
The issue with conditional orders is fixed now. I was comparing orders, not their destination stations for equality to find out about determinism. So if you had several orders for the same station it didn't work.