• Tidak ada hasil yang ditemukan

1 2 3 2 3 2 3

Bracket

1 1

Δ γΔ γ2Δ γ3Δ

Figure 2.6. Bracketing.

3. Iff2f1go to step 5

4. Interchangef1andf2, andx1andx2, and set= − 5. Set=γ ,x3=x2+, and evaluatef3atx3

6. Iff3>f2, go to step 8

7. Renamef2asf1,f3asf2,x2asx1,x3asx2, go to step 5 8. Points 1, 2, and 3 satisfyf1f2<f3(three-point pattern)

Note that if the function increases at the start, we interchange points 1 and 2 at step 4, and change the sign of. We then keep marching in increasing increments till the function rises.

Interval 1–3 brackets the minimum. The three points 1, 2, and 3 with point 2 located between 1 and 3 and satisfyingf1f2 <f3(orf1>f2f3) form thethree- point pattern. Establishing the interval 1–3 is necessary for the Fibonacci method.

The three-point pattern is needed for the Golden Section method, and for the ver- sion of the quadratic search presented here.

We emphasize here that each function evaluation has a certain time or cost associated with it. Take, for example, the setting of a valve in a process control operation. Each setting requires time and operator interaction. In a large stress or deformation analysis problem, each evaluation for a trial geometry may be a full- scale finite element analysis involving considerable time and cost. In some situations, the number of trials may be limited for various reasons. We present here minimum and zero finding techniques which are robust and efficient.

2.4 Fibonacci Method

Fibonacci method is the best when the interval containing the minimum or the inter- val of uncertainty is to be reduced to a given value in the least number of trials

Period 1

Number of Rabbits

1

1

2

3

5

8

13 Period 2

Period 3

Period 4

Period 5

New offspring (matures

Mature rabbit (delivers offspring and is mature )

)

Figure 2.7. Rabbit population and Fibonacci numbers.

or function evaluations. This can also be interpreted as maximum reduction of the interval of uncertainty in the given number of trials. Use of Fibonnaci numbers for interval reduction is one of the earliest applications of genetic ideas in optimization.

Leonardo of Pisa (nicknamed Fibonacci) developed the Fibonacci numbers in the study of reproduction of rabbits. His observations showed that a new rabbit off- spring matures in a certain period and that each mature rabbit delivers an offspring in the same period and remains mature at the end of the period. This process is shown inFig. 2.7. If the total population is counted at the end of each period, start- ing from the first rabbit, we get the sequence of numbers 1, 1, 2, 3, 5, 8, 13, 21, . . . . We observe that each number starting from the third number is the sum of the pre- ceding two numbers.

If Fibonacci numbers are denoted F0,F1,F2, . . . , Fn, . . ., the sequence can be generated using

F0=1 F1=1

Fi =Fi1+Fi2 i=2 ton (2.10)

2.4 Fibonacci Method 57

4

1 2 3

New Interval of Uncertainty

1–4 Original Interval of Uncertainty

New Interval of Uncertainty Case 1

Case 2

4

1 2 3 4

1

1 2

Figure 2.8. Interval reduction.

We turn our attention to the interval reduction strategy and the use of Fibonacci numbers. Consider the starting interval of uncertainty 1−4 inFig. 2.8. We introduce point 2, and then introduce point 3. Two cases arise. Iff2<f3(case 1) then 1–3 is the new interval of uncertainty and iff2>f3(case 2) then 2–4 is the new interval of uncertainty.f2=f3can be clubbed with either of the two cases. Since the two cases are equally likely to occur, it is desirable that the points 2 and 3 be placed symmetri- cally with respect to the center of the interval. If case 1 occurs, let us rename points 1 and 3 as 4 and 1 respectively, or if case 2 occurs, let us rename points 2 and 3 as 1 and 2 respectively. In case 2, we need to setf2=f3. We now seek to introduce a new point 3 and be able to reduce the interval of certainty further. This requires that the new point 3 be located such that length 1–3 is the same as length 4–2. Thus, the new point 3 is related to the initial division. Without loss in generality, we assume that the interval of uncertainty keeps occurring to the left as illustrated inFig. 2.9.

We start with an intervalI1and the final interval of uncertainty aftern−1 interval reductions is, say,In. At the final stage, the intervals may be overlapped by a small

4

1 1

1

2 1 4 3

2 2

I1 I2

I2 I1 = I2 + I3

I2 = I3 + I4

In – 2 = In – 1 + In

In – 1 = 2In – δ I3

I3

I4

I4

In – 1

In

In

3

2 3

3

4 4

δ

Figure 2.9. Interval relations.

quantity, sayδ.δmay be chosen as the machine precision in a computer calculation, or as precision used in a measuring instrument. All interval relations are developed by settingδ=0. A smallδ(δIn) can be introduced at the final stage to decide the interval of uncertainty. The interval relations follow fromFig. 2.9.

I1=I2+I3 I2=I3+I4

...

Ij =Ij+1+Ij+2

...

In−2=In−1+In In1=2In

2.4 Fibonacci Method 59 By proceeding in the reverse order and expressing each interval in terms ofIn, we get

In−1 =2In

In2 =In1+In=3In

In3 =In2+In1=5In

In−3 =In−3+In−2=8In ...

