the attached file shows that the beam has a maximum bending moment of 2071.58 kNm. If you divide 2071.58 by the yield strength of steel (S235) you get the minimum moment of resistance that the beam needs to meet its strength. (2071.58e + 6) / (235) = 8815.23e+3 mm^3 (Wy).
A HEB800 has a moment of resistance of 8977e+3 mm^3, which means that it is the smallest profile possible because a HEB700 has a moment of resistance of 7340e+3 mm^3. However, an HEB900 is chosen during optimization. How is that possible?