Plastic optimization of 3D steel frames under fixed or repeated loading: reduction formulation