Page 115 of 154

Re: Cargo Distribution

Posted: 21 Dec 2011 14:00
by Creat
Pinuccio wrote:Hi again :)
Someone can explain me what happens in this station?

Image

This 30 passengers do not want to go away... it seems that they haven't a destination...
The station is linked with all other stations (only 4).

I have to attach the save file? Or there is a simple explanation?
Yes, always attach the save, it makes it much easier to reproduce the problem. It#S not THAT much work after all to attach a file ;)

Re: Cargo Distribution

Posted: 21 Dec 2011 15:59
by Pinuccio
This is the save :))

Re: Cargo Distribution

Posted: 21 Dec 2011 19:07
by fonso
Seems I introduced some bugs with the new random number routing scheme ... unfortunately I can't fix them right now. If you want to play a nice bug-free game over Christmas you should probably use this one: http://bundles.openttdcoop.org/cargodis ... 43d6d1-cd/

Re: Cargo Distribution

Posted: 22 Dec 2011 18:04
by Pinuccio
fonso wrote:Seems I introduced some bugs with the new random number routing scheme ... unfortunately I can't fix them right now. If you want to play a nice bug-free game over Christmas you should probably use this one: http://bundles.openttdcoop.org/cargodis ... 43d6d1-cd/
Ok! Happy to give some help :)
Thanks again for your work, it give mch more realism to the game! :)

Merry Christmas to all!! :wink: :wink: :wink:
See you soon

Re: Cargo Distribution

Posted: 26 Dec 2011 13:13
by Wasila
I wanted to apply CargoDist to a version with game script, so I used this link: https://raw.github.com/fonsinchen/opent ... nt/cd.diff and applied it to trunk, with no errors. However, I can't seem to be able to zoom in to the small map any more than normal. Furthermore, I'm not sure how the new overlay works. All it does is show you how overfull the route is on the small map, correct?

Thanks,
Wasila!

Re: Cargo Distribution

Posted: 26 Dec 2011 14:12
by ChillCore
Wasila wrote: I can't seem to be able to zoom in to the small map any more than normal.
Smallmap EZ has been removed from CargoDist a long time ago. It was disliked by the Devs for some (unknown to me) reason and fonso complied.
Furthermore, I'm not sure how the new overlay works. All it does is show you how overfull the route is on the small map, correct?
You are correct, that is how it works ... you can filter by cargo to get to know more about a specific cargo-link.
The links coloured by cargo are removed too. in faver of the current implementation


ps:
Please forget anything you know about the version of CargoDist included in my patchpack as that one is outdated and modified.
[off-topic]
I still have zoom in and the cargo-coloured links because I can not part of them ... I might not be able to re-implement them in my new version that will be coming soonish but I for sure am going to try.
No discussion about this here please but feel free to use my thread for that ... fonso decided a long time ago. ;)
[/off-topic]

Re: Cargo Distribution

Posted: 26 Dec 2011 14:28
by Wasila
I assume the small map zoom doesn't work with trunk anymore then? A great shame - I grew very accustomed to zooming in to analyse my links, and I think it will be very difficult to manage inner-city bus routes without being able to zoom in. Thanks for the help anyway.

Thanks,
Wasila

Re: Cargo Distribution

Posted: 26 Dec 2011 14:56
by Leroot
The developers of OpenTTD were not keen to include any smallmap zoom functionality that made it as zoomed/detailed as the main game screen, because that's not it's intended purpose. They felt that anything that needs to be that big should be shown in the main viewport =) As such, under the map icon in your toolbar there is a new option, Link Graph Legend, which will allow you to overlay your routes on the main game screen - and zoom a whole lot more than you ever could on the smallmap. =)

At this point the overlay shows from white->green for underutilised links, and yellow->red for oversaturated links. The exact way it chooses a colour is in linkgraph_gui.cpp:203 =)



fonso: The crash I reported previously (Assertion failed at line 3367 of ..\src\station_cmd.cpp: capacity >= usage) still occurs on the December 11th build you linked. I temporarily fixed it with the following (terrible) hack:

Code: Select all

‎//assert(capacity >= usage);
usage = ClampU(usage, 0, capacity); //hack
Anyway hopefully the worst that can happen is my hack will throw out the moving averages a little bit. =)

