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

bokkie
Transport Coordinator
Transport Coordinator
Posts: 327
Joined: 19 Jan 2007 19:26

Re: Cargo Distribution

Post by bokkie »

Hamilton2007 wrote:Isn't it so that with cargodist you always end up with deleting or adding trains/vehicles constantly when you move up in the game to the later years.
Deleting doesn't happen that often, adding does happen. I tend to add more routes and connect them to each other with which no. of passengers rises (well, it doesn't rise but they travel longer).
Hamilton2007 wrote:Also the red numbers of money are weird.

I had a train line from a to b to c back to b and back to a. Then another train line from a to z. Then a bus line from z to x. At first the numbers of money of the busses where green but when the lines where excisting a while the numbers become red. Is this because the pax from b and c have to transfer to much to become to point x ??

Hope i made myself a little bit clear with my explanation :?
This has been discussed before in this thread and elsewhere. You might take a look at these threads: http://www.google.nl/search?q=negative+ ... =firefox-a
cato58 wrote:I have found using cargodist that if you have two profitable lines:
A=B=C
X=Y=Z

then if you connect A with X, very soon your stations A & X fill with passengers. This seems to be because, as an example, some B passengers who used to only go to A and C now want to go to X, Y, and Z. I have had games collapse as I spend myself into debt building trains to service A & X, while receiving lower revenues because of delivery delays.

It seems a better model would be that once the connection is made, going back to my example, that the B passengers who used to go to A & C still want to, but now there are also new passengers in station B wanting to go to X, Y and Z. In other words, the number of passengers being created also depends on the number of connections available to that station.
Revenues often aren't lower as a whole because passengers travel longer (and waiting time isn't taken into account). If you look in the first post, Fonso wants to add what you want: more connections is more passengers. I would find that a worthwile addition as well but we should be patient ;).
pavel1269 wrote:I have encountered one thing, which in my eyes is very irritating.

I made a simple network. A<->B<->C<->D<->A. |A,B| ~ 20tiles, |B,C| ~ 100tiles, |C,D| ~ 60tiles, |D,A| ~ 40tiles. People coming from from A to B used network A->D->C->B as well (2 transfers). I watched loading and buses loaded 1/3 of each. Is this wanted, I forget to set something, or just on TODO list?
This is a feature IF the short path is (almost) full. A good improvement on CargodEst if you ask me. Chillcore is right, there's a setting in which you can set how saturated the short path should be before passengers use alternatives. In your example you could change this value and see what happens, or add vehicles between A and B. Haven't used the setting myself as I prefer people to take a detour if there's enough space in the alternative to having them wait.
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Cargo Distribution

Post by pavel1269 »

Well, in my eyes, it still should be limited somehow. Taking 10x longer route instead of waiting a little more is just not a option.
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

If you want I can allow values > 100% for short path saturation. This means it will overload the shortest routes before choosing those with most capacity left. I think you're shooting your own foot there, though.
The guy on the picture is not me, it's Alonso.
ryangs
Engineer
Engineer
Posts: 19
Joined: 11 Feb 2009 11:28

Re: Cargo Distribution

Post by ryangs »

Can anyone share a Mac build? A quick search didn't show any. I'd really love to try this, but I'm not set up anymore with Xcode and all the other necessary things.
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Cargo Distribution

Post by petert »

Mac builds are rare to come across, only a few people who play OpenTTD use Macs. Check out this guide to get yourself set up again: http://wiki.openttd.org/Compiling_on_Mac
ryangs
Engineer
Engineer
Posts: 19
Joined: 11 Feb 2009 11:28

Re: Cargo Distribution

Post by ryangs »

It's less about the process and more about the several gigs of hard drive space that Xcode and all the accoutrement take up. That's a lot of space on my laptop hard drive just to compile OpenTTD. Still, if no one comes forward within a few days, desperation might set in and make me take the plunge.

Can't you compile Mac binaries on Linux?
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Cargo Distribution

Post by Rubidium »

ryangs wrote:Can't you compile Mac binaries on Linux?
You can... except it's a process that takes even longer and uses more disk space. Not to mention that it requires manual manipulation of the sources of the compiler and related tools so you can actually compile the compiler that you need to make the Mac binaries on Linux. Then you'd have to figure out how to compile the libraries OpenTTD needs and compile those.

So it's also a process, it's just that it takes more towards a week of time to do instead of the hour you need to install Xcode. Also I know of about 3 people who ever have been able to compile a cross compiler to make Mac binaries vs the thousands of people installing Xcode.

But then, I have a laptop too, so it just uses too much space for me to make that compiler. Especially because it would only be to make OpenTTD for someone else.

So why should someone go through all that hassle and spend a week on something to build OpenTTD for just you?
User avatar
Hamilton2007
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 16 Nov 2008 10:57
Location: Belgium

Re: Cargo Distribution

Post by Hamilton2007 »

I got a coal line from Holt mijnen to Gardendale Bossen. But i got no line between Gardendale Bossen to Birmingham Bossen (the yellow one). So why does the coal from Holt Mijnen want to go to Birmingham Bossen? This coal is picked up by the train at Holt Mijnen but it's not transferd at Gardendale Bossen cause the (direct) line to Birmingham Bossen does not excist.

Now is my question, do i get paid for the picked up coal from Holt Mijnen that want's to go to Birmingham Bossen?

And should i connect the line between Gardendale Bossen to Birmingham Bossen, should i remove the leave emty order on the trucks between Gardendale Bossen and Birmingham Mijnen or should i build a train line directly from Holt Mijnen to Birmingham Bossen ??
Attachments
JUL Transport, 5 Sep 1923.png
User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Cargo Distribution

