3.2. Multi-Level Spare Parts Support Process
The equipment’s multi-level spare parts support includes multi-echelon maintenance supply level and multi-indenture equipment hierarchy structure support. Multi-echelon spare parts support refers to the support level corresponding to the equipment maintenance level. For the number of spare parts, we are usually interested not only in the required number of spare parts for each base but also in the spare parts storage required for the rear warehouse of each support base. Here, the base is called the first echelon and the rear warehouse is called the second echelon. For example, in most cases, the navy is considered a two-stage supply system. Sometimes, there are more echelons. For example, to support the deployed submarines, each submarine (first echelon) has some spare parts. At the same time, some spare parts are stored in the second-class supply ship, which can enter the submarine regularly. These facilities are supported by the third-echelon home port. Finally, there is the fourth echelon of the naval rear warehouse. 
Figure 3 shows a typical submarine multi-echelon support structure, which is composed of eight first-echelon stations, three second-echelon stations, two third-echelon stations and one fourth-echelon station.
The multi-indenture structure describes how the whole equipment system is composed and how the spare parts are assembled, as shown in 
Figure 4. LRU is the first level of spare parts. When the first level spare parts are disassembled at the maintenance point, it is found that the fault of the LRU is caused by the sub-component of the LRU, which is replaced. Here, the sub-component is called the shop replacement unit (SRU) [
16], also known as the second-level spare parts. All components that can be directly removed from LRU are called SRU. Similarly, when the SRU continues to be repaired in the workshop, the SRU is disassembled. It is found that the failure is caused by the sub-components of the SRU, which can be called sub shop replacement unit (SSRU), also known as the third level spare parts. By analogy, all levels of spare parts have their level of spare parts name.
This paper takes the two-level and two-level equipment systems as an example to describe the multi-level spare parts support process, as shown in 
Figure 5. For the two-level support system, the base is the first-level support site. The rear supply warehouse is the second-level support site. For the two-level equipment structure, the first level spare parts are named by LRU, and the second level spare parts corresponding to LRU are named by SRU. Each support station has a corresponding spare parts storage space, which stores a certain number of LRU and SRU, respectively.
When the equipment is in normal operation, the whole equipment will stop due to the failure of one LRU. At this time, the base uses the methods of replacing lost efficacy parts and repairing failed parts to deal with the failed LRU. For the failed LRU, it should be transported to the base first. If the LRU storage space is in stock at this time, the LRU should be replaced immediately to complete the equipment repair. If the storage space is not in stock at this time, a spare parts shortage event of the LRU will occur. At the same time, due to the limited maintenance capacity of the base, the failed LRU will be maintained in the base with a certain probability. If it is not maintained in the base, the relevant spare parts manager will send the failed LRU to the rear warehouse for maintenance. He will make a replenishment application for the LRU in the rear warehouse. If the LRU storage space in the rear warehouse is in stock, the relevant spare parts manager will send the failed LRU to the rear warehouse for maintenance. Then, the spare part is added to the base LRU storage space. For the LRU maintained in the base, if it is found that the LRU failure is caused by one of its SRU failures, the failure SRU is also treated in a way similar to LRU. The failure SRU spare parts are replaced and repaired. For the failed SRU, if the SRU spare parts storage space is in stock at this time, the SRU will be replaced immediately to complete the failed LRU repair. Meanwhile, the relevant spare parts staff will send the successfully repaired LRU to the corresponding SRU spare parts storage space in the base. However, if there is no inventory in the corresponding SRU spare parts storage space, a spare parts shortage event will occur. At the same time, due to the limited maintenance capacity of the base, the SRU has a certain probability of repair in the base. After a certain maintenance time, the failed SRU is successfully repaired. The relevant spare parts staff will send the repaired SRU to the SRU spare parts storage space in the base. If the failed SRU cannot be repaired in the base, the relevant spare parts manager will send it to the directly corresponding upper-level site. Failed SRU will be repaired in the rear warehouse. He will make a replenishment application for the SRU in the rear warehouse. If the SRU spare parts storage space in the rear warehouse has inventory, the spare parts will be added to the SRU storage space of the base.
For the rear warehouse, we assume that it has strong reparability and the repair probability for all spare parts is 1. For the failed LRU transported from the base, the rear warehouse will check the failed LRU and find out the SRU, which caused the LRU failure. For the failed SRU, it will be repaired in the rear warehouse for a while. After the repair is successful, a relevant person will assemble the repaired SRU to its LRU. At this time, the whole LRU is repaired successfully. Then, the relevant spare parts staff will send the repaired LRU to the corresponding LRU spare parts storage space of the rear warehouse. For the failed SRU transported from the base, the rear warehouse will directly repair the failed SRU. After a period of maintenance, the repair is successful. Then, the repaired SRU will be directly sent to the corresponding SRU spare parts storage space of the rear warehouse. Due to the high priority of SRU spare parts and LRU spare parts shortage events in the base, once the repaired spare parts or the spare parts in the rear warehouse are generated, the two spare parts shortage events will be met the first time.
  3.3. Model’s Variables, Restrictions & Parameters
