Use Case

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.

The Rules

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.


Vocabulary (Data Model)


Sample Input Data



  1. UA101 has zero capacity
  2. UA456 and UA789 only have two seats each (these should go to the gold/silver passengers)
  3. UA1111 has room but only goes to LAX (so Tom is out of luck)


Expected Results

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)


The Corticon Rule Model

The Basic Decision Table

Natural Language View

Implementation View


Subject to these constraints

  • a delayed flight is defined as one that has a status = ‘cancelled’
  • an open flight is defined as one that has a status = ‘scheduled’
  • a delayed passenger is one who is on a delayed  flight and has rebooked = ‘no’



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.

Determine Passenger Priority

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.

Test Case

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

Customer Priority

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.


Standby List

Why does this list keep changing?

The standby list will continually be updated and prioritized as customers check in and request to be added to the list.

Who is included on the standby list?

Some of the most common types of standby customers are:

  • Involuntary standby customers – Customers who missed their original flight due to an inconvenience caused by United.
  • Voluntary standby customers – Customers on eligible fares who are standing by at their own discretion.
  • Pass riders – United employees or their eligible dependents standing by on a space-available basis. Pass riders are prioritized last, and are only assigned seats after all other standby customers are accommodated.


How are standby customers prioritized?

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.