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

Using the incidence matrix in an evolutionary algorithm for Computing minimal siphons in Petri net models

Using the incidence matrix in an evolutionary algorithm for Computing minimal siphons in Petri net models

Presented at ICSTCC 2014

Fernando Tricas García

October 15, 2014
Tweet

More Decks by Fernando Tricas García

Other Decks in Research

Transcript

  1. Using the incidence matrix in an evolutionary
    algorithm for Computing minimal siphons in Petri
    net models
    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]
    14 de octubre de 2014
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 1

    View full-size slide

  2. Outline
    Petri Nets, Siphons and Liveness
    The genetic algorithm
    The proposal
    Some experiments
    Conclusions
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 2

    View full-size slide

  3. Petri Nets, Siphons and Liveness
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 3

    View full-size slide

  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
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 4

    View full-size slide

  5. The Proposal
    P1_1
    P1_2 P2_1
    P2_2
    R1
    R2
    P1_3
    P1_0
    P2_0
    T7
    T6
    T5
    T4
    T1
    T2
    T3
    _3
    _2
    _5
    T1 T2 T3 T4 T5 T6 T7
    P1 1 + − 0 0 0 0 0 1
    P1 2 0 + − 0 0 0 0 2
    P1 3 0 0 + − 0 0 0 3
    P2 1 0 0 0 0 + − 0 4
    P2 2 0 0 0 0 0 + − 5
    P1 0 − 0 0 + 0 0 0 6
    P2 0 0 0 0 0 − 0 + 7
    R1 − + 0 0 0 − + 8
    R2 0 − − + − + 0 9
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 5

    View full-size slide

  6. The Proposal
    P1_1
    P1_2 P2_1
    P2_2
    R1
    R2
    P1_3
    P1_0
    P2_0
    T7
    T6
    T5
    T4
    T1
    T2
    T3
    _3
    _2
    _5
    T1 T2 T3 T4 T5 T6 T7
    P1 1 + − 0 0 0 0 0 1
    ⊕R1 − + 0 0 0 − + 8
    ± ± 0 0 0 − +
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 6

    View full-size slide

  7. The Proposal
    P1_1
    P1_2 P2_1
    P2_2
    R1
    R2
    P1_3
    P1_0
    P2_0
    T7
    T6
    T5
    T4
    T1
    T2
    T3
    _3
    _2
    _5
    T1 T2 T3 T4 T5 T6 T7
    P1 1 + − 0 0 0 0 0 1
    ⊕R1 − + 0 0 0 − + 8
    ± ± 0 0 0 − +
    ⊕P2 2 0 0 0 0 0 + − 5
    ± ± 0 0 0 ± ±
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 7

    View full-size slide

  8. The Proposal
    P1_1
    P1_2 P2_1
    P2_2
    R1
    R2
    P1_3
    P1_0
    P2_0
    T7
    T6
    T5
    T4
    T1
    T2
    T3
    _3
    _2
    _5
    T1 T2 T3 T4 T5 T6 T7
    P1 1 + − 0 0 0 0 0 1
    ⊕R1 − + 0 0 0 − + 8
    ± ± 0 0 0 − +
    ⊕P2 2 0 0 0 0 0 + − 5
    ± ± 0 0 0 ± ±
    •{P1 1, P2 2, R1} = {P1 1, P2 2, R1}•
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 8

    View full-size slide

  9. The Proposal
    We need to look for a combination with no + signs
    For each individual the variables will represent places (rows of
    the sign incidence matrix)
    The fitness function returns:
    the number of places of the siphon when the restrictions are
    met (minimizing).
    (big) negative number for:
    empty or ‘full’ siphons
    sets with a ‘+’ sign in the result of the sum
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 9

    View full-size slide

  10. The experiments
    Initial population
    Other parameters
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 10

    View full-size slide

  11. 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.
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 11

    View full-size slide

  12. 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 %.
    Initial population is random
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 12

    View full-size slide

  13. The experiments. FMSxD
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 13

    View full-size slide

  14. The experiments
    Times for siphon computation with the proposed method
    Size Population Time Evaluations
    FMSAD 3 16 0,03 (0,01) 247 (83,95)
    3 32 0,05 (0,01) 479 (76,77)
    3 64 0,08 (0,01) 834 (141,33)
    4 16 0,04 (0,01) 226 (80,94)
    4 32 0,09 (0,02) 565 (145,35)
    4 64 0,18 (0,03) 1179 (215,43)
    5 16 0,05 (0,02) 205 (98,40)
    5 32 0,11 (0,04) 483 (209,11)
    5 64 0,27 (0,08) 1225 (395,43)
    6 32 0,14 (0,08) 457 (268,78)
    6 64 0,31 (0,12) 1036 (463,36)
    6 128 0,85 (0,28) 2964 (955,49)
    7 32 0,16 (0,08) 407 (228,09)
    7 64 0,34 (0,15) 909 (443,33)
    7 128 0,93 (0,42) 2474 (1.205,99)
    7 256 1,84 (0,77) 5016 (2.368,35)
    8 64 0,40 (0,19) 822 (463,71)
    8 128 0,88 (0,44) 1842 (1.025,05)
    8 256 2,04 (1,20) 4248 (2.669,90)
    9 64 0,41 (0,12) 664 (214,16)
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 14

    View full-size slide

  15. The experiments
    FMSAD Example
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 15

    View full-size slide

  16. The experiments
    Times for siphon computation with the proposed method
    Size Population Time Evaluations
    FMSLD 3 8 0,01 (0,00) 107 (29,72)
    3 16 0,01 (0,00) 208 (50,96)
    3 32 0,03 (0,00) 405 (64,78)
    4 8 0,01 (0,00) 118 (31,09)
    4 16 0,02 (0,00) 228 (35,98)
    4 32 0,04 (0,01) 462 (75,54)
    5 16 0,03 (0,01) 272 (51,70)
    5 32 0,05 (0,01) 491 (74,13)
    6 16 0,04 (0,01) 270 (68,93)
    6 32 0,07 (0,01) 535 (105,53)
    7 16 0,05 (0,01) 323 (74,41)
    7 32 0,10 (0,01) 637 (84,94)
    8 16 0,07 (0,02) 336 (106,79)
    8 32 0,13 (0,01) 661 (83,84)
    8 64 0,23 (0,04) 1222 (208,84)
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 16

    View full-size slide

  17. The experiments
    FMSLD Example
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 17

    View full-size slide

  18. A philosopher
    forkR_i
    phil1Waiting_i
    philForkR_i philForkL_i
    forkL_i
    philEating_i
    T5_i
    T6_i
    T3_i
    T2_i
    T1_i
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 18

    View full-size slide

  19. The experiments
    Times for siphon computation with the proposed method
    Size Population Time Evaluations
    Phil 3 16 0,02 (0,01) 200 (60,89)
    3 32 0,05 (0,01) 445 (99,29)
    3 64 0,08 (0,01) 834 (141,33)
    4 32 0,06 (0,02) 391 (118,45)
    4 64 0,13 (0,04) 887 (232,26)
    5 64 0,16 (0,06) 790 (271,09)
    5 128 0,38 (0,11) 1876 (528,81)
    6 64 0,19 (0,06) 707 (205,14)
    6 128 0,42 (0,15) 1559 (587,77)
    7 64 0,23 (0,05) 661 (137,34)
    7 128 0,44 (0,07) 1281 (167,60)
    8 64 0,27 (0,01) 625 (0,00)
    8 128 0,58 (0,14) 1325 (285,92)
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 19

    View full-size slide

  20. The experiments
    Philosophers Example
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 20

    View full-size slide

  21. 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...)
    Testing other variants of the GA
    Adapting methods that use siphons
    ICSTCC 2014. October. Sinaia, Romania Fernando Tricas, Jos´
    e Manuel Colom, Juan Juli´
    an Merelo 21

    View full-size slide