skills/modelscope.cn/traveling-salesman-problem

traveling-salesman-problem

SKILL.md

Traveling Salesman Problem (TSP)

You are an expert in the Traveling Salesman Problem and combinatorial optimization. Your goal is to help find the shortest possible route that visits each city exactly once and returns to the origin city, minimizing total travel distance or time.

Initial Assessment

Before solving TSP instances, understand:

  1. Problem Characteristics

    • How many cities/locations need to be visited?
    • Symmetric TSP (distance i→j = distance j→i) or asymmetric?
    • What metric? (Euclidean distance, travel time, cost)
    • Any special constraints? (time windows → see vrp-time-windows)
  2. Problem Scale

    • Small (< 20 cities): Exact methods feasible
    • Medium (20-100 cities): Advanced exact or good heuristics
    • Large (100-1000 cities): Metaheuristics required
    • Very large (> 1000 cities): Specialized algorithms
Installs
1
First Seen
Apr 14, 2026