• Tidak ada hasil yang ditemukan

Basic Elements of Fuzzy Sets and Systems

Dalam dokumen LOGISTICS ENGINEERING (Halaman 57-60)

3.7 Fuzzy Logic Approach to Dispatching in Truckload Trucking

3.7.1 Basic Elements of Fuzzy Sets and Systems

tion P(0)], we proceed to use the operators reproduction, crossover, and mutation to generate a sequence of populations P(2), P(3), and so on.

In spite of modifications that may occur in some genetic algorithms (regarding the manner in which the strings for reproduction are selected, the manner of doing crossover, the size of population that depends on the problem being optimized, and so on), the following steps can be defined within any genetic algorithm:

Step 1: Encode the problem and set the values of parameters (decision variables).

Step 2: Form the initial population P(0) consisting of n strings. (The value of n depends on the problem being optimized.) Make an evaluation of the fitness of each string.

Step 3: Considering the fact that the selection probability is proportional to the fitness, select n parents from the current population.

Step 4: Randomly select a pair of parents for mating. Create two offspring by exchanging strings with the one-point crossover. To each of the created offspring, apply mutation. Apply crossover and mutation operators until n offspring (new population) are created.

Step 5: Substitute the old population of strings with the new population. Evaluate the fitness of all members in the new population.

Step 6: If the number of generations (populations) is smaller than the maximal prespecified number of generations, go back to Step 3. Otherwise, stop the algorithm. For the final solution choose the best string discovered during the search.

3.7 Fuzzy Logic Approach to Dispatching

Let us note fuzzy set A, which is defined as “travel time is approximately 30 hours.” Membership function µA(t), which is subjectively determined is shown in Figure 3.12.

A travel time of 30 hours has a grade of membership of 1 and belongs to the set “travel time is approxi-mately 30 hours.” All travel times within the interval of 25–35 h are also members of this set because their grades of membership are greater than zero. Travel times outside this interval have grades of membership equal to zero.

Let us note fuzzy sets A and B defined over set X. Fuzzy sets A and B are equal (A = B) if and only if µA(x) = µB(x) for all elements of set X.

Fuzzy set A is a subset of fuzzy set B if and only if µA(x) ≤ µB(x) for all elements x of set X. In other words, A ⊂ B if, for every x, the grade of membership in fuzzy set A is less than or equal to the grade of membership in fuzzy set B.

The intersection of fuzzy sets A and B is denoted by A ∩ B and is defined as the largest fuzzy set con-tained in both fuzzy sets A and B. The intersection corresponds to the operation “and.” Membership function µA∩B(x) of the intersection A ∩ B is defined as follows:

µA B ( ) minx =

{

µA( ), ( )x µB x

}

(3.9)

The union of fuzzy sets A and B is denoted by A ∪ B and is defined as the smallest fuzzy set that contains both fuzzy set A and fuzzy set B. The membership function µA∪B(x) of the union A ∪ B of fuzzy sets A and B is defined as follows:

µA B ( ) maxx =

{

µA( ), ( )x µB x

}

(3.10)

Fuzzy logic systems arise from the desire to model human experience, intuition, and behavior in decision-making. Fuzzy logic (approximate reasoning, fuzzy reasoning) is based on the idea of the pos-sibility of decison-making based on imprecise, qualitative data by combining descriptive linguistic rules. Fuzzy rules include descriptive expressions such as small, medium, or large used to categorize the linguistic (fuzzy) input and output variables. A set of fuzzy rules, describing the control strategy of the operator (decision-maker) forms a fuzzy control algorithm, that is, approximate reasoning algorithm, whereas the linguistic expressions are represented and quantified by fuzzy sets.

The basic elements of each fuzzy logic system are rules, fuzzifier, inference engine, and defuzzifier.

The input data are most commonly crisp values. The task of a fuzzifier is to map crisp numbers into fuzzy sets. Fuzzy rules can conveniently represent the knowledge of experienced operators used in con-trol. The rules can be also formulated by using the observed decisions (input/output numerical data) of the operator. A fuzzy rule (fuzzy implication) takes the following form:

If x is A, then y is B FIGuRE 3�12 Membership function µA(t) of fuzzy set A.

1.0 0.5 0.5

0 5 10 15 20 25 30 35 40 t [min]

mA (t)

where A and B represent linguistic values quantified by fuzzy sets defined over universes of discourse X and Y. The first part of the rule “x is A” is the premise or the condition preceding the second part of the rule “y is B” which constitutes the consequence or conclusion.

Let us consider a set of fuzzy rules containing three input variables x1, x2, and x3 and one output variable y.

Rule 1: If x1 is P11 and x2 is P12 and x3 is P13, then y is Q1, orRule 2: If x1 is P21 and x2 is P22 and x3 is P23, then y is Q2, orRule k: If x1 is Pk1 and x2 is Pk2 and x3 is Pk3, then y is Qk.

The given rules are interrelated by the conjunction or. Such a set of rules is called a disjunctive system of rules and assumes the satisfaction of at least one rule. It is assumed that membership functions of fuzzy sets Pk1 and Pk3 (k = 1, 2, ..., K) are of a triangular shape, whereas membership functions of fuzzy sets Pk2 and Qk (k = 1, 2, ..., K) are of a trapezoidal shape. Let us note Figure 3.13 in which our disjunctive system of rules is presented.

Let the values i1, i2, and i3, respectively, taken by input variables x1, x2, and x3, be known. In the considered case, the values i1, i2, and i3 are crisp. Figure 3.13 also represents the membership function of output Q. This membership function takes the following form:

µQ µ µ µ

k P P P

y min k1 i k2 i k3 i

( ) max=  ( ),1 ( ),2 ( )3

 

{



}

, k=1 2 ⊃, , ,K (3.10a) whereas fuzzy set Q representing the output is actually a fuzzy union of all the rule contributions Y1, Y2, ..., Yk, that is:

Rule 1

P11

P21 P22

P12 P13

P23

Pk1 Pk2 Pk3

i1 x1 i2 i3

i1 x1 i1 x1

x2

i2 x2

i2 x2 i3 x3

i3 x3 w1

w2

x3 wk

Qk Yk Rule 2

Rule k

y

Q

y y Q1

Y1

Y2 Q2

y

y

FIGuRE 3�13 Graphical interpretation of a disjunctive system of rules.

Q = Y1 U Y2 U ... U Yk (3.11) It is clear that

µQ( ) maxy =

{

µY1( )y ,µY2( ), ,y ⊃ µYk(y)

}

(3.12)

Consider rule 1, which reads as follows:

If x1 is P11 and x2 is P12 and x3 is P13, then y is Q1.

The value µP11(i1) indicates how much truth is contained in the claim that i1 equals P11. Similarly, values µP12(i2) and µP13(i3), respectively, indicate the truth value of the claim that i2 equals P12 and i3 equals P13. Value w1, which is equal to

w1= min

{

µP11(i )1 ,µP12(i )2 ,µP13(i )3

}

(3.13) indicates the truth value of the claims that, simultaneously, i1 equals P11, i2 equals P12 and i3 equals P13.

As the conclusion contains as much truth as the premise, after calculating value w1, the membership function of fuzzy set Q1 should be transformed. In this way, fuzzy set Q1 is transformed into fuzzy set Y1

(Fig. 3.13). Values w2, w3, ..., wk are calculated in the same manner leading to the transformation of fuzzy sets Q2, Q3, ...., Qk into fuzzy sets Y2,Y3, ...., Yk.

As this is a disjunctive system of rules, assuming the satisfaction of at least one rule, the membership function µQ(y) of the output represents the outer envelope of the membership functions of fuzzy sets Y1, Y2, ...., Yk. The final value y* of the output variable is arrived at upon defuzzification, that is, choosing one value for the output variable. In most applications an analyst or decision-maker looks at the grades of membership of individual output variable values, and chooses one of them according to the following criteria: “the smallest maximal value,” “the largest maximal value,” “center of gravity,” “mean of the range of maximal values,” and so on (Fig. 3.14).

Dalam dokumen LOGISTICS ENGINEERING (Halaman 57-60)