Page 65 of 154
Re: Cargo Distribution
Posted: 29 Dec 2009 18:22
by tsjook
reuptake wrote: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?
Generally remember that generated income for any cargo including passengers is a factor of time and distance. In two situations (that I can think of) this can lead to negative income for a vehicle in cargodist.
First, most common, example:

- abc1.PNG (551 Bytes) Viewed 3321 times
When there are two lines (1 & 2), passengers travelling from A to B (via C, there is no direct connection) will create a negative income for train/bus/boat/plane on connection 2 because pricing is based on global distance and B is closer to A than C, thus creating a negative income.
Second, less common, example:

- abc2.PNG (488 Bytes) Viewed 3321 times
If 1 and 2 are separate connections, the transfer income earned on line 1 for passengers travelling from A to C might be too high if the connection from B to C (line 2) is slower, or if those passengers have to wait at B for a very long time. This might cause a lower, or even negative income for those passengers on line 2.
Keep in mind that negative income on well-filled vehicles is usually just a correction for too high transfer income earned elsewhere.
Re: Cargo Distribution
Posted: 30 Dec 2009 09:39
by reuptake
Thanks for detailed information. I think hovever that it should be changed in a way that player could more easily distinguish between really unprofitable (eg. empty) nad "fake"-unprofitable line.
And Mac OS X build (Intel only) is here:
http://elou.pl/openttd-cargodist-mac-osx-20091228.zip
Have fun
Re: Cargo Distribution
Posted: 30 Dec 2009 10:55
by Kogut
Maybe red/green numbers with profit for last train ("fake profit"), and lower - blue with real income?
-4241
12344
Or something like this
-4241 (12344)
Re: Cargo Distribution
Posted: 30 Dec 2009 22:24
by Dylock
I've been searching high and low and I cant seem to find the answer so forgive me if someone else asked before, but I've been playing CargoDist (as oppose to CargoDest which I used to play) and I love all the improvements.
There is, however, one thing I've been wondering. I usually use a feeder service to increase the production / transportation of a certain good into a nearby station from which long-haul train(s) move the goods over distances. The goods at the storage station, however, decrease in quantity over time...(why? does coal evaporate?) Has this strategy become redundant with CargoDist? and/or is there a way to still use this technique effectively in CargoDist.... Or has this been deliberately countered as part of the CargoDist goals.
I'm asking because I actually liked the setup of having smaller trains move back and forth between production facilities and a storage station and having long-haul trains move the goods to their (final) destination.
Re: Cargo Distribution
Posted: 31 Dec 2009 18:28
by oberhümer
Then you´re just not picking it up fast enough.
Re: Cargo Distribution
Posted: 31 Dec 2009 23:12
by NekoMaster
I know, it seems stupid that some goods would disappear at stations, but it happens, but usually when you dont have a train coming often enough, for things like food, it might be they would remove it cause it went bad.
Re: Cargo Distribution
Posted: 01 Jan 2010 14:39
by Dylock
I would understand food, but stuff like coal or iron? anyway, CargoDest didnt have that, I guess I'll have to dive into the code if I want it removed...
Re: Cargo Distribution
Posted: 01 Jan 2010 14:50
by fonso
Dylock wrote:I would understand food, but stuff like coal or iron? anyway, CargoDest didnt have that, I guess I'll have to dive into the code if I want it removed...
This behaviour is not specific to cargodist. It is present in trunk, too. I didn't change it (at least not on purpose). If you give me a savegame showing the flaw I might be able to find out more.
Re: Cargo Distribution
Posted: 01 Jan 2010 16:35
by NekoMaster
Fonsos right, even waaaaay back to 0.5.X days, it still happens. Though, its bad to let stuff just "disappear" cause that lets your ratings drop, thus making it hard to negotiate with the local town authorities when trying to build or demolish stuff
Re: Cargo Distribution
Posted: 01 Jan 2010 20:41
by Vaulter
Just saw that in small map in links mode, columns has fixed rows
This is extremely important with ECS addon
see attach #1
Just replacing in smallmap_gui.cpp in DrawLegend
Code: Select all
uint number_of_rows = max(this->map_type == SMT_INDUSTRY ? (_smallmap_industry_count + columns - 1) / columns : 0, this->min_number_of_fixed_rows);
to the
Code: Select all
uint number_of_rows = max(this->map_type == SMT_INDUSTRY ?
(_smallmap_industry_count + columns - 1) / columns :
this->map_type == SMT_LINKSTATS ?
(_smallmap_cargo_count + columns - 1) / columns : 0, this->min_number_of_fixed_rows);
sorry for this fast ugly trick

