An integrated optimization approach for a hybrid energy system in electric vehicles