Page 19 of 154

Re: Cargo Distribution

Posted: 05 Jun 2009 17:22
by el koeno
fonso wrote:
el koeno wrote: Forget about that. It's going waaay to slow for me. Map is very busy, lots of boats, lots of cargo, but it might be cargodist creating the slowdown. R16284, binary here.
I guess you are right with blaming cargodist. It uses way too much memory on this map. If you have an older computer this may well be the reason for the slowdown. It probably has a memory leak somewhere. I'm investigating that.
el koeno wrote: The savegame is positioned at a spot where the problem described above happens; I created a train with exactly the same capacity as an oil tanker, it reaches 100%, and doesn't leave. I didn't think it was a cargodist problem, but you might be interested.
Of course it was a cargodist problem and it is fixed in the latest version.
Cheers! Keep up the good work!

Re: Cargo Distribution

Posted: 05 Jun 2009 21:36
by fonso
New version: I found the reason for the memory leak. Actually this bug was also responsible for the massive lag when loading a game that has been saved and loaded several times and it should also have created desyncs en masse in any network game. Did anyone try a multiplayer game with cargodist yet?

Windows binary: http://fickzoo.com/fonsinchen/openttd-c ... -win32.zip

Re: Cargo Distribution

Posted: 06 Jun 2009 03:15
by Leanden
fonso you have my utmost respect for this mod. Kudos to you!

Re: Cargo Distribution

Posted: 06 Jun 2009 06:40
by albeva
fonso wrote:Did anyone try a multiplayer game with cargodist yet?
Yes. It's great. Haven't really noticed any problems, but we didn't play much.

Re: Cargo Distribution

Posted: 07 Jun 2009 20:29
by SkeedR
Having done some basic testing i can say that it works brilliantly. Well, sort of. I can for see problems when there are large numbers involved, as such i was finding it very difficult to make arrangements for the numbers of passengers i was getting. I'm wondering if you have anything along the lines of "Shortest route" for things. I had passengers hopping from station to station to get somewhere when there was a quicker and more direct route (I had a town wide bus route that had one stop used for a route to an Airport).

Apart from that, awesome. I don't know if it's for every one but a save from 0.7.0 worked quite well too, although my net profits did take quite a hit.

Again, magnificent work.

(Tested with r16520)

EDIT: Save included as you asked.

Re: Cargo Distribution

Posted: 07 Jun 2009 20:45
by jmurrayufo
I think i am a bit confused about some of the set-up for this. When I try to have a large line serviced by a number of feeder lines (for passengers in this case) the feeder lines will load up with passengers, go to the transfer station, unload all of them and them promptly pick them back up. I can force them to unload and leave empty, but that means i'll need a second line to get cargo back to the branch station.

Anyone care to point out my mistake here? Is there an option that I have somehow selected that will cause this or is this a bug?

Re: Cargo Distribution

Posted: 07 Jun 2009 21:32
by jungle
jmurrayufo wrote:I think i am a bit confused about some of the set-up for this. When I try to have a large line serviced by a number of feeder lines (for passengers in this case) the feeder lines will load up with passengers, go to the transfer station, unload all of them and them promptly pick them back up.
This is what happened in my game until I realised that all vehicles need to have every order as "non-stop" for the routing to work - even if there is no possibility of other stops.

