Automatic Creation of Sequential Control Schemes in ... - CiteSeerX

0 downloads 0 Views 220KB Size Report
Aug 19, 1993 - tool implemented in a real-time expert system called G2. ... To resolve this problem, we propose an alternative approach, namely one allowing automatic creation of sequential ..... Gensym Corporation, Cambridge,. MA, USA ...
Automatic Creation of Sequential Control Schemes in Polynomial Time Inger Klein and Peter Lindskog Department of Electrical Engineering Linkoping University S-581 83 Linkoping, Sweden E-mail: , August 19, 1993 [email protected]

[email protected]

ERTEKNIK REGL

AU

OL TOM ATIC CONTR

LINKÖPING

Abstract

Of all control related problems within industry, those of sequential character are particularly common. Almost all industrial plants contain sequential parts; startup or shutdown phases are typical examples of this. Despite its importance, fairly little theoretical research has been devoted to this problem, and sequential control programs are therefore created manually without much support for a systematic approach. We propose a method to create sequential control programs automatically and on-line upon request, for example when a plant fault has occurred. The main idea is to spend some e ort o -line on modelling the process, and from this model generate the control strategy, that is the plan. Here we present a planning tool implemented in a real-time expert system called G2. The planning system contains algorithms for creating plans in form of minimal GRAFCET charts that show maximal parallelism. The algorithms can handle a restricted class of problems and for this class the complexity only increases polynomially with the number of state variables.

Keywords:

Planning, GRAFCET, Sequential Control, Real-time Expert Tools.

This report and others from the automatic control group in Linkoping are available by anonymous ftp on the address 130.236.24.1 (joakim.isy.liu.se). This report is contained in the compressed ps- le named ~/pub/reports/LiTH-ISY-I-1430.ps.Z.

1

1 Introduction Amongst all control problems found in industry, the ones of sequential nature are especially common. Almost all process plants contain sequential parts; startup or shutdown phases are typical examples of this. Despite its importance fairly little theoretical research has been devoted to this problem, and sequential control programs are therefore created manually without much support for a systematic approach. The sequential control problem can be divided into two parts: planning and implementation. Planning is the problem of nding a plan, that is, a control sequence, which transforms a given initial state into a desired nal (or goal) state. A plan may be implemented, for example, by using the graphical language GRAFCET [5], which has many similarities with Petri nets [9]. However, GRAFCET is a language for implementing plans rather than developing them, although it certainly helps in structuring this traditionally manual task. Normally when creating sequential control programs one must take into account not only the ordinary operation of the plant, but also what should be done when a plant fault occurs. For each possible fault situation we must construct a control strategy that eliminates the e ects of, or at least reduces the damage caused by, the fault. This control strategy is traditionally constructed o -line. When a fault occurs during operation it must be decided which plan to follow. To verify that such a program is correct is very costly, and in practice each case must be simulated, which due to time constraints often is impossible. To resolve this problem, we propose an alternative approach, namely one allowing automatic creation of sequential control schemes on-line upon request. From the current fault situation and a prior de ned \safe state" a sequential control program is automatically generated. Note that the \safe state" may be the same for many fault situations and that each plan is generated only if and when needed. We must demand two things from such a program. It must be correct and it must be generated fast enough to allow for on-line replanning. Instead of working directly on the control program itself we suggest a di erent point of view. The idea is to spend some e ort on modelling the process, and from this model generate the control scheme. From now on we will by planning mean automated creation and implementation of a plan, or a control program. Using, for instance, a nite state model the planning problem is always solvable in principle, but when the size of the problem increases it soon gives rise to complexity problems. Hence we propose to study subclasses where we retain feasibility. We formulate the model using Simpli ed Action Structures originally introduced by Sandewall and Ronnquist [10]. Here we study planning for the SAS-PUBS and the SAS-PUS classes of planning problems which are to be de ned below. We have previously presented algorithms for generating minimal plans (no plan containing fewer actions exist) for these restricted classes [1, 2, 6, 7]. The generated plans also show maximal parallelism, i.e., as many actions as possible are carried out simultaneously. One major advantage with this approach is that the complexity of these algorithms only increases polynomially with the number of state variables, whereas the complexity for algorithms based on searching the state graph increases exponentially. The planning algorithms generate a plan as a partial order on a set of actions, which are translated to a GRAFCET chart. Based on this function chart it is straightforward to directly generate PLC (Programmable Logical Controller) code. In this paper we present a planning tool implemented in a real-time expert system environment called G2 [3]. G2 is a powerful platform for implementing and running knowledge-base systems (KBS). It has adopted many modern programming features including object-orientation, a rule based real-time inference engine, and last but not least, a graphical representation of objects. The implemented planning system contains algorithms for creating plans in form of GRAFCET charts using a fairly general G2 package called GrafcetTool [8]. The paper is organized as follows. Section 2 is directed to those who are not familiar with G2 and 2