The variables of the optimization model are the maintenance support echelons and the equipment’s structural indentures. To simplify the model calculation, this paper adopts two-level maintenance support to meet most maintenance situations, including base-level maintenance and rear warehouse level maintenance (0 = rear warehouse). The hierarchical structure of equipment adopts the typical three-level maintenance support mode which are equipment system, LRU, SRU (0 = equipment system).
To simplify the modeling process and consider the actual situation, this paper formulates some restrictions on the support process.
Condition 1: All LRUs are series in the equipment, and all LRU’s SRUs are in series. In this case, once one LRU fails, the whole equipment system will stop running.
Condition 2: The failure of LRU is only caused by an SRU. The failure probability is qIJ. Here, the multiple second-tier spare parts failure which will cause the failure of corresponding first-level spare parts has not been considered.
Condition 3: The maintenance probability of the rear warehouse is 1.
Condition 4: The equipment system maintenance channel is unlimited [
30]. There is no need to queue maintenance spare parts.
Condition 5: All kinds of spare parts’ failure-free operation time are subject to the exponential distribution [
13]. This assumes is used to calculate the failure-free working time of spare parts at each level.
Condition 6: All kinds of spare parts’ demand rates are subject to Poisson distribution [
13,
33].
Condition 7: The spare parts demand–supply strategy of each grade site is (S-1, S) inventory strategy in (s, S) inventory strategy [
25]. (s, S-1) inventory strategy is continuous inventory [
50,
51]. Once the inventory level is less than s, the maintenance station will order immediately. The order quantity makes the inventory level at the order time reach S. Otherwise, no order is made. Therefore, the inventory strategy of (s, S-1) in this paper is that, once there is a good demand, we order the goods to the manufacturer once regardless of whether there are any goods in the inventory. If there are any goods, we submit one delivery. Otherwise, there is a shortage of goods.
The following parameters are required for the spare parts optimization process, which is shown in 
Table 2. I is used as base number 1, 2, 3, …, b (0 = rear warehouse) according to the convention. J is used to represent item No. 1, 2, 3, …, n (0 = LRU of the first level spare parts).
  3.4. Multi-Level Spare Parts Demand Rate
- (1)
- The base I’s first level spare parts of LRU demand rate. 
By analyzing the whole multi-echelon and multi-indenture spare parts support process, it can be seen that the equipment shutdown is caused by one of the first level spare parts LRU failures. For example, once the engine of the aircraft stops running, the whole aircraft will stop running. To reduce the equipment downtime as much as possible, to reduce the unpredictable loss caused by equipment downtime, the whole support system will immediately generate a demand for the first level spare LRU in the base. So, the failure rate of the first level spare LRU is equivalent to the demand rate of the first level spare LRU in base I.
        
- (2)
- The base I second level spare parts SRU demand rate. 
The second level spare parts SRU demand rate of base I is for the failure LRU with a certain probability r
I0, which can be maintained in the base. The probability q
IJ is caused by the failure of SRU
J. For the failed SRU
J, to repair the LRU as soon as possible and reduce the downtime of the equipment, there is an immediate demand for base I to change the SRU
J. Therefore, the failure rate of the SRU
J found by the LRU failure in base I is equivalent to the demand rate of base I for SRU
J.
        
