# yassinebdr/projetmnia architecture

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

- Interactive diagram: https://gitdiagram.com/yassinebdr/projetmnia
- Repository: https://github.com/yassinebdr/projetmnia

## Overview

This small Python project simulates a drone navigating a grid. Its user-facing workflow selects an execution mode, supplies actions interactively or from a CSV, and applies them to a stateful environment that tracks movement, battery, hazards, docking, and visited zones. The environment delegates zone assignment to Grid.py. The excerpts show the interactive, automatic, and exhaustive modes, but omit parts of their implementations; uncertain details are not expanded.

Main entry points: [`Drone.py`](https://github.com/yassinebdr/projetmnia/blob/main/Drone.py) (Drone environment), [`scenario_test.csv`](https://github.com/yassinebdr/projetmnia/blob/main/scenario_test.csv) (Action CSV), [`Grid.py`](https://github.com/yassinebdr/projetmnia/blob/main/Grid.py) (Zone mapping)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_modes["Execution modes"]
  node_dispatcher["Mode dispatcher<br/>[Drone.py]"]
  node_interactive["Interactive mode<br/>[Drone.py]"]
  node_automatic["Automatic mode<br/>[Drone.py]"]
  node_exhaustive["Exhaustive mode<br/>[Drone.py]"]
  node_scenario["Action CSV<br/>[scenario_test.csv]"]
end

subgraph group_simulation["Drone simulation"]
  node_environment["Drone environment<br/>[Drone.py]"]
  node_actions["Action dispatch<br/>[Drone.py]"]
  node_state["Flight state<br/>[Drone.py]"]
end

subgraph group_spatial["Grid mapping"]
  node_grid["Zone mapping<br/>[Grid.py]"]
end

node_user(("User"))

node_user -->|"selects mode"| node_dispatcher
node_dispatcher -->|"dispatches"| node_interactive
node_dispatcher -->|"dispatches"| node_automatic
node_dispatcher -->|"dispatches"| node_exhaustive
node_interactive -->|"queries actions"| node_environment
node_interactive -->|"submits action"| node_actions
node_automatic -->|"reads actions"| node_scenario
node_automatic -->|"checks state"| node_environment
node_automatic -->|"submits action"| node_actions
node_exhaustive -->|"queries actions"| node_environment
node_exhaustive -->|"explores actions"| node_actions
node_actions -->|"dispatches action"| node_environment
node_environment -->|"updates state"| node_state
node_environment -->|"assigns zone"| node_grid

click node_dispatcher "https://github.com/yassinebdr/projetmnia/blob/main/Drone.py"
click node_interactive "https://github.com/yassinebdr/projetmnia/blob/main/Drone.py"
click node_automatic "https://github.com/yassinebdr/projetmnia/blob/main/Drone.py"
click node_exhaustive "https://github.com/yassinebdr/projetmnia/blob/main/Drone.py"
click node_scenario "https://github.com/yassinebdr/projetmnia/blob/main/scenario_test.csv"
click node_environment "https://github.com/yassinebdr/projetmnia/blob/main/Drone.py"
click node_actions "https://github.com/yassinebdr/projetmnia/blob/main/Drone.py"
click node_state "https://github.com/yassinebdr/projetmnia/blob/main/Drone.py"
click node_grid "https://github.com/yassinebdr/projetmnia/blob/main/Grid.py"

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_dispatcher,node_interactive,node_automatic,node_exhaustive,node_scenario,node_user toneBlue
class node_environment,node_actions,node_state toneAmber
class node_grid toneMint
```

## Components

### Execution modes

- [Mode dispatcher](https://github.com/yassinebdr/projetmnia/blob/main/Drone.py): `Drone.py`
- [Interactive mode](https://github.com/yassinebdr/projetmnia/blob/main/Drone.py): `Drone.py`
- [Automatic mode](https://github.com/yassinebdr/projetmnia/blob/main/Drone.py): `Drone.py`
- [Exhaustive mode](https://github.com/yassinebdr/projetmnia/blob/main/Drone.py): `Drone.py`
- [Action CSV](https://github.com/yassinebdr/projetmnia/blob/main/scenario_test.csv): `scenario_test.csv`

### Drone simulation

- [Drone environment](https://github.com/yassinebdr/projetmnia/blob/main/Drone.py): `Drone.py`
- [Action dispatch](https://github.com/yassinebdr/projetmnia/blob/main/Drone.py): `Drone.py`
- [Flight state](https://github.com/yassinebdr/projetmnia/blob/main/Drone.py): `Drone.py`

### Grid mapping

- [Zone mapping](https://github.com/yassinebdr/projetmnia/blob/main/Grid.py): `Grid.py`

### Other components

- **User**

## Connections

- User → Mode dispatcher: selects mode
- Mode dispatcher → Interactive mode: dispatches
- Mode dispatcher → Automatic mode: dispatches
- Mode dispatcher → Exhaustive mode: dispatches
- Interactive mode → Drone environment: queries actions
- Interactive mode → Action dispatch: submits action
- Automatic mode → Action CSV: reads actions
- Automatic mode → Drone environment: checks state
- Automatic mode → Action dispatch: submits action
- Exhaustive mode → Drone environment: queries actions
- Exhaustive mode → Action dispatch: explores actions
- Action dispatch → Drone environment: dispatches action
- Drone environment → Flight state: updates state
- Drone environment → Zone mapping: assigns zone
