Skip to contents

Takes a raw cycle log (one row per completed haul cycle, e.g. from a fleet management system or from simulate_shift()) and computes the standard haulage KPI set used throughout haulplan.

Usage

haul_kpis(log, shift_hours = 12)

Arguments

log

A data.frame with (at minimum) columns:

truck_id

Truck identifier.

queue_min

Minutes spent queueing at the loader.

load_min

Minutes spent loading.

travel_min

Minutes hauling + returning (back-cycle).

payload_t

Tonnes moved in the cycle.

Optional: route_id (KPIs are also returned per route), shift_id.

shift_hours

Nominal shift length in hours used for rate KPIs. Default 12.

Value

A list with fleet (one-row data.frame of fleet KPIs) and, when route_id exists, by_route (KPIs per route).

KPIs computed

production_t / prod_tph

Total tonnes and tonnes per hour.

loads / loads_per_hr

Completed cycles and hourly rate.

avg_payload_t

Mean payload per cycle.

avg_cycle_min

Mean full cycle time (queue + load + travel).

queue_pct

Share of total cycle time lost to queueing — the bunching signature.

avg_queue_min / p90_queue_min

Mean and 90th-percentile queue.

truck_hours

Truck-hours consumed (sum of cycle time).

tonnes_per_truck_hr

Fleet productivity per truck hour.

Examples

log <- haul_example("cycles")
k <- haul_kpis(log)
k$fleet
#>   loads production_t prod_tph loads_per_hr avg_payload_t avg_cycle_min
#> 1   624      58138.6 4844.883           52      93.17083      22.62756
#>   avg_queue_min p90_queue_min  queue_pct truck_hours tonnes_per_truck_hr
#> 1      1.221987         2.714 0.05400436    235.3267            247.0549