How aleksopi/cloud-computing-optimierung-von-logistikrouten works
Pharma Logistics CH is a web-based optimizer for Swiss pharmacy supply: users configure the fleet and optimization settings, run a four-step calculation, then inspect routes and analysis on an interactive map and dashboard. The backend orchestrates demand estimation, demand-weighted hub placement, catchment assignment, and multi-objective vehicle routing; results and configuration are persisted in PostgreSQL. The README documents these product stages and capabilities. Connections to unsampled stage internals are limited to documented pipeline flow or the runner’s indexed imports.
Main entry points: client.ts API client · results.py Results API · App.tsx Web app · runner.py Pipeline runner
Components 25
Web experience
- Web app
frontend/src/App.tsx - Pipeline controls
frontend/src/components/Pipeline/PipelinePanel.tsx - Pipeline state
frontend/src/hooks/usePipeline.ts - Interactive map
frontend/src/components/Map/MapView.tsx - Analysis dashboard
frontend/src/components/Summary/SummaryPage.tsx - Settings
frontend/src/components/Settings/SettingsPage.tsx - API client
frontend/src/api/client.ts
Backend API
- FastAPI app
backend/app/main.py - Pipeline API
backend/app/api/pipeline.py - Results API
backend/app/api/results.py - Settings API
backend/app/api/settings.py
Optimization pipeline
- Pipeline runner
backend/app/pipeline/runner.py - Demand calculation
backend/app/pipeline/a3_demand.py - Hub placement
backend/app/pipeline/a1_hub_placement.py - Catchment assignment
backend/app/pipeline/a2_influence.py - Route optimization
backend/app/pipeline/a4_routes.py
Data and integrations
- PostgreSQL data
backend/app/db/models.py - Database sessions
backend/app/db/session.py - OSRM routing
backend/app/services/osrm.py - Traffic service
backend/app/services/traffic.py - TomTom traffic
backend/app/services/tomtom.py - Result metrics
backend/app/services/metrics.py
Other components
- Operator
- Road network
- TomTom API
Connections 39
- Operator → Web app: uses
README.md - Web app → Pipeline controls: renders
frontend/src/App.tsx - Web app → Interactive map: renders
frontend/src/App.tsx - Web app → Analysis dashboard: renders
frontend/src/App.tsx - Web app → Settings: renders
frontend/src/App.tsx - Pipeline controls → Pipeline state: uses state
- Pipeline controls → API client: requests summary
frontend/src/components/Pipeline/PipelinePanel.tsx - Pipeline state → API client: calls
frontend/src/hooks/usePipeline.ts - Settings → API client: configures
frontend/src/components/Settings/SettingsPage.tsx - Analysis dashboard → API client: fetches results
frontend/src/components/Summary/SummaryPage.tsx - API client → Pipeline API: requests pipeline
frontend/src/api/client.ts - API client → Results API: requests results
frontend/src/api/client.ts - API client → Settings API: requests settings
frontend/src/api/client.ts - FastAPI app → Pipeline API: mounts routes
backend/app/main.py - FastAPI app → Results API: mounts routes
backend/app/main.py - FastAPI app → Settings API: mounts routes
backend/app/main.py - Pipeline API → Pipeline runner: dispatches steps
backend/app/api/pipeline.py - Pipeline API → Database sessions: opens sessions
backend/app/api/pipeline.py - Pipeline API → PostgreSQL data: reads and resets
backend/app/api/pipeline.py - Pipeline runner → Demand calculation: runs step one
backend/app/pipeline/runner.py - Pipeline runner → Hub placement: runs step two
backend/app/pipeline/runner.py - Pipeline runner → Catchment assignment: runs step three
backend/app/pipeline/runner.py - Pipeline runner → Route optimization: runs step four
backend/app/pipeline/runner.py - Demand calculation → Hub placement: precedes
README.md - Hub placement → Catchment assignment: precedes
README.md - Catchment assignment → Route optimization: precedes
README.md - Route optimization → OSRM routing: requests road routes
backend/app/pipeline/a4_routes.py - Route optimization → Traffic service: gets traffic times
backend/app/pipeline/a4_routes.py - Traffic service → TomTom traffic: uses provider
backend/app/services/traffic.py - TomTom traffic → TomTom API: queries
- OSRM routing → Road network: routes on
- Route optimization → PostgreSQL data: stores routes
README.md - Results API → Database sessions: queries
backend/app/api/results.py - Results API → PostgreSQL data: reads results
backend/app/api/results.py - Results API → Result metrics: computes summaries
backend/app/api/results.py - Results API → Traffic service: reports traffic
backend/app/api/results.py - Settings API → Database sessions: queries settings
backend/app/api/settings.py - Settings API → PostgreSQL data: reads and updates
backend/app/api/settings.py - Settings API → Traffic service: configures traffic
backend/app/api/settings.py