Author Topic: Airport Lounge Malfunctioning across the globe  (Read 318 times)

patson

  • Administrator
  • Hero Member
  • *****
  • Posts: 915
    • View Profile
Airport Lounge Malfunctioning across the globe
« on: November 05, 2018, 11:00:10 am »
Yes....as title. The airport lounges are not working as intended  :'( :'( :'( Airport authorities have ordered them to be temporarily shut down until further notice


They are all disabled temporarily (hence no upkeep) nor will any passengers uses lounge. The lounges still stay but are switched to "inactive" status.

The demand generation and passenger simulation model have been reverted to before the feature. Hopefully this puts things back to normal at least... (starting from week 15606)

Really need to look deep into the code to see what went wrong...I still cannot pinpoint the cause right now :(

Sorry about this again all! I will try to get this sorted out tonight  :)

Share on Facebook Share on Twitter

Like Like x 2 Sad Sad x 1 View List

bluesky

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #1 on: November 05, 2018, 11:25:19 am »
I blame the elves.
And TripleA.

I bet it was TripleA.
Agree Agree x 1 Disagree Disagree x 3 View List

vani56

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #2 on: November 05, 2018, 11:42:45 am »
I blame the elves.
And TripleA.

I bet it was TripleA.
Yeah, right? Gosh they are so annoying!!!  ;)
Agree Agree x 1 Disagree Disagree x 2 View List

alex

  • Full Member
  • ***
  • Posts: 198
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #3 on: November 05, 2018, 11:44:21 am »
nah I lost money on it too, and I'm actually just going to hold off adjusting my routes back (even though it's costing me more) since, meh, I have twelve figures of cushion to eat through if necessary while I wait for a fix

vani56

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #4 on: November 05, 2018, 12:03:28 pm »
nah I lost money on it too, and I'm actually just going to hold off adjusting my routes back (even though it's costing me more) since, meh, I have twelve figures of cushion to eat through if necessary while I wait for a fix
Hah alex I see you disagree :D For a moment there I thought you didn't get the joke :D

alex

  • Full Member
  • ***
  • Posts: 198
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #5 on: November 05, 2018, 12:25:11 pm »
there is no joking in the airline game, only success or bankruptcy
Agree Agree x 1 Funny Funny x 3 View List

DaProf

  • Jr. Member
  • **
  • Posts: 54
  • More than another butt in a seat at Dairy Air!
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #6 on: November 05, 2018, 02:36:28 pm »
You know the problem with making this open source is you get idiots like me who think they can fix something .. so here I go  ;D

Submitted a PR which looks like it alleviates most of the problems on my test machine but I make no guarantees. But here is what I found so far (please take it with a grain of salt)

It appears most of the issues come from a flight preference calculation that involves passengers and lounges. First of all when the demand for flights is generated new classes of passengers have been added, which in theory should mean increased demand. But these new passengers who are Business/First really want lounges .. some want level 1 .. some want level 2 .. some want level 3 .. and of course there are the ones who have no preference. These preference calculations work by adjusting the price of the offered routes up or down depending on certain factors. These "perceived" prices are then used to see if that passenger travels and on which route.


I saw two issues with preference calculations

#1. B/F passengers with a lounge preference. The code made the perceive price lower if and ONLY if the airline had a lounge of required level on both sides (rare except for hub-to-hub) which is kinda silly. If you only had a lounge on one side the perceived price went up by a huge amount (though less than if you had no lounges). As the vast majority are and should be one-sided the code shouldn't penalize you for only having a lounge on one side. But if you do have both then extra benefit. I do believe it meant that this extra demand wasn't ever really being used (except in rare both side lounge cases .. looking at you ALEX)

#2 B/F passengers with no lounge preference. I noticed my demand was skewed (close to 0) on routes with no lounge (though a rival airline had one) or one side had a better lounge than I did (Blames ALEX again for no reason).  I believe the calculations for the perceived price which saw one side having a lounge made my normal B/F fares too high in comparison. So I a reduction in impact for B/F passengers who have little preference is in order.