Post by pavel1269 »

fonso wrote:If you want I can allow values > 100% for short path saturation. This means it will overload the shortest routes before choosing those with most capacity left.
This would be nice. Is that just a change in settings.h, or you need to change a bit more of code?

Also, I still say, some "dynamic limit" would fit there. As the capacity would be used for 81%, and then, many people will use 10 times longer route, which will cause the rest of routes will be used beyond the saturation capacity.
fonso wrote:I think you're shooting your own foot there, though.
Please, do not use some advanced english expressions pointed at me, since I hardly understand them :-)
User avatar
fonso
President
President
Posts: 948
Joined: 13 Oct 2007 08:28

Re: Cargo Distribution

Post by fonso »

"shooting your foot" means you'll getting yourself into problems out of stupidity. If you deliberately overload routes even if there are less congested alternatives this might be the case.

Hamilton2007: The planning stage doesn't respect order modifications. So it assumes the coal can get from Gardendale Bossom to Birmingham Mijnen as there is a vehicle going that way. You can either get rid of the "unload and leave empty" clause and let cargodist handle the routing or you can deliberately make a "nondeterministic" order (ie remove the "non-stop") to force the coal into the route you've chosen for it.

I recommend not using order modifications other than "full load" if you don't know what you're doing.
The guy on the picture is not me, it's Alonso.
User avatar
Hamilton2007
Transport Coordinator
Transport Coordinator
Posts: 289
Joined: 16 Nov 2008 10:57
Location: Belgium

Re: Cargo Distribution

Post by Hamilton2007 »

Wouldn't i get the red money numbers then? Cause the cargo transferd twice between the route?
Creat
Traffic Manager
Traffic Manager
Posts: 141
Joined: 26 Oct 2009 16:33

Re: Cargo Distribution

Post by Creat »

Hamilton2007 wrote:Wouldn't i get the red money numbers then? Cause the cargo transferd twice between the route?
You seem to misunderstand the reason for 'red money numbers'. First of all you'd most likely get more money for the coal, as you transport it further (even though it does take longer, but it should still be fast enough to give a higher payout). Second you'd be using capacity that would otherwise be empty (train(s) from the top station to the middle-bottom one), though you might have to add trains for the last part in case there isn't enough capacity to handle the additional load.
To understand where red numbers are coming from you can read about it earlier in this post or other posts in the forum dedicated to that question (see google-link in bokkie's long reply post above for that), here just a short and simplified version: If you transport cargo and transfer it between trains (or road vehicles, planes), every vehicle is paid 'in advance' for it's own part. This payment depends primarily on the time it took and the distance. The actual payment (which is what your cargo is really worth on delivery) is made when the cargo is finally delivered. OpenTTD needs to compensate here in case previous vehicles were already paid more than that value, so you would see a red number. But all in all you still profit from transporting the cargo! The most likely reason for a red number is that the last part of the journey goes 'backwards' taking it closer to it's origin (reducing the distance traveled compared to the previous stop), or takes an disproportionate amount of time. Both are likely with buses acting as feeders/distributors for train hubs (for example), but won't apply in your case.
thys
Engineer
Engineer
Posts: 2
Joined: 30 Mar 2009 15:23

Re: Cargo Distribution

Post by thys »

ryangs wrote:Can anyone share a Mac build? A quick search didn't show any. I'd really love to try this, but I'm not set up anymore with Xcode and all the other necessary things.
Here you go, file is too large to attach to this post:
http://rapidshare.com/files/324972509/O ... t.zip.html
junho2813
Engineer
Engineer
Posts: 14
Joined: 12 Feb 2007 02:15

Re: Cargo Distribution

Post by junho2813 »

Hmm..... I am wondering when this patch will be included in the trunk and main openttd.
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 »

junho2813 wrote:Hmm..... I am wondering when this patch will be included in the trunk and main openttd.
bah! someone alredy asked a question like that and the awnser is, this patch still isn't done, its not 100% stable to put into nightlies or stable releases.
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 »

Hello all,
First of all, Merry Christmas! I hope you all have fun. I present to you a new binary of CargoDist, built on the usual MSVC for win32.

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. Also note that the PDB file attached is not needed when testing CargoDist, it is mainly for developers.

Peter
Attachments
cargodist_win32_r18625.rar
(3.37 MiB) Downloaded 131 times
cargodist_PDB_win32_r18625.rar
(2.79 MiB) Downloaded 73 times
cargodist_r18625.diff
(231.67 KiB) Downloaded 79 times
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:Hello all,
First of all, Merry Christmas! I hope you all have fun. I present to you a new binary of CargoDist, built on the usual MSVC for win32.

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. Also note that the PDB file attached is not needed when testing CargoDist, it is mainly for developers.

Peter
Hey PeterT, could you make another build with the pevious used patches from the last build if possible?
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 »

Yes, check out this new topic for which I post binaries specifically for that: http://www.tt-forums.net/viewtopic.php?f=33&t=46399
reuptake
Engineer
Engineer
Posts: 2
Joined: 29 Dec 2009 08:49

Re: Cargo Distribution

Post by reuptake »

Hi,

I've managed to build CargoDist version of OpenTTD on Mac (if someone is interested, please let me know). Now I have problem with connections that generate huge losses despite being full (especially bus pax lines, it can generate -20K or more a year). Why is that?

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

Re: Cargo Distribution

Post by petert »

reuptake wrote:(if someone is interested, please let me know)
I'm sure nobody would mind, that would be great. :-)
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests