Modified run_simulation to use valve commands instead of length rate commands