Skip to content

Latest commit

 

History

History
66 lines (54 loc) · 2.2 KB

File metadata and controls

66 lines (54 loc) · 2.2 KB

Architecture

System overview

TSP Algorithm Lab is split into three modules with clear responsibilities.

flowchart TB
    subgraph Frontend
        PAGES[React pages]
        GRAPH[Euclidean graph views]
        MAP[Leaflet geographical views]
        BATTLE[LLM Battle comparison]
        CLIENT[Generated TypeScript API client]
    end

    subgraph Backend
        CONTROLLERS[REST controllers]
        SERVICES[Resource and algorithm services]
        ALGORITHMS[TSP algorithms]
        ADAPTER[OwnTsplibAdapter]
    end

    subgraph ParserLibrary
        PARSER[OwnTsplibParser]
        MODEL[TSPLIB data model]
        RESOURCES[Benchmark instances and tours]
    end

    PAGES --> CLIENT
    GRAPH --> PAGES
    MAP --> PAGES
    BATTLE --> PAGES
    CLIENT --> CONTROLLERS
    CONTROLLERS --> SERVICES
    SERVICES --> ALGORITHMS
    CONTROLLERS --> ADAPTER
    ADAPTER --> PARSER
    PARSER --> MODEL
    PARSER --> RESOURCES
Loading

Backend request flow

  1. The frontend requests instance metadata, an instance, a known tour, or an algorithm result.
  2. A Spring REST controller validates the route parameters.
  3. ResourceService discovers bundled .tsp and .tour resources.
  4. OwnTsplibAdapter delegates parsing to the custom parser library.
  5. GraphMapper converts parsed data into the internal graph representation.
  6. TspAlgorithmService selects the registered Spring algorithm component.
  7. The algorithm returns a TspSolution containing tour length, path, and runtime.
  8. The frontend visualizes the response as a graph, table, modal, or map.

Frontend pages

Page Responsibility
Home Project context and navigation
Algorithms Educational comparison of algorithm concepts
LLM Battle Side-by-side comparison of Simulated Annealing implementations
Euclidean Instances Instance table, graph rendering, tours, and algorithm execution
Geographical Instances Leaflet maps, route overlays, and geographic data

Build relationship

The frontend produces static assets in ealg-react-frontend/assets/. During a full Maven build, the application module copies those assets into the Spring Boot static resource directory inside the generated application artifact.