Breaking down the simulation

Broke down the fuel consumption simulation into functions for use in a
future optimization algorithm.