Create aggregated simulation code