For q
IJ, LRU is the probability of failure due to SRU
J failure. MTBF
0 is the average time between LRU failures. MTBF
J is the average failure interval of SRU
J, which belongs to LRU. Since the LRU failure must be caused by one SRU
J failure,
        
- (3)
- The first level spare parts LRU demand rate in the rear warehouse. 
The LRU demand in the rear warehouse is caused by the LRU failure, which cannot be maintained in the base and be sent back to the warehouse. Meanwhile, the LRU requirement modification is proposed to the warehouse. For the rear warehouse, it should guarantee b bases at the same time. So, it should sum up the demand for all b bases.
        
- (4)
- The second level spare parts SRU demand rate in the rear warehouse. 
The SRU
J requirement for the rear warehouse is generated by two parts. The first part is generated by the SRU
J supplementary application, which is sent to the rear warehouse by the SRU
J and it cannot be repaired on all bases. The second part is caused by the LRU being sent to the rear warehouse for repair, which cannot be repaired on all b bases. The SRU
J requirement is the SRU
J application for the rear warehouse, in which the failed LRU detects the corresponding failed SRU
J during the maintenance of the rear warehouse.
        
- (5)
- Demand rate solution 
The specific solving order of each demand rate and the relationship between them are shown in 
Figure 6. We take the data given by the equipment system in advance as constant c. First, we calculate the LRU demand rate of the base according to the known information, which is not associated with other demand rates. Second, according to Formulas (2) and (4), the SRU demand rate in the base and LRU in the rear warehouse are functions of the spare parts demand rate. So, the SRU in the base and LRU in the rear warehouse demand rate can be calculated at the same time. In the third step, according to Formula (5), the SRU demand rate of the rear warehouse is a common function of the SRU demand rate in the base and the LRU in the rear warehouse. So, the SRU demand rate of the rear warehouse can be solved by combining the two demand rates.
  3.5. Multi-Level Spare Parts Demand-Supply Model
According to the multi-echelon and multi-indenture spare parts support process based on the demand–supply steady-state process, we can divide the whole multi-level spare parts demand–supply into two parts, which are spare parts demand–supply and equipment system demand–supply. The multi-level spare parts demand–supply model is shown in 
Figure 7. Other multi-level spare parts’ demand–supply can be expanded in the same way.
The three decisive variables of the multi-level spare parts demand–supply model are system state variables, demand quantity and supply rate. The system status variable represents the current inventory of the spare parts storage point at the current level. Its status value can be reduced due to demand or increased due to supply. Demand rate is the velocity with which the system generates a spare parts demand when it is in a special state. Due to the system demand rate, it transfers the state from 1 to 2. The inventory of state 2 is reduced by 1 compared with state 1. Supply rate is the velocity at which the system receives a spare parts supply when it is in a state. Due to the system supply rate, the system changes the state from 3 to 4. The inventory of state 4 increases by 1 relative to state 3.
For the state variable, the maximum value is the initial inventory quantity. The minimum value is the negative value of the system’s maximum shortage. The specific demand–supply inventory status transition is shown in 
Figure 8.
We define the initial state as S0, the next state as S1 … and so on, the last state as Sn, where the inventory of the latter state is 1 larger than that of the previous state.
For the maximum number of spare parts shortage Sn, if it is the second level SRU spare parts, the maximum number of spare parts shortage is 1. The spare parts initial number in the first level LRU spare parts storage point is the assembling number. Here in one LRU, only one SRU is assembled. If n is assembled, then the initial number of spare parts multiplies n. If it is the first level LRU spare parts, the maximum shortage is the LRU spare parts assembly quantity in a piece of equipment add the LRU spare parts storage point to the initial quantity of the next support level.
When the system status is in spare parts shortage, the system stops running. So, the maximum shortage is the consumption of all the LRUs in the system.
The model assumes that the time tends to infinity and the system is in the limit stationary state. At this time, although the system state changes randomly, their state probability no longer changes with time. The state probability Pi of Si state means the average time that the system is in Si state relative to all other states. So, the state probability Pi is constant.
For the state S
0 and the Gormorkov equation in the above demand–supply model, the following equation can be obtained:
Because  is a constant, the above formula is 0, so 
For the state S1 and Gormorkov equation in the above demand–supply model, the following equation can be obtained:
Because P
1 is a constant, the above formula is 0, so 
. By analogy, the following equations can be obtained:
Since P
i is the state probability of each state, the sum of the probabilities of all states is 1.
        