GRAFCET. An informal description of the formalism used for planning and the planning algorithms themselves are given in Section 3. In Section 4 we show how GrafcetTool is connected to the planner. A simple example is then given in Section 5 and Section 6 contains some concluding remarks.

2 A Short Introduction to GRAFCET in G2 Inspired by the work presented in [11] we now turn to a discussion about how to handle sequences in a structured and clear way. By using the G2 real-time expert system [3] as a programming platform we have designed and implemented GrafcetTool [8], which is a fully graphical tool based on the GRAFCET formalism [5]. Here we are focusing on realizing plans, but GrafcetTool has a much wider applicability including simulation and modelling of discrete event systems. But before discussing GRAFCET and GrafcetTool we start with a short introduction to G2.

2.1 The G2 Real-time Expert System

G2 is an advanced graphical tool for designing and running real-time expert systems for complex applications that require continuous and \intelligent" monitoring, diagnosis and control [3]. It is aimed at a wide range of real-time applications including process control, robotics, network management and nancial analysis. As of today G2 has more or less established itself as the de facto standard for real-time knowledge-base systems. In G2 the objects are ordered in an object-oriented class hierarchy, where each de ned class can inherit attributes, colors and even icons from its superior class. Using the built-in inference engine, it is possible to reason about the current process state and perform actions through rules that are operating on the objects. G2 heavily rely on graphics and every object is represented by and manipulated through its icon. The objects can also be graphically connected to each other, thereby making G2 suitable for problems that have a graphical representation. As indicated above G2 is intended for real-time applications and supports this in a number of ways, including variables with validity intervals, rule scan intervals and priorities, asynchronous event handling, and more. Another quite important concept is the possibility to activate and deactivate subworkspaces. A workspace is just a kind of window upon which various knowledge components are placed. Workspaces can also be assigned to objects, or in other words, be owned by objects. Such a workspace is called a subworkspace and in a way it represents the internal structure of the object. If a subworkspace is activated during run-time, all its knowledge parts (rules, procedures etc) are executable, but when it is deactivated, none of its knowledge pieces are available. Thus, a partial order on a set of actions, or a plan, can be realized by activating and deactivating object subworkspaces in the order prescribed by the plan. Guaranteeing this order is of course crucial. For a number of reasons (standardization, graphic representation, decomposition possibilities, syntax suitable for compilers) we have chosen to use GRAFCET for this purpose. Although G2 does not have the fanciest graphical capabilities, and certainly not the best runtime environment, its strength lies in its diversity. In practice, G2 was the best available tool for representing and illustrating not only the simulation of a given plant but also the result of the planner.

2.2 GrafcetTool - a GRAFCET Implementation

A GRAFCET function chart [5, 8] is mainly composed of steps and transitions, interconnected via directed links as in gure 1. The steps can either be active, which is illustrated by a highlighted dot called a token, or inactive. Once a step is activated its associated subworkspace also becomes active, and all commands or actions (e.g. open a valve, start a motor) upon this workspace are 3

