# Model Predictive Control for Flexible Job Shop Scheduling in Industry 4.0 +
## 3 Model Generation
### Generation of the Discrete Time Petri Net Model
After this multiplications a state \(x^{s}\) is reached in which only entries corresponding to places without independent output transitions are marked, i.e., idle places \(P_{(\ldots,0,I)}\), buffer places \(P_{(\ldots,B)}\) and completion places \(P_{(0,\tau,\zeta)}\). Therefore, the diagonal entries corresponding to them are left unchanged and no entries are added to the respective columns in the process of generating the matrix \(A\) form the Petri Net. Multiplying the resulting vector \(x^{s}\) with \(A\) once again does not change those entries in \(x^{s}\) any more. This holds for all production sequences and the system ultimately enters a steady state with \(x^{s}=Ax^{s}\). * To proof this property we have to analyze the input places that correspond to the starting transitions \(T_{(\cdot,\tau^{\prime},J,S)}\) of the investigated operation \(O=(\tau^{\prime},J)\). Those all have the necessity place \(P_{(0,\tau^{\prime},J,N)}\) and the completion places \(P_{(0,\tau^{\prime\prime},J,C)}\) of all \(\tau^{\prime\prime}\in\mathcal{T}_{\tau^{\prime}}\) as common input places. \(P_{(0,\tau^{\prime},J,N)}\) will remain marked until one of the starting transition was fired and task \(\tau^{\prime}\) was executed. The places \(P_{(0,\tau^{\prime\prime},J,C)}\) will remain marked due to property (P6). For each of the investigated starting transitions, their remaining input places are one idle place \(P_{(\ldots,0,I)}\) and one buffer place \(P_{(\cdot,\tau,J,B)}\) of another task \(\tau\) of the same job \(J\). In every steady state, the idle places of all machines \(P_{(\cdot,0,0,I)}\) are marked and thus this holds for the steady states \(x^{s,1}\) and \(x^{s,2}\). This is the case as only starting transitions remove tokens from the idle places and they inject them into a production sequence that ultimately leads back to the same idle place from which the token was removed. This happens through a completely independent sequence, i.e., a sequence which is completely represented in the matrix \(A\) (cf. Figure 3). Now it needs to be shown that, in \(x^{s,2}\), at least one buffer place \(P_{(\cdot,\tau,J,B)}\) is marked that has a starting transition \(T_{(\cdot,\tau,\tau^{\prime},J,S)}\) of the investigated task \(\tau^{\prime}\) as output transition, except the task \(\tau^{\prime}\) already had been executed. It is known that one such buffer place was marked in the steady state \(x^{s,1}\), since otherwise \(\tau^{\prime}\) could not have been started. This means that for the pair of tasks \(\tau\), \(\tau^{\prime}\) the condition in line 13 of Algorithm 2 was true. We now need to show that, if the task \(\tau^{\prime}\) was not already executed, starting from the buffer place \(P_{(\cdot,\tau,J,B)}\) only other buffer place \(P_{(\cdot,\tau,J,B)}\) can be marked in any steady state \(x^{s,2}\), for which the condition in line 13 holds as well for the pair of tasks \(\tilde{\tau}\), \(\tau^{\prime}\) and thus the transition \(T_{(\cdot,\tau,\tau^{\prime},J,S)}\) is created to start \(\tau^{\prime}\). Such a buffer place \(P_{(\cdot,\tilde{\tau},J,B)}\) can only be marked through a sequence that started with a starting transition \(T_{(\cdot,\tau,\tau,J,S)}\), that was created in line 15 of Algorithm 2. Thus, for the pair \(\tau\), \(\tilde{\tau}\) the condition in line 13 was true. If it is also true for the pair \(\tilde{\tau}\), \(\tau^{\prime}\), we found the buffer place \(P_{(\cdot,\tilde{\tau},J,B)}\) as the required one to start the task \(\tau^{\prime}\) form \(x^{s,2}\) through a transition \(T_{(\cdot,\tau,\tau^{\prime},J,S)}\). Let us investigate the condition in line 13 for this pair step by step. The first statement in this condition (\(\tau\
eq\tau^{\prime}\)) is true since otherwise the task \(\tau^{\prime}\) was just finished. The second statement in this condition (\(\tau^{\prime}\
otin\mathcal{T}_{\tilde{\tau}}\)) is true since otherwise the previous task \(\tilde{\tau}\) could not have been started, since the task \(\tau^{\prime}\) was not yet completed.