The optimal train operation which minimizes sum of supplied energy from substations is presented 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 electric double layer capacitor (EDLC) is assumed as an energy storage device in our study, because of its high power density. 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. On the other hand, our previous works were to optimize acceleration/deceleration commands of the train for minimizing energy consumption without the energy storage device. Therefore, we intend to optimize acceleration/deceleration commands together with current commands through energy storage devices as our next research target. The proposed method can determine the optimal acceleration/deceleration and current commands at every sampling point. For this purpose, the optimal control problem of the train operation is formulated mathematically. It is generally difficult to solve the problem because the problem is composed of a large-scale non-linear system. However, the Sequential Quadratic Programming (SQP) can be applied to solve the problem. Two results with and without on-board energy storage device are compared. These optimized results indicate that the total energy consumption is reduced by at least 0.35% by using the EDLC. The relation between internal resistance and energy consumption is also revealed.