Optimal sequencing of traffic streams at a signalized junction