Author Topic: Comfort bonus for vehicles  (Read 1551 times)

0 Members and 1 Guest are viewing this topic.

Online Leartin

Comfort bonus for vehicles
« on: June 28, 2013, 08:12:47 PM »
In Simutrans, the best passenger wagon would be a stock car, seats just waste room where more passengers could crowd tightly, after all, it's just about the number of places...  ;D

While this is an extreme example, I think a value for the comfort of a vehicle could help to use realistic properties for similar vehicles. Eg. when distinguishing between first and second class wagons, I often see that the first class has less seats - which of course makes sense. However, to match them with the second class wagons, their running cost is lower. Which doesn't really make sense, except for balancing reasons. Also, usually first class tickets cost more in reality.
A comfort value could be similar to gear, but messing with the payment you get per passenger. If no comfort value is given, nothing changes. But one could use a comfort of 120 to get 120% percent of the normal fee (or 20 percent more). So when you have a second class wagon with 100 seats and a first class wagon with 50 seats, you could give the first class wagon a comfort value of 200, and you can get the same gains from both (Actual balancing would be different, of course, just a basic example to grasp the concept).
By using a value under 100 (a third class basically) you could even create cheap mass transport, which probably isn't that lucrative, but helps to avoid overcrowding.

While that is quite "simple" (Easy to say for me, as I can't code anyway, but I think it wouldn't exactly turn the code topsy-turvy), it is also expandable, leaving potential for the future. For example, when passengers are generated, there could be a "minimum comfort level" and/or a "maximum comfort level" a passenger accepts to use, dependant on pakset settings. This could be used for restricting access to first-class-passengers, so you can't get easy money off of few passengers by using luxury vehicles only, while everyone gladly accepts the usual second class. Or it can be used to make the game harder by forcing the player to use different classes to serve all passengers. However, that's just to say that there could be more waiting down the road, the main request is just a comfort bonus.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4895
  • Total likes: 214
  • Helpful: 108
  • Languages: EN, NO
Re: Comfort bonus for vehicles
« Reply #1 on: June 28, 2013, 08:18:43 PM »
This is the sort of thing Simutrans Experimental is up to.

Online Leartin

Re: Comfort bonus for vehicles
« Reply #2 on: September 28, 2017, 04:01:35 PM »
Hmmm... this was my first request ever on this forum... no wonder I let go of it so quickly...  :-[

*caugh caugh*

Yes, Simutrans EX does a lot of things. But even if Simutrans EX has something, it does not mean Standard can't have it or shouldn't have it. There are instances of things first done in EX, and than backported to Standard - sometimes in reduced form. So, since it came up recently, I'd like to have a proper discussion about comfort in Standard, whether people would like it and how it could be introduced. My recent post about it was this:

Quote
1.) Give vehicles that can transport pax a comfort level. As a basic implementation, that's just a variable assigned to a vehicle. A more advanced implementation might include vehicles that can increase or decrease the comfort level of the whole convoi. (eg. a steam locomotive might decrease since the steam blocks the view/windows can't be open. A bord bistro might increase, etc.)
2.) Increase the payout with the comfort level, the higher the comfort level, the higher the transport fee. Of course, comfortable cars are also more expensive.
3.) Allow a configuration file to establish pax subclasses and their chance in each year. Whenever a pax spawns, it will be of one of the subclasses, decided by chance.
4.) Allow the same configuration file to establish minimum and maximum comfort level each class is willing to use. This can change over time as well (probably increasing)
5.) Do routing for each subclass, while only using connections with vehicles of an appropriate comfort level. This should cause as much additional performance demand as introducing additional good categories does, or like starting a mail network. So while there can't be an infinite number of subclasses, a few shouldn't have too large an impact.
6.) Pax will only enter vehicles of appropriate comfort level. This is to avoid using just one appropriate vehicle to unlock large parts of the map for all subclasses. It also means that if two different means of transportation connect the same two stations, some pax might only choose one, while some pax will only choose the other.
7.) THIS COULD ALL BE HIDDEN FROM THE PLAYER. As in, the game would continue to only display "Pax" without giving any indication what subclass each Pax belongs to. If you would explain it, it's just a bunch of mechanics. If you don't explain it, it's as simple as "If you have a higher comfort level, people pay you more to travel with you, but not everyone will afford it.", and casual players might not be confronted with how it works at all. Power Players can get the general information about which subclasses exist and which comfort levels they accept in a seperate window, much in the way how the speedbonus is only visible in the goods window and does not distract beginners.


