International Conference on Production Research
ARTIFICIAL INTELLIGENCE PLANNING FOR GENERATIVE
COMPUTER AIDED PROCESS PLANNING
M.G. Marchetta, R.Q. Forradellas
Facultad de Ingeniería, Universidad Nacional de Cuyo, Centro Universitario, Mendoza, Argentina
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 to different industries and
manufacturing capabilities, 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.
Computer Aided Process Planning, Intelligent Agent, Artificial Intelligence, Planning.
Computer Aided Process Planning is an important activity
in an intelligent manufacturing environment. 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 . 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 .
Modern artificial intelligence planners are reasoning
systems, which use expressive declarative languages for
representing knowledge about goals and actions for
achieving them, along with their preconditions and effects.
Thus, these 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 and their working philosophy, they are more
flexible than expert or rules based systems in that not
every combination of elements must be explicitly
represented, but only the system’s capabilities. Thus,
these systems allow for easy extension and
implementation, because less knowledge needs to be
represented, and because they are more general than
Very few approaches that use artificial intelligence
planning algorithms have been proposed , and some
works criticize them precisely because of the general
applicability of this kind of algorithms . 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 this
technique to CAPP is reported, along with a discussion
and recommendations about improvements needed as
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 the
one 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.
Finally, section 6 presents conclusions and future work.
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 a set of action schemas A,
find a sequence of actions S such that G is achieved
executing S in I.
There are basically two kinds of AI planners: reactive
planners and generative planners. Reactive planners
search plans for achieving the given goals within a plan
library (e.g. ). Generative planners on the other hand, try
to generate a solution from scratch when the goal is given,
by means of some reasoning mechanism (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 (usually by hand) 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 knowledge-representation.
In this work, a generative planner was used as part of the
intelligent agent implemented, in order to make the system
as easy to adapt or extend as possible.
2.2 The Graphplan algorithm
For this work the Graphplan algorithm (described in )
was used. This planning algorithm is based on a compact
structure named planning graph. In this graph, nodes
represent actions instances and facts, and edges
represent either mutual exclusion constraints between
nodes or cause-effect relationships between actions and
The basic idea of the algorithm is to fully generate the
graph representing the search space, and then to search
for a solution within it. Using the initial state description,
the actions schemas available and the goals to be
achieved, the graph is generated from the initial state to
the goals, inserting at each moment those actions whose
preconditions are satisfied in the current world state.
On each stage of the generation process, all possible
instantiations of the actions schemas 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., 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 constraints are
violated. Several techniques could be used for the search
procedure, but the implementation used in this work
(developed by the authors of  and freely available on the
Internet), performs a depth-first search starting from the
goals and going backwards towards the initial state.
There are some important points to be remarked. The
generation of the planning graph is very fast, since no
backtracking is used and no combinatorial search is
performed (consistency constraints are not checked, but
only determined during the graph generation stage).
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
schemas 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 ).
2.3 The domain definition language
The modeling language used by Graphplan is similar to
the STRIPS language . In STRIPS 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 between
Figure 1: Domain definition example.
Figure 1 presents an example of the different parts of a
domain definition in the graphplan’s STRIPS-like
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 feature recognizer and a generative process
planner. The basic technology used for the process
planning component (the one 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 Furst’s implementation was used.
3.1 System’s architecture
The intelligent agent built has four main components: the
STEP interface, a preprocessor, a features recognizer and
a generative process planner. Figure 2 depicts the whole
Figure 2: System’s architecture
(a) Object definition
(surfaceShape FACE1 PLANE)
)(b) Partial Initial Stat e
)(c) Partial Goal State
)(d) Partial Operator
INTELLIGENT CAPP AGENT
INTELLIGENT CAPP AGENT
CAPP Software Interface
CAPP Software Interface
International Conference on Production Research
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 these 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 feature
recognizer and the process planner.
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
the part’s machining features, and later by the process
planner for building the manufacturing process plan.
The feature 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.
3.2 Process planning domain definition
The complete feature 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 feature recognizer. Topological and geometrical
information includes part faces, their shape and their
connection information (adjacency, edge’s concavity, etc).
In terms of AI planning, 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.
The use of separated files or database for configuration
data makes it easy to extend the system with new
manufacturing capabilities, and to adapt it to different
manufacturing industries. The part’s machining features
are identified dynamically by the feature recognizer.
As can be seen, the input used by the process planner is a
merge between the translated brep model generated by
the preprocessor, the feature model built by GFRec, and
the manufacturing capabilities provided by the
manufacturing engineer 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.
A limited form of setup planning is supported in the current
implementation of GPPlanner, by means of the
predicate, which is used to indicate which tool is mounted
on a machine, as shown in the following example:
(loadedTool DRILL DRILL_BIT)
Figure 3: Object definitions for CAPP planning domain
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 .
The feature type is indicated in the initial state with the
predicate, which has the following form:
(featureType <feature> <type>)
Each feature is related to a set of faces, some of which
must be machined for the feature to exist. The relationship
between a face and a feature was modeled with the
(partOf <face> <feature>)
In the proposed model, not all the faces related to a
feature must be machined for the feature to exist. For
those that must be machined, the
(machinedFor <face> <feature>)
Finally, the topological and geometrical data of the part to
be manufactured was modeled using three predicates:
predicate relates a face with its shape,
where the shapes are those specified in the ISO 10303-
(surfaceShape FACE1 CYLINDRICAL_SURFACE)
is needed for correct planning of
manufacturing operations of certain features (like rounded
(surfaceConvexity FACE1 CONVEX)
Finally, the most important topological information was
modeled with the
predicate, which relates
adjacent faces, and specifies the shape and convexity of
the edge shared by them:
(connection FACE1 FACE2 CIRCLE CONVEX)
The goal of the CAPP planning model is to machine every
face in the features model. The predicate
was used to specify the planning goal, i.e. the faces that
should be manufactured by machining operations
performed on the stock material:
The planning operators (i.e., the action schemas)
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
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 embedded 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
predicates (see figure 1 for
an example of a machining operation modeled as a
graphplan planning operator).
(DRILL MACHINE) …
(DRILL_BIT TOOL) …
Figure 4: Test part used in the experiments
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 schema is properly
instantiated and added to the planning graph as a
candidate element of the final process plan.
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.
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 mechanical parts in the same
format) is available for download from the National Design
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 used is written in C language.
The simple test part shown in the figure has several
machining features. In terms of the features reported in ,
the part presents two cylindrical holes, two cylindrical
pockets, a non-through slot, a flat step and two fillets
(rounded corners). Figure 5 shows the (simplified) feature
model generated by GFRec.
Figure 5: The features model generated by GFRec
Figure 6: Process plan built by GPPlanner
As can be seen in the figure, the output produced by
GFRec associates the recognized features with the part’s
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 hole’s ends). For simplicity
and space matters, the faces whose machining is required
for each feature are not shown in figure 5.
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 these processes is associated with the feature it
machines (more than one machining process may be
required to machine faces for the same feature).
Additionally, GPPlanner displays which faces are
machined by each process.
Another important point included in the GPPlanner’s
output are the ordering constraints. Each machining
process has a number that indicates the “stage” of the
MILLING.MACHINE NO.TOOL END.MILLING.CUTTER
eff: loadedTool MILLING.MACHINE END.MILLING.CUTTER
DRILL NO.TOOL DRILL.BIT
eff: machi nedFace #25-FACE1 machinedFace #195-FACE7
machinedFace #147-FACE5 machi nedF ace #57-FACE2
eff: machi nedFace #116-FACE4 machinedFace #99- FACE3
eff: machi nedFace #446-FACE14
eff: machi nedFace #543-FACE18
eff: machi nedFace #348-FACE10
eff: machi nedFace #655-FACE23
eff: machi nedFace #393-FACE12
eff: machi nedFace_#171-FACE6
#99-FACE3 #286-FACE8 )
#655-FACE23 #624-FACE21 )
#348-FACE10 #286-FACE8 )
(#57-FACE2 #195-FACE7 #171-FACE6
#147-FACE5 #421-FACE13 #286-FACE8
(#171-FACE6 #421-FACE13 #25-FACE1
#195-FACE7 #147-FACE5 )
(#446-FACE14 #421-FACE13 #470-FACE15
#624-FACE21 #286-FACE8 )
(#316-FACE9 #556-FACE19 #543-FACE18
International Conference on Production Research
manufacturing in which it can be carried out. In figure 6, for
example, setup operations must be carried out before
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 does not allow it.
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,
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
consequence that the algorithm requires much time for
planning big parts. 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 each
machining operator schema. 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  and ).
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 and practical one.
A working generative CAPP prototype 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
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 schemas 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 planning 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 schemas (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
Other planning algorithms (such as UCPOP ), on the
other hand, are based on the
which delays the commitments to the last possible
moment. However, this kind of planners has 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 measures (such as money and time), and a
way of specifying weights for these measures.
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 recognition 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 feature recognize, when
changes are made to the feature 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 feature 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 schema that will be explored in future
works, is the possibility of having a features recognizer
and a process planner component independent of each
The prototype feature 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 feature 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, current AI 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 planner’s language some way to add
external processing for this purpose (i.e., a generalization
of the idea proposed in ). Another approach would be to
introduce some form of continuous reasoning as part of
the AI planning framework, in order to perform geometrical
6 CONCLUSIONS AND FUTURE WORK
An artificial intelligence planning model, for generative
computer aided process planning was presented in this
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 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, and at the same time
they have generative capabilities. These capabilities
reduce the knowledge representation needed. Thus, this
technique combines some of the advantages of special-
purpose planners and knowledge-based systems.
This makes easier and cheaper to adapt and implement
CAPP systems in different machining industries. However,
the system reported in this work is an early prototype,
which shows some aspects that should be improved in
order to produce scalable systems that work with complex
input parts in real environments.
Additionally, more manufacturing aspects have to be
modeled in order to make the system applicable in real
environments, such as considering tool access directions
for setup planning, computation of manufacturing
parameters (speeds, feeds, etc), manufacturability
analysis and optimization.
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 (especially in plan recognition)
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
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.
 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.
 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
 Blum A.L., Furst M.L., 1997, Fast planning through
planning graph analysis, Artificial Intelligence, 90,
 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.
 Deák F., Kovács A., József 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).
 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.
 Russel S., Norvig P., 2003, Artificial Intelligence: A
Modern Approach 2nd edition, Prentice Hall, p. 469.
 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.
 Case K., Wan Harun W.A., 2000, Feature-based
representation for manufacturing planning,
International Journal of Production Research, 38-17,
 National Design Repository, Drexel University,
 Han J., 1996, Survey of Feature Research, Technical
Report IRIS-96-346, Institute of Robotics and
Intelligent Systems, University of Southern California
 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.
 Marchetta M., Forradellas R., 2006, A Mixed-Initiative
Approach to Computer Aided Process Planning,
Proc. of the XII Argentine Congress on Computer
 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 (ICPR-
 Marchetta M., Forradellas R., 2006, Supporting
Interleaved Plans in Learning Hierarchical Plan
Libraries for Plan Recognition, Inteligencia Artificial
Revista Iberoamericana de Inteligencia Artificial, 10-