A Simulation Tool to Optimize the Allocation of Generation Resources on the Energy and Reserve Markets