## 2 Materials and Methods
### Mathematical Model
\begin{table}
\begin{tabular}{c l l} \hline \hline \multicolumn{3}{c}{**Sets**} \\ \hline \(i\), \(j\in I\) & : & All nodes; \\ \(N1\subseteq I\) & : & Set of petroleum plants belong to the first level of the supply chain; \\ \(N2\subseteq I\) & : & Set of petroleum plants belong to the second level of the supply chain; \\ \(N3\subseteq I\) & : & Set of demand nodes; \\ \(S1\subseteq I\) & : & Set of storage tanks belong to the first level of the supply chain; \\ \(S2\subseteq I\) & : & Set of storage tanks belong to the second level of the supply chain; \\ \(R\) & : & Set of raw material imported from upstream of the supply chain to the first level; \\ \(P\) & : & Set of products processed at level 1; \\ \(B\) & : & Set of products processed at level 2; \\ T & : & Time horizon. \\ \hline \multicolumn{3}{c}{Indices} \\ \hline \(t\) & : & Time periods in weeks, \(t=[1,2,\ldots,T]\); \\ \(r\) & : & Raw material imported from upstream, \(r=[1,2,\ldots,R]\); \\ \(p\) & : & Product produced at level \(1\), \(p=[1,2,\ldots,P]\); \\ \(b\) & : & Product produced at level 2, \(b=[1,2,\ldots,B]\). \\ \hline \multicolumn{3}{c}{Decision Variables} \\ \hline \(Y_{\beta}^{r}\) & : & Supply of raw material \(r\) from upstream to plants belong to first level \(i\in N1\) at time \(t\); \\ \(X_{\beta}^{r}\) & : & Flow of product \(p\) from plant \(i\) to customer/plant \(j\) at time \(t\); \\ \(X_{\beta}^{r}\) & : & Flow of by-product \(b\) from plant \(i\) to customer/plant \(j\) at time \(t\); \\ \(I_{\beta}^{r}\) & : & Inventory level of product \(p\) at time \(t\) at plants of level 1; \\ \(I_{\beta}^{r}\) & : & Inventory level of product \(p\) at time \(t\) at plants of level 2; \\ \(I_{\beta}^{r}\) & : & Amount of product \(p\in P\) produced above, below the demand of demand node \(i\in N3\) \\ \(x_{it}^{p+}\) & : & during time \(t\in T\); \\ \(x_{it}^{b+}\) & : & Amount of product \(b\in B\) produced above, below the demand of demand node \(i\in N3\) during time \(t\in T\); \\ \(St_{it}\) & : & \(\left\{\begin{array}{l}1\text{ if plant }i\text{ starts its maintenance at period }t,\\ 0\text{ otherwise}\end{array}\right..\) \\ \hline \multicolumn{3}{c}{Parameters} \\ \hline \(D_{t}\) & : & The duration of maintenance for the plant \(i\). \\ \(R_{a}\) & : & The manpower required for maintaining plant \(i\) during time \(t\). \\ \(W_{it}\) & : & The total manpower available for plant \(i\) during time \(t\). \\ \(Cat_{i}\) & : & Capacity of plant \(i\). \\ \(CS_{i}\) & : & Capacity of storage tank \(i\). \\ \(Cr_{ij}\) & : & Capacity of route connecting plant with plant/customer \(j\). \\ \(D_{t}^{\mu}\) & : & Demand quantities of product \(p\) at demand node \(j\in N3\) at time \(t\). \\ \(D_{t}^{\mu}\) & : & Demand quantities of by-product \(b\) at demand node \(j\in N3\) at time \(t\). \\ \(L_{\beta}^{r}\) & : & Lost sales of products \(p\) at demand node \(j\in N3\) at time \(t\); \\ \(L_{\beta}^{s}\) & : & Lost sales of by-products \(b\) at demand node \(j\in N3\) at time \(t\); \\ \(Cm_{\beta}\) & : & Cost of maintaining plant \(i\) at time \(t\); \\ \(Cp_{\beta}^{r}\) & : & Cost of processing raw material \(r\) at plant \(i\) at time \(t\); \\ \(Cp_{jit}\) & : & Cost of processing product stream \(X_{\beta i}^{r}\) coming from plant \(i\) and processed at plant \(j\) at time \(t\); \\ \(Cp_{jit}^{r}\) & : & Cost of shipping product \(p\) from plant \(i\) to customer/plant \(j\) at time \(t\); \\ \(Cp_{jit}^{r}\) & : & Cost of shipping by-product \(b\) from plant \(i\) to customer/plant \(j\) at time \(t\); \\ \(w_{it}^{p+}\) & : & Cost incurred due to producing product \(p\in P\) more than, less than the demand of node \\ \(w_{it}^{p+}\) & : & \(i\)\(N3\) at time \(t\in T\); \\ \(w_{it}^{b+}\) & : & Cost incurred due to producing product \(b\in B\) more than, less than the demand of node \\ \(H_{t}^{c}\) & : & Inventory holding cost of product \(p\) per period \(t\) at plants \(i\) of level 1; \\ \(H_{c}^{c}\) & : & Inventory holding cost of product \(b\) per period \(t\) at plants \(i\) of level 2; \\ \(Sp_{ji}^{r}\) & : & Selling price of product \(p\) at demand node \(j\in N3\) at time \(t\); \\ \(Sp_{ji}^{r}\) & : & Selling price of by-product \(b\) at demand node \(j\in N3\) at time \(t\); \\ \(w_{it}^{p}\) & : & Composition of product \(p\) obtained from raw materials streaming from upstream to the \\ \(w_{it}^{p}\) & : & Plant \(i\) at time \(t\); \\ \(w_{it}^{b}\) & : & Composition of by-product b obtained from product \(p\) streaming from plant \(i\) to plant \(j\) at time \(t\); \\ \(OPEC_{t}\) & : & Market share of crude oil specified to an oil production country at time \(t\). \\ \hline \hline \end{tabular}
\end{table}