# jsantiago318/sumo-str-sim architecture

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

- Interactive diagram: https://gitdiagram.com/jsantiago318/sumo-str-sim
- Repository: https://github.com/jsantiago318/sumo-str-sim

## Overview

1. This repository is a SUMO-based traffic simulation asset set, not an application with source code. Its architecture is centered on map input, network generation, simulation scenarios, detector instrumentation, and exported results.

2. The base geographic input lives in `mapa_original/`, which contains the original road map as `mapa-pr-2.gz` and an OSM source file for editing. This is the upstream reference for all network variants.

3. `dtl_modif/` is a modified scenario built from a local map file (`mapa-pr-2.osm`) plus SUMO network artifacts. It represents one network branch used for simulation after manual editing or conversion.

4. `pureba/` is a self-contained test scenario. It includes a network definition (`net.net.xml`), network edit config (`net.netecfg`), route file (`net.rou.xml` / `sumoNet.rou.xml`), detector definitions, and a SUMO config (`sumoNet.sumocfg`). This folder looks like the main sandbox for verifying detector placement and output behavior.

5. `abr-28/` is the most complete simulation package. It contains the SUMO config, network files, additional network/route/detector artifacts, and a large set of detector-specific configuration files. This looks like the primary experiment set with multiple measurement points and output captures.

6. The core SUMO network layer appears in files such as `simulador.net.xml`, `sumo_sim.net.xml`, and `net.net.xml`, with matching route files (`*.rou.xml`) and SUMO launcher files (`*.sumocfg`). These are the main inputs that SUMO consumes at runtime.

7. Network editing is supported via NetEdit configuration files like `sim_net.netecfg` and `net.netecfg`. These tie the OSM/map source to generated SUMO network files and suggest the workflow is: edit/import map, generate network, then run simulation.

8. Detector infrastructure is a major subsystem. `pureba/` has named detectors such as `detector_entrada.xml`, `detector_final.xml`, and `detector_recta.xml`. `abr-28/sumo_config/` has many detector placement variants (`entrada_*`, `antes_*`, `despues_*`, `conteo*`, `de1_simulador.xml`, etc.), implying multiple counting/observation points along the road network.

9. The `output/csv/` subtree under `abr-28/sumo_config/` is the results boundary. It contains per-detector XML/CSV outputs generated by SUMO, showing the flow from network + routes + detectors into analysis-ready measurement files.

10. The repository’s implicit data flow is: OSM/map source in `mapa_original/` or `dtl_modif/` → network generation/editing via NetEdit configs → route and detector definitions → SUMO execution through `*.sumocfg` → detector outputs in `output/csv/`.

11. There are multiple scenario variants rather than one unified pipeline. `pureba/` is a test harness, `dtl_modif/` is a modified map/network branch, and `abr-28/` is a richer scenario with many detector and output files. An architecture diagram should show these as parallel scenario bundles sharing the same SUMO tooling pattern.

12. External tooling that matters here is SUMO itself and NetEdit. The repository is organized around those tools’ file formats, so the key boundary is between static simulation assets in the repo and the SUMO runtime that reads them and emits detector-based results.

Main entry points: [`pureba/sumoNet.sumocfg`](https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/sumoNet.sumocfg) (SUMO launch), [`abr-28/sumo_config/simulador.sumocfg`](https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/simulador.sumocfg) (SUMO launch), [`dtl_modif/sumo_sim.sumocfg`](https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/sumo_sim.sumocfg) (SUMO launch), [`pureba/net.net.xml`](https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/net.net.xml) (Test net)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_input["Map inputs"]
  node_n_osm_original["Original map<br/>OSM source<br/>[mapa-pr-2.gz]"]
end

subgraph group_g_pureba["pureba"]
  node_n_pureba_net["Test net<br/>SUMO network<br/>[net.net.xml]"]
  node_n_pureba_cfg["NetEdit cfg<br/>NetEdit config<br/>[net.netecfg]"]
  node_n_pureba_routes["Routes<br/>route files<br/>[net.rou.xml]"]
  node_n_pureba_detectors["Detectors<br/>detector defs<br/>[detector.xml]"]
  node_n_pureba_sumo["SUMO launch<br/>simulation config<br/>[sumoNet.sumocfg]"]
  node_n_pureba_aux["Aux routes<br/>route variant<br/>[sumoNet.rou.xml]"]
end

subgraph group_g_dtl["dtl_modif"]
  node_n_osm_edit["Editable OSM<br/>OSM edit source<br/>[mapa-pr-2.osm]"]
  node_n_dtl_net["Modified net<br/>SUMO network<br/>[sumo_sim.net.xml]"]
  node_n_dtl_cfg["NetEdit cfg<br/>NetEdit config<br/>[net.netecfg]"]
  node_n_dtl_add["Additions<br/>SUMO add file<br/>[sumo_sim.add.xml]"]
  node_n_dtl_routes["Routes<br/>route file<br/>[sumo_sim.rou.xml]"]
  node_n_dtl_sumo["SUMO launch<br/>simulation config<br/>[sumo_sim.sumocfg]"]