will create patch later if needs
result: see attach #2
clicks on labels works!
Re: Cargo Distribution
Posted: 01 Jan 2010 21:58
by Dylock
Yeah you're right, it is not a CargoDist thing, sorry about that. I never played trunk, just CargoDest, I'll go through the code and see if its something easily changed... Thanks though!
Re: Cargo Distribution
Posted: 01 Jan 2010 23:43
by petert
Here is a new updated build of CargoDist. I had some previous trouble with patching, but that's all worked out now. Built on MSVC against r18678. I may/will upload a new build of the CargoDist mini-pack if patching goes well, you can find that here:
http://www.tt-forums.net/viewtopic.php?f=33&t=46399
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
Re: Cargo Distribution
Posted: 04 Jan 2010 02:15
by fonso
Vaulter wrote:Just saw that in small map in links mode, columns has fixed rows
This is extremely important with ECS addon
The number of legend columns was also miscalculated. As you can see in your screenshot some legend entries disappear behind the buttons. I have tweaked the calculation of min/max numbers of rows and columns. Now everything looks nice as far as I can see. Thanks for the report.
And you have an interesting icon set there. Is that some newgrf? Could you share a link?
Re: Cargo Distribution
Posted: 04 Jan 2010 02:30
by petert
fonso wrote:And you have an interesting icon set there. Is that some newgrf? Could you share a link?
It's the 32bpp GUI. You can download it on this page:
http://wiki.openttd.org/List_of_downloadable_32bpp_tars. It's the second one, called "Main Toolbar" Just be sure to start OpenTTD.exe with "-b 32bpp-optimized". (No, you don't need extrazoom levels, it will work in regular nightly)
Re: Cargo Distribution
Posted: 04 Jan 2010 10:51
by Wasila
Sorry if this has been mentioned before, but the wiki page isn't very clear. 'Effect of distance on demands', I assume reduce demand if a station is far away? If so, what does an option greater than 100% do?
Re: Cargo Distribution
Posted: 04 Jan 2010 12:22
by fonso
Wasila wrote:Sorry if this has been mentioned before, but the wiki page isn't very clear. 'Effect of distance on demands', I assume reduce demand if a station is far away? If so, what does an option greater than 100% do?
The setting determines how much the demand is reduced if the station is far away. If you set it to 0 the demand isn't reduced at all. If you set it to 100% the demand is reduced by the amount I recommend. If you set it higher the demand is reduced even more.
Re: Cargo Distribution
Posted: 04 Jan 2010 12:55
by Wasila
If you set it to 100% what % will demand be reduced by? Surely the setting should be how much demand is actually reduced as opposed to your recommendations?
Re: Cargo Distribution
Posted: 04 Jan 2010 14:11
by fonso
The reduction of demand depends on both the distance and the setting. If the setting is set to 100% the demand for a journey of one tile is not reduced and the demand for a journey from one corner of the map to the opposite corner - the longest possible journey - is 1. Everything else is scaled linearly.
Re: Cargo Distribution
Posted: 04 Jan 2010 14:17
by Wasila
Hmm... OK
Re: Cargo Distribution
Posted: 04 Jan 2010 15:19
by bokkie
'Negative income' in feeder services should be somewhat corrected:
http://hg.openttd.org/openttd/trunk.hg/rev/03e6673d9fd5. So, less complaining in your thread Fonso
