Sie sind auf Seite 1von 6

19th International Conference on Production Research


M.G. Marchetta, R.Q. Forradellas Facultad de Ingeniera, Universidad Nacional de Cuyo, Centro Universitario, Mendoza, Argentina Abstract Several approaches and systems have been proposed in generative Computer Aided Process Planning field (CAPP), with different advantages and drawbacks. Most of these works are based on expert systems, production rules or special-purpose planning systems. In expert systems and production rules systems much knowledge representation is required, and special-purpose planning systems, on the other hand, are specific of each industry and manufacturing capabilities, which makes it difficult and expensive to implement or extend them to other cases. In this paper an artificial intelligence planning model for CAPP is presented, which has the advantage of being more easily adapted and extended for different industries and manufacturing capabilites, because of the declarative definition language it supports. An analysis of the advantages and drawbacks of this kind of techniques is also presented, and some problems and possible improvements are discussed and proposed for further development. Keywords: Intelligent Agent, Artificial Intelligence, Planning, Computer Aided Process Planning

1 INTRODUCTION Computer Aided Process Planning is an important activity in an intelligent manufacturing environment in. Several techniques have been proposed, implemented and tested in the context of generative CAPP. In expert systems and production rules systems, manufacturing knowledge is represented in the form of logic rules, that are later used for building process plans for parts to be manufactured [1]. This kind of systems have the drawback that much knowledge must be represented, because manufacturing procedures, machines, tools, tolerances, manufacturing features, etc are tightly coupled in the logic rules that drive the reasoning during process planning, thus requiring the manual representation of many combinations of these elements. Special-purpose systems on the other hand, have good accuracy and performance in the special cases they are meant to, but their generalization and extension is difficult and requires a lot of work. They often have built-in specific features of certain class of problems, thus requiring significative modifications for each problem class the system is to be used, as well as for each extension within the same case [2]. Modern artificial intelligence planners, are reasoning systems that use expressive declarative languages for representing knowledge about goals, and actions for achieving them, along with their preconditions and effects. Thus, this planners are capable of finding solutions chaining action sequences to achieve goals or preconditions of other actions [3, 4]. Because of the declarative nature of the languages used by these planners, they are more flexible than logic rule based systems in that not every combination of elements must be explicitly represented, but only the systems capabilities. Thus, these systems allow for easy extension and implementation, because there is less need of knowledge to be represented, and because they are more general than special-purpose systems. Very few approaches that use artificial intelligence planning algorithms have been proposed [5], and some works criticize them precisely because of the general applicability of these kind of algorithms [2]. However, the advantages mentioned above make them a good alternative to be considered. In this paper, an artificial intelligence planning model for CAPP is presented, and

the results of the analysis and experiments in applying these technique to CAPP is reported, along with a discussion and recommendations about improvements needed as future work. This paper is organized as follows. In section 2, an overview of the planning problem is presented, along with a description of the graphplan algorithm (which was used in the experiments). Section 3 presents the planning model used in the prototype implementation for the proposed system. In section 4 the experiments carried out are described, and the results are reported. Section 5 presents a discussion about the advantages and drawbacks of the artificial intelligent planners for CAPP. In section 6 conclusions and future work are presented. Finally, sections 7 and 8 present acknowledgments and references. 2 ARTIFICIAL INTELLIGENCE PLANNING

2.1 The planning problem The planning problem may be defined as follows: given an initial state I, a goals set G, and an actions schemas set A, find an actions sequence S such that G is achieved executing S in I. There are basically two kind of AI planners: reactive planners and generative planners. Reactive planners search plans for achieving the given goals within a plan library (e.g. [6]). Generative planners on the other hand, try to generate a solution from scratch when the goal is given (e.g. [3,4]). Reactive planners have the advantage of having much better performance than generative ones, but the library of possible plans must be defined (and many times handcoded) before the problem solving stage. Generative planners on the other hand, are more dynamic and can generate new solutions when they are provided with new capabilities, which requires less work. In this work, a generative planner was used as part of the intelligent agent implemented. 2.2 The Graphplan algorithm For this work the Graphplan algorithm (described in [3]) was used. This planning algorithm is based in a compact structure named planning graph. In this graph, nodes represent actions instances and facts, and edges

