Page 94 of 154
Re: Cargo Distribution
Posted: 30 Aug 2010 12:13
by fonso
Re: Cargo Distribution
Posted: 04 Sep 2010 17:39
by GTwice
I've just downloaded it earlier today and I am shocked - that's exactly what I've been missing in OpenTTD for quite a long time. With the PBS it makes the most realistic rail behavior I could imagine. Keep up the good work (although I can't possibly tell what's there to work on - worked perfectly for me all day). It should become a crucial part of the game. I'm truly amazed, great thanks.
Re: Cargo Distribution
Posted: 06 Sep 2010 04:00
by trainmaster611
Ok, wow I feel like an idiot. I'll read over that page then.
Re: Cargo Distribution
Posted: 06 Sep 2010 17:36
by ChillCore
Hello fonso,
I was testing a few random savegames and one of them crashed.
Code: Select all
Crash reason:
Signal: Aborted (6)
Message: Assertion failed at line 3338 of ~/src/station_cmd.cpp: st->index != next_station_id && next != NULL
Crashing savegame is ProZoneGame_13_Final.sav which can be found on the coopserver. (Just ask if you need the link.)
Attached is the backtrace from my debug build.
Tested with r20756 and all GRFs present. (I noticed it before but I rebuild as I saw you had a new version up.)
Otherwise the patch runs great.

Re: Cargo Distribution
Posted: 06 Sep 2010 19:46
by Wasila
Glad to see this is still being worked on! Could we please have the latest .diff? The last one I could find is a month old and I thought there might be some changes by now.
Thanks,
Wasila
Re: Cargo Distribution
Posted: 06 Sep 2010 20:08
by Vitus
Get latest version of CargoDist from
this repository and compile it

Re: Cargo Distribution
Posted: 06 Sep 2010 20:11
by ChillCore
There are links in the first post Wasila.
Search for "here" and "here". The link second tells you what revision you need.
This link can be found on the wiki page:
http://github.com/fonsinchen/openttd-ca ... es/current
Also fonso updates more than once a month. At least every time trunk bumps savegame or if there is a conflict that is solved.
He just does not post about it every time he updates.
Re: Cargo Distribution
Posted: 07 Sep 2010 07:07
by Wasila
Oh, I didn't see those. For the patch page, do I just copy/paste the text into a .diff file?
Also does this mean that CargoDist is feature complete? If so, how about trunk inclusion?
Re: Cargo Distribution
Posted: 07 Sep 2010 07:40
by id10terror
Just in case......
fonso wrote:
Of course, with git you can also pull the milestones one by one and examine each step independently. This might be nice if you're reviewing the code.
I have my own patch generation system based on git which produces patches of each commit in a separate branch "patches". In particular you can always download a patch against a recent trunk version
here. The trunk version the patch applies to is always recorded
here.
When playing with cargodist please use non-stop orders for trains and road vehicles. Orders without the non-stop flag are nonderministic and cargodist won't do what you expect with them. You can make non-stop the default for new orders in the advanced settings.
Re: Cargo Distribution
Posted: 07 Sep 2010 16:17
by AppeL
i have a question..
if i have two towns which are quite far away from each other and there are several routes to the other town, how do passengers decide which route to take.. like if i have a direct train line, another train line going also direct but stopping at cities in between.. then i have an airport near those two cities... you would think people would use the aircraft, but then if there is not enough capacity on the planes.. or do people use the aircraft at all if there is a train whose next destination is that other city? do they just go by that? and if that train is full would people use the stopping train or would they only use the direct train?
or would passengers use all of the above and if so, which one would be the most popular?
how does it work?
Re: Cargo Distribution
Posted: 07 Sep 2010 17:34
by fonso
OK, easy questions first ...
AppeL wrote:i have a question..
if i have two towns which are quite far away from each other and there are several routes to the other town, how do passengers decide which route to take.. like if i have a direct train line, another train line going also direct but stopping at cities in between.. then i have an airport near those two cities... you would think people would use the aircraft, but then if there is not enough capacity on the planes.. or do people use the aircraft at all if there is a train whose next destination is that other city? do they just go by that? and if that train is full would people use the stopping train or would they only use the direct train?
or would passengers use all of the above and if so, which one would be the most popular?
how does it work?
CargoDist balances cargo across parallel routes. It prefers
1. short routes as in least manhattan distance between subsequent stops and few stops.
2. routes with a lot of capacity.
We have discussed the algorithm in great length before in this thread, though.
Wasila wrote:Oh, I didn't see those. For the patch page, do I just copy/paste the text into a .diff file?
The file is called "cd.diff". If you get something else when downloading it, you're doing something wrong.
Wasila wrote:Also does this mean that CargoDist is feature complete? If so, how about trunk inclusion?
I think it's feature complete, but the devs don't like some of the features. Also it's not completely coding styled and documented. I've been a bit slow with that lately.
WWW wrote:I don't know if it's you or me, but; MSVC 2010: ...
Have you tried to clean and rebuild? Maybe there are some artifacts.
Re: Cargo Distribution
Posted: 07 Sep 2010 18:03
by fonso
ChillCore wrote:I was testing a few random savegames and one of them crashed.
Thanks a lot for the report. I've fixed the problem.
Also the project files for MSVC 2010 were broken. WWW was going to report it but deleted his post while I was replying ... I've still fixed it. Remember: For each bug you don't report god kills a kitten.
Re: Cargo Distribution
Posted: 08 Sep 2010 00:07
by ChillCore
fonso wrote:
Thanks a lot for the report. I've fixed the problem.
No problemo. Fix confirmed.
Thank you for the quick fix as usual.
I'll try to crash it again, in some other way, as usual too.
Hopefully soon I will no longer be able to do so.

