Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Computing Minimal Siphons in Petri Net Models o...

Computing Minimal Siphons in Petri Net Models of Resource Allocation Systems: An Evolutionary Approach

Presented at PNSE 2014

Fernando Tricas García

June 20, 2014
Tweet

More Decks by Fernando Tricas García

Other Decks in Research

Transcript

  1. Computing minimal siphons in Petri net models of Resource Allocation

    Systems: an evolutionary approach Fernando Tricas1 Jos´ e Manuel Colom1 Juan Juli´ an Merelo2 Depto de Inform´ atica e Ingenier´ ıa de Sistemas Universidad de Zaragoza {ftricas,jm}@unizar.es Depto. ATC/CITIC Universidad de Granada [email protected] 19 de junio de 2014 PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 1
  2. Outline Petri Nets, Siphons and Liveness The genetic algorithm The

    proposal Some experiments Conclusions PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 2
  3. Petri Nets, Siphons and Liveness PNSE 2014. June. Tunis, Tunisia

    Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 3
  4. The Genetic Algorithm 1. (Start) Generate random population 2. (Fitness)

    Evaluate the fitness of each chromosome in the population 3. (New population) Create a new population 3.1 (Selection) 3.2 (Crossover) 3.3 (Mutation) 3.4 (Accepting) 4. (Replace) 5. (Test) If the end condition is satisfied, stop 6. (Loop) Go to step 2 PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 4
  5. The Proposal min p∈P vp ∀p ∈ P, ∀t ∈

    •p, vp ≤ q∈ •t vq, vp ∈ {0, 1} p∈P\P0 vp < |P \ P0| ∀Y ∈ PS, p∈Y vp < Y PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 5
  6. The Proposal min p∈P vp ∀p ∈ P, ∀t ∈

    •p, vp ≤ q∈ •t vq, vp ∈ {0, 1}⇐= p∈P\P0 vp < |P \ P0| ∀Y ∈ PS, p∈Y vp < Y Siphon condition: ∀p ∈ P, ∀t ∈ •p, vp ≤ q∈ •t vq, with vq, vp ∈ {0, 1} PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 6
  7. The Proposal min p∈P vp ∀p ∈ P, ∀t ∈

    •p, vp ≤ q∈ •t vq, vp ∈ {0, 1} p∈P\P0 vp < |P \ P0|⇐= ∀Y ∈ PS, p∈Y vp < Y Not all the places: p∈P\P0 vp < |P \ P0| PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 7
  8. The Proposal min p∈P vp ∀p ∈ P, ∀t ∈

    •p, vp ≤ q∈ •t vq, vp ∈ {0, 1} p∈P\P0 vp < |P \ P0| ∀Y ∈ PS, p∈Y vp < Y ⇐= P–Semiflows forbidden: ∀Y ∈ PS, p∈Y vp < Y PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 8
  9. The Proposal min p∈P vp ∀p ∈ P, ∀t ∈

    •p, vp ≤ q∈ •t vq, vp ∈ {0, 1} p∈P\P0 vp < |P \ P0| ∀Y ∈ PS, p∈Y vp < Y Plus: Siphons must be non empty PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 9
  10. Example Set of equations: Related to Siphons Equation: vp 0

    0 ≤ vr 0 0 vp 0 1 ≤ vp 0 0 + vr 0 1 vp 1 0 ≤ vp 1 1 + vr 0 0 vp 1 1 ≤ vr 0 1 vr 0 0 ≤ vp 0 0 + vr 0 1 vr 0 0 ≤ vp 1 0 vr 0 1 ≤ vp 1 1 + vr 0 0 vr 0 1 ≤ vp 0 1 PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 11
  11. Example Set of equations: Related to not all the places

    Equa- tion: vp 0 0 + vp 0 1 + vp 1 0 + vp 1 1 + vr 0 0 + vr 0 1 < 6 Related to no P–Semiflows Equation: vp 0 0 + vp 1 0 + vr 0 0 < 3 vp 0 1 + vp 1 1 + vr 0 1 < 3 PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 12
  12. Example Set of equations: vp 0 0 ≤ vr 0

    0 vp 0 1 ≤ vp 0 0 + vr 0 1 vp 1 0 ≤ vp 1 1 + vr 0 0 vp 1 1 ≤ vr 0 1 vr 0 0 ≤ vp 0 0 + vr 0 1 vr 0 0 ≤ vp 1 0 vr 0 1 ≤ vp 1 1 + vr 0 0 vr 0 1 ≤ vp 0 1 – vp 0 0 + vp 0 1 + vp 1 0 + vp 1 1 + vr 0 0 + vr 0 1 < 6 – vp 0 0 + vp 1 0 + vr 0 0 < 3 vp 0 1 + vp 1 1 + vr 0 1 < 3 PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 13
  13. Example So, for example: vp 0 1 = vp 1

    0 = vr 0 0 = vr 0 1 = 1 {p 0 1, p 1 0, r 0 0, r 0 1} PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 14
  14. Example But: vp 0 0 = 1 {p 0 1,

    p 1 0, r 0 0, r 0 1, p 0 0} vp 0 1 = vp 1 0 = vr 0 0 = vr 0 1 = 1 {p 0 1, p 1 0, r 0 0, r 0 1} PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 15
  15. The Proposal We need to combine all together For this

    we need to define an adequate fitness function returns: the number of places of the siphon when the restrictions are met (minimizing). (big) negative number for empty or ‘full’ siphons (number of unmet restrictions) - (number of restrictions) when there are unmet restrictions PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 16
  16. The experiments Initial population Other parameters PNSE 2014. June. Tunis,

    Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 17
  17. The experiments Initial population Size: We start with a population

    of 8 individuals and run the experiment 30 times. If it fails more than once, we double the size until the experiment does 30 runs with at most one failed. PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 18
  18. The experiments Initial population Size: We start with a population

    of 8 individuals and run the experiment 30 times. If it fails more than once, we double the size until the experiment does 30 runs with at most one failed. =⇒ Less than 3.3 % of probability of not finding a solution And: Elitism and rank-based selection. Mutation: bitflip operation with 33 % of probability Two-point crossover operator with probability of 66 %. PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 19
  19. The experiments Taking advantage of structural knowledge? Initial population is

    random Initial population includes the P–Semiflows PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 20
  20. The experiments Times for siphon computation with the proposed method

    Initial Population P–Semiflows Random Size Pop. Time Eval. Time Eval. FMSAD 3 64 0.93 (0.22) 912 (214.83) 0.96 (0.18) 938 (169.27) 4 64 1.97 (0.33) 1,102 (185.03) 1.92 (0.32) 1,082 (185.82) 5 64 3.97 (1.01) 1,448 (361.33) 3.33 (0.41) 1,222 (152.79) 6 128 10.16 (1.19) 2,627 (305.12) 12.61 (12.70) 2,657 (394.46) 7 256 31.07 (4.65) 5,877 (785.53) 31.71 (3.47) 5,954 (644.96) 8 256 43.18 (4.65) 6,299 (677.50) 50.95 (17.79) 7,009 (1,231.68) FMSLD 3 32 0.19 (0.03) 408 (72.73) 0.50 (1.73) 379 (73.60) 4 32 0.37 (0.09) 458 (112.10) 0.36 (0.07) 447 (84.49) 5 32 0.65 (0.10) 519 (79.26) 0.65 (0.10) 526 (79.82) 6 32 1.01 (0.22) 571 (124.39) 1.00 (0.21) 562 (117.14) 7 32 1.59 (0.34) 654 (137.96) 1.59 (0.85) 661 (343.29) 8 64 4.14 (1.18) 1,349 (385.48) 4.05 (0.78) 1,310 (248.29) Phil 3 64 0.33 (0.05) 790 (106.88) 0.34 (0.03) 812 (64.70) 4 64 0.64 (0.06) 887 (92.53) 0.62 (0.07) 863 (91.17) 5 128 2.02 (0.20) 1,852 (195.65) 2.03 (0.23) 1,859 (195.90) 6 128 3.08 (0.35) 1,988 (217.09) 3.18 (0.38) 2,042 (240.61) 7 128 4.77 (0.52) 2,260 (237.10) 4.60 (0.41) 2,185 (183.80) 8 128 6.61 (0.60) 2,454 (221.54) 6.40 (0.67) 2,362 (234.06) PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 21
  21. The experiments FMSAD Example PNSE 2014. June. Tunis, Tunisia Fernando

    Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 23
  22. The experiments FMSLD Example PNSE 2014. June. Tunis, Tunisia Fernando

    Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 24
  23. A philosopher forkR_i phil1Waiting_i philForkR_i philForkL_i forkL_i philEating_i T5_i T6_i

    T3_i T2_i T1_i PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 25
  24. The experiments Philosophers Example PNSE 2014. June. Tunis, Tunisia Fernando

    Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 26
  25. How many siphons? Number of siphons P R P R

    Percentage FMSAD 3 42 22 28 25 28 52.38 % 66.67 % 59.52 % 66.67 % 4 78 29 32 34 42 37.18 % 41.03 % 43.59 % 53.85 % 5 150 42 48 44 49 28 % 32 % 29.33 % 32.67 % 6 250 48 53 55 68 19.20 % 21.20 % 22 % 27.20 % 7 490 75 70 90 83 15.31 % 14.29 % 18.37 % 16.94 % 8 906 59 67 110 78 6.51 % 7.40 % 12.14 % 8.61 % FMSLD 3 24 14 11 58.33 % 45.83 % 4 54 28 32 32 36 51.85 % 59.26 % 59.26 % 66.67 % 5 116 34 31 38 45 29.31 % 26.72 % 32.76 % 38.79 % 6 242 31 37 43 48 12.81 % 15.29 % 17.77 % 19.83 % 7 496 35 36 48 49 7.06 % 7.26 % 9.68 % 9.88 % 8 1006 38 48 64 58 3.78 % 4.77 % 6.36 % 5.77 % Phil 3 10 4 6 2 2 40 % 60 % 20 % 20 % 4 17 5 5 5 8 29.41 % 29.41 % 29.41 % 47.06 % 5 26 6 9 7 10 23.08 % 34.62 % 26.92 % 38.46 % 6 37 10 12 10 12 27.03 % 32.43 % 27.03 % 32.43 % 7 50 12 15 11 11 24 % 30 % 22 % 22 % 8 65 11 15 10 13 16.92 % 23.08 % 15.38 % 20 % PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 27
  26. Conclusions and future work We can compute siphons (but not

    all!) It is not clear how good the method is (but the problem size can increase...) Adapting other methods (partially done) Adapting methods that use siphons Adding more information to the fitness function (siphonosity?) PNSE 2014. June. Tunis, Tunisia Fernando Tricas, Jos´ e Manuel Colom, Juan Juli´ an Merelo 28