# 105558371/tree-based-searches architecture

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

- Interactive diagram: https://gitdiagram.com/105558371/tree-based-searches
- Repository: https://github.com/105558371/tree-based-searches

## Overview

The repository combines two traffic-related products: a graph-search route-finding CLI and a traffic-flow forecasting/route-integration assignment. The route workflow parses a problem graph, dispatches a selected search strategy, and prints a path or failure. The forecasting code prepares time-series inputs, trains/evaluates spatio-temporal models, and estimates travel time from flow. The supplied root README names these broad capabilities, but the assignment READMEs and several implementation files were not excerpted; links between forecasting, map alignment, data preparation, and route guidance are therefore not inferred.

Main entry points: [`Assignment_2A/src/search.py`](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/search.py) (Search CLI), [`Assignment_2B/research/train.py`](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/research/train.py) (Train and evaluate), [`Assignment_2A/src/algos.py`](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/algos.py) (Search algorithms), [`Assignment_2B/core/tune.py`](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/core/tune.py) (Model tuning)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Graph Route Search"]
  node_search_cli["Search CLI<br/>[search.py]"]
  node_graph_parser["Graph parser<br/>[parser.py]"]
  node_search_algorithms["Search algorithms<br/>[algos.py]"]
  node_multi_dest["Multi-destination search<br/>[research.py]"]
  node_search_utils["Search utilities<br/>[utils.py]"]
  node_route_result["Path result<br/>[search.py]"]
end

subgraph group_traffic["Traffic Data Integration"]
  node_traffic_data["Traffic datasets"]
  node_travel_time["Flow-to-travel time<br/>[travel_time.py]"]
  node_site_mapping["Site coordinate mapping<br/>[coords_mapping.py]"]
  node_map_check["Map checks<br/>[check_map.py]"]
  node_aligned_sites["Aligned site data<br/>[sites_aligned.json]"]
end

subgraph group_forecast["Traffic Forecasting"]
  node_data_prep["Forecast data preparation<br/>[prepare_data.py]"]
  node_training["Train and evaluate<br/>[train.py]"]
end

subgraph group_research["Model Research"]
  node_gwn["Graph WaveNet<br/>[graph_wavenet.py]"]
  node_gnn_models["Graph model variants<br/>[gnn_models.py]"]
  node_other_models["Non-graph models<br/>[more_models.py]"]
  node_tuning["Model tuning<br/>[tune.py]"]
end

node_user(("Route user"))

node_user -->|"invokes"| node_search_cli
node_search_cli -->|"parses input"| node_graph_parser
node_search_cli -->|"dispatches method"| node_search_algorithms
node_search_cli -->|"dispatches research"| node_multi_dest
node_search_algorithms -->|"uses helpers"| node_search_utils
node_multi_dest -->|"computes legs"| node_search_algorithms
node_search_cli -->|"prints result"| node_route_result
node_training -->|"constructs model"| node_gwn
node_training -->|"constructs model"| node_gnn_models
node_training -->|"constructs model"| node_other_models
node_tuning -->|"imports distance helper"| node_travel_time
node_tuning -->|"reads configured dataset"| node_traffic_data

click node_search_cli "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/search.py"
click node_graph_parser "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/parser.py"
click node_search_algorithms "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/algos.py"
click node_multi_dest "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/research.py"
click node_search_utils "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/utils.py"
click node_route_result "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/search.py"
click node_traffic_data "https://github.com/105558371/tree-based-searches/tree/main/Assignment_2B/data"
click node_data_prep "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/research/prepare_data.py"
click node_training "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/research/train.py"
click node_gwn "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/research/graph_wavenet.py"
click node_gnn_models "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/research/gnn_models.py"
click node_other_models "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/research/more_models.py"
click node_tuning "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/core/tune.py"
click node_travel_time "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/core/travel_time.py"
click node_site_mapping "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/core/coords_mapping.py"
click node_map_check "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/core/check_map.py"
click node_aligned_sites "https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/core/sites_aligned.json"

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_search_cli,node_graph_parser,node_search_algorithms,node_multi_dest,node_search_utils,node_route_result,node_user toneBlue
class node_traffic_data,node_travel_time,node_site_mapping,node_map_check,node_aligned_sites toneAmber
class node_data_prep,node_training toneMint
class node_gwn,node_gnn_models,node_other_models,node_tuning toneRose
```

## Components

### Graph Route Search

- [Search CLI](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/search.py): `Assignment_2A/src/search.py`
- [Graph parser](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/parser.py): `Assignment_2A/src/parser.py`
- [Search algorithms](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/algos.py): `Assignment_2A/src/algos.py`
- [Multi-destination search](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/research.py): `Assignment_2A/src/research.py`
- [Search utilities](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/utils.py): `Assignment_2A/src/utils.py`
- [Path result](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2A/src/search.py): `Assignment_2A/src/search.py`

### Traffic Data Integration

- [Traffic datasets](https://github.com/105558371/tree-based-searches/tree/main/Assignment_2B/data): `Assignment_2B/data`
- [Flow-to-travel time](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/core/travel_time.py): `Assignment_2B/core/travel_time.py`
- [Site coordinate mapping](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/core/coords_mapping.py): `Assignment_2B/core/coords_mapping.py`
- [Map checks](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/core/check_map.py): `Assignment_2B/core/check_map.py`
- [Aligned site data](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/core/sites_aligned.json): `Assignment_2B/core/sites_aligned.json`

### Traffic Forecasting

- [Forecast data preparation](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/research/prepare_data.py): `Assignment_2B/research/prepare_data.py`
- [Train and evaluate](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/research/train.py): `Assignment_2B/research/train.py`

### Model Research

- [Graph WaveNet](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/research/graph_wavenet.py): `Assignment_2B/research/graph_wavenet.py`
- [Graph model variants](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/research/gnn_models.py): `Assignment_2B/research/gnn_models.py`
- [Non-graph models](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/research/more_models.py): `Assignment_2B/research/more_models.py`
- [Model tuning](https://github.com/105558371/tree-based-searches/blob/main/Assignment_2B/core/tune.py): `Assignment_2B/core/tune.py`

### Other components

- **Route user**

## Connections

- Route user → Search CLI: invokes (evidence: `Assignment_2A/src/search.py`)
- Search CLI → Graph parser: parses input (evidence: `Assignment_2A/src/search.py`)
- Search CLI → Search algorithms: dispatches method (evidence: `Assignment_2A/src/search.py`)
- Search CLI → Multi-destination search: dispatches research (evidence: `Assignment_2A/src/search.py`)
- Search algorithms → Search utilities: uses helpers (evidence: `Assignment_2A/src/algos.py`)
- Multi-destination search → Search algorithms: computes legs (evidence: `Assignment_2A/src/research.py`)
- Search CLI → Path result: prints result (evidence: `Assignment_2A/src/search.py`)
- Train and evaluate → Graph WaveNet: constructs model (evidence: `Assignment_2B/research/train.py`)
- Train and evaluate → Graph model variants: constructs model (evidence: `Assignment_2B/research/train.py`)
- Train and evaluate → Non-graph models: constructs model (evidence: `Assignment_2B/research/train.py`)
- Model tuning → Flow-to-travel time: imports distance helper (evidence: `Assignment_2B/core/tune.py`)
- Model tuning → Traffic datasets: reads configured dataset (evidence: `Assignment_2B/core/tune.py`)
