# Using Convolutional Neural Networks for Blocking Prediction in Elastic Optical Networks
## 2 EON Network Simulator and CNN Input Data Generation  
To evaluate and simulate the spectrum allocation in EONs, the optical network between 14 cities in the United States, known as the NSFNET, is modeled. The NSFNET topology (shown in Figure 3) consists of 14 nodes and 21 bi-directional optical fiber links.  
In this work, each fiber is considered to have 160 available spectral frequency slots (FSs). Each slot could correspond to 25 GHz of spectrum, so the total bandwidth used per fiber would correspond approximately to the _conventional_ optical communication bandwidth (C-band). Without loss of generality, the current study could be extended to larger fiber bands or smaller FS sizes.  
Finding a suitable route and assigning the appropriate FSs between the lightpath source and destination is performed through the _Routing and Spectrum Allocation_ (RSA) algorithm. According to the connection request parameters, RSA chooses the appropriate route and allocates the required FSs. In the implemented simulator, the contiguity and continuity constraints are considered during the spectrum assignment.  
The simulator developed in [15] is used in this research. This simulator, developed using MATLAB, simulates the EON operation under dynamic load conditions while multiple end-to-end connections with different bandwidths are generated and torn down. The distribution of connections is uniform from 1 FS to 10 FS, while source-destination pairs are also uniformly distributed among all the network's nodes. The connections' inter-arrival time (IAT) is a Poisson process with an average value of IAT = 1 tu. (time unit). A negative exponential distribution is utilized for the connection holding time (HT). The average value (HT t.u.) is adjusted to set the appropriate network load values. These values should bring the bandwidth-blocking probability to the range of interest (between 1 and 10%), which are typical blocking values of interest in optical network performance studies [12].  
The spectral status of all the network links is continuously monitored and recorded during operation. The network status can be represented using matrices with a size of \(n\times m\), where \(n\) is the number of links in the network and \(m\) represents the number of frequency slots (FSs) within each link. The elements of each snapshot matrix consist of zeros and ones. A value of one indicates that the respective frequency slot is occupied, whereas zero denotes an empty frequency slot (see Figure 4).  
Figure 3: NSFNET topology [15].  
As the network operates over time, new connections are established, and old connections are eliminated, leading to gradual changes in the network's status at each time interval. Consequently, the status matrix of the networks is modified accordingly. The rows in this matrix correspond to the network links (42 links in the NSFNET) and the columns are the spectral FS (160 FS per link). The dataset consists of 90,000.csv files. Each one of these files corresponds to the status of all of the network links in every simulation time unit. These files were obtained from successive simulation runs where 4000 connections were generated per simulation run. As explained before, the average IAT = 1 t.u.; therefore, the obtained spectrum matrices correspond to approximately 4000 t.u., and different simulation results are collected and used as input data for blocking prediction.