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
Edd.Dragon
Engineer
Engineer
Posts: 101
Joined: 14 Jan 2012 10:13
Location: Ukraine

Re: Cargo Distribution

Post by Edd.Dragon »

Oh, I was think what this algorithm was bringed by CargoDist and in OTTD no corrections is calculated. Thanks!

But this corrections don't explain huge loses :(
Or more exactly to say: huge looses can happens only in case of the huge detour roots. For example:

Image

And how to avoid such situations?
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: Cargo Distribution

Post by Alberth »

User avatar
Edd.Dragon
Engineer
Engineer
Posts: 101
Joined: 14 Jan 2012 10:13
Location: Ukraine

Re: Cargo Distribution

Post by Edd.Dragon »

Eddi gived this link previously. But question hove to avoid detour transfers in comlex nets with CargoDist?
See my previous picture - two towns with cirle 2-way rout in each + connection betwin them. How to restrict intown transfers by town's circle route and avoid this passangers from choosing travel to anose town and back in case when short root is overloaded (e.g. choosing extra-long route)?

1. Lets avoid short route overloading and all will be fine! But...
2. Don't create any alternatives! But circle around town is natural!

So, perhaps well knowing of settings (and how they affect in overloaded system) will help.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: Cargo Distribution

Post by Alberth »

Perhaps someone else has a better idea, but I can only think of "don't make it possible".
That is, have 2 trains, one circling in the town only, and one (or two) moving back and forth between the cities.

A slightly other idea is to provide more capacity on the short line. Then passengers won't take the longer route (so much??? I don't know how CDIST does balancing between lines, so this may not work.)
User avatar
Edd.Dragon
Engineer
Engineer
Posts: 101
Joined: 14 Jan 2012 10:13
Location: Ukraine

Re: Cargo Distribution

Post by Edd.Dragon »

Alberth wrote:Perhaps someone else has a better idea, but I can only think of "don't make it possible".
That is, have 2 trains, one circling in the town only, and one (or two) moving back and forth between the cities.
Actually. But intown and intertown trains has shared station? If not, than it isn't realistic. If has, then we have very long detour which must be strongly fined.

P.S.: Circle onself also has short and long route variants. But this problem less significant - circles not so big and losses not so much or even no losses at all.


Oh! I will analize some testcase with several settings of "Effect of distance on demands"...
User avatar
Edd.Dragon
Engineer
Engineer
Posts: 101
Joined: 14 Jan 2012 10:13
Location: Ukraine

Re: Cargo Distribution

Post by Edd.Dragon »

fonso
I propose some updates for strings and russian translate (if is not difficult to add it to project, of course). See attach
Attachments
translate.txt
(7.64 KiB) Downloaded 86 times
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

If you set short path saturation to 100% it will first overload the shortest route before taking any alternative. However, this might not be what you want as you will get lots of jams in complex networks. In general it's a better idea to provide enough capacity on short routes and have short path saturation somewhere around 80% to account for somewhat imprecise measurements of capacity.
Cargodist cannot know what kinds of detour are acceptable for you, so it will take any detour necessary to get the cargo where it wants to go. Just imagine you have a train going all around a square map. The distance travelled between two opposing spot might well be double the manhattan distance. However, it might be completely reasonable to take that route. The relative detour associated with travelling inner city circle lines in the "wrong" direction after traversing a long intercity link is certainly smaller than that.
And don't forget: Most of those red numbers aren't real losses, but only corrections of previous estimations given by the strange way transfer credit is calculated.

Thanks for the translations. I'll include them. However, _high_ values for accuracy slow the game, not low ones.
The guy on the picture is not me, it's Alonso.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

I've added russian and german translations. Thanks to Edd.Dragon and stephan2503 (as I'm a german native speaker myself I had to fix a few things there, though ...).
The guy on the picture is not me, it's Alonso.
Coxx
Transport Coordinator
Transport Coordinator
Posts: 328
Joined: 19 Mar 2007 19:12

Re: Cargo Distribution

Post by Coxx »

