# Model Predictive Control for Flexible Job Shop Scheduling in Industry 4.0 +
## 3 Model Generation
### Generation of the Discrete Time Petri Net Model
If there is a reason why it is not allowed to interrupt a task the same reason usually prohibits to only start it partially. An MPC formulation for a timed discrete PN was presented by [PERSON] [48; 49]. It is tailored to a setup in which a PN needs to be transferred from an initial marking to a desired final marking in minimum time while avoiding critical markings in which uncontrollable transitions could fire. Due to this specific setup, it is not applicable to the our case and especially not to the more general type of scheduling objectives described in Section 2.2. In the context of discrete manufacturing, MPC was applied for dynamic capacity adjustment of a production system with reconfigurable machine tools and job shop characteristics by [PERSON] et al. [50]. They consider a continuous optimization problem, which relaxes the integer constraint in the sense of fluidification of the problem. The question how the underlying integer assignment problem can be solved is left as an outlook. An MPCapproach for the scheduling of reentrant manufacturing lines motivated by semiconductor manufacturing was considered by [PERSON] and [PERSON] [51], who optimize a the long-term behavior of a reentrant production system modeled as a discrete-time flow model with respect to a multi-objective cost function by means of linear programming. The result of the MPC is fed to a subordinate controller which coordinates the short-term decisions and applies the integer valued control input to the plant. [PERSON] et al. [52] use MPC for the scheduling in a machine environment with parallel identical machines that are fed through transportation lines of different lengths. The goal is to maximize the production output while limiting the energy consumption. The resulting optimization problem is a MIP assigning speeds to the machines and binary inputs to the transportation system. For general job shop problems no alternative MPC approach was found in the literature. In contrast to problems in scheduling and discrete manufacturing where MPC is rarely used [52], it has a variety of applications in supply chain management and especially in process industry, where continuous models naturally arise [53; 54; 55; 56]. Due to the large body of knowledge on various properties and different implementations of MPC schemes, it became a well-established control method [57]. In the sequel, we start by formulating the first MPC problem according to [18], before we show that the problem is feasible in Section 4.2 and determine a criterion to guarantee the completion of a single operation in the production problem in Section 4.3. The insights form this discussions motivate the formulation of the second MPC formulation in Section 4.4. The guarantees for the completion of the production problem for both MPC formulations are given in Section 4.5. ### Formulation of the Mpc Problem

As discussed in Section 2.2, the goal of the proposed production scheduling scheme is to optimize the profitability of the production system. This is done by assigning the different tasks to the most efficient machines and by choosing the production sequence which yields the most reward possible. In order to quantify the profitability of the production system represented as a PN, we introduce a cost function \(c:\mathbb{N}^{n}\times\mathbb{N}^{m}\rightarrow\mathbb{R}\), which is called _stage cost_, that assigns to every pair \((x,u)\) of state and input a cost value \(c(x,u)\). It quantifies how much cost the current status of the production system represented through the state \(x\) and the decisions taken through the input \(u\) cause. In general, the cost may depend arbitrarily on \(x\) and \(u\) and can also contain couplings between them. As the state of the system changes over time and at every time step new decisions are taken, the cost \(c(x(k),u(k))\) only represents the cost in the current time interval of length \(t_{s}\).