Energy optimisation of hybrid electric vehicles