Application of Genetic Algorithm for Optimal Design of Portal  
Frame Structures  
Onwuka D.O., Njoku F.C., Okorie D., and Ukachukwu O. C.  
Department of Civil Engineering, Federal University of Technology Owerri, Imo State Nigeria  
Received: 10 November 2025; Accepted: 18 November 2025; Published: 22 November 2025  
ABSTRACT  
This study developed and applied a MATLAB-based Genetic Algorithm (GA) program for the optimal design  
of steel portal frames with the aim of minimising cross-sectional area, weight, and cost. A single-span pitched-  
roof frame of 30 m span, 7 m eave height, and 3.5 m overheight was analysed, with variations in frame spacing  
from 6 m to 7.5 m, using S275 steel and BS 5950 design provisions. The GA optimisation consistently converged  
to efficient solutions, achieving 413 % cost savings and up to 10 % weight reduction compared with the  
empirical method. Results further showed that the column plastic modulus was approximately 50 % greater than  
that of the rafter, rafter depth was about span/55, and purlin depth was roughly one-quarter of the rafter depth.  
Although minor variations occurred due to stochastic algorithm behaviour, all runs produced results within the  
same performance bounds. The findings confirm the reliability of the developed GA framework as a practical  
and computationally efficient tool for designing cost-effective and structurally sound steel portal frames.  
Keywords: Genetic algorithm, optimisation, portal frame, steel structures, cost efficiency, MATLAB  
INTRODUCTION  
Portal frames are among the most widely used structural systems for single-storey industrial, agricultural, and  
commercial buildings because they provide large clear spans with relatively low material cost, rapid  
construction, and simple detailing. Their efficiency in spanning 20ꢀm–40ꢀm without intermediate supports makes  
them essential for warehouses, factories, and retail halls worldwide (Salamaꢀetꢀal.,ꢀ2023). The growing demand  
for sustainable, economical, and high-performance building systems has intensified interest in  
optimisation-based design strategies that reduce both embodied carbon and overall project cost while satisfying  
strength, stability, and serviceability requirements (Salamaꢀetꢀal.,ꢀ2023; Huangꢀetꢀal.,ꢀ2023).  
Designing portal frames involves numerous discrete and continuous variables member sizes, spacing, rafter  
pitch, haunch geometry, and connection stiffness that interact non-linearly through code-based constraints.  
Conventional derivative-based or enumerative optimisation methods are often inefficient in such mixed design  
spaces: they are prone to local minima and computationally expensive for large search domains (Whitworth  
&ꢀTsavdaridis,ꢀ2020). In contrast, population-based metaheuristic algorithms, particularly genetic algorithms  
(GAs), have proved highly effective because they do not rely on gradient information and can explore wide,  
non-convex feasible regions while accommodating discrete design variables (Grecoꢀetꢀal.,ꢀ2023;  
Stulpinasꢀ&ꢀDaniūnas,ꢀ2024).  
Recent developments in structural optimisation have demonstrated the capability of GAs and their hybrid  
variants to achieve significant reductions in steel weight and cost. Studies integrating multi-objective  
formulations (such as NSGA-II or Pareto-based ranking) enable designers to balance conflicting objectives,  
including cost, stiffness, and environmental impact (Salamaꢀetꢀal.,ꢀ2023; Whitworth &ꢀTsavdaridis,ꢀ2020). For  
instance, Salama etꢀal. (2023) applied an embodied-carbon minimisation strategy to single-story steel portal  
frames, reporting reductions of about 14ꢀ%-26ꢀ% relative to prismatic-member configurations. Martins, Correia,  
Ljubinković, &ꢀSimõesꢀdaꢀSilva (2023) carried out cost optimisation of steel I-girder cross-sections using GA,  
showing substantial material savings. Meanwhile, Stulpinas &ꢀDaniūnas (2024) optimised thin-walled  
Page 2274  
cold-formed portal-frame cross-sections via GA, achieving up to 22ꢀ% volume reduction in certain  
configurations.  
Despite this progress, several challenges persist in practical GA implementation for portal-frame design. Many  
published models are limited to idealised boundary conditions, small span ranges (typically ≤ꢀ25ꢀm), or  
simplified loading scenarios, whereas real-world industrial buildings often demand longer spans, multi-bay  
configurations, and strict serviceability control. Moreover, convergence behaviour and parameter tuning —  
particularly population size, elite fraction, and mutation rate significantly influence solution quality and  
computational efficiency (Grecoꢀetꢀal.,ꢀ2023). There is therefore a need for GA frameworks that are  
computationally efficient, code-compliant, and adaptable to standard hot-rolled steel sections used in  
professional practice.  
Addressing these gaps, the present study develops a MATLAB-based GA program for the optimal design of  
hot-rolled steel portal frames. The program integrates structural analysis, geometric and material constraints, and  
code checks based on BSꢀ5950. Its objective is to minimise cross-sectional area, weight, and total cost  
simultaneously while satisfying slenderness, stress, and deflection limits. The approach is applied to a  
pitched-roof, single-span frame with varying bay spacings between 6ꢀm and 7.5ꢀm, enabling evaluation of  
span-spacing effects on cost and weight efficiency. The paper presents the GA formulation and implementation,  
discusses sensitivity of results to algorithm parameters, and compares outcomes with both empirical design and  
previously published optimisation results.  
MATERIALS AND METHODS  
Materials  
The materials used in applying the Genetic Algorithm (GA) to the optimal design of portal frames are  
summarised under two main components: the portal frames and the MATLAB GA software.  
Portal Frames  
The study considered portal frames with centre-to-centre spacings of 6 m, 6.5 m, 7 m, and 7.5 m, each having  
an eave height of 7 m and an overheight of 3.5 m. The arrangement of purlins and rafters remained consistent  
across all models, with frame spans of 30 m, 25 m, 22 m, and 20 m, respectively. The model portal frame adopted  
for analysis was that with a 6 m frame spacing and a 30 m span.  
MATLAB GA Software  
The optimisation process was executed using the Genetic Algorithm (GA) Toolbox in MATLAB, run on an HP  
240 G7 Notebook PC equipped with 8 GB RAM and a 64-bit operating system. The MATLAB environment  
provided built-in functions for population generation, selection, crossover, mutation, and convergence analysis.  
Methods  
Developing a Program Designed to Optimise Portal Steel Structures  
A MATLAB-based program was developed for the design and optimisation of portal frames using the elastic–  
plastic empirical design method. Frame parameters, represented by alphabetic symbols, were defined and input  
into the MATLAB workspace. The program was tested on different portal frame configurations, and the results  
closely matched those from conventional design methods.  
Minimization Method Resulting to Cost-Effectiveness  
The MATLAB GA toolbox was employed to optimise each portal frame configuration. Analysis data served as  
input, and the parameters were defined as fitness functions. The optimisation aimed to minimise cross-sectional  
area, weight, and cost, either individually or simultaneously. For single-objective runs, each parameter was  
treated as the fitness function in turn, while for multi-objective optimisation, the Pareto-based ranking approach  
Page 2275  
by Fonseca and Fleming was applied to rank solutions by dominance and identify optimal trade-offs among  
objectives. The GA procedure involved defining the optimisation parameters, generating an initial population,  
evaluating fitness, and applying selection, crossover, and mutation operations until convergence or satisfaction  
of stopping criteria. Figure 1 shows the flowchart for the Genetic Algorithm used in the design.  
Figure 1: Flowchart of Genetic Algorithm  
Design using Genetic Algorithm  
A single-span, pitched-roof steel portal frame served as the model for weight and cost optimisation through  
standard cross-section dimensioning. The structure measures 30 m in span, 102 m in length, and 7 m in height,  
with an overheight of 3.5 m. Haunches were provided at the eaves and apex to reduce rafter depth and improve  
bending resistance (Salter, 2004). Purlins were spaced at 2.2 m centres, spanning a 6 m single bay. Fig 2 shows  
the steel portal frame structure  
Fig 2 Steel Portal Frame Structure  
The frame is constructed from steel grade S275 with a modulus of elasticity of 2.05 × 10⁵ N/mm² and a density  
of 7850 kg/m³. The applied dead load and live load are 0.45 kN/m² and 0.75 kN/m², respectively, while a notional  
horizontal load equal to 5% of the total vertical load acts at the column top. Design was carried out in accordance  
with BS 5950, using hot-rolled standard I-sections for cross-sectional dimensions. Each frame comprises two  
Page 2276  
universal columns and two universal beams per bay, with columns rigidly fixed at the base. These are illustrated  
in the figure below  
Fig 3: Frame details, loading and I cross-section  
In this case, the objective function, F(x) is the cost which is a function of the weight minimization of the  
individual members of the frame.  
F(x) = min COST = (npurlin * Volpurlin + nbeam* Volbeam + ncolumn * Volcolumn ) * ρ * C  
(1)  
subject to ultimate limit state and serviceability limit state constraints:  
i. Shear capacity: Shear capacity, Pv of a selected section for structural members must be greater than the  
applied shear force, Fv:  
Fv ≤ Pv = 0.6 py Av  
(2)  
(3)  
(4)  
For rolled I, H and channel sections, the shear area of the cross section Av is:  
Av = tD  
Hence,  
Fv ≤ Pv = 0.6 py tD  
ii. Moment capacity: Moment capacity of a selected section for structural members must be greater than  
the applied design moment.  
m ≤ Mc = pyS  
(5)  
Page 2277  
iii. Local capacity:  
F/AgPc + Mx/Mcx + My/Mcy ≤ 1  
iv. Deflection:  
(6)  
3
For purlin, δmax = 5wlp /384EI ≤ lp/360  
(7)  
3
5wlp /384EI - lp/360 ≤ 0  
(8)  
3
For beam(tension member), δmax = 5wlb /384EI ≤ lb/200  
(9)  
3
5wlb /384EI - lb/200 ≤ 0  
(10)  
(11)  
(12)  
3
For column(compression member), δmax = 5wlc /384EI ≤ lc/200  
3
5wlc /384EI - lc/200 ≤ 0  
v.  
Slenderness ratio:  
For purlin(tension member),slenderness ratio, λp = lp/ry ≤ 180  
λp = lp/ry – 180 ≤ 0  
(13)  
(14)  
(15)  
(16)  
For beam(tension member),slenderness ratio, λb = lb/ry ≤ 250  
λb = lb/ry – 250 ≤ 0  
For column(compression member),slenderness ratio, λc,  
λc = lc/ry ≤ 250  
(17)  
(18)  
λc = lc/ry - 250 ≤ 0  
vi.  
Web Buckling Resistance:  
b/T ≤ 9Ɛ  
(19)  
(20)  
for rolled section  
d/t ≤ 80Ɛ  
vii.  
Sway Check:  
a) The Span of the frame to the clear height of the column must not be greater than 5  
i.e. L/H ≤ 5 (21)  
b) the height of the apex above the tops of the columns to the span of the frame must not exceed 0.25  
i.e. h/L ≤ 0.25  
The Bounds:  
(22)  
viii.  
4.0mm ≤ t ≤ 16mm  
76mm ≤ D ≤ 910mm  
76mm ≤ B ≤ 304mm  
(23)  
(24)  
(25)  
Page 2278  
7.6mm ≤ T ≤ 24mm  
16.2cm2 ≤ A ≤ 286cm2  
(26)  
(27)  
(28)  
ix. A2 ≤ 5A1  
and  
A3 ≤ 1.4A2  
(29)  
(30)  
(31)  
(32)  
(33)  
(34)  
(35)  
Note: A = (2*B*T) + (D-2T)*t  
and Vol = A*l  
M = ρ*V = ρ*A*l  
½
r = [I/A]  
C = 1.05  
½
Ɛ = [275/py]  
The beam and column sections were selected from standard hot-rolled Universal Beam (UB) profiles ranging  
from 127 × 76 × 13 mm to 914 × 305 × 224 mm, while purlins were chosen from joist sections ranging from 76  
× 76 × 13 mm to 254 × 203 × 82 mm. The Genetic Algorithm first determined the optimal sectional areas (A),  
from which the volume (V), weight, and cost were subsequently computed using the defined equations. The  
optimisation was initially performed for frames with 6 m spacing, then repeated for 6.5 m, 7 m, and 7.5 m  
spacings using the same procedure.  
RESULTS AND DISCUSSIONS  
Results  
Table 1 illustrates the results obtained for the different portal frames considered using the program/ algorithm  
developed.  
Table 1 Results obtained from portal frames analysis using the algorithm developed  
Description  
S/No  
Portal Frames  
1
2
3
4
Specification  
Span Length (m)  
Frame Spacing (m)  
Building Length (m)  
Frame Total Height  
Overheight  
30  
25  
22  
20  
6
6.5  
7
7.5  
102  
10.5  
3.5  
117  
10.5  
3.5  
126  
10.5  
3.5  
135  
10.5  
3.5  
Length of each (m)  
Purlin  
Rafter  
6
6.5  
7
7.5  
15.4029  
12.9808  
11.5434  
10.5948  
Page 2279  
Column  
7
7
7
7
Total Number in the Purlin  
255  
230  
207  
191  
Building  
Rafter  
36  
38  
38  
38  
Column  
36  
38  
38  
38  
Roof Load (KN/m)  
Dead Load  
2.7725  
4.5  
3.0375  
4.8750  
12.0525  
438.5274  
-416.8227  
97.1034  
150.6562  
122.1929  
0.7533  
3.3056  
5.2500  
13.0279  
353.6030  
-350.0729  
86.2742  
143.3064  
100.5251  
0.7165  
3.5757  
5.6250  
14.0060  
306.0072  
-311.5595  
79.9596  
140.0605  
88.2238  
0.7003  
Life Load  
Design Load, w (KN/m)  
Moment (KNm)  
11.0815  
614.8711  
-547.9963  
117.2428  
166.2230  
166.1239  
@ A or E  
@ B or D  
@ C  
Reaction (KN)  
Thrust (KN)  
@ A or E  
@ A or E  
Notional Horizontal Load at each Column 0.8311  
Top (KN)  
Point Load on the Roof (KN)  
332.4462  
301.3124  
286.6128  
280.1210  
Table 2 Result using GA showing the minimised sectional areas obtained  
Purlin (Joist)  
Rafter or Beam UB  
Column UB  
S/N Area of Mass  
Section  
Designation  
Area of Mass  
section per  
Section  
Designation  
Area of Mass  
section per  
Section  
Designation  
o
section per  
(cm2)  
Metre  
(cm2)  
Metre(  
kg/m)  
(cm2)  
Metre(  
kg/m)  
(kg/m)  
1
2
3
26.9  
127x114x27  
127x114x29  
127x114x27  
98.3  
109  
457x191x98  
139.9 610x229x140  
140.1 686x254x140  
149.2 610x305x149  
34.2  
37.4  
34.2  
125  
139  
129  
178  
178  
190  
29.3  
533x210x109  
26.9  
101.2 533x210x101  
Table 3 Results using GA in Optimization showing the minimised sectional areas, weights and costs obtained  
Cod Method  
e
Purlin UB  
Rafter UB  
Column UB  
Weight,  
kg  
Cost ()  
BS  
595 (Optimu  
m)  
GA  
127 x 114 x 27  
26.9  
457 x 191 x 98  
610 x 229 x 140  
98.3  
139.9  
265.1  
97,424.25  
0
26.9*6 = 161.4  
98.3*15.4=1513.82 139.9*7=979.3  
2,654.52  
975,536.10  
Page 2280  
Run 1  
GA  
161.4*255=411 1513.82*36=54497. 979.3*36=35254.  
130,909.3 48,109,175.1  
57  
52  
8
2
0
BS  
127 x 114 x 29  
29.3  
533 x 210 x 109  
109  
686 x 254 x 140  
140.1  
595 (Optimu  
278.4  
102,312.00  
0
m)  
29.3*6=175.8  
109*15.4=1678.6  
140.1*7=980.7  
2835.1  
1,041,899.25  
Run 2  
175.8*255=448 1678.6*36=60429.6 980.7*36=35305.  
140563.8 51,657,196.5  
0
29  
2
BS  
GA  
127 x 114 x 27  
26.9  
533 x 210 x 101  
610 x 305 x 149  
595 (Optimu  
0
101.2  
149.2  
277.3  
101,907.75  
m)  
26.9*6=161.4  
101.2*15.4=1558.48 149.2*7=1044.4  
2764.28  
1,015,872.90  
Run 3  
161.4*255=411 1558.48*36=56105. 1044.4*18=37598  
57 28 .4  
134860.6 49,561,299.9  
8
0
Table 4 Results using the empirical method showing the cross-sectional area, weight and cost obtained  
BS  
595  
0
Empirica  
l
Weight, Cost ()  
kg  
127 x 114 x 29  
533 × 210 × 122  
610 × 229 ×140  
29.3  
122  
139.9  
291.2  
107,016.00  
29.3*6=175.8  
122*15.4=1878.8  
139.9*7=979.3  
3033.9  
1,114,958.25  
175.8*255=4482 1878.8*36=67636. 979.3*36=35254.  
147720. 54,287,320.5  
9
8
8
6
0
DISCUSSIONS  
The results confirm that the developed GA-based program can effectively design and optimise steel portal  
frames. However, variations in results may occur due to the influence of initial population and elite settings. The  
application of GA significantly reduced member sizes, yielding 411.5% cost savings compared to the empirical  
method. The optimisation model was further validated against published studies, showing close agreement with  
previous results despite minor differences in geometry and weight calculation methods. Table 5 shows a  
comparison with previous literature results.  
Table 5a Comparison with Previous Works: Works by other authors  
Researchers  
Column  
sections UB  
Rafter sections Depth  
UB haunch (m)  
of Length  
of Weight, kg  
2260.0  
haunch (m)  
Saka (2003)  
610 x 229 x 356 x 127 x 33 1.50  
101  
0.42  
0.47  
DO-DGA, BS5950  
533 x 210 x 82 457 x 152 x 60 1.75  
2138.0  
Page 2281  
DO-DGA, EC3  
533 x 210 x 82 457 x 152 x 52 1.95  
0.85  
2.45  
2028.2  
-
Issa and Mohammed 457× 152 × 52 406 × 140 × 46 0.11  
(2010)  
Phan et al. (2013)  
457 × 152 ×52 356 × 127 × 33 0.49  
et 457 × 152 × 52 356 × 127 × 33 n/a  
3.60  
5.13  
-
-
Ross  
Mckinstray  
al.(2014)  
Table 5b Comparison with Previous Works: Present Work  
a) Present Study (GA)  
b) Present Study (GA)  
Phan et al. (2013)  
610 x 229 x 140  
686 x 254 x 140  
610 × 229 ×113  
457 x 191 x 98  
533x210 x 109  
533 × 210 × 82  
533 × 210 × 82  
n/a  
n/a  
2493.12  
n/a  
n/a  
2659.3  
0.515  
n/a  
4.20  
4.99  
n/a  
-
Ross Mckinstray et al.(2014) 610 × 229 ×113  
c) Present Study (GA) 610 x 305 x 149  
-
533 x 210 x 101 n/a  
2602.88  
It is worth noting that many comparative studies in the literature focused on spans of 2025 m, while this study  
extends to spans of up to 30 m, representing a larger scale (Silva & Pimentel, 2022). Consequently, some  
variation in results is expected for the 30 m span case. However, when comparing only the 2025 m span models  
studied here against those prior works, the optimum section sizes are broadly similar, confirming consistency of  
the method. The detailed results also reveal that in optimum designs the column’s plastic section modulus is  
about 50 % greater than that of the rafter, the rafter depth approximates span/55, the rafters are 3040 % lighter  
than the columns, and the purlin depth is around 0.25 of rafter depth. Additionally, while no two GA runs were  
identical due to their stochastic nature, all results fell within the same bounded range.  
Comparison of Empirical Results and Genetic Algorithm Results  
Table 3 showed the result obtained in using GA in the optimisation, and Table 6. illustrates what was obtained  
using the empirical method.  
Table 6: Mass and Cost Calculation of the Frame using Empirical Results  
Column  
Rafter  
Purlin  
Section Designation  
Masses (kg/m)  
610 x 229 x 140  
139.9  
510 x 210 x 122  
122  
127 x 114 x 29  
29.3  
Each length: Mass(kg)  
Full Structure: Mass(kg)  
139.9x7=979.3  
979.3 x 36  
= 35,254.8  
122x15.4=1,878.8  
29.3x6=175.8  
1,878.8 x 36  
67,636.8  
= 175.8 x 255  
44,829  
=
Total mass for each length(kg) = 979.3 + 1,878.8 + 175.8  
= 3,033.9kg  
Total mass for full structure(kg) = 35,254.8+ 67,636.8 +44,829 = 147,720.6kg  
Page 2282  
N/B: The columns, rafters and purlins are assumed to have a uniform density  
Cost of Steel  
Material: I Section  
=
=
=
=
=
=
227,5000/ton  
Erection & Installation  
105,000 - 210,000/ton  
140,000/ton  
Assuming Erection & Installation  
Then for Material, Erection & Installation  
227,500/ton + 140,000  
367,500/ton  
367.5/kg  
For total mass for each length,  
Total Cost (₦) = 3,033.9 x 367.5  
=
=
₦1,114,958.25  
₦54,287,320.50  
For total mass for full structure,  
Total Cost (₦) =147,720.6x367.5  
Comparing GA results with empirical results indicated a 4-13% savings in cost using GA. Also, with GA there  
is an improvement in both weight and cost minimization.  
CONCLUSION  
This study successfully developed and applied a MATLAB-based Genetic Algorithm (GA) program for the  
design and optimisation of steel portal frames. The results demonstrate that the algorithm reliably identifies  
optimal cross-sectional dimensions that minimise frame weight and total cost while maintaining structural  
adequacy. Compared with the empirical design method, the GA approach achieved 413 % cost savings,  
confirming its effectiveness in generating more economical and material-efficient designs.  
The optimisation procedure also established clear proportional relationships among frame components the  
column’s plastic modulus was approximately 50 % greater than that of the rafter, rafter depth averaged about  
span/55, and purlin depth was roughly 0.25 of rafter depth. These relationships align with typical portal frame  
behaviour and validate the robustness of the developed model (Silva & Pimentel, 2022; Salama et al., 2023).  
REFERENCE  
1. Greco, A., Cannizzaro, F., Bruno, R., &ꢀPluchino, A. (2023). A nested genetic algorithm strategy for an  
optimal seismic design of frames. Computational Optimization and Applications, 87, 677-704.  
2. Huang, B., et al. (2023). Exploring embodied carbon comparison in lightweight frame structures.  
3. Issa, H. K., & Mohammed, S. A. (2010). Design optimisation of steel portal frames using modified  
distributed genetic algorithms. In Proceedings of the 13th International Conference on Civil, Structural  
and Environmental Engineering Computing (pp. 1-10). Stirlingshire, UK: Civil-Comp Press.  
doi:10.4203/ccp.93.86  
4. Martins, J.ꢀP., Correia, J., Ljubinković, F., &ꢀSimõesꢀdaꢀSilva, L. (2023). Cost optimisation of steel  
I-girder  
cross-sections  
using  
genetic  
algorithms.  
Structures,  
55,  
379-388.  
Page 2283  
5. Phan, D. T., Lim, J. B. P., Tanyimboh, T. T., Wrzesien, A. M., Sha, W., & Lawson, R. M. (2013).  
Optimization of cold-formed steel portal frame buildings using genetic algorithms. Computers &  
Structures, 89(15-16), 1653-1663. doi:10.1016/j.compstruc.2011.10.010  
6. Ross McKinstray, R., Lim, J. B. P., Sha, W., & Tanyimboh, T. T. (2014). Optimization of cold-formed  
steel portal frames subject to stressed-skin action using genetic algorithms. Thin-Walled Structures, 75,  
76-86. doi:10.1016/j.tws.2013.10.005  
7. Salama, A., AtifꢀFarag, A., Eraky, A., El-Sisi, A.ꢀA., &ꢀSamir, R. (2023). Embodied carbon minimization  
8. Salama, A., et al. (2023). An enhanced meta-heuristic algorithm for optimizing gable frames with tapered  
8
9. Silva, F. T. da, & Pimentel, R. L. (2022). Optimization of steel portal frames under a parametric structural  
design framework. Practice Periodical on Structural Design and Construction, 27(4), 04022038.  
10. Stulpinas, M., & Daniūnas, R. (2024). Optimization of cold-formed thin-walled cross-sections in portal  
11. Whitworth, A.ꢀH., &ꢀTsavdaridis, K.ꢀD. (2020). Embodied energy optimisation of steel-concrete  
composite beams using  
a
genetic algorithm. Procedia Manufacturing, 44, 417-424.  
12. Xue, P., Wan, Y., Takahashi, J., & Akimoto, H. (2024). Structural optimization using a genetic algorithm  
aiming for the minimum mass of vertical axis wind turbines using composite materials. Heliyon, 10,  
Page 2284