![]() |
RTW optimizer tool I've been developing
Hi folks,
Long time lurker, first time poster. This weekend I put together a basic command-line tool for optimizing oneworld Explorer RTW tickets. It handles validation against Rule 3015, cost estimates (including carrier surcharges), BA NTP calculations, segment value ratings, route searches with live pricing, D-class availability checks via ExpertFlyer, and booking scripts. Has Claude Code harnesses built in - and best used in conjunction with a Serpapi key and an expertflyer paid account. It's open-source and early-stage—check it out here if interested: https://github.com/kavanaghpatrick/rtw-optimizer Feedback or suggestions welcome; I'm just hoping it might help someone. https://cimg1.ibsrv.net/gimg/www.fly...c051d4d4af.png |
Originally Posted by xelnaga
(Post 37588772)
This weekend I put together a basic command-line tool for optimizing oneworld Explorer RTW tickets.
|
Originally Posted by xelnaga
(Post 37588772)
Hi folks,
Long time lurker, first time poster. This weekend I put together a basic command-line tool for optimizing oneworld Explorer RTW tickets. It handles validation against Rule 3015, cost estimates (including carrier surcharges), BA NTP calculations, segment value ratings, route searches with live pricing, D-class availability checks via ExpertFlyer, and booking scripts. Has Claude Code harnesses built in - and best used in conjunction with a Serpapi key and an expertflyer paid account. It's open-source and early-stage—check it out here if interested: https://github.com/kavanaghpatrick/rtw-optimizer Feedback or suggestions welcome; I'm just hoping it might help someone. https://cimg1.ibsrv.net/gimg/www.fly...c051d4d4af.png
|
Originally Posted by Dr. HFH
(Post 37590377)
I think that you need to determine your definition of optimizing. Some people optimize for most efficient flight schedule. Others optimize for cities in a specific sequence, others don't care about the sequence as long as all the stopovers are hit. Some (like me) optimize to hit a few required stopovers, then maximize mileage for the rest of the itinerary as MRs up to the 16 flights. It's complicated.
|
Originally Posted by Mwenenzi
(Post 37590465)
Have you tested all the rules?
1. 4(c) open-jaw validation — Permitted surface pair checking 2. 4(f) country-of-origin intl departure limit — 1 intl departure/arrival from origin country (US exception) 3. 4(i) transoceanic surface ban — No surface between TC1-TC2 / TC1-TC3 (SWP exception) 4. 4(j) codeshare validation — QF/JQ permitted, AS/IB stock restriction 5. 4(l) Australia transcontinental — East coast-PER/DRW/BME/KTA nonstop limits 6. Section 8 city-pair direction — Same pair, same direction banned 7. (bonus) DOH transit continent counting — Implicit Asia count for SWP-EU/ME single flight Will work on this in the coming days - thanks for the feedback, |
Originally Posted by xelnaga
(Post 37591089)
Just did an audit based on your questions: Summary: 6 Missing Rules to Implement
1. 4(c) open-jaw validation — Permitted surface pair checking 2. 4(f) country-of-origin intl departure limit — 1 intl departure/arrival from origin country (US exception) 3. 4(i) transoceanic surface ban — No surface between TC1-TC2 / TC1-TC3 (SWP exception) 4. 4(j) codeshare validation — QF/JQ permitted, AS/IB stock restriction 5. 4(l) Australia transcontinental — East coast-PER/DRW/BME/KTA nonstop limits 6. Section 8 city-pair direction — Same pair, same direction banned 7. (bonus) DOH transit continent counting — Implicit Asia count for SWP-EU/ME single flight Will work on this in the coming days - thanks for the feedback, |
Originally Posted by Mwenenzi
(Post 37591649)
The various rule 4 clauses are very basic.
Rule: §4(c) Open-jaw File: rule_4c_open_jaw.yaml Expected: FAIL Actual: FAIL Key Output: "LHR→CDG: not permitted. United Kingdom and France are not a permitted open-jaw pair" ──────────────────────────────────────── Rule: §4(f) Country limit File: rule_4f_country_limit.yaml Expected: FAIL Actual: FAIL Key Output: "2 intl departures from UK — limit is 1" + "2 intl arrivals into UK — limit is 1" ──────────────────────────────────────── Rule: §4(i) Surface ban File: rule_4i_surface_ban.yaml Expected: FAIL Actual: FAIL Key Output: "1 transoceanic surface sector (LAX→LHR) — not permitted" ──────────────────────────────────────── Rule: §4(j) Codeshare File: rule_4j_codeshare.yaml Expected: FAIL+WARN Actual: FAIL+WARN Key Output: S7 VIOLATION + JQ/IB plating WARNING ──────────────────────────────────────── Rule: §4(l) AU transcon File: rule_4l_au_transcon.yaml Expected: FAIL Actual: FAIL Key Output: "2 AU transcontinental between east coast and Perth — only 1 permitted" ──────────────────────────────────────── Rule: §8 City-pair File: rule_s8_citypair.yaml Expected: FAIL Actual: FAIL Key Output: "DOH→LHR flown 2 times. Resolved as DOH→LON (same city group)" ──────────────────────────────────────── Rule: Implicit Asia File: rule_implicit_asia.yaml Expected: PASS+INFO Actual: PASS+INFO Key Output: "SYD-DOH cross Asian airspace. Asia counted as visited continent" 7/7 rules triggered their expected violations/warnings. Every rule correctly identifies the specific issue and provides actionable fix suggestions. |
This itinerary using some of the more obscure rules -- post 1266
|
Originally Posted by Mwenenzi
(Post 37598617)
This itinerary using some of the more obscure rules -- post 1266
- **Status**: PASS - **Ticket**: DONE5 (Business) from OSL - **Passengers**: 1 - **Segments**: 16 flown, 0 surface - **Rules**: 35/38 passed - **Violations**: 0 - **Warnings**: 3 ### Rule Results | Rule | Status | Severity | Message | |-----------------------------------|--------|------------|---------| | Segment Count | PASS | violation | 16 segments (limit: 16). | | Per-Continent Segment Limit | PASS | violation | EU_ME: 2/4 segments. | | Per-Continent Segment Limit | PASS | violation | SWP: 1/4 segments. | | Per-Continent Segment Limit | PASS | violation | N_America: 6/6 segments. | | Segment Connectivity | PASS | violation | All segments connected. | | Direction of Travel | PASS | violation | Continuous eastbound direction: TC2 → TC3 → TC1 → TC2. | | Ocean Crossings | PASS | violation | Pacific crossing: 1 (OK). | | Ocean Crossings | PASS | violation | Atlantic crossing: 1 (OK). | | City-Pair Direction | PASS | violation | No duplicate city-pair directions detected. | | Minimum Stopovers | PASS | violation | 8 stopovers (minimum: 2). | | Origin Continent Stopover Limit | FAIL | warning | 4 stopovers in origin continent EU_ME (limit: 2). Verify with AA RTW desk whether return-leg stopovers count.<br>Fix: Make intermediate return stops into transits (<24h) or confirm exemption with booking desk. | | Origin Country Stopover Per Direction | PASS | violation | Origin country stopovers: 0 outbound, 1 return (limit: 1/direction). | | Same-City Visit Limit | PASS | violation | Same-city visits: OK (max 3 at DOH). | | First Segment Not Surface | PASS | violation | First segment is a flown segment. | | Same-City Resolution | PASS | violation | No same-city pairs detected. | | Transoceanic Surface Sectors | PASS | violation | No transoceanic surface sectors. | | Hawaii & Alaska Restrictions | PASS | violation | Hawaii/Alaska restrictions: OK. | | US Transcontinental Limit | PASS | violation | US transcontinental flights: 1/1. | | AU Transcontinental Limit | PASS | violation | No AU transcontinental flights detected. | | Implicit Continent: Asia | PASS | info | 1 direct EU/ME↔SWP flight(s) (DOH-AKL) cross Asian airspace. Asia counted as visited continent for pricing. | | QR Not First Carrier | FAIL | warning | Qatar Airways (QR) is the first carrier. The online booking tool cannot issue tickets starting with QR; book via AA RTW desk (+1 800 843 3000) or a travel agent.<br>Fix: Start with a different carrier, or book by phone through the AA RTW desk. | | Eligible Carriers | PASS | violation | All carriers are eligible oneworld members. | | QF/Jetstar Codeshare | PASS | violation | No codeshare restrictions applicable. | | Return to Origin | PASS | violation | Returns to origin: OSL (same city as OSL). | | Open-Jaw Permitted Pairs | PASS | violation | Returns to origin — not an open jaw. | | Continent Count | FAIL | warning | Visiting 6 continents but ticket is for 5. Continents: EU_ME, Africa, SWP, N_America, S_America, Asia.<br>Fix: Adjust ticket type to DONE6 or modify routing to visit exactly 5 continents. | | Ticket Validity Period | PASS | info | Insufficient dates to check validity period. | | Origin Matches First Segment | PASS | violation | Origin OSL matches first segment departure OSL. | | Date Sequence | PASS | info | Insufficient dates to check sequence. | | Hemisphere Revisit | PASS | info | Hemisphere revisit check passed. Sequence: EU_ME -> Africa -> EU_ME -> SWP -> N_America -> S_America -> N_America -> EU_ME. EU_ME visited 3/2 times (northern hemisphere allows 2) \| N_America visited 2/2 times (northern hemisphere allows 2) | | EU/ME-Africa Zone Restriction | PASS | violation | EU/ME-Africa zone: no excluded airports found. | | Intercontinental Arrival/Departure Limit | PASS | info | Africa: 1/1 intercontinental arrivals, 1/1 departures. | | Intercontinental Arrival/Departure Limit | PASS | info | EU_ME: 2/2 intercontinental arrivals, 2/2 departures. | | Intercontinental Arrival/Departure Limit | PASS | info | N_America: 2/2 intercontinental arrivals, 2/2 departures. | | Intercontinental Arrival/Departure Limit | PASS | info | SWP: 1/1 intercontinental arrivals, 1/1 departures. | | Intercontinental Arrival/Departure Limit | PASS | info | S_America: 1/1 intercontinental arrivals, 1/1 departures. | | Origin Country Intl Flights | PASS | info | Norway international flights: 1/1 departures, 1/1 arrivals. | | Origin Country Return Ban | PASS | violation | No mid-journey return to Norway. | |
| All times are GMT -6. The time now is 10:01 pm. |
This site is owned, operated, and maintained by MH Sub I, LLC dba Internet Brands. Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Designated trademarks are the property of their respective owners.