Systematic management of simulation state for multi-branch simulations in simulink