News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Finances window: maintenance, profit, running costs... per each type of tranport

Started by jk271, February 26, 2011, 11:29:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jk271

I have been very busy last month and I did not have any time neither to work on the patch nor to visit the forum. And I not not expect to have time for bigger changes this month too.

Now I see, that a lot of coding have been done: In finance.cc in trunk branch and also in jk-finances on Dwachs's github repository. Merging trunk into my branch and further to merge my branch into jk-finances would take time. So I suggest development team, mostly Dwachs, to overtake development of enhanced finance stats. Development goes much more faster with write access to repository than with permanent merging changes from trunk into my reporitory breaking code having work correctly and see nothing merged back to the trunk.

Thank you all, especially Fabio And Dwach, for yours support and suggestions.

Dwachs

Thank you for your patch and your continuous work on this.  Imho, we are near trunk inclusion of the patch, only some code beautifying is left :)
Parsley, sage, rosemary, and maggikraut.

jk271

There is an opened question about "transportted" stats not being answered (and fixed) from my side:
What is the cause of difference between amount of transported cargo between trunk and amount of transported cargo with money patch code.

If the condition in function unload_freight() in file vehicle/simvehikel.cc on line 745 around function book_transported in moneypatch code is removed, "transported" stats appearing in "finance window" would be calculated in the same way as it is now in the trunk.

I hope it would help you to finish it successfully.

I do not end with simutrans. I take it as a long break. After several months I might be back with river patch. :)

Dwachs

Quote from: jk271 on December 02, 2012, 12:55:02 PM
What is the cause of difference between amount of transported cargo between trunk and amount of transported cargo with money patch code.

If the condition in function unload_freight() in file vehicle/simvehikel.cc on line 745 around function book_transported in moneypatch code is removed, "transported" stats appearing in "finance window" would be calculated in the same way as it is now in the trunk.
I did not have time to look into this up till now. The 'problem' here is, that in current trunk code both (a) the amount of transported goods and (b) the amount of goods delivered to their destinations are counted. But only the numbers in (a) are shown in trunk's finance window, while the patch does only count according to (b). Thus the difference.

Which of these statistics should be kept? What do you (all) think?
Parsley, sage, rosemary, and maggikraut.

jk271

My suggestion is to display same numbers as are being displayed in finance findow from trunk now.
It would be a little bit easier to make a regression testing (using savegame with great tranport company from one of the post above) with (a).
So I vote for the option (a).
Which one would prefere others?

prissi

Actually it would make sense to keep both. Because (transport evnets a)/(delivered goods) is the mean number of interchanges. It may be very interesting to statistics freaks and gives also a metric on how interconnected everything is. For display thouhg, maybe a is enough. (But showing also interconnections?)

TurfIt

Both could work as described by prissi.

However in the context of the display in the finance window, I think it should show (b) - the amount delivered. I could largely care less about how much cargo is picked up, only how much is actually delivered to the final destination.

Dwachs

Here is the final version of the patch. Savegame version not increased yet, would be necessary when incorporated into trunk.
Parsley, sage, rosemary, and maggikraut.

Dwachs

Countdown for comitting this is running. Here is the absolutely last final version of the patch.  :police:

As to counting deliverd/transported: both numbers are recorded. The number of transported goods is shown in finance window (as it is in current trunk)

I really would like to get this off my desk :P
Parsley, sage, rosemary, and maggikraut.

prissi

EDIT: Ok, forgot to add weg_besch.cc ...

Maybe one could no show unsued waytypes in the drop down? That would avoid the tt_Other in the finances selection.

Why is the maintenace section zero for the track/street/etc. even when building new stuff? I am a little confused, I expected there some meaningful number, at least for the ways and stops (could be gotten easily also by iterating over all ways in laden(), when savegame is without finances.)

Dwachs

Quote from: prissi on February 23, 2013, 12:04:48 PM
Maybe one could no show unsued waytypes in the drop down? That would avoid the tt_Other in the finances selection.
tt_other is just the old finance history without the differentiation between the transport types, it will go away after some time.
Quote
Why is the maintenace section zero for the track/street/etc. even when building new stuff? I am a little confused, I expected there some meaningful number, at least for the ways and stops (could be gotten easily also by iterating over all ways in laden(), when savegame is without finances.)
Maintenance is booked at the beginning of a new month, you should wait until new month arrives.
Parsley, sage, rosemary, and maggikraut.

prissi

I though all was the old window. Now I am confused: tt_other just displays a static window while "all" shows the previous behaviour (with the exception of "trips". Why does this start with zero after loading an old game? The old value is certainly recorded.)

Since anyway both values of trips are recorded, could the "interconnection" (mean transfers) calculated by those number also be displayed? Just as a simple value like margin or so.

Dwachs

Quote from: prissi on February 23, 2013, 10:16:00 PM
I though all was the old window. Now I am confused: tt_other just displays a static window while "all" shows the previous behaviour
All: shows all values, everything summed up (including the old history)
tt_other: shows old values that could not be distinguished between transport type, but also maintenance for houses and cost of terraforming shows up there.

Quote
(with the exception of "trips". Why does this start with zero after loading an old game? The old value is certainly recorded.)
This was a bug in the patch, corrected.

Quote
Since anyway both values of trips are recorded, could the "interconnection" (mean transfers) calculated by those number also be displayed? Just as a simple value like margin or so.
I would like to finish this before adding more features.
Parsley, sage, rosemary, and maggikraut.

prissi

Ok, soe we just need a clever translation for tt_other? Maybe "unknown" or "general"

Dwachs

Quote from: prissi on February 24, 2013, 10:39:27 PM
Ok, soe we just need a clever translation for tt_other? Maybe "unknown" or "general"
Miscellaneous / Sonstiges
Parsley, sage, rosemary, and maggikraut.

Dwachs

This is now incorporated in trunk, r6424 :) Finally. Many thanks to jk271!
Parsley, sage, rosemary, and maggikraut.

hreintke

Dwachs,

Trying to update my version to the latest trunk I get the message :

1>bruecke.obj : error LNK2001: unresolved external symbol "public: enum waytype_t __thiscall weg_besch_t::get_finance_waytype(void)const " (?get_finance_waytype@weg_besch_t@@QBE?AW4waytype_t@@XZ)

I checked weg_besch.h and it includes


* @return waytype used in finance stats (needed to distinguish \
* between train track and tram track
*/
waytype_t get_finance_waytype() const;


But there is no weg_besch.cc, did you forget to include the weg_besch.cc into the svn ?

Herman

Dwachs

Parsley, sage, rosemary, and maggikraut.