By solving Equations (8) and (9), the state probability of each state system state can be obtained.
        
According to the state probability of each state, the expected shortage number can be easily obtained:
        and the availability is:
If the spare parts’ failure-free working time obeys exponential distribution. The probability of failure has nothing to do with the starting point of time, but only with the length of time. Therefore, if λ
1 = λ
2 = … = λ
n = λ and the spare parts’ failure-free working time obeys exponential distribution, the expected spare parts support delay time can be derived as follows:
According to the demand–supply model, we only need to know the spare parts’ initial number and the maximum shortage number in the system state, the demand rate and supply rate between each state transition. We can get the expected shortage number and the availability of spare parts. If the research spare parts’ failure-free working time obeys the exponential distribution, then we can get the expected spare parts to support the delay time. The failure-free working time of the first level spare parts LRU and the second level spare parts’ SRU obeys exponential distribution, then the above three kinds of data can be obtained by establishing spare parts, demand–supply model. The correlation and solution sequence of supply rate and support delay time are shown in 
Figure 9.
The multi-level spare parts demand–supply model integrates the multi-echelon and multi-indenture spare parts support process, demand rate solution, spare parts demand supply and supply rate solution content. It solves the steady-state probability of equipment system state and base equipment availability. Finally, we can extend it to all bases of the whole support system, to solve the most important equipment efficiency index in the spare parts system. That is the whole support system’s availability. The specific calculation sequence of support system availability is shown in 
Figure 10.
  3.6. Multi-Level Spare Parts Demand-Supply Model Solution
