Simulation tool for energy management of photovoltaic systems in electric vehicles