The International Simutrans Forum

 

Author Topic: Class reassignment - by comfort  (Read 339 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2450
    • My addons, mostly roadsigns
  • Languages: EN, CS
Class reassignment - by comfort
« on: January 13, 2019, 08:59:25 PM »
I have an idea - would it be possible to reassign classes of vehicles not according to their original class (like reassign all Low class vehicles to Very Low class), but by their comfort?

E.g I have 1870's 4-wheel suburban carriages with comfort levels 66/60/52 and some older carriages (parliamentary or LBSCR 4-wheel 5-compartment) with comfort 38. I'd like to use these older carriages for Very Low class. But If I have them in the same convoy or line, and reassign Low to Very Low, also the newer carriages with comfort 52 will be reassigned to Very Low, which might be unwanted.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18061
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Class reassignment - by comfort
« Reply #1 on: January 13, 2019, 09:13:45 PM »
The better solution to this issue would be to allow class reassignment per vehicle: but this would be a substantial amount of work and is not currently a priority.

Online Ves

  • Devotee
  • *
  • Posts: 1555
  • Languages: EN, SV, DK
Re: Class reassignment - by comfort
« Reply #2 on: January 14, 2019, 06:36:40 AM »
Hi Vladki and James (and merry Christmas and happy new year to you!), That could probably be done in the GUI, by specifying a comfort range.
Although I have been away from writing in the forums for a while, I have been doing work on the vehicle manager, and it just so happens that I just learnt a technique to type and decode number ranges in text fields using < > and - (between values). And then some logic that prevents impossible statements.

I could look into it when I get the time to do it, if you don't want to try it yourself Vladki? You can have my code if you want to.

Skickat från min ONEPLUS A6003 via Tapatalk


Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18061
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Class reassignment - by comfort
« Reply #3 on: January 14, 2019, 09:07:22 PM »
Hello and happy new year! My apologies first of all that it has not been possible to make more progress with the features that we started last year, but we really do need to fix the major bugs (including the very nasty and insidious desync bug) before doing so.

As for the idea of using a range: I can see the merits in having thresholds (which is perhaps equivalent to what you meant?): i.e., an automatic tool that will reassign all vehicles (or accommodation within vehicles) in a convoy/line with a comfort of above or below a certain number to a certain class.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2450
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Class reassignment - by comfort
« Reply #4 on: January 14, 2019, 10:38:40 PM »
Hello Ves,

yes assigning classes according to comfort level range is what I had in mind.
Either the class manager could show you the list of comfort levels that are used in all vehicles of the convoy/line, and let you assign a class to each used comfort (with default preselected): e.g.

Comfort 52, 320 pax, <Low>
Comfort 62, 22 pax <Medium>

Or there could be five lines for five clases, with an input for comfort range, probably pre-filled according to current vehicles, but that could be tricky. There are similar vehicles of the same era with overlapping comfort values. E.g:
4-wheel 3/4-compartment luggage carriage (1870-78) with comfort levels 62/68/77 and similar suburban carriage, with comfort levels 52/60/66. If you combine these in one convoy/line, it may be a problem.

Online Ves

  • Devotee
  • *
  • Posts: 1555
  • Languages: EN, SV, DK
Re: Class reassignment - by comfort
« Reply #5 on: January 16, 2019, 12:41:34 AM »
No worries! I read in the forum frequently and pray to the train gods that the cause of the desync soon will reveal it self for you who are working so hard to narrow it down! I'm sorry I can't be of much help with that since it is way above my skill level.

Regarding this subject, I do indeed find it best to have one entry for every class existing for pax with a text field for comfort entry. It could even be expanded on to include more parameters, but there might be not really any other parameters which would affect class selections (loading time, etc...)? I think it should have its own tab, so you select reassigning method by changing the tabs.

I also thought of prefilling the ranges, but that might be difficult as you mention, so best I think would be to leave them blank until specified. One could make it attempt to do it, and display "overlapping ranges" if necessary. The entries would need to be remembered though when the window is closed, and blanked out when the "other" method is used.

I will upload the vehicle manager in its current status to GitHub tomorrow, and then you can have a look and try out at the text field input that I am talking about.

Skickat från min ONEPLUS A6003 via Tapatalk