The International Simutrans Forum

 

Author Topic: Bug? Passengers prefer the lower class in cases where I would not expect this  (Read 394 times)

0 Members and 1 Guest are viewing this topic.

Offline Freahk

  • Devotee
  • *
  • Posts: 1257
  • Languages: DE, EN
Those ew passengers that use my intercontinental shipping line will very often travel in Low class, although they could afford High class, whilst both classes are too uncomfortable for a 33 hour long journey.
I'd expect passengers that can afford the higher class to use it, as it at least allows them to be comfortable for 8:08:34 rather than only 1:36:00.

Is that a bug, intended or "simply how it work"?
In the first case I might try to set up a minimal reproduction case.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20207
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Thank you for the report: there is an algorithm that calculates the comfort difference based on the journey time and passengers randomise their comfort preferences for this purpose. For such long voyages, it is possibly suspect that passengers that can afford a high class are taking a low class, so a minimal reproduction case would be helpful for investigation.

Offline Freahk

  • Devotee
  • *
  • Posts: 1257
  • Languages: DE, EN
Wow, 64 kb are extremely restrictive!
See the following savegame: https://simutrans-germany.com/files/upload/class_test.sve
Just to point out a few ships where wealthy people were too stingy to pay for the higher class, although it's nearly a 3 day trip across the ocean:
(22)
(25)
(26)
(32)
(33)
(35)

There are also cases where wealthy people do actually use the higher class, so this just a list of the negative examples.

In this specific case, I'd expect them to always, or at least by-far most often prefer the most comfortable affordable class, as the journey time is extremely long and the relative max comfortable journey time in betwen the two classes is significiant either (1:43:12 against 8:08:34)

It's hard to tell a "general" expectation or even a formula on how likely it will be to pick one class or the other one, nor I do know the currently implemented one, but the comfort difference between the classes should always be just as iportant as the journey time itself.
« Last Edit: June 05, 2020, 01:01:06 PM by Freahk »

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20207
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Thank you for the reproduction case: this was helpful. I think that I have found and fixed this. What appears to have happened is that schedules with waypoints incorrectly failed to record estimated arrival times in some cases. At the part of the code where passengers choose which class to take and whether to board the current convoy, the system relied on estimated arrival times at the destination; where these were not present, the time was calculated as being the present, such that the journey time was zero and comfort was thus irrelevant.

I have now fixed the problem causing the arrival time data not to be stored, and also added a heuristic based on average speed to estimate the arrival time where these data have not been stored in the past. In these conditions, the passengers on the long sea voyage will always choose the highest class that they can afford.

Offline Freahk

  • Devotee
  • *
  • Posts: 1257
  • Languages: DE, EN
Great!

Sounds like this might also have caused the bug in which passengers boarded a line they shouldn't board, so you just fixed two in one :)
Not sure if that was a bugreport in the forums or I had just read this in the chat, I'll figure it out.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20207
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Yes, it is possible that this had caused other symptoms; I should be grateful if you could let me know if anything else has been fixed.

Offline Freahk

  • Devotee
  • *
  • Posts: 1257
  • Languages: DE, EN