I can´t load savegames from an older version of CD (g632dba1a-cd 22.01.) into a more recent one (gae58bd4c-cd 29.02.). It always states "Savegame is made with newer version" ?( .
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Cargo Distribution

Post by Eddi »

right, you cannot do that. ever. go back to the old version, or start a new game.
User avatar
Edd.Dragon
Engineer
Engineer
Posts: 101
Joined: 14 Jan 2012 10:13
Location: Ukraine

Re: Cargo Distribution

Post by Edd.Dragon »

Previous CD was based on ottd 1.2 RC1, but last one - on ottd 1.2 beta 4. So...
User avatar
Vaulter
Traffic Manager
Traffic Manager
Posts: 185
Joined: 21 Dec 2004 05:35
Skype: andrey-zaharov
Location: St. Petersburg, Russia
Contact:

Re: Cargo Distribution

Post by Vaulter »

Hi, fonso.
Looks like "patches" folder has gone away
Any other chances to get anywhere diff ?

Thanks for your efforts!
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

You can let github generate the current diff for you like this: https://github.com/fonsinchen/openttd-c ... ...cd.diff
The guy on the picture is not me, it's Alonso.
User avatar
Vaulter
Traffic Manager
Traffic Manager
Posts: 185
Joined: 21 Dec 2004 05:35
Skype: andrey-zaharov
Location: St. Petersburg, Russia
Contact:

Re: Cargo Distribution

Post by Vaulter »

fonso wrote:You can let github generate the current diff for you like this: https://github.com/fonsinchen/openttd-c ... ...cd.diff
wow, cheers
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

A quiz for you. What is going on on this game?
Hint1: You can't do this with the stable version of cargodist.
Hint2: The stable version of cargodist has a bug in the station GUI which is unrelated to this quiz.
Attachments
Quiz
Quiz
Marseille Transport, 2063-11-01#1.png (105.48 KiB) Viewed 2834 times
The guy on the picture is not me, it's Alonso.
User avatar
Edd.Dragon
Engineer
Engineer
Posts: 101
Joined: 14 Jan 2012 10:13
Location: Ukraine

Re: Cargo Distribution

Post by Edd.Dragon »

Marseille Central: 9 pax VIA Marseille TO Marseille?
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Cargo Distribution

Post by Eddi »

i'd be more worried about "40 passengers at this station" - "40 passengers to this station"... if they're already there, why don't they go home?
User avatar
Edd.Dragon
Engineer
Engineer
Posts: 101
Joined: 14 Jan 2012 10:13
Location: Ukraine

Re: Cargo Distribution

Post by Edd.Dragon »

Eddi wrote:i'd be more worried about "40 passengers at this station" - "40 passengers to this station"... if they're already there, why don't they go home?
Look for filter - it is planned showed ;)
It is pax that want to Marseille West via Marseille West (of course) from Marseille. But they not transported to Marseille West at the moment.
User avatar
Edd.Dragon
Engineer
Engineer
Posts: 101
Joined: 14 Jan 2012 10:13
Location: Ukraine

Re: Cargo Distribution

Post by Edd.Dragon »

Edd.Dragon wrote:Marseille Central: 9 pax VIA Marseille TO Marseille?
Oh! They also not transfered yet (from West)!
I also was wrong :mrgreen:
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

OK, as no one guessed right, I'll solve the mystery:

What you see there is support for "transfer" orders in the routing algorithm and a funny quirk in that. The thing you should have noticed is that there are passengers from Marseille West at Marseille going via Marseille Central back (!) to Marseille. This is because the "transfer" order prohibits delivering the passengers right away at Marseille when they arrive there for the first time. They have to be picked up by another vehicle and brought somewhere else (at first). However, the other vehicle has no transfer order and can actually deliver those same passengers at Marseille on the way back. The routing algorithm finds out about that and routes the passengers via Marseille and Marseille Central to get them from Marseille West to Marseille.

Unfortunately the numbers aren't really accurate as the flow mappings for the "transfer" and "return" trips cannot be completely separated. I can just exclude certain entries depending on the current order. So some people will take several round trips in a row but for now I can live with that.

"unload all" and "no unloading" are also supported, btw. You can test that in the cdd branch. Right now I'm thinking about how to support "no loading". The principle should be roughly the same.
The guy on the picture is not me, it's Alonso.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 11 guests