represent either mutual exclusion constraint between nodes or cause-effect relationships between action instances and facts. The basic idea of the algorithm is to fully generate the graph representing the search space, using the initial state description, the actions schemes available, and the goals to be achieved. The graph is generated from the initial state to the goals. On each stage of the generation process, all possible instantiations of the actions schemes whose preconditions are true, are added as nodes of the graph, and then consistency constraints are computed (this constraints are later used during the search procedure). When an operator instance is added to the graph, the effects made true by the operator are also added as fact nodes. The graph generation procedure ends when the planning graph stabilizes: when two consecutive stages result in the same graph (i.e, when no more facts are made true by the addition of instances of the valid action schemas). Once the planning graph has been generated, a search procedure is carried out over the graph in order to find a consistent solution to the problem. A solution is a set of operator instances that leads from the initial state to the goal state, and where no mutual exclusion constratints are violated. Several techniques could be used for the search procedure, but the implementation used in this work performs a depth-first search, from the goals to the initial state. There are some important points to be remarked. The first is that the generation of the planning graph is very fast, since no backtracking is used, and no combinatorial search is considered (the consistency constraints are not checked, but only computed). Another important point is that, the algorithm makes strong commitments with the variable values, because it generates the full planning graph before it proceeds to search for a solution. During the planning graph generation, every consistent instantiation of the action schemes is added to the graph as a node, which can potentially make the graph too big (if there are many consistent instantiations), or may require the evaluation of a great quantity of action instances (this problem was described in [7]). 2.3 The domain definition language The modeling language used by Graphplan is similar to the STRIPS language [8]. In this language, a domain is defined by an initial state, a goal state, a set of valid objects and a set of operators (actions schemas). Objects are the entities with which relationships are defined. Operators can not create or destroy objects, so every valid object must be defined in the domain. An object is defined in the domain by providing its name and a type or class for it. The initial and goal states are defined by a set of propositions. Propositions in the initial state correspond to facts that are true in that state. Propositions in the goal state, on the other hand, are facts that must be true at the end of the plan execution from the initial state. Operators are defined by an operator name, a set of parameters along with their types, a set of preconditions and a set of effects. The preconditions and effects are represented as predicates with constants and variables. Variables are represented with names enclosed in < and > symbols. Predicates are enclosed in parenthesis. Figure 1 presents an example of the different parts of a domain definition in the STRIPS-like language used by graphplan.

3 PLANNING IN CAPP An intelligent agent was developed for this work. This agent can take a STEP file as input, and has the capability of generating a machining process plan to manufacture the part modeled in the file. The agent has several components: a STEP interface, a preprocessor, a machining features recognizer and a generative process planner. The basic technology used for the process planning component (the main component described in this paper), is a graphplan planner. In particular, for the prototype system built for the experiments, a modified version of the Blum and Fursts implementation was used. 3.1 Systems architecture As mentioned before, the agent built has four main components: the STEP interface, a preprocessor, a features recognizer and a generative process planner. The part models for which machining process plans can be built are taken from files in STEP-AP203 format. The STEP interface component is capable of reading and parsing this files into a conceptual boundary representation model of the piece (a brep model). The preprocessor takes the parsed brep model and translates it into a representation suitable for the features recognizer and the process planner components. The preprocessor basically translates the brep model into a planning domain description of the piece. This domain is then used by the features recognizer in order to identify machining features to be planned, and also as part of the domain used by the process planner for building the pieces manufacturing process plan. The features recognizer uses the domain model produced by the preprocessor component. The process planner, on the other hand, takes as input an augmented domain definition, in which the brep model of the part is complemented with the identified features. Figure 2 depicts the whole system architecture, showing the interfaces and the data flow between the agents components. 3.2 Process planning domain definition The complete features model used by the GPPlanner process planner, includes geometrical and topological information taken from the brep model, as well as the semantic meaning added by the features identified by the GFRec features recognizer. Topological and geometrical information includes part faces, their shape and their connection information. Objects in the domain are part faces, machines, tools and machining features. Part faces are directly taken from the brep model. Available machines and tools are contained in configuration files, which can be modified at any moment.

