IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS—PART B: CYBERNETICS, VOL. 29, NO. 4, AUGUST 1999
503
Fuzzy Service Control of Queueing Systems Yannis A. Phillis, Senior Member, IEEE, and Runtong Zhang Abstract—We consider queueing systems in which the service rate is the controlled variable. The cost depends on the queue length and selected rate. The objective is to choose the service rate dynamically, based on the state of the system so as to minimize the average cost over an infinite horizon. Six classes, either known in the literature or new, are studied in detail: queueing systems with vacations, single-server queueing systems with and without switching costs, and tandem queueing systems with and without service costs. A novel approach is presented here using fuzzy control to solve these problems. Simulation shows that the approach is efficient and promising, especially in cases where analytical solutions do not exist.
I. INTRODUCTION
I
N this paper, we tackle the problem of optimal service control of queueing systems using fuzzy logic techniques. This topic covers two categories [26] in the queueing control field: control of the number of servers, and control of the service rate. A system belongs in the first category when this system operates with removable servers or vacations, whenever its service rate becomes zero by turning off the servers. A system belongs in the second category whenever its service rate varies over time. Specifically, we treat six classes: 1) M/M/1 systems with vacations; 2) M/M/m systems with vacations; 3) M/M/1 systems without switching costs; 4) M/M/1 systems with switching costs; 5) tandem systems without service costs; 6) tandem systems with service costs. Classes 1), 3), 4), and 5) have been examined in the works of Bell [5], Crabill [8], [9], Heyman [13], Lippman [18], and Rosberg et al. [23], respectively, using dynamic programming. Classes 2) and 6) are new which will be solved using fuzzy logic. The fuzzy control approach is totally different from classical approaches and it explicitly determines the optimal control policies for all classes above. Yadin and Naor [31] were the first to introduce queueing systems with a removable server. Since then, considerable work has been devoted to this subject and research is still continuing, e.g., [2], [3], [6], [16], [17], [21], [27], [29], and [30]. The problems of optimal service rate control of Manuscript received July 26, 1996; revised February 14, 1998 and November 8, 1998. This work was supported in part by a grant by the Ministry of Education, Athens, Greece, and by the Greek Secretariat of Research and Technology under Contract 95E489. This paper was recommended by Associate Editor C. Hsu. Y. A. Phillis is with the Department of Production Engineering and Management, Technical University of Crete, Chania, 73100, Greece. R. Zhang is with the Institute of Information Systems, College of Economics and Business Administration, Northern Jaotong University, Beijing 100044, China. Publisher Item Identifier S 1083-4419(99)05275-9.
queueing systems have also been extensively investigated as for example in [1], [7], [8], [10], [14], [15], [18]–[21], and [24]. However, due to analytical difficulties, a relatively small number of studies are devoted to multiserver models. Besides Rosberg et al. [23] and Weber and Stidham [28] propose an optimal service rate control problem in a queueing network. The probabilistic structure of control of queues is that of a semi-Markov decision process whose theory is used frequently to analyze queues and prove certain properties of optimal policies. Most of the results rely on the existence of optimal stationary policies for fairly general systems established by Lippman [19]. However, when the control model is complex or non-Markovian, as in many practical applications, no effective control techniques exist and a lot of control problems remain open. A comprehensive discussion on optimal service control of queueing systems can be found in the survey papers of Crabill et al., [9], Doshi [11], and Teghem [25], [26]. Most of the work thus far mentioned employs conventional stochastic techniques. In this paper, we propose an entirely new method using fuzzy logic [6] to solve control problems, and show via simulation that this new method generalizes existing solutions and also efficiently solves cases intractable with classical methods. Our approach signals a departure from classical techniques. We first solve problems which have known analytical solutions using fuzzy logic. The rationale is that by doing known problems we obtain insights regarding the structure of the controller, which we use later to tackle cases with no known solutions. More importantly, we use the analytical results to test the accuracy of our controllers. Having established this procedure we are ready to solve problems which do not appear amenable to analysis. To our knowledge, apart from [32]–[35], this is the first work where fuzzy logic is used to control queueing systems. Excluding rather simple systems in which optimal policies are found using mostly dynamic programming, there is a variety of practical systems where none of the existing analytical methods works. The problems become even more complicated when networks with various interconnections are considered. Heuristics or simulation are common approaches in such cases. The systems we discuss here are highly nonlinear for which suitable analytical descriptions do not exist. Fuzzy logic on the other hand appears to be a natural tool in handling such systems, since it emulates human thinking. Indeed a human being often solves complicated nonlinear problems ranging from parking a car to flying an airplane with excellent results without resorting to complicated and unwieldy mathematics. As we shall see below, fuzzy control of queueing systems provides very good results for both known and new problems and thus it is promising in solving
1083–4419/99$10.00 1999 IEEE
504
IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS—PART B: CYBERNETICS, VOL. 29, NO. 4, AUGUST 1999
Fig. 2. A queueing system with vacations.
Fig. 1. Fuzzy queueing control system.
difficult queueing problems where analysis is hopeless. The fuzzy control method aims at finding optimal policies in computationally efficient ways. Throughout this paper, we assume the existence of optimal policies, and use the term “policy” in the sense of “deterministic stationary policy.” At each decision epoch, we make a decision by emulating a skilled human operator. Specifically, based on the current state of a system, an inference engine equipped with a fuzzy rule base determines an on-line decision to adjust the behavior of the system optimally so as to minimize a given cost. This control mechanism is the so-called fuzzy logic controller (see Fig. 1). Note that the output of the fuzzy logic controller in Fig. 1 is used to tune the queueing system parameters according to a predefined program based on the state of the system. This is an adaptive control mechanism. The specific features of each controller depend on the model and performance measure. However, in principle, in all fuzzy controllers we explore the implicit and explicit relationships within the system by mimicking human thinking and subsequently develop the optimal fuzzy control rules as well as the knowledge base. A fuzzy controller of the type outlined above, is capable of solving difficult nonlinear queueing control problems. However, due to the lack of detailed mathematical descriptions, it is impossible to provide rigorous proofs of optimality or existence and uniqueness of optimal controls. This is the main disadvantage of fuzzy controllers in general. In the absence of satisfactory mathematical descriptions, on the other hand fuzzy control provides very good answers as we demonstrate experimentally. In this paper, most of the membership functions for the fuzzy sets are chosen to be triangular. We make this choice because the parametric, functional descriptions of triangular membership functions are the most economic ones. In addition, it has been proven that such membership functions can approximate any other membership function [22]. To present the fuzzy rules, we use NB, NM, NS, ZO, PS, PM, and PB to indicate “negative big,” “negative medium,” “negative small,” “zero,” “positive small,” “positive medium,” and “positive big” unless otherwise explained. We simulate and control queueing systems in C language. Mamdani implication [12] is used to represent the meaning of “if–then” rules. This implication is the most popular one in the fuzzy control field because it is precise, computationally
simple and fits various practical applications. To transform the fuzzy output into a usable crisp one, we use the height method of defuzzification because this method is simple, fast, and has the advantage of weight counting. It should be stressed that the six control classes that follow have the general structure of Fig. 1. The specific features of each controller are developed on an ad hoc basis. It would be desirable to develop a global structure for all the controllers and then solve each individual problem. Such a structure was impossible to develop so far but it is the subject of research. II. CLASS 1: SINGLE SERVER
WITH
VACATIONS
A. Problem Description We first consider the simplest single-server queueing system with vacations, as illustrated in Fig. 2. Customers arrive at the system according to a Poisson process with parameter , the queue has infinite capacity, and there is one exponential . This server in the system with service rate , where is an M/M/1 queueing system, where the service rate may be adjusted to zero or the server may be turned off during certain intervals of time depending on the state of the system. A classical performance structure is chosen in which there , with are three types of cost: (a) service cost , per unit time when the server is off and on , (b) fixed switching cost , or off incurred whenever the server is turned on , and (c) holding cost , per unit time per customer in the system, including the one in service (if any). The system objective is to find an optimal control policy which would dictate when the server is turned off and minimize the average cost of the system over an infinite time horizon. This queueing process is semi-Markov. For this case, Heyman [13] proves that it is optimal to keep the server always on if
(1) , or to turn on the server when there are where customers waiting before a dormant server and turn it off when the system enters an idle period. “Dormant” means that the server is off even if there are waiting customers in the system and “idle” means that the server is on but there are no is one of the two integers about customers in the system. (2) whichever gives the smallest cost. This is an exhaustive hysteretic policy [26].
PHILLIS AND ZHANG: FUZZY SERVICE CONTROL
505
B. Structure of the Fuzzy Logic Controller Under an optimal policy, it seems beneficial to keep the server always on when the difference in service cost rate is sufficiently small and/or the and dormant cost rate is sufficiently large to satisfy (1). switching cost This is a static (design) problem and is solved with basic calculus [13]. To emphasize the dynamic (control) aspect of this problem, we assume that inequality (1) is not true. Conventional control techniques usually describe the state where , means that the server is of the system by on or off respectively and is the number of customers in the system and, therefore, the state of the system changes at each customer arrival or service completion. In this paper, to treat switching costs, we introduce one more parameter which is the accumulated holding cost within the current server state. This is not additional information that is not available to the conventional controller. Simply the fuzzy controller utilizes known information in convenient ways fitting its structure. The relationship between and switching costs will be established below in proposition (ii). The cost is given by
TABLE I THE RULE BASE OF CLASS 1
(3) where is the th time unit within the current server state, is the total number of time units within the current server state, is the number of until the state of the server changes, and customers present in the system in the th time unit. Hence the . Without loss of generality, state comprises the triplet we restrict the decision epochs at which the server may be turned on or off to the transition epochs of state with the assumption that a busy server cannot be turned off. Therefore, the decision epochs occur at each service completion or when the server is off. We observe that turning off the server when customers are present incurs unnecessary switching-off and holding costs and, therefore (ia) an optimal control policy should turn off the server only when the server starts an idle period (there are no customers waiting in the system). Proposition (ia) implies that (ib) the optimal control policy is of the exhaustive type. According to propositions (i), we directly write a crisp rule , i.e. if there are no customers in the when the state system, then the server is turned off or kept off. Henceforth we will only focus on the optimal time to turn on a dormant server when there are customers present in the system. If there are no switching costs, it is trivially optimal to turn on the server when a customer arrives. The existence of switching costs may lead to a delay in turning on the server when there are customers present in the system. Heyman [13] mentions that the server should remain in the off position for a certain finite time in the presence of waiting customers, without providing a method for the computation of . Our main task here is to determine explicitly such a delay. In the -policy context, where the optimal control policies are functions of the number of customers in the system, the delay is expressed by the number of waiting customers in front of a dormant server. Then is the delay time within which queueing customers reach certain level.
The optimal turn-on time for the server will be determined by the relationships between holding and switching costs. We observe that (ii) when the accumulation of holding cost in a period of server vacation is high enough to compete with of switching costs, it is optimal to turn on the a value dormant server. Clearly, (iii) the higher the , the easier it is to make the decision to turn on the server. Next we investigate the relationships among the optimal control decision and and . If is close to zero, because the service rate is very high compared to , we may turn on the server without urgency, otherwise we ought to turn on the server urgently. If the holding cost rate is very high, an incoming customer will affect the system cost heavily and, therefore, the server should be turned on earlier, otherwise a little later. In other words, (iv) the higher the , the easier it is to make the decision to turn on the server, and (v) the higher the , the easier it is to make the decision to turn on the server. The crisp rules have already been developed and propositions (iii)–(v) define the fuzzy rule base. Formally speaking, , the holding the fuzzy inputs are the parameter , cost per unit time per customer in the system and the accumulated holding cost within the current server . The fuzzy output is the decision to turn state . The fuzzy rule base is shown the server off or on in Table I. If the fuzzy output is YES, the dormant server is turned on, otherwise it is not. Each of the three fuzzy inputs has four fuzzy sets, hence the fuzzy rule base has a total of 64 rules. The membership functions for the fuzzy inputs and the fuzzy output are shown in Fig. 3(a)–(d), respectively. Because both and are not bounded from above, we have to specify a special fuzzy set for each of these two fuzzy inputs.
506
IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS—PART B: CYBERNETICS, VOL. 29, NO. 4, AUGUST 1999
(a)
(b)
functions are more involved. We find the inner governing principles for each class and then all necessary adjustments in the fuzzy sets are implemented automatically by the fuzzy logic controllers, which, in this respect, are self-tuning. Finally, it is interesting to note that the rule base is independent of the service cost rates and . This is because of the property of the removable server model where the single server under a long-run criterion is busy with probability at any time instant, independent of the service cost rate. This point is also noted in [13]. C. A Numerical Example
(c)
(d)
Fig. 3. Membership functions.
In the extreme case and , both parameters do not bear any effect on the decision to turn on the server. Then it is optimal to turn on the server when the accumulated holding cost in the period of server vacation is equal to the switching cost [refer to proposition (ii)]. Because each turning on and and once, we impose both off incurs switching costs switching costs when the server is to be turned on. This does not distort the cost structure of the system and allows the server to stay in the higher cost period (on) less and in the lower cost period (off) longer. Hence we see that (via) it is optimal to turn . This on the dormant server when situation is equivalent to the rule if is PB and is ZO and is ZO, then is YES in the rule base. In other words, (vib) . PB for with membership grade 1.0 is fixed at Using a scaling factor we change the physical domain into corresponds to 6 in its normalized counterpart, i.e., Fig. 3(a). Next, we examine a situation described by the rule if is ZO and is PB and is ZO, then is YES. Following similar ideas, we obtain that (vii) PB for with membership . grade 1.0 corresponds to According to (3), we observe that increases with as the which is given by sequence This is because one customer in the system incurs a holding cost proportional to his stay. If there are customers, the second customer has to stay in the system until his predecessor is serviced and then he is serviced. Thus, if the service times were deterministic, the second customer would wait for two service times until he exits the system, to which we add the service time of the first customer and obtain three. Therefore we obtain the fuzzy membership functions for and as shown in Fig. 3(b) and (c), respectively. Proposition (ii) implies that (viii) the decision “Yes” is made only when the crisp output is equal to one, in other words, any value of the crisp output which is less than one does not satisfy proposition (ii). Therefore we obtain the fuzzy membership functions for the fuzzy output as shown in Fig. 3(d). In this paper, the shapes of most membership functions are straightforward. In a few cases, however, the membership
This and the remaining examples of the paper illustrate each specific class of problem examined. In effect, the algorithm of each example is the algorithm of the corresponding class. Example 1: We examine an M/M/1 system with the follow, service rate , ing parameters: arrival rate , fixed switching cost holding cost rate per customer . is interpreted as is PM with grade 0.825 Here, implies that the and PB with grade 0.067. are 0.0625 and hence scaling factors for and corresponds to the statement is ZO with grade 0.7 and PS with grade 0.1, respectively. All these calculations are implemented automatically by the fuzzy logic controller. The fuzzy inference procedures are briefly illustrated as follows. At each decision epoch, the fuzzy logic controller (see Fig. 1) captures the current cost accumulation which is affected by , and then fuzzifies it into suitable linguistic values. Based on the appropriate fuzzy rules, corresponding fuzzy decisions are fired. Because of the special fuzzy membership functions for , the defuzzifier here is simple. A decision “Yes” is made whenever all the fuzzy outputs are YES. For example, let us assume that the current cost accumulation . This value is scaled down to which from Fig. 3(a) corresponds to ZO with grade 0.875 and PS with grade 0.458. According to the fuzzy rule base (Table I) and Mamdani implication which is associated with the min-operation [12], the fuzzy decisions are formulated as follows. 1) If is ZO with grade 0.875 and is ZO with grade 0.7 and is PM with grade 0.825, then is NO with grade 0.7. 2) If is PS with grade 0.458 and is ZO with grade 0.7 and is PM with grade 0.825, then is YES with grade 0.458. 3) If is ZO with grade 0.875 and is PS with grade 0.1 and is PM with grade 0.825, then is YES with grade 0.1. 4) If is PS with grade 0.458 and is PS with grade 0.1 and is PM with grade 0.825, then is YES with grade 0.1. 5) If is ZO with grade 0.875 and is ZO with grade 0.7 and is PB with grade 0.067, then is YES with grade 0.067. 6) If is PS with grade 0.458 and is ZO with grade 0.7 and is PB with grade 0.067, then is YES with grade 0.067.
PHILLIS AND ZHANG: FUZZY SERVICE CONTROL
507
Fig. 6. Parallel servers with vacations.
Fig. 4. Frequencies of switches.
Fig. 5. Optimal policy for Example 1.
7)
If is ZO with grade 0.875 and is PS with grade 0.1 and is PB with grade 0.067, then is YES with grade 0.067. 8) If is PS with grade 0.458 and is PS with grade 0.1 and is PB with grade 0.067, then is YES with grade 0.067. Among the eight fuzzy outputs one is NO. Therefore, the decision is No. We simulated the system (see the flowchart in Appendix , employing the fuzzy A) starting from an initial state control at each decision epoch. From the system performance, we see that the server is usually turned on after a delay when a new customer arrives and off immediately when a service is finished and there are no queueing customers in the system, which gives us an idea of the hysteresis form. Also, we see that the server is often turned on when the holding customers are two (see Fig. 4). Hence we obtain the optimal policy as shown in Fig. 5, which is exhaustive hysteretic. By Heyman’s formula (2), is 2.366, which does coincide with our result. III. CLASS 2: PARALLEL SERVERS
WITH
As in Class 1, three types of cost are considered: 1) running cost , per unit time for each working server regardless of busy or idle status; 2) holding cost , per unit time per customer in the system, including those in service (if any); when the number of 3) switching cost, with value , or value working servers increases by when the number of working servers decreases by . Since each time a server is turned on or off it incurs a switching once for an infinite horizon problem, this cost cost . measure is unaffected by setting Henceforth we assume that the switching costs for turning a denote this common value server on or off are equal. Let to so that adjusting the number of working servers from costs . Bell [5] investigates an M/M/2 model, and shows that an optimal policy has a hysteresis form characterized by four and , which are the numbers of parameters, customers in the system when the number of working servers should be adjusted down to 0, 1, or up to 1, 2, respectively. The following relationships should hold: , and . However, models and complete characterization for M/M/ explicit determination of the optimal policy, even for the M/M/2 model, are still open problems. and fixed, a policy For sufficiently high, and which never allows more working servers than customers present has been shown by Bell [4] to be optimal. Such a policy is called efficient. In this section, we assume that we fall into the category of [4] above and determine only efficient optimal policies, thus ignoring the possibility where an inefficient policy may be optimal. An inefficient policy allows more working servers than customers in the system, and may be optimal for a running cost sufficiently smaller and . than
VACATIONS B. Structure of the Fuzzy Logic Controller
A. Problem Description In this section, we consider a queueing system with identical exponential servers in parallel and infinite queue capacity, as illustrated in Fig. 6. Customers arrive into the system according to a Poisson process with parameter , and . each working server provides service with rate This is an M/M/ queueing system. However, the number of or , in order to working servers can be adjusted to minimize the average cost over an infinite horizon.
As previously, to take into account the switching costs we introduce the parameter which is the accumulated holding cost within the current server state (the number of servers remains unchanged) given by (4) . The decision The state of the system is described by epochs at which the service channels may be turned on (off)
508
IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS—PART B: CYBERNETICS, VOL. 29, NO. 4, AUGUST 1999
are restricted to the transition epochs of the state, with the assumption that a working server cannot be turned off when busy. The decision epochs are therefore the times of service completion when all the servers are on, or any time when some servers are off. The optimal control policy is of the exhaustive type. There, we have a crisp rule that if there fore, when the state are no customers in the system, then all the servers are turned off or kept off. Again we will only focus on the optimal time to turn on or off the servers when there are customers present in the system. To develop the fuzzy rule base, we examine the special case . To reduce the where there are no switching costs, i.e. holding costs of customers in the system as much as possible and to avoid unnecessary running costs when a server is on but no customer joins the queue, it is trivially optimal to adjust when there are the number of working servers to customers present. Thus PB for is equal to PB for . In other words, PB for with membership grade 1.0 equals . Also, when the accumulation of queueing cost in the current service state is high enough to compete with a value of switching costs, it is optimal to turn on one dormant server. Obviously, the higher the , the easier it is to make the decision to turn on a dormant server. In Class 1, to take into account the switching costs, we determine the optimal number of queueing customers when and the server is turned on by means of the parameters . In the present multiserver case, we need not consider the effect of , because when one of several servers is turned off, the queueing size does not necessarily increase. The ratio of has the same the arrival and total service rates effect as in Class 1, that is the higher the , the easier it is to make the decision to turn on a server. Formally speaking, the fuzzy inputs are the number of , the number of current working servers , the ratio of customers present in the system , and the accumulated arrival and total service rates . queueing cost within the current service state The fuzzy output is chosen to be the variation of the number . The universes of discourse for and of servers are , and , respectively. The universe is chosen to be the so-called standard of discourse for . The system amends the number of working domain servers by simply adding the defuzzified crisp output of , to the current number of working servers . Based on the above, the fuzzy rule base is ready, and is shown in Appendix B. Each of the four fuzzy inputs is chosen with four fuzzy sets and, rules. The therefore, the rule base has a total of and are shown in membership functions for Figs. 7(a), 3(a), 3(a), 3(c), and 7(b), respectively. The shapes of the membership functions are determined following the we ideas of Class 1. Following the same ideas for . Consequently, PB for with membership obtain . grade 1.0 is fixed at Notice that, since in the long-run the number of efficiently under any policy, the average working servers must be . Thereservice cost per unit time under any policy is
Fig. 7. Membership functions.
Fig. 8. Frequencies of switches.
fore the service cost per unit time per server does not affect the optimality of the policy. To compare our model with existing analytical results for , but the same M/M/2 systems, we give an example for for framework can be applied to M/M/ models with which no analytical solutions are known. C. A Numerical Example Example 2: The system is M/M/2 with parameters, arrival , service rate of each working server , rate , and holding cost per unit switching cost per server . time per customer in the system , The simulation is started from an initial state employing the fuzzy control at each decision epoch. We see that a dormant server is turned on usually after a delay when the number of customers is greater than the working servers and an operating server is turned off immediately when the number of customers reaches zero. Also, we see that the number of working servers is most often adjusted to 1 when the holding customers are four, and to two when the holding customers are six. Such a statistics for the first 30 000 time units is recorded in Fig. 8. Hence we obtain the optimal policy with the hysteresis property, as shown in Fig. 9, where the number of servers should be adjusted upward to 1 and 2 when an arrival brings and or down to 1 the number of customers to
PHILLIS AND ZHANG: FUZZY SERVICE CONTROL
509
TABLE II THE RULE BASE OF CLASS 3
B. Structure of the Fuzzy Logic Controller Fig. 9. Optimal policy for Example 2.
and 0, whenever a service completion brings the customers to and . These parameters coincide with the results and of Bell [5], which are , and . IV. CLASS 3: SINGLE SERVER WITHOUT SWITCHING COSTS A. Problem Description We consider a system with a single server and infinite queueing capacity. Customers arrive according to a Poisson and there is a set of types of process with parameter , each exponentially distributed service times, , and with mean . The server may decide which type of service rate is applied, based on the state of the system. Two types of cost are considered: , with 1) service cost ; per unit time when service rate of type is being used; 2) holding cost , per unit time per customer in the system, including the one in service (if any). The system objective is to find an optimal control policy that minimizes the average cost of the system over an infinite time horizon. For this problem, both Crabill [8] and Lippman [18] prove that, with and without a restriction of stationary policies, the optimal policy is a connected increasing policy [26], whereby more customers in the system lead to a faster service rate. , Crabill [8] points out that the optimal switching points which are the threshold numbers of customers in the system , when the server is to be turned from service type to are the integers which minimize the average cost rate using service rate type (5) where , and represents the service rate of type applied when there are customers in the system. This procedure effectively determines the optimal policy only when there are two available service rate types. Nevertheless, formula (5) is very important in verifying our results.
when the The state of the system is described by service rate is of type and there are customers in the system and therefore, it changes at each customer arrival or service completion. As previously, we restrict the decision epochs at which the service rates are controlled to the transition epochs of the state, but with the assumption that the service rate of a busy server cannot be changed. Therefore, the decision epochs coincide with the times when a customer arrives in an empty system or leaves it. This is a typical -policy problem. To incorporate the service cost into the decision making process, the number of customers present in the system takes effect through the holding cost per unit time . Subsequently the relationship and can be established by using to define a between special fuzzy set of , as we shall soon see. We select the fuzzy inputs to be the current service type , and the current holding cost per unit , and the fuzzy output time of the system of the service rate type. The universes of the variation are and respectively. discourse for and is chosen to be the standard The universe of discourse for . The server amends its service rate type by domain simply adding the defuzzified crisp output , to the current type . The fuzzy rule base is shown in Table II. We assign the value ZO to the input when the service is of type 1, because this is the basic type even when there are no customers present in the system. The corresponding membership functions for and are shown in Figs. 3(b), 7(a), and 7(b). An example is in order to understand the fuzzy rule base. , but the current When the service rate has its highest value holding cost per unit time is zero (there are no customers in the system at that moment), the server should be turned down to the lowest service level . Hence the variation of the service rate is negative big. This is the interpretation of the rule if is is ZO, then is NB in the rule base. In a similar PB and fashion, we obtain the remaining rule base. We follow previous lines to determine the fuzzy membership . The fuzzy membership functions for functions for are determined for a service cost rate proportional to the corresponding service rate type. When it is not proportional, should be worked out the fuzzy membership functions for case by case. relies The quantitative determination of the fuzzy sets for on the observation that it is always better to pay more for a higher service rate but avoid paying more for holding a larger number of customers, when a higher cost is asked. Therefore
510
IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS—PART B: CYBERNETICS, VOL. 29, NO. 4, AUGUST 1999
PB for should be equivalent to the difference of the service costs per unit time between those of the lowest and the highest with membership service rate. Hence, the fuzzy set PB for . Notice that, when the server grade 1.0 is fixed at , only the is to be turned from type to takes effect, not the individual values of . difference C. A Numerical Example Example 3: We examine an M/M/1 queue with arrival , seven available service rates rate , and corresponding cost , where . rates . The holding cost rate is Since there are seven types of service rate, the scaling factor and which imply that the for is 1. Also, is 0.1. scaling factor for As previously, at each decision epoch, the fuzzy logic controller captures the current service type and the number of customers (which is affected by ), and then fuzzifies them into suitable linguistic values. Based on the corresponding fuzzy rules, certain fuzzy decisions are fired, which are then defuzzified into a crisp decision. Finally, the defuzzified output is added to the current service type to adjust the behavior of the system. For example, let us assume that the current service and the number of customers . From Fig. 7(a) type we see that corresponds to ZO with grade 1 and PS with is scaled down grade 0.33. The value which from Fig. 3(b) corresponds to PS to with grade 0.13 and PM with grade 0.57. According to the fuzzy rule base (Table II) and Mamdani implication, the fuzzy are formulated as follows. decisions is PS with grade 0.13, 1) If is ZO with grade 1 and is PS with grade 0.13. then is PS with grade 0.13, 2) If is PS with grade 0.33 and is ZO with grade 0.13. then is PM with grade 0.57, 3) If is ZO with grade 1 and is PM with grade 0.57. then is PM with grade 0.57, 4) If is PS with grade 0.33 and is PS with grade 0.33. then From Fig. 7(b), the peak values and heights of the fuzzy are , decisions . By the and is height method of defuzzification [12], the crisp output given by (6) . Then the next service type is , employWe start the simulation from an initial state ing the fuzzy control at each decision epoch. From the system performance, we see that the service rate is sensitive to the queue length. By observing the quantitative relationship between these two variables, we immediately obtain the optimal policy as shown in Fig. 10. In words, whenever the queue size reaches one from below, while the current service type is 1, the next service type will be 2; whenever the queue size reaches zero from above, while the current service type is 2,
Fig. 10. Optimal policy for Example 3.
the next service type will be 1 and so on. This optimal policy is a connected increasing policy. Crabill’s formula (5) cannot determine the optimal policy . However, (5) is useful for purposes for problems with of comparison. We test the policy shown in Fig. 10 using (5) and our experiments show that this connected increasing policy is optimal. V. CLASS 4: SINGLE SERVER
WITH
SWITCHING COSTS
A. Problem Description We extend Class 3 to one where there are switching costs which represent the fixed nonnegative costs incurred by . Again, a change from service type to service type the system objective is to find an optimal control policy that minimizes the average cost over an infinite time horizon. For this problem, Crabill [26] establishes the existence of an optimal increasing hysteretic policy [26]. This policy generalizes the connected increasing policy but the distance ) between points of optimal switching up (from to to ) is not necessarily equal to 1. or down (from Explicit expressions of the optimal policy have not been found analytically yet. B. Structure of the Fuzzy Logic Controller Because of the existence of switching costs, we introduce the accumulated holding cost within the current server state , given by (3). The state of the system is described by where is the service type and is the number of customers in the system. As previously, we restrict the decision epochs to the transition epochs of the state, and assume that the service rate of a busy server cannot be changed. The existence of switching costs may lead to a delay in switching the server to another service rate. Therefore, the optimal switching time for the server is determined inevitably by the relationships between the customers’ holding cost and the switching costs. As in Classes 1 and 2, when the accumulation of holding cost in the current server state is high enough to compete with a value of switching costs, it is optimal to change the service type. Note that, unlike Class 1, neither nor is taken into account in the decision course. is eliminated due to the same reason as in Class Indeed is small 2, and is ignored because the quantity of or . Following Class 3, when the service compared to
PHILLIS AND ZHANG: FUZZY SERVICE CONTROL
511
TABLE III THE RULE BASE OF CLASS IV
Fig. 11. Optimal policy for Example 4.
Fig. 12. Tandem servers.
Fig. 11, which is an optimal increasing hysteretic policy. The hysteretic loops are caused by the switching costs. There are no analytical counterparts for these results.
VI. CLASS 5: TANDEM SERVERS WITHOUT SERVICE COSTS type is to be switched to a lower level , this decision can be accomplished immediately. When the service type is to , the server should observe be switched to a higher level whether the accumulated holding cost has reached a level high enough to compete with the switching cost. Consequently, the higher the , the easier it is to make the decision to turn the server to a higher service rate. Following Table II and the above propositions, we construct a new rule base. and and the output is . The The fuzzy inputs are server amends its service rate type following the same ideas as in Class 3. We develop a fuzzy rule base shown in Table III, consisting of 64 rules. The membership functions for and are shown in Figs. 3(a), 7(a), 3(b), and 7(b). and are not bounded from above, we ought Because to specify their fuzzy sets accordingly. Following the ideas of with grade 1.0 has the value Class 3, we obtain that PB for . Finally, as previously, PB for with membership of . grade 1.0 corresponds to C. A Numerical Example Example 4: We reconsider Example 3, where now we have . introduced fixed switching costs, . We The simulation starts from an initial state see that, because of switching costs, the service rate is less responsive to changes of the queue lengths as compared to Example 3 and, therefore, the average number of customers in the system is kept at a higher level and the service rate at a lower level. By observing the quantitative relationship between these two variables, we obtain the optimal policies as shown in
A. Problem Description Now we examine a queueing network consisting of two workstations in tandem, as illustrated in Fig. 12. Each workstation has one exponential server with its own infinite buffer, and customers arrive in station 1 in a Poisson stream with constant rate . The service rate of the server in station 1 can as a function of the be selected to be any number in , where is the number of customers in station state . Upon completion of service in station 1, a customer joins station 2 which is served by a server with constant rate . For stability it is assumed that . The system , for fixed and . cost per unit time is over The system objective is to minimize the average cost an infinite horizon, which is given by
(7) is the number of customers in station at time . where , that is, the holding cost per unit time per If customer in station 2 is not greater than that in station 1, . Henceforth, it is then the optimal policy is trivially . assumed that Rosberg et al. [23] show that for this problem the optimal policy is “bang-bang” characterized by a monotonically increasing switching curve. Specifically, the optimal policy is if and if of the form where is a switching function. However, no explicit method to determine has been given.
512
IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS—PART B: CYBERNETICS, VOL. 29, NO. 4, AUGUST 1999
TABLE IV THE RULE BASE OF CLASS 5
Fig. 13.
Membership functions.
B. Structure of the Fuzzy Logic Controller changes whenever an arrival or a The system state departure in station 1 or 2 occurs. Again, the decision epochs coincide the transition epochs of the state and it is assumed that the service rate of a busy server cannot be changed. This system has no service costs, therefore, it is trivially optimal to set the service rate in station 1 at the maximal value whenever it shows a rising trend and at the minimal value 0 whenever it shows a trend to go down. This is a “bang-bang” policy. Moreover, there are only two parameters and governing this system and the optimal policy must be dictated by a switching curve in the two dimensional state and . space of The inputs to the fuzzy logic controller are the numbers of , customers in stations 1 and 2, and the fuzzy output is the next service rate of the server in station 1. Because of the “bang-bang” fashion, the fuzzy output of an optimal control policy has only two values, 0 and . We henceforth assign two fuzzy sets to the fuzzy output , ZO and PB, which correspond to the service rates of 0 and . The server in station 1 directly uses the defuzzified crisp as its next service rate type. We develop output a rule base in Table IV. and The membership functions for the fuzzy inputs and the fuzzy output are shown in Figs. 3(a), 3(b), and 13, respectively. The establishment of the rule base hinges on the following and the server in station 2 operates ideas. Since always at a constant service rate, it is reasonable to keep the number of customers in station 2 as small as possible under the condition that the server in station 2 should never be starved as long as the buffer in station 1 is not empty. It would be desirable to always have only one customer (in service) in station 2, unless there are no customers in station 1. Such a policy allows the customers to stay in the lower cost place (station 1) for the longest possible time and in the higher cost place (station 2) for the shortest possible time, if they have to queue somewhere. However, the memoryless property of
this process, which means that neither the interarrival nor the service times can be conditioned on the present observable state, makes it impossible to implement this policy. For example, (a) if we keep the number of customers in station 2 too small by turning off server 1, the server in station 2 of might be starved often while there is a large number customers delayed in station 1. This is turn might force the customers to stay longer in the whole system at a high cost. of queueing On the other hand, (b) if we keep the number customers in station 2 high, the customers will have to stay at the higher cost place longer. The fuzzy rule base as well as the corresponding membership functions are developed by seeking is an optimal balance between these two situations. When relatively small, we turn off the server in station 1 earlier in relatively small and thus the customers stay order to keep is in the high cost station less also avoiding risk (a). If relatively large, to avoid situation (a), we turn off the server , we should avoid in station 1 a little later. Since . Based on the above propositions, situations where the rule base is ready. Note that, according to Table IV, if , even when is set at the largest value. This is because of the absence of service costs. The rule base has rules. a total of Now we determine the membership functions for the various quantities involved in the fuzzy controller. If the difference and is very large, the server in station 2 should between be starved rarely. This difference, in a sense, determines how often the server in station 2 will be starved. We adjust from to 1 as the difference ranges accordingly from 0 . For example, if , the membership functions to and should be similar; if , PB for should for reach 1 from above in the physical domain. Finally, because of and the relationship between the membership functions for , the membership functions for are automatically fixed if have been specified. Hence, the membership functions for is ZO and is PS, then is ZO in the fuzzy the rule if with membership grade 1.0 rule base implies that PS for is equal to 1. C. A Numerical Example Example 5: We examine a two-stage tandem queueing net, service rate in work with parameters, arrival rate , and service rate in station 1 either station 2 or , and holding cost per customer per unit and . time in each station . We see The simulation is started from an initial state that the number of customers in station 1 is usually kept at a higher level compared to that in station 2. Whenever the number of customers in station 2 is relatively high, the server in station 1 is always turned off. and Observing the quantitative relationships among in the first 30 000 time units, we obtain the optimal policy plane, shown in Fig. 14. There are two regions in the one where is relatively large and relatively small and the server in station 1 operates at the highest rate , and another where the server operates at the lowest rate 0. The solid line that separates these two regions is a switchover curve which
PHILLIS AND ZHANG: FUZZY SERVICE CONTROL
513
TABLE V THE OPTIMAL RELATIONSHIPS AMONG s1 ; s2
Fig. 14.
AND
k
IN
CLASS 6
Optimal policy for Example 5.
has been predicted in [23]. Given the absence of service costs, in the plane is inside the highest rate the point . region VII. CLASS 6: TANDEM SERVERS
WITH
SERVICE COSTS
A. Problem Description Now we extend Class 4 by considering service costs in station 1. The service rate in station 1 is selected from a , finite set of denumerable service rates and with corresponding service cost per unit time , where . Again we assume that . The , state of the system is described by three variables and have the same meaning as in Class 5, and where is the service type in station 1. The system objective is to minimize the average cost over an infinite horizon. This model is new in the literature. B. Structure of the Fuzzy Logic Controller This is a combination of Classes 3 and 4, if we view the server in station 1 as a single server with variable service rates. The fuzzy inputs in the previous two classes, and are also the inputs in this problem. It should be is the counterpart of in Class 4. All four noted that fuzzy inputs have the same definitions as well as universes of and discourse, as previously. Although the fuzzy inputs are different only by the constant , we cannot treat them as one input because their physical domains are not the same at the same time and hence their corresponding scaling factors are different, and, as we shall soon see, their membership functions of service rate type is chosen are not identical. The variation to be the fuzzy output and its universe of discourse is the . The server in station 1 amends its standard domain type of service rate by simply adding the defuzzified crisp , to its output current type . It is helpful to analyze the optimal relationships (shown and . These in Table V) among the fuzzy variables variables are the fuzzy inputs and outputs in Class 4, however, the relationships here are not the same as those in Table IV. This is because there are only two fuzzy sets ZO and PB defined for the fuzzy output in Class 5, whereas now at least three fuzzy sets are needed and also we have service costs.
Fig. 15. Optimal policy for Example 6.
Table V is derived from Table IV by considering the above differences, i.e., there are four fuzzy sets for introduced in Table V, and the service rate in station is always kept as low as possible. Now we are ready to write the fuzzy rule base. By directly combining Tables II and V, we obtain the fuzzy rule base. There are four fuzzy inputs and each has four fuzzy sets, therefore the rule base has a total of 256 rules. The complete rule base is listed in Appendix C. are shown in Fig. 3(a), The membership functions for and in Fig. 3(b), for in Fig. 7(a) and for for in Fig. 7(b). The shape of the membership functions for the is determined following the ideas of Class 5. fuzzy input Again, the membership functions for are automatically fixed according to the membership functions for , and PS for with membership grade 1.0 is 1. Finally, PB for with . membership grade 1.0 is fixed at C. A Numerical Example Example 6: We examine a two-stage tandem queueing netand . The service work with parameters rate in station 1 can be chosen from a set of four available , and , with corresponding rates and . The service costs holding costs per customer per unit time in stations 1 and 2 and . are . We The simulation is started from an initial state see that the number of customers in station 1 is kept at a higher level compared to station 2. Also, as expected, tends to high becomes large or becomes small. values as We run the simulation for 30 000 time units and obtain the optimal policy of Fig. 15. Similar switchover curves exist if service costs are included.
514
IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS—PART B: CYBERNETICS, VOL. 29, NO. 4, AUGUST 1999
Unlike Class 5, the point in the plane is inside the lowest rate region because service costs were introduced. VIII. CONCLUSION In this paper, we propose a fuzzy logic method to solve a variety of problems of service control and develop the concrete control mechanisms for six classes. The new approach is quite efficient and promising. Existing analytical solutions verify our results. Our model provides solutions, not only characterizations of optimal policies. It also tackles new problems which have not been solved via classical methods. It appears that this method can be extended to a variety of unsolved control problems with general distributions, which lead to non-
FLOW CHART
FOR THE
Markovian systems whose analysis is rather hopeless. Finally, the fuzzy logic techniques seem promising in controlling complex networks. A number of questions remain open and should be addressed in future research. Such questions include stability, optimality, and complexity. Another open question is that of developing a general structure for the fuzzy controllers beyond that of Fig. 1. Yet, the results thus far obtained allow for extensions outside the six classes presented here. New results will be published in upcoming papers. One should bear in mind that, due to the nature of fuzzy logic as well as the lack of analytical models, these problems are nontrivial. However, the steps we have made so far are encouraging.
APPENDIX A CONTROL OF VACATION MODEL
IN
EXAMPLE 1
The algorithms of the remaining classes follow similar steps, adjusted to the particularities of the class.
PHILLIS AND ZHANG: FUZZY SERVICE CONTROL
515
APPENDIX B THE COMPLETE RULE BASE
OF
CLASS 2
516
IEEE TRANSACTIONS ON SYSTEMS, MAN, AND CYBERNETICS—PART B: CYBERNETICS, VOL. 29, NO. 4, AUGUST 1999
APPENDIX C THE COMPLETE RULE BASE
OF
CLASS 6
PHILLIS AND ZHANG: FUZZY SERVICE CONTROL
517
ACKNOWLEDGMENT
[26]
The authors would like to thank two anonymous referees for their comments which led to improvements of this paper.
[27]
REFERENCES
[29]
[1] C. Albright, “Optimal maintenance-repair policies for the machine repair problem,” Nav. Res. Logist. Quart., vol. 27, pp. 17–27, 1980. [2] E. Altman and P. Nain, “Optimal control of the M/G/1 queue with repeated vacations of the server,” IEEE Trans. Automat. Contr., vol. 38, pp. 11766–11775, 1993. [3] C. Bell, “Optimal operation of an M/G/1 priority queue with removable servers,” Operat. Res., vol. 23, pp. 1281–1289, 1973. , “Turning off a server with customers present: Is this any way [4] to run an M/M/c queue with removable servers?,” Operat. Res., vol. 23, pp. 571–574, 1975. , “Optimal operation of an M/M/2 queue with removable servers,” [5] Operat. Res., vol. 28, no. 5, pp. 1189–1204, 1980. [6] O. Boxma, “On the D-policy for the M/G/1 queue,” Manage. Sci., vol. 22, pp. 916–917, 1976. [7] J. Cohen, “On the optimal switching level for an M/G/1 queueing system,” Stoch. Pro. Applicat., vol. 4, pp. 297–376, 1986. [8] T. B. Crabill, “Optimal control of a service facility with variable exponential service time and constant arrival rate,” Manage. Sci., vol. 18, pp. 560–566, 1972. [9] T. B. Crabill, G. Gross, and M. J. Magazine, “A classified bibliography of research on optimal design and control of queues,” Oper. Res., vol. 25, pp. 219–232, 1977. [10] B. T. Doshi, “Optimal control of the service rate in an M/G/1 queuing system,” Adv. Appl. Prob., vol. 10, pp. 682–701, 1978. [11] B. T. Doshi, “Queueing systems with vacations—A survey,” Queue. Syst., vol. 1, pp. 29–66, 1986. [12] D. Driankov, H. Hellendoorn, and M. Reinfrank, An Introduction to Fuzzy Control. New York: Springer-Verlag, 1993. [13] D. P. Heyman, “Optimal operating policies for M/G/1 queueing systems,” Oper. Res., vol. 16, pp. 362–382, 1968. [14] K. Y. Jo, “Optimal service rate control of exponential queueing systems,” J. Oper. Res. Soc. Jpn., vol. 26, pp. 147–165, 1983. [15] K. Y. Jo and S. Stidham Jr., “Optimal service-rate control of M/G/1 queueing systems using phase methods,” Adv. Appl. Prob., vol. 15, pp. 616–637, 1983. [16] T. Kimura, “Optimal control of an M/G/1 queueing system with removable server via diffusion approximation,” Eur. J. Oper. Res., vol. 8, pp. 390–398, 1981. [17] Y. Levy and U. Yechiali, “Utilization of idle time in an M/G/1 queueing system,” Manage. Sci., vol. 22, pp. 202–211, 1975. [18] S. A. Lippman, “Semi-Markov decision process with unbounded rewards,” Manage. Sci., vol. 19, pp. 717–731, 1973. , “Applying a new device in the optimization of exponential [19] queuing systems,” Oper. Res., vol. 23, pp. 687–710, 1975. [20] F. V. Lu and R. F. Serfozo, “M/M/1 queueing decision processes with monotone hysteretic optimal policies,” Oper. Res., vol. 32, pp. 1116–1132, 1984. [21] V. Makis, “A note on optimal control limit for a batch service queueing system: Average cost rate,” Opsearch., vol. 21, p. 113–116, 1984. [22] W. Pedrycz, “Why triangular membership functions?,” Fuzzy Sets Syst., vol. 64, pp. 21–30, 1994. [23] Z. Rosberg, P. P. Varaiya, and J. C. Walrand, “Optimal control of service in tandem queues,” IEEE Trans. Automat. Contr., vol. AC-27, no. 3, pp. 600–610, 1982. [24] H. Sabeti, “Optimal selection of service rates in queueing with different cost,” J. Operat. Res. Soc. Jpn., vol. 16, pp. 15–35, 1973. [25] J. Teghem, Jr., “Optimal control of queues: Removable servers,” Belgian J. Oper. Res. Stat. Comput. Sci., vol. 25, pp. 99–128, 1985.
[28]
[30] [31] [32] [33] [34] [35]
, “Control of the service process in a queueing system,” Eur. J. Oper. Res., vol. 23, pp. 141–158, 1986. , “Optimal control of a removable server in an M/G/1 queue with finite capacity,” Eur. J. Oper. Res., vol. 31, pp. 358–367, 1987. R. R. Weber and S. Stidham Jr., “Optimal control of service rates in networks of queues,” Adv. Appl. Prob., vol. 19, pp. 202–218, 1987. W. Winston, “Optimality of monotonic policies for multiple server exponential queueing systems with state-dependent arrival rates,” Oper. Res., vol. 26, pp. 1089–1094, 1978. K. Wang and H. Huang, “Optimal control of a removable server in an M/Ek/1 queueing system with finite capacity,” Microelectron. Rel., vol. 35, pp. 1023–1030, 1995. M. Yadin and P. Naor, “Queueing systems with a removable service station,” Oper. Res. Quart., vol. 14, pp. 393–405, 1963. R. Zhang and Y. A. Phillis, “Fuzzy service control of M/M/1 queues,” in Proc. 2nd World Automation Congr., Montpellier, France, 1996, vol. 5, pp. 731–736. R. Zhang and Y. A. Phillis, “Fuzzy service rate control of queueing systems,” in Proc. IEEE Int. Conf. Systems, Man, Cybernetics, Beijing, China, 1996, vol. 4, pp. 3045–3050. R. Zhang and Y. A. Phillis, “Fuzzy routing of queueing systems with heterogeneous servers,” in Proc. IEEE Int. Conf. Robotics Automation, Albuquerque, NM, 1997, vol. 3, pp. 2340–2345. R. Zhang and Y. A. Phillis, “A fuzzy approach to the flow control problem,” J. Intell. Fuzzy Syst., to be published.
Yannis A. Phillis (S’78–M’80–SM’83) received the diploma in electrical and mechanical engineering from the National Technical University of Athens, Athens, Greece, in 1973, and the M.S. and Ph.D. degrees from the University of California, Los Angeles, in 1978 and 1980, respectively. From 1980 to 1986, he was with Boston University, Boston, MA. Since 1986, he has been with the Department of Production Engineering and Management, Technical University of Crete, Chania, Greece, where he is Professor and Director of the CAM Laboratory. His research interests are in stochastic control, discreteevent systems, and applications in manufacturing networks and environmental systems. He was Rector of the Technical University of Crete for the period 1993–1997. Dr. Phillis is on the Editorial Board of the Encyclopedia of Life Support Systems and an Editor of the IEEE Robotics and Automation Magazine. He received the Professor of the Year Award at Boston University in 1986. He was Chairman of the Fifth International Conference on Advances in Communication and Control in 1995.
Runtong Zhang received the B.Sc. degree in automatic control from the Dalian Maritime University, China, in 1985, and the Ph.D. degree in production engineering from the Technical University of Crete, Chania, Greece, in 1996. From 1985 to 1993, he was an Electrical Engineer at the Port of Tianjin Authority. In 1997, after postdoctoral research work at the Technical University of Crete, he joined the Institute of Information Systems at the Northern Jiaotong University, China, where he is now Associate Professor. His current research interests are in fuzzy logic, optimal control, and their applications in production and communication networks.