# Model Predictive Control for Flexible Job Shop Scheduling in Industry 4.0 +
## 3 Model Generation
### Generation of the Discrete Time Petri Net Model
If an optimization algorithm is used which is able to return a suboptimal but feasible solution after a desired amount of time, the MPC scheduling approach provides the properties of a so called _anytime MPC_ scheme. This means that it guarantees important properties of the closed loop system no matter how many iterations the optimization algorithm are performed [60]. On the other hand, the important arguments in the proofs are based on steady states, which by definition persist over time. Therefore, it can also be argued that the optimizer has enough time in the important cases such that the optimal solution is attained and the properties can be guaranteed despite the complexity of the optimization problem is high. Even if it is not required that the optimum is attained in the MPC optimization in order to guarantee convergence, an analysis of the closed loop performance is a possible future research direction. From MPC theory, it is known that the repeated solution of a finite horizon optimal control problem does generally not lead to the infinite horizon optimal solution [61]. Therefore, an analysis of the closed loop performance of the controlled system might yield interesting results. The feedback mechanism itself introduces a certain amount of robustness against disturbances and changes in the system. However, as the growing demand for flexibility in Industry 4.0 might increases the uncertainty of the evolution of the manufacturing system, those effects might become even more relevant. Therefore, in future work, the robustness of the closed loop system can be rigorously analyzed, for example in terms of some assumed changes with respect to the initial manufacturing problem. Such changes might be machine dropouts or jobs that arrive during runtime and can be considered as disturbances. If the worst case disturbances are considered, methods form robust MPC can be applied, and if the disturbances are described probabilistically, the problem falls into the domain of stochastic MPC [14]. Especially with respect to machine dropouts, where the worst case scenarios are overly conservative, the consideration of a dropout probability is promising. In this case, stochastic MPC minimizes the expected cost over the prediction horizon and thereby maximizes the expected profit in the manufacturing system. The special case of a linear cost function was already briefly discussed in [18]. In a similar way, further classes of cost functions, for example, exhibiting certain separability conditions, can be analyzed. For the computation of the smallest sufficient prediction horizon that guarantees the completion of a given scheduling problem, specific algorithms can be formulated, which exploit the special characteristics of the cost function to simplify the computation. With respect to further special cases, more restrictive scheduling problems as, for example, the job shop, the flow shop or the open shop can be investigated. Furthermore, the discussion how the different job characteristics presented by [PERSON] [15] or further challenges as the particularities in the online printing shop considered by [PERSON] et al. [37] can be integrated in our framework is an interesting future topic. Finally, real-world problems with relevant scheduling objectives can be the subject of further research. Motivated by the potential further increase in flexibility and the trend towards CPSs, the modular structure of the problem setup and the deduced model can be further exploited. The model generated in Section 3 from the problem setup described in Section 2 basically consists of separate processes for each job that are linked via idle places of the machines. From this structure, an agent-based approach, similar to the one presented by [PERSON] and [PERSON] [62] for a scheduling problem, can be developed or the problem can be formulated in the form of a distributed MPC problem [63]. One possible approach would be to consider product agents for every job.