Route optimization

From dotanminh/travel-optimization-engine · View interactive version

Route optimization is an AI agent skill from the GitHub repository dotanminh/travel-optimization-engine. Use when direct flights are expensive and traveler is open to layovers. Triggers on cheaper route, alternative routing, transit hub, is a layover worth it, save money with connection.

How to use this skill

Skill file

Route Optimization - Tối Ưu Lộ Trình Qua Điểm Trung Chuyển

Purpose

Most travelers search for direct flights by default. They don't know that routing through a strategic hub can save $200-500 with only 2-3 extra hours. This skill quantifies that trade-off precisely: "Is $350 savings worth 2.5 extra hours?"

Input Required

Execution Steps

Step 1: Establish Baseline

The baseline is the direct or fastest route found by flight-search:

BASELINE: HAN → SFO
  Price: $1,100 | Duration: 13.5h (direct, VN Airlines)
  This is the benchmark everything else is compared against.

Step 2: Identify Strategic Hubs

Based on the origin-destination pair, select top hub candidates:

Decision logic for hub selection:

| O&D Region | Top Hubs to Check | Why |

|-----------|-------------------|-----|

| Vietnam → US West | ICN, NRT, TPE, HKG | Short detour, competitive pricing |

| Vietnam → US East | DOH, IST, ICN | Middle East hubs or Pacific routing |

| Vietnam → Europe | IST, DOH, DXB, BKK | Turkish=cheapest, Gulf=quality |

| Vietnam → Oceania | SIN, KUL, BKK | LCC connections available |

| Vietnam → Japan | TPE, HKG | Short detour for cheaper fares |

| Intra-Vietnam | No hubs needed | Direct always optimal |

Step 3: Calculate Each Alternative Route

For each hub route, compute:

savings_usd     = baseline_price - hub_route_price
extra_hours     = hub_route_duration - baseline_duration
savings_per_hour = savings_usd / extra_hours

Value rating system:

| $/hour saved | Rating | Recommendation |

|-------------|--------|---------------|

| > $100/hr | ⭐⭐⭐ Excellent | Always worth it |

| $50-100/hr | ⭐⭐ Good | Worth it for most travelers |

| $25-50/hr | ⭐ Acceptable | Worth it if flexible |

| < $25/hr | ❌ Poor | Only for extreme budget |

Step 4: Flag Special Considerations

For each alternative route, check:

  1. Transit visa required?
  1. Ground transportation needed?
  1. Minimum connection time?
  1. Layover quality?

Step 5: Present Results

ROUTE ALTERNATIVES vs BASELINE: HAN → SFO ($1,100, 13.5h)

#  Via Hub    Price   Saved   Extra Time  $/Hour   Rating
1  ICN       $750    $350    +3.0h       $117/hr  ⭐⭐⭐ Excellent
2  NRT       $820    $280    +2.5h       $112/hr  ⭐⭐⭐ Excellent
3  TPE       $790    $310    +4.0h       $78/hr   ⭐⭐ Good
4  IST       $680    $420    +8.0h       $53/hr   ⭐⭐ Good
5  BKK+NRT   $620    $480    +12.0h      $40/hr   ⭐ Acceptable

RECOMMENDATION (moderate risk tolerance):
  Route via ICN: Best value at $117/hr saved.
  You save $350 and only add 3 hours (1 layover at Incheon, one of Asia's
  best airports with transit hotel and free showers).

NOTE: Route 5 involves ground+air combination. See details below.

Step 6: Ground Transport Flag

If any route involves non-flight segments:

⚠️ GROUND TRANSPORT REQUIRED:
  Route 5 (BKK+NRT): Requires separate VietJet HAN→BKK, then
  overnight in Bangkok, then BKK→NRT→SFO next day.
  Additional costs: Hotel $30-50, airport transfer $10-15
  Net savings after ground costs: $415-445

Traveler Type Adjustments

| Profile | Threshold | Recommendation Bias |

|---------|-----------|-------------------|

| Business | > $100/hr | Only recommend ⭐⭐⭐ routes |

| Leisure | > $50/hr | Recommend ⭐⭐ and above |

| Budget/Remote | > $25/hr | All rated options |

| Family w/ kids | > $75/hr | Penalize 2+ stop routes, long layovers |

Limitations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.