5 ms·
def buy_ticket(): if soldout: return False
by nathancahill 9y ago
def buy_ticket():
if soldout:
return False
- wallacoloo 9y agoI mean, don't we already have "standby flying" where you can show up at the last call time and claim seats purchased by no-showers? The bit about having to overbook to fill capacity is bogus - as long as standby flights are cheap enough, people will accept the inconvenience/risk of standby flying and fill the remaining seats. Of course, the real issue is a monetary one for the airlines because standby tickets have to be discounted. But as a customer, I still advocate against overbooking.
- jasode 9y ago>as long as standby flights are cheap enough, people will accept If you're open to using financial incentives like cheaper pre-arranged "standby" flights, why is that better than auctioning cash/vouchers to willing passengers volunteering to be bumped? The problem with your proposal is that all the passengers are forever sorted into "guaranteed" and "standby" according to first-come-first-served: |timeline of bookings -->--> |-- guaranteed --|--- standby --| However, order-by-reservation-timing does not reflect the true priorities of the passengers on the day of the flight. Many of (possibly most) of the passengers that bought the earlier "guaranteed seats" happen to be the ones most willing to accept financial compensation for bumping. In terms of game theory and fairness, calculated overbooking based on stable historical trends seems to be the most optimal strategy that benefits the most people. The real issue is that the airlines implement the compensation incorrectly. Instead of blaming the overbooking, blame the airlines' compensation rules: 1) offer cash instead of vouchers 2) eliminate silly rules about caps 3) start the auction process as early as possible in the lounge area instead of waiting until the last minute by standing in the aisle of the plane with a bunch of impatient passengers. (With American Airlines, their check-in kiosks will sometimes alert passengers and give them the option of being voluntarily bumped.)
- jasode 9y agoThat simplistic code will result in airplanes flying with empty seats. Since jet fuel airplanes are probably the most expensive form of travel that's 2nd only to space tourism flights on liquid oxygen rockets, it would be an irresponsible waste of energy. To be clear about the specific problem we're trying to solve, it's the involuntary bumping instead of the voluntary ones. Why is using "empty seats" the superior solution instead of raising the financial incentives to attract volunteers to be bumped?
- mipmap04 9y ago>Why is using "empty seats" the superior solution to raising the financial incentives to attract volunteers be bumped? I travel 90% of the year and there is no reasonable financial incentive (especially if they are just flight vouchers) they could offer that would make me volunteer my seat. If I'm travelling, it's for business and I have no desire to be late. If it's travelling back home, I want to see my family and I'm not going to miss that flight if I don't have to. On busy commuter flights, I would imagine most passengers share my sentiment. This would ultimately lead us into a situation where someone is randomly removed from the aircraft against their will. Furthermore, being offered flight vouchers to give up your seat is really stupid on commuter flights. Pretty much every person on those flights has more miles than they know what to do with. Offer cash instead.
- burntcookie90 9y agoThen you're not the target. There are people that will say yes to this
- jonnathanson 9y agoI'm a heavy business traveler, though not a business commuter per se. In my experience with oversold flights, there are a few people who will eventually cave and take the buyout -- but I want to place sharp emphasis on the word eventually. The moment an airline attendant announces an oversold situation, that announcement kicks off a frantic battle between dopey consumer game theory calculus on the one hand, and rigid airline offer-escalation procedure on the other. This slow, maddeningly predictable war of attrition often results in delays of 45 minutes or more. Those delays cascade into further delays when the flight misses its departure window. We have a "not enough dopes" problem. There need to be more people willing to take buyouts, and since that's not happening, we can consider pretty much any alternative solutions that make sense.
- opticalflow 9y agoHere, I fixed it for you: if (globalservices) { yourescrewed=0; upgradeprobability=0.25f; bumpprobability=0.0f; } else if (united1k) { yourescrewed=1; upgradeprobability=0.10f; bumpprobability=0.01f; } else if (unitedplatinum) { yourescrewed=1; upgradeprobability=0.05f; bumpprobability=0.05f*(1-premiumeconomy*0.5); } else if (unitedgold) { yourescrewed=1; upgradeprobability=0.001f; bumpprobability=0.10f*(1-premiumeconomy*0.5); } else if (unitedsilver) { yourescrewed=2; upgradeprobability=0.000001f; bumpprobability=0.10f; } else if (any_other_schmuck) { yourescrewed=NaN; go_f_yourself=1*(united_basic_economy); assault_probability=0.01f; upgradeprobability=0.0f; bumpprobability=0.20f; baggage_fees=1; }
- SeoxyS 9y agoThe probability of a bump for a 1K is more like 0.00001f (Source: I'm 1K). Basically they'd have to bump every other non-elite and lower-elite before even getting to you. The only time it can happen is if a gate agent screws up (unloads you as a no-show before the 15min mark, or clears you from standby into an already occupied seat (this has happened to me). Also I would say a GS upgrade probability is closer to 0.9f. 1K can be anywhere from 0.1f to 0.8f depending on the routes flown (a consultant flying hub-to-hub around beginning / end of week will be 0.1f; me flying leisure routes mid-week will be 0.8f).
- snappy173 9y agoaddEventListener("beforeboarding", function() { if(booked > capacity) { let price = ticket.faceValue; let ticketsToBuy = booked - capacity; while (ticketsToBuy > 0) { if (offerToBuyBackTicket(price)) { ticketsToBuy--; } else { price++; } //if (price > limit) { // callInPinkertonThugs(); // return; //} } } }
- secfirstmd 9y agoCan confirm this works. Running this script works well for any Ryanair flight I've ever gotten.
- awkward 9y agoMore likely to be solved in hardware, eg a giant spring placed under the coach seats.