Works fine then - although I have spotted one slightly odd problem where you switch the direction of trains on an already existing circular route. Will post a savegame in the next few days (want to test with a newer binary to see if it's been fixed already first).

Re: Cargo Distribution

Posted: 08 Jun 2009 08:20
by fonso
You notice something? Those are 3 posts with questions but without savegames. :roll: I refuse to answer them until I get savegames.

Re: Cargo Distribution

Posted: 08 Jun 2009 12:08
by Aqua77
Havent had any problems while playing multiplayer in a LAN.
Thanks to fonso for doing a great job here, and i am really impressed about the speed u offer new improved versions.

Re: Cargo Distribution

Posted: 08 Jun 2009 12:45
by jungle
fonso wrote:You notice something? Those are 3 posts with questions but without savegames. :roll: I refuse to answer them until I get savegames.
I was not expecting an answer - as I said in the post I will attempt to produce a useful savegame as soon as I have time (no extra GRFs, using the most recent binary).

Re: Cargo Distribution

Posted: 08 Jun 2009 15:16
by fonso
SkeedR wrote:Having done some basic testing i can say that it works brilliantly. Well, sort of. I can for see problems when there are large numbers involved, as such i was finding it very difficult to make arrangements for the numbers of passengers i was getting. I'm wondering if you have anything along the lines of "Shortest route" for things. I had passengers hopping from station to station to get somewhere when there was a quicker and more direct route (I had a town wide bus route that had one stop used for a route to an Airport).
Edit: Most of your orders aren't "non-stop". This causes orders to be interpreted as nondeterministic. When the next order is nondeterministic a vehicle can load any cargo waiting at a station, even if it's not destined for the station of the next order. I implemented it this way because I can't know in advance where the vehicle will stop the next time and thus I can't know which cargo to load onto it. This is why the passengers are hopping back and forth.

General explanation of the MCF algorithm, 743rd time:
Looking at the link stats in the smallmap it's easy to see that almost all of your links are massively overloaded. Compare the red boxes (planned flows) with the white ones (capacity) and you'll see. The MCF solver tries to equally overload all routes if there is more demand than capacity. This means very long routes that have been selected towards the end of the first pass receive roughly the same flow in the second pass as short routes. This is intended as otherwise you might get artificial bottlenecks at the shortest routes with other routes not being overloaded. In order to improve the general quality of routes you can raise the mcf accuracy. In order to have more flow assigned in the first pass and less in the second one you can increase the short path saturation.

Re: Cargo Distribution

Posted: 08 Jun 2009 19:39
by Wasila
This time I've got a real problem :P

I'm used to frequent crashes, but it's going a bit far now. Pretty much whenever I click, there's a crash. Every few seconds, it crashes. It started just after I finished upgrading to maglev.

Too big to upload to site.

http://www.2shared.com/file/6188540/140 ... sport.html

Re: Cargo Distribution

Posted: 08 Jun 2009 20:12
by jungle
OK, now I have a useful savegame.

This bug occurs when building a single track one-way circular route around a city.

First, you start building your circular track - but the town won't let you finish the route. So while you wait for the town to calm down, you start with a shuttle service in both directions along the track with just the one train (as in the first savegame).

Later on, with the town council calmed down, you can complete your circular route. You then change the orders of the train to run in a circle, which enables two or three trains to run.

But... cargodist does not recognise that the old route has stopped, and passengers pile up trying to go around the circular route in the other direction (second savegame). This seems to continue for at least 5 years - I haven't checked any further.

I used the latest (3 June) build downloaded from the openttdcoop ftp.

Thanks very much for all your work on this, by the way - it adds a whole new dimension to the game.

Re: Cargo Distribution

Posted: 09 Jun 2009 09:31
by fonso
jungle wrote:OK, now I have a useful savegame...
Your moving average is much too high. Reduce it to the current default (1 and 128) and the dead links will time out faster. See discussion in previous pages for explanation.
Wasila wrote:I'm used to frequent crashes, but it's going a bit far now.
Every time you don't report a bug god kills a kitten. Please do tell me when the game crashes!
Wasila wrote:Pretty much whenever I click, there's a crash. Every few seconds, it crashes. It started just after I finished upgrading to maglev.
I need to know the version you are playing in order to be able to load the game. What does the title bar in the menu window say for you? It should be something like "OpenTTD g80b8ebbb-cd-gui".

Re: Cargo Distribution

Posted: 10 Jun 2009 19:20
by Wasila
It's:

OpenTTD g0ddaddf5-(no branch)

Re: Cargo Distribution

Posted: 10 Jun 2009 23:20
by fonso
Wasila wrote:It's:

OpenTTD g0ddaddf5-(no branch)
Nice, thanks. Your savegame highlights yet another way to create flow circles. Perhaps I should read some more on this problem before I come up with another algorithm ...

Re: Cargo Distribution

Posted: 11 Jun 2009 01:09
by Zhall
TO HELL WITH..

Hmm, well maybe it would be a nice change of pace.. usually i hate cargo destinations, because most of the time they want you to connect close industries like how the subsidaries operate.

Re: Cargo Distribution

Posted: 11 Jun 2009 02:26
by Eddi
cargo destinations do not force you to do anything. destinations are only chosen for connections that you already built.

Re: Cargo Distribution

Posted: 11 Jun 2009 05:19
by Zhall
Unlike simutrans? hmm interesting.

Re: Cargo Distribution

Posted: 12 Jun 2009 12:55
by 2007Alain2007
Hi

The road map for openttd 8 dose not say its gonig to have this patch but dose say it have cargodest

just liked to know what ther going to have in it