Abstract

This paper focuses on the enforcement of nonlinear constraints in Petri nets. An integer linear programming model is formulated to transform a nonlinear constraint to a minimal number of conjunctive linear constraints that have the same admissible marking space as the nonlinear one does in Petri nets. The obtained linear constraints can be easily enforced to be satisfied by a set of control places with a place invariant based method. The control places make up a supervisor that can enforce the given nonlinear constraint. For a case that the admissible marking space decided by a nonlinear constraint is nonconvex, another integer linear programming model is developed to obtain a minimal number of constraints whose disjunctions are equivalent to the nonlinear constraint with respect to the reachable markings. Finally, a number of examples are provided to demonstrate the proposed approach.

1. Introduction

Petri nets [1] are a suitable tool to model and control discrete event systems (DESs) [29]. The control of a DES is to restrict its behavior to satisfy the desired control specifications, for example, state forbidding or liveness enforcement. Supervisory control [10, 11] is a well-known mechanism to enforce external constraints on a system to be controlled. In the framework of Petri nets, supervisory control is often represented by a set of control places such that only the desired behavior is allowed.

Constraints associated with reachable states in a DES are a typical and important control specification in supervisory control theory of DESs [12, 13]. In Petri nets, control specifications are often formulated as linear constraints on the states of a system. Linear constraints in Petri nets, also called generalized mutual exclusion constraints (GMECs) [14], are an important concept in the supervisory control of DESs. A well-established approach to enforce a GMEC is to add a control place (monitor) to construct a place invariant (PI) [15, 16] in a Petri net. The PI-based approach has been widely studied by researchers and engineers. Yamalidou et al. [16] design control places to enforce a variety of GMECs. Iordache and Antsaklis [17, 18] propose an approach to implement the disjunctive GMECs. In [19], a good survey is presented on the design of control places by PI-based methods. Up to now, most of the work dealing with deadlocks by Petri nets is based on PIs [2029].

However, not all specifications can be represented as GMECs. In some cases, the specifications are given as a nonlinear constraint on a net model. In this case, the PI-based method fails to find a supervisor to enforce a nonlinear constraint. Therefore, this work deals with nonlinear constraints in Petri nets by finding a set of GMECs that are equivalent to a given nonlinear constraint. A nonlinear constraint is said to be equivalent to a set of GMECs if they allow the same behavior of a net model. Motivated by the work in [3032], given a Petri net and a constraint, its reachability graph is divided into two parts: an admissible-zone (AZ) and a forbidden-zone (FZ), where the AZ contains all admissible markings, that is, those satisfying the constraint, and the FZ includes all forbidden markings, that is, those which do not satisfy the constraint. Then, we formulate the concept of border forbidden markings (BFMs) of a net model. A BFM is a forbidden marking that represents the very first entry from the AZ to the FZ. Thus, once all BFMs are forbidden, all forbidden markings are forbidden. Based on the reachability graph analysis, a set of GMECs can be found to forbid all BFMs but not admissible markings. In this sense, a nonlinear constraint is equivalent to a set of GMECs since they have the identical AZ.

There are two types of admissible marking space to be considered: convex and nonconvex. Based on the equivalence of different constraints, we propose an approach to find a set of conjunctive GMECs that are equivalent to a given nonlinear constraint if its admissible marking space is convex. Meanwhile, an integer linear programming problem (ILPP) is formulated to minimize the number of computed GMECs. That is to say, given a nonlinear constraint, we can find a minimal number of conjunctive GMECs that, once enforced, achieve the same control purposes as specified by the nonlinear one. In the case that the admissible marking space decided by a nonlinear constraint is nonconvex but its BFMs space is convex, we formulate another ILPP to find a minimal number of disjunctive GMECs that are equivalent to it; that is, we can find a minimal number of disjunctive GMECs that are enforced to achieve the same control purpose as the nonlinear one.

The rest of the paper is organized as follows. In Section 2, some basics of Petri nets and the design of control places by PIs are recalled. Section 3 reports the concepts and properties of nonlinear constraints and defines the equivalence of constraints by means of reachability graph analysis. In Section 4, two ILPPs are formulated to obtain a minimal number of conjunctive GMECs and a minimal number of disjunctive GMECs, respectively, which are equivalent to a given nonlinear constraint. Examples are provided to demonstrate the proposed method in Section 5. Finally, we make conclusions in Section 6.