end

subgraph group_g_abr["abr-28"]
  node_n_abr_net["Main net<br/>SUMO network<br/>[simulador.net.xml]"]
  node_n_abr_cfg["NetEdit cfg<br/>NetEdit config<br/>[sim_net.netecfg]"]
  node_n_abr_det["Detector set<br/>detector defs<br/>[simulador.det.xml]"]
  node_n_abr_add["Additions<br/>SUMO add file<br/>[simulador.add.xml]"]
  node_n_abr_routes["Routes<br/>route file<br/>[simulador.rou.xml]"]
  node_n_abr_sumo["SUMO launch<br/>simulation config<br/>[simulador.sumocfg]"]
  node_n_abr_outputs[("CSV outputs<br/>result set")]
end

subgraph group_g_runtime["SUMO flow"]
end

node_n_osm_original -->|"base map"| node_n_pureba_cfg
node_n_osm_original -->|"base map"| node_n_abr_cfg
node_n_osm_edit -->|"edited map"| node_n_dtl_cfg
node_n_pureba_cfg -->|"generate"| node_n_pureba_net
node_n_pureba_net -->|"run with"| node_n_pureba_routes
node_n_pureba_detectors -->|"instrument"| node_n_pureba_sumo
node_n_pureba_routes -->|"execute"| node_n_pureba_sumo
node_n_pureba_net -->|"network"| node_n_pureba_sumo
node_n_pureba_aux -.->|"variant"| node_n_pureba_sumo
node_n_dtl_cfg -->|"generate"| node_n_dtl_net
node_n_dtl_add -->|"augment"| node_n_dtl_sumo
node_n_dtl_routes -->|"execute"| node_n_dtl_sumo
node_n_dtl_net -->|"network"| node_n_dtl_sumo
node_n_abr_cfg -->|"generate"| node_n_abr_net
node_n_abr_det -->|"instrument"| node_n_abr_sumo
node_n_abr_add -->|"augment"| node_n_abr_sumo
node_n_abr_routes -->|"execute"| node_n_abr_sumo
node_n_abr_net -->|"network"| node_n_abr_sumo
node_n_abr_sumo -->|"emit"| node_n_abr_outputs
node_n_pureba_sumo -.->|"same pattern"| node_n_abr_outputs
node_n_dtl_sumo -.->|"same pattern"| node_n_abr_outputs

