# Optimal Control Algorithms and Their Analysis for Short-Term Scheduling in Manufacturing Systems
## 2 Optimal Control Applications to Scheduling in Manufacturing Systems
 \tag{1}\]  
where \(\vartheta\in\{g,\,k,\,o,\,f,\,p,\,e,\,c,\
u\}\)--lower index which correspond to the motion control model, channel control model; operations control model; flow control; \(M_{p}\)--resource control; operation parameters control; structure dynamic control model; auxiliary operation control model; \(\mathbf{x}=\|\mathbf{x}^{(g)\mathrm{T}},\mathbf{x}^{(k)\mathrm{T}},\mathbf{x}^{ (o)\mathrm{T}},\mathbf{x}^{(p)\mathrm{T}},\mathbf{x}^{(f)\mathrm{T}},\mathbf{ x}^{(e)\mathrm{T}},\mathbf{x}^{(c)\mathrm{T}},\mathbf{x}^{(v)\mathrm{T}}\| ^{\mathrm{T}}\) is a vector of the MS generalized state, \(\mathbf{u}=\|\mathbf{u}^{(g)\mathrm{T}},\mathbf{u}^{(k)\mathrm{T}},\mathbf{u} ^{(o)\mathrm{T}},\mathbf{u}^{(p)\mathrm{T}},\mathbf{u}^{(f)\mathrm{T}},\mathbf{ u}^{(e)\mathrm{T}},\mathbf{u}^{(e)\mathrm{T}},\mathbf{u}^{(v)\mathrm{T}}\| ^{\mathrm{T}}\) is a vector of generalized control, \(\mathbf{h}_{0}\), \(\mathbf{h}_{1}\) are known vector functions that are used for the state \(\mathbf{x}\) end conditions at the time points \(t=T_{0}\) and \(t=T_{f}\), and the vector functions \(\mathbf{q}^{(1)}\), \(\mathbf{q}^{(2)}\) define the main spatio-temporal, technical, and technological conditions for MS execution; \(J_{\theta}\) are indicators characterizing the different aspects of MS schedule quality. Overall, the constructed model \(M\) (1) is a deterministic, non-linear, non-stationary, finite-dimensional differential system with a reconfigurable structure. Figure 1 shows the interconnection of models \(M_{g}\), \(M_{k}\), \(M_{o}\), \(M_{p}\), \(M_{f}\), \(M_{e}\), \(M_{c}\), and \(M_{v}\) embedded in the generalized model. In Figure 1 the additional vector function \(\xi=\|\xi^{(g)\mathrm{T}},\xi^{(k)\mathrm{T}},\xi^{(o)\mathrm{T}},\xi^{(p) \mathrm{T}},\xi^{(f)\mathrm{T}},\xi^{(e)\mathrm{T}},\xi^{(c)\mathrm{T}},\xi^{( o)\mathrm{T}},\xi^{(o)\mathrm{T}}\|^{\mathrm{T}}\) of perturbation influences is introduced. The solutionsIn this case, the MS job shop scheduling problem can be formulated as the following problem of OPC: it is necessary to find an allowable control \(\mathbf{u}(t)\), \(t\in(T_{0},\,T_{f}]\) that ensures for the model (1) meeting of vector constraint functions \(\mathbf{q}^{(1)}(\mathbf{x},\mathbf{u})=0\), \(\mathbf{q}^{(2)}(\mathbf{x},\mathbf{u})\leq 0\) and guides the dynamic system (i.e., MS job shop schedule) \(\dot{\mathbf{x}}(t)=f(t,\mathbf{x}(t),\mathbf{u}(t))\), from the initial state to the specified final state. If there are several allowable controls (schedules), then the best one (optimal) should be selected to maximize (minimize) \(J_{\theta}\). The formulated model is a linear, non-stationary, finite-dimensional, controlled differential system with the convex area of admissible control. Note that the _boundary problem_ is a standard OPC problem ([21; 36; 37]). This model is linear in the state and control variables, and the objective is linear. The transfer of non-linearity to the constraint ensures convexity and allows use of interval constraints. In this case, the adjoint system can be written as follows:  
\[\dot{\psi}_{l}=-\frac{\partial H}{\partial x_{l}}+\sum_{\alpha=1}^{I_{1}} \lambda_{\alpha}(t)\frac{\partial\mathbf{q}_{\alpha}^{(1)}(\mathbf{x}(t), \mathbf{u}(t))}{\partial x_{l}}+\sum_{\beta=1}^{I_{2}}\rho_{\beta}(t)\frac{ \partial\mathbf{q}_{\beta}^{(2)}(\mathbf{x}(t),\mathbf{u}(t))}{\partial x_{l}} \tag{2}\]  
The coefficients \(\lambda_{\alpha}(t),\rho_{\beta}(t)\) can be determined through the following expressions:  
\[\rho_{\beta}(t)\mathbf{q}_{\beta}^{(2)}(\mathbf{x}(t),\mathbf{u}(t))\equiv 0,\,\beta\in\{1,\ldots,I_{2}\} \tag{3}\]  
\[\text{grad}_{\mathbf{u}}H(\mathbf{x}(t),\mathbf{u}(t),\mathbf{\psi}(t))=\sum_ {\alpha=1}^{I_{1}}\lambda_{\alpha}(t)\text{grad}_{\mathbf{u}}\mathbf{q}_{ \alpha}^{(1)}(\mathbf{x}(t),\mathbf{u}(t))+\sum_{\beta=1}^{I_{2}}\rho_{\beta} (t)\text{grad}_{\mathbf{u}}\mathbf{q}_{\beta}^{(2)}(\mathbf{x}(t),\mathbf{u}(t)) \tag{4}\]  
Here, \(x_{l}\) are elements of a general state vector, \(\psi_{l}\) are elements of an adjoint vector.