News:

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

[Bug] Calculation of "max. comfortable journey time" when comfort is 240 or more

Started by Ranran(retired), June 24, 2022, 12:28:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

I am currently working on updating the depot dialog for ver 15.
At that time, as the title suggests, I noticed that the calculation of "max. comfortable journey time" when comfort is 240 or more is broken.

I created a chart that plots the correlation between "max. comfortable journey time" and comfort in the goods list to organize the information for the depot dialog.
It just displays the value of max_tolerable_journey(comfort), and the numbers in this chart match what is displayed in the current depot dialog.

As this chart shows, "max. Comfortable journey time" shows outliers in more than 240 comfort.

// There is no tolerable journey below tolerable_comfort_short...
max_tolerable_journey.insert(tolerable_comfort_short - 1, 0);
max_tolerable_journey.insert(tolerable_comfort_short, tolerable_comfort_short_minutes * 60);
max_tolerable_journey.insert(tolerable_comfort_median_short, tolerable_comfort_median_short_minutes * 60);
max_tolerable_journey.insert(tolerable_comfort_median_median, tolerable_comfort_median_median_minutes * 60);
max_tolerable_journey.insert(tolerable_comfort_median_long, tolerable_comfort_median_long_minutes * 60);
max_tolerable_journey.insert(tolerable_comfort_long - 1, tolerable_comfort_long_minutes * 60);

The "max. comfortable journey time" uses a different formula for the comfort range.
It would be appreciated if you could confirm that the last formula is correct.

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

Octavius

It makes sense that there's a discontinuity in the max. comfortable journey time when the comfort level allows sleeping on board.

Ranran(retired)

Quote from: Octavius on June 26, 2022, 11:39:15 AMIt makes sense that there's a discontinuity in the max. comfortable journey time when the comfort level allows sleeping on board.
I don't think your point explains why comfort *240-255 are all the same value.
(If you edited the simuconf.tab, you can see that this starts at 240 with the same value.)
It also doesn't seem to be at least specific to pak.britain.

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

jamespetts

Thank you for the report. It looks as though there may be a problem with this - it is correct that they should not all be the same value above 240.

I am currently contemplating making a number of modifications to comfort in 15.x, including allowing specifying the maximum comfortable journey time directly in .dat files (albeit retaining the old conversions for legacy compatibility), so it may be better to defer looking into this in detail until I come to that work.
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.