AN ALGORITHM FOR THE OPTIMAL ROUTING OF ELECTRIC VEHICLES