I'm sure the actual values will probably need to be modified but that's my take from poking around the code and my PR is up.

Thought this would be interesting to talk about .. if only we had in game chat  ::)
You're not flying by the seat of your pants .. You're flying Dairy Air!

alex

  • Full Member
  • ***
  • Posts: 198
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #7 on: November 05, 2018, 02:43:53 pm »
I'm reading the code myself now, to confirm what I suspect from your description.

DaProf

  • Jr. Member
  • **
  • Posts: 54
  • More than another butt in a seat at Dairy Air!
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #8 on: November 05, 2018, 05:02:42 pm »
Can confirm after more testing on my system (your mileage may vary) that what I said was indeed a major part of the issue. Some tweaking will probably be necessary for good balance but it did alleviate most of the issues. As it stands with my patch, if you are competing against a link with a lounge a small reduction in prices (2-3%) made the load factors rebound back to normal, also if the other airline increased their prices the same happened but it didn't require much.  ::)
You're not flying by the seat of your pants .. You're flying Dairy Air!

patson

  • Administrator
  • Hero Member
  • *****
  • Posts: 915
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #9 on: November 05, 2018, 05:30:27 pm »
You know the problem with making this open source is you get idiots like me who think they can fix something .. so here I go  ;D

Submitted a PR which looks like it alleviates most of the problems on my test machine but I make no guarantees. But here is what I found so far (please take it with a grain of salt)

It appears most of the issues come from a flight preference calculation that involves passengers and lounges. First of all when the demand for flights is generated new classes of passengers have been added, which in theory should mean increased demand. But these new passengers who are Business/First really want lounges .. some want level 1 .. some want level 2 .. some want level 3 .. and of course there are the ones who have no preference. These preference calculations work by adjusting the price of the offered routes up or down depending on certain factors. These "perceived" prices are then used to see if that passenger travels and on which route.


I saw two issues with preference calculations

#1. B/F passengers with a lounge preference. The code made the perceive price lower if and ONLY if the airline had a lounge of required level on both sides (rare except for hub-to-hub) which is kinda silly. If you only had a lounge on one side the perceived price went up by a huge amount (though less than if you had no lounges). As the vast majority are and should be one-sided the code shouldn't penalize you for only having a lounge on one side. But if you do have both then extra benefit. I do believe it meant that this extra demand wasn't ever really being used (except in rare both side lounge cases .. looking at you ALEX)

#2 B/F passengers with no lounge preference. I noticed my demand was skewed (close to 0) on routes with no lounge (though a rival airline had one) or one side had a better lounge than I did (Blames ALEX again for no reason).  I believe the calculations for the perceived price which saw one side having a lounge made my normal B/F fares too high in comparison. So I a reduction in impact for B/F passengers who have little preference is in order.

I'm sure the actual values will probably need to be modified but that's my take from poking around the code and my PR is up.

Thought this would be interesting to talk about .. if only we had in game chat  ::)

Many thanks for looking into the problem for me !!! ;D

Some quick thoughts:
For #1 - yes it was intentional. My thought is that i want to introduce some extra passengers of the existing ones, but these passengers are super picky and will only take flights if there are lounges along the way. My way to avoid affecting existing B/F class demand is to make both demand * 2.5 but when it does the random selection on the preference it has 2/5 chance to pick the only that has lounge requirement of 0.

So the amount of B/F passengers that has no lounge preference (no penalty of having no lounge - just like before the change) will be roughly the same as before. And the rest of the B/F passengers will be those that has lounge preference (penalty if no lounge on either side)

For #2 - it is true that if other airlines have lounge on either end, your cost will be relatively higher. However, once ur competitor's flight is 100% full, your less attractive route will still be considered. So my thought is that unless your competitor build lounge and drastically increase the supply of B/F class seats, otherwise your airline will still get B/F class filled later on.

Another thought i had this morning is that the Lounge bonus has been too heavy and some passengers decided to take crazy zigzag routes that violates this check https://github.com/patsonluk/airline/blob/master/airline-data/src/main/scala/com/patson/PassengerSimulation.scala#L219

