At its integrated steel plant in Luleå, SSAB EMEA produces high strength steel via two basic oxygen furnaces (BOFs), type LD/LBE. The BOFs are charged with a mix of hot metal, scrap, and slag formers. The scrap has several functions, for example, as coolant to balance excess heat, and it contributes to high steel production rate and decreased CO2 emission. The optimal scrap to hot metal ratio is influenced by several factors, for example, the excess heat generated in the BOF versus target value of tapping temperature, content of contamination elements versus contents allowed in the steel, possible use of alloys in scrap to decrease the need of alloy addition and the scrap price versus the production cost of hot metal. The first two factors also affect the maximum amount of scrap to be charged. Furthermore, the available scrap exists as several types with different composition, properties, size, and price. For most scrap types there are also uncertainties in composition, which has to be considered. An optimization model has been further developed in combination with some statistic analysis techniques. The present work is focusing on the possibility to use the model as a tool to optimize and control raw material/scrap blending into the BOFs. On the basis of the statistical analysis technique, the scrap sorting in the model will be described, as well as development and introduction of an extended BOF sub-model. This model includes a scrap sorting function and a response on deviations in steel quality. Real production data is used to identify steel quality parameters with consideration of different combination of elements, for example, S, Cr, Ni, and Cu. The possible solutions with simultaneous consideration of steel quality, energy consumption and production cost are presented.