executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
plan-tour-route謀多停之行徑:優化途點、估駕/行之時、用 OSM 數據沿途發掘 POI。 含地理編碼、近鄰與 TSP 序、時/距矩算、生附景點之行程。 謀多目地之公路行或徒步行、優訪序減旅時、發掘沿途之地、 比駕/行/公共交通之選時用之。
Independent GitHub snapshot · Automated classification · Original documentation governs
謀並優化多停之行徑,附時估、距算、沿途景點。
採並結構行所必含之諸停。
Waypoint Schema:
┌──────────┬────────────────────────────────────────────┐
│ Field │ Description │
├──────────┼────────────────────────────────────────────┤
│ name │ Human-readable label for the stop │
│ address │ Street address or place name │
│ lat/lon │ Coordinates (if known; otherwise geocode) │
│ duration │ Time to spend at this stop (minutes) │
│ priority │ Must-visit vs. nice-to-have │
│ hours │ Opening/closing times (if applicable) │
│ notes │ Parking, accessibility, booking required │
└──────────┴────────────────────────────────────────────┘
分定序途點(如起終之店)與可重序之途點。
得:諸途點之結構列,至少含名與址或座標。
敗則:若途點模糊(如「該城堡」),用 WebSearch 釋為特定地。若需座標而唯有名,留至第二步地理編碼。
化諸途點為緯經座標並驗其可達。
Geocoding Sources (in preference order):
1. Nominatim (OpenStreetMap) - free, no key required
https://nominatim.openstreetmap.org/search?q=QUERY&format=json
2. Overpass API - for POI-type queries
https://overpass-api.de/api/interpreter
3. Manual coordinates from mapping services
各途點:
得:諸途點皆有有效緯經座標,諸點皆於合理地理區(無越洲之異點)。
敗則:若地理編碼無果,試他拼、加區/國限、或搜近地標。若途點於 OSM 覆稀之偏地,用 WebSearch 自旅遊網或文找座標。
定減總旅時或距之訪序。
Optimization Strategies:
┌─────────────────────┬────────────────────────────────────────┐
│ Strategy │ When to use │
├─────────────────────┼────────────────────────────────────────┤
│ Fixed order │ Stops must be visited in given sequence│
│ Nearest neighbor │ Quick approximation for 5-15 stops │
│ TSP solver │ Optimal ordering for any number │
│ Time-window aware │ Stops have opening hours constraints │
│ Cluster-then-route │ Stops span multiple days/regions │
└─────────────────────┴────────────────────────────────────────┘
近鄰啟發法:
多日之行,先依地理近聚途點,再各日內優化。
得:途點有序之序,徑無過倒回。少於 10 停者,總距當於理論最優之 20% 內。
敗則:若近鄰之果有顯倒回(後停近於前者),試反徑或用 2-opt 改進:交對邊,若縮徑則留交。時窗制者,驗各停之至時於開放時內。
對徑各段算旅時與距。
Time Estimation Methods:
┌──────────────┬────────────┬────────────────────────────────┐
│ Mode │ Avg Speed │ Notes │
├──────────────┼────────────┼────────────────────────────────┤
│ Highway │ 100 km/h │ Varies by country/road type │
│ Rural road │ 60 km/h │ Add 20% for winding roads │
│ City driving │ 30 km/h │ Add time for parking │
│ Walking │ 4.5 km/h │ Flat terrain; reduce for hills │
│ Cycling │ 15 km/h │ Touring pace with luggage │
│ Hiking │ 3-4 km/h │ Use Munter formula for accuracy│
└──────────────┴────────────┴────────────────────────────────┘
各連續途點對:
得:諸段之時/距矩,附累時計旅與停留。總行久當實(徒步行不逾日光)。
敗則:若估時不實(如 2 時於 10 km 城駕),察繞路因子是否宜。山路者,繞路因子升至 1.6-2.0。公共交通者,用 WebSearch 察實時表而非估。
將優化之徑匯為含發掘景點之完整行程。
POI Discovery (Overpass API query pattern):
[out:json];
(
node["tourism"="viewpoint"](around:RADIUS,LAT,LON);
node["amenity"="restaurant"](around:RADIUS,LAT,LON);
node["amenity"="cafe"](around:RADIUS,LAT,LON);
);
out body;
Recommended search radius:
- Along route corridor: 500 m for walking, 2 km for driving
- At waypoints: 1 km radius
立行程文:
得:完備、時預算之行程文,含實時、各停 POI 薦、實事務訊。
敗則:若 POI 查返果太多,依評或相關濾。若行程逾可用時,標較低優先停為可選或分日。若偏地無 POI,記之並建議旅人至而地察。
create-spatial-visualization — 於互動圖渲染所謀徑generate-tour-report — 將行程匯為格式之 Quarto 報plan-hiking-tour — 行內徒步段之專謀assess-trail-conditions — 察任何步行/徒步段之情