Public-Private Partnership (PPP) tolled expressways, multi-lane highway bridges, and statutory axle-load enforcement corridors across East and Southern Africa process tens of thousands of passages per hour under strict lane-throughput and fiduciary audit mandates. Disconnected plaza lane controllers, standalone piezoelectric Weigh-in-Motion (WIM) strips, and delayed batch settlement jobs result in barrier gate tailgating losses, misclassification between Class-3 rigid trucks and Class-6 multi-axle articulated semi-trailers, chronic plaza congestion when prepaid ETC balances lag mobile-money top-ups, and opaque revenue-sharing reconciliations between sovereign road authorities and private concessionaires.
devManue builds high-throughput Expressway Toll Concession, Electronic Toll Collection (ETC) & High-Speed Weigh-in-Motion (HS-WIM) ERP platforms. The architecture combines local plaza edge autonomy (sub-50ms barrier actuation even during fiber backhaul cuts) with centralized double-entry wallet ledgers, optical/LiDAR vehicle classification audit trails, automated EAC Vehicle Load Control Act overload diversion, and real-time PPP escrow waterfall accounting.
1. Sensor-Fused Vehicle Classification & Immutable Passage Ledger Schema
Fraud at highway toll plazas overwhelmingly targets class downgrading—for example, swapping an OBU RFID tag registered to a Class-1 passenger saloon car onto a 4-axle heavy commercial truck, or cashier collusion recording a 6-axle prime mover as a 2-axle light van on manual cash/card lanes. Relying solely on the RFID tag's declared class or the cashier's keypad entry leaks 8–14% of commercial freight toll revenue.
The ERP eliminates class-downgrade leakage by computing an independent physical sensor class on every passage using optical curtain height, treadle/inductive axle count, dual-tyre detection, and quartz HS-WIM gross weight. Any discrepancy between Cashier/Tag Class and Sensor Class triggers an immediate discrepancy flag paired with synchronized front/rear ANPR high-dynamic-range crops. Below is the PostgreSQL schema governing toll passages, axle telemetry, and concessionaire shift audits:
CREATE TABLE toll_plaza_passages (
passage_id UUID PRIMARY KEY,
plaza_code VARCHAR(24) NOT NULL,
lane_id VARCHAR(16) NOT NULL,
passage_timestamp TIMESTAMPTZ NOT NULL,
payment_channel VARCHAR(20) NOT NULL, -- ETC_RFID, ANPR_WALLET, MPESA_EXPRESS, CASH, EXEMPT_EMERGENCY
rfid_epc_hex VARCHAR(32),
anpr_plate_front VARCHAR(20),
anpr_confidence_pct NUMERIC(5, 2),
declared_vehicle_class SMALLINT NOT NULL,
sensor_detected_class SMALLINT NOT NULL,
detected_axle_count SMALLINT NOT NULL,
wim_gross_weight_kg INTEGER,
wim_speed_kmh NUMERIC(5, 1),
applied_tariff_kes NUMERIC(10, 2) NOT NULL,
distance_zone_code VARCHAR(32),
class_mismatch_flagged BOOLEAN NOT NULL DEFAULT FALSE,
overload_divert_triggered BOOLEAN NOT NULL DEFAULT FALSE,
edge_signature_hmac CHAR(64) NOT NULL
);
CREATE TABLE etc_prepaid_accounts (
account_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
account_number VARCHAR(24) UNIQUE NOT NULL,
account_type VARCHAR(20) NOT NULL DEFAULT 'CORPORATE_FLEET',
cleared_balance_kes NUMERIC(14, 2) NOT NULL DEFAULT 0.00,
low_balance_threshold_kes NUMERIC(10, 2) NOT NULL DEFAULT 2000.00,
whitelist_version BIGINT NOT NULL DEFAULT 1,
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);2. Dynamic EAC Axle-Load Screening & Distance-Based Toll Calculation in Python
Under the East African Community (EAC) Vehicle Load Control Act and KeNHA highway protection regulations, pavement structural damage scales with the fourth power of axle load (ESAL fourth-power law). Consequently, overloading a single drive tandem axle beyond 18,000 kg or a tridem trailer group beyond 24,000 kg inflicts severe rutting even when total Gross Vehicle Weight (GVW) remains below the 56,000 kg statutory ceiling. Integrating High-Speed Weigh-in-Motion (HS-WIM) directly into the expressway ERP allows free-flow green-lighting of compliant trucks at 80 km/h while actuating overhead VMS lane-control arrows to route suspected overloads onto static enforcement scales.
The Python engine below resolves closed-system entry/exit distance tariffs, enforces dynamic WIM tolerance thresholds, and detects OBU tag class-swap anomalies:
from dataclasses import dataclass
from decimal import Decimal, ROUND_HALF_UP
from typing import Dict, List
EAC_AXLE_GROUP_LIMITS_KG: Dict[str, int] = {
"STEERING_SINGLE": 8000,
"DRIVE_SINGLE_DUAL_TYRE": 10000,
"TANDEM_GROUP": 18000,
"TRIDEM_GROUP": 24000,
}
CLASS_MULTIPLIERS: Dict[int, Decimal] = {
1: Decimal("1.00"), # Motorcycle / Three-wheeler
2: Decimal("1.50"), # Saloon Car / SUV
3: Decimal("3.00"), # Light Commercial / Minibus (2 axles)
4: Decimal("4.50"), # Medium Rigid Truck / Bus (2-3 axles)
5: Decimal("6.00"), # Heavy Articulated Truck (4-5 axles)
6: Decimal("7.50"), # Super-Heavy / 6+ Axle Haulage
}
@dataclass
class LanePassageDecision:
billable_class: int
toll_fee_kes: Decimal
tag_class_swap_alert: bool
divert_to_static_weighbridge: bool
overload_reason: str
def adjudicate_expressway_passage(
base_corridor_rate_kes: Decimal,
tag_registered_class: int,
sensor_detected_class: int,
axle_group_weights_kg: List[tuple],
max_gvw_limit_kg: int = 56000,
wim_screening_tolerance_pct: Decimal = Decimal("5.0"),
) -> LanePassageDecision:
# Enforce higher of tag-registered or physical sensor class to block tag-swap leakage
billable_cls = max(tag_registered_class, sensor_detected_class)
swap_alert = sensor_detected_class > tag_registered_class
multiplier = CLASS_MULTIPLIERS.get(billable_cls, Decimal("7.50"))
fee_kes = (base_corridor_rate_kes * multiplier).quantize(
Decimal("10.00"), rounding=ROUND_HALF_UP
)
total_gvw_kg = sum(w for _, w in axle_group_weights_kg)
tol_factor = Decimal("1") + (wim_screening_tolerance_pct / Decimal("100"))
divert = False
reasons = []
if Decimal(total_gvw_kg) > (Decimal(max_gvw_limit_kg) * tol_factor):
divert = True
reasons.append(f"GVW {total_gvw_kg}kg exceeds {max_gvw_limit_kg}kg")
for group_type, measured_kg in axle_group_weights_kg:
limit_kg = EAC_AXLE_GROUP_LIMITS_KG.get(group_type, 10000)
if Decimal(measured_kg) > (Decimal(limit_kg) * tol_factor):
divert = True
reasons.append(f"{group_type} {measured_kg}kg > {limit_kg}kg")
return LanePassageDecision(
billable_class=billable_cls,
toll_fee_kes=fee_kes,
tag_class_swap_alert=swap_alert,
divert_to_static_weighbridge=divert,
overload_reason="; ".join(reasons) if reasons else "COMPLIANT",
)3. Offline Plaza Edge Autonomy & PPP Escrow Waterfall Reconciliation
Expressway lanes cannot freeze when a road-construction excavator severs a fiber backhaul link or an upstream mobile-money gateway experiences transient latency. Each toll plaza operates a clustered local edge node receiving incremental ETC whitelist/hotlist delta snapshots every 15 seconds. During complete WAN isolation, lane controllers authorize passages in < 35ms against local cryptographically signed account state and spool HMAC-chained passage journals that replay idempotently into the central PostgreSQL ledger upon link restoration.
For PPP infrastructure investors, multilateral lenders, and sovereign contracting authorities, the back-office financial module reconciles cash drop-safe bag serials against lane treadle counts, applies foreign-exchange indexation formulas, splits gross collections across O&M reserve accounts, senior debt service, and government revenue-share tranches, and exports tamper-evident daily traffic and revenue certificates.
| Toll Operations & Audit Metric | Legacy Spreadsheets & Siloed Tools | devManue Custom Enterprise ERP |
|---|---|---|
| Lane Clearing Latency (ETC) | 400–900ms cloud round-trip causing barrier hesitation and rush-hour queues. | Sub-50ms local plaza edge authorization with asynchronous central ledger sync. |
| Tag-Swap & Cashier Class Fraud | Manual post-shift video spot-sampling catching <5% of downgraded trucks. | 100% real-time LiDAR + treadle axle-count cross-check overriding downgraded classes. |
| Mobile-Money Wallet Propagation | 5–15 minute batch delay leaving drivers stranded at plaza barriers after top-up. | Sub-3-second M-Pesa webhook ingestion pushed via delta stream to all plaza lanes. |
| Axle-Load Pavement Protection | 100% of heavy trucks forced into slow static weighbridge queues. | 80 km/h HS-WIM screening clearing compliant fleets while diverting only overloaded axles. |
4. Frequently Asked Architecture & Compliance Questions
How are lost entry tickets or unreadable plates handled on closed distance-based expressways?
Entry plazas link UHF tag EPC, front/rear ANPR plate text, vehicle color/make signature, and timestamp. If an RFID read misses at exit, the exit lane matches the ANPR plate in under 80ms to compute exact entry-to-exit mileage rather than defaulting to punitive maximum-corridor fares.
Can corporate logistics fleets manage hundreds of trucks under a single pooled ETC balance?
Yes. Fleet managers set per-truck daily spend caps, authorized corridor zones, and automated low-balance bank/M-Pesa sweep rules while receiving consolidated eTIMS tax invoices broken down by trailer registration and trip.
How does the system audit emergency and statutory exempt passages?
Ambulances, fire appliances, and gazetted state convoys must match registered ANPR/OBU exempt rosters alongside overhead camera snapshots, generating an immutable exemption register for concessionaire shadow-toll claims.
Related Enterprise ERP & Engineering Guides
- Civil Engineering, Highway Construction & Asphalt Plant ERP — Managing highway EPC construction, FIDIC interim payment certificates, and chainage QA prior to concession handover.
- Long-Haul Cross-Border Trucking & Transit Corridor ERP — Integrating fleet ETC toll statements and weighbridge compliance into per-trip haulage profitability.
- Interactive High-Throughput API & Webhook Rate-Limiter Planner — Size payment webhook and telemetry ingestion throughput for bursty rush-hour traffic.
- Book a Toll & Intelligent Transport Systems (ITS) Architecture Review — Consult with devManue on plaza edge systems, ANPR/RFID clearinghouses, and PPP settlement engines.