Fly-in, explained visually
Five short pages that take you from "I don't know where to start" to "I know exactly what my first file contains". Read them in order: each one builds on the one before.
| Page | Question it answers | Read before you write… |
|---|---|---|
| 1 · Big picture | What are the parts of the program, and what does each one do? | anything |
| 2 · Models | Which classes do I need, with which fields, and why? | flyin/models.py |
| 3 · The graph | What is a "graph" without a library? What is an adjacency list? | flyin/graph.py |
| 4 · Time & bookings | Why is a normal shortest path not enough? What is a booking calendar? | pathfinder.py, scheduler.py |
| 5 · Movement rules | The tricky rules (restricted zones, freed space, link capacity) as pictures. | simulation.py |
The one-sentence version
Fly-in in one sentence
Read a map into objects, then give every drone a route where each zone and connection has a calendar, and a drone may only use a slot that still has room at that turn.
If that sentence doesn't make sense yet, it will after page 4. Pages 1–3 are the part you build first and they involve no time at all.
Your build order
- Models:
ZoneType,Zone,Connectioninflyin/models.py. (page 2) - Network: zones + adjacency list in
flyin/graph.py. (page 3) - Hand-built test: create the
easy/01map in code, check neighbours and capacities. - Parser: the same objects, but filled from the text file. Then every error case.
- Plain BFS: one drone, shortest route, ignoring capacity.
- Bookings: many drones, capacities, waiting. (page 4)
- Output + colours: the
D1-zonelines. (page 5)
Run make lint after every step. Commit after every step.