News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Monthly maintenance of vehicles is not shown in graphs

Started by Vladki, June 25, 2019, 08:39:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vladki

The convoy and line graphs do not show monthly maintenence (only running costs per km), and also do not subtract maintenance from profit. Thus wrongly show some lines with obsolete vehicles as profitable, when they are not.

jamespetts

Thank you for your report.

There is currently no separate per convoy graph for monthly maintenance, and it would require some work to add such a graph, as some re-arrangement of the convoy GUI would be required, and likewise for the line.

However, it is an error that this is not shown in the profit figures. I wonder what would be more useful, however: deducting the monthly maintenance from the profit at the beginning of each month, so that each month starts with a negative profit and the revenue might allow this to increase, or deducting the monthly maintenance from the profit at the end of the month, such that a vehicle might appear to be making a profit in the current month but will transpire to be making a lower profit or even a loss by the end of the month?

I should note that, if the former is preferable, this will involve changing the way that this is done more generally, as it is currently recorded at the end of the month for the player's general financial statistics.

I should be grateful for the views of many people on this question if possible.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran(retired)

QuoteThere is currently no separate per convoy graph for monthly maintenance, and it would require some work to add such a graph, as some re-arrangement of the convoy GUI would be required, and likewise for the line.
Related to what I suggested in this thread, when convoy's recombination system is implemented, there may be many cases where Convoy has not maintained a consistent formation for a long time. When that happens, I think Convoy unit statistics may no longer make sense.

Can statistics be aggregated into a line?
What will happen to a lineless convoy in that case...?

I think that convoy only needs to own this month's data. If recombined, the current data is passed to the line data and the convoy data is cleared. I think charts are no longer needed.
At the end of the month, line statistics will pick up the convoy statistics.
Of course, there are many convoys that do not change its formation. But with recombination there are a lot of examples that are no longer meaningful, so it might be confusing.

I think that it is also good to have a vehicle maintenance chart in the line manager.
As the number of obsolete vehicles increases, maintenance costs increase and players will notice anomalies.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

Thank you for your thoughts. This is something that will need to be considered in the long term as a consequence of convoy re-combination. We still do need to consider what to do in the meantime with these graphs.

In more general terms, we need to think about when to deduct fixed maintenance costs from profit: at the beginning or at the end of a month. I am provisionally in favour of doing it at the beginning of a month, so that players can check whether the convoy is earning its keep and so that there are not unexplained and apparently retrospective changes to profitability at the end of a month, but I should appreciate further feedback on this issue before implementing this scheme.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ranran(retired)

QuoteThe convoy and line graphs do not show monthly maintenence (only running costs per km), and also do not subtract maintenance from profit. Thus wrongly show some lines with obsolete vehicles as profitable, when they are not.
QuoteHowever, it is an error that this is not shown in the profit figures.
There seem to be some bugs here.



The monthly maintenance fee for this convoy is 170.20¢.
This convoy is in the depot, but it seems to have a running cost of 85¢ at the beginning of the month.
However, the display is wrong, according to the finance dialog, it costs a "vehicle maintenance cost" of 170¢ every month.
The total value of convoy's Profit is also wrong. (Incorrect values are summed up.)
Also different between 85.10 and 85.00.


I ran this convoy just before the month changed.

When convoy goes out of the depot, it appears that no maintenance const at the beginning of the month has been collected.
However, it seems that only the chart is broken.



According to the finance dialog, it is correctly collected at the beginning of the month as "vehicle maintenance cost".
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Ranran(retired)

I think I have identified the causes.
It was overwritten with 0 because initialization was performed after adding fixed_cost at the beginning of the month.

The second issue was that the monthly cost was halved because the monthly amount was not adjusted.

I suppose I have fixed it.
https://github.com/Ranran-the-JuicyPork/simutrans-extended/commits/fix-convoy-fixed-cost-record
Please check this just in case. (´・ω・`)

I'm not sure about the issue where decimal places are not reflected in the graph.

EDIT: I have fixed the second issue.
EDIT2:
player_t::book_vehicle_maintenance () will adjust the month value in its function, but convoi_t::book () needed to pass the adjusted month value.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Vladki

To cope with recombination, (and staff layover, time in depot), the maintenance costs would have to be calculated and recorded for each vehicle / convoy / line at the moment when any such change happens.

Ranran(retired)

Convoy is a collection of vehicles after all.
In other words, the convoy data is the sum of the vehicles that make up the convoy.
But is it enough to record a lot of data for each vehicle?
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.