Hugdrigo's picture
Upload 3 files
ae7beb4 verified
|
Raw History Blame Contribute Delete
7.72 kB
metadata
title: DispatchForge
emoji: 🚚
colorFrom: blue
colorTo: green
sdk: static
app_file: index.html
pinned: false
license: mit
short_description: Fleet routing and delivery simulation.

DispatchForge

Delivery Operations Studio | Hugdrigo Portfolio Project #108

DispatchForge is a fully offline, interactive, browser-based demo that creates capacity-feasible delivery routes for a fictional last-mile dispatch network. It compares a sequential allocation against a deterministic routing heuristic, visualizes routes on a synthetic grid, evaluates simulated delivery time windows, and stress-tests demand and travel-speed assumptions.

Short description: Fleet routing and delivery simulation.

Synthetic demonstration only. All nine starting delivery locations, grid coordinates, packages, time windows, travel assumptions and fleet resources are fabricated. This is not a map, GPS navigator, real route planner, traffic forecast, or production dispatch system. No actual street network, driving restrictions, driver hours, road conditions or legally mandated vehicle limits are represented. Do not use the output to dispatch real vehicles.

Publish on Hugging Face

  1. Open Create a Space.
  2. Use Owner: Hugdrigo; Space name: dispatchforge-last-mile-routing; SDK: Static; Template: Blank; Visibility: Public; License: MIT.
  3. Extract the supplied ZIP. Upload precisely README.md, index.html, and LICENSE to the root of the new repository, not a subfolder.
  4. Click Commit changes, then open App to check the deployment and test its controls. Static Spaces need no paid hardware or backend process for this app.

YAML metadata compliance

The front matter above is parsed as Space metadata. Both colors are from the only supported color names (red, yellow, green, blue, indigo, purple, pink, gray):

  • colorFrom: blue
  • colorTo: green
  • sdk: static
  • app_file: index.html

Do not substitute CSS hex colors, teal, or cyan into Space color keys. The app's own CSS colors may use other values.

App modules

Module Available functions
Overview KPI dashboard, schematic multivehicle route map, route legend, vehicle details, capacity bars and operational priorities
Route planner Fleet-size, capacity and speed controls; naive sequential-vs-heuristic comparison; calculated route table and CSV export
Delivery stops Add/edit up to 30 active stops (80 stored total), filter/search, preserve archived records and restore them, CSV export
Scenarios Four presets (standard, demand peak, traffic disruption, fleet reinforcement), independent sliders, scenario comparison, deterministic 240-draw uncertainty experiment
Methodology Routing rules, equations, data handling, assumptions and explicit limitations

Additional features: dark/light mode, browser-local persistence where allowed, defensive JSON import/export, CSV formula escaping, mobile layout, offline use with no API calls, no external scripts, no JavaScript build dependencies and no cookies or analytics.

Model details

  • Synthetic coordinates: Each fictional stop lies on a 0–100 × 0–100 city grid; depot is at (48,49). Grid-unit distance is Euclidean, multiplied by 0.42 to produce illustrative kilometers.
  • Travel time: travel_minutes = distance_km / speed_km_per_hour × 60 × traffic_multiplier.
  • Service window: Vehicles depart at 08:00. A driver may wait for a stop to open. Any arrival after the closing time is counted as a late stop. Every stop has a fixed fictional service duration.
  • Capacity: All packages assigned to a vehicle must total no more than the vehicle's declared package capacity. No volumetric, weight, multiple-compartment or driver-work-time capacity is modeled.
  • Assignment: Sort active stops by priority and window closing time, try every feasible insertion on every vehicle, choose the lowest change in distance + 14 × count_late + 0.58 × late_minutes (distance-equivalent heuristic score), then apply bounded 2-opt route-sequence changes. This is not an exact global optimum solver.
  • Sequential comparator: Assign stops in saved-record order to the first vehicle that has sufficient remaining package capacity, without attempting route optimization.
  • On-time percentage: (on_time_stops / assigned_stops) × 100. If no stops are assigned, the displayed rate is zero.
  • Fleet utilization: (assigned_packages / (fleet_vehicles × capacity_per_vehicle)) × 100.
  • Distance includes return: Every nonempty vehicle route includes a return leg to the synthetic depot; idle vehicles have zero distance.
  • Scenario changes: Demand multiplies every stop's packages (rounded to nearest positive integer); traffic changes modeled travel time; additional vehicles change availability, within a maximum of 8.
  • Uncertainty experiment: 240 deterministic pseudo-random draws per scenario, with assumed demand ±10% and travel-time multiplier ±15%. P10, P50 and P90 describe only these hypothetical draws; not calibrated forecast or confidence intervals. The same settings and seed return identical output.

Data and integrity

  • All starting stops are fabricated. Use the form to experiment with your own fictional data.
  • The JSON backup stores {version: 1, stops: [...], settings: {vehicles,capacity,speed}, dark}.
  • Restore checks the expected version, numeric bounds, valid time windows, unique IDs, allowed categories and priorities, maximum record counts (80 saved, 30 active), and size (up to 500 KiB), then asks for confirmation before replacing the local registry.
  • Archived records remain in the backup and can be restored. Archiving is not deletion.
  • Names are HTML-escaped before rendering. CSV cells that begin with spreadsheet formula prefixes are quoted and prefixed with a safe apostrophe to mitigate formula injection. This is a browser demonstration, not a security certification.
  • Storage: browser localStorage if permitted; browser storage may be cleared by user settings or private modes. Export backups for portability. No data leaves the browser unless the user downloads or shares it.
  • Time windows refer to a fictional single-day operating schedule and are not tied to live dates, holidays, timezones or calendar APIs.

Verification checklist

  1. Open Overview: 9 active demo stops and 3 vehicles should render, with a visual network map.
  2. Open Route planner, move all three controls and confirm KPI/route changes.
  3. Open Delivery stops: search, filter, add a stop, edit it, archive it, then restore it.
  4. Open Scenarios: change presets and sliders, confirm the map and results update.
  5. Export route CSV, stop CSV and JSON backup. Import the backup and accept the confirmation; reject invalid JSON without changing data.
  6. Switch to dark mode and try narrow mobile sizes; only data tables may scroll horizontally.
  7. Check the README YAML colors, static SDK, exact app_file, all three ZIP entries and no external runtime dependencies.

Constraints and transparency

This simulator does not promise real-world delivery optimization, financial savings, real-time traffic, exact route optimality, geocoding, real emissions, customer privacy compliance, or probabilistic service-level forecasts. Its value is in demonstrating routing heuristics, visualization, browser app engineering, data validation and scenario reasoning with reproducible synthetic inputs.

License

MIT. See LICENSE.

Portfolio: Hugdrigo | Project: 108 | Space: Hugdrigo/dispatchforge-last-mile-routing