The problem with violating this check is that the logic assume no better route can be found (the logic is - if this best route is not good enough, then there will not be any better route in next run), so it totally drops that from the next round of simulation. Therefore if alot of B/F passengers picked a crazy route due to lounge bonus, they would be rejected by that check and those B/F passengers would be sucked into the black hole and never come back again  ::) ::)

I see that a bit unlikely though, cause the disappearance of passengers seem too severe and i dun really think this explains it

hmmmmmmm.....maybe i can turn this into a difference game....


DaProf

  • Jr. Member
  • **
  • Posts: 54
  • More than another butt in a seat at Dairy Air!
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #10 on: November 05, 2018, 05:45:02 pm »
Many thanks for looking into the problem for me !!! ;D

Some quick thoughts:
For #1 - yes it was intentional. My thought is that i want to introduce some extra passengers of the existing ones, but these passengers are super picky and will only take flights if there are lounges along the way. My way to avoid affecting existing B/F class demand is to make both demand * 2.5 but when it does the random selection on the preference it has 2/5 chance to pick the only that has lounge requirement of 0.

So the amount of B/F passengers that has no lounge preference (no penalty of having no lounge - just like before the change) will be roughly the same as before. And the rest of the B/F passengers will be those that has lounge preference (penalty if no lounge on either side)

For #2 - it is true that if other airlines have lounge on either end, your cost will be relatively higher. However, once ur competitor's flight is 100% full, your less attractive route will still be considered. So my thought is that unless your competitor build lounge and drastically increase the supply of B/F class seats, otherwise your airline will still get B/F class filled later on.

Another thought i had this morning is that the Lounge bonus has been too heavy and some passengers decided to take crazy zigzag routes that violates this check https://github.com/patsonluk/airline/blob/master/airline-data/src/main/scala/com/patson/PassengerSimulation.scala#L219

The problem with violating this check is that the logic assume no better route can be found (the logic is - if this best route is not good enough, then there will not be any better route in next run), so it totally drops that from the next round of simulation. Therefore if alot of B/F passengers picked a crazy route due to lounge bonus, they would be rejected by that check and those B/F passengers would be sucked into the black hole and never come back again  ::) ::)

I see that a bit unlikely though, cause the disappearance of passengers seem too severe and i dun really think this explains it

hmmmmmmm.....maybe i can turn this into a difference game....

#1 I can see either way, but I see the lounge as an enticement to increase demand (regular as well as specialty) as well as passenger flow. It shouldn't be THAT big of an influence.

#2 The adjustments were waaaaay offscale, especially if a competitor had a class 3 lounge to compete against you. It lowered the perceived price so low that no demand anywhere near the old price level was available. Atleast in my tests.

Also as these new classes of passengers are really only able to fly on these lounge enabled routes ... would it make sense to process them first?
« Last Edit: November 05, 2018, 05:58:45 pm by DaProf »
You're not flying by the seat of your pants .. You're flying Dairy Air!
Agree Agree x 1 View List

alex

  • Full Member
  • ***
  • Posts: 198
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #11 on: November 05, 2018, 06:02:14 pm »
OK, based on my own read of the code: a general collapse in first-class and business-class passengers should not have occurred as a result of this update. So the possibilities are:

  • I have misread the code.
  • Such a drop in fact didn't happen, and some airlines that have not yet posted have seen gains in ridership - gains which possibly haven't shown a profit for them yet, because they haven't adjusted prices upwards to capture the new demand.
  • (2), except also this is happening within-airlines, and after a drawn-out rebalance of prices and quantities airlines will realize larger profits than before.
  • Something I haven't thought of.

alex

  • Full Member
  • ***
  • Posts: 198
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #12 on: November 05, 2018, 06:07:25 pm »
I also lean towards agreeing that having the lounge-demanders require lounges at both ends is kind of annoying. If they could use lounges outside your alliance, okay, maybe, but as it is too many flights have no alliance base at the other end.

