Thuật toán tiến hóa vi phân dựa trên các quy luật khả thi phát triển với ngôn ngữ C# để giải các bài toán tối ưu hóa có ràng buộc

Hoang Nhat Duc / Tạp chí Khoa học và Công nghệ Đại học Duy Tân 02(45) (2021) 103-108  
103  
02(45) (2021) 103-108  
Feasibility rule based differential evolution algorithm developed in visual  
C# for solving constrained optimization problems  
Thuật toán tiến hóa vi phân dựa trên các quy luật khả thi phát triển với ngôn ngữ C# để giải  
các bài toán tối ưu hóa có ràng buộc  
Hoang Nhat Duca,b*  
Hoàng Nhật Đứca,b*  
aInstitute of Research and Development, Duy Tan University, Da Nang, 550000, Vietnam  
aViện Nghiên cứu và Phát triển Công nghệ Cao, Đại học Duy Tân, Đà Nẵng, Việt Nam  
bFaculty of Civil Engineering, Duy Tan University, Da Nang, 550000, Vietnam  
bKhoa Xây dựng, Trường Đại học Duy Tân, Đà Nẵng, Việt Nam  
(Ngày nhận bài: 22/03/2021, ngày phản biện xong: 26/03/2021, ngày chấp nhận đăng: 29/03/2021)  
Abstract  
This study develops an advanced tool for tackling constrained optimization problems based on an integration of  
feasibility rules and differential evolution metaheuristic. This tool aims at finding a solution with the most desired  
objective function value and concurrently satisfies all of the problem constraints. The optimization approach, named as  
feasibility rule based differential evolution (FRB-DE), has been developed in Microsoft Visual Studio with C#  
programming language. The newly developed tool has been tested with two optimization tasks in the field of civil  
engineering.  
Key words: Differential evolution; Constrained optimization; Feasibility rules; Metaheuristic.  
Tóm tắt  
Nghiên cứu này phát triển một công cụ để giải quyết các vấn đề tối ưu hóa có ràng buộc dựa trên sự tích hợp các quy  
tắc khả thi và thuật toán tiến hóa vi phân. Công cụ được xây dựng để tìm ra giải pháp với giá trị hàm mục tiêu tốt nhất  
và đồng thời thỏa mãn tất cả các ràng buộc. Phương pháp tối ưu hóa, được đặt tên là tiến hóa vi phân dựa trên các quy  
tắc khả thi (FRB-DE), đã được phát triển trong Microsoft Visual Studio với ngôn ngữ lập trình C #. FRB-DE đã được  
thử nghiệm với hai bài toán tối ưu hóa cơ bản trong lĩnh vực xây dựng dân dụng.  
Từ khóa: Tiến Hóa Vi Phân; Tối Ưu Hóa Có Ràng Buộc; Quy Tắc Khả Thi; Thuật Toán Tìm Kiếm.  
1. Introduction  
design tasks e.g. structural design [1-4],  
schedule/resource planning [5-8] etc.  
Constrained optimization tasks are generally  
Civil engineers frequently encounter  
constrained optimization problems in various  
* Corresponding Author: Hoang Nhat Duc; Institute of Research and Development, Duy Tan University, Da Nang,  
550000, Vietnam; Faculty of Civil Engineering, Duy Tan University, Da Nang, 550000, Vietnam  
Hoang Nhat Duc / Tạp chí Khoa học và Công nghệ Đại học Duy Tân 02(45) (2021) 103-108  
104  
sophisticated since the best found optimal  
solutions must satisfy a set of pre-specified  
restrictions stated in the form of mathematical  
equations or inequalities [9]. To handle such  
challenges, scholars have resorted to  
metaheuristic to find near optimal solutions for  
various engineering design tasks [10-12].  
Initially, a simple method of penalty functions  
can be used to handle such restrictions by  
incorporating the constraints into the objective  
function [13-15]. However, selecting penalty  
coefficients can be problematic for this  
approach [16]. Therefore, it is desirable to  
utilize advanced approaches that feature  
separation of objective functions and  
constraints.  
the aforementioned feasibility rules proposed  
by Deb [17]. The feasibility rule based  
differential evolution (FRB-DE) has been  
developed with Visual C#.NET to facilitate its  
implementation. The capability of the newly  
developed tool has been verified with two basic  
constrained optimization problems.  
2. Feasibility Rule Based (FRB) Differential  
Evolution (DE)  
Given that the problem of interest is to  
minimize a cost function f(X), where the  
number of decision variables is D, the  
optimization process of DE can be separated  
into three main steps:  
(i) Mutation: In this step, a vector in the  
current population (or parent) called a target  
vector is selected. For each parent, a mutant  
vector is created as follows [18]:  
Deb [17] proposes an efficient constraint  
handling algorithm based on three feasibility  
rules:  
Vi,g1 Xr1,g F(Xr2,g Xr3,g  
)
(1)  
1. Considering one feasible solution and one  
infeasible solution, the feasible solution always  
wins.  
where r1, r2, and r3 are three random indexes  
lying between 1 and NP. r1, r2, and r3 are  
selected to be different from the index i of the  
target vector. F is the mutation scale factor.  
2. Considering two feasible solutions, the  
one having lower objective function value is  
preferred.  
represents a mutant vector. NP is the  
Vi,g1  
number of searching agents.  
3. Considering two infeasible solutions, the  
one having smaller degree of constraint  
violation is considered to be better.  
(ii) Crossover: A new vector, named as trial  
vector, is created as follows:  
Vj,i,g1, if rand j Cr or j rnb(i)  
Accordingly, using these rules proposed by  
Deb [17], information regarding the feasibility  
of solutions is directly included in the selection  
phase of metaheuristic algorithms. Moreover,  
this advanced method also eliminates the need  
of specifying penalty coefficients. Therefore,  
U j,i,g1  
X
j,i,g , if rand j Cr and j rnb(i)  
(2)  
where Uj,i,g+1 is a trial vector. j denotes the  
index of element for any vector. randj is a  
uniform random number lying between 0 and 1.  
Cr denotes the crossover probability. rnb(i)  
metaheuristic  
feasibility rules often result in good  
optimization performances. With such  
algorithms  
coupled  
with  
denotes  
a
randomly chosen index in  
{1,2,..., NP}  
.
motivations, this study develops a computer  
program used for coping with constrained  
optimization problems. This program integrates  
the differential evolution metaheuristic [18] and  
(iii) Selection: The selection phase is used to  
compare the fitness of the trial vector and the  
target vector. This phase is described as follows:  
Hoang Nhat Duc / Tạp chí Khoa học và Công nghệ Đại học Duy Tân 02(45) (2021) 103-108  
105  
Based on the DE metaheuristic and the set of  
feasibility rules, this study has developed the  
Ui,g if f (Ui,g ) f (Xi,g )  
(3)  
Xi,g1  
X if f (U ) f (X )  
i,g  
i,g  
i,g  
FRB-DE  
tool  
used  
for  
constrained  
optimization. This tool has been coded in with  
Visual C#.NET programming language within  
the Microsoft Visual Studio integrated  
development environment. Fig. 1 demonstrates  
the function interface implementing FRB-DE.  
The C# delegate type is used to define general  
functional forms of the objective function and  
constraints (refer to Fig. 2). Moreover, a C#  
class is used to store information of an  
optimization problem (refer to Fig. 3.).  
Based on the aforementioned feasibility  
rules proposed by Deb [17], the formulation of  
the objective function in the DE metaheuristic  
is revised in the following manner:  
F(X) if g (x) 0 j  
j
m
(4)  
F(X)   
fmax  
g (x)  
j
j1  
where fmax denotes the objective function value  
of the worst feasible candidate.  
Fig. 1 The function interface implementing FRB-DE  
Fig. 2 The use of delegate type  
Hoang Nhat Duc / Tạp chí Khoa học và Công nghệ Đại học Duy Tân 02(45) (2021) 103-108  
106  
Fig. 3 An optimization problem representation  
3. Applications of the FRB-DE  
used to support a load of 20kN at its end. The  
beam is made of steel and its length is 1.5m.  
The ratio of w-to-t is less than 8 to prevent  
local buckling of the cross-section. It is desired  
to find a set of t and w resulting in a minimal  
cross-section area.  
In the first application, the FRB-DE is used  
to design the cross-section of a cantilever beam  
[19] shown in Fig. 4. There are two parameters  
of the beam cross-section needed to be  
specified: the depth of the section w and the  
thickness of the cross-section t. The beam is  
Fig. 4 Optimization problem 1  
denote the allowable values. a = 165N/mm2.  
Considering the constraints on bending  
stress, shear stress, and vertical deflection of  
the free end [19, 20], the optimization task is  
a = 90N/mm2. a = 10mm. I and Q denote the  
q
moment of inertia and moment about the neural  
axis (NA) of the area above the NA,  
respectively [19]. E is the modulus of elasticity  
of steel = 21x104N/mm2. M = PL denotes the  
bending moment (N.mm).  
formulated as follows:  
2
f A 4t(w t)  
Min.  
(mm )  
(5)  
Mw /(2I) a  
s.t.  
VQ/(2It) a  
After 300 generations and with the use of 30  
searching agents, the best found solution is as  
follows: w = 117.108mm and t = 14.6mm. With  
these variables, all of the four constraint values  
are satisfied.  
3
q PL /(3EI) qa  
8w/t 0  
q
, , and a are bending stress, shear  
where  
stress, and vertical deflection of the free end,  
respectively. The variables with subscript ‘a’  
Hoang Nhat Duc / Tạp chí Khoa học và Công nghệ Đại học Duy Tân 02(45) (2021) 103-108  
107  
The next application involves a preliminary  
planning of a multistory commercial building  
[19] (refer to Fig. 5). The construction site is a  
100x100-m area. The maximum height of the  
building is 25 m. Moreover, the parking area  
outside the building is at least 25% of the total  
floor area. The height of a single story is 3.5 m.  
In addition, the cost of the project is roughly  
estimated to be 0.5h + 0.001A where A denotes  
the floor area. Herein, the decision variables are  
the two sides of the constructed area (L1 and  
L2) as well as the number of stories (n). This  
optimization problem is modeled as follows:  
f Cost 0.5n3.50.001L1L2  
Min.  
(mm2)  
(6)  
L1L2n200000  
25n3.50  
s.t.  
(100100 L1L2) (L1L20.25) 0  
After 300 generations, the FRB-DE found  
the following solution: L1 = 90.479m, L2 =  
73.682m, and n = 3.  
Fig. 5 Optimization problem 2  
4. Concluding remarks  
developed tool. Based on the optimization  
results, the newly developed has successfully  
identified good sets of decision variables which  
satisfy all of the specified constraints. Therefore,  
FRB-DE can be a promising alternative to assist  
civil engineers in dealing with constrained  
optimization problems.  
In this study, a FRB-DE program based on  
the DE metaheuristic and a set of feasibility  
rules is developed to deal with constrained  
optimization tasks. The FRB-DE is programmed  
in Visual C# language. Two basic applications  
are used to test the applicability of the newly  
Hoang Nhat Duc / Tạp chí Khoa học và Công nghệ Đại học Duy Tân 02(45) (2021) 103-108  
108  
Based on a Hybridization of Adaptive Differential  
References  
Evolution  
Classification,"  
and  
Support  
Mathematical  
Vector  
Machine  
in  
[1] A. Cevik, M. H. Arslan, and M. A. Köroğlu,  
"Genetic-programming-based modeling of RC beam  
torsional strength," KSCE Journal of Civil  
Engineering, vol. 14, pp. 371-384, 2010/05/01 2010.  
[2] C. C. Coello, F. S. Hernández, and F. A. Farrera,  
"Optimal design of reinforced concrete beams using  
genetic algorithms," Expert Systems with  
Applications, vol. 12, pp. 101-108, 1997/01/01/  
1997.  
[3] C. A. Coello Coello, A. D. Christiansen, and F. S.  
Hernández, "A simple genetic algorithm for the  
design of reinforced concrete beams," Engineering  
with Computers, vol. 13, pp. 185-196, December 01  
1997.  
[4] V. Govindaraj and J. V. Ramasamy, "Optimum  
detailed design of reinforced concrete continuous  
beams using Genetic Algorithms," Computers &  
Structures, vol. 84, pp. 34-48, 2005/12/01/ 2005.  
[5] M.-Y. Cheng, D.-H. Tran, and N.-D. Hoang, "Fuzzy  
clustering chaotic-based differential evolution for  
resource leveling in construction projects," Journal  
of Civil Engineering and Management, vol. 23, pp.  
113-124, 2017/01/02 2017.  
[6] H.-H. Tran and N.-D. Hoang, "A Novel Resource-  
Leveling Approach for Construction Project Based  
on Differential Evolution," Journal of Construction  
Engineering, vol. 2014, p. 7, 2014.  
Problems  
Engineering, vol. 2021, p. 6647829, 2021/02/20  
2021.  
[12] N.-D. Hoang and Q.-L. Nguyen, "A Novel  
Approach for Automatic Detection of Concrete  
Surface Voids Using Image Texture Analysis and  
History-Based Adaptive Differential Evolution  
Optimized Support Vector Machine," Advances in  
Civil Engineering, vol. 2020, p. 4190682,  
2020/07/28 2020.  
[13] H. Nhat-Duc and L. Cong-Hai, "Sử dụng thuật toán  
tiến hóa vi phân cho các bài toán tối ưu hóa kết cấu  
với công cụ DE-Excel solver," DTU Journal of  
Science and Technology, vol. 03, pp. 97-102, 2019.  
[14] C. A. C. Coello, "Constraint-handling techniques  
used with evolutionary algorithms," presented at the  
Proceedings of the Genetic and Evolutionary  
Computation Conference Companion, Kyoto, Japan,  
2018.  
[15] C. A. Coello Coello, "Theoretical and numerical  
constraint-handling  
techniques  
used  
with  
evolutionary algorithms: a survey of the state of the  
art," Computer Methods in Applied Mechanics and  
Engineering, vol. 191, pp. 1245-1287, 2002/01/04/  
2002.  
[16] R. M. John, G. R. Robert, and B. F. David, "A  
Survey of Constraint Handling Techniques in  
[7] N.-D. Hoang, "NIDE:  
A
Novel Improved  
Evolutionary  
Computation  
Methods,"  
in  
Differential Evolution for Construction Project  
Crashing Optimization," Journal of Construction  
Engineering, vol. 2014, p. 7, 2014.  
Evolutionary Programming IV: Proceedings of the  
Fourth Annual Conference on Evolutionary  
Programming, ed: MITP, 1995, p. 1.  
[8] N.-D. Hoang, Q.-L. Nguyen, and Q.-N. Pham,  
"Optimizing Construction Project Labor Utilization  
Using Differential Evolution: A Comparative Study  
of Mutation Strategies," Advances in Civil  
Engineering, vol. 2015, p. 8, 2015.  
[17] K. Deb, "An efficient constraint handling method  
for genetic algorithms," Computer Methods in  
Applied Mechanics and Engineering, vol. 186, pp.  
311-338, 2000/06/09/ 2000.  
[18] R. Storn and K. Price, "Differential Evolution – A  
Simple and Efficient Heuristic for global  
Optimization over Continuous Spaces," Journal of  
Global Optimization, vol. 11, pp. 341-359,  
December 01 1997.  
[19] J. S. Arora, Introduction to Optimum Design,  
Fourth Edition: Academic Press, 2016.  
[20] J. M. Gere and B. J. Goodno, Mechanics of  
Materials, SI Edition: Cengage Learning, 2013.  
[9] P. W. Christensen  
and A. Klarbring, An  
Introduction to Structural Optimization: Springer,  
2009  
[10] S. M. Nigdeli, G. Bekdaş, and X.-S. Yang,  
"Metaheuristic Optimization of Reinforced Concrete  
Footings," KSCE Journal of Civil Engineering, vol.  
22, pp. 4555-4563, November 01 2018.  
[11] T. V. Dinh, H. Nguyen, X.-L. Tran, and N.-D.  
Hoang, "Predicting Rainfall-Induced Soil Erosion  
                   
pdf 6 trang yennguyen 22960 Free
Bạn đang xem tài liệu "Thuật toán tiến hóa vi phân dựa trên các quy luật khả thi phát triển với ngôn ngữ C# để giải các bài toán tối ưu hóa có ràng buộc", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfthuat_toan_tien_hoa_vi_phan_dua_tren_cac_quy_luat_kha_thi_ph.pdf