Okay, for anyone who can't imagine what that would mean, let's have a little thought experiment. Say in 2000, you have 15% "class3"-pax, which require a comfort level between 0 and 10. You have 60% "class2"-pax which require a comfort level between 5 and 15. 20% "class1"-pax which require a comfort level of 10 to 20, and 5% superrich which require a comfort level of 15 or higher.

You don't want to think about comfort levels too much and use an average second.class wagon, which has a comfort level somewhere between 5 and 9. 75% of all potential pax on the map would use that second class wagon, so that's pretty nice. For the other 25%, you add an average first-class wagon, which has a comfort level between 15 and 20. I did not check this beforehand, but the first series of ICE3 had 22% first class seats - so that seems pretty realistic for an average train.
You want to have an average plane? Easy - give it a comfort level between 10 and 14. This will cover 80% of all pax. If you use level 15, it will even cover 85%. Those other 15% are just too poor to afford plane tickets. Of course, if you create "pak.USA", this might be different.
You want to have a tram which does not have "different classes"? Okay - just put it at 10. This will cover 95% of all pax - except for the superrich which of course rent a limousine. Where? Well, why don't YOU provide such a service with a really high comfort level? You might only transport 2 pax at a time, but those will pay you more than a busload of broke people.

As you can see, with the right balancing, it would not be hard to transport most of those pax anyways. But now comes the interesting part- whenever a vehicle arrives at a stop, everyone uses the highest class in their range, starting with the lowest pax-class. This means you could have a "third" class wagon with comfort 9 just to accomodate the poor, a "second" class wagen with comfort 15 for the middle class, a first-class wagon with comfort 20 for the upper class, and whatever the highest available comfort level is for the superrich - you don't NEED to do that, but if you do, you get the most money out of your pax.
On the other hand, if you just want to transport your pax to get them out of the way, no matter how little you earn, you would go with the lowest level for each, since those vehicles might be cheaper than others.

There is a lot of depht and strategy to gain, as well as a bunch of new vehicles currently impossible to make valuable (or how would you introduce a VIP limousine?) And that's without exploring how the group sizes AND their demands might change over time. So, if you never update your trains from 1930, it won't take long until only the lowest 15% would use them at all. HOWEVER, in comparison with the speed bonus, which also makes older vehicles obsolete, you can actually SEE that they don't make as much because they don't transport as much anymore, and you can still use some of them for those 15% without any malus.


But that's how "complicated" it could get, which is not very Simutrans-like (even though things like speedbonus already are quite complex). But think of it from a players perspective: Not only would most players naturally use first class AND second class wagons, even if they would miss out on most pax it does not really matter, as long as whatever they use makes profit. And it's intuitive that more pax would go with a train consisting of first class and second class wagons than just one class - so the player does not need to crack any numbers and can still enjoy the game, even while the system enhances their expierience in the background.


Of course, I know it's still a lot of work, and I can't do it. But I wish people would at least comment whether they would like to see it, and perhaps devs could say if that would work or not?

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 16083
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Comfort bonus for vehicles
« Reply #3 on: September 28, 2017, 06:41:44 PM »
Simutrans-Extended is in the process of implementing almost exactly this feature (with passenger classes); see the passenger-and-mail-classes branch.
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.

Online Leartin

Re: Comfort bonus for vehicles
« Reply #4 on: September 29, 2017, 04:36:43 AM »
Simutrans-Extended is in the process of implementing almost exactly this feature (with passenger classes); see the passenger-and-mail-classes branch.
Great minds think alike, perhaps. If it's that close, at least that means it's actually possible. But with all the changes in EX, I doubt you could port it back to Standard?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8830
  • Total likes: 324
  • Helpful: 229
  • Languages: De,EN,JP
