1. A method for determining an optimal run-curve for a vehicle along a route between two locations comprising pre-processing steps and real-time processing steps, wherein the preprocessing steps comprise: defining, for the vehicle, a state space based on possible velocities and possible locations along the route; generating, from the state space, a transition matrix for possible actions of the vehicle, and for evaluating a set of weights and corresponding travel times, wherein each weight is a relative importance of minimizing the corresponding travel time with respect to a rate of energy consumption E by the vehicle; and wherein the real-time processing steps comprise: receiving a current travel time T and current speed limits; identifying a subspace of the state space based on the current: speed limits while considering dynamics of the vehicle; updating the transition matrix for the subspace according to the current speed limits; determining initial weights for solving a minimization problem using the set of weights and the current travel time; determining an optimal weight μ by solving the minimization problem with the initial weights; and solving the minimization problem sequentially with different weights to obtain the optimal run-curve, wherein the minimization problem uses an objective function μE+(1−μ)T subject to constraints, wherein the steps are performed in a processor.