- (1)
- The second level spare parts SRU availability and support delay time in the rear warehouse. 
According to the multi-level and multi-level spare parts’ supply process, for the spare parts storage point of the second level spare parts SRU in the rear warehouse, the base generates a supply application for the SRU in the rear warehouse due to the local non-repairable SRU. The application rate is the demand rate of the SRU in the rear warehouse. As long as an SRU demand is generated for the rear warehouse at this rate, the number of spare parts in the SRU spare parts storage point in the rear warehouse will be one less. When the inventory of the SRU spare parts storage point in the rear warehouse is reduced to 0, if there is still a demand application for the SRU although the rear warehouse cannot meet its demand application, a shortage will occur. At this time, once the spare parts storage point obtains the spare parts, it will first meet the application for the shortage of modified spare parts. When the storage quantity shortage of SRU spare parts in the rear warehouse is the initial storage quantity of LRU spare parts in the rear warehouse, all the SRUs in the whole supply system (i.e., base level and rear warehouse level) are consumed, that is, all the SRUs are in failure status. At this time, once another demand for the SRU is generated, the warehouse of the party is no longer able to meet the requirements of such spare parts, and the whole equipment stops running immediately. The maximum shortage of the SRU spare parts storage point in the rear warehouse is—(1 adds the initial number of spare parts in the first level spare parts LRU storage point in the rear warehouse). For the supply of SRU spare parts storage point in the rear warehouse, because we assume that the system is an unlimited maintenance channel if n spare parts in the system are in a failure state, the supply rate of the system is n multiplied by that of a single maintenance channel. The specific SRU spare parts’ demand–supply status transition diagram of the rear warehouse is shown in 
Figure 11.
According to the SRU spare parts demand and supply module of the rear warehouse, as well as Formulas (8) and (9), the steady-state probability of the existing inventory status of each SRU spare parts storage point of the rear warehouse can be deduced as follows:
Here, 
. Then, according to Formulas (11)–(13), the expected shortage of SRU spare parts in the rear warehouse can be calculated in sequence as follows:
The availability of SRU spare parts in the rear warehouse is as follows:
The delay time of SRU spare parts support in the rear warehouse is as follows:
- (2)
- Spare parts availability and support delay time of the first level spare parts LRU in the rear warehouse. 
A local irreparable LRU generates a supply LRU application in the rear warehouse. The application rate is the LRU demand rate of the rear warehouse. As long as an LRU demand is generated for the rear warehouse at this rate, the spare parts inventory in the rear warehouse will be reduced to one. When the LRU spare parts inventory in the rear warehouse storage point is reduced to 0, if there is a demand application of the LRU, the rear warehouse cannot meet the demand application. Once the spare parts storage point gets the spare parts, it will first meet the demand application of spare parts shortage. However, once the LRU spare parts shortage quantity in the rear warehouse is the initial LRU spare parts storage quantity, all the SRUs in the whole supply system (i.e., base level and rear warehouse level) are consumed. All the LRUs are in a failure state. At this time, once there is another LRU demand, the rear warehouse is no longer able to meet the spare parts requirements. The whole equipment stops working immediately. The LRU spare parts maximum shortage in the rear warehouse storage points is—(1 adds the initial spare parts quantity of the base first level LRU storage points). For the LRU spare parts supply in the rear warehouse storage point, it is assumed that the system is an infinite maintenance channel. So, if n spare parts are in a failure state, the system supply rate is n times that of the single maintenance channel.
The LRU spare parts demand–supply status transition diagram of the rear warehouse is shown in 
Figure 12.
According to the LRU spare parts demand–supply state transition diagram of the rear warehouse, as well as Formulas (8) and (9), each LRU spare parts steady-state probability in the existing inventory state in the rear warehouse storage point can be deduced as follows:
Here, 
. Then, according to the Formulas (11)–(13), the expected shortage of LRU spare parts in the rear warehouse can be calculated as follows:
The availability of LRU spare parts in the rear warehouse is as follows:
The delay time of LRU spare parts support in the rear warehouse is as follows:
- (3)
- The second level spare parts SRU availability and support delay time in the base. 
According to the multi-level and multi-level spare parts supply process, for the spare parts storage point of the second level spare parts SRU of the base, the spare parts application for the failed SRU caused by repairing the LRU in the base. The application rate is the demand rate of the base SRU. As long as an SRU demand is generated for the base at this rate, the numbers of spare parts in the SRU spare parts storage point of the base will be one less. When the inventory of the SRU spare parts storage point of the base is reduced to 0, if there is still a demand application for the SRU, the base will produce a shortage although it cannot meet its demand application. Once the spare parts storage point obtains the spare parts, it will first meet the application for the shortage of modified spare parts. However, once the shortage of SRU spare parts storage quantity to the base is the initial spare parts storage quantity of base-level LRU, all SRUS at this level, that is, base level, will be consumed. That is, all SRUs are in failure status. At this time, once another demand for the SRU is generated, the whole equipment will stop running immediately because the base is no longer able to meet the requirements of such spare parts. Therefore, the maximum shortage of SRU spare parts storage point of the base is—(1 + the initial number of spare parts of the first level spare parts LRU storage point of the base). For the supply of SRU spare parts storage points in the base, because we assume that the system is an unlimited maintenance channel if n spare parts in the system are in a failure state, the supply rate of the system is n times that of a single maintenance channel.
The status transition diagram of SRU spare parts demand and supply in the base is shown in 
Figure 13.
According to the SRU spare parts’ demand–supply state transition diagram in the base, as well as Formulas (8) and (9), the SRU steady-state probability of the existing inventory state in each base storage point can be deduced as follows:
Here, n = S
IJ + S
I0 + 1. Then, according to Formulas (11)–(13), the expected shortage of SRU in the base can be calculated as follows:
The availability of SRU in the base is as follows:
The delay time of base SRU support is as follows:
- (4)
- Spare parts’ availability and support delay time of the base first level spare parts LRU. 
For the spare parts’ storage point of the base first level spare parts LRU, the base is the first support level. The equipment generates LRU spare parts application, which is met by the base LRU spare parts storage point. The application rate is the base LRU demand rate. As long as an LRU demand is generated for the base at this rate, the SRU spare parts inventory of the base storage point will be reduced by one. When the inventory of the base LRU spare parts storage point is reduced to 0, if there is a demand application for the LRU, the equipment will stop working immediately due to no LRU supply to the equipment. Therefore, the maximum shortage of base LRU spare parts storage points is 1. For the supply of base LRU spare parts storage points, we assume that the system is an infinite maintenance channel. So, if n spare parts are in a failure state, the system supply rate is n multiples of the single maintenance channel.
The specific status transition diagram of LRU spare parts’ demand–supply in the base is shown in 
Figure 14.
According to the LRU spare parts’ demand–supply status transition diagram of the base, as well as Formulas (8) and (9), the LRU spare parts steady-state probability of the existing inventory status in each base storage point can be deduced as follows:
Here, 
. Then, according to Formulas (11)–(13), the expected shortage of LRU spare parts in the base can be calculated as follows:
The availability of LRU in the base is as follows:
The delay time of base LRU support is as follows:
- (5)
- Equipment system availability 
Assuming that the system has deployed equipment in the base, the specific demand–supply state transition diagram of the base I equipment system is shown in 
Figure 15.
The S0 = 0 indicates that NI equipment of base I is working normally at this time. S1 = −1 means that one piece of equipment of base I stops working and other pieces of equipment are working normally. By analogy, Sn = −NI means that all NI pieces of equipment of base I stop working and the whole equipment system is paralyzed. According to the equipment system demand–supply module, we can deduce n = NI.
The λ represents the demand rate of a piece of equipment.
        
Among them, Z
0 represents the LRU assembly quantity on one piece of equipment. A single equipment demand rate is the sum of LRU requirements of all bases. Here, m represents the number of LRUs in a device. The demand rate from state S
0 to state S
1 is that the demand generated by N
I working equipment with rate λ. S
0, the demand rate at this time is N
Iλ. The demand rate of conversing state S
1 to state S
2 is the demand generated by N
I−1 equipment working normally at the same time. So, the demand rate is (N
I−1)λ. By analogy, the demand rate from state S
n−1 to state S
n is the demand generated by only one piece of equipment in normal operation, so the demand rate is λ. V represents the supply rate of individual equipment.
        
Here, MT represents the average maintenance time of a single piece of equipment.
        
Here, 
 is the fault location probability. It is the LRU
m failure probability causing the equipment to stop working.
        
Since the equipment system has been assumed to be an infinite maintenance channel, the supply rate NI is that the equipment stopping operation is supplied at rate V when the state Sn changes to the state Sn−1. So, the supply rate is NIV. When the state Sn−1 is changed to the state Sn−2, the supply rate NI−1 is the failing equipment supplied at rate V. So the supply rate at this time is (NI−1)V. By analogy, when the supply rate from state S1 to state S0, there is only one shutdown equipment to supply. So, the supply rate at this time is V.
Therefore, according to the whole equipment system of base I, and Formulas (8) and (9), the steady-state probability of each base I equipment system state can be deduced as follows: 
In addition to the status S
0, the rest of the status have downtime pieces of equipment in the base. So, the availability is calculated from the unavailability. The base I equipment unavailability 
 is as follows:
According to the unavailability, the base I equipment availability can be deduced here to calculate:
The problem is extended to the whole support system. There are b bases, so the availability A is as follows:
- (6)
- Support system availability 
The specific calculation sequence of support system availability is shown in 
Figure 10. First, according to the base LRU spare parts’ demand rate solved by the demand rate solving module and Formula (30), the single equipment demand rate is a function of the base LRU spare parts demand rate. So, the single equipment demand rate is obtained. Second, according to the base LRU spare parts support delay time solved by the spare parts demand–supply module and Formulas (31)–(33), the single equipment supply rate is a function of base LRU spare parts demand rate and support delay time. Therefore, the single equipment supply rate can be obtained according to the LRU spare parts demand rate and the support delay time. Then, according to 
Figure 15 and Formula (34), the base I system state steady-state probability is a function of single equipment demand rate and supply rate. It is the function of base LRU spare parts demand rate support delay time. Therefore, combining the above two, the base I system state steady-state probability can be obtained here. Next, according to Formula (36) and 
Figure 15, the base I equipment availability is a function of the base I steady-state probability in each system state. It is also a function of the base I LRU spare parts demand rate and support delay time. Therefore, the base I equipment availability can be obtained here. Finally, it can be seen from Formula (37) that the whole support system availability is a function of the base I equipment availability, which is also a function of the base LRU spare parts demand rate and support delay time. Therefore, the availability of the whole support system can be obtained from all bases’ equipment availability of the system.