Update simulation code to use datadr and map-reduce