A dynamic programming method for analysis of bridges under multiple moving loads