Method performed by a control unit to control energy flows of a vehicle, wherein said vehicle comprises an energy system, wherein said energy system comprises a plurality of energy subsystems (MeESS; EIESS), wherein within each energy subsystem (MeESS; EIESS) one form of energy is used and each energy subsystem (MeESS; EIESS) comprises: • at least one energy consumer (MeCons; EICons; Conv1), • at least one energy producer (ICE; Conv1), • at least one common converter (Conv1), and wherein at least one energy subsystem (MeESS; EIESS) comprises: • at least one energy buffer, wherein in order to control energy flows within said energy system; said control unit at a first sample frequency continuously is; setting a respective unitary energy price for respective energy subsystem (MeESS; EESS) for a first sample interval t+n characterised in that said control unit further is; during a second sample frequency having a second sample interval of t+m; • collecting a vehicle travel route information (cRoln) for an predefined travel route (TrRo(n)); • defining an upcoming part route (pRo(n)) dependent on said vehicle travel route information (Roln), • estimating an energy consumption (EnCo) over said part route (pRo(n)) for each energy subsystem (MeESS; EIESS) based upon said vehicle travel route information (Roln), • calculating a predictive energy buffer price for respective energy buffer for said part route (pRo(n)) dependent at least on said estimated energy consumption, and • setting a respective energy buffer price to be said predicted energy buffer price during the next second sample interval t+m, wherein for energy subsystems (EIESS) comprising at least one energy buffer said unitary energy price is dependent on respective energy buffer price, and during said first sample interval t+n said control unit • providing a quantity of power to a first energy subsystem (MeESS; EIESS) from a second energy subsystem (MeESS; EIESS), wherein the provided quantity of power corresponds to a determined supplied quantity of power of said common converter (Conv1) at the unitary energy price of said first energy subsystem (MeESS; EIESS). • at least one energy consumer (MeCons; EICons; Conv1), • at least one energy producer (ICE; Conv1), • at least one common converter (Conv1), • at least one energy buffer, • collecting a vehicle travel route information (cRoln) for an predefined travel route (TrRo(n)); • defining an upcoming part route (pRo(n)) dependent on said vehicle travel route information (Roln), • estimating an energy consumption (EnCo) over said part route (pRo(n)) for each energy subsystem (MeESS; EIESS) based upon said vehicle travel route information (Roln), • calculating a predictive energy buffer price for respective energy buffer for said part route (pRo(n)) dependent at least on said estimated energy consumption, and • setting a respective energy buffer price to be said predicted energy buffer price during the next second sample interval t+m, wherein • providing a quantity of power to a first energy subsystem (MeESS; EIESS) from a second energy subsystem (MeESS; EIESS), wherein the provided quantity of power corresponds to a determined supplied quantity of power of said common converter (Conv1) at the unitary energy price of said first energy subsystem (MeESS; EIESS).