In this study it is attempted to predict brittle-to-ductile transitions (BDTs) in polystyrene blends, induced either by an increase in temperature or by a decrease in inter-particle distance. A representative, two-dimensional volume element (RVE) of a polystyrene matrix with 20% circular voids, is deformed in tension. During deformation a hydrostatic-stress based craze-nucleation criterion  is evaluated. The simulations demonstrate that crazes initiate at low temperatures while a transition from crazing to shear yielding (BDT) is found around 75 degreesC. The numerical results correlate well with tensile tests on similar heterogeneous polystyrene. The presence of an absolute length, as experimentally found, is more difficult to explain. Near a free surface a T-g-depression is measured for polystyrene and also the resistance to indentation in polystyrene is lower than expected from bulk properties. Both observations are rationalised by an enhanced segmental mobility of chains near a free surface. As a consequence of these findings, an absolute length-scale could be incorporated in the numerical simulations. For simplicity, the length-scale is modelled by taking a temperature gradient over a thin layer near the internal free surfaces of the RVE. Deformation of the RVE with different absolute length-scales shows that indeed also the experimentally found brittle-to-ductile transition can be predicted if the ligament thickness between the inclusions ('voids') in polystyrene is below a critical value of ca. 15 nm.