The coefficients 2,3,5,8, . . .appearing above are Fibonnaci numbers. Making use of the Fibonacci number definition ofEq. (2.10), we have

Inj =Fj+1In j =1,2, . . . ,n−1 Forj=n−1 andn−2,

I1=FnIn (2.11)

I2=Fn1In (2.12)

FromEq. (2.11), we get the size of the final interval In= I1

Fn

Furthermore, it may be observed that exactly n trials or function calls are involved in reducingI1toIn, starting from two trials at the first iteration and adding one trial at each successive iteration. Thus, the above equation states that the ratio of final to initial interval lengths afterntrials is

In

I1 = 1

Fn (2.13)

Eqs. (2.11) and (2.12) yield

I2= Fn1

Fn

I1 (2.14)

For a given intervalI1,I2is calculated from above. Then the relationsI3=I1I2, I4=I2I3, etc. follow.

Example 2.5

Consider the interval [0, 1], and number of trialsn=5.Eq. (2.14)yieldsI2=5/8; thus, the set of four points defining the new intervals is given by [0,3/8,5/8, 1].

Upon making two function evaluations at3/8 and5/8, the new interval will be either [0,5/8] or [3/8, 1]. Without loss in generality, assume that the interval of uncertainty is the left interval, namely, [0,5/8]. Proceeding in this manner, the

successive intervals defined by sets of four points are [0,2/8,3/8,5/8], [0,1/8,2/8,3/8], [0,1/8,1/8,2/8]. At this stage, the two central points coincide; thus, we will not be able to make a decision in the selection. The strategy is to choose a parameter δ based on the computational precision and to make the final four points as [0,1/8,1/8+δ,2/8]. The final interval will be [0,1/8+δ] or [1/8,2/8]. The boldfaces above refer to new trials – we count a total ofn=5, and, as given in Eq.(2.13), I5/I1=1/8=1/F5.

We note here that Fibonacci numbers grow rapidly. It is advantageous to use Binet’s formula for Fibonacci numbers, especially when the ratio inEq. (2.14)is to be evaluated. Binet’s formula for theith Fibonacci number is as follows:

Fi = 1

√5

⎣ 1+√

5 2

i+1

1−√ 5 2

i+1

⎦ (2.15)

The reader is encouraged to calculate the Fibonacci numbers using the above relation and check with the earlier series. The ratio of two consecutive Fibonacci numbers can be written as as follows:

Fi1

Fi = √

5−1 2

1−si 1−si+1

i=2,3, . . . ,n (2.16)

s= 1−√ 5 1+√

5

Calculation of this ratio is stable even for large values ofisince|s| =0.38196.

We now present the minimization algorithm based on Fibonacci numbers.

Fibonacci Algorithm for Function Minimization 1. Specify the intervalx1, x4(I1= |x4x1|)

2. Specify the number of interval reductionsni;n=ni+1 or desired accuracyε. 3. Ifεis given, find the smallestnsuch thatF1

n < ε 4. Evaluatec=5−12 ,s= 1−1+55, α =(1c(1sns+n1))

5. Introduce pointx3,x3=αx4+(1−α)x1, and evaluatef3

6. DOi=1,n– 1

Introduce point x2as if i = n−1 then

x2 = 0.01x1+0.99x3 else

x2 = αx1+(1−α)x4

2.4 Fibonacci Method 61 endif

Evaluate f2 if f2< f3 then

x4 = x3,x3 =x2, f3= f2

else

x1 = x4,x4 =x2

endif

α = c

1−sni (1−sni+1) ENDDO

The algorithm has been implemented in the program FIBONACI.

Example 2.6

In an interval reduction problem, the initial interval is given to be 4.68 units.

The final interval desired is 0.01 units. Find the number of interval reductions using Fibonacci method.

Solution

Making use ofEq. (2.13), we need to choose the smallestnsuch that 1

Fn <0.01 4.68 orFn>468

From the Fibonacci sequenceF0 =1,F1=1,F2=2, . . . ,F13=377,F14 =610, we getn=14. The number of interval reductions isn−1=13.

Example 2.7

A projectile released from a heighthat an angleθwith respect to the horizontal in a gravitational fieldg, shown inFig. E2.7, travels a distanceDwhen it hits the ground.Dis given by

D=

Vsinθ

g +

! 2h

g +

Vsinθ g

2

Vcosθ

D h = 50 m

V cosθ V = 90 m/s V sinθ

g = 9.81 m/s2 θ

Figure E2.7. Projectile problem.

Ifh=50 m, V=90 m/s, g =9.81 m/s2, determine the angle θ, in degrees, for which the distance D is a maximum. Also, calculate the maximum distanceD in meters. Use the range forθ of 0 to 80, and compare your results for 7 and 19 Fibonacci interval reductions.

Solution

We set up the problem as minimizing F= −D.

In the subroutine defining the function, we define PI=3.14159 G=9.81 V=90 H=50 Y=PIX / 180 (Degrees to radians)

F= −(VSIN(Y)/G+SQR(2H/G+(VSIN(Y)/G)ˆ2))VCOS(Y)) Range 0, 80

7 interval reductionsn = 8 Distance D (−F)=873.80 m

X=42.376

Final interval 42.353−44.706 19 interval reductionsn=20 Distance D (−F)=874.26 m

X=43.362

Final interval 43.362−43.369