The optimal operation of rail vehicle minimizing total energy consumption is discussed in this paper. In recent years, the energy storage devices have enough energy and power density to use in trains as on-board energy storage. The on-board storage can assist the acceleration/deceleration of the train and may decrease energy consumption. Many works on the application of the energy storage devices to trains were reported, however, they did not deal enough with the optimality of the control of the devices. The authors pointed out that the charging/discharging command and vehicle speed profile should be optimized together based on the optimality analysis. The authors have developed the mathematical model based on a general optimization technique, sequential quadratic programming. The proposed method can determine the optimal acceleration/deceleration and current commands at every sampling point under fixed conditions of transfer time and distance. Using the proposed method, simulations were implemented in some cases. The electric double layer capacitor (EDLC) is assumed as an energy storage device in our study, because of its high power density etc. The trend of optimal solutions such as values of control inputs and energy consumption is finally discussed. Copyright © 2009 Institute of Electrical Engineers of Japan. Published by John Wiley & Sons, Inc.