High‑Performance VRP Routing + 3D Container Loading.
Ship more furniture per truck, reduce damage, and get a 3D load plan you can trust.
| Stop # | Type | Address | Arrival (ETA) | Delay |
|---|
| Seq | Item ID | Action | Risk score | Risk label | Mitigations | Notes |
|---|
Results will appear here...
Scenarios are not automatic unless you call the scenario endpoint. This page can auto-generate a starter set from your current payload.
logistics_controller_demo.php (PHP forwards to /optimize_scenarios server-side).
| Scenario | Status | Trucks | Miles | On‑time % | Unassigned | Load feas % | Axle % | Damage risk | |
|---|---|---|---|---|---|---|---|---|---|
| Run scenarios to see results here. | |||||||||
{}
seed for repeatability, set realistic stop service_time_sec, and keep item dims/weight accurate.
For chairs/tables, turn on nesting fields (items editor) to boost utilization.
| Truck ID | Type | Start | Start location | Crew | Dims (L/W/H) | Limits (mi / stops / dur) | Max weight | Max vol | Equipment | Dock mode | Loading sides | Trailer profile |
|---|
logistics_controller_demo.php.
fragile, stackable, is_top_flat, allowed_orientations, and nesting fields when relevant.explain.items (fallback explain.top5) and displays everything returned.POST /optimize_scenarios.{ "config", "trucks", "jobs" }.seed for repeatable rollout tests.lifo_mode="hard" if unload order must match stops.travel_matrix.provider: haversine (fast) vs google_routes (road-aware)policies.objective.weights: miles vs trucks-used tradeoffquality_weights: bias selection toward better routes vs better loadsenable_voxel_nesting + voxel_pitch_in: more accurate nesting (slower)The request is:
{
"config": { ... },
"trucks": [ ... ],
"jobs": [ ... ]
}
depot_address (string)depot_lat, depot_lng (float)seed (int, optional) — set this for repeatable runs.travel_matrix.provider: "haversine" or "google_routes"travel_matrix.traffic: traffic-aware durations (Google)travel_matrix.departure_time (ISO8601, optional)travel_matrix.routing_preference (optional)travel_matrix.fallback_to_haversine: fill gaps if provider failstravel_matrix.timeout_sec (float)travel_matrix.max_elements_per_request (int)travel_matrix.cache_ttl_sec (int)travel_matrix.cache_max_entries (int)travel_matrix.osrm_base_url, travel_matrix.osrm_profile (OSRM)lifo_mode: "soft" or "hard" — many furniture routes want hard.time_window_mode: "hard" or "soft" (default hard)enforce_geometry: keep true unless routing-only| Field | Meaning |
|---|---|
policies.objective.weights.total_miles | scales miles / arc costs |
policies.objective.weights.trucks_used | pushes toward fewer trucks |
policies.objective.truck_fixed_cost_miles | “1 truck ≈ X miles” tradeoff knob |
trucks_used weight and set a realistic truck_fixed_cost_miles (e.g., 60–120).
quality_weights: tilt solution selection toward better routing vs better loading (default routing 0.6 / loading 0.4).break_rules.mandatory_break_duration (sec)break_rules.drive_time_before_break (sec)solver_max_seconds, local_search_iters: runtime vs qualitymetaheuristic.enable_ga: enable genetic searchmetaheuristic.population_size, generations, elite_fraction, mutation_ratevrp_lns (and policies.vrp_lns): LNS tuning knobs (advanced)feasibility_prover_enabled: attempt a proof when planning failsfeasibility_prover_max_seconds, feasibility_prover_max_itemsfeasibility_prover_extract_core + feasibility_prover_core_seconds: extract a minimal “unsat core”feasibility_prover_include_witness: include assignment/witness details when possibletruck_id, truck_typestart_location, start_timecrew_size (1=driver, 2=driver+helper)dims.l, dims.w, dims.hmax_miles, max_duration, max_stopsmax_cargo_weight, max_cargo_volume (if used)has_liftgate, has_dolly, has_pallet_jackdock_height_mode and loading_sidescrew_size=2 for heavy/oversized routes.
job_id (int)priority (int) — higher wins when tradeoffs existexclusive_truck_ids (optional) — force assignmentstop_id, type ("pickup" or "delivery")address, lat, lngearliest, latest (ISO8601)service_time_sec — affects routing feasibility/on-timerequires_liftgate, requires_dolly, etc.dock_height and loading_side constraintsitem_id (string)weight (lbs)dims in inches: { "l", "w", "h" }item_class (e.g., upholstery, wood, glass, mattress)stackable (bool)is_top_flat (bool) — false for rounded/tufted piecesfragile (bool)max_stack_weight and max_tierposition_constraint: none | bottom | rear | topallowed_orientations: upright / rotatedtilt_modes: e.g. upright / side (for rugs/mattresses if allowed)assembly_id (optional) — keeps related pieces groupedis_nestable: the item nests with others (chairs/stools)can_accept_underload: item creates a cavity (tables/bed frames)can_nest_with: list of allowed classes/SKU prefixes that can go inside/understack_group_id (+ members) for “virtual stacks”can_accept_underload=true on tables and is_nestable=true on chairs, then whitelist chair classes in can_nest_with.
constraints.bottom_layer, constraints.top_layer: force items to the bottom/top layerconstraints.front_load, constraints.rear_load: bias placement toward the front/rearconstraints.z_band: keep items in a vertical band (bottom/mid/top)mesh_url + mesh_format: optional 3D mesh reference (for higher-fidelity packing/visualization)hazmat.incompatible_with + hazmat.requires_separation_intruck.max_milesquality_weights to bias selection toward “better loads” vs “better routes”.
item_class, fragile, is_top_flat, stackable, max_stack_weight realistically.service_time_sec if on-time delivery matters.can_accept_underload (tables/frames), is_nestable (chairs), and can_nest_with.lifo_mode="hard" when unload order must match stops (may reduce utilization but improves realism)."side" for mattresses/rugs if permitted; glass usually cannot.haversine early; switch to google_routes for production ETAs/traffic.voxel_pitch_in (accuracy ↑, cost ↑).seed so ops can compare before/after on identical inputs.This example includes seed, nesting fields, and objective weights.
{
"config": {
"depot_address": "DC - Nashville",
"depot_lat": 36.1627,
"depot_lng": -86.7816,
"timezone": "America/New_York",
"seed": 12345,
"travel_matrix": {
"provider": "google_routes",
"traffic": true,
"routing_preference": "TRAFFIC_AWARE",
"fallback_to_haversine": true,
"timeout_sec": 15.0
},
"lifo_mode": "hard",
"time_window_mode": "hard",
"enforce_geometry": true,
"policies": {
"fragile_separation": true,
"aisle_priority": true,
"strap_priority": true,
"enable_voxel_nesting": true,
"voxel_pitch_in": 2.0,
"objective": {
"weights": { "total_miles": 1.0, "trucks_used": 0.6 },
"truck_fixed_cost_miles": 80.0
}
},
"metaheuristic": {
"enable_ga": false,
"population_size": 18,
"generations": 10,
"elite_fraction": 0.25,
"mutation_rate": 0.25
},
"quality_weights": { "routing": 0.5, "loading": 0.5 }
},
"trucks": [
{
"truck_id": "T-101",
"truck_type": "dry-van-53",
"start_location": "DC - Nashville",
"start_time": "08:00",
"crew_size": 2,
"dims": { "l": 636.0, "w": 100.0, "h": 110.0 },
"max_miles": 450.0,
"max_duration": 39600,
"max_stops": 20,
"max_cargo_weight": 34000.0,
"has_liftgate": true,
"has_dolly": true,
"dock_height_mode": "either",
"loading_sides": ["rear"]
}
],
"jobs": [
{
"job_id": 9001,
"priority": 3,
"stops": [
{
"stop_id": "S1",
"type": "delivery",
"address": "123 Main St, Franklin, TN",
"lat": 35.9251,
"lng": -86.8689,
"earliest": "2025-12-20T10:00:00-05:00",
"latest": "2025-12-20T12:00:00-05:00",
"service_time_sec": 1800,
"requires_liftgate": true,
"dock_height": "ground",
"loading_side": "rear",
"items": [
{
"item_id": "TABLE-72IN-001",
"weight": 180,
"dims": { "l": 72, "w": 42, "h": 30 },
"item_class": "wood",
"fragile": false,
"stackable": false,
"can_accept_underload": true,
"can_nest_with": ["chairs", "stools", "boxed"],
"allowed_orientations": ["upright"],
"tilt_modes": ["upright"]
},
{
"item_id": "CHAIR-SET-001-A",
"weight": 28,
"dims": { "l": 22, "w": 22, "h": 40 },
"item_class": "chairs",
"fragile": false,
"is_nestable": true,
"stack_group_id": "CHAIRS-SET-001",
"allowed_orientations": ["upright", "rotated"]
}
]
}
]
}
]
}