Workspace

Initial step

A complete graph must be closed. Only one jump backward is allowed.

Simultaneous sequences

Token

Ordinary step Transition

Directed link

Subworkspaces Stored Action (Initial rule) initially conclude that the state of MOTOR1 is STARTED

Transition Condition (Scanned rule) when (the state of SENSOR1 is TRIGGERED) then start Fire-Transition(this workspace)

Figure 1: Concepts and ideas found in GrafcetTool. enabled. Conversely, deactivating a step implies that the step's subworkspace also is deactivated. The change from an active step to an inactive one is determined by the transition located between the steps in question. More precisely, a state change occurs when the so called transition condition placed upon the subworkspace of the transition becomes true (e.g. when a sensor is triggered). Actions and transition conditions are speci ed using ordinary G2 rules. Since the GRAFCET standard de nes a number of simple action types (stored, conditional, delayed, time limited) as well as combinations of them, it is necessary to combine several rules to obtain the intended function. A stored action (the action is performed until another rule belonging to a subsequent step executes a reset action) is for instance speci ed by an initial rule with the following structure:

initially conclude that () The other action types are somewhat more complicated, so to avoid being too technical let us just refer to [8] for a more thorough treatment concerning these matters. A transition condition rule can be implemented as a scanned rule:

when () then start Fire-Transition(this workspace)

