TITLE: 'PN n°1 '

Introduce the number of places: 2
Introduce the number of transitions: 2
The incidence matrix (W) is:
 -1  1
 1  -1
Introduce the initial state: M0 = [ 180, 0 ]
Introduce the maximal transition speed: Vj = [ 3, 2 ]
The global priority level is: [ 1, 1 ]
Lowest priority level is 1
The groups are:
G1 - T1, T2,

=====================

PHASE 1


Algorithm 5.C - Step 1
Algorithm 5.C - Step 2
Algorithm 5.C - Step 3
Algorithm 5.C - Type 1
 


ALGORITHM 5.3

  We will compute speeds for following transitions:
        { T1, T2}
 
ALGORITHM 5.3 - STEP 0
    The priority level is h=1
    The initial marking is: M0 = [180.00, 0.00 ]
 
ALGORITHM 5.3 - STEP 1
: Constraints
    The C2 constraint contains the balances for following places: C2 = { P2 }
    The C3 set contains only 0 values for transitions that must be computed:
        C3 = { v1=0.00, v2=0.00 }
    The C4 set is empty for transitions that must be computed
    The Tndc set is:   Tndc = { T1, T2 }
    The Twait set is:   Twait = { empty }
    The Tsby set is:   Tsby = { empty }
    End of step 1 bis. The Tndc set is:   Tndc = { T1, T2}
 
ALGORITHM 5.3 - STEP 2: Obtaining the TSF set and J1 by Algorithm 5.1:
 
  Algorithm 5.1 - Step 1
    TSF is equal with TSE:
    The TSF set is:   TSF = { T1 }
    The TPF set contains the following transitions:   TPF = { T2 }
    The set of not empty places is:   PNE = { P1 }
  Algorithm 5.1 - Step 2: Verifing if TPF set is empty
    The TPF set is not empty. We build the set of places that are input for each transitions in TPF
    The input places for transition T2 are: { P2 }
  Algorithm 5.1 - Step 3: Incrementation of k:   k = 2
    The set of places fed by the TSF set is: { P2 }
    The new set of places not empty is: PNE={ P1, P2 }
    The old and new PNE sets are not the same
  Algorithm 5.1 - Step 4.1 - Deleting the places in PNE from the Pj sets
    The new Pj sets are:
        For the T2 transition: { no places in Pj }
  Algorithm 5.1 - Step 4.2:
    The new TSF set is: TSF = { T1, T2 }
    The new TPF set is: TPF = { empty }
    TPF is empty
  Algorithm 5.1 - Step 5: The J1 criterion is: J1 = v1+v2
 
ALGORITHM 5.3 - STEP 3: Modifying C3 set.
    The new C3 set is: C3 = { empty }
 
ALGORITHM 5.3 - STEP 4: Solving the LPP ...
    From the LPP, the following speeds where obtained:
        { v1 = 3.00, v2 = 2.00 }
 
ALGORITHM 5.3 - STEP 5.1:
    Results of Step 5.1
        TSF = { T1, T2 }
        TPF = { empty }
        PNE= { P1, P2 }
        Mk = [ 180.00, 0.00 ]
 
ALGORITHM 5.3 - STEP 5.2
: Changing the C4 set
    The new C4 set is: C4(h+1) = { v1 =  3.00, v2 =  2.00 }
 
ALGORITHM 5.3 - STEP 6
: Changing the Tndc set
    Tndc set is: Tndc = {  }
    Twait set is: Twait = { empty }
 

END PASSAGE 1

 
ALGORITHM 5.3 - Step 7.1
 
  Algorithm 5.2 - Step 1: Building of TPF
    The new TPF set is: TPF = { empty }
    Checking if we have transitions that are in TPF and are not fireable
  Algorithm 5.2 - Step 2: Verifing if TPF set is empty
    The TPF set is empty
  Algorithm 5.2 - Step 5: Building of T(J2) set.
    The T(J2) set has the following elements: T(J2) = { empty }
    T(J) modification
    The T(J2) set has the following elements: T(J2) = { empty }
  Algorithm 5.2 - Step 6: J2 printing
    J2 = empty
 
ALGORITHM 5.3 - STEP 7.2
    The new priority level is h=2.
 
ALGORITHM 5.3 - STEP 7.3
    The old and new criteria are different
    The old and new criteria are not the same but Jh is empty
    Tndc has no new elements

ALGORITHM 5.3 - STEP 8.1
- Setting the instantaneous speed vector
  The speed vector is: V = [ 3, 2 ]

ALGORITHM 5.3 - STEP 9.2
- Computing the duration of the phase
  The balance for calculated speeds is: B = [ -1, 1 ]
  The phase duration is 180.00
  The new marking is:
      M1 = [ 0, 180 ]
  Places whose marking have been anulled are: P1,

$$$$$$$$$

        PHASE 1
        Initial marking for phase is: M0=[180, 0 ]
        The speed vector for the phase is: V=[3, 2 ]
        The phase duration is 180.000000
        Final marking for phase is: M1=[0+, 180 ]

$$$$$$$$$

=====================

PHASE 2


Algorithm 5.C - Step 1
Algorithm 5.C - Step 2
Algorithm 5.C - Step 3
Algorithm 5.C - Type 1
 


ALGORITHM 5.3

  We will compute speeds for following transitions:
        { T1, T2}
 
ALGORITHM 5.3 - STEP 0
    The priority level is h=1
    The initial marking is: M0 = [0+, 180.00 ]
 
