factored out create_simstate from create_sim; this allows the creation of multiple instances from the same set of equations.