Research Article

Deadlock Prevention Policy with Behavioral Optimality or Suboptimality Achieved by the Redundancy Identification of Constraints and the Rearrangement of Monitors

Algorithm 3

A liveness-enforcing policy.
Input: An S3PR , with .
Output: A liveness-enforcing net , with .
(1) begin
(2) ; .     and denote the sets of constraints in the MIP problem and monitors obtained
       at the first phase, respectively
(3) Apply MIP to to obtain a maximal unmarked siphon.
(4) if  {there exists such a siphon}  then
   (4.1) Obtain a minimal siphon from the maximal one.
   (4.2) Enforce a constraint , , to the MIP problem of ; ; go to step (3).
(5) if    then  ; ; go to step (17).
(6) Apply Algorithm 1 to , obtain a set of necessary constraints .
(7) foreach  ,
   (7.1) Add a corresponding monitor to by Definition 9.
   (7.2) .
(8) Obtain (, ) and .
(9) ; .     and denote the sets of constraints in the MIP problem and monitors obtained
    at the second phase, respectively
(10) Apply MIP to to obtain a maximal unmarked siphon.
(11) if  {there exists such a siphon}  then
   (11.1) Obtain a minimal siphon from the maximal one.
   (11.2) Enforce a constraint , , to the MIP problem of ;
      ; go to step (10).
(12) if    then  ; ; go to step (17).
(13) Apply Algorithm 1 to to obtain a set of necessary constraints .
(14) foreach  ,
   (14.1) Add a corresponding monitor to by Definition 17.
   (14.2) ; .
(15) Obtain , and .
(16) Apply Algorithm 2 to , to find , .
(17) Output , .
(18) end