Figure 1: Domain definition example.

19th International Conference on Production Research

Finally, the topological and geometrical data of the part to be manufactured was modeled using three predicates: surfaceShape, surfaceConvexity and connection. The surfaceShape predicate relates a face with its shape, where the shapes are those specified in the ISO 10303AP203 standard. The surfaceConvexity is needed for correct planning of manufacturing operations of certain features (like rounded corners). Finally, the most important topological information was modeled with the connection predicate, which relates adjacent faces, and specifies the shape and convexity of the edge shared by them. We present an example of each of these predicates: (surfaceShape FACE1 CYLINDRICAL_SURFACE) (surfaceConvexity FACE1 CONVEX) (connection FACE1 FACE2 CIRCLE CONVEX) The goal of the CAPP planning model is to machine every face in the features model. The predicate machinedFace was used to specify the faces that should be manufactured by machining operations performed on the stock material: (machinedFace <face>) The planning operators (i.e, the action schemes) represent the supported machining operations. When new machines and tools are incorporated to a factory, their corresponding manufacturing capabilities should be added to the model in order to allow the process planner to use them. The advantage of the proposed approach is that, as shown before, machines, tools and manufacturing operations are represented in a simple declarative language, rather than being hardcoded inside the software that performs the process planning. In the proposed CAPP planning model, the effects of the operators (the machining processes) are related with the goals to be achieved. Thus, the effect of each operator is a conjunction of machinedFace predicates (see figure 1 for an example of a machining operation modeled as a graphplan planning operator). Preconditions of the operators include not only the geometrical and topological information of the part, but also the relationship between this data and the recognized features. When all this data matches the preconditions of a machining operation, this operator scheme is properly instantiated and added to the planning graph as a candidate element of the final process plan.

Figure 2: Systems architecture. The use of separated files or a database for configuration data, makes it easy to adapt the process planner to new manufacturing capabilities, and for manufacturing in different industries. Machining features available in the part, are generated dynamically by the feature recognition component. As can be seen, the input used by the process planner is a merge between the translated brep model generated by the preprocessor, the features model built by GFRec, and the manufacturing capabilities provided by the manufacturing engineering through configuration files. Figure 3 shows examples of the objects in the CAPP domain. The initial state of the planning problem is composed by several types of logic predicates, representing relationships between the objects in the CAPP domain. In order to support setup planning, the loadedTool predicate is used to indicate which tool is mounted on a machine, as shown in the following example: (loadedTool DRILL DRILL_BIT) Each machining feature instance recognized has a feature type (a part may contain more than one instance of the same feature type, e.g. more than one hole or pocket). The implemented prototype can recognize more than 30 features, most of which were taken from [9]. The feature type is indicated in the initial state with the featureType predicate, which has the following form: (featureType <feature> <type>) Each feature has a set of faces related to it, and some of these faces must be machined for the feature to exist. The relationship between a face and a feature was modeled with the partOf predicate: (partOf <face> <feature>) For features that must be machined for the feature to exist, the machinedFor predicate was used: (machinedFor <face> <feature>)

(FACE1 ADVANCED_FACE) (a) Obj ect defi niti on