Re: Comfort bonus for vehicles
« Reply #5 on: September 29, 2017, 05:18:54 AM »
At the core of this is the routing, which is fundamentally different in standard and experimental.

Standard routine is refresh whenever a new convoi started or a station is extended, since only every station need to upgrade its routing. This is favorable for nework games with many players, since the response due to route changes is fast. (Espcially if long bit_per_month setings are used.).

Experimental routining using a static table which is heavy to recalculate; so it is only done once a month. Since the recalculation is heavy in the first place, more parameter are put into the calculation (like average journey times).

The first version of that routing were really slow and usuitable for large maps. Together with then also very slow physics code, it was the main reason why there was the split off between these two.

So, to include confort classes, journey times etc. to standard, one would have to change all goods routing algorithm. Not sure how easy a backport would be. (Also the resulting complexity is the reason for Experimental ... )

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 16083
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Comfort bonus for vehicles
« Reply #6 on: September 29, 2017, 06:03:34 AM »
I should note that routing is updated more than monthly in recent versions (in case of long month lengths) and is multi-threaded to improve performance.
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.

Online Leartin

Re: Comfort bonus for vehicles
« Reply #7 on: September 29, 2017, 08:55:26 AM »
At the core of this is the routing, which is fundamentally different in standard and experimental.

Which is why I really didn't want to make this about SimEX at all.
However, please take a look at my suggestion: It does not include journey time, so routing needs not more upgrades than currently. Perhaps whenever the values in the background change, though for that a yearly rerouting would be sufficient.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8830
  • Total likes: 324
  • Helpful: 229
  • Languages: De,EN,JP
Re: Comfort bonus for vehicles
« Reply #8 on: September 30, 2017, 12:34:31 PM »
Yes, but for now people will just go onto the next arriving convoi. Thus one single confort cr would upgrade  a standard connections to  confortable one; even if all the others use horse carriages. Because loading is done differently to routing. Not sure how experimetnl handles this.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 16083
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Comfort bonus for vehicles
« Reply #9 on: September 30, 2017, 01:21:13 PM »
In Extended's passenger-and-mail-classes branch, passengers do not choose which route to take on the basis of comfort: they choose the fastest route that they can afford. Each class of passengers has a separate set of routing data. Within any given convoy, passengers will choose which accommodation to board based on their own class and the comfort of the convoy.
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.

Online Leartin

Re: Comfort bonus for vehicles
« Reply #10 on: September 30, 2017, 01:44:26 PM »
I guess it works something like this: Currently, when a vehicle arrives at a station, it first needs to know what type of load it has, and store that information in a variable "loadX" (more likely hand it over as a parameter, which is essentially the same). Then, it would iterate through all stations on it's route starting with the next stop, and transfer all units of "loadX" designated to that future station from the current station into itself, until it's either full or out of stations on the route.

If we have a list of which comfort levels are in range for each type of pax, we can also determine which types of pax would travel with each comfort level. To go with the earlier example, if a vehicle has comfort level 6, it would know that class3, class2 and class1 can be on it. We essentially have an array of possible loads, and just have to iterate through them. So you'd first iterate through all future stations looking for class3-pax with that destination, than iterate through all future stations looking for class2-pax, and last iterate through stations only looking for class1-pax. Since you never iterated for superrich pax, they would never be loaded in the vehicle, even if another vehicle on the same route or even in the same convoi has a high enough comfort level for them.

BTW you need to do it in this order, rather than checking each station for all pax-classes, to get the best prices out of your pax. You get paid for the comfort of the vehicle, which is always the same, no matter who is travelling with it. But a higher pax-class might travel with a higher comfort-level, giving you that extra payment, wheras the lower pax-class could not.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 16083
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Comfort bonus for vehicles
« Reply #11 on: September 30, 2017, 01:49:50 PM »
In Simutrans-Extended, which seems different in this respect from your proposal, passengers of a higher class can always travel in accommodation designated for a lower class; thus 'buses generally have only one class, and all passengers are able to travel in them, for example. It would make no sense for people to be unable to get to a destination on account of being too wealthy.
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.

