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
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

The guy on the picture is not me, it's Alonso.
GTwice
Engineer
Engineer
Posts: 1
Joined: 04 Sep 2010 17:26
Location: poland

Re: Cargo Distribution

Post 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.
User avatar
trainmaster611
Traffic Manager
Traffic Manager
Posts: 222
Joined: 21 Dec 2007 16:33

Re: Cargo Distribution

Post by trainmaster611 »

fonso wrote:The Wiki page for cargodist is http://wiki.openttd.org/Cargodist , not http://wiki.openttd.org/Cargodest
Ok, wow I feel like an idiot. I'll read over that page then.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2867
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Cargo Distribution

Post 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. ;)
Attachments
crash_backtrace_prozone13_sav_r20756.txt
(5.12 KiB) Downloaded 84 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Cargo Distribution

Post 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
Vitus
Traffic Manager
Traffic Manager
Posts: 157
Joined: 11 Mar 2009 15:15

Re: Cargo Distribution

Post by Vitus »

Get latest version of CargoDist from this repository and compile it :)
Image
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2867
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Cargo Distribution

Post 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.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Cargo Distribution

Post 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?
id10terror
Engineer
Engineer
Posts: 56
Joined: 03 Jul 2009 02:16

Re: Cargo Distribution

Post 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.
AppeL
Engineer
Engineer
Posts: 31
Joined: 30 Jul 2010 22:05

Re: Cargo Distribution

Post 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?
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post 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.
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 »

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.
The guy on the picture is not me, it's Alonso.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2867
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Cargo Distribution

Post 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. :)
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
WWW
President
President
Posts: 920
Joined: 28 Jan 2005 20:37

Re: Cargo Distribution

Post 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!
Morgsie
Engineer
Engineer
Posts: 86
Joined: 17 Jan 2009 22:27
Location: Keele UK

Re: Cargo Distribution

Post by Morgsie »

I have OTTD v1.0.3 How do I get this?
User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: Cargo Distribution

Post by ostlandr »

Either compile it yourself, or the latest binary is on page 93 of this thread.
Who is John Galt?
Morgsie
Engineer
Engineer
Posts: 86
Joined: 17 Jan 2009 22:27
Location: Keele UK

Re: Cargo Distribution

Post 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.
id10terror
Engineer
Engineer
Posts: 56
Joined: 03 Jul 2009 02:16

Re: Cargo Distribution

Post 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)
Last edited by id10terror on 12 Sep 2010 15:25, edited 4 times in total.
Morgsie
Engineer
Engineer
Posts: 86
Joined: 17 Jan 2009 22:27
Location: Keele UK

Re: Cargo Distribution

Post by Morgsie »

Which file do I download?
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: Cargo Distribution

Post 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.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 6 guests