// Compute the peak queued work across synchronized arrivals followed by service at each time step. Return minus one for invalid counts. pub fn burst_backlog(arrivals: vector, service: vector) -> f64 { if len(arrivals)!=len(service) { return -1.0; } let mut q = 0.0; let mut peak = 0.0; let mut i = 0; while ipeak { peak = q; } q -= s; if q<0.0 { q = 0.0; } i += 1; } peak }