## 2 Materials and Methods
### Case Study  
The Saudi Arabian oil and gas network was used to validate the proposed model. The entities of the oil and gas supply chain with the corresponding units and relevant data are reported below. The planning horizon was four years and discretized over 192 weeks. To simplify the development of a complex HCSC network, the supply chain was divided into two subnetworks shown in Figures 2 and 3. The HCSC network is a representation of Figure from [46]. The flow and operation of the HCSC is as follows: wellhead oil of different grades; Arabian light, Arabian extra light, Arabian medium, and Arabian heavy produced in upstream units of the HCSC are transported through pipelines to eight (8) oil processing plants for the processing and removal of sulfur. The crude oil is then transported to three (3) major international terminals and (9) local refineries where crude oil is transformed into seven (7) by-products (LPG, naphtha, gasoline, diesel, kerosene, fuel oil, and asphalt) based on their yield. Oil by-products are then distributed to meet the needs of local customers in the main five (5) regions of the Kingdom and three (3) major industrial cities. Parts of LPG, naphtha, and fuel oil are used to meet international demand through terminals. On the other side, the associated and non-associated natural gas streams produced at gas-oil separation plants (GOSPs) and gas fields, respectively, are transported to nine (9) gas plants for the impurity removal and recovery of hydrogen sulfide. The output gases are NGL and methane. The NGL is supplied to five (5) fractionation plants for the further separation and fractionation into gas products (ethane, butane, propane, and natural gasoline). Part of NGL is exported through international terminals to meet international demand, while methane and ethane are used to meet local demand. At the same time, propane, butane, and natural gasoline meet the demands of international and local customers. Entities such as oil processing plants, refinery plants, gas plants, etc. will be totally or partially unavailable due to failures or planned maintenance. Thus, their production capacity may be reduced or reached zero. Maintenance is used to restore these entities to their full capacity and keep them in good condition. Each HCSC plant is assumed to have its own storage facility to satisfy needs during planned and/or unexpected failures. In HCSC, inventory is an expensive asset that needs to be considered. Therefore, it is essential to manage inventory levels and capacities. Therefore, when optimizing the HCSC, there is a need to consider operation and maintenance activities in an integrated manner. In this study, a proposed MILP model will be developed and solved. The model will jointly  
Figure 3: The natural gas network. produce a maintenance schedule for each HCSC plant and operational plans such as production volumes, transported volumes, inventory levels, shortages, and excess volumes, etc. To develop a proposed model, the maintenance cycle and duration for oil processing plants, refinery plants, gas plants, and fractionation plants must be specified, and logical relationships between plants need to be considered. For example, dependent plants are preferred to be stopped for maintenance simultaneously. In addition, similar operating units cannot be taken for maintenance at the same time in order to prevent a huge loss in production. As per consultation with people working in the oil industry, the average maintenance duration for the HCSC plant is between 3-4 weeks. It is assumed that every HCSC plant needs to be maintained twice over the four-year planning horizon. The maintenance crew required to perform maintenance activity in each HCSC plant is ten workers, and the total number of crews available is 20. Every worker earns, on average $120 a week. Real data were collected from [1; 47; 48] and were used as input to the proposed model to evaluate its utility. To represent the above stated problem, the MIP model has been developed and solved using the CPLEX 13.3 commercial solver [49].