Re: Cargo Distribution
Posted: 12 Sep 2010 01:30
by WWW
fonso wrote:
Also the project files for MSVC 2010 were broken. WWW was going to report it but deleted his post while I was replying ... I've still fixed it. Remember: For each bug you don't report god kills a kitten.
Uh, yeah, my bad. I just assumed it was my quirky system. I've been running some AI games on the latest version, and most AIs actually function perfectly under cargodist.
Fonso, you're beyond godly when it comes to keeping this project current and up-to-date. Keep at it!
Re: Cargo Distribution
Posted: 12 Sep 2010 14:36
by Morgsie
I have OTTD v1.0.3 How do I get this?
Re: Cargo Distribution
Posted: 12 Sep 2010 14:41
by ostlandr
Either compile it yourself, or the latest binary is on page 93 of this thread.
Re: Cargo Distribution
Posted: 12 Sep 2010 14:46
by Morgsie
I have looked on page 93 and cannot find anything. Where can I download this from?
I have been going in circles trying to find this and I cannot find it.
Re: Cargo Distribution
Posted: 12 Sep 2010 15:02
by id10terror
Page 92,
http://www.tt-forums.net/viewtopic.php?p=896562#p896562
1.st edit the common file and then the file for your 'platform' if unsure just get the 32bit one
2.nd edit please notice im editing my last post.........
3.rd edit considered 3rd possibility, he notices and is busy playing cargodist

4.th edit considered 4th possibility, corrected the name used in the third edit (by using an i instead of e)
Re: Cargo Distribution
Posted: 12 Sep 2010 15:03
by Morgsie
Which file do I download?
Re: Cargo Distribution
Posted: 12 Sep 2010 15:17
by Arie-
Hello Morgsie, find Google and search for compiling because that's what you need if you want to insert this functionality in OpenTTD. As I told you here:
http://www.tt-forums.net/viewtopic.php?p=903004#p903004
There's all the information needed on patches. Really, almost everything is already there, just read and search a lot!
What you can do if you do not want to compile yourself: get a binary from this thread. That binary however, will only include CargoDist, if you want additional patches, compile yourself. Or you can take a look at the chill's patch pack, which contains several additions to the standard OpenTTD. If you don't understand something, say what you don't understand, the contents of what post and what your issue is with that content.