Online Leartin

Re: Comfort bonus for vehicles
« Reply #12 on: September 30, 2017, 05:06:56 PM »
In Simutrans-Extended, which seems different in this respect from your proposal, passengers of a higher class can always travel in accommodation designated for a lower class; thus 'buses generally have only one class, and all passengers are able to travel in them, for example. It would make no sense for people to be unable to get to a destination on account of being too wealthy.

Would the Queen ride a public bus through london on a daily basis, or is she stuck in her palace?
The idea is not that people are too rich to get to their destination and thus stay at home. They do get to their destination, just not with public transportation, you won't know if they used a taxi, drove their own car, called their chaffeur to pick limousine number 3 today, or arrived in a helicopter. I'm not so sure those people travelling first class in planes and trains on a regular basis would then use a stinky old bus for inner-city traffic, just because the player does not provide anything better.
Or consider it from another perspective: You are at the railwaystation in winter. A train arrives - but one of the windows is broken, so it would snow on the inside. Or it's summer, the climate system broke, the wagon has 50°C. Would you travel with those trains, even if you could travel for free? I probably wouldn't. And while those are extreme conditions, it goes to show that a minimum level of comfort is just expected.

Ultimately though - does that additional check really matter from a coding perspective? If not, why not leave that particular question to the pak-devs? If we go with comfort=100 as the default (which would make sense, as it could double as percentage earned per trip) and all classes have 100 in their range (like in my earlier example 10, except for superrich), they could all use all vehicles, except those specifically designed to be different. You could also have all ranges start with 0, so even if you implemented the 50°C train, everyone could take it and get a refund.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 16083
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Comfort bonus for vehicles
« Reply #13 on: September 30, 2017, 05:58:23 PM »
In Extended, we simulate private car traffic, and wealthy people are more likely to use private cars. However, you cite relatively marginal cases: when the railways came along, lots of wealthy people who had previously used private horse carriages took to travelling first class on the trains because the journey was faster (even if first class on early railways were in compartments with no lavatory, hard springing, a smoky oil lamp for illumination and no heating beyond hot water bottles and blankets for hire at the stations). Comfort is relative to whether there is anything better available.
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.

Online Leartin

Re: Comfort bonus for vehicles
« Reply #14 on: September 30, 2017, 07:35:26 PM »
Not marginal cases, just extreme cases.
The matter is whether there is any situation where you just wouldn't use the only public transport available for comfortablity reasons, and that includes crazy situation that only come up because of the player. Because there is nothing stopping the player from using not only that old first class wagon with no lavatory, hard springing, a smoky oil lamp for illumination and no heating in modern times, but the third class version of the same train as well. Would you use that for your daily transfer to work? I think not. But the reason would not be speed, but comfort alone. Hence you need to be able to exclude certain vehicles from use by some pax based on comfort alone.
And as you stated yourself, wealthy people changed to first class on trains, not trains in general. Could you say what would have happened if first and second class never existed? If any wealthy person who wants to travel by rail would probably sit - or stand - next to someone from a lower worker class? Thing is, I don't think classes could ever not have been invented without either banning a 'lower class' from use completely or having a 'higher class' not use it. Because of that, I think it's fair that for any given vehicle in any time period, it's either too expensive for the lowest class or too plebeian for the highest class.

And again - if you disagree, but it's implemented, you can simply balance your Standard-pakset differently, and everyone is happy. If it isn't implemented, you are just as happy, but I'd be a sad panda. Why would you want to make me sad?   ::'( ::'(  ;)

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 16083
  • Total likes: 438
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Comfort bonus for vehicles
« Reply #15 on: September 30, 2017, 07:55:39 PM »
I would not want to make you a sad panda - I like happy pandas. I just wanted to explain why things are done differently in Extended.
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.