click node_n_osm_original "https://github.com/jsantiago318/sumo-str-sim/blob/main/mapa_original/mapa-pr-2.gz"
click node_n_osm_edit "https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/mapa-pr-2.osm"
click node_n_pureba_net "https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/net.net.xml"
click node_n_pureba_cfg "https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/net.netecfg"
click node_n_pureba_routes "https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/net.rou.xml"
click node_n_pureba_detectors "https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/detector.xml"
click node_n_pureba_sumo "https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/sumoNet.sumocfg"
click node_n_pureba_aux "https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/sumoNet.rou.xml"
click node_n_dtl_net "https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/sumo_sim.net.xml"
click node_n_dtl_cfg "https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/net.netecfg"
click node_n_dtl_add "https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/sumo_sim.add.xml"
click node_n_dtl_routes "https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/sumo_sim.rou.xml"
click node_n_dtl_sumo "https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/sumo_sim.sumocfg"
click node_n_abr_net "https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/simulador.net.xml"
click node_n_abr_cfg "https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/sim_net.netecfg"
click node_n_abr_det "https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/simulador.det.xml"
click node_n_abr_add "https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/simulador.add.xml"
click node_n_abr_routes "https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/simulador.rou.xml"
click node_n_abr_sumo "https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/simulador.sumocfg"
click node_n_abr_outputs "https://github.com/jsantiago318/sumo-str-sim/tree/main/abr-28/sumo_config/output/csv"

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_n_osm_original toneBlue
class node_n_pureba_net,node_n_pureba_cfg,node_n_pureba_routes,node_n_pureba_detectors,node_n_pureba_sumo,node_n_pureba_aux toneAmber
class node_n_osm_edit,node_n_dtl_net,node_n_dtl_cfg,node_n_dtl_add,node_n_dtl_routes,node_n_dtl_sumo toneMint
class node_n_abr_net,node_n_abr_cfg,node_n_abr_det,node_n_abr_add,node_n_abr_routes,node_n_abr_sumo,node_n_abr_outputs toneRose
```

## Components

### Map inputs

Upstream geographic sources used to derive SUMO networks.

- [Original map](https://github.com/jsantiago318/sumo-str-sim/blob/main/mapa_original/mapa-pr-2.gz): OSM source · Compressed upstream road map reference. · `mapa_original/mapa-pr-2.gz`

### pureba

Self-contained sandbox scenario for network and detector verification.

- [Test net](https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/net.net.xml): SUMO network · Sandbox network definition for the pureba scenario. · `pureba/net.net.xml`
- [NetEdit cfg](https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/net.netecfg): NetEdit config · Network editing configuration for the test scenario. · `pureba/net.netecfg`
- [Routes](https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/net.rou.xml): route files · Vehicle route definitions for the test scenario. · `pureba/net.rou.xml`
- [Detectors](https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/detector.xml): detector defs · Detector definitions used to verify placement and output behavior. · `pureba/detector.xml`
- [SUMO launch](https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/sumoNet.sumocfg): simulation config · Main SUMO launcher for the pureba scenario. · `pureba/sumoNet.sumocfg`
- [Aux routes](https://github.com/jsantiago318/sumo-str-sim/blob/main/pureba/sumoNet.rou.xml): route variant · Additional route variant paired with the test scenario. · `pureba/sumoNet.rou.xml`

### dtl_modif

Modified map branch with generated SUMO artifacts.

- [Editable OSM](https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/mapa-pr-2.osm): OSM edit source · Local OSM map used for manual editing and network generation. · `dtl_modif/mapa-pr-2.osm`
- [Modified net](https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/sumo_sim.net.xml): SUMO network · Generated network for the modified map branch. · `dtl_modif/sumo_sim.net.xml`
- [NetEdit cfg](https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/net.netecfg): NetEdit config · Network editing configuration tying the edited OSM source to SUMO network artifacts. · `dtl_modif/net.netecfg`
- [Additions](https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/sumo_sim.add.xml): SUMO add file · Additional simulation elements for the modified branch. · `dtl_modif/sumo_sim.add.xml`
- [Routes](https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/sumo_sim.rou.xml): route file · Route definitions for the modified simulation branch. · `dtl_modif/sumo_sim.rou.xml`
- [SUMO launch](https://github.com/jsantiago318/sumo-str-sim/blob/main/dtl_modif/sumo_sim.sumocfg): simulation config · Launcher for the modified map simulation. · `dtl_modif/sumo_sim.sumocfg`

### abr-28

Primary experiment bundle with many detector variants and outputs.

- [Main net](https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/simulador.net.xml): SUMO network · Primary network used by the abr-28 experiment set. · `abr-28/sumo_config/simulador.net.xml`
- [NetEdit cfg](https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/sim_net.netecfg): NetEdit config · Network editing configuration for the primary experiment set. · `abr-28/sumo_config/sim_net.netecfg`
- [Detector set](https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/simulador.det.xml): detector defs · Central detector definition bundle for the abr-28 scenario. · `abr-28/sumo_config/simulador.det.xml`
- [Additions](https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/simulador.add.xml): SUMO add file · Supplementary simulation elements for the abr-28 scenario. · `abr-28/sumo_config/simulador.add.xml`
- [Routes](https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/simulador.rou.xml): route file · Vehicle routes for the abr-28 experiment. · `abr-28/sumo_config/simulador.rou.xml`
- [SUMO launch](https://github.com/jsantiago318/sumo-str-sim/blob/main/abr-28/sumo_config/simulador.sumocfg): simulation config · Main SUMO launcher for the abr-28 experiment set. · `abr-28/sumo_config/simulador.sumocfg`
- [CSV outputs](https://github.com/jsantiago318/sumo-str-sim/tree/main/abr-28/sumo_config/output/csv): result set · Detector output boundary containing per-detector XML/CSV artifacts. · `abr-28/sumo_config/output/csv`

## Connections

- Original map → NetEdit cfg: base map · Original map informs the generated network workflow.
- Original map → NetEdit cfg: base map · Upstream map input for the main experiment network.
- Editable OSM → NetEdit cfg: edited map · Local OSM edit is the source for the modified network branch.
- NetEdit cfg → Test net: generate · NetEdit configuration produces or updates the network.
- Test net → Routes: run with · Simulation network consumes route definitions.
- Detectors → SUMO launch: instrument · Detector definitions are loaded by the simulation config.
- Routes → SUMO launch: execute · Routes are launched through the SUMO config.
- Test net → SUMO launch: network · Simulation config references the network.
- Aux routes → SUMO launch: variant · Additional route variant can be used in the sandbox.
- NetEdit cfg → Modified net: generate · NetEdit config links edited OSM input to the network artifact.
- Additions → SUMO launch: augment · Additional elements are included in the simulation launch.
- Routes → SUMO launch: execute · Routes are consumed by the modified scenario launcher.
- Modified net → SUMO launch: network · Simulation config references the modified network.
- NetEdit cfg → Main net: generate · NetEdit config supports the primary network artifact.
- Detector set → SUMO launch: instrument · Detector bundle is loaded by the simulation launcher.
- Additions → SUMO launch: augment · Supplementary simulation elements are included at runtime.
- Routes → SUMO launch: execute · Route definitions drive the main experiment run.
- Main net → SUMO launch: network · Simulation config references the main network.
- SUMO launch → CSV outputs: emit · SUMO produces detector-level output artifacts in the CSV boundary.
- SUMO launch → CSV outputs: same pattern · Both scenarios follow the same run-to-output pattern.
- SUMO launch → CSV outputs: same pattern · Modified branch uses the same simulation-to-output flow.
