# eclipse-sumo/sumo architecture

> Architecture diagram of the GitHub repository eclipse-sumo/sumo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eclipse-sumo/sumo
- Repository: https://github.com/eclipse-sumo/sumo

## Overview

SUMO is a microscopic, multimodal urban-traffic simulation package. A typical user supplies a road network and demand, loads them into a simulation, runs traffic, and inspects results through outputs or the GUI/API. The repository also contains distinct network-import, routing, synthetic-activity-generation, and network-editing capabilities. The graph follows documented capabilities and source-index references; unsampled subsystems are represented at directory level, and their internal wiring is not inferred.

Main entry points: [`src/microsim`](https://github.com/eclipse-sumo/sumo/tree/main/src/microsim) (Microscopic simulation), [`src/traci-server`](https://github.com/eclipse-sumo/sumo/tree/main/src/traci-server) (TraCI server), [`src/netimport`](https://github.com/eclipse-sumo/sumo/tree/main/src/netimport) (Network import), [`src/netload/NLHandler.cpp`](https://github.com/eclipse-sumo/sumo/blob/main/src/netload/NLHandler.cpp) (Network loading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Network and demand"]
  node_network_import["Network import"]
  node_network_load["Network loading<br/>[NLHandler.cpp]"]
  node_route_input["Route input<br/>[RORouteHandler.cpp]"]
  node_netedit["Network editor"]
end

subgraph group_simulation["Traffic simulation"]
  node_sim_core["Microscopic simulation"]
  node_meso_core["Mesoscopic simulation"]
  node_vehicle_dynamics["Vehicle dynamics"]
  node_engine_models["Engine models"]
  node_routing_engine["Dynamic routing"]
  node_simulation_outputs["Simulation outputs"]
end

subgraph group_tools["Routing and generation"]
  node_activitygen["Activity generation"]
  node_duarouter["Demand routing"]
  node_dfrouter["Detector routing"]
  node_jtrrouter["Turning routing"]
  node_marouter["Assignment routing"]
  node_polyconvert["Polygon conversion"]
end

subgraph group_interfaces["User interfaces"]
  node_gui["Simulation GUI"]
  node_traci_server["TraCI server"]
  node_libsumo["Embedded API"]
  node_libtraci["TraCI client"]
end

subgraph group_integration["External integration"]
  node_fmi["FMI bridge"]
end

node_user(("SUMO user"))
node_sumo(("SUMO simulator"))

node_user -->|"imports network"| node_network_import
node_network_import -.->|"provides network"| node_network_load
node_user -->|"provides demand"| node_route_input
node_network_load -.->|"loads simulation"| node_sim_core
node_route_input -.->|"provides routes"| node_sim_core
node_user -->|"runs traffic"| node_sim_core
node_sim_core -.->|"uses models"| node_vehicle_dynamics
node_sim_core -.->|"uses models"| node_engine_models
node_sim_core -->|"requests reroutes"| node_routing_engine
node_sim_core -.->|"writes results"| node_simulation_outputs
node_user -->|"generates activity"| node_activitygen
node_user -.->|"routes demand"| node_duarouter
node_user -.->|"routes detector flows"| node_dfrouter
node_user -.->|"routes turns"| node_jtrrouter
node_user -.->|"assigns traffic"| node_marouter
node_user -.->|"converts shapes"| node_polyconvert
node_user -.->|"edits networks"| node_netedit
node_user -->|"views simulation"| node_gui
node_gui -.->|"controls simulation"| node_sim_core
node_user -.->|"controls remotely"| node_traci_server
node_libtraci -.->|"sends commands"| node_traci_server
node_traci_server -.->|"controls simulation"| node_sim_core
node_libsumo -.->|"accesses simulation"| node_sim_core
node_fmi -.->|"bridges simulation"| node_sim_core
node_meso_core -.->|"runs mesoscopic mode"| node_sumo
node_sim_core -.->|"runs microscopic mode"| node_sumo

click node_network_import "https://github.com/eclipse-sumo/sumo/tree/main/src/netimport"
click node_network_load "https://github.com/eclipse-sumo/sumo/blob/main/src/netload/NLHandler.cpp"
click node_route_input "https://github.com/eclipse-sumo/sumo/blob/main/src/router/RORouteHandler.cpp"
click node_netedit "https://github.com/eclipse-sumo/sumo/tree/main/src/netedit"
click node_sim_core "https://github.com/eclipse-sumo/sumo/tree/main/src/microsim"
click node_meso_core "https://github.com/eclipse-sumo/sumo/tree/main/src/mesosim"
click node_vehicle_dynamics "https://github.com/eclipse-sumo/sumo/tree/main/src/microsim/cfmodels"
click node_engine_models "https://github.com/eclipse-sumo/sumo/blob/main/src/microsim/engine/RealisticEngineModel.h"
click node_routing_engine "https://github.com/eclipse-sumo/sumo/blob/main/src/microsim/devices/MSRoutingEngine.cpp"
click node_simulation_outputs "https://github.com/eclipse-sumo/sumo/tree/main/src/microsim/output"
click node_activitygen "https://github.com/eclipse-sumo/sumo/tree/main/src/activitygen"
click node_duarouter "https://github.com/eclipse-sumo/sumo/tree/main/src/duarouter"
click node_dfrouter "https://github.com/eclipse-sumo/sumo/tree/main/src/dfrouter"
click node_jtrrouter "https://github.com/eclipse-sumo/sumo/tree/main/src/jtrrouter"
click node_marouter "https://github.com/eclipse-sumo/sumo/tree/main/src/marouter"
click node_polyconvert "https://github.com/eclipse-sumo/sumo/tree/main/src/polyconvert"
click node_gui "https://github.com/eclipse-sumo/sumo/tree/main/src/gui"
click node_traci_server "https://github.com/eclipse-sumo/sumo/tree/main/src/traci-server"
click node_libsumo "https://github.com/eclipse-sumo/sumo/tree/main/src/libsumo"
click node_libtraci "https://github.com/eclipse-sumo/sumo/tree/main/src/libtraci"
click node_fmi "https://github.com/eclipse-sumo/sumo/tree/main/src/fmi"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_network_import,node_network_load,node_route_input,node_netedit,node_user toneBlue
class node_sim_core,node_meso_core,node_vehicle_dynamics,node_engine_models,node_routing_engine,node_simulation_outputs toneAmber
class node_activitygen,node_duarouter,node_dfrouter,node_jtrrouter,node_marouter,node_polyconvert toneMint
class node_gui,node_traci_server,node_libsumo,node_libtraci toneRose
class node_fmi,node_sumo toneIndigo
```

## Components

### Network and demand

- [Network import](https://github.com/eclipse-sumo/sumo/tree/main/src/netimport): `src/netimport`
- [Network loading](https://github.com/eclipse-sumo/sumo/blob/main/src/netload/NLHandler.cpp): `src/netload/NLHandler.cpp`
- [Route input](https://github.com/eclipse-sumo/sumo/blob/main/src/router/RORouteHandler.cpp): `src/router/RORouteHandler.cpp`
- [Network editor](https://github.com/eclipse-sumo/sumo/tree/main/src/netedit): `src/netedit`

### Traffic simulation

- [Microscopic simulation](https://github.com/eclipse-sumo/sumo/tree/main/src/microsim): `src/microsim`
- [Mesoscopic simulation](https://github.com/eclipse-sumo/sumo/tree/main/src/mesosim): `src/mesosim`
- [Vehicle dynamics](https://github.com/eclipse-sumo/sumo/tree/main/src/microsim/cfmodels): `src/microsim/cfmodels`
- [Engine models](https://github.com/eclipse-sumo/sumo/blob/main/src/microsim/engine/RealisticEngineModel.h): `src/microsim/engine/RealisticEngineModel.h`
- [Dynamic routing](https://github.com/eclipse-sumo/sumo/blob/main/src/microsim/devices/MSRoutingEngine.cpp): `src/microsim/devices/MSRoutingEngine.cpp`
- [Simulation outputs](https://github.com/eclipse-sumo/sumo/tree/main/src/microsim/output): `src/microsim/output`

### Routing and generation

- [Activity generation](https://github.com/eclipse-sumo/sumo/tree/main/src/activitygen): `src/activitygen`
- [Demand routing](https://github.com/eclipse-sumo/sumo/tree/main/src/duarouter): `src/duarouter`
- [Detector routing](https://github.com/eclipse-sumo/sumo/tree/main/src/dfrouter): `src/dfrouter`
- [Turning routing](https://github.com/eclipse-sumo/sumo/tree/main/src/jtrrouter): `src/jtrrouter`
- [Assignment routing](https://github.com/eclipse-sumo/sumo/tree/main/src/marouter): `src/marouter`
- [Polygon conversion](https://github.com/eclipse-sumo/sumo/tree/main/src/polyconvert): `src/polyconvert`

### User interfaces

- [Simulation GUI](https://github.com/eclipse-sumo/sumo/tree/main/src/gui): `src/gui`
- [TraCI server](https://github.com/eclipse-sumo/sumo/tree/main/src/traci-server): `src/traci-server`
- [Embedded API](https://github.com/eclipse-sumo/sumo/tree/main/src/libsumo): `src/libsumo`
- [TraCI client](https://github.com/eclipse-sumo/sumo/tree/main/src/libtraci): `src/libtraci`

### External integration

- [FMI bridge](https://github.com/eclipse-sumo/sumo/tree/main/src/fmi): `src/fmi`

### Other components

- **SUMO user**
- **SUMO simulator**

## Connections

- SUMO user → Network import: imports network
- Network import → Network loading: provides network
- SUMO user → Route input: provides demand
- Network loading → Microscopic simulation: loads simulation
- Route input → Microscopic simulation: provides routes
- SUMO user → Microscopic simulation: runs traffic
- Microscopic simulation → Vehicle dynamics: uses models
- Microscopic simulation → Engine models: uses models (evidence: `src/microsim/engine/RealisticEngineModel.h`)
- Microscopic simulation → Dynamic routing: requests reroutes (evidence: `src/microsim/devices/MSRoutingEngine.h`)
- Microscopic simulation → Simulation outputs: writes results
- SUMO user → Activity generation: generates activity
- SUMO user → Demand routing: routes demand
- SUMO user → Detector routing: routes detector flows
- SUMO user → Turning routing: routes turns
- SUMO user → Assignment routing: assigns traffic
- SUMO user → Polygon conversion: converts shapes
- SUMO user → Network editor: edits networks
- SUMO user → Simulation GUI: views simulation
- Simulation GUI → Microscopic simulation: controls simulation
- SUMO user → TraCI server: controls remotely
- TraCI client → TraCI server: sends commands
- TraCI server → Microscopic simulation: controls simulation
- Embedded API → Microscopic simulation: accesses simulation
- FMI bridge → Microscopic simulation: bridges simulation
- Mesoscopic simulation → SUMO simulator: runs mesoscopic mode
- Microscopic simulation → SUMO simulator: runs microscopic mode
