Energy management system for a hybrid electric or electric vehicle comprising an electrical power collector adapted to intermittently collect electrical power from an external power supply track during driving of the vehicle, the energy management system is arranged to distribute electrical power from the electrical power collector to at least one electrical auxiliary load (4, 25, 26) of the vehicle when collecting electrical power from the external power supply track, wherein the energy management system comprises a control unit (5, 24) configured to control operating characteristic of the at least one auxiliary load (4, 25, 26) depending on if the vehicle operates in a power collecting mode, in which electrical power is collected from the external supply track during driving of the vehicle, or in a non-power collecting mode, in which electrical power is not collected during driving of the vehicle, characterised in that the energy management system comprises vehicle relative position determining means that is arranged to determine the vehicle position in relation to power supply track availability, and the energy management system is arranged to, when the vehicle operates in a power collecting mode: calculate an estimated first time period required for charging an energy storage device associated with the at least one electrical auxiliary load (4, 25, 26) of the vehicle to a predetermined maximal level; estimate a second time period until the power collector will disconnect from the external power supply track based on the determined vehicle position in relation to an end point of power supply track, and compare the first and second time periods (T1, T2), and, if the first time period is larger than the second time period, the control unit (5, 24) is arranged to increase the total power consumption level of the at least one auxiliary load (4, 25, 26), compared with the total power consumption level of the at least one auxiliary load (4, 25, 26) when operating the vehicle in corresponding circumstances in the non-power collecting mode, such that the associated energy storage device will attain the predetermined maximal level at the time of disconnection from the external power supply track; wherein said energy storage device comprises an air storage tank and is charged by filling the air storage tank with compressed air, or comprises an hydraulic accumulator and is charged by filling said hydraulic accumulator with pressurised hydraulic fluid, or comprises a cargo refrigerator compartment and is charged by lowering the temperature of the cargo refrigerator compartment, or comprises the temperature in a driver's cabin and is charged by increasing or decreasing the temperature of the driver's cabin depending on the circumstances. calculate an estimated first time period required for charging an energy storage device associated with the at least one electrical auxiliary load (4, 25, 26) of the vehicle to a predetermined maximal level; estimate a second time period until the power collector will disconnect from the external power supply track based on the determined vehicle position in relation to an end point of power supply track, and compare the first and second time periods (T1, T2), and, if the first time period is larger than the second time period,