Fuzzy Penalty Function Approach for Constrained Function Optimization with Evolutionary Algorithms Baolin Wu and Xinghuo Yu Faculty of Informatics and Communication, Central Queensland University Rockhampton Old 4701, Australia. Email: {b.wu, x.yu}@cqu.edu.au Li Liu School of Computing and Mathematics, Deakin University Geelong, Victoria 3217, Australia. Email:
[email protected] Abstract In this paper, a novel fuzzy penalty function approach is proposed for solving the constrained optimization problems using evolutionary algorithms. The fuzzy penalty is constructed according to the information contained in individuals so that it can be tuned to reflect the appropriate penalty need for better search. Simulations on ten case studies indicate that the proposed method is very effective.
1. Introduction Constrained optimization problems are a difficult nonlinear problem that has been studied for many years using deterministic approaches. Evolutionary computation techniques have received a considerable attention regarding their robustness in solving complex optimization problems involving nondifferentiable and discontinuous nonlinearity and high dimension. There have been attempts to address this problem, for example the works in [1-3][5-6]. These methods can be divided into two groups – penalty function based approaches and heuristics based approaches. However, the boundary between these two groups is not clear. Some penalty function methods were developed using heuristic rules to penalize unfeasible solutions. Heuristics based approaches commonly use mathematical properties of penalty functions in selecting feasible solutions during evolution process. A comparative study of methods using evolutionary principles for constrained optimization problems can be found in [1]. The difference of performance on test cases indicates that these methods are problem-specific. Although the penalty function approach is theoretically a generic method, it is practically difficult to use since we have
no systematic way to select the penalty values for different problems. Population based evolutionary algorithms may provide an alternative solution as each individual contains information of search landscape which may be used in “guiding” the selection. The central issue of developing evolutionary algorithm based penalty function method is to construct a proper fitness function that the selection process can be acted on. In this paper, we propose a fuzzy penalty function tuning approach which alters the penalty values according to the information of individuals. The fuzzy penalty function re-shapes the searching surface, hence, the search performance is improved. This paper is organized as follows. In Section 2, we discuss the difficulty of choosing the penalty value using evolutioanry algorithms. In Section 3, a fuzzy penalty function is introduced. We discuss how to obtain the information from individuals, and construct the fuzzy penalty function in Section 4. We test the proposed approach on ten cases in Section 5. The conclusion is drawn in Section 6.
2. Constrained Function Optimization Problems A general constrained optimization problem is stated as follows (without loss of generality, only minimization constrained problem is concerned): find a state x * ∈ R n such that Minimize f ( x) Subject to
g j ( x) ≤ 0, j = 1, L, m hl ( x) = 0 , l = 1,L ,k a(i) ≤ xi ≤ b(i), 1 ≤ i ≤ n .
(1)
where x = ( x1 ,L , xn ) ∈ R n , and f (x ) is an objective function. g j ( x) and h l (x) are equality and inequality constrained functions respectively. a (i) and b(i) are the search space up-bound and low-bound for xi . Using the penalty function method, the constrained problem can be simply converted to an unconstrained one as f ( x ), if g j ( x) ≤ 0, hl ( x) = 0; F ( x) = f ( x ) + rG ( x) (2)
problems, we may describe the penalty value r for each combination of the conditions as If f is large and G is large then r is very small; If f is large and G is medium then r is small;
M If f is small and G is small then r is very large. We consider a semi-fuzzy model in which the r can take several different real values, and may be labeled by linguistics terms e.g. very small, very large. Let Ai
m
k
and Bi , i = 1L m , be the fuzzy sets for the fuzzy
j= 1
l= 1
variable f and G, respectively, and rk , k = 1L l , be a
G ( x) = ∑ g j ( x) + ∑ h l ( x) . where r ∈ R is the common penalty parameter. Under this conversion, the overall objective function now is F(x), which serves as a fitness function in evolutionary algorithms. In most cases, however, selecting penalty value is problem dependent, and there has not been a general rule of penalty function selection. One common way is to use ‘trail and error’ until a proper value is found.
fuzzy singleton for r, the output of the fuzzy rule base for r is inferred by
The advantage of population based optimization algorithms such as evolutionary algorithms is that each individual can provide useful information about the objective function f ( x i ) and constraint functions G(x) . Consequently, we may take the advantage to construct a penalty value such that if the value of f ( x i ) is large and the value of G(x) is large, then r
functions for Ai and B j , respectively. Clearly, the
1
is small. Obviously, small r will scale down the value of F(x) which results in a “flat” search space helping an “escape” to a better search. However if both values are small, then the r should be large enough to keep the global optimum within the feasible search space. This mechanism can be realized using the fuzzy logic concept eg large, small, medium, if-then clauses etc. Indeed, because we do not exactly know what is large or small in general, we can introduce fuzzy coding of the information provided by each individual, which maps the value r according to the different conditions.
3. Fuzzy Penalty Functions Let us assume now that the f(x) and G(x) are fuzzy variables denoted as f and G associate with fuzzy values, such as very large, large, small, very small etc. Furthermore, we assume that the numerical values of the largest and smallest of function f(x) are f max and f min , the largest value of G(x) is G max , and the smallest G(x) will be zero of course, which form the ranges for f(x) and G(x), denoted as D f = [ f min , f max ] and DG = [ G min , G max ] . We can partition the ranges and assign each partition with a fuzzy value. For simplicity of discussion, we assume that each range has three partitions, named as large, medium and small. Based on our understanding of the constrained optimization
l
r=
∑ ωk r k
(3)
k =1 l
∑ ωk k =1
ω k = T ( Ai ( f ( x)),B j (G (x ))),i = j = 1Lm (4) where
Ai ( f ( x )) and
B j ( G ( x ))
are membership
output of r is a function of f(x) and G(x). Now the (2) can be rewritten as f ( x), 0 ≤ G ( x) ≤ 1; F ( x) = f ( x) + rF ⋅ G ( x ), G ( x) > 1.
(5)
where r F is the fuzzy output value inferred by (3). Comparing (5) with (2), we see that the difference lies in the fuzzy penalty value in (5), while in (2) the value r is a constant. Such reconstruction of penalty function certainly gives an adaptive mechanism such that the information provided by f(x) and G(x) can be used to vary the penalty values under different conditions.
4. Building the fuzzy penalty function New we consider how to construct a proper fuzzy rule base for the penalty. Actually, as far as Evolutionary Algorithms are concerned, the construction of the fuzzy system is quite obvious. First, we find the estimated D f = [ fmin , f max ] and DG = [ G min , G max ] . as f min = min( f l t ( x)), f max = max( fl t ( x)), G max = max( G lt ( x )), G min = 0 . where t is the index of generation and l is the index of population. Second, we consider how many partitions we need for each input fuzzy variable. This is not trivial and depends on the problem and how fine the search space we want it to be divided. The rule of thumb is that the more partitions we have, the finer the tuning. Practically, we may choose three to five partitions for each input fuzzy variable. The values for output fuzzy variable r, which are real values, are assigned by dividing the range [1, rmax ] , where
rmax = f max − f min . The rmax can be sufficiently large for general constrained optimization problems. In most cases, however, the rmax will be too large as a common penalty value. It is up to us to build a fuzzy rule base that can scale the penalty value down smoothly. The objective of building a rule base is to reconstruct a fitness surface so that the optimum solution of the constrained optimization problem can be remained within the feasible search space. Here we give a possible rule base for the penalty value: If f is AL And G is BL Then r = r5 ; If f is AL And G is BM Then r = r4 ; If f is AL And G is BS Then r = r3 ; If f is AM And G is BL Then r = r4 ; If f is AM And G is BM Then r = r3 ;
(6)
If f is AM And G is BS Then r = r2 ; If f is AS And G is BL Then r = r3 ; If f is AS And G is B M Then r = r2 ; If f is AS And G is BS Then r = r1 . The evolutionary algorithm with fuzzy penalty function for the constrained optimization problem is stated as follows: 1. An initial population is determined by setting vector x i , i = 1,L m , sampling from a uniform distribution across the pre-selected range of each variable xij ∈ ( a k , b k ), j = 1, L k ; 2. All vectors x i are calculated with respect to the optimization function f (x) and constraint function
10. The process repeats to step 3 unless the available execution time is exhausted or an acceptable solution has been discovered.
5. Simulation Results Ten test cases are used, which are taken from [5]. These problems are suggested as preliminary test beds for constraint handling methods. The parameters setting for the proposed algorithm is identical to all test cases, in which the population size is 50 with 5000 generations. And three partitions are made to f(x) and G(x) with triangle membership functions, and five points are used for the output. The rule base is exactly the same as (6). We consider ten independent runs for each case, and give the statistical results listed in Table 1. For these test cases, overall results show the improvement in comparison with the results reported in [5]. For the function F1, F3, F4, F6, F8, and F9 the optima are found with the proposed fuzzy penalty method. It is difficult to find the optimum for F5 and F10, however, the best and average value found are improved comparing with most reported methods, e.g. the best, worst and average in F10 found are 7170.38, 8508.487 and 7722.7, while the best reported results are 7277.96, 9652.52 and 8206.151, respectively. No results were reported about the problem F5. However, the proposed algorithm has a problem with function F2 due to the abnormal strong gradient to isolated points. We believe that a larger rule base is needed for problem F2, F5, and F7, and an adaptive rule base may be needed, which will be our further research task.
G(x) ;
Table 1 Statistical result of the experiments
3. The fuzzy penalty is initialized based on the given numbers of partitions and rules; 4. All vectors x i are scored with respect to the objective function F ( x ) ; 5. Apply mutation operator to each vector
x i , one
offspring is created which is denoted by x i +m , and calculate f (x) and G(x) for each offspring; 6. Update the fuzzy penalty by checking the values of f (x) and G(x) for offspring; 7. If the fuzzy penalty is changed, the scores of all vectors, x 2 m , are computed using the update fuzzy penalty value; otherwise offspring are scored with the previous objective function. 8. For each x i , i = 1L 2 m , P competitors are selected at random from the population. Pairwise comparisons are made between x i and each of the competitors. If the error score of x i is less than or equal to that of its opponent, it is assigned a “win”; 9. The m vectors with the greatest number of wins are selected to be parents for the next generation;
Cas es 1 2 3 4 5 6 7 8 9 10
Known. Solu.
Avg. Best
Avg. Dvr.
Best/Worst
Violation level
-15
-14.9984
1.9902E-7
-14.9991
0.0
-14.9976
0.0
0.70387
0.0
0.57223
0.0
0.999972
1.2356E-7
0.999942
4.3758E-7
-30665.802
0.0
-30665.793
0.0
5134.61733
6.2332E-5
6261.94398
4.5627E-4
-6961.8067
0.0
-6961.7219
0.0
24.3848
0.0
25.8633
0.0
0.09582501
0.0
0.0958250
0.0
680.63302
0.0
680.63985
0.0
7170.37574
0.0
8508.48747
0.0
0.803553 1.0 -30665.5 5126.4981 -6961.81381 24.3062091 0.095825 680.6300573 7049.330923
0.6447 1.0 -3.0666E4 5.7099E3 -6.9618E3 25.088 0.095825008 680.6387 7.7227E3
0.0021 5.732E-11 1.3744E-5 2.2066E5 6.7553E-4 0.2 1.145E-7 1.8466E-5 1.7716E5
Known Solu--known best solution. Avg. Best--average best in ten independent run. Avg. Dvr.--average deviation to the best mean in ten independent runs. Best/Worst--the best and worst solutions in ten runs. Violation level--the violation to the constrains. n=20 in F2 and n=10 in F3
6. Conclusion Constrained optimization problems have been studied recently by using evolutionary algorithms. However how to select a penalty function is still an open problem. In this paper we have proposed a fuzzy penalty function approach which incorporates the information of population individuals using evolutionary algorithms for constrained optimization problems. The solutions on the test cases have shown its effectiveness in comparison with existing methods.
References [1] Michalewicz, Z. and Schoemauer, M., “Evolutioanry algorithms for constrained parameter optimization problems,” Evolutionary Computation, Vol. 4, No.1, pp.1-32, 1996. [2] Gen, M. and Cheng, R., “A survey of penalty techniques in genetic algorithms,” Porc. of Int. Conf. Evolutionary Computation, pp. 804-809, 1996. [3] Yu, X., Zheng, W., Wu, B. and Yao, X., “ Solving constrained optimization problems with new penalty
function approach using genetic algorithms,” Journal of Advanced Computational Intelligence, Vol. 2, No. 6, pp.208-213, 1998. [4] Yao, X., Liu, Y. and Lin, G., “Evolutionary programming made faster,” IEEE Trans. Evolutionary Computation, Vol. 3, No. 2, pp. 82-102, 1999. [5] Koziel, S. and Michalewicz, Z., “Evolutionary algorithms, Homonorphous mappings and constrained parameter optimization,” Evolutionary Computation, Vol. 7, No.1, pp. 19-14, 1999. [6] Michalewicz, Z., “Genetic algorithms, numerical optimization, and constrains,”. In. L. Eshelman, ed., Proc. of the 6th Int. Conf. Genetic Algorithms, pp.151158, 1995. [7] Yu, X. and Wu, B. “An adaptive penalty function method for constrained optimization with evolutionary programming,” to appear, Journal of Advanced Computational Intelligence, 2001. [8] Fogel, D., Evolutionary computation: towards a new philosophy of machine intelligence, New York, IEEE Press, 1995.
Appendix Ten constrained function optimization problems are provided in this appendix, which were used for testing the fuzzy penalty method developed in Section 3. Function 1 4
4
13
i=1
i =1
i=1
Minimize :
f ( x ) = 5∑ xi − 5 ∑ xi2 − ∑ xi
Subject to :
2 x1 + 2 x2 + x10 + x11 ≤ 10 , 2 x1 + 2 x3 + x10 + x12 ≤ 10 , 2 x 2 + 2 x3 + x11 + x12 ≤ 10 , - 8 x1 + x10 ≤ 0, - x 2 + x11 ≤ 0,
- 8 x3 + x12 ≤ 0 ,
- 2 x4 − x5 + x10 ≤ 0 ,
- 2 x 6 − x7 + x11 ≤ 0 ,
- 2 x8 − x9 + x12 ≤ 0, Bounds :
0 ≤ xi ≤ 1, i = 1L 9 , 0 ≤ xi ≤ 100 , i = 10 ,L ,12 , 0 ≤ x13 ≤ 1.
The optimum is f ( x ) = −15 at x = (1,1,1,1,1,1,1,1,1,3,3,3,1) . Function 2 n
n
Minimize :
f ( x) =
cos4 ( xi ) − 2 ∏ cos 2 ( xi ) ∑ i=1 i =1 n
ixi ∑ i =1 Subject to : Bounds :
n
n
xi ≥ 0. 75 , ∑ xi ≤ 7. 5n , ∏ i= 1 i=1 0 ≤ xi ≤ 10 , i = 1L n.
The optimum is unknown. One solution f ( x ) = 0 .8036 with n=20 was reported.
Function 3 Minimize :
f ( x ) = 5 .3578547 x32 + 0 .8356891 x1 x5 + 37 .293239 x1 − 40792 .141
Subject to :
0 ≤ 85 . 334407 + 0. 0056858 x2 x5 + 0 .0006262 x1 x 4 − 0. 0022053 x3 x5 ≤ 92 , 90 ≤ 80 .51249 + 0 .0071317 x 2 x5 + 0 .0029955 x1 x2 + 0. 0021813 x32 ≤ 110 , 20 ≤ 9.300961 + 0 .0047026 x 3 x5 + 0 .0012547 x1 x 3 + 0. 0019085 x3 x 4 ≤ 25,
Bounds :
78 ≤ x1 ≤ 102 , 33 ≤ x2 ≤ 45 , 27 ≤ xi ≤ 45 , i = 3, L ,5.
The optimum is f ( x) = −30655. 5 at x = (78.0,33.0, 29.995,45.0,36.776) . Function 4 0. 000002 3 x 32
Minimize :
f ( x ) = 3 x1 + 0.000001 x13 + 2 x 2 −
Subject to :
x4 - x3 + 0 .55 ≥ 0 , x3 − x 4 + 0. 55 ≥ 0, 1000sin(- x3 − 0. 25 ) + 1000 sin(− x4 − 0 .25 ) − 894 .8 − x1 = 0 , 1000sin( x3 − 0 .25 ) + 1000 sin(x3 − x4 − 0. 25 ) − 894 .8 − x2 = 0 , 1000sin(- x4 − 0 .25 ) + 1000 sin(x4 − x3 − 0 .25 ) + 1294 .8 = 0 ,
Bounds :
0 ≤ xi ≤ 1200 , i = 1,2 , - 0.55 ≤ xi ≤ 0 .55 , i = 3,4 .
The optimum is f ( x ) = −516 .4981 at x = (679. 9453,1026. 067,0.1188764, −0.396236) . Function 5 Minimize :
f ( x ) = ( x1 − 10 ) 3 + ( x2 − 20 ) 3
Subject to :
(x 1 − 5 ) 2 + ( x2 − 5) 2 − 100 ≥ 100 , − ( x1 − 6) 2 − ( x2 − 5) + 82 . 81 ≥ 0,
Bounds :
13 ≤ xi ≤ 100 , i = 1,2 .
The optimum is f ( x) = −6961. 813811 at x = (14. 095, 0. 84296) . Function 6 Minimize :
f ( x ) = x12 + x 22 + x1 x2 − 14 x1 − 16 x2 + ( x3 − 10 ) + 4 ( x4 − 5) 2 + ( x5 − 3) 2 + ( x 5 − 3 ) 2 + 2( x6 − 1) 2 + 5 x 7 + 7 ( x8 − 11 ) 2 + 2( x9 − 10 ) 2 + ( x10 − 7) 2 + 45
Subject to :
105 -x 4 − 5 x2 − 3 x 7 − 9 x8 ≥ 0,
- 3( x1 − 2 ) 2 − 4( x2 − 3) 2 − 2 x32 + 7 x4 − 120 ≥ 0 ,
- 10 x1 + 8 x2 + 17 x 7 − 12 x8 ≥ 0, - 3 x12 − 2 ( x2 − 2 ) 2 − 2 x1 x5 − 14 x5 + 6 x6 ≥ 0, 8 x1 − 2 x 2 − 5 x9 + 2 x10 + 12 ≥ 0, - 5 x12 − 8 x2 − ( x 3 − 6) 2 + 2 x4 + 40 ≥ 0 , 3 x1 − 6 x 2 − 12 ( x 9 − 8 ) 2 + 7 x10 ≥ 0, - 0.5( x1 − 8 ) 2 − 2 ( x2 − 4 ) 2 − 3 x 52 + x6 + 30 ≥ 0, Bounds :
- 10.0 ≤ x i ≤ 10 .0, i = 1, L ,10 .
The optimum is f ( x) = 24.3062091 at
x = ( 2. 171996 , 2.363683, 8.773926, 5.095984, 0.9906548, 1.430574, 1.321644, 9.828726, 8.280092, 8.375927)
Function 7 sin 3 (2πx1 ) ⋅ sin(2πx2 ) x13 ( x1 + x 2 )
Maximize :
f ( x) =
Subject to;
x12 − x 2 + 1 ≤ 0, 1 - x1 + ( x2 − 4 ) 2 ≤ 0 ,
Bounds :
0 ≤ xi ≤ 10 , i = 1,2 .
The optimum is f ( x) = 0.1 , but two maxima of almost equal. Function 8 f ( x ) = ( x1 − 10) 2 + 5( x2 − 12) 2 + x 34 + 3( x 4 − 11) 2 + 10 x 65
Minimize:
+ x62 + x 74 − 4x 6 x7 − 10 x6 − 8 x 7 127 - 2 x12 − 3x 23 − x3 − 4 x42 − 5 x 5 ≥ 0,
Subjectto :
282 - 7 x1 − 3 x2 − 10 x32 − x 4 + x5 ≥ 0, 196 - 23 x1 − x 22 − 6 x 62 − 8 x7 ≥ 0, - 4 x12 − x 22 + 3 x1 x 2 − 2 x 32 − 5 x6 + 17 x 7 ≥ 0, - 10.0 ≤ x i ≤ 10. 0, i = 1, L,7.
Bounds:
The optimum is f ( x) = 680.6300573 at x = ( 2 .330499 , 1.951372, - 0.4775414, 4.365726, - 0.624487, 1.038131, 1.594227 ) . Function 9 Minimize:
f ( x ) = x 1 + x 2 + x3
Subjectto :
1 - 0.0025( x 4 + x 6 ) ≥ 0, 1 - 0.0025( x 5 + x 7 − x 4 ≥ 0, 1 - 0.01( x8 − x5 ) ≥ 0, x1 x 6 − 833 .33252 x 4 − 100 x1 + 83333 .333 ≥ 0, x 2 x 7 − 1250 x 5 − x 2 x 4 + 1250 x 4 ≥ 0, x3 x8 − 1250000 − x3 x 5 + 2500 x 5 ≥ 0, - 10.0 ≤ x1 ≤ 10 .0,
Bounds:
1000 ≤ x i ≤ 10000, i = 2,3, 10 ≤ x i ≤ 10000, i = 4,L ,8.
The optimum is f ( x) = 7049. 330923 at
x = (379. 3167,1359.943,5110. 071,128.0174, 295.5985,217.9799,286. 4162,395. 5979). Function 10 Minimize :
f ( x ) = x12 + ( x2 − 1) 2 2
Subject to :
x 2 − x1 = 0,
Bounds :
- 1 ≤ x i ≤ 1, i = 1, 2.
The optimum is f ( x ) = 0. 75000455 at x = (±0. 70711,0.5) .