News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Access charges not shown in line/convoy graphs

Started by Vladki, January 22, 2020, 08:12:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vladki

This is a followup for https://forum.simutrans.com/index.php/topic,19067.0.html
Now we have per km running costs and monthly maintenance added together and shown in line/convoy graphs. It would be even better if they are split, but it is acceptable to have them summed together. What would be more interesting is to see the access charges paid for usage of other players roads. So one could evaluate if it is worth using them.

Ranran(retired)

It is present in the standard but seems to have been removed in the past in extended.

enum convoi_cost_t { // Exp|Std|Description
CONVOI_CAPACITY = 0, //  0 | 0 | the amount of ware that could be transported, theoretically
CONVOI_TRANSPORTED_GOODS, //  1 | 1 | the amount of ware that has been transported
CONVOI_AVERAGE_SPEED, //  2 |   | the average speed of the convoy per rolling month
CONVOI_COMFORT, //  3 |   | the aggregate comfort rating of this convoy
CONVOI_REVENUE, //  4 | 2 | the income this CONVOI generated
CONVOI_OPERATIONS, //  5 | 3 | the cost of operations this CONVOI generated
CONVOI_PROFIT, //  6 | 4 | total profit of this convoi
CONVOI_DISTANCE, //  7 | 5 | total distance traveled this month
CONVOI_REFUNDS, //  8 |   | the refunds passengers waiting for this convoy (only when not attached to a line) have received.
// CONVOI_MAXSPEED, //    | 6 | average max. possible speed
// CONVOI_WAYTOLL, //    | 7 |
MAX_CONVOI_COST //  9 | 8 |
};



weg->get_owner()->book_toll_received( toll, get_schedule()->get_waytype() );
get_owner()->book_toll_paid(         -toll, get_schedule()->get_waytype() );
// book( -toll, CONVOI_WAYTOLL);
book( -toll, CONVOI_PROFIT);


Since refunds chart is probably never recorded since it was implemented, is it possible to replace Access charges or monthly maintenance?
I think it's easy to revive the waytoll record.
Either way, convoy's re-combination thinks these need to be reconfigured and may be a temporary measure.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

I do not think that we should abolish access charges or monthly maintenance. The refunds should be recorded and present - I am afraid that I do not remember why the access charges were commented out; they had been there in the past. They are potentially a useful thing to show.
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)

I apologize for my English ability.
I suggested that it be added rather than abolished. But I intended to say that it might be temporary.

The acceleration chart patch added two chart buttons. So adding another button does not increase the row (with default window size). Therefore, if there is no particular reason to abolish the waytoll, it is easy to resurrect it. Because the code seems to remain just commented out.

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

jamespetts

Quote from: Ranran on January 29, 2020, 05:50:19 PM
I apologize for my English ability.
I suggested that it be added rather than abolished. But I intended to say that it might be temporary.

The acceleration chart patch added two chart buttons. So adding another button does not increase the row (with default window size). Therefore, if there is no particular reason to abolish the waytoll, it is easy to resurrect it. Because the code seems to remain just commented out.

Ahh, I understand! You mean for the convoy window, not the finances window? By all means, do add this; it may have been commented out because it worked on the basis of Standard's (very different) algorithm for calculating what this toll should be - Extended's algorithm uses a proportion of revenue as a toll for ways/ports/airports (the three are done differently), so you will need to make sure that the amounts recorded on this graph represent the actual amount paid by the convoy in question to other players for use of ways/ports/airports on the basis of the correct algorithm for each.
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)

#5
Quote from: jamespetts on January 29, 2020, 05:55:21 PMYou mean for the convoy window, not the finances window?
Yes. I think this thread is for that.

Quote from: jamespetts on January 29, 2020, 05:55:21 PMBy all means, do add this; it may have been commented out because it worked on the basis of Standard's (very different) algorithm for calculating what this toll should be
I was not thinking about that possibility. First of all, I need to confirm how it works after removing the comment out.

EDIT:

weg->get_owner()->book_toll_received( toll, get_schedule()->get_waytype() );
get_owner()->book_toll_paid(         -toll, get_schedule()->get_waytype() );
// book( -toll, CONVOI_WAYTOLL);

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

jamespetts

In Extended, things are more complex; there is an option to use the Standard-like fixed cost per tile of way system, which is what this code deals with. However, there is also an alternative system (which can be set by pakset authors) based on that used by the Railway Clearing House, in which the way owners receive a proportion of the income from the journey based on the proportion of the journey that they travelled on a foreign company's way.

I am not sure whether this latter type of toll is recorded in either of the methods set out above as it has been many years since I worked on this code; this would need some investigation to establish.
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)

Currently, it seems that waytoll has been subtracted from profit. So it just need to change that part to waytoll instead of profit.
I found it in three places in the code. Presumed to be where book_toll_paid() is called.
I changed the waytoll that had been deducted from profit to be separated from profit and recorded in waytoll.
It seems to be working properly. I confirmed on Bus, Rail, Ship, Airplane, but there is no inconsistency with  access charges chart on the financial dialog.


I have not yet added it to the linemanagement dialog. This adds a new row, as described above. (´・ω・`)
The orange color has the same color as "Total capacity" and "Scheduled" so needs to be changed.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Phystam

Can you add another column to show 'way toll' under the 'profit'? It would be very helpful.

Ranran(retired)

Quote from: Phystam on January 30, 2020, 11:00:38 AMCan you add another column to show 'way toll' under the 'profit'?
(´・ω・`)どういう意味でおじゃる? What do you mean?
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Phystam

利益: 〜€ の下に
支払った通行料: 〜€
の列を付け加えるにゃ!
add Way toll: 〜€ line
under Profit: 〜€
Nya!

Ranran(retired)

(´・ω・`)無茶な注文でおじゃ
Columns are not fixed. Flexible. Try changing the size of the window. They are arranged in the order in which they are recorded.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Phystam


Ranran(retired)

#13
Well, I misunderstood your request.
But I don't think estimated toll information can be displayed there. As James explains, the method of collecting tolls is complex in extended, varies by waytype, and depends on fare revenue. Therefore we do not know the amount to be collected in advance. For example, how much is not fixed per tile. Fo rexample, if the passenger is 0, toll will be 0. Also we do not know toll while driving. Toll is calculated when convoy stop at the station and unload them and get income.
There are also options for such collection settings.
Even for options that depend on running costs, it is not always collected, depending on the tiles that pass.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

I agree that the toll cannot sensibly be predicted. However, actual tolls should be taken into account when calculating profit, and should be counted as negative on the profit graph, as with all other expenses.
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)

Ahh, It is necessary to subtract toll from the profit of convoy information after this change. I would have to do it.
My misunderstanding. There was no need to deduct from Profit record. I will fix this.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)