Wrote working parallel energy sim.