Cargo Distribution
Moderator: OpenTTD Developers
Re: Cargo Distribution
hi, i have one question: how to set link graph setting in order to ensure that most of generated passenger destinations will be near the starting station (regional or even within city in case of big cities (2000+ in my games)). is it somehow possible? it's very hard to transport all passengers by long-distance trains or planes in late years of game. thank you in advance
Re: Cargo Distribution
Im having problems with the tourist cargo flows,
Tourists will only go to the tourist centers (newgrf) if thats the only destination for their source,
and for some reason cargodist isnt tiggered.
if i were to have 2 possable destinations, one of them another city area all the toursists will travel between the citys totally ingnoring the centre
im not sure how demand is worked out for delivery to an industry with other cargos but surely if the watch tower staton accepts tourists there should be cargo generated
Tourists will only go to the tourist centers (newgrf) if thats the only destination for their source,
and for some reason cargodist isnt tiggered.
if i were to have 2 possable destinations, one of them another city area all the toursists will travel between the citys totally ingnoring the centre
im not sure how demand is worked out for delivery to an industry with other cargos but surely if the watch tower staton accepts tourists there should be cargo generated
- Attachments
-
- screenshot showing newgrfs etc
- Wehill Transport, 3rd Nov 1928.png (74.32 KiB) Viewed 1107 times
-
- Wehill Transport, 3rd Nov 1928.sav
- (172.61 KiB) Downloaded 77 times
- bluebottle
- Engineer
- Posts: 29
- Joined: 21 Sep 2009 03:23
Re: Cargo Distribution
Yes, it looks that way. I didn't know exactly what had caused it (the zero cost) when I reported the bug, and I was thrown off by the aircraft fleet window showing all aircraft still with positive income. I'll try a git build since I can't use a Windows binary.huss wrote:That sounds exactly like the problem I had, which I reported to fonso and (according to him and as far as I can tell) has been fixed since then. Have you tried the latest version or the binary supplied by id10terror?bluebottle wrote:a sudden, massive negative income on my aircraft
Re: Cargo Distribution
I'm having a small issue with id10terror's binary. It appears that when passengers interchange at a station (e.g bus -> train, or train -> another train) they simply disappear. For example, at station A there are 10 passengers that want to get to C. To do so, they take a train from A to B, then switch onto another train from B to C. However, when they arrive at B, the train unloads and gets income, no transfer income appears and no passengers appear at the station. Also, at stations where passengers are not accepted, they will not switch, instead they remain on the vehicle.
I'm not sure why this is happening, i've not come across this in any previous builds. I have attached my savegame. If anyone can offer any insight as to why this happens, it would be appreciated.
NewGRFs used in the save game are eGRVTS1.0, UK Renewal Trainset 3.04, UK Renewal Addons 3.04 and Very large ships 0.1.
Many thanks.
Edit: The only vehicles that seems to get transfer income are the planes, i've never seen any trains or buses get transfer income in this build.
I'm not sure why this is happening, i've not come across this in any previous builds. I have attached my savegame. If anyone can offer any insight as to why this happens, it would be appreciated.
NewGRFs used in the save game are eGRVTS1.0, UK Renewal Trainset 3.04, UK Renewal Addons 3.04 and Very large ships 0.1.
Many thanks.
Edit: The only vehicles that seems to get transfer income are the planes, i've never seen any trains or buses get transfer income in this build.
- Attachments
-
- GB Rail Services, 31st Aug 2044.sav
- (2.05 MiB) Downloaded 61 times
Re: Cargo Distribution
I'm back. I'll take care of the various reports in the next days. I already have a nice idea on how to get rid of the remaining desyncs. That will be done first.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
can you give us a couple of .diffs and the versions they're against, please?
Re: Cargo Distribution
I'll give you a new release when the known problems are solved. These are:WWW wrote:can you give us a couple of .diffs and the versions they're against, please?
- desync because of multimap
- possibly still massive negative income (huss, bluebottle)
- possibly tourists can't be defined as symmetric cargo (dasy2k1) - they should be "EXPRESS", but maybe they aren't.
- possibly influence of distance on demand can only be decreased, not increased (zde-nek)
- unknown problem reported by KingJ - maybe he's missing the "non-stop"
- maybe other problems earlier in the thread I can't remember at the moment.
- Attachments
-
- cargodist_r17641.diff
- patch
- (289.87 KiB) Downloaded 86 times
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Here´s latest compiled win32 build of cargodist. Compiled using MSVS08 + DirectX SDK (with working sound).
- Attachments
-
- CargoDist r17641.rar
- cargodist r17641 win32
- (3 MiB) Downloaded 111 times
-
- Engineer
- Posts: 10
- Joined: 29 May 2005 03:30
Re: Cargo Distribution
Hi, I just tried new win32 build (r17641). And i am getting this error when to goto some road depots.
Assertion failed at line 43 of c:\17641\sre\core/pool_type.hpp:index <this->first_unuesd.
Assertion failed at line 43 of c:\17641\sre\core/pool_type.hpp:index <this->first_unuesd.
- Attachments
-
- Kentown Transport, 3rd Feb 1950.sav
- (394.47 KiB) Downloaded 82 times
-
- Kentown Transport, 6th Jan 1950.png (167.8 KiB) Viewed 1010 times
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: Cargo Distribution
did you have any ai's on?philipabbott wrote:Hi, I just tried new win32 build (r17641). And i am getting this error when to goto some road depots.
Assertion failed at line 43 of c:\17641\sre\core/pool_type.hpp:index <this->first_unuesd.


Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
-
- Engineer
- Posts: 10
- Joined: 29 May 2005 03:30
Re: Cargo Distribution
Yes, I had TownCars running
Re: Cargo Distribution
This savegame is inconsistent. The depot IDs in the map array don't correspond to the actual depots. What is the history of that game? With which revisions of cargodist and possibly other patches did you play it? And can you post earlier saves of it? It would be nice to find the last save where the depots are correct, the first one where they are broken and the trunk and patch versions you created the broken one with.philipabbott wrote:Hi, I just tried new win32 build (r17641). And i am getting this error when to goto some road depots.
Assertion failed at line 43 of c:\17641\sre\core/pool_type.hpp:index <this->first_unuesd.
The guy on the picture is not me, it's Alonso.
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: Cargo Distribution
Thats why, the last few nightlies (fixed yesterday) had a problem with loading ai's, openttd would crash when they loaded up and started a new companyphilipabbott wrote:Yes, I had TownCars running


Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Re: Cargo Distribution
Are you sure? I guess you mean this one:NekoMaster wrote:Thats why, the last few nightlies (fixed yesterday) had a problem with loading ai's, openttd would crash when they loaded up and started a new companyphilipabbott wrote:Yes, I had TownCars running
Code: Select all
git diff 200a83d033f2248c71412ba0fb71bab74e59f99b 3bcec1e93165f72eb1859454facdef505ff33232
diff --git a/src/table/settings.h b/src/table/settings.h
index 1bdb6f5..0fee7ef 100644
--- a/src/table/settings.h
+++ b/src/table/settings.h
@@ -83,7 +83,7 @@ static bool UpdateClientConfigValues(int32 p1);
*/
#define NSD_GENERAL(name, def, cmd, guiflags, min, max, interval, many, str, proc, load)\
- {name, (const void*)(def), {(byte)cmd}, {(byte)guiflags}, min, max, interval, many, str, proc, load}
+ {name, (const void*)(def), {(byte)cmd}, {(uint16)guiflags}, min, max, interval, many, str, proc, load}
/* Macros for various objects to go in the configuration file.
* This section is for global variables */
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
The effect of distance on demands actually couldn't be increased beyond 100% and the implementation for <100% had some serious bugs, too. A fix is in my git repository. You can have up to 255% now. Higher values create numeric instability if you have a high accuracy, so I didn't allow them. If that's not enough for you, post a savegame and I'll further tune the algorithm.zde-nek wrote:hi, i have one question: how to set link graph setting in order to ensure that most of generated passenger destinations will be near the starting station (regional or even within city in case of big cities (2000+ in my games)). is it somehow possible? it's very hard to transport all passengers by long-distance trains or planes in late years of game. thank you in advance
Also I have fixed the desync by implementing my own multimap which guarantees a deterministic order for elements with the same key. It should now work with any combinations of standard C++ libs.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
There is another speed optimization in my git repository. You can see this as a new iteration of FS#3133. I believe the cargo loading is faster than in trunk now. I have tried with a game that took about 4 seconds per game day with trunk and it takes the usual 2.5 seconds with cargodist now.
This is mostly because I've gotten rid of all the looping over cargo lists except for cargo aging and I've found a more intelligent strategy for finding and merging packets from the same source. I have indexed the vehicle cargo lists so that packets can be merged in logarithmic time (thus producing fewer packets in vehicles and speeding up AgeCargo). In vehicles the FIFO principle isn't as important as in stations, so this can be done without causing strange side effects. In turn I have removed the search for mergeable packets in station cargo lists as this is very expensive and actually breaks the FIFO principle. Instead I only check the very last packet in the list of packets with the same destination for merging now. This packet is merged in many cases anyway as often multiple similar packets are generated or unloaded (and appended to the list) in succession. For generated cargo the algorithm in trunk loops over all of the cargo in a station to find the very last packet in this case. In large stations with lots of cargo throughput this is horribly expensive.
I'll happily create an equivalent patch for trunk with these improvements, but first FS#3135 (see branch "cargolist" in my git repository for more recent versions) has to be merged as all this builds on it.
Unfortunately the changes break savegame compatibility with earlier versions of cargodist again. I have removed the "next" field from CargoPacket which is unnecessary as the multimap already holds it. Sorry.
This is mostly because I've gotten rid of all the looping over cargo lists except for cargo aging and I've found a more intelligent strategy for finding and merging packets from the same source. I have indexed the vehicle cargo lists so that packets can be merged in logarithmic time (thus producing fewer packets in vehicles and speeding up AgeCargo). In vehicles the FIFO principle isn't as important as in stations, so this can be done without causing strange side effects. In turn I have removed the search for mergeable packets in station cargo lists as this is very expensive and actually breaks the FIFO principle. Instead I only check the very last packet in the list of packets with the same destination for merging now. This packet is merged in many cases anyway as often multiple similar packets are generated or unloaded (and appended to the list) in succession. For generated cargo the algorithm in trunk loops over all of the cargo in a station to find the very last packet in this case. In large stations with lots of cargo throughput this is horribly expensive.
I'll happily create an equivalent patch for trunk with these improvements, but first FS#3135 (see branch "cargolist" in my git repository for more recent versions) has to be merged as all this builds on it.
Unfortunately the changes break savegame compatibility with earlier versions of cargodist again. I have removed the "next" field from CargoPacket which is unnecessary as the multimap already holds it. Sorry.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
I don't quite know if I understood your question. But the obvious problem with this savegame is that the link between Wehill and Wehill Woods is always breaking down. Either have more vehicles serve it to keep it alive while the cargo distribution is calculated, or increase your moving average (mind the side effects), or live with tourists going to "any station".dasy2k1 wrote:Im having problems with the tourist cargo flows,
Tourists will only go to the tourist centers (newgrf) if thats the only destination for their source,
and for some reason cargodist isnt tiggered.
if i were to have 2 possable destinations, one of them another city area all the toursists will travel between the citys totally ingnoring the centre
im not sure how demand is worked out for delivery to an industry with other cargos but surely if the watch tower staton accepts tourists there should be cargo generated
I don't quite get that either. I see a lot of transfer income there. Maybe you should name the stations where the problems occur in the savegame. An obvious problem in your game is that you don't use "non-stop" with most of your orders. We have discussed that multiple times here ...KingJ wrote:I'm having a small issue with id10terror's binary. It appears that when passengers interchange at a station (e.g bus -> train, or train -> another train) they simply disappear. For example, at station A there are 10 passengers that want to get to C. To do so, they take a train from A to B, then switch onto another train from B to C. However, when they arrive at B, the train unloads and gets income, no transfer income appears and no passengers appear at the station. Also, at stations where passengers are not accepted, they will not switch, instead they remain on the vehicle.
I'm not sure why this is happening, i've not come across this in any previous builds. I have attached my savegame. If anyone can offer any insight as to why this happens, it would be appreciated.
NewGRFs used in the save game are eGRVTS1.0, UK Renewal Trainset 3.04, UK Renewal Addons 3.04 and Very large ships 0.1.
Many thanks.
Edit: The only vehicles that seems to get transfer income are the planes, i've never seen any trains or buses get transfer income in this build.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Thanks for the ongoing work fonso, looking forward to a new release.
I'm experiencing regular crashes in my r17268 cargodist precompiled win32-binary found earlier in this thread. Would it still be helpful to post the crash dump and save?
I'm experiencing regular crashes in my r17268 cargodist precompiled win32-binary found earlier in this thread. Would it still be helpful to post the crash dump and save?
Re: Cargo Distribution
That would be nice if you have them. I still cannot reproduce that crash. However, I thought that binary didn't generate crash saves and dumps ...tsjook wrote:Thanks for the ongoing work fonso, looking forward to a new release.
I'm experiencing regular crashes in my r17268 cargodist precompiled win32-binary found earlier in this thread. Would it still be helpful to post the crash dump and save?
Has anyone seen crashes in more recent versions? (except for philippabbott's broken savegame)
I'll probably release a new version with patch and updated documentation and the likes on monday.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Ok, here goes.
(I always wondered why those crash saves are so small compared to normal savegames, because if you load them nothing seems to be missing)
(I always wondered why those crash saves are so small compared to normal savegames, because if you load them nothing seems to be missing)
- Attachments
-
- Crash r17268-prebuilt-Win32.rar
- (257.85 KiB) Downloaded 87 times
Who is online
Users browsing this forum: No registered users and 7 guests