2. Preliminaries

This section recalls the basics of Petri nets [1] and the computation of control places by PIs [16].

2.1. Petri Nets

A Petri net is a four-tuple where and are finite and nonempty sets. is a set of places and is a set of transitions with . is a flow relation of the net, represented by arcs with arrows from places to transitions or from transitions to places. is a mapping that assigns a weight to an arc: if and , otherwise, where and is the set of nonnegative integers. is called the preset of and is called the postset of . A marking is a mapping . denotes the number of tokens in place . For the sake of an expedient description, a compact multiset formalism is used to represent marking , where is the number of places. The pair is called a marked Petri net or a net system. A net is pure (self-loop free) if, , implies . The incidence matrix of a net is a integer matrix with .

A transition is enabled at marking if, , . This fact is denoted as . Once an enabled transition fires, it yields a new marking , denoted as , where . The set of reachable markings of net with initial marking is denoted by . It can be graphically expressed by a reachability graph, denoted as . It is a directed graph whose nodes are markings in and arcs are labeled by the fired transitions.

Let be a net system with . A transition is live if, , , . is live if, , is live. It is dead if , .

A -vector is a column vector indexed by and a -vector is a column vector indexed by , where is the set of integers. -vector is called a -invariant (place invariant, PI for short) if and . A -invariant is said to be a -semiflow if . Let be a PI of . Then, , we have .

2.2. Control Place for GMECs

Let be the incidence matrix of a plant with places and transitions and the incidence matrix of the control places. In what follows, we briefly recall the computation of control places by PIs [16].

Definition 1. A generalized mutual exclusion constraint (GMEC) is a pair where and . A GMEC defines a set of admissible markings:

Let be the th component of . Then a GMEC can be represented aswhere denotes the marking of place . This inequality constraint can be transformed into an equality by introducing a nonnegative slack variable aswhere represents the marking of control place that is usually called a monitor. A set of GMECs can be grouped into a matrix form as follows:where is the marking vector of the Petri net model, is an nonnegative integer matrix, is an nonnegative integer vector, and is the number of GMECs. By introducing a nonnegative slack vector , these inequality constraints can be transformed into equalities:where is an vector representing the marking of the control places. According to PI equation , the supervisor can be computed as follows:

Equation (5) is also true at the initial marking of a net. Thus, the initial marking of the supervisor can be computed as follows:

3. Generalizations of Nonlinear Constraints

In this section, we present basic concepts of nonlinear constraints in Petri nets in the sense of reachability graph analysis. We focus on the general definitions of nonlinear constraints since the linear case can always be considered as a special case of nonlinear constraints.

Let be a constraint that restricts the tokens in a subset of places in a Petri net model . In this work, the constraints are only marking dependent while no firing functions of transitions are considered.

Definition 2. A constraint on a net defines a function such that if satisfies , otherwise , where .

A constraint classifies the reachable markings of a net into two groups: admissible ones that satisfy and forbidden ones that do not satisfy , as defined below.

Definition 3. Let be a constraint on a Petri net model . A marking is said to be admissible with respect to if . The set of admissible markings with respect to is denoted by . A reachable marking of is said to be forbidden with respect to if . The set of forbidden markings with respect to is denoted by .

A supervisor is maximally permissive, or optimal, if it can always disable any transition whose firing leads to a forbidden marking. In this sense, a maximally permissive supervisor for a constraint should keep all admissible markings with respect to in the controlled system and exclude the reachability of any forbidden marking decided by .

Given a constraint on a Petri net model , we assume that its initial marking always satisfies the constraint. Then, the reachability graph of can be classified into two parts: an admissible-zone (AZ) and a forbidden-zone (FZ). The AZ includes all admissible markings with respect to , from which the initial marking is reachable, and the FZ contains all forbidden markings with respect to . A border forbidden marking (BFM) with respective to is a marking in the FZ that is the direct successor of some marking in the AZ. Mathematically, the set of BFMs is defined as follows.

Definition 4. Let be a constraint on . The set of BFMs is defined as .

If all BFMs cannot be reached, their successors cannot be reached. Thus, there is no need to compute the whole reachability graph of a net system. Definition 4 motivates us to generate a part of the reachability graph, that is, and . An algorithm to compute the two sets is presented in Algorithm 1.

Input: A Bounded Petri net and a constraint
Output: The set of admissible markings and the set of BFMs
(1) . / denotes the set of markings whose successors are not computed. /
(2) while do
   , remove from , that is, .
   for each transition enabled at do
  .
  if and then
    and .
  elseif and
    and .
  endif
endwhile
(3) Output and .
(4) End.

Algorithm 1 can find all admissible markings and BFMs without generating the whole reachability graph of a net. Next, the equivalence between two constraints is defined by means of reachability graph analysis.

Definition 5. Let be a set of conjunctive constraints on a Petri net model . A reachable marking of is said to be admissible with respect to if, . The set of admissible markings with respective to is denoted by . A reachable marking of is said to be forbidden with respect to if . The set of forbidden markings with respective to is denoted by .

Similarly, we have the following definition for the set of disjunctive constraints; that is, .

Definition 6. Let be a set of disjunctive constraints on a Petri net model . A reachable marking of is said to be admissible with respect to if , . The set of admissible markings with respect to is denoted by . A reachable marking of is said to be forbidden with respect to if, , . The set of forbidden markings with respect to is denoted by .

By Definitions 5 and 6, we can define the equivalence between the sets of constraints. In the following, can be a set of conjunctive or disjunctive constraints.

Definition 7. Let and be two sets of constraints on . and are said to be equivalent with respect to if .

Since a GMEC can be directly enforced through a control place by the PI-based method [16], Definition 7 motivates us to develop an approach to replace a nonlinear constraint by a set of GMECs. That is to say, given a nonlinear constraint, we can possibly find a set of linear constraints that achieve the same control purposes by the reachability graph analysis.

4. From Nonlinear Constraints to GMECs

In the case that the admissible marking space decided by a nonlinear constraint is convex, this constraint can be transformed into a set of conjunctive GMECs that have the same admissible marking space as the nonlinear one. That is to say, a nonlinear constraint is equivalent to a set of GMECs from the viewpoint of constraint enforcement purposes. Similarly, if the admissible marking space decided by a nonlinear constraint is nonconvex but its BFMs space is convex, it can be transformed into a set of disjunctive GMECs.

4.1. The Minimal Number of Conjunctive Constraints

A set of conjunctive GMECs can be easily enforced by a set of control places using the method presented in Section 2.2. In this section, we first transform a nonlinear constraint into a set of conjunctive GMECs. In the following, denotes .

Suppose that there is a nonlinear constraint on a Petri net with places and transitions. A set of conjunctive GMECs on , which is equivalent to , can be expressed aswhere is the number of the constraints, ’s are integers, and is a nonnegative integer.

Let denote the th constraint; that is, . All admissible markings with respect to , whose set is denoted by , should be reachable. Thus, we have

A BFM decided by is forbidden by if

Now, we introduce a set of variables ’s () to represent the relation between and in . Then, (10) is modified to bewhere is a positive integer constant that must be big enough and is a binary variable. In (11), indicates that is forbidden by and implies that cannot be forbidden by . For , all constraints in the type of (11) for BFMs in are grouped as:

In fact, the number of constraints, for example, , to be computed is much less than that of the elements in . Therefore, we can formulate an ILPP to find the minimal number of constraints. Now, by introducing variable    for , we have the following constraintwhere implies that is selected and otherwise . Equation (13) means that if is not selected, it cannot forbid any BFM. For a BFM , we also haveEquation (14) ensures that any BFM in must be forbidden by at least one constraint.

As a result, we have the following ILPP to obtain the minimal number of conjunctive constraints, which is denoted as the minimal number of conjunctive constraints problem (MNCCP) as follows

The objective function is used to minimize the number of constraints to be computed. Denote its optimal solution as . If MNCCP has an optimal solution, we can claim that the given constraint is equivalent to the minimal number of linear constraints, as stated below.

