## 3 Testing in QPME Tool
### Simulation Model  
The SG model is shown in Figure 2. SG is represented in the model by a set of places (\(\mathit{Res}\) and \(\mathit{Stream}\)), queueing place (\(\mathit{Users}\)), and immediate transition \(\mathit{Generator}\) (All transition cases of the model are shown in Table 1). Table 2 provides details on the places used in the model. Requests and resources are modeled by tokens of different colors. _Users_ generates tokens of user requests \(u1\) and \(u2\) at the given rate. \(\mathit{Res}\) generates different available resources as \(r1\) or \(r2\) tokens. Every request goes to the system. After acquiring a resource \(r1\) or \(r2\) from the \(Res\) place, the requests are placed into the \(Stream\) place of the model. The \(Stream\) place consists of \(r1u1\), \(r1u2\), \(r2u1\), and \(r2u2\) tokens. In Table 1 we concentrate only on the \(Stream\) place and generated new tokens. Table 3 defines the token colors that we use. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Transition** & **Mode** & **Action** \\ \hline \(Generator\) & \(mode_{1}\) & \(\begin{array}{c}\text{input}\{u1\}\longrightarrow\text{output}\{u1r1\}\\ \text{input}\{r1\}\longrightarrow\text{output}\{u1r1\}\end{array}\) \\ \hline \(Generator\) & \(mode_{2}\) & \(\begin{array}{c}\text{input}\{u1\}\longrightarrow\text{output}\{u1r2\}\\ \text{input}\{r2\}\longrightarrow\text{output}\{u1r2\}\end{array}\) \\ \hline \(Generator\) & \(mode_{3}\) & \(\begin{array}{c}\text{input}\{u2\}\longrightarrow\text{output}\{u2r1\}\\ \text{input}\{r1\}\longrightarrow\text{output}\{u2r1\}\end{array}\) \\ \hline \(Generator\) & \(mode_{4}\) & \(\begin{array}{c}\text{input}\{u2\}\longrightarrow\text{output}\{u2r2\}\\ \text{input}\{r2\}\longrightarrow\text{output}\{u2r2\}\end{array}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Firing modes of \(Generator\) transition. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Place** & **Token** & **Queue** & **Description** \\ \hline \(Users\) & \(\{u1,u2\}\) & \(-/M/\infty/IS\) & \begin{tabular}[]{c} Queueing place used to model \\ concurrent clients. \\ \end{tabular} \\ \hline \(Res\) & \(\{r1,r2\}\) & null & \
\begin{tabular}[]{c} Ordinary place used to model \\ resource. \\ \end{tabular} \\ \hline \(Stream\) & \(\{u1r1,u1r2\), \(u2r1,u2r2\}\) & null &
\begin{tabular}[]{c} Ordinary place used to model \\ the generated stream. \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Places used in the model. Figure 2: SG model. The used queue is described by Kendall notation (\(A/B/K/L\)), where \(A\) denotes the probability distribution function that specifies the interarrival time of tokens (\(-\)means different requests interarrival time), \(B\) is the probability distribution function of a service time (\(M\) means exponential (Markovian) distribution of the request service time), \(K\) determines the maximum number of requests that can arrive in a queue (in this case, it is \(\infty\)) and \(L\)-scheduling strategy (in this case, it is the infinite server). _Users_ has an infinite server queue with an initial population of request tokens. The transition _Generator_ is configured to fire these tokens into the system (modeled as _Stream_ place). Firing the _Generator_ transition (Figure 3) creates a token in the _Stream_ place, assigns one of the resources to one of the users. _Stream_ is an ordinary place that contains the resulting stream of the mean token population. The method used to model restrictions of the user/resource mapping involves the appropriate selection of firing weights (Figure 4). In this model, _Stream_ tokens are generated based on this value. We assign different firing weights to the prepared modes of these transitions so that they have various probabilities of being fired when multiples of them are enabled at the same time. We use the notation (3) to denote firing modes (Table 1) (The symbols \(input\) and \(output\) are used here to refer to the input and output places of transitions, respectively).