## 4 MILP Optimization Model  
In this section, we focus on formulating the xHaul network planning problem for the Flex-O deployment scenario. The problem concerns the provisioning of optimized optical TPs, which assures the connectivity between a set of remote sites with the hub. In this study, the optimization goal of the network planning problem is to minimize the overall network cost (as discussed in Section 3.2), which is achieved by the proper provisioning and configuration of the TPs in the network. The problem consists in the selection of routes of the TPs as well as in the selection and placement of optical devices (MUXs and OADMs) on the TPs. The problem constraints are the following:  
1. A single TP (either direct or traversing) is selected for each remote node to realize the (wavelength) connections requests of the node. If a traversing TP is selected for a remote node to serve its connection requests, then it implies that an OADM of the capacity sufficient to add/drop the requested connections is installed on the TP at the node. 2. Each connection has assigned a dedicated wavelength on the TP by which it is served. The number of wavelengths assigned on a TP cannot exceed the capacity of the WDM transmission system. 3. The MUXs of the capacity sufficient to multiplex/demultiplex the wavelengths carried by the TPs have to be used at the end nodes of the TPs. The MUXs are not needed on the TPs that carry single wavelengths. 4. The maximum transmission distance of a TP, limited by the optical power budget and optical components of the TP (see Section 3.3), cannot be lower than the length of the TP. 5. The propagation latency of a TP must not exceed the available latency budget (see Section 3.4). We model the network planning problem as an MILP optimization problem. To this end, we define the following set of variables: **binary**
* \(x_{dp}\)--indicates that TP \(p\in\mathcal{P}(d)\) is established for demand \(d\in\mathcal{D}\);\(x_{dl}\)--indicates that wavelength \(l\in\mathcal{W}\) is assigned to demand \(d\in\mathcal{D}\);
* \(x_{d}\)--indicates that the TP established for demand \(d\in\mathcal{D}\) serves some other demand;
* \(y_{d}\)--indicates that demand \(d\in\mathcal{D}\) is served by a TP established for other demand;
* \(y_{d\bar{d}}\)--indicates that demand \(d\in\mathcal{D}\) is served by the TP established for demand \(\bar{d}\in\mathcal{D}\);
* \(y_{d\bar{d}}\)--indicates that wavelength \(l\in\mathcal{W}\) is used to serve demand \(d\in\mathcal{D}\) on the TP established for demand \(\bar{d}\in\mathcal{D}\);
* \(x_{d\bar{d}}^{\mathrm{H}}\)--indicates that the MUX of type \(m\in\mathcal{M}\) is used at the hub site on the TP of demand \(d\in\mathcal{D}\);
* \(x_{d\bar{d}}^{\mathrm{R}}\)--indicates that the MUX of type \(m\in\mathcal{M}\) is used at the remote site on the TP of demand \(d\in\mathcal{D}\);  
**integer**
* \(w_{d}\)--represents the number of wavelengths utilized on the TP established for demand \(d\in\mathcal{D}\);  
**linear**  
* \(u_{d}^{\mathrm{M}}\)--the attenuation of MUXs on the TP established for demand \(d\in\mathcal{D}\);
* \(u_{d}^{\mathrm{O}}\)--the attenuation of OADMs on the TP established for demand \(d\in\mathcal{D}\);
* \(z^{\mathrm{F}}\)--the overall cost of fibers used;
* \(z^{\mathrm{M}}\)--the overall cost of MUXs deployed;
* \(z^{\mathrm{O}}\)--the overall cost of OADMs deployed. In Table 1, we present the objective function and the constraints of the MILP optimization model developed for the cost-aware OADM placement problem. The optimization objective, expressed by (2), is to minimize the WDM optical network deployment cost, according to the cost model defined in Section 3.2. Constraints (3)-(6) concern the selection of TPs for particular demands. Constraint (3) assures for each demand \(d\) that either a TP is selected from the candidate set of paths and established for this demand or the demand is served by means of an OADM by a TP established for some other demand.