# thunderbolt404/icdtn architecture

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

- Interactive diagram: https://gitdiagram.com/thunderbolt404/icdtn
- Repository: https://github.com/thunderbolt404/icdtn

## Overview

The ONE is an opportunistic-network simulator. A user configures and starts a scenario; the simulator creates hosts with movement, interfaces, routers, and applications, then advances time and processes events, mobility, contacts, and message transfers. Applications can generate or handle traffic, while reports and the GUI expose simulation outcomes. The graph retains major mobility, connectivity, routing, application, reporting, and visualization areas. Evidence is limited to README statements and indexed excerpts/references; several internal runtime links are therefore omitted.

Main entry points: [`src/core/SimScenario.java`](https://github.com/thunderbolt404/icdtn/blob/main/src/core/SimScenario.java) (Scenario setup), [`src/core/World.java`](https://github.com/thunderbolt404/icdtn/blob/main/src/core/World.java) (Simulation world), [`src/core/DTNHost.java`](https://github.com/thunderbolt404/icdtn/blob/main/src/core/DTNHost.java) (Mobile hosts), [`src/routing/MessageRouter.java`](https://github.com/thunderbolt404/icdtn/blob/main/src/routing/MessageRouter.java) (Router core)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Simulation runtime"]
  node_settings["Configuration<br/>[Settings.java]"]
  node_scenario["Scenario setup<br/>[SimScenario.java]"]
  node_event["Event handling"]
  node_world["Simulation world<br/>[World.java]"]
  node_clock["Simulation clock<br/>[SimClock.java]"]
  node_external["External event input"]
end

subgraph group_network["Network behavior"]
  node_host["Mobile hosts<br/>[DTNHost.java]"]
  node_movement["Mobility models<br/>[MovementModel.java]"]
  node_map["Map movement"]
  node_simmap["Simulation maps<br/>[SimMap.java]"]
  node_interfaces["Network interfaces"]
  node_connectivity["Connectivity models"]
  node_connection["Contact links<br/>[Connection.java]"]
end

subgraph group_traffic["Traffic and routing"]
  node_message["Messages<br/>[Message.java]"]
  node_router["Routing strategies<br/>[ActiveRouter.java]"]
  node_routerbase["Router core<br/>[MessageRouter.java]"]
  node_application["Node applications<br/>[Application.java]"]
  node_ccn["CCN application"]
end

subgraph group_observability["Results and interface"]
  node_report["Report framework<br/>[Report.java]"]
  node_reports["Simulation reports"]
  node_gui["Visual interface<br/>[PlayField.java]"]
  node_textui["Text interface<br/>[DTNSimUI.java]"]
end

node_user(("Simulation user"))

node_user -->|"configures"| node_settings
node_settings -->|"configures"| node_scenario
node_scenario -->|"creates"| node_event
node_scenario -->|"creates"| node_world
node_world -->|"processes"| node_event
node_world -->|"advances"| node_clock
node_world -->|"updates"| node_host
node_scenario -->|"configures"| node_movement
node_scenario -->|"loads"| node_simmap
node_host -->|"replicates"| node_movement
node_host -->|"owns"| node_interfaces
node_interfaces -->|"creates"| node_connection
node_interfaces -->|"uses"| node_connectivity
node_host -->|"delegates"| node_routerbase
node_router -->|"extends"| node_routerbase
node_routerbase -->|"buffers"| node_message
node_router -->|"transfers over"| node_connection
node_connection -->|"delivers to"| node_host
node_routerbase -->|"dispatches to"| node_application
node_ccn -->|"implements"| node_application
node_scenario -->|"registers"| node_application
node_reports -->|"extends"| node_report
node_textui -->|"starts"| node_scenario
node_gui -->|"renders"| node_world
node_external -.->|"supplies events"| node_event

click node_settings "https://github.com/thunderbolt404/icdtn/blob/main/src/core/Settings.java"
click node_scenario "https://github.com/thunderbolt404/icdtn/blob/main/src/core/SimScenario.java"
click node_event "https://github.com/thunderbolt404/icdtn/blob/main/src/input/EventQueueHandler.java"
click node_world "https://github.com/thunderbolt404/icdtn/blob/main/src/core/World.java"
click node_clock "https://github.com/thunderbolt404/icdtn/blob/main/src/core/SimClock.java"
click node_host "https://github.com/thunderbolt404/icdtn/blob/main/src/core/DTNHost.java"
click node_movement "https://github.com/thunderbolt404/icdtn/blob/main/src/movement/MovementModel.java"
click node_map "https://github.com/thunderbolt404/icdtn/blob/main/src/movement/MapBasedMovement.java"
click node_simmap "https://github.com/thunderbolt404/icdtn/blob/main/src/movement/map/SimMap.java"
click node_interfaces "https://github.com/thunderbolt404/icdtn/blob/main/src/core/NetworkInterface.java"
click node_connectivity "https://github.com/thunderbolt404/icdtn/blob/main/src/interfaces/ConnectivityGrid.java"
click node_connection "https://github.com/thunderbolt404/icdtn/blob/main/src/core/Connection.java"
click node_message "https://github.com/thunderbolt404/icdtn/blob/main/src/core/Message.java"
click node_router "https://github.com/thunderbolt404/icdtn/blob/main/src/routing/ActiveRouter.java"
click node_routerbase "https://github.com/thunderbolt404/icdtn/blob/main/src/routing/MessageRouter.java"
click node_application "https://github.com/thunderbolt404/icdtn/blob/main/src/core/Application.java"
click node_ccn "https://github.com/thunderbolt404/icdtn/blob/main/src/applications/CCN_application.java"
click node_report "https://github.com/thunderbolt404/icdtn/blob/main/src/report/Report.java"
click node_reports "https://github.com/thunderbolt404/icdtn/blob/main/src/report/CCNApplicationReport.java"
click node_gui "https://github.com/thunderbolt404/icdtn/blob/main/src/gui/playfield/PlayField.java"
click node_textui "https://github.com/thunderbolt404/icdtn/blob/main/src/ui/DTNSimUI.java"
click node_external "https://github.com/thunderbolt404/icdtn/blob/main/src/input/ExternalEventsReader.java"

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_settings,node_scenario,node_event,node_world,node_clock,node_external,node_user toneBlue
class node_host,node_movement,node_map,node_simmap,node_interfaces,node_connectivity,node_connection toneAmber
class node_message,node_router,node_routerbase,node_application,node_ccn toneMint
class node_report,node_reports,node_gui,node_textui toneRose
```

## Components

### Simulation runtime

- [Configuration](https://github.com/thunderbolt404/icdtn/blob/main/src/core/Settings.java): `src/core/Settings.java`
- [Scenario setup](https://github.com/thunderbolt404/icdtn/blob/main/src/core/SimScenario.java): `src/core/SimScenario.java`
- [Event handling](https://github.com/thunderbolt404/icdtn/blob/main/src/input/EventQueueHandler.java): `src/input/EventQueueHandler.java`
- [Simulation world](https://github.com/thunderbolt404/icdtn/blob/main/src/core/World.java): `src/core/World.java`
- [Simulation clock](https://github.com/thunderbolt404/icdtn/blob/main/src/core/SimClock.java): `src/core/SimClock.java`
- [External event input](https://github.com/thunderbolt404/icdtn/blob/main/src/input/ExternalEventsReader.java): `src/input/ExternalEventsReader.java`

### Network behavior

- [Mobile hosts](https://github.com/thunderbolt404/icdtn/blob/main/src/core/DTNHost.java): `src/core/DTNHost.java`
- [Mobility models](https://github.com/thunderbolt404/icdtn/blob/main/src/movement/MovementModel.java): `src/movement/MovementModel.java`
- [Map movement](https://github.com/thunderbolt404/icdtn/blob/main/src/movement/MapBasedMovement.java): `src/movement/MapBasedMovement.java`
- [Simulation maps](https://github.com/thunderbolt404/icdtn/blob/main/src/movement/map/SimMap.java): `src/movement/map/SimMap.java`
- [Network interfaces](https://github.com/thunderbolt404/icdtn/blob/main/src/core/NetworkInterface.java): `src/core/NetworkInterface.java`
- [Connectivity models](https://github.com/thunderbolt404/icdtn/blob/main/src/interfaces/ConnectivityGrid.java): `src/interfaces/ConnectivityGrid.java`
- [Contact links](https://github.com/thunderbolt404/icdtn/blob/main/src/core/Connection.java): `src/core/Connection.java`

### Traffic and routing

- [Messages](https://github.com/thunderbolt404/icdtn/blob/main/src/core/Message.java): `src/core/Message.java`
- [Routing strategies](https://github.com/thunderbolt404/icdtn/blob/main/src/routing/ActiveRouter.java): `src/routing/ActiveRouter.java`
- [Router core](https://github.com/thunderbolt404/icdtn/blob/main/src/routing/MessageRouter.java): `src/routing/MessageRouter.java`
- [Node applications](https://github.com/thunderbolt404/icdtn/blob/main/src/core/Application.java): `src/core/Application.java`
- [CCN application](https://github.com/thunderbolt404/icdtn/blob/main/src/applications/CCN_application.java): `src/applications/CCN_application.java`

### Results and interface

- [Report framework](https://github.com/thunderbolt404/icdtn/blob/main/src/report/Report.java): `src/report/Report.java`
- [Simulation reports](https://github.com/thunderbolt404/icdtn/blob/main/src/report/CCNApplicationReport.java): `src/report/CCNApplicationReport.java`
- [Visual interface](https://github.com/thunderbolt404/icdtn/blob/main/src/gui/playfield/PlayField.java): `src/gui/playfield/PlayField.java`
- [Text interface](https://github.com/thunderbolt404/icdtn/blob/main/src/ui/DTNSimUI.java): `src/ui/DTNSimUI.java`

### Other components

- **Simulation user**

## Connections

- Simulation user → Configuration: configures (evidence: `src/core/Settings.java`)
- Configuration → Scenario setup: configures (evidence: `src/core/SimScenario.java`)
- Scenario setup → Event handling: creates (evidence: `src/core/SimScenario.java`)
- Scenario setup → Simulation world: creates (evidence: `src/core/SimScenario.java`)
- Simulation world → Event handling: processes (evidence: `src/core/World.java`)
- Simulation world → Simulation clock: advances (evidence: `src/core/World.java`)
- Simulation world → Mobile hosts: updates (evidence: `src/core/World.java`)
- Scenario setup → Mobility models: configures (evidence: `src/core/SimScenario.java`)
- Scenario setup → Simulation maps: loads (evidence: `src/core/SimScenario.java`)
- Mobile hosts → Mobility models: replicates (evidence: `src/core/DTNHost.java`)
- Mobile hosts → Network interfaces: owns (evidence: `src/core/DTNHost.java`)
- Network interfaces → Contact links: creates (evidence: `src/core/NetworkInterface.java`)
- Network interfaces → Connectivity models: uses (evidence: `src/core/NetworkInterface.java`)
- Mobile hosts → Router core: delegates (evidence: `src/core/DTNHost.java`)
- Routing strategies → Router core: extends (evidence: `src/routing/ActiveRouter.java`)
- Router core → Messages: buffers (evidence: `src/routing/MessageRouter.java`)
- Routing strategies → Contact links: transfers over (evidence: `src/routing/ActiveRouter.java`)
- Contact links → Mobile hosts: delivers to (evidence: `src/core/Connection.java`)
- Router core → Node applications: dispatches to (evidence: `src/routing/MessageRouter.java`)
- CCN application → Node applications: implements (evidence: `src/applications/CCN_application.java`)
- Scenario setup → Node applications: registers (evidence: `src/core/SimScenario.java`)
- Simulation reports → Report framework: extends (evidence: `src/report/CCNApplicationReport.java`)
- Text interface → Scenario setup: starts (evidence: `src/ui/DTNSimUI.java`)
- Visual interface → Simulation world: renders (evidence: `src/gui/playfield/PlayField.java`)
- External event input → Event handling: supplies events
