News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Bug? Passengers prefer the lower class in cases where I would not expect this

Started by Mariculous, June 03, 2020, 11:27:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mariculous

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.

jamespetts

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.
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.

Mariculous

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.

jamespetts

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.
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.

Mariculous

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.

jamespetts

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.
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.