This paper deals with the optimization of velocity trajectories for electrically driven railway vehicles w.r.t. the total energy consumption between two successive stops. First, a quasi-static model of the complete power train of a standard railway vehicle is described. Based on four principle operating regimes-acceleration, cruising, coasting, and braking-energyoptimal trajectories are computed by determining the optimal regime sequence. For the optimization of the switching points between these operating states, particle swarm optimization (PSO) is used. The benefits of this approach are pointed out by simulation results using validated train models.