Theorem 8. Given a Petri net model and a nonlinear constraint on it, if MNCCP has an optimal solution , then one can obtain the minimal number of conjunctive GMECs that are equivalent to with respect to .

Proof. By (16), each computed constraint does not forbid any admissible marking. By (17) and (19), every BFM is forbidden by at least one constraint. Thus, all forbidden markings are accordingly forbidden. Equation (18) ensures that only the selected constraints are used to forbid BFMs. In addition, the objective function ensures that the minimal number of constraints is selected. Since represents the number of the selected constraints, the minimal number equals the optimal solution . In summary, the conclusion holds.

For MNCCP, we need to set a proper initial value for . In the worst case, we need to design a constraint for each BFM. Thus, we have . Suppose that MNCCP has an optimal solution with the minimal number of constraints and it is denoted as . If is too small, that is, , MNCCP has no solution. In this case, we can increase and solve MNCCP again. Therefore, the proper range for is from to . If MNCCP has no solution for , the proposed ILPP fails to find a set of conjunctive constraints that are equivalent to the given constraint. The closer the given is to , the more efficient MNCCP becomes since it has less constraints and variables. Table 1 shows the number of constraints and variables in MNCCP.

4.2. The Minimal Number of Disjunctive Constraints

If the admissible marking space with respect to a nonlinear constraint is nonconvex, we cannot find a set of GMECs whose conjunctions are equivalent to . However, if its BFMs space is convex, it is possible to find a set of GMECs whose disjunctions are equivalent to . In the following, denotes . The disjunctions of GMECs can be written as

Equation (21) indicates that at least one of the constraints must be satisfied. Hence, a marking is reachable if it satisfies at least one of the constraints. Any marking must be reachable. Therefore, we have

Equation (22) cannot be directly considered as a constraint for an ILPP. Hence, we introduce a set of binary variables ’s to represent the relation between each marking and the th constraint. In particular, indicates that satisfies the th constraint and implies that does not satisfy the th constraint. Then, (22) is rewritten aswhere is a positive constant that must be big enough. For (23), if , it becomes . If , it is , implying that this constraint does not restrict ’s and . Since must satisfy at least one constraint, we have

A marking is forbidden if it is forbidden by every constraint. Any marking must be forbidden. Therefore, we have

We do not know how many constraints are needed. In the worst case, each admissible marking in is associated with a constraint. That is to say, . In fact, the number of constraints to be computed is much less than the cardinality of . Suppose that there are constraints initially. Next, we select the minimal number of constraints from the constraints. A variable , is introduced for the th constraint and we have the following facts:where implies that the th constraint is selected and indicates that the th constraint is redundant and thus there is no need to add it as a constraint in (21). Equation (26) means that if the th constraint is not selected, no admissible marking necessarily satisfies it. For any admissible marking , we also haveEquation (27) ensures that any admissible marking in must satisfy at least one constraint.

Finally, we formulate the following ILPP to find the minimal number of disjunctive GMECs that are equivalent to the given constraint , which is denoted as the minimal number of disjunctive constraints problem (MNDCP).

MNDCP is shown as follows:

The objective function is used to minimize the number of constraints that are selected. Denote its optimal value by . If MNDCP has an optimal solution, then we can find the minimal number of disjunctive GMECs that are equivalent to the give nonlinear constraint, as stated below.

Theorem 9. Given a Petri net model and a nonlinear constraint , if MNDCP has an optimal solution , then we can obtain the minimal number of disjunctive GMECs that are equivalent to with respect to .

Proof. Equation (29) ensures that every obtained constraint can forbid all BFMs in . Thus, no forbidden marking is reachable. According to (30) and (31), every marking in satisfies at least one obtained constraint. Hence, the disjunctions of all obtained constraints, that is, (21), can make all admissible markings reachable. Finally, the objective function ensures that the minimal number of constraints is selected, that is, the optimal solution . In summary, the conclusion holds.

