Research Article

Fault Diagnosis for Discrete Event Systems Using Partially Observed Petri Nets

Algorithm 2

Computation of the minimal number of flow-out.
Input: , an observed sequence , initial marking
Output:
(1) for each do
(2)  derive
(3) end for
(4)
(5) let , , ,
(6) if is an empty string then
(7)  let
(8) else
(9)  for, and t is the first transition of do
(10)   if t is enabled at M then
(11)   let
(12)   else
(13)   if i = 1 then
(14)    go to 23
(15)   else
(16)    let i = i − 1
(17)   end if
(18)  end if
(19) end for
(20) end if
(21) let , go to 6
(22) let i = i − 1
(23) ifthen
(24)  fordo
(25)   if t is enabled at M, q = q + 1 then
(26)    let , go to 6
(27)   else
(28)    let
(29)   end if
(30)  end for
(31) else
(32)  fordo
(33)   if t is enabled at M then
(34)    let , go to 6
(35)   else
(36)    let
(37)   end if
(38)  end for
(39) end if
(40) ifthen
(41)  let i = i+1, go to 23
(42) else
(43)  fordo
(44)   if t is enabled at M then
(45)    let , go to 6
(46)   else
(47)    let
(48)   end if
(49)  end for
(50) end if
(51) let i = i+1, go to 23
(52) fordo
(53)  if t is enabled at M, q = q+1 then
(54)   let , go to 6
(55)  else
(56)   let
(57)  end if
(58) end for
(59) end the algorithm