(oper at or END_MILLING (par ams (<face1> ADVANCED_FACE) (feat ur e> POCKET) ) ( pr econds (loadedTool MILLI NG_MACHINE CUTTER) ... ) ( effects ( mac hi nedFace <f ace1>) ... ) (d) Partial Oper ator

(pr econds (surfaceShape FACE1 PLANE) ... ) (b) Partial I nitial St ate

(effects ( machi nedFace FACE1) ... ) (c) Partial Goal St ate

Figure 3: Object definitions for CAPP planning domain


Figure 4: Test part used in the experiments Thus, this version of the process planner is strongly coupled with the features recognizer, situation that has some advantages and drawbacks that will be discussed in later sections. The planning model described above was the one used in the experiments. 4 EXPERIMENTS Some experiments were carried out in order to test the proposed approach. Figure 4 shows a part modeled in STEP AP 203 format, used for the experiments. This example (and many other mechanincal parts in the same format) are available for download from the National Design Repository [10]. Some parts of the prototype software were developed in Java programming language (the STEP interface, the preprocessor and part of the GFRec features recognizer and GPPlanner process planner). The graphplan planner implementation is written in C language. The simple test part shown in the figure, has several machining features. In terms of the features reported in [9], the part presents two cylindrical holes, two cylindrical pockets, a cylindrical nonthrough slot, a flat step and two rounded corners. Figure 5 shows the (simplified) feature model generated by GFRec. As can be seen in the figure, the output produced by GFRec associates the recognized features with the parts faces related to them. Not all the faces listed are machined for the feature to exist, but all of them are certainly related to the feature (for example, only the inner circular faces of a hole are machined for the hole to exist, but other faces are related to it, such as the planes at the holes ends).

2 END.MI LLING PRI SMATI C. ROUNDED.CONV.ENDED. NONTHROUGH.SLOT1 eff: machi nedFace #25- FACE1 machi nedFace #195- FACE7 machi nedFace #147- FACE5 machi nedFace #57- FACE2 2 DRI LLING CYLINDRI CAL.HOLE1 eff: machi nedFace #116- FACE4 machi nedFace #99- FACE3 2 END.MI LLING CIRCULAR.CONVEX. OPEN.ROUNDED.CORNER2 eff: machi nedFace #446- FACE14 2 END.MI LLING CYLINDRI CAL.POCKET2 eff: machi nedFace #543- FACE18 machi nedFace #556- FACE19 machi nedFace #316- FACE9 2 DRI LLING CYLINDRI CAL.HOLE2 eff: machi nedFace #348- FACE10 machi nedFace #361- FACE11 2 END.MI LLING CYLINDRI CAL.POCKET1 eff: machi nedFace #655- FACE23 machi nedFace #646- FACE22 machi nedFace #586- FACE20 2 END.MI LLING CIRCULAR.CONVEX. OPEN.ROUNDED.CORNER1 eff: machi nedFace #393- FACE12 2 END.MI LLING FLAT. CLOSED. STEP1 eff: machi nedFace_#171- FACE6

Figure 6: Process plan built by GPPlanner The GPPlanner takes that model along with the same input data used by the GFRec component (i.e, the geometrical and topological model created by the preprocessor), in order to build a machining process plan. Figure 6 shows the final process plan. The process plan generated by GPPlanner contains a list of the processes needed to manufacture the part. Each one of the processes in the process plan is associated with the feature it machines (more than one machining process can machine faces for the same feature). Additionally, GPPlanner displays which faces are machined by some process. Another important point included in the GPPlanners output are the ordering constraints. Each machining process has a number that indicates the stage of the process in which the process can be carried out. In figure 6, for example, setup operations must be carried out before machining ones. An important detail, in the particular case of the graphplan planner, is that ordering constraints are sometimes very strong, in the sense that not all the constraints implied by the output are needed. For example, not all the setup operations shown in figure 6 are needed for all the machining operations. One of the setups could be carried out in parallel with some of the machining processes, but the process plan do not allow it.

Figure 5: The features model generated by GFRec

19th International Conference on Production Research

Many experiments were necessary in order to get a working system, because of some particularities of the CAPP domain that make this particular problem a difficult one to be solved by this kind of planners, and in particular, by graphplan. Graphplan builds the complete planning graph, before starting the search for a solution. The planning graph contains every valid instantiation of the operators in each stage of the generation procedure. In CAPP, where faces are represented by objects in the planning domain, the number of valid instantiations of each operator schema may be very big, which has as a consecuence that the algorithm requires much time in big problems. This problem was reduced by the addition of many constraints on each operator. As a consequence of the above problem, the planning model tended to be very rigid, because the strong preconditions imposed reduced the scope of applicability of each machining operator scheme. This problem was also reduced making the model more flexible by omitting some particular preconditions. This idea is similar to that proposed in hint-based approaches to features recognition (se [11] and [12]). As can be seen, the developed planning model makes some trade-offs between performance and expressivity, in order to be useful from the semantic point of view as well as from the technical one. 5 DISCUSSION A working generative CAPP system was produced in this work. The main advantage of the proposed approach is that machining operations, as well as available machines and tools are modeled by means of an expressive declarative language, which allows for the adaptation, generalization and expansion of the model, in a way that is much more easy and that requires much less work than other approaches. The main technology supporting the approach proposed in this work is artificial intelligence planning technology, and in particular, the graphplan algorithm. There are however some important points that must be improved in order to make the system scalable and useful for bigger mechanical parts. The first aspect that needs improvement is performance. This is one of the most studied aspects in AI planning, and significative improvements have been made, but better performance is needed. In the graphplan particular case, an important problem is that it makes strong commitments, since it instantiates the valid operator schemes in all possible ways. In domains (such as CAPP) where many objects are present and where the operators have several parameters, this produces very big graphs. As an example, consider the test part shown in figure 4. This part has 21 faces, which in the planning language is modeled as 21 domain objects. Consider a machining operation modeled with 5 variable parameters, each one representing a face. Then, the number of possible instantiations of the operator is 2.441.880 (21x20x19x18x17). In addition, there may be many operator schemes (GFRec has more than 30), so the number of operator instances may be huge. Obviously not every combination is valid, but every combination must be instantiated in order to check whether or not its (instantiated) preconditions hold in a certain stage of the planning graph generation, so even when not all these instances are inserted in the graph, certainly all of them must be tested during the graph creation. Other planning algorithms (such as UCPOP [4]), on the other hand, are based on the least-commitment principle,

which delays the commitments to the last possible moment. However, this kind of planners have a drawback: the backtracking overhead may be very important, since the planning graph generation and the search process are carried out together. It would be desirable to get the better of both approaches (little or no backtracking overhead and little commitments at the same time). Another important aspect to be improved is that most of the general-purpose planners do not have optimization functionalities. In the manufacturing domains optimization is very important, because optimization saves money. The knowledge representation languages used by planning systems should include a way of representing different operators cost meassures (such as money and time), and a way of specifying weights for these meassures. Additionally, most of the generative CAPP systems are based on the recognized machining features. Thus the process planning component is strongly coupled with the features recongnition component. This situation has the advantage that the additional information provided by the recognized features reduces ambiguity and increases accuracy of the process planning component. However, because of the dependence of the process planning component on the features recognizer one, when changes are made to the features recognizer (such as the addition of new machining features, or their change), changes should also be done in the process planner. This situation has another consequence: when a part presents features not modeled in the features recognizer, there is a high probability that an incomplete process plan (or no plan at all) could be generated. Machining features are a useful conceptual tool for people, so a feature recognition component could be useful even for process planners not based on it. Thus, a possible variation of this scheme that will be explored in future works, is the possibility of having a features recognizer and a process planner component independent of each other. The prototype features recognizer and process planner components implemented for this work have a shared point, that could be useful to link the process plans built, with the machining features recognized: the faces. GFRec associates machining features with the faces that compose them, and GPPlanner makes the same thing with machining processes. So, once the features model has been built, and the process plan generated, both models can be linked together using the faces information as reference, in order to explain the process plan in terms of which features are produced by the machining processes. Finally, the current planners make it difficult to incorporate manufacturability analysis, since it is difficult to implement geometrical reasoning with them. One possible solution to this problem, is to include in a general-purpose planners language some way to add external processing for this purpose (i.e, a generalization of the idea proposed in [5]). 6 CONCLUSIONS AND FUTURE WORK An artificial intelligence planning model, for generative computer aided process planning was presented in this paper. The proposed system was supported by an intelligent agent built with several interacting components (a STEP interface, a preprocessor, a features recognizer and a process planner). The main technology used for the features recognizer and the process planner is an implementation of the the graphplan system. As a result of this research, a working prototype was built that uses STEP-AP203 files as input, and produces machining process plans as output.

The main conclusion of this work, is that artificial intelligence planners have an important advantage over other technologies: they use expressive declarative languages for modeling domains. This makes easier and cheaper to adapt and implement CAPP systems in different machining industries. However, there are some aspects that should be improved in order to produce scalable systems that work with complex input parts. This work is part of a bigger research, in which the technologies described in this paper are complemented with mixed initiative techniques, in order to improve the interaction between the manufacturing engineers and the intelligent computer tools they use [13, 14, 15]. The long term objective of this research, is to develop techniques for improving CAPP systems, by the combination of some features of variant and generative approaches, taking the advantages of each one but reducing the impact of their drawbacks. In order to achieve these research goals, improvements in planning and mixed-initiative techniques (specially in plan recognition) are needed. Future work will be focused in addressing the aspects pointed out in the previous section, as well as the integration of this work with the mixed initiative approaches mentioned above. 7 ACKNOWLEDGMENTS This research was supported by CONICET (National Council of Scientific and Technological Research), and the Logistics department of the Engineering Faculty at Universidad Nacional de Cuyo. 8 REFERENCES [1] Sormaz D., Khoshnevis B., 1995, Knowledge Representation for Automated Process Planning, Proc. of International Symposium on Assembly and Task Planning, Pittsburgh (PA USA), 34-39. [2] Nau D., Gupta S.K., Regli W.C., 1995, AI Planning Versus Manufacturing-Operation Planning: A Case Study, Proc. of Fourteenth International Joint Conference on Artificial Intelligence, Quebec (Canada), 1670-1676. [3] Blum A.L., Furst M.L., 1997, Fast planning through planning graph analysis, Artificial Intelligence, 90, 281-300. [4] Penberthy J.S., Weld D.S., 1992, UCPOP: A Sound, Complete, Partial Order Planner for ADL, Proc. of Third International Conference on Principles of Knowledge Representation and Reasoning, Cambridge (MA USA), 103-114. [5] Dek F., Kovcs A., Jzsef V., Dobrowiecki T., 2001, Hierarchical Knowledge Based Process Planning in Manufacturing, Proc. of IFIP TC5 WG5.2 - WG5.3 Eleventh International PROLAMAT Conference on Digital Enterprise, Budapest (Hungary). [6] Wilkins D., Myers K.L., Lowrance J.D., Wesley L., 1995, Planning and Reacting in Uncertain and Dynamic Environments, Journal of Experimental and Theoretical Artificial Intelligence, 7-1, 197-227. [7] Russel S., Norvig P., 2003, Artificial Intelligence: A Modern Approach 2nd edition, Prentice Hall, p. 469. [8] Fikes R.E., Nilsson N.J., 1971, STRIPS: A new approach to the application of theorem proving to problem solving, Artificial Intelligence, 2, 189-208. [9] Case K., Wan Harun W.A., 2000, Feature-based representation for manufacturing planning, International Journal of Production Research, 38-17, 4285-4300.

[10] National Design Repository, Drexel University, [11] Han J., 1996, Survey of Feature Research, Technical Report IRIS-96-346, Institute of Robotics and Intelligent Systems, University of Southern California (USA). [12] Han J., Pratt M., Regli W., 2000, Manufacturing Feature Recognition from Solid Models: A Status Report, IEEE Transactions on Robotics and Automation, 16-6, 782-794. [13] Marchetta M., Forradellas R., 2006, A Mixed-Initiative Approach to Computer Aided Process Planning, Proc. of the XII Argentine Congress on Computer Science. [14] Marchetta M., Forradellas R., 2006, A New Model for Automatic generation of Plan Libraries for Plan Recognition. Proc. of Third International Conference on Production Research Americas Region (ICPRAM06). [15] Marchetta M., Forradellas R., 2006, Supporting Interleaved Plans in Learning Hierarchical Plan Libraries for Plan Recognition, Inteligencia Artificial Revista Iberoamericana de Inteligencia Artificial, 1032, 47-56.