In the example in Section 5 these two rule types are in fact the only ones needed. Since most industrial processes are not strictly sequential, the GRAFCET standard also includes two control structures { simultaneous sequences (or parallel branches) and sequence selection (or alternative paths). We have already stated that a plan is described by a partial order on a set of actions, meaning that the resulting chart lacks alternative branches. However, parallel branches will be used whenever possible. The start and the end of parallel branches are represented by 4

special objects consisting of two parallel and horizontal bars, see gure 1. Once a parallel branch is encountered, all underlying sequences are activated simultaneously, and thereafter executed independently of each other. To be able to continue from the convergence point of a branch, all incoming branches must be ready, i.e. all steps connected to the \closing" point must be active. The GRAFCET objects can only be connected to each other according to some basic rules. For example, two steps must be separated by exactly one transition and two transitions must be separated by one step. Again we refer to gure 1 where a syntactically correct graph illustrating many of the ideas behind GRAFCET is given.

3 Planning for a Class of Sequential Control Problems In this section we will informally describe the formalism, i.e. the modelling language, we use for describing planning problems, and introduce some restrictions to form the class of problems we concentrate on. We will also intuitively describe a planning algorithm for this restricted class of planning problems. The formal de nitions and proofs may be found in [1, 2, 6, 7]. We will use some concepts about relations, and the reader who is not familiar with relations and partial orders is referred to [4].

3.1 A Formalism for Describing the Planning Problem

The formalism used here is a natural language for modelling the sequential parts of a plant. Let us assume that the plant is described by a state, and that the control action, or event, is chosen from a set of actions which transforms the state of the plant into a new state. An action is usually performed by a controller; it has a duration in time and it has a result, i.e., it a ects the state of the plant in some way. With a controller we mean, for example, a robot or a computer. The formalism, simpli ed action structures, presented here is based on the work by Sandewall and Ronnquist [10], but somewhat simpli ed. The main advantage of using action structures instead of, for example, a nite state automaton, is that it is possible to reduce the planning complexity. The number of states in the state graph is exponential in the number of state variables, and hence the complexity of a search based algorithm increases exponentially with the number of state variables. However, using action structures it is possible to construct algorithms whose complexity increases polynomially with the number of state variables at least for a restricted class of problems. It is also intuitively attractive to describe the actions and how they a ect the state of the plant. To be able to state the planning problem more formally we now pursue with some basic de nitions.

States:

The state of the plant is described by a state vector x of dimension n, i.e., x = (x1 ; : : : ; xn ). Each state variable belongs to a discrete, nite set Si and thus x 2 S = S1  S2  : : :  Sn .

Action types and actions:

Examples of actions could be MoveWorkpiece, where a robot moves a workpiece from a workstation to storage, OpenValve1 where a valve called Valve1 is opened and ReadInputChannel, where a computer reads an input channel. An action is formally described by two concepts: an action label and an action type. The action type can be interpreted as a generic action description, and the action label is simply used to distinguish between di erent actions of the same type. Consequently, an action having a unique label is a particular instantiation of an action type and can only occur once. Yet, several actions of the same action type can of course occur but then with di erent labels. An action type is de ned by its pre-, post- and prevail-condition. The pre-condition speci es what must hold when the action starts, the post-condition what holds when the action ends, and the prevail-condition what must be true during the execution of the action. Notice that the state 5

variables in the prevail-condition are not a ected by the action. Consider, for example, the action type OpenValve1 where a valve called Valve1 is opened. Suppose that in order to open Valve1 we require that a valve called Valve2 is already open to avoid over ow. Here, the pre-condition is that Valve1 is closed, and the post-condition that it is open. Thus the pre- and post-conditions describe what is changed by the action. An action of type OpenValve1 can only be started when Valve1 is closed (the pre-condition is ful lled) and when Valve2 is open. Consequently there is a condition which must be ful lled while the action is performed, but is not a ected by the action. This is the prevail-condition (Valve2 is open).

Planning:

A plan from xo to x? is a set of actions and a partial order  on the set . The order  is the execution order specifying the order in which the actions in the set should be performed so that the initial state xo is transformed into the nal state x? . The planning problem can now be stated as follows: Given a set of action types H, a state space S , an initial state xo 2 S and a nal state x? 2 S , nd a plan from xo to x? . We say that a plan is minimal if there is no plan from the given initial state to the nal state containing fewer actions. Any partial order can be implemented using GRAFCET and the plan (the partial order) might therefore be represented by a GRAFCET chart. The reader who is not familiar with relations and partial orders may think of a plan as a GRAFCET chart without alternative paths.

3.2 Classes of Planning Problems

The class of planning problems de ned so far is called the SAS class, where SAS stands for Simpli ed Action Structures. To form the class of problems we focus on in this paper we introduce some additional restrictions:  all state variables are binary  each action a ects only one state variable (unary)  no two di erent action types can change a particular state variable to the same value (post-unique)  no two di erent action types have di erent but de ned prevail-conditions for the same state variable (single-valued) This is the so called SAS-PUBS (Post unique, Unary, Binary, Single-valued) class [2, 6]. If we generalize to non-binary state variables then the class is called the SAS-PUS class [1, 7]. An example of a problem in the SAS-PUBS class is a plant where some uid is transported in pipes. In such a plant the typical action types would be to open or to close a speci c valve. However, the restriction to single-valued sets of action types means that if there is one action type whose prevail-condition is that a speci c valve is open, then there can be no action type whose prevail-condition is that this valve is closed.

3.3 Planning for Problems in the SAS-PUBS Class

Our approach is to develop specialized planners tailored for di erent classes of planning problems. The main idea is to use the structure of the SAS-PUBS class and the SAS-PUS class respectively to nd and order the actions without having to explicitly construct the state graph. Instead we use the pre-, post- and prevail-conditions to nd out which actions to perform and in what order they should be executed. Here we will only give an intuitive description of the process of nding SAS-PUBS plans. 6

For planning problems in the SAS-PUBS class, planning can be divided into two parts: nding the set of necessary and sucient actions and nding the execution order named precedes. The set of necessary and sucient actions () consists of two sets: the set of primary necessary actions and the set of secondary necessary actions. The process of nding these two sets can be described as follows:  The set of primary necessary actions is found by checking the di erence between the initial state xo and the nal state x? , and searching for the actions whose pre- and post-conditions correspond to this di erence.  The set of secondary necessary actions contains set/reset pairs for some state variables xi to assure that these state variables are temporarily changed if required by the prevail-condition of some action in the set of necessary actions. The set of necessary and sucient actions  is now the union of the two sets above. The next step is to nd the execution order precedes () which is a relation de ned on the set of necessary and sucient actions . The relation precedes is constructed from the relations enables and disables:  If a1 `enables' a2 then a1 provides some part of the prevail-condition of a2 .  If a2 `disables' a1 then a2 destroys some part of the prevail-condition of a1 . In both these cases a1 should be performed before a2 . Putting these two relations together and taking the transitive closure gives the execution order . If the set  exists and  is a partial order then they form a plan from the initial state xo to the nal state x? . If  is not a partial order or if the set  cannot be constructed then there is no plan transforming xo into x? using the available actions. Moreover, if a plan is found it will be minimal and the unordered actions may be performed in parallel. In [2, 6] we give an algorithm for nding  and  according to the scheme outlined above. The algorithm is proven to be correct and its complexity to increase polynomially with the number of state variables. If the available actions is to close or to open a speci c valve then each state variable corresponds to one valve, and the number of state variables is the number of valves in the plant. It can also be shown that if we do not demand single-valued sets of actions the algorithm will still be correct, i.e., if the algorithm generates a plan this plan will solve the stated planning problem. However, if the algorithm fails a plan can still exist. The planning problem can then be split into a number of polynomial planning problems each of which can be solved using a modi ed version of the SAS-PUBS algorithm. This will be further investigated in future work. Here we have only considered planning problems in the SAS-PUBS class. In [1, 7] an algorithm for dealing with the SAS-PUS class, where non-binary state variables are allowed, is presented. This algorithm is proven to be correct and complete, and the complexity is again proven to increase polynomially with the number of state variables.

4 Putting the Pieces Together Now it is time to explain how the pieces discussed so far can be integrated. The components and the relationships amongst them are depicted in gure 2, and throughout this section we recommend the reader to keep this gure fresh in mind. To begin with, the general GrafcetTool package is t into the framework of the planner. The only change needed in GrafcetTool is the adding of some attributes to the ordinary step de nition. The most important of these new attributes are, no doubt, the pre-, post- and prevail-conditions, which are all implemented as lists. With these alterations the steps may be treated as actions or action types. 7

Let us consider a plant controller with the ability to detect and identify a fault. Detection can in its simplest form be carried out by time-limiting the actions. If a time-limit is exceeded a message is sent to a supervisor, which is responsible for remembering the current state x0 and a number of \safe states". The \safe states" are decided o -line and stored in a look-up table. By classifying the current state, the nal state x is determined according to this table and sent to the planner. Note that the pieces so far are imaginary and not yet implemented. The planner must also know how the plant look like. Each action type is therefore implemented as an ordinary GRAFCET step and stored in a database describing the plant. The steps in this database are always inactive and may be viewed as action class de nitions, i.e. action types. The database also contains the state variables, which together completely describe the state of the plant. All items located in the database are of course the result of the modelling phase, which must be done o -line. Having access to the plant model along with the initial and the nal states, the planner rst creates the necessary actions by copying action type objects. The action instantiations as well as the creation of other GRAFCET elements are entirely handled via special interface procedures found in GrafcetTool. Second, the planner produces the relation precedes on the set of necessary actions according to the SAS algorithms. To improve execution speed these algorithms are implemented using procedures only. Next the partial order is converted to a GRAFCET function chart. To get a syntactically correct chart the steps must be separated by transitions. For that reason we automatically create a transition with a transition condition (a scanned rule) for each step. Observe that the transitions do not belong to the database. The transition condition is derived as a combination of the post-condition of the current step and the pre-conditions of the steps immediately following the current step. The latter part of this condition ensures that an action only is performed when its pre-condition is ful lled, implying that fault detection is simpli ed. Another syntactically motivated move is the adding of empty steps, which will not change the state. Empty steps are only situated just before parallel branches converge and their purpose is to guarantee a correct synchronization. In gure 2 we have coloured the empty steps grey. After adding syntactically necessary objects the graph is completed. Again, this is handled through one of the procedures implemented in GrafcetTool. When it is called, all steps and transitions belonging to the plan are placed on a workspace so that the structure of the graph is clearly recognized. Thereafter, parallel branches are correctly positioned and the elements are connected to each other. Finally, it is possible to translate the outcoming graph to ordinary PLC-code. Thus the cycle is closed and the result is an integrated system able to perform planning in reality.

5 Example In this section we will use a simple example to illustrate how the system works. The example is a puzzle according to Figure 3. As can be seen from the gure the puzzle consists of 16 squares. The squares can be either black or white, and the available action types change the colour of each square from black to white or vice versa. For each square we introduce a state variable xij where i is the row and j the column the square is placed in. The state variable xij is interpreted as:  0 if the colour of the square is white xij = 1 if the colour of the square is black There are two action types for changing the colour of each square. For the square associated with the state variable xij the action types are called White-To-Blackij and Black-To-Whiteij . From now on these will be abbreviated as W2Bij and B2Wij respectively. The pre- and post-condition

8

Verification/ Fault detection Supervisor

Plant Controller Verifier/Fault detector

Actions

From Plant To Plant

PLC 0

X , X

*

Planner ready Model of the Plant Action types

Planner ...

State variables

a1 a2

X = (X1 , ... , X n )

Partial Order

a3

a4

Partial Order --> GRAFCET

GrafcetTool

a1 a2

PLC-code

a3

a4

Figure 2: Sketch over the planning system. Grey boxes indicate modules already implemented. Thick arrows show the data ow between implemented modules, whereas thin arrows show the data ow between modules not yet implemented. Grey arrows illustrate modules that are using GrafcetTool procedures.

9

Figure 3: The puzzle. for the action type W2Bij are pre-condition: post-condition:

xij xij

= 0 = 1

and for the action type B2Wij the pre- and post-conditions are pre-condition: post-condition:

xij xij

= 1 = 0

Notice that no other state variable will be changed when performing an action of this type. An action can only be performed when both the pre-condition and the prevail-condition are satis ed. The prevail-conditions for W2Bij are given in Figure 4, and for B2Wij in Figure 5. For each action type a state of the puzzle is shown. The square which will be a ected by the action is marked with a cross. A black cross on a white square denotes that the colour is changed from white to black (W2Bij ), and a white cross on a black square denotes the opposite (B2Wij ). Thus the state in the upper left corner in Figure 4 shows the prevail-condition for the action type W2B11 . This is a condition on the state which allows an action of the corresponding type to be performed, and should be interpreted as follows: a black square means that the corresponding state variable should be 1, a white square means that it should be 0 and a grey square means that we have no demands on the value, i.e, the value may be either 0 or 1. The initial and the nal states are given in Figure 6. In Figure 7 a minimal plan of maximal parallelity is given in terms of a GRAFCET chart. Each step corresponds to an action as described in Section 4 except the ones coloured grey, which are empty steps. The example given above is only chosen to be intuitive and small enough to illustrate the ideas behind the planning tool. Yet, for many real applications, where on-line replanning is required, this kind of tool can be successfully used.

6 Conclusions We have presented a planning tool implemented in the G2 real-time expert system. It contains algorithms for generating plans for a restricted class of problems in polynomial time. The plans are generated as minimal GRAFCET charts showing maximal parallelism. The function charts can be translated into PLC code, which can be down-loaded and executed in any modern control system. The result is an integrated system able to perform planning in reality. Although we have exempli ed with a toy-like problem it should be clear that this kind of tool can be successfully used in real applications. All real problems can of course not be t into the 10

Figure 4: The prevail-conditions for the action types W2Bij . The square which will be a ected by the action is marked with a cross. A black or white square means that the corresponding state variable should be 1 or 0 respectively while performing the action. A grey square means that there is no demand on the value of the corresponding state variable.

Figure 5: The prevail-conditions for the action types B2Wij . The square which will be a ected by the action is marked with a cross. A black or white square means that the corresponding state variable should be 1 or 0 respectively while performing the action. A grey square means that there is no demand on the value of the corresponding state variable. 11

Figure 6: The initial and the nal states for the puzzle. SAS-PUBS or SAS-PUS framework, but a careful modelling extends the number of problems which can be handled. However, outside these classes one can end up in complexity diculties. For example, if we let go of the single-valued requirement the worst-case complexity increases exponentially with the number of state variables. Even for the binary case it is easy to construct planning problems where the size of a minimal plan is exponential in the number of state variables. Naturally it is then impossible to nd a plan in polynomial time. However, this is not likely to occur for a real-world planning problem. In reality it turns out that a SAS-PUB problem can be split into a number of simpler planning problems. These may be solved in polynomial time using a somewhat modi ed version of the SAS-PUBS algorithm. This will be covered in a paper to appear. The reason for constructing a planning tool as described here is at least twofold. First we are interested in automating the process of fault recovery. After detecting a fault a new control strategy can be constructed on-line. Second, if we include new objects in the process plant we have a systematic way of dealing with this. Instead of modifying our original program, which may cause undesired side-e ects, we modify the model of the system. Besides adding some new action types and state variables, it may also be necessary to modify the prevail-conditions of already existing action types. A correct control strategy can then be reestablished simply by applying the algorithms presented here.

12

Workspace

W2B-21 initially conclude that X21 = 1

Transition Condition (after W2B-21) when (X21 = 1 and X31 = 0 and X11 = 0) then start Fire-Transition(this workspace) W2B44

W2B21

W2B11

W2B31

W2B12

W2B22

B2W11

B2W12

B2W44 B2W21

W2B32

B2W33

B2W31

B2W32

B2W22

Figure 7: A minimal GRAFCET chart solving the puzzle problem. The grey steps are empty steps.

13

References [1] C. Backstrom and I. Klein. Parallel non-binary planning in polynomial time. In Proceedings of the 12th International Joint Conference on Arti cial Intelligence, pages 268{273, Sydney, Australia, Aug 1991. [2] C. Backstrom and I. Klein. Planning in polynomial time: the SAS-PUBS class. Computational Intelligence, 7:181{197, August 1991. [3] Gensym Corporation. G2 Reference Manual, version 3.0. Gensym Corporation, Cambridge, MA, USA, 1992. [4] A. Gill. Applied Algebra for the Computer Sciences. Prentice Hall, Englewood Cli s, New Jersey, 1976. [5] IEC. Preparation of function charts for control systems - IEC 848. Technical Report 848:1988, IEC, Geneve, 1988. [6] I. Klein. Planning for a class of sequential control problems. Licentiate thesis 234, Department of Electrical Engineering, Linkoping, May 1990. [7] I. Klein and C. Backstrom. Planning in polynomial time: The SAS-PUS class. Technical Report LiTH-ISY-I-1229, Department of Electrical Engineering, Linkoping University, Linkoping, Sweden, 1991. [8] P. Lindskog. GrafcetTool - a GRAFCET implementation in G2. Technical Report LiTHISY-I-1402, Department of Electrical Engineering, Linkoping University, Linkoping, Sweden, 1992. [9] J. L. Peterson. Petri Net Theory and the Modeling of Systems. Prentice Hall, Englewood Cli s, N. J., 1981. [10] E. Sandewall and R. Ronnquist. A representation of action structures. In Proceedings of the Fifth National Conference on Arti cial Intelligence (AAAI-86), pages 89{97, Philadelphia, Pennsylvania, August 1986. Morgan Kaufman. [11] K-E  Arzen. Sequential function charts for knowledge-based, real-time applications. In IFAC Workshop on AI in Real-Time Control, Rohnert Park, CA, USA, September 1991.

14