06.03.2013 Views

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Procedure Cycle-detection (P, Q, m, cycles)<br />

Begin<br />

cycles := ∅;<br />

For k := 1 to m do Begin // m = no. of transitions in the FPN //<br />

Find-places-on-cycles( P, Q, k, Sk );<br />

If Sk = ∅ Then Lk := ∅;<br />

Find-IRS-places (Sk, Lk);<br />

Find-connected-places-on-cycles (Lk, Newlistk);<br />

Put-transitions (Newlistk, Finallistk);<br />

cycles := cycles ∪ Finallistk;<br />

End For;<br />

End.<br />

Procedure Find-places-on-cycles ( P, Q, k, Sk )<br />

Begin<br />

Sk := ∅<br />

Mk := (P o Q) k ;<br />

For i:= 1 to n // n = no. of places in the FPN //<br />

For j := 1 to n<br />

If mii in Mk = 1<br />

Then Sk := Sk ∪ {pi};<br />

End For;<br />

End For;<br />

End.<br />

Procedure Find-IRS-places (Sk, Lk)<br />

Begin<br />

If Sk ≠ ∅ Then do Begin<br />

Lk : = ∅; M1 : = P o Q ; End ;<br />

For all places pi ,pj ∈ Sk<br />

If mpi,pj in M1 = 1<br />

// p i <strong>and</strong> pj are row & column indices in M1 //<br />

Then Lk := Lk U {pj → pi};<br />

End For;<br />

End ;<br />

End.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!