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
SpComb
Tycoon
Tycoon
Posts: 1109
Joined: 13 Nov 2003 20:26
Location: Finland
Contact:

Re: Cargo Distribution

Post by SpComb »

kucir wrote:hi anybody :-)
what about binnary with cargodest and infrastructure sharing (http://www.tt-forums.net/viewtopic.php?f=33&t=42254) for win32 (and maybe linux for server)? must i compile it by myself? (it is not so easy for me) :bow:

edit: later i found one try at http://new.tt-forums.net/viewtopic.php? ... s&start=20
i hope it is more stable than they said
Cargodest, cargodist, in either case you don't want a build from May.

You won't find a combined build in this topic, but cargodist + IS2 works fine (one trivial merge), apart from the minimap link graph only showing nodes/links for your own company (.patch for fix) - see screenshots.
jungle
Engineer
Engineer
Posts: 76
Joined: 17 Dec 2004 23:40
Location: UK

Re: Cargo Distribution

Post by jungle »

bokkie wrote:2) The to-do list includes a plan to increase the number of created passengers when more destinations can be reached. This isn't what you mean. What you want, isn't that already implemented? More people travel via the station with more destinations simply because people wanting to those destinations, pass the major hub.
I think the issue is that the number of passengers generated at a station is not proportional to the number of places they can go. The passenger numbers are actually always the same, but are divided down by however many destinations there are available - so if you make two destinations available from the same station, the number of passengers generated per line decreases by half (although it's true there is some compensation in through traffic).

For example, if you build a train route between two large towns, you'll get the full (huge!) number of passengers generated there initially deciding to go to the other town. You might expect that if you build a bus network linking other parts of town to your stations, you'll then get additional passengers on the train - but you don't, at least not in all situations. The current setup means instead you often lose passengers on the profitable route, because they now have a choice of destinations and decide to loop around the town's bus routes instead.

Much more seriously, this issue also potentially affects multiplayer games - a 'troll' in a server game could set up several bus stops to nowhere right next to your intercity railway station. Passengers would happily choose the bus routes over the intercity station, because station ratings come only from frequency of service, not from whether those services go anywhere useful - if the troll made nine bus stops in the catchment of the intercity train station, the real station would easily lose 90% of its passengers!

If you make station ratings (i.e. passenger generation) roughly proportional to the % of destinations the station serves (or similar), these problems vanish. This could also potentially reduce the current capacity problems caused by having insane passenger numbers on links early in the game.
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

xZise: I think your crashes are due to http://bugs.openttd.org/task/3445 as they contain the exact same backtrace. Maybe you can add some information to that task. For example we're wondering if the server or the client crashes (or both).
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 »

How long will it take to implement such a feature? And when done, will it be compatible with my currently up-to-date savegame? I know that you don't maintain compatibility but I can live in hope :).
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Hello, fonso

About GIT, do I really need to do the "git checkout origin/cargodist" command even when the directory is on the cargodist branch?
Attachments
git_checkout.png
git_checkout.png (1.79 KiB) Viewed 3434 times
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

I don't quite know what you are doing there. However, you can make a local branch that tracks the remote branch.

Code: Select all

git checkout -b cargodist origin/cargodist
Then you have your own branch named "cargodist" and you can do "git pull" afterwards to pull changes from origin/cargodist. No need to do an additional checkout then.
The guy on the picture is not me, it's Alonso.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Cargo Distribution

Post by NekoMaster »

Whats an advantage of using git over traditional means?
Image Proud Canadian Image
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!
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Traditional means:
  1. Download the patch file
  2. Download the source
  3. Patch the source
  4. Compile
Git:
  1. Download fonso's CargoDist repo
  2. Compile
Also, you don't have to worry about having left-over source files, you can just do "git pull" to update the entire repo, and its updated (recompile).
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Cargo Distribution

Post by NekoMaster »

petert wrote:Traditional means:
  1. Download the patch file
  2. Download the source
  3. Patch the source
  4. Compile
Git:
  1. Download fonso's CargoDist repo
  2. Compile
Also, you don't have to worry about having left-over source files, you can just do "git pull" to update the entire repo, and its updated (recompile).
Ah, thats nice, so less work and time needed to get source code and patch it then compile it
Image Proud Canadian Image
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!
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Cargo Distribution

Post by Wasila »

I have a suggestion for Cargo Distribution, but I don't know how easy it would be to code:

Take the system from the stations (where you can see where people are coming from, going via and going to), and stick it into the cargo section of a train's information. So you could click on a plus next to the third carriage and it would tell you that 20 people on that carriage are going from A to C via B, and the remaining 20 are going from A to D via C.

Thanks,
Wasila
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

NekoMaster wrote:Ah, thats nice, so less work and time needed to get source code and patch it then compile it
More like, get source code, compile. No need for patching.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Hi all,
Here's another build, r18790, built with MSVC.

Disclaimer:
If CargoDist crashes, do not report it to the OpenTTD developers. Report it to this thread. When making your post about the crash, please upload the crash.dmp, crash.log, crash.sav, and crash.png (only available as of r18184, so if you are using a build older than that, don't bother). These files are vital to finding what happened during the crash. For developers, you can find the PDB file and other files at this site: http://users.tt-forums.net/petert/dev/

Peter
Attachments
g1556eca6-cargodist_win32.rar
(3.07 MiB) Downloaded 119 times
griffin71
Traffic Manager
Traffic Manager
Posts: 142
Joined: 31 Mar 2007 13:11
Location: Amsterdam

Re: Cargo Distribution

Post by griffin71 »

Hi, I think I found a flaw.

It is best explained by a series of screenshots of the station dialog.
dialog compacted (OK)
dialog compacted (OK)
Station dialog 1.jpg (12.44 KiB) Viewed 3164 times
If the passengerlist is expanded, the scrollbar should size with the number of entries if they are more than can be displayed. This does not happen.
dialog expanded (faulty)
dialog expanded (faulty)
Station dialog 2.jpg (16.25 KiB) Viewed 3164 times
As soon as the dialog is expanded, the scrollbar size is OK.
dialog expanded, thretched (OK)
dialog expanded, thretched (OK)
Station dialog 3.jpg (22.2 KiB) Viewed 3164 times
I guess it's only a matter of one window refresh in the code (after step 2).
A game worth playing is a game worth modding :-)
User avatar
fonso
President
President
Posts: 945
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

griffin71 wrote:Hi, I think I found a flaw.

It is best explained by a series of screenshots of the station dialog.

If the passengerlist is expanded, the scrollbar should size with the number of entries if they are more than can be displayed. This does not happen.

As soon as the dialog is expanded, the scrollbar size is OK.

I guess it's only a matter of one window refresh in the code (after step 2).
This only happens when paused as far as I know and it's a general flaw of the widget system. I should write a bug report for it.
The guy on the picture is not me, it's Alonso.
huldu
Engineer
Engineer
Posts: 29
Joined: 14 Nov 2009 19:45

Re: Cargo Distribution

Post by huldu »

I installed this one "g1556eca6-cargodist_win32.rar" and ran into a weird issue. When a train is in the depot and i buy a few carts, they end up below the train and i have to manually drag them up to the train. Ive never experienced this before this release. Could be something they have added?
User avatar
John
Tycoon
Tycoon
Posts: 3402
Joined: 05 May 2003 18:44
Location: Cotswolds, UK
Contact:

Re: Cargo Distribution

Post by John »

huldu wrote:I installed this one "g1556eca6-cargodist_win32.rar" and ran into a weird issue. When a train is in the depot and i buy a few carts, they end up below the train and i have to manually drag them up to the train. Ive never experienced this before this release. Could be something they have added?
Normally happens when there is more then one engine in the depot - are you sure that isn't the case?

[edit] also, if you ctrl click the first carriage you can drag the whole lot at once.
User avatar
Comm Cody
Tycoon
Tycoon
Posts: 1060
Joined: 07 Mar 2008 22:21
Location: In a galaxy far far away.

Re: Cargo Distribution

Post by Comm Cody »

Confirmed over here.
Something goes here, hell if I know.
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Cargo Distribution

Post by NekoMaster »

Same, it does the same here for me with the mentioned build
Image Proud Canadian Image
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!
Gathers
Engineer
Engineer
Posts: 44
Joined: 25 Nov 2007 13:26

Re: Cargo Distribution

Post by Gathers »

Sounds like FS#3529 - Train wagons don't automatically attach to locomotives which is marked as fixed in r18797.

If so, the bug isn't in cargodist but rather was in trunk at the time of the build. (g1556eca6-cargodist is probably based on r18790)
So after cargodist is updated to trunk things should be fine again.
Grandmaster
Engineer
Engineer
Posts: 72
Joined: 11 Feb 2007 21:10
Location: Rotterdam, Netherlands

Re: Cargo Distribution

Post by Grandmaster »

Gathers wrote:Sounds like FS#3529 - Train wagons don't automatically attach to locomotives which is marked as fixed in r18797.

If so, the bug isn't in cargodist but rather was in trunk at the time of the build. (g1556eca6-cargodist is probably based on r18790)
So after cargodist is updated to trunk things should be fine again.
It is 18790
Petert wrote:Here's another build, r18790, built with MSVC.
I will wait for the next build then.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 51 guests