Similar to MNCCP, we also need to set a proper initial value for in MNDCP. In the worst case, we need to design a constraint for each admissible marking. Thus, we have . Suppose that MNDCP has an optimal solution with the minimal number of constraints. We denote the minimal number as . If is too small, that is, , MNDCP has no solution. In this case, we can increase and solve MNDCP again. Therefore, the proper range for is from to . If MNDCP has no solution for , the proposed ILPP fails to find a set of disjunctive constraints that are equivalent to the given constraint. The closer the given is to , the more efficient the MNDCP becomes since it has less constraints and variables.

As stated previously, the computational time for finding an optimal solution of an ILPP greatly depends on the number of the constraints and variables in it. Therefore, we provide the numbers of constraint and variables in MNDCP in Table 2.

The disjunctions of GMECs cannot be directly implemented by designing a control place for each constraint by the PI-based method. However, one can find some existing approaches in [17, 18] that deal with disjunctive constraints in the framework of supervisory control. In this work, we do not recall it due to the limited space.

5. Examples for Nonlinear Constraints

In this section, a number of nonlinear constraints are considered to demonstrate the proposed approach.

Example 1. We consider a simple constraint to illustrate the proposed approach:The admissible markings are shown in Table 3 and the set of BFMs is . Its reachability space is shown in Figure 1(a). Then, we formulate an MNCCP for (34). Solving the MNCCP, we can obtain an optimal solution with two GMECs and . The two GMECs are shown as two lines in Figure 1(a). It can be seen that the conjunctions of the two GMECs have the same admissible marking space as (34). That is to say, (34) is equivalent to the two GMECs. Two control places and are designed for the two constraints, respectively, as shown in Figure 1(b). It can be verified that the controlled net in Figure 1(b) is live with the 10 admissible markings as shown in Table 3.

Example 2. Consider nonlinear constraints: , , , , and . The reachability spaces of the nonlinear constraints are shown in Figure 2, where the lines in each figure represent the equivalent GMECs. Table 4 provides the results, where the first column indicates the figures showing the reachability spaces of nonlinear constraints, the second column represents the nonlinear constraints, and the third column provides the minimal number of equivalent conjunctive GMECs.

Example 3. We show the results for two constraints : and : . It can be seen that the admissible marking space with respect to is convex but that with respect to is nonconvex. In this case, we can find a set of conjunctive GMECs that are equivalent to and a set of disjunctive GMECs that are equivalent to . The results are shown in Table 5.

Example 4. A flexible manufacturing system is shown in Figure 4(a). It consists of robot that can hold one part at a time, two machines and , each of which can process one part at a time, two loading buffers and , and two unloading buffers and . Two part types are considered in the system: and . The production sequences are shown in Figure 4(b). The Petri net model of the system is depicted in Figure 5(a). The model has 20 reachable markings. Suppose that the control specification (deadlock control) can be represented as a nonlinear constraint : . Then, there are 15 admissible markings and five BFMs. We formulate an MNCCP for . By solving the MNCCP, we can obtain an optimal solution with two GMECs and . Two control places and are designed for the two GMECs, respectively, as shown in Figure 5(b). It can be verified that the controlled net in Figure 5(b) is live with the 15 admissible markings. That is to say, the nonlinear constraint is equivalent to the two GMECs.

6. Conclusions

This paper deals with the enforcement of the nonlinear constraints on Petri nets. Two ILPPs are proposed, one is to obtain the minimal number of GMECs whose conjunctions are equivalent to a given nonlinear constraint if its admissible markings space is convex and the other is to obtain the minimal number of GMECs whose disjunctions are equivalent to a given nonlinear constraint if its admissible markings space is nonconvex but its forbidden markings space is convex. The two ILPPs require to generate all the admissible markings and BFMs for a given constraint, which are not efficient for large-sized problems. In the future, we will focus on the computational efficiency.

Conflict of Interests

The authors declare that no conflict of interests for this paper exists.

Acknowledgments

This work was supported in part by the National Natural Science Foundation of China under Grants nos. 61203038 and 61374068, the Fundamental Research Funds for the Central Universities under Grant no. JB140402, the Recruitment Program of Global Experts, the NSTIP strategic technologies program number (12-ELE2506-02) in the Kingdom of Saudi Arabia, and FDCT of Macau under Grants 065/2013/A2 and 066/2013/A2.