This study aims to introduce a comprehensive methodology for optimizing complete real structural systems for roofs involving trusses, purlins, and bracing systems jointly, taking into account realistic loads and constraints dictated by technical codes, thereby offering a more accurate representation of practical scenarios. The objective is to achieve the minimum mass through size, shape, and topology optimization of both the main truss and purlin structural subsystems. To achieve this goal, the Enhanced Particle Swarm Optimization (EPSO) algorithm is implemented. An example of a realistic case, which takes into account multiple actual constraints such as stress, displacement, buckling, and natural frequency limits, is thoroughly evaluated. After that, 144 other interactions among dimensions of the building and loads applied are simulated, and the mass of the system is obtained for each one of them. The results indicated that the graphs generated from the various simulations allow for the determination of the optimized mass for different building dimensions. Consequently, the cost and raw material consumption can be estimated for common applications. Therefore, it is concluded that this work presents a significant contribution to structural designers, as the proposed methodology enables structural optimization quickly and easily for practical engineers.