ALGORITHM 5.3 - STEP 1
: Constraints
    The C2 constraint contains the balances for following places: C2 = { P1 }
    The C3 set contains only 0 values for transitions that must be computed:
        C3 = { v1=0.00, v2=0.00 }
    The C4 set is empty for transitions that must be computed
    The Tndc set is:   Tndc = { T1, T2 }
    The Twait set is:   Twait = { empty }
    The Tsby set is:   Tsby = { empty }
    End of step 1 bis. The Tndc set is:   Tndc = { T1, T2}
 
ALGORITHM 5.3 - STEP 2: Obtaining the TSF set and J1 by Algorithm 5.1:
 
  Algorithm 5.1 - Step 1
    TSF is equal with TSE:
    The TSF set is:   TSF = { T2 }
    The TPF set contains the following transitions:   TPF = { T1 }
    The set of not empty places is:   PNE = { P1, P2 }
  Algorithm 5.1 - Step 2: Verifing if TPF set is empty
    The TPF set is not empty. We build the set of places that are input for each transitions in TPF
    The input places for transition T1 are: { P1 }
  Algorithm 5.1 - Step 3: Incrementation of k:   k = 2
    The set of places fed by the TSF set is: { P1 }
    The new set of places not empty is: PNE={ P1, P2 }
  Algorithm 5.1 - Step 4.1 - Deleting the places in PNE from the Pj sets
    The new Pj sets are:
        For the T1 transition: { no places in Pj }
  Algorithm 5.1 - Step 4.2:
    The new TSF set is: TSF = { T1, T2 }
    The new TPF set is: TPF = { empty }
    TPF is empty
  Algorithm 5.1 - Step 5: The J1 criterion is: J1 = v1+v2
 
ALGORITHM 5.3 - STEP 3: Modifying C3 set.
    The new C3 set is: C3 = { empty }
 
ALGORITHM 5.3 - STEP 4: Solving the LPP ...
    From the LPP, the following speeds where obtained:
        { v1 = 2.00, v2 = 2.00 }
 
ALGORITHM 5.3 - STEP 5.1:
    Results of Step 5.1
        TSF = { T1, T2 }
        TPF = { empty }
        PNE= { P1, P2 }
        Mk = [ 0+, 180.00 ]
 
ALGORITHM 5.3 - STEP 5.2
: Changing the C4 set
    The new C4 set is: C4(h+1) = { v1 >=  2.00, v2 =  2.00 }
 
ALGORITHM 5.3 - STEP 6
: Changing the Tndc set
    Tndc set is: Tndc = { T1 }
    Twait set is: Twait = { empty }
 

END PASSAGE 1

 
ALGORITHM 5.3 - Step 7.1
 
  Algorithm 5.2 - Step 1: Building of TPF
    The new TPF set is: TPF = { empty }
    Checking if we have transitions that are in TPF and are not fireable
  Algorithm 5.2 - Step 2: Verifing if TPF set is empty
    The TPF set is empty
  Algorithm 5.2 - Step 5: Building of T(J2) set.
    The T(J2) set has the following elements: T(J2) = { T1 }
    T(J) modification
    The T(J2) set has the following elements: T(J2) = { T1 }
  Algorithm 5.2 - Step 6: J2 printing
    J2 = v1
 
ALGORITHM 5.3 - STEP 7.2
    The new priority level is h=2.
 
ALGORITHM 5.3 - STEP 7.3
    The old and new criteria are different
    The old and new criteria are not the same and Jh has elements
    OR the priority level is not grater than the maximum priority level
 
ALGORITHM 5.3 - STEP 3: Modifying C3 set.
    The new C3 set is: C3 = { empty }
 
ALGORITHM 5.3 - STEP 4: Solving the LPP ...
    From the LPP, the following speeds where obtained:
        { v1 = 2.00 }
 
ALGORITHM 5.3 - STEP 5.1:
    Results of Step 5.1
        TSF = { T1, T2 }
        TPF = { empty }
        PNE= { P1, P2 }
        Mk = [ 0+, 180.00 ]
 
ALGORITHM 5.3 - STEP 5.2
: Changing the C4 set
    The new C4 set is: C4(h+1) = { v1 >=  2.00, v2 =  2.00 }
 
ALGORITHM 5.3 - STEP 6
: Changing the Tndc set
    Tndc set is: Tndc = { T1 }
    Twait set is: Twait = { T1 }
    We have the same Tndc sets
 

END PASSAGE 2


ALGORITHM 5.3 - STEP 8.1
- Setting the instantaneous speed vector
  The speed vector is: V = [ 2, 2 ]

ALGORITHM 5.3 - STEP 9.2
- Computing the duration of the phase
  The balance for calculated speeds is: B = [ 0, 0 ]

$$$$$$$$$

        PHASE 2
        Initial marking for phase is: M1=[0+, 180 ]
        The speed vector for the phase is: V=[2, 2 ]
        The phase duration is infinite
        Final marking for phase is: M2=[0+, 180 ]

$$$$$$$$$
THIS IS THE LAST PHASE. ALL THE BALLANCES ARE NON-NEGATIVE


BREEF RESULTS:


================
  IB-state 1
      Initial state M(0) = [180, 0 ]
      The speed vector is V = [ 3, 2 ]
      The phase duration is 180.0000
      The final state for the phase is: M1 = [ 0+, 180 ]

================
  IB-state 2
      Initial state M(180) = [0+, 180 ]
      The speed vector is V = [ 2, 2 ]
      The phase duration is 0.0000
      The final state for the phase is: M2 = [ 0+, 180 ]