Re: Cargo Distribution

Posted: 26 Dec 2011 15:36
by ChillCore
Wasila wrote: I assume the small map zoom doesn't work with trunk anymore then?
You can still zoom out right? If not something is broken that should not be broken.
A great shame - I grew very accustomed to zooming in to analyse my links, and I think it will be very difficult to manage inner-city bus routes without being able to zoom in. Thanks for the help anyway.
I feel the same way, :cry:, but this has been dicussed in length before.

Leroot wrote: The developers of OpenTTD were not keen to include any smallmap zoom functionality that made it as zoomed/detailed as the main game screen, because that's not it's intended purpose.They felt that anything that needs to be that big should be shown in the main viewport
Thank you for explaining ... I remember the discussion but did not remember the details.
fonso: The crash I reported previously (Assertion failed at line 3367 of ..\src\station_cmd.cpp: capacity >= usage) still occurs on the December 11th build you linked. I temporarily fixed it with the following (terrible) hack:
Clamping values is a very ugly hack indeed ... it prevents problems that may happen afterwards and why the assert was/is there but does not solve the cause of the issue.
Anyway hopefully the worst that can happen is my hack will throw out the moving averages a little bit. =)
Hopefully that is all that will happen ... You may want to keep an eye on your CPU usage anyway. CargoDist (and OpenTTD) can be quite CPU hungry and will not stop because of the CPU being maxed out. ;)

Re: Cargo Distribution

Posted: 26 Dec 2011 16:58
by Wasila
Been testing further. Thanks for that, Leroot, but both the minimap and the new main map display lack certain functionality - one cannot see the demand generated at a station, for example, or hover over a link to see its two termini, which is useful in busier networks. And surely, now that the main map can seem in even further, small map zoom wouldn't be providing the same detail as the main map :)
You can still zoom out right? If not something is broken that should not be broken.
Yeah, that works. I thought that was already in trunk?

Re: Cargo Distribution

Posted: 26 Dec 2011 17:11
by fonso
Leroot's problem is this one: http://bugs.openttd.org/task/4912. Don't autoreplace trains to ones with smaller capacity for now.

Re: Cargo Distribution

Posted: 26 Dec 2011 17:11
by Lordmwa
Im using the latest release of Chills patch pack of which CD is of course one of the core components.

My only query is what are the best settings to make people go different routes!

For example:

A-B-C-D but there is also a service that runs A-D direct

I cannot seem to get it so passengers for D will just get on the first train with space. They all seem to wait for the fast service


Do any settings make this less likely to happen?

Re: Cargo Distribution

Posted: 26 Dec 2011 17:25
by fonso
The link hovering doesn't fit into the spirit of the OpenTTD UI. It would be the only UI element to use mouse hovering as input method. That's why i dropped it. You should be able to figure out the termini of a link by zooming in. The monthly supply is still shown as size of the station dots, but the scale has been tailored a bit. It's one pixel of radius per 200 units of cargo now.

Re: Cargo Distribution

Posted: 26 Dec 2011 17:33
by fonso
Lordmwa wrote: My only query is what are the best settings to make people go different routes!

For example:

A-B-C-D but there is also a service that runs A-D direct

I cannot seem to get it so passengers for D will just get on the first train with space. They all seem to wait for the fast service


Do any settings make this less likely to happen?
You should post a savegame so that we can see. There is a setting called "Saturation of short paths before using capacious paths". If you lower this the "longer" link via B and C will be chosen earlier, even if A-D is not saturated yet. However, that only happens if there actually is capacity left over on A-B-C-D. If A-B-C-D is already saturated the algorithm will still saturate A-D first.

In fact the point of cargodist is not to make cargo choose different routes but the most intelligent ones. As long as A-D is not saturated it is in fact the most intelligent choice for those passengers.

Re: Cargo Distribution

Posted: 26 Dec 2011 17:56
by Leroot
fonso wrote:Leroot's problem is this one: http://bugs.openttd.org/task/4912. Don't autoreplace trains to ones with smaller capacity for now.
Ah, thankyou =)
Wasila wrote:Been testing further. Thanks for that, Leroot, but both the minimap and the new main map display lack certain functionality - one cannot see the demand generated at a station, for example, or hover over a link to see its two termini, which is useful in busier networks.
fonso wrote:The link hovering doesn't fit into the spirit of the OpenTTD UI. It would be the only UI element to use mouse hovering as input method. That's why i dropped it. You should be able to figure out the termini of a link by zooming in. The monthly supply is still shown as size of the station dots, but the scale has been tailored a bit. It's one pixel of radius per 200 units of cargo now.
I think the current display does lack some functionality. I like the colour and shape interface for getting a quick impression of how things are working, but when I see bright red, my first thought is "okay, but what are the numbers." I'm looking to write a patch myself that addresses some of the things mentioned, and if it's useful and polished, I'll post it for your perusal =) I will probably make a link info window (capacity, usage, etc.), and then put a list of attached links in each station window somehow.

Re: Cargo Distribution

Posted: 26 Dec 2011 18:01
by fonso
Leroot wrote:I think the current display does lack some functionality. I like the colour and shape interface for getting a quick impression of how things are working, but when I see bright red, my first thought is "okay, but what are the numbers." I'm looking to write a patch myself that addresses some of the things mentioned, and if it's useful and polished, I'll post it for your perusal =) I will probably make a link info window (capacity, usage, etc.), and then put a list of attached links in each station window somehow.
If it fits nicely I'll certainly integrate it. I guess everyone knows by now that I'm having a hard time writing UI code and that's why I'm always grateful if someone else does that for me. You can also make it available before it's ready and I'll give you some feedback if you like.

Re: Cargo Distribution

Posted: 26 Dec 2011 20:57
by Lordmwa
fonso wrote:You should post a savegame so that we can see. There is a setting called "Saturation of short paths before using capacious paths". If you lower this the "longer" link via B and C will be chosen earlier, even if A-D is not saturated yet. However, that only happens if there actually is capacity left over on A-B-C-D. If A-B-C-D is already saturated the algorithm will still saturate A-D first.

In fact the point of cargodist is not to make cargo choose different routes but the most intelligent ones. As long as A-D is not saturated it is in fact the most intelligent choice for those passengers.
If i get it obviously in my current game i will post a save. In previous games i have had this problem with hundreds of passengers waiting for the fast service and the stoppers going totally empty.

Re: Cargo Distribution

Posted: 26 Dec 2011 23:00
by fonso
I will happily look at the saves when I get them. In any case please look at the whole scenario. If A-B-C is emtpy, but C-D is totally overloaded then the algorithm will totally overload A-D before pushing any cargo down the A-B-C-D route where it will get stuck at C anyway.

Re: Cargo Distribution

Posted: 27 Dec 2011 14:45
by Creat
Just to provide a bit of balance to the issue: I'm extremely happy with the current linkgraph mechanic! Meaning I very much prefer the main view implementation over the smallmap. At least for me this solution is the better one by a huge margin.

I'm sure there are many other people who feel the same way and just aren't that active in the forum (or this thread) :)

Re: Cargo Distribution

Posted: 27 Dec 2011 20:42
by ChillCore
Lordmwa wrote: I'm using the latest release of Chills patch pack
You are using what and are reporting where?

Could you please post in the correct thread first ... I mentioned just a few post back that the version I still use is outdated and modified ... :cry:
Please re-read the first post of my thread ... I would have re-directed you here or replied myself.
Also, fonso has replied in my thread too before regarding issues with CargoDist. ;)

Creat wrote: Just to provide a bit of balance to the issue: I'm extremely happy with the current linkgraph mechanic! Meaning I very much prefer the main view implementation over the smallmap. At least for me this solution is the better one by a huge margin.
Just to make things clear ... I like the current implemention too but as I played CargoDist from the very start of development I got used to the old implementation and grew more than a bit fond of it as it was easy to evaluate links without the need to filter by cargo.

What I would like very much is the old smallmap cargo-coloured links version (with, even if it would only be 1 level in, or without zoom-in; ) and the new version for the main viewport at the same time.
I understand that it is too much work to maintain both and will not ask for fonso to do this and maintain it.