How stevenfap1815/equipeproyecto works
Equipetrol Delivery simulates concurrent food-order dispatch on a street map. The principal workflow is configuration and network setup, order generation, queued dispatch with parallel courier estimates, assignment and pickup, then delivery or breakdown/rescue; event logging and live rendering expose results. The README documents concurrency channels, shutdown, experiments, and map tooling. Some implementation paths were not excerpted, so their documented relationships cite the README rather than implying source inspection.
Main entry points: main.cpp Simulation entry · Courier.cpp Courier lifecycle · OrderGenerator.cpp Order generator · Dispatcher.cpp Dispatcher
Components 18
Setup and map
- Config loader
src/infra/ConfigLoader.cpp - Street network
src/core/StreetNetwork.cpp - Route finding
src/core/PathFinder.cpp - OSM conversion
tools/osm_to_config.py
Order dispatch
- Order generator
src/sim/OrderGenerator.cpp - Pending orders
src/concurrency/OrderBook.cpp - Dispatcher
src/sim/Dispatcher.cpp
Courier operations
- Courier fleet
src/sim/Fleet.cpp - Courier lifecycle
src/sim/Courier.cpp - Restaurant queues
src/concurrency/PickupDesk.cpp
Runtime and output
- Simulation entry
src/main.cpp - Simulation clock
src/sim/SimClock.cpp - Availability signal
src/concurrency/ChangeSignal.cpp - Shutdown control
src/concurrency/ShutdownToken.cpp - Event log
src/infra/EventLog.cpp - Live map renderer
src/viz/Renderer.cpp - Experiment runner
tools/run_experiment.py
Other components
- Operator
Connections 23
- Operator → Simulation entry: starts simulation
- Simulation entry → Config loader: loads configuration
src/main.cpp - Simulation entry → Street network: builds network
src/main.cpp - OSM conversion → Config loader: generates map config
- Simulation entry → Order generator: starts producer
- Order generator → Pending orders: pushes orders
- Pending orders → Dispatcher: provides orders
src/concurrency/OrderBook.cpp - Dispatcher → Route finding: estimates routes
src/sim/Dispatcher.cpp - Dispatcher → Courier fleet: selects couriers
- Courier fleet → Courier lifecycle: starts courier threads
- Courier lifecycle → Restaurant queues: joins pickup queue
- Courier lifecycle → Availability signal: signals availability
- Dispatcher → Availability signal: waits for availability
- Courier lifecycle → Simulation clock: waits for travel
- Order generator → Simulation clock: waits between orders
- Simulation entry → Shutdown control: requests stop
src/main.cpp - Simulation entry → Event log: reads summary
src/main.cpp - Order generator → Event log: records order events
- Courier lifecycle → Event log: records delivery events
- Simulation entry → Live map renderer: starts renderer
- Live map renderer → Courier fleet: reads courier state
src/viz/Renderer.cpp - Live map renderer → Event log: reads summary
- Experiment runner → Simulation entry: runs scenarios
tools/run_experiment.py