1. A method for managing an energy consumed by a mobile system, for a given route between a point of departure A and a point of arrival B, the method including at least one set of trajectories composed of a trajectory of a setpoint for controlling a motor mechanism and of a trajectory of a setpoint for controlling at least one piece of auxiliary equipment, the trajectory of a setpoint describing a variation of said setpoint as a function of a position of the mobile system, said trajectories being calculated with respect to given objectives according to an optimization algorithm whose variables are formed from said setpoints, said method comprising: a preliminary step, itself comprising: a sub-step for storing in a memory of a computer an approximate profile for said route in the form of segments XL of straight lines, forming a first series of positions XL(k) sampled all along the route, a sampled position XL(k) corresponding to the passage from one segment to the following segment; a sub-step for sampling of said profile with the computer according to a spatial pitch Xe, forming a second series of positions sampled Xe(j) all along the route, the sampled positions Xe(j) being situated within the segments XL; and recalculating with the computer the trajectories of said setpoints at each sampled position XL(k) of the first series according to the optimization algorithm, the setpoints being constant over a given segment XL, a simulation predicting the energy environment of the mobile system up to the point of arrival B being carried out with the computer at each sampled position Xe(j) of the second series as a function of said setpoints and at least of the approximate profile of the remaining part of the route, the optimization algorithm taking into account a result of the simulation for calculating the setpoints of the trajectories; and outputting, from the computer to either an operator or a control mechanism of the mobile system, the setpoints for operation of the mobile system.