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

Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Cargo Distribution

Post by Wasila »

I did it at /msys/test but I got this message:

$ patch -p1 < cargodist_r16392.diff
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj
|index c6b09aa..165eead 100644
|--- a/projects/openttd_vs80.vcproj
|+++ b/projects/openttd_vs80.vcproj
--------------------------
File to patch:
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Wasila wrote:I did it at /msys/test but I got this message ...
... which is the same as before. Show me the output of:

Code: Select all

patch -v
and

Code: Select all

ls -lisah projects
and

Code: Select all

touch projects/openttd_vs80.vcproj
The guy on the picture is not me, it's Alonso.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Cargo Distribution

Post by Wasila »

patch -v:


patch 2.5
Copyright 1988 Larry Wall
Copyright 1997 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

written by Larry Wall with lots o' patches by Paul Eggert

ls -lisah projects:
total 128k
386802 0 drwxr-xr-x 3 User Administ 0 May 23 11:50 .
383255 0 drwxr-xr-x 9 User Administ 0 May 23 11:50 ..
258821 0 drwxr-xr-x 6 User Administ 0 May 23 11:50 .svn
258888 5.0k -rw-r--r-- 1 User Administ 9.1k May 23 11:50 determineversion.vbs
258879 3.0k -rwxr-xr-x 1 User Administ 5.5k May 23 11:50 generate
258872 4.0k -rw-r--r-- 1 User Administ 7.8k May 23 11:50 generate.vbs
258875 10k -rw-r--r-- 1 User Administ 20k May 23 11:50 langs_vs80.vcproj
258880 1.0k -rw-r--r-- 1 User Administ 1.1k May 23 11:50 langs_vs80.vcproj.in
258876 10k -rw-r--r-- 1 User Administ 20k May 23 11:50 langs_vs90.vcproj
258881 1.0k -rw-r--r-- 1 User Administ 1.2k May 23 11:50 langs_vs90.vcproj.in
258877 2.5k -rw-r--r-- 1 User Administ 4.0k May 23 11:50 openttd_vs80.sln
258882 35k -rw-r--r-- 1 User Administ 68k May 23 11:50 openttd_vs80.vcproj
258884 6.5k -rw-r--r-- 1 User Administ 12k May 23 11:50 openttd_vs80.vcproj.in
258889 512 -rw-r--r-- 1 User Administ 701 May 23 11:50 openttd_vs80.vcproj.user
258878 2.5k -rw-r--r-- 1 User Administ 4.0k May 23 11:50 openttd_vs90.sln
258883 35k -rw-r--r-- 1 User Administ 68k May 23 11:50 openttd_vs90.vcproj
258885 6.5k -rw-r--r-- 1 User Administ 12k May 23 11:50 openttd_vs90.vcproj.in
258890 512 -rw-r--r-- 1 User Administ 701 May 23 11:50 openttd_vs90.vcproj.user
258873 2.0k -rw-r--r-- 1 User Administ 3.1k May 23 11:50 strgen_vs80.vcproj
258874 2.0k -rw-r--r-- 1 User Administ 3.2k May 23 11:50 strgen_vs90.vcproj
258886 512 -rw-r--r-- 1 User Administ 1016 May 23 11:50 version_vs80.vcproj
258887 1.0k -rw-r--r-- 1 User Administ 1.0k May 23 11:50 version_vs90.vcproj

touch projects/openttd_vs80.vcproj:

Nothing happens. It just lets me type in the next command.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

I can't figure it out. Perhaps it doesn't like long file names. Did a new file appear there after the "touch" command? Something like "opentt~1.vcp"? Anyway, edit the patch and remove the hunks about the project files, then try again.
The guy on the picture is not me, it's Alonso.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Cargo Distribution

Post by Wasila »

Aah, it could possibly be my fault. On the wiki page (http://wiki.openttd.org/Compiling_on_MinGW) I failed to carry out the steps:

# 7 Compiling wget
# 8 Compiling zlib
# 9 Compiling pnglib

Could that be it?
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Wasila wrote:Aah, it could possibly be my fault. On the wiki page (http://wiki.openttd.org/Compiling_on_MinGW) I failed to carry out the steps:
[...]
Could that be it?
I don't think so. For patching a file you don't need any of those. You only need the "patch" program and you seem to have that.
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 »

New version:
  • Fix: correctly count cargo at stations when displaying in the station GUI. Fixes pshemko's first problem.
  • Handle nondeterministic orders. When an order is encountered which doesn't clearly state the next stop, fall back to original routing. A nondeterministic order is one without the non-stop flag or a conditional order which can evaluate to different next stops. For example skipping a servicing order depending on the vehicle needing service doesn't change the next real stop and thus isn't really nondeterministic. Those cases are detected.
The guy on the picture is not me, it's Alonso.
User avatar
DanMacK
Tycoon
Tycoon
Posts: 3906
Joined: 27 Feb 2004 20:03
Location: Ontario, Canada
Contact:

Re: Cargo Distribution

Post by DanMacK »

Can we get an actual binary of this please? :) I tried the last one, but it didn't work for some reason and I'd really like to try this.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Cargo Distribution

Post by Wasila »

How close is this to trunk? Fonso I'll try your suggestions later, thanks.

Also as my attempts aren't really working, would it be possible to get cargodist with extra large maps?
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

I updated to trunk r16407 because FS#2913 is fixed there. And I have built a windows binary for you:

http://fickzoo.com/fonsinchen/openttd-c ... -win32.zip

It shows a strange version in the title screen. Basically it doesn't know I'm using git branches, but otherwise identifies the git version correctly. Don't worry about it.

I can also easily produce a Debian amd64 binary. If anyone is interested I'll do so, but as it's so easy to compile yourself on GNU/Linux I guess it's not needed. I could even build Mac OS X binaries, but that will be considerably more work.
The guy on the picture is not me, it's Alonso.
dasy2k1
Transport Coordinator
Transport Coordinator
Posts: 344
Joined: 20 Sep 2006 23:43
Location: UK
Contact:

Re: Cargo Distribution

Post by dasy2k1 »

I know its in the thread somwhere but have lost it in the 14 pages of posts but how do i get those neat boxes instead of numbers on the minimap and what do they mean anyway?
Luckz
Engineer
Engineer
Posts: 20
Joined: 02 Aug 2006 03:48
Location: CGN / VLN

Re: Cargo Distribution

Post by Luckz »

Can I semi-safely continue my 16284 game with 16407?
chickenbc
Engineer
Engineer
Posts: 29
Joined: 20 Jan 2008 05:30
Location: Seoul, Korea

Re: Cargo Distribution

Post by chickenbc »

I`m currently using r16284, and I got a message. Although I can play a while without clicking this meage box, evenually the game stopped.


---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Assertion failed!

Program: ...
File: c:/chiottd/itmv231/src/linkgraph/flowmapper.cpp
Line: 28

Expression: node.flows[origin][prev] == 0

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)
---------------------------
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Cargo Distribution

Post by Wasila »

Looks like I'm going to have to abandon my world map game - it probably wouldn't have worked anyway. Thanks for the binary!

Also I meant are the admins close to putting this into trunk?
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Boxes instead of numbers can be toggled with the "show town names" button. Its the lower leftmost one of the buttons in the lower right of the smallmap. The boxes show the available capacity (white), the cargo actually transported along the link (grey), the planned cargo flow through the link (red) and the amount of cargo that has been explicitly sent (but has not necessarily arrived at the other end) along the link (yellow).

Old savegames are not supported, except if incidentally the savegame format hasn't changed. Since r16284 the savegame format has changed at least twice. I won't maintain backwards compatibility to old versions of cargodist as the code I'd write for that would need to be thrown away when merging with trunk. The merge with trunk is probably far away. My current plan looks like this:

1. Find the remaining crashes, if any.
2. Finish and improve the GUI. This is hard for me, as I'm not used to writing GUIs.
3. Fix the coding style (a lot of stupid work).
4. Find a dev to review all the code. Considering my adventures with diagonal levelling which is about 5% the size of this project, I don't have a lot of hope here.

So, concluding: I will need to maintain cargodist independently for at least some more months. Don't get your hopes up.
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 »

chickenbc wrote:I`m currently using r16284, and I got a message. Although I can play a while without clicking this meage box, evenually the game stopped.
...
The assertion you encounter won't be hit in newer versions. Please update.
The guy on the picture is not me, it's Alonso.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Cargo Distribution

Post by Wasila »

What do the graphs/numbers actually mean?

EDIT: I don't know if this has been reported, but cargodist doesn't like AdmiralAI.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

Numbers, coloured boxes and their meanings are explained in the wiki page:

http://wiki.openttd.org/Passenger_and_c ... stribution

i have clarified it a little in this respect.
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 »

Wasila wrote: EDIT: I don't know if this has been reported, but cargodist doesn't like AdmiralAI.
Can you elaborate a bit on this? For me it works fine. Of course AdmiralAI (like any AI) doesn't know what's going on with all the cargo showing up in unexpected places, but it still manages to turn a profit.
The guy on the picture is not me, it's Alonso.
kvtb
Engineer
Engineer
Posts: 70
Joined: 13 Mar 2005 11:42

Re: Cargo Distribution

Post by kvtb »

what is currently missing, is when I click on a train, to view its cargo, is the grouping of passengers by destination.
Cargodest had something like that, if I remember correctly.
Grouping by destionation means that per destination, the number of passengers is shown.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 17 guests