Bulk fuel suppliers promise something simple: the tanks at the sites they serve stay topped up, and nobody has to call. The software behind that promise answers two questions all day. Which tanks will run dry soonest? And which truck, driver and product should serve them today?

Most of the engineering risk sits in details that look small. Here are the ones that decide whether a tank monitoring and dispatch platform can be trusted.

Volume is not what the gauge reports

Gauges report height. Height becomes volume through a strapping table specific to that tank shell, and volume moves with temperature, so gross and net volumes differ. A reporting layer that is not explicit about which one it shows produces a forecast that drifts with the weather.

A quiet tank is not a full tank

Readings arrive irregularly, hourly at best and often less, with gaps whenever a device is out of coverage. A tank whose telemetry has gone stale is a different state from a tank that is full. Stale data presented as fresh is the failure that matters most, because the dispatch board looks calm right up to the emergency call.

The fix is boring and essential: show the age of the reading everywhere a level is shown.

Refills poison the burn rate

Deliveries have to be detected and excluded from the consumption calculation. Otherwise a refill reads as negative consumption and corrupts the fit for days.

The domain model

Start with the site, its tanks and the product grade each tank holds. A tank record carries nominal capacity, safe fill capacity, the reorder threshold and the delivery agreement type, because a keep-full arrangement and an on-request account produce completely different urgency.

Store readings as a time series, with the raw reading kept alongside the derived value. When a conversion factor is corrected later, the history can be replayed instead of lost.

Ingestion that survives outages

  • Tank gauges and telemetry units supply level readings
  • A fleet and back-office system supplies orders, inventory, pricing and account data
  • A telematics provider supplies vehicle position, odometer and hours-of-service status
  • A mapping service supplies geocoding, travel time and route distance

Pull on a schedule where a source has no push mechanism, subscribe to webhooks where it does, and keep an ingestion log that supports backfill after an outage. Make ingestion idempotent so a replayed batch never duplicates readings. Cache travel times between stable site pairs instead of paying for them on every dashboard refresh.

Forecasting and dispatch

Days-to-empty comes from a consumption rate fitted over a recent window, adjusted for seasonality and for site patterns such as operating only on business days. Dispatch suggestions rank candidate stops by urgency, then filter by feasibility:

  • Compartment capacity and the current load on the truck
  • Product compatibility, so grades are never cross-contaminated
  • Driver qualifications and endorsements for the cargo
  • Remaining legal driving hours
  • Site access windows

The model proposes, a person approves

A ranking model never sees the road closure or the phone call from a site. So it produces a proposal, not a command. Dispatchers review, reorder and approve, and an audit trail records who changed what.

Build order

Build the ingestion and normalisation layer first and run it against historical readings. That exposes sensor drift and unit inconsistencies before any interface exists. Backtest the forecast against known past deliveries. The dashboard and map view come last.

Full case study: Tank Monitoring and Fuel Dispatch Platforms