# Real-Time Maintenance Optimization with Industrial Internet of Things
## 3 Models of Conventional and Real-Time Optimization
### Maintenance Strategy Optimization in Conventional Production Systems
Suppose our system can be described by the following formula:  
\[r_{SYS}=SER(PAR(r_{1},r_{2}),r_{3}), \tag{1}\]  
where \(r_{SYS}\) is the reliability of the production system, \(r_{i}\) is the reliability of entity \(i\). In this case, the reliability of the system can be calculated as follows:  
\[r_{SYS}=[1-(1-r_{1})\cdot(1-r_{2})]\cdot r_{3}. \tag{2}\]  
This formula can also be derived automatically if the system topology is stored in a tree or expression-tree format. Based on this, the system reliability can be determined using the following recursive formula:  
\[r_{NODE}^{0}= \begin{bmatrix}r_{i}^{0}\big{(}s_{i}^{0}\big{)},&\text{$if$ the NODE is machine $i$}\\ \prod_{i=1}^{n}r_{i}^{0}\Big{(}child_{i}^{0}\Big{)},&\text{$if$ the NODE is a serial connection $(SER)$}\\ 1-\prod_{i=1}^{n}\Big{(}1-r_{i}^{0}\Big{(}child_{i}^{0}\Big{)}\Big{)},&\text{$if$ the NODE is a parallel connection $(PAR)$}\end{bmatrix} , \tag{3}\]  
where \(r_{NODE}^{0}\) is the initial reliability of a node, which could be either an entity, or a serial or parallel connection of entities, \(s_{i}^{0}\) is the state (condition) of entity \(i\). We can use Equation (3) as an iterative recursive formula to compute the reliability of the nodes and the reliability of the system, depending on the length of the maintenance period. The following equation defines this iterative and recursive formula in the case of exponential degradation to calculate the state of a node in the iteration step \(p\):  
\[r_{NODE}^{pREM}= \begin{bmatrix}r_{i}^{p-1}\big{(}s_{i}^{p-1}\big{)}+e^{-DRP_{ i}\cdot\tau},&\text{$if$ the NODE is machine $i$}\\ \prod_{i=1}^{n}r_{i}^{p-1}\Big{(}child_{i}^{p-1}\Big{)}+e^{-DRP_{i}\cdot\tau},& \text{$if$ the NODE is a serial connection $(SER)$}\\ 1-\prod_{i=1}^{n}\Big{(}1-r_{i}^{p-1}\Big{(}s_{i}^{p-1}\Big{)}+e^{-DRP_{i}\cdot \tau}\Big{)},&\text{$if$ the NODE is a parallel connection $(PAR)$}\end{bmatrix} . \tag{4}\]  
where \(r_{NODE}^{pREM}\) is the reliability of a node before the maintenance operation in the iteration step \(p\), \(DRP_{i}\) is the degradation rate parameter of entity \(i\), and \(\tau\) is the length of the maintenance period, which can be defined as the decision variable of the optimization problem in the case of a conventional maintenance strategy. We can use Equation (3) as an iterative recursive formula to compute the reliability of the nodes and the reliability of the system, depending on the impact of maintenance on the reliability of the entities. The following equation defines this iterative and recursive formula:  
\[r_{NODE}^{pPOSTM}= \begin{bmatrix}r_{i}^{p-1}\Big{(}s_{i}^{p-1}\Big{)}+e^{-DRP _{i}\cdot\tau}+\delta_{i},&\text{$if$ the NODE is machine $i$}\\ \prod_{i=1}^{n}r_{i}^{p-1}\Big{(}child_{i}^{p-1}\Big{)}+e^{-DRP_{i}\cdot\tau} +\delta_{i},&\text{$if$ the NODE is a serial connection $(SER)$}\\ 1-\prod_{i=1}^{n}\Big{(}1-r_{i}^{p-1}\Big{(}s_{i}^{p-1}\Big{)}+e^{-DRP_{i}\cdot \tau}+\delta_{i}\Big{)},&\text{$if$ the NODE is a parallel connection $(PAR)$}\end{bmatrix} , \tag{5}\]  
where \(r_{NODE}^{pPOSTM}\) is the reliability of a node after the maintenance operation in the iteration step \(p\), and \(\delta_{i}\) is the impact of a maintenance operation on the state of entity \(i\). Based on these iterative and recursive calculations, it is possible to define the objective function of the conventional maintenance strategy optimization, which defines the total profit of the production system depending on the cost of the performed maintenance operations and the income of the production operations depending on the productivity, which is significantly influenced by the reliability and state of the entities:  
\[P=\sum_{p=1}^{p_{max}}c_{SYS}^{PROD}.\cdot\left( \begin{subarray}{c}p^{PROSTM}\\ \end{subarray}