Route maximizer

Routing rule:


Maximum number of segments per trip:   Cost of a trip: $
Segment minimum miles awarded:
Use shortcuts for city codes (substitute "JFK" for "NYC" and so on):
Allow skipping stops (disable to reduce number of results):
Enable highlight-on-click of routes by segment type (slow for lots of results):
Allow revisiting a stop:
Only show routes that begin at and end at .
Maximum number of results to show:

If you have a complicated routing rule, this might take a while.

What is this thing? This is a tool to display the number of redeemable miles you'd get from every possible routing that could theoretically result from a routing rule as published in fare rules from airlines. Such a calculation would be especially useful for planning mileage runs.

How to use. Type in a routing rule, in one of the usual formats, and click "Calculate". For example, here is a PHX-NYC routing rule:

PHX-AA-LAX/SEA/SNA-AA-DFW-AA-BNA-AA-DCA/IAD/BWI(AA/US/CO)LGA/EWR/JFK
Here is a similar routing rule, using an alternate format:
FROM PHX-AA-LAX/SEA/SNA-AA-
TO STL-AA-DCA/IAD/BWI-AA-LGA/JFK/EWR*
OR TO SEA-AA-ORD/MDW-AA-DCA/IAD/BWI-AA-LGA/JFK/EWR*
OR TO DFW-AA-BNA-AA-DCA/IAD/BWI-AA-LGA/JFK/EWR*
Rules that include "VIA" and "FROM-TO" are also supported. Finally, here is another type of routing rule:
VALID SINGLE CONNECT CITIES FROM:  LAX TO LGA/EWR                  
ATL BOS BUR CHI GSO HOU ICT IND LAS MIA
You can only enter one rule of the "VALID SINGLE CONNECT CITIES" type at a time. If you like, you can enter the cost of the fare in the "Cost of a trip" box and the results will include the cost per mile for each trip.

This tool will ignore airline codes (such as "AA" in the examples), and it will substitute specific airports for city codes (like "JFK" for "NYC"), on the assumption that it doesn't make that much difference in mileage and that you would know to try nearby airports when trying to book a trip. If you don't like this, you can specify the airports yourself (like "JFK/LGA/EWR" for "NYC", or whatever airports the fare specifies). If you select "No" for the "Use shortcuts for city codes" option, the tool will give you an error message if it finds a city code, which is useful when you want to be sure it isn't silently making substitutions. If you are only interested in great circle distances, set the "Segment minimum miles awarded" to 0.

If you get weird error messages, make sure your routing rule doesn't have malformed syntax.

Known issues: If you don't use the correct syntax, the results might be really screwed up. If you have an insanely complicated routing rule, this tool will refuse to process it, because I don't want the server getting too bogged down. And, it doesn't know every single city or airport code.

Also, if you use Mac OS X Tiger or later, I wrote a Dashboard widget that you can use to look up IATA airport and airline codes.

Problems? Questions? Comments? I'm ttjoseph on FlyerTalk.