Changed simulation so it can run multiple times

on the same file without constructing the dependence graph more than
once