doi:10.1016/j.eswa.2004.12.007 An expert system for manufacturing systems machine selection Hédi Chtourou a,b,*, Wassim Masmoudi a , Aref Maalej a a Laboratoire des Systèmes Electro-Mécaniques, Ecole Nationale d’Ingénieurs de Sfax, BP W 3038, Sfax, Tunisia b Département de technologie, Institut Préparatoire aux études d’ingénieurs de Sfax, Rte Menzel Chaker Km 0.5, Sfax 3000, Tunisia Abstract This work presents the development of a prototype expert system (ES) for the machine selection of manufacturing systems. This tool, called ESMRS (Expert System for Manufacturing Resource Selection) is used in a simulation based approach in order to structure the solution search mechanism and to overcome the try and error aspect. In fact, in such an approach a number of ‘simulation—ES optimization’ cycles are run until obtaining non-improvable performance measures. The ES main role is to suggest resource modifications based on due date related performance measures obtained through simulation. So, this paper introduces the ‘ES—simulation approach’ that constitutes the utilization scope of ESMRS and then describes the ES static and dynamic knowledge representation before presenting the basic ES features as well as its development using a commercial ES shell. Finally a simple case study illustrates the validity of the approach and its potential applicability for real cases. q 2005 Elsevier Ltd. All rights reserved. Keywords: Machine selection; Expert system; Manufacturing system sizing; Simulation; Performance measure 1. Introduction The resource selection problem is defined as the specification of the number of each type of resources to use in a manufacturing system (MS) for a given planning horizon. Mainly, the approaches that dealt with this problem are either analytical or simulation-based methods. The latter are iterative approaches strongly associated with ‘try and error’ (Bullinger & Sauer, 1987; Peng, Skinner, & Mason, 2001), whereas the former are based on mathematical models connecting parameters like production needs and resource capacities to the required resource quantities (De Matta, Hsu, & Lowe, 1999; Lin & Yang, 1996; Miller & Davis, 1977). Unlike simulation based approaches, the analytical ones are limited to small size problems due to the difficulty of handling the mathematical formulations. In addition they are deterministic and tackle the resource selection problem independently from other problems such as scheduling and layout. Moreover, they do not consider 0957-4174/$ - see front matter q 2005 Elsevier Ltd. All rights reserved. doi:10.1016/j.eswa.2004.12.007 * Corresponding author. Tel.: C216 98 667 530; fax: C216 74 246 347. E-mail addresses: hedi.chtourou@ipeis.rnu.tn (H. Chtourou), wassim. masmoudi@webmails.com (W. Masmoudi), aref.maalej@enis.rnu.tn (A. Maalej). the dynamic and the stochastic aspects inherent to certain manufacturing factors like demand. Hence the results obtained by these methods lack robustness. Besides, artificial intelligence techniques such as expert systems (ES) were used in several MS design fields such as layout and capacity planning (Jayaraman & Srivastava, 1996) but very rarely in the resource selection context. In fact, an ES was used by Kusiak (1987, 1990) to decide, according to the available data and to the problem size, which mathematical model and which resolution algorithm to use. This work presents the development of an ES for MSs machine selection, called ESMRS (Expert System for Manufacturing Resource Selection). This tool is used in a simulation based approach in order to structure the solution search mechanism and to overcome the try and error aspect. Its main role is to suggest resource modifications based on performance measures obtained through simulation. So, the remaining of this paper is organized as follows. First, Section 2 introduces the Expert System Simulation Approach (ESSA) that constitutes the utilization scope of ESMRS. Then, Section 3 describes the ES static and dynamic knowledge representation, whereas Section 4 presents the basic ES features as well as its development Expert Systems with Applications 28 (2005) 461–467 www.elsevier.com/locate/eswa http://www.elsevier.com/locate/eswa H. Chtourou et al. / Expert Systems with Applications 28 (2005) 461–467462 using a commercial ES shell. Afterwards, an application intended to validate the developed ES is discussed in Section 5. Finally, Section 6 is dedicated to conclusion and future work perspectives. 2. Expert system simulation approach 2.1. Concept In this approach, the simulation tool utilizes the data of an arbitrary feasible initial MS as well as the demand pattern to simulate the realization of a typical manufacturing order (MO) set over a period of time corresponding to a given planning horizon. Steady state simulation results are then considered as performance measures of the system. These results, in addition to user prescribed performance limits as well as the MS data and the demand pattern constitute the ES required inputs. This tool is in charge of analyzing the MS situation. If the simulated system performance is found to be improvable, the ES recommends a modification to its resources in order to overcome the problem considered to be the most responsible for the low performance. Conse- quently, a new cycle is run until the ES is no more able to suggest any modifications (see Fig. 1). Despite the fact that the proposed approach is not restricted neither to one type of resources nor to a particular layout, this paper is focused on the specific machine selection problem of a job shop type MS with no labor constraints. Moreover, all products are manufactured by batches of a constant size following the launching of MOs. Finally, the material handling system is bi-directional and covers the totality of the departments. Fig. 1. Overview of the ESA. 2.2. Performance measures In a competitive ‘make to order’ manufacturing context, the main priority is to minimize mean batch tardiness (MT) in order to avoid associated penalties. On the other hand, it is also important to minimize mean batch earliness (ME) and its related extra storage costs. It is worth mentioning here that each MO due date is obtained by multiplying its total work content (TWK) by a user defined factor K. TWK is the sum of all processing and transportation times required to complete the MO in an ideal situation, where neither waiting nor setup are required, whilst K expresses the DD strictness as required by the user. Moreover, another performance measure is crucial for the determination of the department representing a potential bottleneck. It is the average number of batches waiting in machine queue (nw). Finally, each department utilization rate (ur) should be calculated in order to make sure it is bounded by a higher limit expressing the average machine availability and a lower limit depending on its acquisition cost. 3. Knowledge representation Two main kinds of knowledge constitutes the core of any ES, also called knowledge based system: the static and the dynamic knowledge. The former is the group of concepts describing the expertise domain, whereas the latter is the reasoning mechanism. Both are exploited by the ES inference engine either to inductively answer a question or to deductively generate new facts. The next sub sections describe the static knowledge representation through a set of objects and the dynamic knowledge representation using sets of production rules. 3.1. Static knowledge In the job shop machine selection problem using the ESSA, the main concepts are: optimization objective, performance measures, machine departments, performance limits and optimization history. Theses concepts are modeled using an object based formalism in which each object is defined by a set of private data called attributes and a set of intrinsic functions called methods. Objects are also categorized into classes and sub-classes and both attributes and methods are inheritable. The main objects that served to model the problem concepts are depicted in Table 1 that also presents their main attributes. For the sake of brevity, this table presents only the objects and attributes necessary to understand the expertise domain as well as the reasoning mechanism presented in the following section. For the same reason, the objects methods are not discussed here. Besides, it is worth noting here that the number of ‘Machine department i’ objects corresponds to the effective number of machine departments of the job shop. Moreover, Table 1 Main objects description Object Attribute Name Description Machine department i nbr Number of machines nw Mean number of batches waiting wt Mean waiting time of a batch ur Mean machine utilization rate tumax Maximum allowable utilization rate tumin Minimum allowable utilization rate us Utilization state (ok, over utilized, under utilized) pb Diagnosed problem (lack or surplus of machines) Department a Res List of all machine departments (descendents) ResLackO List of machine departments with a machine lack problem (sorted by decreasing nw and wt as tiebreaker) ResSurplusO List of machine departments with a machine surplus problem (sorted by increasing UR) Global performance MT Mean tardiness (actual cycle value) MA Mean advance (actual cycle value) MSS Manufacturing system state according to the no performance deterioration constraint (ok, NO) History MT Mean tardiness (last cycle value) MA Mean advance (last cycle value) Solj Solution of approach cycle number j a Plus all the ‘Department i’ attributes, defined for inheritance purpose only. H. Chtourou et al. / Expert Systems with Applications 28 (2005) 461–467 463 all these objects are descendents of the ‘Department’ object and hence, all their attributes and methods are inherited from this object in which they are defined but not used. Furthermore, the ‘History’ object should have as many Solj as previous ESSA cycles. These attributes are intended to verify that the proposed solution do not correspond to any previously obtained one in order to avoid infinite looping. 3.2. Dynamic knowledge The dynamic knowledge, also called ‘know-how’ can be schematized by a general resolution procedure in which each function or step is realized by a set of production rules. The resolution procedure for the job shop machine selection problem through the ESSA is shown in Fig. 2. In fact, the first ES task is to make sure that the last cycle recommendation did not significantly deteriorate the MS performance. If this test is conclusive, a new cycle starts by updating the best solution if a significant improvement is observed. If not, a new iteration of the previous cycle will take place by trying to recuperate non- explored recommendations from the previous cycle. Subsequently, the ES first tries to diagnose all tardiness problems before trying to make the MS compliant with utilization rate constraints. The earliness minimization objective comes then in the third importance rank. This ranking also governs the first test. Therefore for example, if a significant improvement of the utilization rates implies a significant increasing of tardiness, the corresponding recommendation is simply cancelled. In such a case, the ES recuperates and then proposes the next element from the last cycle recommendation list. Once all problems are diagnosed, the ES tries to establish the list of corresponding feasible recommendations. Such recommendations should ensure the feasibility of all MOs without generating a previously obtained solution. Then, the ES ranks the feasible recommendations according to the severity of the related problems. Thus, a ‘lack of resource’ problem is more critical than a surplus situation. In addition, ‘lack of resource’ problem solutions are ranked by decreasing nw order of their corresponding departments, whereas the more severe ‘surplus of resource’ problem corresponds to the department with the lowest utilization rate. It is worth mentioning here that the absence of feasible recommendation means the end of the procedure. Besides and as previously mentioned, every element of this general resolution procedure is realized by a set of production rules. These are written by means of the previously declared ‘object: attribute’ pairs. Table 2 gives four examples of generic rules constituting the core of the problem diagnosis task. These rules apply for every object D belonging to the class ‘Machine department i’ and use the writing convention 4. Expert system development An ES shell was used to develop a prototype of the hybrid Expert System for Manufacturing Resource Selec- tion (ESMRS). This development tool uses an object oriented knowledge representation formalism as well as production rules (Intellicorp, 1991). It also features an inference engine of the first order capable of forward as well as backward chaining. The first mode was used in the present application in order to solve the machine selection Fig. 2. ES general problem solving procedure. H. Chtourou et al. / Expert Systems with Applications 28 (2005) 461–467464 problem in a deductive way. Furthermore, the ‘breadth first’ option was preferred over the ‘depth first’ in order to diagnose a maximum number of problems before the chaining stops. The shell also permitted the development of a user friendly interface allowing the introduction of MS data and performance measures as well as the visualization of recommendations together with appropriate explanation. A context dependent help was also developed for the application. Fig. 3 depicts the main interface screen of the prototype ES realized for a maximum of five machine departments. 5. Application A simple case application is here presented for a preliminary validation of developed ES. The MS to be sized is a job shop composed of five machine departments (M1–M5). The typical demand pattern consists of single product MOs launched at given frequencies (Poisson law) and characterized by a certain batch size (BS). In addition each type of product (P1–P3) is characterized by a specific routing resulting in a specific total work content (TWK) obtained by summing up the processing times (PTs) on all workstations and the needed transport times. The setup Table 2 Generic diagnosis production rules Function (context) Rule Lack diagnosis (Tardiness) If [GlobalPerformance:MSS Z ZOK] Then AND [GlobalPerformance: MTOGlobalPerformance: Thsld] D:pbZlack AND [D:nwO0] Lack diagnosis (urOurmax) If [GlobalPerformance:MSSZ ZOK] Then AND [D:urOZD:urmax] D:pbZlack Surplus diagnosis (Earliness) If [GlobalPerformance:MSSZ ZOK] Then AND [GlobalPerformance: MEOGlobalPerformance: Thsld] D:pbZSurplus AND [D:nwZ Z0] AND [D:ur!ZD:urmax] AND [D:nbrO1] Surplus diagnosis (Earliness) If [GlobalPerformance:MSSZ ZOK] Then AND [GlobalPerformance:ME OGlobalPerformance: Thsld] D:pbZSurplus AND [GlobalPerformance: MT!GlobalPerformance: Thsld] AND [D:ur!ZD:urmin] AND [D:nbrO1] H. Chtourou et al. / Expert Systems with Applications 28 (2005) 461–467 465 times (STs), governed by a triangular law, are not included in the TWK since this parameter is calculated for the most favorable situation, where the machines are already set for the same product. For each MO, the DD is set to be the product of factor expressing its tightness by its corresponding TWK. The main characteristics of the MS and the demand pattern are recapitulated in Table 3. Fig. 3. ESMRS us An arbitrary initial solution, consisting of assigning n machines to machine department number n, was considered. And the first simulation run showed that most likely, department M1 is the most critical bottleneck (see first line of Table 4). Consequently, the first of the ES issued recommendation list was ‘addition of a machine in depart- ment 1’. This recommendation was taken into account and a second simulation was run. Since no deterioration was noticed er interface. Table 3 Application characteristics Product type Manufacturing data Demand data Routing (dept) PT (min) ST (min) TWK (min) BS Inter-arrival law (min) P1 M3 20 Triangular (115,120,125) 790 10 Poisson (120) M1 25 Triangular (20,25,30) M2 30 Triangular (25,30,35) P2 M2 5 Triangular (25,30,35) 840 20 Poisson (120) M3 15 Triangular (95,100,105) M4 20 Triangular (100,105,110) P3 M1 10 Triangular (20,25,30) 1240 30 Poisson (120) M4 10 Triangular (145,150,155) M5 20 Triangular (70,75,80) H. Chtourou et al. / Expert Systems with Applications 28 (2005) 461–467466 the addition of a machine in department M1 is then accepted and the ES could start finding other problems. Furthermore, since a significant improvement has been noticed the best solution was also updated. Hence 13 cycles were needed in order to obtain a non-improvable solution consisting of (5; 4; 5; 7; 5) machines in departments M1–M5, respectively. It is worth noting here that the last cycle did not generate any conclusive recommendation. Besides and for the sake of clarity, all unfeasible recommendations were displayed in a crossed format. For instance, removal of a machine from Table 4 Results of the various cycles of optimization Cycle Machine number nw ur M1 M2 M3 M4 M5 M1 M2 M3 M4 M5 M1 1 1 2 3 4 5 566 0 311 0 0 100 2 2 2 3 4 5 299 0 282 0 0 100 3 3 2 3 4 5 104 77 200 44 0 100 4 3 2 4 4 5 188 143 0 68 0 100 5 4 2 4 4 5 0 264 0 71 0 95 6 4 3 4 4 5 0 0 48 213 0 93 7 4 3 4 5 5 0 0 48 62 0 93 8 4 3 4 6 5 0 0 45 0 0 94 9 4 3 5 6 5 0 0 0 0 0 94 10 4 4 5 6 5 0 0 0 0 0 93 11 4 4 5 7 5 0 0 0 0 0 94 12 5 4 5 7 5 0 0 0 0 0 75 13 5 3 5 7 5 0 0 0 0 0 77 13 4 4 5 7 5 0 0 0 0 0 93 13 5 4 5 6 5 0 0 0 0 0 75 13 5 4 5 7 4 0 0 0 0 0 74 13 5 4 4 7 5 0 0 0 0 0 75 C, machine addition; K, machine removal. department M4 in cycle 8 was judged unfeasible since it would bring the MS to its previous state and hence will cause infinite looping. Finally, in order to illustrate the robustness of the approach regarding the initial solution, another optimization study is started using the same data but with a different initial MS. In fact, departments M1–M5 started with (7; 6; 5; 4; 3) machines, respectively. As it could be seen from Table 5, the same final solution was reached using 11 cycles. MT MA ES recommen- dations Solution update M2 M3 M4 M5 52 100 61 24 27,298 0 CM1CM3K M5KM2KM4 Yes 78 100 88 50 18,660 115 CM1CM3K M5KM2KM4 Yes 100 100 100 64 12,118 691 CM3CM1C M2CM4KM5 Yes 100 91 100 55 11,464 378 CM1CM2C M4CM3KM5 Yes 100 81 100 70 8700 2072 CM2CM4C M1KM5KM3 Yes 89 100 100 59 5431 1695 CM4CM3C M1CM2KM5 Yes 86 100 100 73 674 3813 CM4CM3C M1KM5KM2 Yes 90 100 88 77 0 6298 CM3CM1C M2KM5KM4 Yes 95 82 91 77 0 8447 CM2CM1C M4KM5KM3 Yes 69 83 93 77 0 8451 CM4CM1K M2KM5KM3 Yes 69 83 77 77 0 8498 CM1KM2K M5KM4KM3 Yes 69 83 76 77 0 8510 KM2KM1K M4KM5KM3 Yes 95 81 76 76 0 8479 KM1KM4K M5KM3 No 69 83 77 77 0 8493 KM4KM5K M3 No 68 83 91 77 0 8498 KM5KM3 No 68 83 77 100 0 8462 KM3 No 63 100 76 77 0 5613 END No Table 5 Results of the various cycles of optimization with different initial system Cycle Machine number nw ur MT MA ES recommen- dations Solution update M1 M2 M3 M4 M5 M1 M2 M3 M4 M5 M1 M2 M3 M4 M5 1 7 6 5 4 3 0 0 0 250 0 53 45 83 100 95 5819 3157 CM4CM5K M2KM1KM3 Yes 2 7 6 5 5 3 0 0 0 87 67 53 45 84 100 100 2109 3510 CM4CM5K M2KM1KM3 Yes 3 7 6 5 6 3 0 0 0 0 112 52 46 84 92 100 1799 5496 CM5CM4K M2KM1KM3 Yes 4 7 6 5 6 4 0 0 0 0 2 53 45 83 91 100 0 8413 CM5CM4K M2KM1KM3 Yes 5 7 6 5 6 5 0 0 0 0 0 53 46 84 91 77 0 8486 CM4KM2K M1KM5KM3 Yes 6 7 6 5 7 5 0 0 0 0 0 53 45 82 77 76 0 8513 KM2KM1K M5KM4KM3 Yes 7 7 5 5 7 5 0 0 0 0 0 53 54 82 77 76 0 8513 KM1KM2K M5KM4KM3 Yes 8 6 5 5 7 5 0 0 0 0 0 62 54 82 77 76 0 8513 KM2KM1K M5KM4KM3 Yes 9 6 4 5 7 5 0 0 0 0 0 63 69 82 76 77 0 8507 KM1KM2K M4KM5KM3 Yes 10 5 4 5 7 5 0 0 0 0 0 75 69 83 76 77 0 8510 KM2KM1K M4KM5KM3 Yes 11 5 3 5 7 5 0 0 0 0 0 77 95 81 76 76 0 8479 KM1KM4K M5KM3 No 11 4 4 5 7 5 0 0 0 0 0 93 69 83 77 77 0 8493 KM4KM5K M3 No 11 5 4 5 6 5 0 0 0 0 0 75 68 83 91 77 0 8498 KM5KM3 No 11 5 4 5 7 4 0 0 0 0 0 74 68 83 77 100 0 8462 KM3 No 11 5 4 4 7 5 0 0 0 0 0 75 63 100 76 77 0 5613 END No C, machine addition; K, machine removal. H. Chtourou et al. / Expert Systems with Applications 28 (2005) 461–467 467 6. Conclusion This work presented the development of an ES used in a simulation based approach in order to structure the solution search mechanism. A prototype of this ES has been developed and tested. This rule based and object oriented tool permitted to obtain satisfactory preliminary results in the sizing of a simple MS belonging to predefined domain of application. However, many aspects of the approach, are currently being developed. In fact, the main issue is the enlargement of the domain of application by incorporating other types of resources and by considering resource reliability and routing flexibility. This should allow applying and validat- ing the approach on real cases. Consequently, the ES reasoning mechanism should be enriched by incorporating new knowledge acquired from sets of planned simulations. Finally, a thorough investigation of the approach robustness should be conducted in order to assess its applicability in various scenarios. References Bullinger, H. J., & Sauer, H. (1987). Planning and implementing a flexible assembly system supported by simulation. International Journal of Production Research, 25(11), 1625–1634. De Matta, R., Hsu, V. N., & Lowe, T. J. (1999). Capacitated selection problem. Naval Research Logistics, 46(1), 19–37. Intellicorp, Kappa users guide, version 1.2, 1991. Jayaraman, V., & Srivastava, R. (1996). Expert systems, in production and operations management. International Journal of Operations and Production Management, 16(12). Kusiak, A. (1987). Artificial intelligence and operation research in flexible manufacturing systems. Information processing and operation research, 25(1), 2–12. Kusiak, A. (1990). Intelligent manufacturing systems. Englewood Cliffs, NJ: Prentice-Hall. Lin, Z. C., & Yang, C. B. (1996). Evaluation of machine selection by the AHP method. Journal of Materials Processing Technology, 57(3–4), 253–258. Miller, D. M., & Davis, R. P. (1977). The machine requirements problem. International Journal of Operation Research, 15, 219. Peng, Q., Skinner, G.E., & Mason, S.J. (2001). Sizing a pilot production line using simulation. Proceedings of the 2001 winter simulation conference. An expert system for manufacturing systems machine selection Introduction Expert system simulation approach Concept Performance measures Knowledge representation Static knowledge Dynamic knowledge Expert system development Application Conclusion References