ADAPTATION METHODS IN CASE-BASED REASONING Mikó Balázs 1, Szegh Imre 2, Kutrovácz Lajos 3 1. PhD Student, 2. PhD, Assosiate Professor, 3. Mechanical Engineer Technical University of Budapest, Department of Manufacturing Engineering H 1111, Budapest, Muegyetem rkp. 3, Fax: +36 1 463-31-76, e-mail: surname@manuf.bme.hu The adaptation process is one of a key problem of the case-based reasoning. We developed an adaptation method for manufacturing process planning which consists of two steps: a structural adatpation process and a parameter adaptation method. These methods utilize the potantionalities of rule-based reasoning and genetic algorithm. Keywords: Case-based reasoning, Adaptation, Computer aided process planning, CAPP INTRODUCTION The case-based reasoning (CBR) is a problem solving method, which can generate the solution of a new problem by retrieve a solution of a previous similar case. The case-based reasoning has three major stage which have characteristic role in the process: storing and indexing of cases, retrieving of cases and estimating the similarity, and the process of adaptation. ([Kolodner 93]). In case-based problem solving old solution are used as inspiration for solving new problems. Because new situations rarely match old ones exactly during the adaptation process the old solution is adapted to fit the new situation. In general there are two kinds of adaptation in CBR ([Watson 96]): - Structural adaptation, when rules or formulae are applied directly to the solution. - Derivational adaptation, that reuses the rules or formulae that generated the original solution to produce a new solution to the current problem. There are several techniques ranging from simple to complex, have been used in CBR for adaptation. The most important techniques are: - The null adaptation, when the retrieved solution is used without adaptation. - The parameter adjustment, which is a structural adaptation technique and compares specified parameters of the retrieved and current case to modify the solution in an appropriate direction. - The reistantiation technique replaces features of an old solution with new features. - The derivational replay means, that the method of deriving of the old case is used to the new situation. - The model-guided repair uses a causal model to guide adaptation. During our research we applied the case-based reasoning for generate skeletal manufacturing process plans ([Mikó 98]). These process plans have essential role in
several tasks of preliminary process planning, eg. in manufacturability analysis, in early cost and time estimation etc. We developed two kind of planning systems which are different in the content of the case-base. The first system's knowledge base consists of particular process plans whereas the another case-base consists of group technologies. ADAPTATION PROCESS The adaptation process consists of two stages. The first is the structural adaptation, which means that validity and order of operations and operation elements are determined. During the second stage, which called parameter, adaptation the cutting parameters of operation elements are estimated (Figure 1.). The structural adaptation by the user The structural adaptation by a rule-base Parameter adaptation by a genetic algorithm Figure 1. The concept of adaptation Structural adaptation If the case-base consists of individual process plans the structural adaptation is the user s task. This process helped by a process plan editor, which assures the simple and comfortable editing of the process plan. The editor is suitable for removing, deleting or inserting operations and operation elements (Figure 2.). Although at first sight this method requires great experience and expertness and the final structure depends on the user, but if the case-base is large enough and the retrieval process finds a very similar case, the structural adaptation process is not necessary or just consists of a few change in the level of operation elements. In that case if the knowledge base consists of group technologies the structural adaptation is driven by a rule-base. The knowledge base of rule-based systems consists of facts and rules, where the facts describe the known world. The rules are conditions - action expression which means: if the conditions come true the action is executed. The rules have two effects: modifying the facts and/or indicating an input/output process ([Durkin 94]).
Figure 2. The plan editor We used the LEVEL5 Object rule-based expert system shell for our research. This shell contains all the tools, which can help to develop an object-oriented expert system under Windows operation system. These tools are: the graphic user interface editor; the object editor to create and edit the user defined objects; the internal databases; the intelligent rule editor; the debugging function and the text version of source code. The LEVEL5 Object shell secures the development interface and the inference engine, so during the program development the user s work consists of making the data- and rule-base and the user interface. Figure 3. GT adaptation window The set of rules consists of three parts which have different function. The rules of first subset check the geometrical interdependencies, for example: AND d1 of Complex Part >0 AND d1 of Complex Part >d4 of Complex Part THEN Correctness of Complex Part := FALSE
The second subset defines the validity of operation elements on the base of geometrical data: THEN Validity of Operation element 4 := TRUE The third subset assigns the characteristic geometrical data of operation elements: THEN Diameter of Operation Element 4 := d4 of Complex Part AND Length of Operation Element 4 := L4 of Complex Part Cutting parameter adaptation After completion of structure of the technology, the next step is the adjustment of cutting parameters. Our aim was to determine the best cutting parameters in the viewpoint of a performance index, satisfied the sets of constraints of operation elements and the constraints of the operation. In our solution the performance index is the cost of manufacturing, sets of constraints of operation elements restrict the parameter space in the aspect of capacity of machine, tool, and cutting process. The new approach of our solution is the constraint of the operation, which specifies a value, which depends on every cutting parameters of operation. In our case this condition is the time of manufacturing (of course it is possible to determine parameters without respect of this condition). The solution of this problem is almost impossible with methods of operation research, but some numerical methods are suitable for solving a large and complex optimization problem like this. We used a genetic algorithm (GA) for it. A genetic algorithm is a numerical optimization method, which works on a set of potential solution ([Goldberg 89]) and simulates the Darwinian principle of evolution. So the set of potential solution is called population, an element of the population is an individual. In our case an individual is a set of cutting parameters of every operation elements. An initial population is created from a random selection of the parameters in the parameter space. Each parameter set represents the individual's chromosomes. Each of the individuals is assigned fitness based on how well each individual's chromosomes allow it to perform in its environment. In our case the fitness is the cost of manufacturing. There are three operations, which occur in GAs to create the next generation: selection, crossover, and mutation. Fit individuals are selected for mating, while weak individuals die out. Mated parents create a child with a chromosome set that is some mix of the parent's chromosomes. The process of mating and child creation is continued until an entirely new population is generated with the hope of that strong parents will create a fitter generation of children; in practice, the average fitness of the population tends to increase with each new generation. The fitness of each child is determined and the process of selection/crossover/mutation is repeated. Successive generations are created until very fit individuals are obtained (Figure 4.).
Creation of initial population Selection Crossover Mutation Estiation of the fitness Set of solution Figure 4. The cycle of a GA At the end of the adaptation the new solution is completed. This draft process plan can be used in plan-based manufacturability analysis, in the analysis of manufacturing tasks, in the selection of manufacturing system, in the part process planning as concept and in the manufacturing time and cost estimation. ACKNOWLEDGEMENT This domain has been researched for more than ten years by our team in the Technical University of Budapest, Department of Manufacturing Engineering. The current research is supported by the Research Found of the Hungarian Academy of Science (OTKA T024117). In the end I would like to mention Mihály Szántai MSc student who has great role in the programming of GA. REFERENCE Durkin 94 J. Durkin: Expert systems design and development, Prentice Hall, 1994. Goldberg 89 D.E. Goldberg: Genetic algorithms in search, optimization and machine learning; Addison-Wesley, 1989. Kolodner 93 J. Kolodner: Case-based reasoning, Morgan Kaufmann, 1993. Mikó 98 Mikó B., Szegh I., Kutrovácz L.: Use of methods of artificial intelligence in preliminary process planning; Proc. of First Conference on Mechanical Engineering, Budapest, 1998., 490-494. Watson 96 I. Watson: Knowledge based engineering, Salford Unifersity, 1996.