Given information about passengers, the flights they are booked on and alternative flights, attempt to rebook passengers when their flight is cancelled. Higher priority flyers should get earlier alternative flights where possible. Assume all the flights are non-stop for this challenge.
Passengers must only be rebooked on to alternative flights if there is room.
Higher priority passengers must be rebooked onto the earlier flights
The alternative flight must depart from the same airport as the cancelled flight.
The alternative flight must land at the destination airport of the cancelled flight
The alternative flight must depart after the cancelled flight’s original departure time.
Flight status must be ‘scheduled’ or ‘cancelled’ or ‘full’
Priority must be determined by status (in the order ‘gold’, ‘silver’, ‘bronze’, other) and miles flown in the event of tie.
Jenny and Harry are booked on the early flight (UA456) since they have the highest priority.
It is apparently a very small plane and so there is no more room for anyone else.
Igor and *** get on the next flight (UA789)
Poor Tom is unable to be rebooked from the cancelled flight since there are no seats available on the plane that goes to SNA and the only remaining plane with room goes to LAX. Of course we could add rules to select alternative airports within a certain distance of the destination (extra points if you do this)
Subject to these constraints:
These constraints can be implemented in the Filter section of the rule sheet:
The scope section is where we define the aliases to the various views of flights and passengers.
Used in conjunction with the filters this enables us to identify different subgroups of the flights and passengers to be used in the rules.
This is determined from a combination of their status and miles flown.
The rules for this are:
This rule sheet will keep working until every passenger has been assigned a priority.
Jenny has the highest priority and so gets rebooked first, followed by Harry on the earliest flight
Igor and *** get on the next flight after that.
And poor Tom is out of luck. The only flight with seats (UA111) is not going to SNA. And the one going to SNA (UA1001) is already full.
Explore when all the conditions are expressed as filters
Explore when all the filters are expressed as conditions
Some actual rules from United’s website
Fare class structure for Global Premier Upgrades, in priority order, is: J, C, D, Z, P (for upgrades from United Business to United First® or United BusinessFirst to United Global FirstSM on three-cabin aircraft) and Y, B, M, E, U, H, Q, V, W, S, T, L, K, G, N (for upgrades from United Economy to the next higher class of service on all aircraft). Note that on some flights, Global Premier Upgrades are not available for fare classes Z, P, S, T, L, K, G and N.
The standby list will continually be updated and prioritized as customers check in and request to be added to the list.
Some of the most common types of standby customers are:
Customers standing by are ranked by MileagePlus Premier® status. Specifically, United Global ServicesSM members will have the highest priority, followed by Premier 1K®, Premier Platinum, Premier Gold, Premier Silver members and then all remaining customers. If there are multiple customers with the same Premier status, the fare class originally purchased will be used to determine priority. In the event there are multiple customers with the same Premier status and fare class, the time that the customer was added to the standby list will be the determining factor.