Design of the control strategy for a range extended hybrid vehicle by means of dynamic programming optimization