Numerical simulation and design of semiconductor quantum dot-based lasers and amplifiers