Optimization of a plug-in hybrid electric vehicle