Numerical analysis of the effects of carrier dynamics on the switch-on and gain-switching of quantum dot lasers