Cargo Distribution
Moderator: OpenTTD Developers
Re: Cargo Distribution
Well I am no expert either, but have your read:
saturation: http://wiki.openttd.org/Passenger_and_c ... ow_problem
effect of distance on demand: http://wiki.openttd.org/Passenger_and_c ... ric_demand
What you could do to reduce passenger numbers, is to prevent the cities from growing fast by changing that setting in the advanced settings. Another option is reduce the number of towns that are cities.
saturation: http://wiki.openttd.org/Passenger_and_c ... ow_problem
effect of distance on demand: http://wiki.openttd.org/Passenger_and_c ... ric_demand
What you could do to reduce passenger numbers, is to prevent the cities from growing fast by changing that setting in the advanced settings. Another option is reduce the number of towns that are cities.
Re: Cargo Distribution
there is a separate patch to reduce amount of passengers generated, it's included in the "cargodist with sprinkles" patch pack.
Re: Cargo Distribution
Or try this NewGRF, probably the easiest: http://www.tt-forums.net/viewtopic.php? ... 21&start=0 . Haven't tried this version yet so I can't comment on it.
Re: Cargo Distribution
OK, thank you for the linkls, will read once again with more attention.
About passenger reduction - I am actually using Chill's Patchpak, probably this is what cargo town generation is about. Will have to read another forum topic as well.
Will test the newgrf anyway, seems to be great idea.
About passenger reduction - I am actually using Chill's Patchpak, probably this is what cargo town generation is about. Will have to read another forum topic as well.
Will test the newgrf anyway, seems to be great idea.
Re: Cargo Distribution
Fonso, I'm interested in how you tried to reduce the number of passengers generated. I say this having no knowledge of the inner-workings of the passenger generating code and I'm sure you've thought of this, but I'd recommend something like the following.
Take a minimum cargo percent (0-100 with 100 being no alteration), and then use the formula:
(100 - base_pct) * log(n) / log(total) + base_pct
where n is the number of towns (or sinks) the current town (faucet) is connected to in the connected component and total is the total number of connections possible. Then you'd reduce whatever the currently computed cargo generation number is by this percent. (Obviously only for PAX and maybe mail)
Again, while the formula is simple and should yield ideal results, it might be very hard to restrict the generation of cargo in the code. But I just thought I'd try to help in ase you hadn't already thought of that. Lemmie know!
Take a minimum cargo percent (0-100 with 100 being no alteration), and then use the formula:
(100 - base_pct) * log(n) / log(total) + base_pct
where n is the number of towns (or sinks) the current town (faucet) is connected to in the connected component and total is the total number of connections possible. Then you'd reduce whatever the currently computed cargo generation number is by this percent. (Obviously only for PAX and maybe mail)
Again, while the formula is simple and should yield ideal results, it might be very hard to restrict the generation of cargo in the code. But I just thought I'd try to help in ase you hadn't already thought of that. Lemmie know!
Re: Cargo Distribution
This is a variation on what I had with supply scaling. There are some problems with this idea:comp615 wrote:Fonso, I'm interested in how you tried to reduce the number of passengers generated. I say this having no knowledge of the inner-workings of the passenger generating code and I'm sure you've thought of this, but I'd recommend something like the following. [...]
1. Multiple stations close to each other with overlapping coverage area are easy to build and give you an unfair advantage (for every sane definition of "total"). I demonstrated that by building extensive bus networks in every town I connected during the first test game. I got max ratings of about 80% even though I was only entitled to maybe 50%. To resolve that you'd have to track the overlapping coverage areas and that'd be very complicated.
2. The place to influence cargo generation in OpenTTD is the station rating. I stuck to that as anything else would be kind of dirty. Then I got two more problems:
a, Primary industries closing down due to low rating or (if you keep the minimum cap high enough to avoid that) barely any effect at all.
b, Insanely low ratings in the early game and basically the same as without supply scaling in the late game. This is bad because in the early game you have problems anyway and in the late game there is a lack of incentive anyway.
This is why I decided to drop supply scaling. In order to reduce passenger numbers I implemented "external ratings" instead. This makes station ratings drop not only for the amount of cargo waiting at the same station but also for the amounts of cargo from that station waiting at any other. So if insane amounts of cargo are piling up at a transfer station those stations where it's from will generate less. This will make the stream of new cargo arriving there dry up. I have the impression that it works fairly OK. Please try it and post saves of where it doesn't.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Is the raiting shown on the station in the station window this "external rating"?
Re: Cargo Distribution
Yes, it's the station rating. As you might have noticed the rating at some station, let's call it A, drops if you have a lot of cargo waiting at A. With the "external rating" feature this is extended so that the rating at A also drops if a lot of cargo from A is waiting at another station. So this is not a new kind of rating, but only a new feature for the existing station rating.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Is there a current-ish build of this anywhere?
The last build of cargodest with improved timetables misses out too many new features I can't live without
The current trunk misses out cargod*st and improved timetables
I need a cargo-packet-distribution fix! And if someone can build me a copy with ITiM and cargodist, I'll give you £50
The last build of cargodest with improved timetables misses out too many new features I can't live without
The current trunk misses out cargod*st and improved timetables
I need a cargo-packet-distribution fix! And if someone can build me a copy with ITiM and cargodist, I'll give you £50
Jon
-
- Engineer
- Posts: 72
- Joined: 11 Feb 2007 21:10
- Location: Rotterdam, Netherlands
Re: Cargo Distribution
You might want to look for chill's patch pack.audigex wrote:
I need a cargo-packet-distribution fix! And if someone can build me a copy with ITiM and cargodist, I'll give you £50
http://www.tt-forums.net/viewtopic.php?f=33&t=47622
Re: Cargo Distribution
If I have a couple of minutes this evening I'll make you a build (if Win32 works for you). I can merge you improved timetables, as that's just one command and usually applies without conflicts...
Re: Cargo Distribution
From the first post in this thread it looks like the coding is nearly complete, is this the case? Are there any significant issues or is it all coming together nicely?
Re: Cargo Distribution
There's three things I still have on my to-do-list:
- documentation and coding style. I'm done with that on roughly half of the code.
- optimize the smallmap's link graph mode. It's way too slow.
- provide a way to calculate everything in the main thread and still not hang the main thread for extended periods of time. The main thread will call a function LinkGraph::Step in each tick and the link graph components will tell how many steps they need to complete the calculation. I think the devs absolutely don't like my usage of threads so I have to provide another way of doing it if I want cargodist to be merged.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Sounds good, but quite a bit of work then? Do the hangs make desynchs at the moment?
Re: Cargo Distribution
No, the hangs only occur if you switch off threads and they are most likely not the cause of desyncs. If you have any information about the remaining desyncs - how to trigger them, savegames which have desynced, description of what you were doing when a desync happened, dmp_cmd saves or basically anything that might be interesting - please do post it. I have currently no idea what caused the single desync in the last "wasteland" game and that's bad.
Check what version you are running before posting, though. This one is known to desync a lot and I don't need further reports for it. Most of those desyncs are fixed in this one, but at least one is still there. I'm very much interested in reports about it.
And if you experience hangs while threads are on I'm interested in that, too (but please no Cindini or other games of similarly insane dimensions - those are expected to hang and we have talked about possible solutions earlier).
Check what version you are running before posting, though. This one is known to desync a lot and I don't need further reports for it. Most of those desyncs are fixed in this one, but at least one is still there. I'm very much interested in reports about it.
And if you experience hangs while threads are on I'm interested in that, too (but please no Cindini or other games of similarly insane dimensions - those are expected to hang and we have talked about possible solutions earlier).
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Cool, I will let you know if anything turns up!
Re: Cargo Distribution
Just a thought I had - instead of a fixed "via" for every single passenger, why not allow a "via x OR y" for routes with a similar cost?
ie I have a route where my trains alternate between two similar routes. With the current system it waits until one route is very saturated before using the other, but it would be reasonable for passengers to get the local train for parts of the route, since it only stops at one extra station and barely takes any longer.
I'm presuming it would be extra work, and the patch works fine without it - it might be nice as a wishlist feature though?
ie I have a route where my trains alternate between two similar routes. With the current system it waits until one route is very saturated before using the other, but it would be reasonable for passengers to get the local train for parts of the route, since it only stops at one extra station and barely takes any longer.
I'm presuming it would be extra work, and the patch works fine without it - it might be nice as a wishlist feature though?

Jon
Re: Cargo Distribution
there is a setting how saturated a line should be before considering alternate routes
Re: Cargo Distribution
Would someone PLEASE explain, in Plain English, how the "symmetric" and "asymmetric" modes of CargoDist works?!? So that a common man could easily understand? Maybe a little strategy?
Re: Cargo Distribution
use "symmetric" for cargo that goes (roughly) balanced in two directions, e.g. passengers, mail, valuables.
use "asymmetric" for cargo that only travels one way. e.g. raw materials to a factory, or goods from factory to town.
use "asymmetric" for cargo that only travels one way. e.g. raw materials to a factory, or goods from factory to town.
Who is online
Users browsing this forum: No registered users and 13 guests