## 3 Multistate Model of the Flexible Manufacturing System
### Multistate Model of CNC Machine Tools  
A typical state transition process of CNC machine tools was presented by the authors in [47], which argued that CNC machine tools were a binary-state system, working and failure state, and the transition between states is caused by faults in different subsystems. This is a binary state transition description of the CNC machine tools that cannot be implemented directly in the current paper because it lacks consideration of the impact of product types on system status. Therefore, to demonstrate the production flexibility of CNC machine tools and the performance influence caused by production setup activities, we assume one product can be processed on machine tool A or B if the corresponding settings are prepared. From the practically technological restrictions, there exists a limitation on time of usage of each task and necessity to change one task to another, so the setup states are required for changing processes. That is, one product capable of being manufactured on two machine tools A or B, \(E_{A}\) and \(E_{B}\) are appointed to A and B for the corresponding process, \(S_{AB}\) and \(S_{BA}\) are built for the changing processes between A and B. Note that, \(E_{A}\) and \(E_{B}\) are binary state systems during the manufacturing period. Thus, the product manufacturing process on CNC machine tools can be extended to a multistate system (MSS) when considering production flexibility. The state transition process of the example in Figure 1 shown as follows:where,  
\(i=1,\ldots,6\): the number of the state of CNC machine tools,  
\(g_{i},i=1,\ldots,6\): the corresponding performance of each state,  
\(g_{A},g_{B}\): the performance of CNC machine tools A and B to manufacture, respectively,  
\(A_{1},\ B_{1}\): working state of machine tools A and B, respectively,  
\(A_{2},\ B_{2}\): failure state of machine tools A and B, respectively,  
\(S_{AB}\): the setup state for machine tool B,  
\(S_{BA}\): the setup state for machine tool A,  
\(\lambda_{A}(t),\ \lambda_{B}(t)\): failure rates of the machine tools A and B, which not only indicate the availability of the machine tool is task-based, but the aging characteristic,  
\(\mu\): repair rate of the machine tools,  
\(\tau_{AB},\ \tau_{BA}\): the corresponding transition intensities from working state to setup state, which are random variables and calculated through the total setup times per year,  
\(\Delta_{AB},\ \Delta_{BA}\): the transition intensities from setup to working state, which is the reverse of the mean time to setup. The state transition process of CNC machine tools with production flexibility includes two setup states, \(S_{AB}\) and \(S_{BA}\), which represent one of the states in which the machine tools in the FMS could be in the actual production process. Obviously, only in the \(A_{1}\) and \(B_{1}\) states is the machine tool in normal working condition (designated as 1), and the rest \(A_{2},\ B_{2},\ S_{AB},\ S_{BA}\) are idle (designated as 0). Therefore, the state transition intensity matrix \(\mathbf{a}\) of the CNC machine tools obtained as follows:  
\[\mathbf{a}=\left[ \begin{array}{cccccc}-(\lambda_{A}(t)+\tau_{AB})&\lambda_{A}(t )&\tau_{AB}&0&0&0\\ \mu&-\mu&0&0&0&0\\ 0&0&-\Delta_{AB}&\Delta_{AB}&0&0\\ 0&0&0&-(\lambda_{B}(t)+\tau_{BA})&\lambda_{B}(t)&\tau_{BA}\\ 0&0&0&\mu&-\mu&0\\ \Delta_{BA}&0&0&0&0&-\Delta_{BA}\\ \end{array} \right].\]  
Figure 1: State transition diagram of CNC machine tools A and B. Based on the Markov reward approach, to assess the average instantaneous availability \(\overline{A_{i}}(t)\) of the CNC machine tools, it is necessary to build the reward matrix \(\mathbf{r}\), and the corresponding rewards in \(\mathbf{r}\) can be determined in the following manner:  
1. All rewards that indicate acceptable states are defined as 1;
2. The rewards associated with all unacceptable states should be zeroed, as well as the rewards associated with all transitions. Thus, the reward matrix \(\mathbf{r}\) of the CNC machine tools depicted in Figure 1 is \[\mathbf{r}=\left[