CN109145350B - Process analysis method based on queue logic Petri net - Google Patents
Process analysis method based on queue logic Petri net Download PDFInfo
- Publication number
- CN109145350B CN109145350B CN201810616589.6A CN201810616589A CN109145350B CN 109145350 B CN109145350 B CN 109145350B CN 201810616589 A CN201810616589 A CN 201810616589A CN 109145350 B CN109145350 B CN 109145350B
- Authority
- CN
- China
- Prior art keywords
- queue
- token
- time
- transition
- vehicle
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/10—Geometric CAD
- G06F30/18—Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Geometry (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Analysis (AREA)
- Computational Mathematics (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computer Hardware Design (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a process analysis method based on a queue logic Petri network, which belongs to the field of process analysis of the queue logic Petri network and specifically comprises the following steps: firstly, analyzing the fairness problem of a sharing system, and meanwhile, aiming at the defects of the existing Petri network in fairness modeling of the sharing system, adding a queue base, a queue transition and a time list to the Petri network and defining the Petri network as a queue logic Petri network; then modeling and analyzing the properties of the garage parking system by using a queue logic Petri network, analyzing the invariance and the utilization rate of the garage parking system according to the reachable sequence, and analyzing the important properties related to the garage parking system model; and finally, comparing the modeled system with the original sharing system to obtain the conclusion that the sharing system with the queue has effectiveness.
Description
Technical Field
The invention belongs to the field of process analysis of a queue logic Petri network, and particularly relates to a process analysis method based on the queue logic Petri network.
Background
A Petri net is a mathematical representation of a discrete parallel system, suitable for describing asynchronous, concurrent computer system models. The Petri network has both a strict mathematical expression mode and an intuitive graphic expression mode, has rich system description means and system behavior analysis technology, and provides a solid conceptual foundation for computer science. The Petri net is a special directed graph. It has two disjoint nodes, which are transitions and repositories respectively. The arcs from library to transition or from transition to library are relational arcs. The logic Petri Net (Logical Petri Net-LPN) is a high-level abstraction of the suppression arc PN and is provided with logic input and output transition and logic expression. The LPN can be used to model and analyze the shared system functions and propagation uncertainties in the system.
The Petri Net enables modeling of a shared system, and it is also an effective tool for analyzing system performance. Since the tokens are not distinguished in the existing Petri network, when a plurality of tokens are in the same place, the fairness of the tokens cannot be ensured. The traditional logical Petri network cannot describe the fairness of task scheduling of the shared system. Logic input and output transition and logic expressions in the existing logic Petri network can effectively describe logic relationships in a sharing system, but the sequence of tokens when the tokens enter a warehouse is not distinguished, and the fairness of the tokens cannot be guaranteed.
In garage parking systems, when the vehicle arrival rate is greater than the service rate, a waiting phenomenon occurs. The vehicle is served according to the arrival time, which is fair to the vehicle. Allocating parking spaces for vehicles based on a first come first serve feature may avoid that first come vehicles are unable to enter the parking garage. If a later arriving vehicle gets serviced earlier than a first arriving vehicle, this is not fair to the first arriving vehicle. At the same time, this will result in the first arriving vehicle not being able to be allocated to a parking space.
Disclosure of Invention
Aiming at the technical problems in the prior art, the invention provides a process analysis method based on a queue logic Petri net, which is reasonable in design, overcomes the defects of the prior art and has a good effect.
In order to achieve the purpose, the invention adopts the following technical scheme:
a process analysis method based on a queue logic Petri net comprises the following steps:
step 1: analyzing the fairness problem of the sharing system;
and 2, step: analyzing the fairness problem of the existing Petri network during modeling of a sharing system;
and step 3: adding a queue library, queue transition and a time list for the Petri network, and defining a queue logic Petri network;
and 4, step 4: modeling and analyzing the garage parking system by using a queue logic Petri network;
and 5: performing property analysis on the queue logic Petri net model;
and 6: and comparing the modeled system with the original sharing system to obtain the conclusion that the sharing system with the queue has effectiveness.
Preferably, in step 3, the Petri net is a special directed graph, which has two disjoint nodes, namely a transition and a place, and the arc from the place to the transition or from the transition to the place is a relational arc;
definition 1: n = (P, T, F) is a net, where:
(1) P is a finite set of libraries;
definition 2: input and output set: let x ∈ P ≦ T be any element of net N, where:
x = { y | (y, x) ∈ F is called the input set or front set of x;
x · = { y | (x, y) ∈ F } referred to as the output set or postset of x;
Definition 3: the quadruple Σ = (P, T, F, M) is called Petri net, if and only if:
(1) N = (P, T, F) is a pure net;
(2) P → N is an identification function, where M 0 Is an initial identification;
(3) Σ has the following transition-inducing rule:
a) For a transition T ∈ T, ifEnabling the transition t under the identifier M and recording as M [ t >;
b) If M [ t ] >, t can be triggered under the marker M, and a new marker M 'is generated after triggering, denoted as M [ t > M',
definition 4: logical Petri network LPN
LPN is a high-level abstraction of a constrained arc Petri net that can be used to simulate and analyze shared system functions;
let LPN = (P, T, F, I, O), LPN = (LN, M) be called a logical Petri net, if and only if:
p is a finite pool set;
(a)T D representing a classical Petri net transition;
(b)T I represents a set of logical input transitions of T, anT I All input libraries subjected to logical input expression f I The limit of (2);
(c)T O represents a set of logical output transitions of T, anT O All output banks are subjected to a logical output expression f O The limit of (2);
the transition triggering rules are:
b) To pairI(t)=f I If f is I I M =. T.,. T, satisfies logical expression f I If t is called as M enable; if t is enabled and t triggers under the flag M, a new flag->M'(p)=0,/>M’(p)=M(p)+1,/>M’(p)=M(p);
c) For is toO(t)=f O If->M (p) =1, then t is enabled at M; if t is enabled, t can be raised and, after raising at M, it evolves to a new flag->M’(p)=M(p)-1,/>M' (p) = M (p); and for t, should satisfy f O I M' =. T, i.e. T must satisfy the logical expression f at M O ;
Definition 5: queue logic Petri net QLPN
The queue logic Petri network is characterized in that a queue base, queue transition and a time list are added in the logic Petri network, and the queue base, the queue transition and the time list are used for describing a sharing system and solving the fairness problem of token in the sharing system, and the property of the system is analyzed according to the triggering time of the token when the transition is triggered;
let QLPN = (P, T, t.no, L, T) i (tok j ),P i (tok j ),F,L,I,O,Q,P rea ,P fro ,len,P len ,D tok ,A tok ,M)
(1) P is the finite pool set: wherein
(a)P p Is a classical finite library collection;
(b)P q is a finite queue library set;
(a)T D is a transition set of a classical Petri net;
(b)T I represents a logic input transition in a logical Petri net, andt all input banks are subjected to a logical expression f I The limit of (2);
(c)T O represents a set of logical output transitions, andt all output library subjected logic output expression f O Is/are as follows
Limiting;
(d) Tq represents a queue transition set, andqueue transition accepted queue input expression F q And queuing for the arriving token;
(3) No is the token's identity; the identification of each token is unique and is used for marking the token;
(4) L is a time list which comprises two columns, wherein L.no represents the identification of the token in the transition, and L.tim represents the triggering time of the token in the transition;
(5)t i (tok j ) Representing token at transition t i Initiation time of (2), when t i ∈T Q ,t i (tok j ) Token arrival t for identification j i Wherein i represents the code of the transition and j represents the code of token;
(6)P i (tok j ) Represents the time when the token arrives at the library, wherein i represents the code of the library and j represents the code of the token;
(11)P rea for the queue end of the queue library, after the queue transition is initiated, the token arrives at the queue library and is added to the queue end of the queue library;
(12)P fro for the head of the queue library, when the transition of the post set of the queue library is triggered, the token is deleted at the head of the queue library;
(13) len is the number of tokens that the queue can accommodate;
(14)P len the number of tokens contained in the queue library;
(15) D (tok) is a deleting function, and the token is deleted at the head of the queue in the queue library through the function;
(16) A (tok) is a token adding function, and when the queue transition is triggered, the token is added to the tail of the queue library through the A (tok) adding function;
(17) P → N is an identification function, where M O Is an initial identification;
(18) The fraction on the output arc represents the time elapsed from the token initiation to the token arrival at the library; in order to distinguish the weight, the elapsed time is represented by a decimal with a decimal point;
transition rules for QLPN
token rules for entry and exit to and from queue stores
When the queue transition is triggered, the token is added at the tail of the queue library; when the postset transition of the queue library is triggered, the token is deleted at the head of the queue library;
(1)this function is used to compute the tode in the queue pre-transition set libraryn, where k is ≧ 1,token (P) i ) Is front Collection Point p i The number of middle tokens, N is the weight of the input arc of queue transition, and N is the number of the front collection;
(4) When T is Q At the time of initiation, token is added to the tail of the queue library through a function A (tok) if m is less than or equal to len, and m is less than or equal to len>The len queue transition can only transfer len tokens, which arrive earlier than those that are not transferred;
(5) When in useP len -n>Transition at 0 can be initiated, P q Reducing n tokens, P len =P len -n, n is the weight of the arc output by the queue pool;
queue transition triggering rules
When a queue transition triggers, the following rules must be satisfied
(5) When P is len When =0, queue transition is triggered;
(6)T q it does not require tokens for each library at the time of initiation, and it is only and ifp∈·T q And P len =0;
(7) When a queue transition is initiated, the arrival time and identity of each token is stored in a list;
(8) When P is present i (tok i )=P i (tok n ),P i ∈·T q Randomly arranging the two tokens;
time list recording rules
When the token enters the QLPN, setting the identifier of the token, recording the time of the token reaching the queue logic petri net in a reaching library, and adding a record in a time list when the token is triggered in the transition, wherein the record comprises an L.no. and triggering time; when the token enters the next transition, the token is transferred to a time list of the next transition, and the token identifier is not released until the token disappears in the QLPN;
definition 6: token's fairness definition
In the QLPN, the triggering order of tokens is to queue according to the time of arrival at the queue, and the problem of long waiting time of a single token can be avoided in the QLPN;
P i (tok j ) Is the time at which token arrives at the library, when the queue transitions T q After initiation, and P i ∈·T q ,P i (tok j )<P i+1 (tok j+1 ) Token will arrive in order at the queue pool, and the tok in the queue pool j At tok j+1 The front edge of (1); if t ∈ P q · Transition t initiation is t (tok) j )<t(tok j ) This is fair to token.
Preferably, in step 4, the meanings of library transitions and expressions are introduced first; in this model P 11 ,P 12 ,P 23 And P 24 If the vehicle arrives at a garage place, the vehicle enters a parking system to prepare to be queued for storage; if the vehicle is a foreign vehicle, depot P 11 Or P 12 There is a token in it; if the vehicle is a vehicle in the cell, depot P 23 Or P 24 A token is in the middle; when a token enters a system, adding a time list in a waiting library; at t 11 And t 12 After the initiation, the external vehicle obtains a temporary parking card; if the queue library has a token, the newly arrived token must wait in the waiting library, and if the queue library has no waiting token and the waiting library has a token, the queue is enabled to be changed; after the queue transition is triggered, adding m tokens at the tail part of the queue by an adding function of a queue library; here, theThen P is len = m; if P is 8 And P q1 With token, then t 3 Enable, t 3 The triggering of (1) is to check the parking card, and delete token, P at the head of the queue through a deletion function in the queue library len =P len -1; if the parking card is valid, the vehicle waits for the gateOpening; p is 4 If there is token, then t 3 Enabling; if the parking card is invalid, the vehicle will leave the queue t 3 Initiating post-token entry into P 6 (ii) a If there are no parking spaces left in the garage, the vehicle cannot enter the garage, and the vehicle will leave the queue, P 8 Without token, transition t 3 Cannot be enabled, but t 5 Enabling;
according to the time in the garage parking system model, the identification and the state of the QLPN and the reachable sequence can be obtained, and the invariant and the utilization rate of the garage system can be analyzed according to the reachable sequence;
reachable sequence of a system
Obtaining a corresponding reachable sequence according to the sequence table; m represents status information, M (p) = (num, t.no, t) i (tok j ),P i (tok j ) Num represents the number of tokens in the library; no. denotes token's identity, P i (tok j ) Represented by tok j To P i Time of (t) i (tok j ) Represented by tok j At transition t i The initiation time of (1);
the state change time is the latest trigger time for token when the next state is reached; the property of the garage parking system can be obtained in the state table, and the property of the garage parking system is analyzed according to the reachable sequence;
M 0 [(1,1,0,1),(1,2,0,2,),0,0,(1,3,0,2),(1,4,0,4)0,0,0,0,0,0,0,n];
t 11 M 1 [0,(1,2,0,2),(1,1,1,1.5),0,(1,3,0,2),(1,4,0,4),0,0,0,0,0,0,0,n];
t 2 M 2 [0,(1,2,0,2),0,0,(1,3,0,2),(1,4,0,4),(1,1,1.5,1.5),0,0,0,0,0,0,n];
t 3 M 3 [0,(1,2,0,2),0,0,(1,3,0,2),(1,4,0,4),0,0(1,1,1.5,3.5),0,0,0,0,0,n];
t 2 M 4 [0,(1,2,0,2),0,0,0,(1,4,0,4),(1,3,2,2),0,0,0,0,0,0,n];
t 12 M 5 [0,0,0,(1,2,0,2.5),0(1,4,0,4),(1,3,2,2),(1,1,1.5,3.5),0,0,0,0,0,n];
t 2 M 6 [0,0,0,0,0,(1,4,0,4),(2,(3,2),(2,2.5),(2,2.5)),(1,1,1.5,3.5)0,0,0,0,0,n];
t 3 M 7 [0,0,0,0,0,(1,4,0,4),(1,2,2.5,2.5),(2,(1,3),(1.5,3.5),(3.5,5.5)),0,0,0,0,0,n-1];
t 4 M 8 [0,0,0,0,0,(1,4,0,4),(1,2,2.5,2.5),(1,3,3.5,5.5),(1,1,3.5,5),0,0,0,0,n-1];
t 2 M 9 [0,0,0,0,0,0,(2,(2,4),(2.5,4),(2.5,4)),(1,3,3.5,5.5),(1,1,3.5,5),0,0,0,0,n-1];
t 3 M 10 [0,0,0,0,0,0,(1,4,0,4),(2,(3,2),(3.5,5.5),(5.5,7.5)),(1,1,3.5,5),0,0,0,0,n-2];
t 4 M 11 [0,0,0,0,0,0,(1,4,0,4),(1,2,5.5,7.5),(2,(1,3),(3.5,5.5),(5,7))0,0,0,0,n-2];
t 3 M 12 [0,0,0,0,0,0,0,(1,2,5.5,7.5),(2,(1,3),(3.5,5.5),(5,7)),(1,4,7.5,9.5),0,0,0,n-3];
t 4 M 13 [0,0,0,0,0,0,0,0,(3,(,3,2),(3.5,5.5,7.5)(5,7,9)),(1,4,7.5,9.5),0,0,0,n-3];
t 5 M 14 [0,0,0,0,0,0,0,0,(3,(,3,2),(3.5,5.5,7.5)(5,7,9)),0,(1,4,9.5,11.5),0,0,n-3];
from vehicle ready-to-exit to vehicle exit garage
t 6 M 15 [0,0,0,0,0,0,0,0,(2,(3,2),(5.5,7.5),(7,9)),0,(1,4,9.5,11.5),(1,1,15,15),0,0,n-3];
t 6 M 16 [0,0,0,0,0,0,0,0,(1,2,7.5,9),0,(1,4,9.5,11.5),(1,3,20,20),(1,1,15,16),0,n-2];
t 6 M 17 [0,0,0,0,0,0,0,0,0,0,(1,4,9.5,11.5),(1,2,26,26),0,0,n-1];
t 7 M 18 [0,0,0,0,0,0,0,0,(2,(3,2),(5.5,7.5),(7,9)),0,(1,4,9.5,11.5),0,(1,1,15,16),n-2];
t 7 M 19 [0,0,0,0,0,0,0,0,(1,2,7.5,9),0,(1,4,9.5,11.5),0,(2,(1,3),(15,20),(16,21),n-1)];
t 7 M 20 [0,0,0,0,0,0,0,0,0,0,(1,4,9.5,11.5),0,(3,(1,2,3),(15,20,26),(16,21,27)),n];
Invariant quantity
Analyzing the invariant of the garage parking system according to the state table; in the state table, regardless of the state, P 5 ,P 4 And P 8 The number of tokens in (A) is n, and is expressed by an expression (P) 5 )+token(P 4 )+token(P 8 ) = n, wherein n is the number of parking spaces in the garage;
utilization ratio of garage
The utilization rate of the garage refers to the ratio of the number of vehicles in the garage to the number of parking spaces in the garage;
expressed as η = (token (P) 5 )+token(P 4 ))/n;
Wherein, token (P) 5 ) And token (P) 4 ) Are respectively a depot P 5 And P 4 Number of tokens (P) 5 )+token(P 4 ) Is the number of vehicles in the garage; n is the number of parking spaces in the garage;
the utilization rate of the garage in each state can be calculated through the QLPN state table.
Preferably, in step 5, the queue logic Petri net model is subjected to a property analysis, wherein:
analysis of properties
The properties of a garage parking system are analyzed from two different forms of arrival rates, depending on the characteristics of the parking system: one of which is random arrival and the second is arrival according to an exponent; in both forms the average waiting time of the vehicle, the stay time of the vehicle in the queue, and the number of waiting vehicles are analyzed.
Properties of garage parking systems with random arrival
The random arrival of the vehicles means that the random arrival of the vehicles does not follow any rule, and the properties of the garage parking system are analyzed under the condition of random arrival according to the model of the garage parking system created by the QLPN, wherein the properties comprise the average waiting time of the vehicles, the average staying time of the vehicles in a queue and the waiting number of the vehicles;
average waiting time of vehicle
The average waiting time of vehicles refers to the average waiting time from the time when a certain number of vehicles are ready to queue to get service; according to the model of the garage parking system, the waiting time of each vehicle can be calculated through the formula (1);
in the time list of the model, the time to get queued, represented in the model as token arrival depot P, and the time to get service can be obtained for each vehicle 2 The time that the vehicle gets serviced is the token at transition t 3 The initiation time of (1);
mean dwell time of the vehicle
When the vehicle is arriving freely, the average dwell time of the vehicle in the queue is the average dwell time of a certain number of vehicles in the queue; the stay time of the vehicle in the queue refers to the stay time of the vehicle in the queue from the arrival of the vehicle to the service, and is expressed by the formula (2) in the model:
obey to exponential arrival
The fact that the vehicles are subjected to the exponential arrival means that the time intervals of the arrival of two adjacent vehicles are subjected to exponential distribution; when the arrival rate of the vehicles is greater than the service rate, the vehicles form a queue when entering a garage, and after the queue is triggered by the queue transition in the model, a token forms a queue in a queue library; when the vehicles arrive at the system in a completely random manner, the adjacent arrival time intervals follow an exponential distribution, and formula (3) is a relational expression of the service rate μ, the time t, and the arrival rate λ;
f(t)=λe -λt (3);
wherein λ represents the number of arrival of vehicles per unit time;
the model analyzes the properties of the garage parking system under the condition of index arrival, including the average waiting number, the average waiting time and the average staying time of the vehicles;
average waiting time of vehicle
When the arrival rule follows the exponential distribution, calculating the average waiting time of the vehicle according to the formula (4);
average residence time of vehicle in queue
When the vehicle arrival rate obeys the exponential distribution, calculating the average staying time of the vehicle in the queue according to the formula (5);
average number of waiting vehicles
The average number of waiting vehicles is the average number of waiting vehicles in the queue at different moments, the garage parking system is analyzed through the characteristics of the queue, and the average number of waiting vehicles is calculated according to a formula (6);
the invention has the following beneficial technical effects:
the invention mainly solves the unfair problem of task scheduling in a sharing system, a queue is added in the sharing system, a QLPN based on the LPN is created to describe the sharing system with the queue, the QLPN uses a queue transition and a queue library to describe a queue part in the sharing system, the time caused by token in the transition is recorded in a time list, the time for scheduling the tasks of the sharing system can be recorded, the time for the tasks to reach different states can be described according to the time for the token to reach the library, the created queue logic Petri network not only can effectively model the sharing system, but also can analyze the invariants in the system according to the model, analyze the invariants in the system according to the reachable sequences and optimize the sharing system according to the properties.
Drawings
FIG. 1 is a schematic diagram of a queue logic Petri net.
Fig. 2 is a model schematic diagram of a queue logic Petri net of a garage parking system.
Fig. 3 is a sequence diagram of the accessibility of the garage parking system.
Fig. 4 is a diagram illustrating fairness verification for three different sharing systems.
FIG. 5 is a graph illustrating the average latency validation of three different sharing systems.
Detailed Description
The invention is described in further detail below with reference to the following figures and detailed description:
1. basic knowledge
1.1 garage parking system
With the acceleration of social rhythm, the production, operation and service modes of enterprises increasingly adopt a sharing mode. Thus, the sharing mode is used for various aspects of enterprise management. As the business environment and competitive pressure of enterprises adopt a sharing mode to realize resource sharing, the complementation of advantages becomes the necessity of enterprise development, and simultaneously, the quality and the efficiency of team work are improved. However, fairness in task scheduling is also very important for shared systems.
The wait phenomenon occurs when the demand of the demander is greater than the service provided by the provider. In this case, the fairness of task scheduling is very important for each task, which requires a good algorithm to handle the fairness of task scheduling. The fairness of task scheduling not only meets the fair scheduling of tasks, but also avoids the deadlock of the system. Among the resource scheduling studies, some are served by resource contention, but such contention often leads to deadlocks. Some scholars add priority to tasks, but in larger scale shared systems setting priority to tasks may result in an excessive load on the system. Other researchers have added stacks to the shared system, the nature of the stacks being first-come and last-served, which would result in the first task not being served if a new task is always coming, adding stacks to the task schedule of the shared system, unfair to the first-come task. In some papers, it has been proposed to add queues to shared systems. These papers do not give adequate tools for modeling fairness in shared systems.
1.2 petri net basic knowledge introduction
The definition for the petri nets is as follows:
the Petri net is a special directed graph. It has two disjoint nodes, which are transitions and repositories. The arcs from library to transition or from transition to library are relational arcs.
Definition 1: n = (P, T, F) is a net, where:
(1) P is a finite pool set;
Definition 2: input and output set: let x ∈ P ≡ T be any element of net N,
x = { y | (y, x) ∈ F the input set or front set called x
x · = { y | (x, y) ∈ F } an output set or postset called x
Definition 3: the quadruplet ∑ (= (P, T, F, M) is called Petri net [1] And if and only if:
(1) N = (P, T, F) is a net;
(2) P → N is an identification function, where M 0 Is an initial identification;
(3) Σ has the following transition-inducing rule:
a) For a transition T ∈ T, ifEnabling the transition t under the identifier M and recording as M [ t >;
b) If M [ t ] >, t can be triggered under the marker M, and a new marker M 'is generated after triggering, denoted as M [ t > M',
the logical Petri Net is defined as follows
LPN is a high-level abstraction of a constrained arc Petri net that can be used to simulate and analyze system sharing system functions. The following definition of a logical Petri Net comes from modeling and analyzing an e-commerce system using a Petri Net.
Definition 4: let LPN = (P, T, F, I, O), LPN = (LN, M) be called a logical Petri net, if and only if
(1) P is a finite set of libraries;
wherein:
(a)T D representing a classical Petri net transition;
(b)T I represents a set of logical input transitions of T, anT I All input libraries subjected to logical input expression f I (ii) a The limit of (2);
(c)T O represents a set of logical output transitions of T, anT O All output banks are subjected to a logical output expression f O The limit of (2);
(7) The transition triggering rules are:
b) For is toI(t)=f I If f is I L M =. T.,. T satisfies the logical expression f I If t is called as M enable; if t is enabled and t triggers under the flag M, evolution to a new flag +>M’(p)=M(p)+1,/>M’(p)=M(p);
c) To pairO(t)=f O If->M (p) =1, then t is enabled at M; if t is enabled, it can be raised, and t, after being raised at M, evolves to a new flag->And for t, should satisfy f O I M' =. T, i.e. T must satisfy the logical expression f at M O 。
2 queue logic Petri net
The queue logic Petri network is characterized in that a queue library place, queue transition and a time list are added in the logic Petri network, and the queue library place, the queue transition and the time list are used for describing a sharing system and solving the unfairness problem of a token in the sharing system, and the property of the system is analyzed according to the triggering time of the token when the transition is triggered.
2.1 queue logic Petri Net definition
Let QLPN = (P, T, t.no, L, T) i (tok j ),P i (tok j ),F,L,I,O,Q,P rea ,P fro ,len,P len ,D tok ,A tok ,M)
(1) P is the finite pool set: wherein
(a)P p Is a classical finite library set
(b)P q Is a finite queue pool
Wherein
(a)T D Is a transition set of a classic Petri net
(b)T I Represents a logic input transition in a logical Petri net, andt all input banks are subjected to a logical expression f I The limit of (2);
(c)T O represents a set of logical output transitions, andt all output library subjected logic output expression f O The limit of (2);
(3) No is the token's identification. The identity of each token is unique and is used to label the token.
(4) L is a time list which comprises two columns, wherein L.no represents the identification of the token in the transition, and L.tim represents the triggering time of the token in the transition;
(5)t i (tok j ) Represents the time the token triggers in the transition, when t i ∈T Q ,t i (tok j ) The time at which a token, identified as j, arrives at transition i, where i represents the code of the transition and j represents the code of the token.
(6)P i (tok j ) Represents the time at which the token arrives at the library, where i represents the code of the library and j represents the code of the token.
(11)P rea For the queue end of the queue library, after the queue transition is initiated, the token arrives at the queue library and is added to the queue end of the queue library;
(12)P fro for the head of the queue library, when the transition of the post set of the queue library is triggered, the token is deleted at the head of the queue library;
(13) len is the number of tokens a queue can accommodate
(14)P len The number of tokens contained in the queue library;
(15) D (tok) is a deletion function by which token is deleted at the head of queue in the queue library
(16) A (tok) is a token adding function, and when the queue transition is triggered, the token is added to the tail of the queue library through the A (tok) adding function;
(17) P → N is an identification function, where M O Is an initial identification;
(18) The fraction on the output arc represents the time elapsed from the token initiation to the token arrival at the library. To distinguish the weights, the elapsed time is expressed in decimal numbers.
2.2 Transition rules for QLPN
2.2.1 token rules for entry and exit to and from queue stores
These tokens are added at the end of the queue pool when queue transitions trigger. When a late set transition of a queue pool is initiated, the token is deleted at the head of the queue pool.
(1)This function is used to calculate the number of tokens in the pool before queue transitions, where k ≧ 1, or ≧ 1>token(P i ) Is a front Collection Point P i The number of middle tokens, N is the weight of the input arc of queue transition, and N is the number of the front collection base;
(6) When T is Q When initiating, if m is less than or equal to len, token is added to the tail of queue obtained by queue library through function A (tok), if m is less than or equal to len>The len queue transition can only transfer len tokens, which arrive earlier than those that are not transferred;
(7) When in useP len -n>The 0time transition can initiate, P q Reducing n tokens, P len =P len N, n is the weight of the arc output by the queue bank
(8) The queuing principle meets the condition that a user is served first, the characteristics have fairness for each task which arrives, and the phenomenon that the task which arrives for a long time cannot be served is avoided.
2.2.2 queue transition triggering rules
When a queue transition triggers, the following rules must be satisfied
(1) When P is len When =0, queue transition triggers
(2)T q It does not require tokens for each library at the time of initiation, and it is only and ifp∈·T q And P len =0;
(3) When a queue transition is initiated, the arrival time and identity of each token is stored in a list;
(4) When P is present i (tok i )=P k (tok n ),P i ∈·T q The two tokens are randomly arranged.
2.2.3 time List recording rules
When the token enters the QLPN, the token identifier is set, the time of the token reaching the queue logic petri net is recorded in the arrival library, and meanwhile, when the token is triggered in the transition, a record is added to the time list and comprises the L.no. and triggering time. Wherein the token's identity is unique and not allowed to be the same as the identities of other tokens, when a token enters the next transition, the identity is transferred to the next transition list, and the token's identity is not released until the token disappears in the QLPN.
Fairness definition for token
In QLPN, token's firing order is queued according to the time of arrival at the queue. The problem of long waiting times for a single token can be avoided in QLPN, and the following is the definition of fairness for tokens:
definition 6.P i (tok j ) Is the time at which token arrives at the library, when the queue transitions T q After initiation, and P i ∈·T q ,P i (tok j )<P i+1 (tok j+1 ) Token will arrive in order at the queue pool, and the tok in the queue pool j At tok j+1 The front edge of (c). If it is usedTransition t initiation is t (tok) j )<t(tok j ). This is fair for tokens.
FIG. 1 is a queue logic Petri Net. First, the meaning of each symbol and expression is described. P 1 ,P 2 ,P 3 ,P 4 And P 5 Is a classical library set, P q Is a queue depot, T q Is queue transition, t 1 Representative is the logic output transition, transition T q Queuing tokens in the queue-transiting front-set repository, P 1 ,P 2 And P 3 . Expression F Q =(P 1 ΔP 2 ΔP 3 ) Queue expressions, which must be satisfied when a queue transition arises. The expression means when T q When it occurs P 1 ,P 2 And P 3 At least one token.Is a logical output expression. This expression is expressed when a logic transition is initiated. The meaning of this expression is token into P 4 Or P 6 . In the time list, the first column represents the token's identifier and the second column represents the departure time. E.g. at T q The first row in the time list of (1) represents t.no =1 and t Tq (tok 1 ) And =1. The first column represents token 1 at transition T q The initiation time in (1). Token2 arrival at P 4 Time of (3) is 4.t is t 1 The fraction on the output arc represents the transition t from token 1 Time to arrival of p 4 Time of (d). If the number on the output arc is an integer then the weight is represented.
The following is the run of the model, with P being reached at time 1,token 1 At this moment P qlen =0 queue transition enable. T is q Post-initiation P q With token, while t 1 Enable, t 1 After initiation, the token enters the depot P 4 Or P 5 Because of t 1 The trigger must satisfy the logical output expression. Token2 and token3 enter P at 2time 2 And P 3 . Because of P qlen =0,T q And enabling. Since token2 and token3 arrive at the same time and are therefore randomly placed in the queue pool, P is initiated after a queue transition qlen =2,t 1 And enabling.
3 queue logic Pteri net modeling of garage parking system
FIG. 2 is a model of a queue logic Petri net for a garage parking system;
the process enters and exits the garage according to a queue mode, the queue logic Petri network can accurately describe the queue part of the sharing system, and the problem that the vehicle cannot be served after waiting for a long time can be avoided according to the rule.
The token initiation process of FIG. 2 is described below, with the meaning of each symbol first described. In this model P 11 ,P 12 And P 23 These are waiting stores, representing vehicles entering and exiting the garage parking system ready for queuing. If the vehicle is a foreign vehicle, the depot P 11 Or P 12 There is a token. If the vehicle is a vehicle in the community, the depot P 23 Or P 24 There is a token. And adding a time list into the warehouse while the token enters the system. At t 11 And t 12 After initiation, the foreign vehicle acquires a temporary parking card. If there is a token in the queue pool, the token must wait in the waiting pool, and if there is no waiting token in the queue pool and there is a token in the front set pool of queue transitions, the queue transitions are enabled. And after the queue transition is triggered, adding m tokens at the tail part of the queue obtained by the queue library through an adding function by the queue library. Here, theP len And (d) = m. If P is 8 And P q1 With token, then t 3 And enabling. t is t 3 The triggering of (1) is to check the parking card, and delete token, P at the head of the queue through a deletion function in the queue library len =P len -1. If the parking card is valid, the vehicle waits for the gate to open. P 4 In the token, t is 3 And enabling. If the parking card is invalid, the vehicle will leave the queue. t is t 3 Post-initiation token entry into P 6 . If no parking space is left in the garage, P is the parking space 8 Without a token, the vehicle will leave the queue if it cannot enter the garage. Transition t 3 Cannot be enabled, but t 5 Enabled, and then initiated.
The rate of arrival of vehicles in a garage parking system, the number of parking spaces in the garage, and the efficiency of service are all factors that affect the performance of the system. Herein we have analyzed the performance of garage parking systems at both free and exponential arrival rates by QLPN, while we have analyzed the invariants in the model and the garage utilization from the reachable sequence.
3.1 reachable sequences of the System
FIG. 3 is an achievable sequence for the garage parking system according to FIG. 2Table (7). And obtaining a corresponding reachable sequence according to the sequence table. M represents status information, M (p) = (num, t.no, t) i (tok j ),P i (tok j ) Num represents the number of tokens in the library; no. denotes the identity of the corresponding token, P i (tok j ) Represented by tok j To P i Time of (d), t i (tok j ) Represented by tok j At transition t i Initiation time of (1), e.g. P 4 (tok 1 )=3.5,t 4 (tok 3 ) And =5.5. The time of the vehicle arriving at the garage parking system is respectively as follows: p is 11 (tok 1 )=1,P 12 (tok 2 )=2,P 23 (tok 3 )=2,P 24 (tok 4 ) =4; the residence time of the vehicle 1 in the garage is 10 time units, the residence time of the vehicle 2 in the garage is 13 time units, the residence time of the vehicle 3 in the garage is 12 time units, and the residence time of the vehicle 3 in the garage is 17 time units.
From the time in the schedule of fig. 2, the following are the identities and states of QLPNs:
M 0 [(1,1,0,1),(1,2,0,2,),0,0,(1,3,0,2),(1,4,0,4)0,0,0,0,0,0,0,n];
t 11 M 1 [0,(1,2,0,2),(1,1,1,1.5),0,(1,3,0,2),(1,4,0,4),0,0,0,0,0,0,0,n];
t 2 M 2 [0,(1,2,0,2),0,0,(1,3,0,2),(1,4,0,4),(1,1,1.5,1.5),0,0,0,0,0,0,n];
t 3 M 3 [0,(1,2,0,2),0,0,(1,3,0,2),(1,4,0,4),0,0(1,1,1.5,3.5),0,0,0,0,0,n];
t 2 M 4 [0,(1,2,0,2),0,0,0,(1,4,0,4),(1,3,2,2),0,0,0,0,0,0,n];
t 12 M 5 [0,0,0,(1,2,0,2.5),0(1,4,0,4),(1,3,2,2),(1,1,1.5,3.5),0,0,0,0,0,n];
t 2 M 6 [0,0,0,0,0,(1,4,0,4),(2,(3,2),(2,2.5),(2,2.5)),(1,1,1.5,3.5)0,0,0,0,0,n];
t 3 M 7 [0,0,0,0,0,(1,4,0,4),(1,2,2.5,2.5),(2,(1,3),(1.5,3.5),(3.5,5.5)),0,0,0,0,0,n-1];
t 4 M 8 [0,0,0,0,0,(1,4,0,4),(1,2,2.5,2.5),(1,3,3.5,5.5),(1,1,3.5,5),0,0,0,0,n-1];
t 2 M 9 [0,0,0,0,0,0,(2,(2,4),(2.5,4),(2.5,4)),(1,3,3.5,5.5),(1,1,3.5,5),0,0,0,0,n-1];
t 3 M 10 [0,0,0,0,0,0,(1,4,0,4),(2,(3,2),(3.5,5.5),(5.5,7.5)),(1,1,3.5,5),0,0,0,0,n-2];
t 4 M 11 [0,0,0,0,0,0,(1,4,0,4),(1,2,5.5,7.5),(2,(1,3),(3.5,5.5),(5,7))0,0,0,0,n-2];
t 3 M 12 [0,0,0,0,0,0,0,(1,2,5.5,7.5),(2,(1,3),(3.5,5.5),(5,7)),(1,4,7.5,9.5),0,0,0,n-3];
t 4 M 13 [0,0,0,0,0,0,0,0,(3,(,3,2),(3.5,5.5,7.5)(5,7,9)),(1,4,7.5,9.5),0,0,0,n-3];
t 5 M 14 [0,0,0,0,0,0,0,0,(3,(,3,2),(3.5,5.5,7.5)(5,7,9)),0,(1,4,9.5,11.5),0,0,n-3];
preparation of a slave vehicle to leave the garage
t 6 M 15 [0,0,0,0,0,0,0,0,(2,(3,2),(5.5,7.5),(7,9)),0,(1,4,9.5,11.5),(1,1,15,15),0,0,n-3];
t 6 M 16 [0,0,0,0,0,0,0,0,(1,2,7.5,9),0,(1,4,9.5,11.5),(1,3,20,20),(1,1,15,16),0,n-2];
t 6 M 17 [0,0,0,0,0,0,0,0,0,0,(1,4,9.5,11.5),(1,2,26,26),0,0,n-1];
t 7 M 18 [0,0,0,0,0,0,0,0,(2,(3,2),(5.5,7.5),(7,9)),0,(1,4,9.5,11.5),0,(1,1,15,16),n-2];
t 7 M 19 [0,0,0,0,0,0,0,0,(1,2,7.5,9),0,(1,4,9.5,11.5),0,(2,(1,3),(15,20),(16,21),n-1)];
t 7 M 20 [0,0,0,0,0,0,0,0,0,0,(1,4,9.5,11.5),0,(3,(1,2,3),(15,20,26),(16,21,27)),n];
From the state of FIG. 3, a reachable sequence is obtained
The state change time is the latest trigger time for token when the next state is reached. Some properties of the garage parking system can be found in the status table. We next analyze the properties of the garage parking system according to the reachable sequence.
3.2 invariant
And analyzing the invariant of the garage parking system according to the state table. In the state table, regardless of the state, P 5 ,P 4 And P 8 The number of tokens in (1) is n, and is expressed by an expression (P) 5 )+token(P 4 )+token(P 8 ) = n, wherein n is the number of parking spaces in the garage.
3.3 utilization ratio of garage
The utilization rate of the garage is the ratio of the number of vehicles in the garage to the number of parking spaces in the garage, and is represented as eta = (token (P) 5 )+token(P 4 ) N) is calculated. Token (P) in expression 5 ) And token (P) 4 ) Showing a place P 5 And P 4 Number of tokens in (1), expression (token (P) 5 )+token(P 4 ) Is the number of vehicles in the garage. And N is the number of the parking spaces in the garage. The utilization rate of the garage in each state can be calculated through the QLPN state table.
4. Analysis of properties
Based on the characteristics of the parking system, we analyze the properties of the garage parking system from two different forms of arrival rates. One of which is random and the second is according to exponential. In both forms the average waiting time of the vehicle, the stay time of the vehicle in the queue, and the number of waiting vehicles are analyzed.
4.1 Properties of garage parking System with random arrival
The random arrival of the vehicle means that the random arrival of the vehicle does not follow any rule. The model of the garage parking system created from the QLPN analyzes some properties of the garage parking system in the case of random arrivals. Such as the waiting time of the vehicle, the dwell time of the vehicle in the queue.
4.1.1 average waiting time of vehicle
The average waiting time of a vehicle refers to the average waiting time from the time a certain number of vehicles are ready to queue to get served. According to the model of the garage parking system, the waiting time of the vehicle and the average waiting time of the vehicle can be calculated by the following formula:
TABLE 1 waiting time of vehicle
In the time list of the model, the time of each vehicle from the preparation of queuing and the service can be obtained, and the waiting time of each vehicle can be calculated by the equation (1). The waiting time of the vehicle 1 is 0, the waiting time of the vehicle 2 is 3, the waiting time of the vehicle 3 is 1.5, and the waiting time of the vehicle 4 is 3.5. The average waiting time for 4 vehicles was calculated to be 2 according to the formula.
4.1.2 mean dwell time of vehicle
When the vehicle is arriving freely, the average dwell time of the vehicle in the queue is the average time a certain number of vehicles are in the queue. The stay time of the vehicle in the queue refers to the stay time of the vehicle in the queue from the arrival of the vehicle to the service, and is expressed by the following formula in the model:
TABLE 2 vehicle dwell time in queue
Table 2 shows the time of entry and exit of the vehicles into and out of the queue, and the dwell time of each vehicle in the queue: the dwell time of the vehicle 1 is 2; the stop time of the vehicle 2 is 5, and the stop time of the vehicle 3 is 3.5. According to the formulaThe dwell time of the vehicle was calculated to be 3.5.
4.2 compliant exponential arrival
The fact that the vehicles are subjected to the exponential arrival means that the time intervals between the arrival of two adjacent vehicles are subjected to the exponential distribution. When the arrival rate of the vehicles is larger than the service rate, the vehicles form a queue when entering the garage, and after the queue is changed in the model, the token forms a queue in the queue garage. When the vehicles arrive at the system in a completely random manner, the adjacent arrival time intervals follow an exponential distribution, and the following formula is a relational expression of the service rate mu, the time t and the arrival rate lambda
f(t)=λe λt (3);
λ represents the number of arrivals of the vehicle per unit time, assuming λ =1. The following table describes the probability of the vehicle being greater than time t and less than time t.
TABLE 3 arrival Rate following exponential distribution
The model analyzes the properties of the garage parking system in the event of an exponential arrival, including the average number of waits for the vehicle, the average wait time, and the average dwell time of the vehicle. Let us assume that the average service time for a vehicle to enter the garage is 5time and the average service time for a vehicle to leave the garage is 4time. While the number of arriving vehicles follows a poisson distribution. Since the average service time for a vehicle entering the garage is 5time, the average service time for a vehicle leaving the garage is 4time. Assuming 60time is a unit of time, we can calculate a service rate of 12/unity when the vehicle enters the garage and a service rate of 14/unity when the vehicle leaves the garage.
QLPN is used to describe a shared system with queues, which is a mapping of the queues. The properties of QLPN are similar to those of queues. Thus, analysis of the nature of the shared system with queues can be combined with the queues.
4.2.1 average waiting time of vehicle
When the arrival rule follows the exponential distribution, the average waiting time of the vehicle is calculated. The average latency may be represented by the following equation:
the average waiting time for vehicles to enter and exit the garage at different arrival rates is calculated by equation (4), and is shown in the following table:
TABLE 4 average waiting time of vehicle
It can therefore be seen from the table that the higher the value of the arrival rate, the longer the vehicle waiting time. By analyzing the business process and the properties, the business process can be optimized. The service rate can be improved and the waiting time can be shortened.
4.2.2 average residence time of vehicle in queue
When the vehicle arrival rate follows the exponential distribution, the average stay time of the vehicle in the queue is calculated. The average residence time of the vehicle can be represented by the following formula
The average stay time of the vehicle in the queue when the vehicle enters and exits the garage is calculated by the formula (5) under different arrival rates of the vehicle, which is shown in the following table:
TABLE 5 dwell time of vehicles at different arrival rates
The model is used to analyze the average residence time of the vehicle in the fleet. But typical LPNs do not analyze these characteristics well. The higher the arrival rate, the longer the vehicle will stay in the queue.
4.2.3 average number of waiting vehicles
The average number of waiting vehicles is the average number of waiting vehicles before each vehicle is serviced in the fleet through which the garage parking system is characterized. The average number of waiting vehicles may be represented by the following formula:
at different arrival rates, we find the average number of waiting vehicles according to equation (6) as shown in the following table:
TABLE 6 average number of waiting vehicles at different arrival rates
From table 6, we can see that as the arrival rate increases, the average number of waiting vehicles also increases. A corresponding appropriate scheme is formulated, and the problem that the vehicle waits for a long time when entering or leaving the garage is solved.
If the garage parking system is described by the LPN, the queue portion of the shared system cannot be described. LPNs have difficulty accurately modeling and analyzing these properties. QLPN adds queue transitions and queue libraries on the LPN to describe the portion of the queue in the shared system. And the model created based on QLPN is able to analyze the properties of the shared system. By these properties, the system is tuned and optimized. For example, if the average waiting time of the vehicle is too long, we can improve the service efficiency to reduce the average waiting time of the vehicle. Meanwhile, adding the time list in the QLPN is beneficial to system performance analysis. By analyzing the garage parking system through the QLPN, the QLPN can be proven to be an effective tool for describing the queue sharing system. The effectiveness of the queue sharing system was demonstrated in the following comparative experiment.
4.3.1 fairness verification
The fairness of task scheduling in the improved shared system and the conventional shared system and the shared system with the stack is compared through three-dimensional graphics. The X-axis represents the vehicle number, the Y-axis represents the vehicle arrival time, and the Z-axis represents the service time of the vehicle. The red line represents the relationship between the vehicle code and the time of arrival and time of service for the improved shared system. The blue line is the relationship between vehicle code and arrival time and service time for a conventional shared system. The green line is the relationship between the vehicle code and the arrival time and service time of the stack sharing system. Overlapping means that there is the same service time and arrival time in this section.
As can be seen from fig. 4, in the conventional sharing system, the order of waiting for the tasks to be serviced is random, which may cause a certain task to wait for a long time. It can be seen from the blue line that some vehicles arrive earlier than others, but later than later arriving vehicles receive service. For example, vehicle 5 arrives earlier than vehicle 7, but later than the time vehicle 7 is served, which is unfair to vehicle 5. While the green line represents a shared system with a stack. In the figure we can see that the vehicle 2 waits for a long time. But since the improved shared with queue system has the characteristic of first come first served, the vehicles are served according to the arrival time, which is fair for each vehicle.
4.3.2 average latency verification
The following two-dimensional vector diagram compares the average latency of the improved shared system with the conventional shared system and with the shared system with the stack. The X-axis represents vehicle code and the Y-axis represents vehicle waiting time. We can get longer than the red line average time than the blue line average time.
Average latency validation for two different shared systems
In fig. 5, we can see that the waiting times of vehicles in three lines representing different sharing systems are different under the condition that the number of arriving vehicles at the same time is the same. The vehicle 5 waits for a long time in the conventional shared system. Because the improved sharing system is provided with queues, long waiting times of vehicles can be avoided. We can calculate the average latency of the conventional sharing system to be 11.9 units of time. While the average time to improve the shared system is 8.8 units of time. The average time of the shared system with queues is 11 units of time.
The queue sharing system is compared fairly with other types of sharing systems. By analyzing the waiting time of each vehicle, the shared system with queues in task scheduling proves to be fair.
Figure 5 shows the latency of different sharing systems. By analysis, it can be concluded that the shorter average latency is the queue sharing system. This may prove the fairness in task scheduling and the effectiveness of the shared system in terms of system optimization.
It is to be understood that the above description is not intended to limit the present invention, and the present invention is not limited to the above examples, and those skilled in the art may make modifications, alterations, additions or substitutions within the spirit and scope of the present invention.
Claims (2)
1. A process analysis method based on a queue logic Petri net is characterized by comprising the following steps: the method comprises the following steps:
step 1: analyzing the fairness problem of the sharing system;
step 2: analyzing the fairness problem of the existing Petri network during modeling of a sharing system;
and step 3: adding a queue library, queue transition and a time list for the Petri network, and defining a queue logic Petri network;
and 4, step 4: modeling the garage parking system of the community by using a queue logic Petri network and carrying out property analysis;
and 5: analyzing the properties of the garage parking system;
step 6: comparing the modeled system with the original sharing system to obtain the conclusion that the sharing system with the queue has effectiveness;
in step 3, the Petri net is a special directed graph, and has two disjoint nodes, namely a transition and a place, wherein the arcs from the place to the transition or from the transition to the place are relational arcs;
definition 1: n = (P, T, F) is a net, where:
(1) P is a finite set of libraries;
definition 2: input and output set: let x ∈ P ≦ T be any element of net N, where:
x = { y | (y, x) ∈ F is called the input set or front set of x;
x · = { y | (x, y) ∈ F } refers to the output set or postset of x;
Definition 3: the quadruplet Σ = (P, T, F, M) is called Petri net, if and only if:
(1) N = (P, T, F) is a net;
(2) P → N is an identification function, where M 0 Is an initial identification;
(3) Σ has the following transition-inducing rule:
a) For a transition T ∈ T, ifEnabling the transition t under the identifier M and recording as M [ t >;
b) If M [ t ] >, t can be triggered under the marker M, and a new marker M 'is generated after triggering, denoted as M [ t > M',
definition 4: logical Petri network LPN
LPN is a high-level abstraction of a constrained arc Petri net that can be used to model and analyze shared system functions;
let LPN = (P, T, F, I, O), LPN = (LN, M) be called a logical Petri net, if and only if:
p is a finite pool set;
(a)T D representing a classic Petri network transition;
(b)T I represents a set of logical input transitions of T, anT I All input libraries subjected to logical input expression f I The limit of (2);
(c)T O represents a set of logical output transitions of T, anT O All output banks are subjected to a logical output expression f O The limit of (2); />
the transition triggering rules are:
b) To pairI(t)=f I If f is I L M =. T.,. T satisfies the logical expression f I If t is called as M enable; if t is enabled and t triggers under the flag M, a new flag->
c) To pairO(t)=f O If->M (p) =1, then t is enabled at M; if t is enabled, then t can be initiated, and after t is initiated at M,evolves to a new flag->And for t, should satisfy f O |M ’ = T, i.e. t.at M ’ Must satisfy the logical expression f O ;
Definition 5: queue logic Petri net QLPN
The queue logic Petri network is characterized in that a queue base, queue transition and a time list are added in the logic Petri network, and the queue base, the queue transition and the time list are used for describing a sharing system and solving the fairness problem of token in the sharing system, and the property of the system is analyzed according to the triggering time of the token when the transition is triggered;
let QLPN = (P, T, t.no, L, T) i (tok j ),P i (tok j ),F,L,I,O,Q,P rea ,P fro ,len,P len ,D tok ,A tok ,M)
(1) P is the finite pool set: wherein
(a)P p Is a classical finite library collection;
(b)P q is a finite queue library set;
(a)T D is a transition set of a classical Petri net;
(b)T I represents logical input transitions in a logical Petri net, ant all input banks are subjected to a logical expression f I The limit of (2);
(c)T O represents a set of logical output transitions, andt all output library subjected logic output expression f O The limit of (2);
(d) Tq represents a queue transition set, andqueue transition accepted queue input expression F q And queuing for the arriving token;
(3) No is the token's identity; the token's identity is unique and used to label the token;
(4) L is a time list comprising two columns, where l.no represents the token's identity and l.tim represents the trigger time of the token in the transition;
(5)t i (tok j ) Representing token at transition t i Initiation time of (2), when t i ∈T Q ,t i (tok j ) Token arrival t for identification j i Wherein i represents the code of the transition and j represents the code of token;
(6)P i (tok j ) Represents the time when the token arrives at the library, wherein i represents the code of the library and j represents the code of the token;
(11)P rea for the queue end of the queue library, after the queue transition is initiated, the token arrives at the queue library and is added to the queue end of the queue library;
(12)P fro for the head of the queue in the queue library, when the change of the rear set in the queue library is triggered, the token is deleted at the head of the queue in the queue library;
(13) len is the number of tokens that the queue can accommodate;
(14)P len the number of tokens contained in the queue library;
(15) D (tok) is a deleting function, and token is deleted at the head of the queue in the queue library through the deleting function;
(16) A (tok) is a token adding function, and when the queue transition is triggered, the token is added to the tail of the queue library through the A (tok) adding function;
(17) P → N is an identification function, where M O Is an initial identification;
(18) The fraction on the output arc represents the time elapsed from the token initiation to the token arrival at the library; in order to distinguish the weights, the elapsed time is expressed by a decimal number;
transition rules for QLPN
token rules for entry and exit to and from queue stores
When the queue transition triggers, token is added at the tail of the queue library; when a late set transition of a queue pool fires,
deleting the queue head of the token in the queue library;
(1)this function is used to calculate the number of tokens in the queue pre-transition set library, where k ≧ 1,token (P) i ) Is a front Collection Point P i The number of middle tokens, N is the weight of the input arc of queue transition, and N is the number of the front collection;
(2) When T is Q On initiation, if m ≦ len, token is added to the tail of the queue pool via function A (tok), e.g.Fruit m>The len queue transition can only transfer len tokens, which arrive earlier than those that are not transferred;
(3) When in useP len -n>Transition at 0 can be initiated, P q Reducing n tokens, P len =P len -n, n is the weight of the arc output by the queue pool;
queue transition triggering rules
When a queue transition triggers, the following rules must be satisfied
(1) When P is len When =0, queue transition is triggered;
(2)T q it does not require tokens for each library at the time of initiation, and it is only and ifp∈·T q And P len =0;
(3) When a queue transition is initiated, the arrival time and identity of each token is stored in a time list;
(4) When P is present i (tok i )=P i (tok n ),P i ∈·T q Randomly arranging the two tokens;
time list recording rules
When the token enters the QLPN, setting the identifier of the token, recording the time of the token reaching the queue logic petri net in a reaching library, and adding a record in a time list when the token is triggered in the transition, wherein the record comprises an L.no. and triggering time; when the token enters the next transition, the token is transferred to a time list of the next transition, and the token identifier is not released until the token disappears in the QLPN;
definition 6: token's fairness definition
In the QLPN, the triggering order of tokens is to queue according to the time of arrival at the queue, and the problem of long waiting time of a single token can be avoided in the QLPN;
P i (tok j ) Is the time at which token arrives at the library, when the queue transitions T q After initiation, and P i ∈·T q ,P i (tok j )<P i+1 (tok j+1 ) Token will arrive in order at the queue pool, and the tok in the queue pool j At tok j+1 The front edge of (1); if t ∈ P q · Transition t initiation is t (tok) j )<t(tok j ) This is fair for tokens;
in step 4, the meaning of library transition and expression is introduced first; in this model P 11 ,P 12 ,P 23 And P 24 If the vehicle arrives at a garage place, the vehicle enters a parking system to prepare to be queued for storage; if the vehicle is a foreign vehicle, the depot P 11 Or P 12 There is a token in it; if the vehicle is a vehicle in the community, the depot P 23 Or P 24 A token is in the middle; when a token enters a system, adding a time list in a waiting library; at t 11 And t 12 After the initiation, the external vehicle obtains a temporary parking card; if the queue library has a token, the newly arrived token must wait in the waiting library, and if the queue library has no waiting token and the waiting library has a token, the queue is enabled to be changed; after the queue transition is triggered, adding m tokens at the tail part of the queue through an adding function by a queue library; here, theThen P is len = m; if P 8 And P q1 With token, then t 3 Enable, t 3 Is to check the parking card and delete token, P at the head of the queue through a deletion function in the queue library len =P len -1; if the parking card is valid, the vehicle waits for the gate to open; p 4 In the presence of token, then t 3 Enabling; if the parking card is invalid, the vehicle will leave the queue t 3 Post-initiation token entry into P 6 (ii) a If there are no parking spaces left in the garage, the vehicle cannot enter the garage, and the vehicle will leave the queue, P 8 In the absence of token, transition t 3 Cannot be enabled, but t 5 Enabling;
according to the time in the garage parking system model, the identification and the state of the QLPN and the reachable sequence can be obtained, and the invariant and the utilization rate of the garage system can be analyzed according to the reachable sequence;
reachable sequence of a system
Obtaining a corresponding reachable sequence according to the sequence table; m represents status information, M (p) = (num, t.no, t) i (tok j ),P i (tok j ) Num represents the number of tokens in the library; no. denotes token's identity, P i (tok j ) Represented by tok j To P i Time of (t) i (tok j ) Represented by tok j At transition t i The initiation time of (1);
the state change time is the latest trigger time for token when the next state is reached; the property of the garage parking system can be obtained in the state table, and the property of the garage parking system is analyzed according to the reachable sequence;
M 0 [(1,1,0,1),(1,2,0,2,),0,0,(1,3,0,2),(1,4,0,4)0,0,0,0,0,0,0,n];
t 11 M 1 [0,(1,2,0,2),(1,1,1,1.5),0,(1,3,0,2),(1,4,0,4),0,0,0,0,0,0,0,n];
t 2 M 2 [0,(1,2,0,2),0,0,(1,3,0,2),(1,4,0,4),(1,1,1.5,1.5),0,0,0,0,0,0,n];
t 3 M 3 [0,(1,2,0,2),0,0,(1,3,0,2),(1,4,0,4),0,0(1,1,1.5,3.5),0,0,0,0,0,n];
t 2 M 4 [0,(1,2,0,2),0,0,0,(1,4,0,4),(1,3,2,2),0,0,0,0,0,0,n];
t 12 M 5 [0,0,0,(1,2,0,2.5),0(1,4,0,4),(1,3,2,2),(1,1,1.5,3.5),0,0,0,0,0,n];
t 2 M 6 [0,0,0,0,0,(1,4,0,4),(2,(3,2),(2,2.5),(2,2.5)),(1,1,1.5,3.5)0,0,0,0,0,n];
t 3 M 7 [0,0,0,0,0,(1,4,0,4),(1,2,2.5,2.5),(2,(1,3),(1.5,3.5),(3.5,5.5)),0,0,0,0,0,n-1];
t 4 M 8 [0,0,0,0,0,(1,4,0,4),(1,2,2.5,2.5),(1,3,3.5,5.5),(1,1,3.5,5),0,0,0,0,n-1];
t 2 M 9 [0,0,0,0,0,0,(2,(2,4),(2.5,4),(2.5,4)),(1,3,3.5,5.5),(1,1,3.5,5),0,0,0,0,n-1];
t 3 M 10 [0,0,0,0,0,0,(1,4,0,4),(2,(3,2),(3.5,5.5),(5.5,7.5)),(1,1,3.5,5),0,0,0,0,n-2];
t 4 M 11 [0,0,0,0,0,0,(1,4,0,4),(1,2,5.5,7.5),(2,(1,3),(3.5,5.5),(5,7))0,0,0,0,n-2];
t 3 M 12 [0,0,0,0,0,0,0,(1,2,5.5,7.5),(2,(1,3),(3.5,5.5),(5,7)),(1,4,7.5,9.5),0,0,0,n-3];
t 4 M 13 [0,0,0,0,0,0,0,0,(3,(,3,2),(3.5,5.5,7.5)(5,7,9)),(1,4,7.5,9.5),0,0,0,n-3];
t 5 M 14 [0,0,0,0,0,0,0,0,(3,(,3,2),(3.5,5.5,7.5)(5,7,9)),0,(1,4,9.5,11.5),0,0,n-3];
from ready-to-leave vehicle to vehicle-leaving garage
t 6 M 15 [0,0,0,0,0,0,0,0,(2,(3,2),(5.5,7.5),(7,9)),0,(1,4,9.5,11.5),(1,1,15,15),0,0,n-3];
t 6 M 16 [0,0,0,0,0,0,0,0,(1,2,7.5,9),0,(1,4,9.5,11.5),(1,3,20,20),(1,1,15,16),0,n-2];
t 6 M 17 [0,0,0,0,0,0,0,0,0,0,(1,4,9.5,11.5),(1,2,26,26),0,0,n-1];
t 7 M 18 [0,0,0,0,0,0,0,0,(2,(3,2),(5.5,7.5),(7,9)),0,(1,4,9.5,11.5),0,(1,1,15,16),n-2];
t 7 M 19 [0,0,0,0,0,0,0,0,(1,2,7.5,9),0,(1,4,9.5,11.5),0,(2,(1,3),(15,20),(16,21),n-1)];
t 7 M 20 [0,0,0,0,0,0,0,0,0,0,(1,4,9.5,11.5),0,(3,(1,2,3),(15,20,26),(16,21,27)),n];
Invariant quantity
Analyzing the invariant of the garage parking system according to the state table; in the state table, regardless of the state, P 5 ,P 4 And P 8 The number of tokens in (1) is n, and is expressed by an expression (P) 5 )+token(P 4 )+token(P 8 ) = n, wherein n is the number of parking spaces in the garage;
utilization ratio of garage
The utilization rate of the garage refers to the ratio of the number of vehicles in the garage to the number of parking spaces in the garage;
expressed as η = (token (P) 5 )+token(P 4 ))/n;
Wherein, token (P) 5 ) And token (P) 4 ) Are respectively a depot P 5 And P 4 Number of tokens (P) 5 )+token(P 4 ) Is the number of vehicles in the garage; n is the number of parking spaces in the garage;
the utilization rate of the garage in each state can be calculated through the QLPN state table.
2. The queue logic Petri Net based process analytic method of claim 1, wherein: in step 5, performing a property analysis on the queue logic Petri net model, wherein:
analysis of properties
The properties of a garage parking system are analyzed from two different forms of arrival rates, depending on the characteristics of the parking system: one of which is random arrival and the second is exponential arrival; the average waiting time of the vehicle, the stay time of the vehicle in the queue and the waiting number of the vehicle are analyzed in the two forms;
properties of garage parking systems with random arrival
The random arrival of the vehicles means that the random arrival of the vehicles does not follow any rule, and the properties of the garage parking system are analyzed under the condition of random arrival according to the model of the garage parking system created by the QLPN, wherein the properties comprise the average waiting time of the vehicles, the average staying time of the vehicles in a queue and the waiting number of the vehicles;
average waiting time of vehicle
The average waiting time of a vehicle refers to the average waiting time from the time a certain number of vehicles are ready to queue to get service; according to the model of the garage parking system, the waiting time of each vehicle can be calculated through the formula (1);
in the time list of the model, the time each vehicle is ready to queue and the time it is served can be obtained, which is represented in the model as token arrival depot P 2 The time that the vehicle is serviced is the token at the transition t 3 The initiation time of (1);
mean dwell time of the vehicle
When the vehicle is arriving freely, the average dwell time of the vehicle in the queue is the average dwell time of a certain number of vehicles in the queue; the stay time of the vehicle in the queue refers to the time from the arrival of the vehicle to the service, and the stay time of the vehicle in the queue in the model is represented by the formula (2):
obey to exponential arrival
The fact that the vehicles are subjected to the exponential arrival means that the time intervals of the arrival of two adjacent vehicles are subjected to exponential distribution; when the arrival rate of the vehicles is greater than the service rate, the vehicles form a queue when entering a garage, and after the queue is triggered by the queue transition in the model, a token forms a queue in a queue library; when the vehicles arrive at the system in a completely random manner, the adjacent arrival time intervals follow an exponential distribution, and formula (3) is a relational expression of the service rate μ, the time t, and the arrival rate λ;
f(t)=λe -λt (3);
wherein λ represents the number of arrival of vehicles per unit time;
the model analyzes the properties of the garage parking system under the condition of index arrival, including the average waiting number, the average waiting time and the average staying time of the vehicles;
average waiting time of vehicle
When the arrival rule follows the exponential distribution, calculating the average waiting time of the vehicle according to the formula (4);
average residence time of vehicle in queue
When the vehicle arrival rate obeys the exponential distribution, calculating the average staying time of the vehicle in the queue according to the formula (5);
average number of waiting vehicles
The average number of waiting vehicles is the average number of waiting vehicles in the queue at different moments, the garage parking system is analyzed through the characteristics of the queue, and the average number of waiting vehicles is calculated according to a formula (6);
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810616589.6A CN109145350B (en) | 2018-06-15 | 2018-06-15 | Process analysis method based on queue logic Petri net |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810616589.6A CN109145350B (en) | 2018-06-15 | 2018-06-15 | Process analysis method based on queue logic Petri net |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109145350A CN109145350A (en) | 2019-01-04 |
CN109145350B true CN109145350B (en) | 2023-04-07 |
Family
ID=64802047
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810616589.6A Active CN109145350B (en) | 2018-06-15 | 2018-06-15 | Process analysis method based on queue logic Petri net |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109145350B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110033125B (en) * | 2019-03-14 | 2023-04-18 | 山东科技大学 | Service flow analysis method based on fuzzy logic Petri network |
CN112905151B (en) * | 2021-03-23 | 2022-10-25 | 广东工业大学 | Rapid creation method for multi-sensing channel fusion virtual experiment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103632005A (en) * | 2013-12-04 | 2014-03-12 | 中国航空综合技术研究所 | Task reliability modeling method for failure reconfiguration process of dynamic reconfiguration system |
CN108090720A (en) * | 2017-12-07 | 2018-05-29 | 山东科技大学 | A kind of process analysis method based on type petri nets |
-
2018
- 2018-06-15 CN CN201810616589.6A patent/CN109145350B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103632005A (en) * | 2013-12-04 | 2014-03-12 | 中国航空综合技术研究所 | Task reliability modeling method for failure reconfiguration process of dynamic reconfiguration system |
CN108090720A (en) * | 2017-12-07 | 2018-05-29 | 山东科技大学 | A kind of process analysis method based on type petri nets |
Non-Patent Citations (1)
Title |
---|
基于逻辑数据Perti网的业务过程建模与分析;王聘 等;《计算机集成制造系统》;20170531;第921-930页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109145350A (en) | 2019-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Sha et al. | A multi-objective PSO for job-shop scheduling problems | |
Ferreira et al. | Statistical queuing theory with some applications | |
CN109885397B (en) | Delay optimization load task migration algorithm in edge computing environment | |
CN103858103B (en) | For resource management and the method and system of resource allocation | |
CN109145350B (en) | Process analysis method based on queue logic Petri net | |
CN106020941A (en) | Selecting Resource Allocation Policies and Resolving Resource Conflicts | |
WO2021043057A1 (en) | Task allocation method and apparatus, and readable storage medium and terminal device | |
CN109408229A (en) | A kind of dispatching method and device | |
CN109857535A (en) | The implementation method and device of task priority control towards Spark JDBC | |
CN108170523B (en) | Random task sequence scheduling method for mobile cloud computing | |
CN111414961A (en) | Task parallel-based fine-grained distributed deep forest training method | |
CN111061565A (en) | Two-stage pipeline task scheduling method and system in Spark environment | |
CN110795469A (en) | Spark-based high-dimensional sequence data similarity query method and system | |
Cao et al. | A MapReduce-based architecture for rule matching in production system | |
CN111831421B (en) | Task allocation method and terminal equipment | |
CN108595251A (en) | Dynamic Graph update method, device, storage engines interface and program medium | |
Kianfar et al. | New dispatching rules to minimize rejection and tardiness costs in a dynamic flexible flow shop | |
CN110058942B (en) | Resource allocation system and method based on analytic hierarchy process | |
CN106897199A (en) | A kind of batch job running time prediction method that framework common characteristic is processed based on big data | |
Liu et al. | Business process modeling and analysis based on queue logical Petri nets | |
CN110941767A (en) | Network community detection countermeasure enhancement method based on multi-similarity integration | |
CN106484868B (en) | Data reordering method and data collator based on LIMIT semanteme | |
CN109962861A (en) | A kind of message statistical method and device | |
CN116050189B (en) | Traffic deduction simulation experiment method, system, terminal and storage medium | |
Sung et al. | Determination of automated storage/retrieval system size |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |