Dislocation dynamics modelling of the ductile-brittle-transition