I would do something like: the lounge-demanders impose a harsh penalty if there are no lounges at either end, but the penalty for having no lounge at only one end merely offsets the bonus for having a lounge at the other end.

DaProf

  • Jr. Member
  • **
  • Posts: 54
  • More than another butt in a seat at Dairy Air!
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #13 on: November 05, 2018, 06:20:16 pm »
OK, based on my own read of the code: a general collapse in first-class and business-class passengers should not have occurred as a result of this update. So the possibilities are:

  • I have misread the code.
  • Such a drop in fact didn't happen, and some airlines that have not yet posted have seen gains in ridership - gains which possibly haven't shown a profit for them yet, because they haven't adjusted prices upwards to capture the new demand.
  • (2), except also this is happening within-airlines, and after a drawn-out rebalance of prices and quantities airlines will realize larger profits than before.
  • Something I haven't thought of.

Sample Case: You and a competitor both run a route with the B/F prices at 1000/4000

Well lets just say a competitor opens up a class 1 lounge at one end of a route you both run. Here is what normal B/F passengers see.
Your prices stay at 1000/4000 .. your competitors prices are seen as 875/3600

If it was a class 3 lounge, now your competitors prices are seen as 625/2800

.. the effect is they've priced you out of the market .. passengers now see your prices as above the threshold to actually pick your route. (Or atleast my tests are showing that).

The effect of the lounge is too great.. I can it having a small "appeal" effect of maybe 5% ticket price .. but a class 3 lounge is approaching a 33% reduction in perceived prices. The competitors without lounges will have to lower their prices down near that perceived price and that makes it almost guaranteed that the big airlines will be the only ones that survive.
You're not flying by the seat of your pants .. You're flying Dairy Air!

patson

  • Administrator
  • Hero Member
  • *****
  • Posts: 915
    • View Profile
Re: Airport Lounge Malfunctioning across the globe
« Reply #14 on: November 05, 2018, 06:36:24 pm »
OK, based on my own read of the code: a general collapse in first-class and business-class passengers should not have occurred as a result of this update. So the possibilities are:

  • I have misread the code.
  • Such a drop in fact didn't happen, and some airlines that have not yet posted have seen gains in ridership - gains which possibly haven't shown a profit for them yet, because they haven't adjusted prices upwards to capture the new demand.
  • (2), except also this is happening within-airlines, and after a drawn-out rebalance of prices and quantities airlines will realize larger profits than before.
  • Something I haven't thought of.

Sample Case: You and a competitor both run a route with the B/F prices at 1000/4000

Well lets just say a competitor opens up a class 1 lounge at one end of a route you both run. Here is what normal B/F passengers see.
Your prices stay at 1000/4000 .. your competitors prices are seen as 875/3600

If it was a class 3 lounge, now your competitors prices are seen as 625/2800

.. the effect is they've priced you out of the market .. passengers now see your prices as above the threshold to actually pick your route. (Or atleast my tests are showing that).

The effect of the lounge is too great.. I can it having a small "appeal" effect of maybe 5% ticket price .. but a class 3 lounge is approaching a 33% reduction in perceived prices. The competitors without lounges will have to lower their prices down near that perceived price and that makes it almost guaranteed that the big airlines will be the only ones that survive.

Quick reply...still at work :D

The lounge impact is so huge (especially the penalty part) is due to the fact that i didn't want to "add" extra demand to the existing demand. For example if in the old model there are 100 Business passengers

With the change there will be 100 * 2.5 = 250 of them
But around 2/5 of them will have 0 lounge requirement
therefore roughly 100 of them will get no penalty for having no lounge. The new 150 passengers will almost NOT travel at all unless there are lounges offer along the way (both ends). The reasoning is that I do not want to add extra business passengers that easily :P

Now i agree that the bonus is too huge - especially for the group that has lounge requirement 0 - i agree with either diminish the bonus or eliminate it altogether to avoid affecting medium size airlines that has no lounge


Anyway...will talk a bit more after i get home