Solar cars are known for their energy efficiency, and different races are designed to measure their performance under certain conditions. For these races, in addition to an efficient vehicle, a competition strategy is required to define the optimal speed, with the objective of finishing the race in the shortest possible time using the energy available. Two heuristic optimization methods are implemented to solve this problem, a convergence and performance comparison of both methods is presented. A computational model of the race is developed, including energy input, consumption and storage systems. Based on this model, the different optimization methods are tested on the optimization of the World Solar Challenge 2015 race strategy under two different environmental conditions. A suitable method for solar car racing strategy is developed with the vehicle specifications taken as an independent input to permit the simulation of different solar or electric vehicles.