In this section, the traffic grooming, routing, and spectrum assignment (TG-RSSA) algorithm is proposed. In more detail, it grooms and releases traffic in available optical channels. If the available allocated resources are not sufficient to accommodate the increasing traffic, new optical channels are established. The decision on how these issues are addressed can significantly affect the network performance. To this end, we considered several grooming strategies and allocation algorithms . The first one determines how the traffic is groomed and released from the already allocated channels, while the latter one defines which SChs should be used to create new optical corridors when the need for a new one emerges. Moreover, we assumed that the empty SChs (i.e., the ones that do not carry any traffic) should be removed from the network immediately to allow other requests to have these resources assigned.
5.3. Traffic Grooming Routing and Spectrum Assignment Algorithm
Let us denote as the accessing operator of an element in a vector/list, e.g., is the i-th element of vector . Similarly, is an accessing operator of an element in a matrix, e.g., is the element located in the i-th row and j-th column of matrix . Moreover, we assumed that each SCh had the following properties: (i) flow , representing the traffic groomed in the SCh; (ii) capacity , defining the maximum flow that the SCh can accommodate.
Algorithm 1 presents the pseudocode of TG-RSSA. It takes three input variables—time perspective
T, where traffic changes, traffic grooming strategy
, and the channel allocation algorithm
. For each time point
, a traffic matrix
can be expressed as in (
1). The grooming strategy determines how the traffic is groomed and released in the available channels, while the allocation algorithm is applied when the assignment of a new optical corridor is needed. In Lines 2–5, variables are initialized, where
and
are the summary served and rejected bandwidth and
is the initially allocated traffic matrix that is equal to a matrix of size
filled with zeros. Allocated requests for each node pair are stored in
, where
is a vector of SChs allocated between nodes
u and
v. In the algorithm, traffic matrices are processed one-by-one for each time point (Line 6). Firstly, the traffic change for each node pair
is calculated by subtracting the current traffic from the one in the previous time point. Pairs of nodes are divided into two sets
and
. In
, pairs are stored for which the traffic is decreasing at the current time point, while in
, for which it is increasing. Firstly, traffic is released from the optical channels. To this end, for each node pair with decreasing summary flow (Line 10), a ReleaseTrafficFromChannels procedure is called. This procedure is responsible for removing specified flow from optical channels between a given pair of nodes according to the
strategy (Line 11). It returns the set of SChs
that are empty (do not carry any traffic) and that are released from the network (Lines 12–14). Next, the process of increasing the traffic between pairs of network nodes begins (Line 14). Firstly, node pairs are sorted in decreasing order of traffic increase between each pair, i.e., firstly, nodes are processed for which the summary flow increased the most. As it is not possible to determine whether all traffic can be groomed in the network in advance, variable
defines the actual value of traffic realized at each time point. Initially, it is equal to the value of
, and it is decreased accordingly if some of the bandwidth is rejected. Next, for each node pair with increasing traffic, it is checked if any new optical channels are required and traffic is groomed in already or newly allocated channels (Lines 17–21). Firstly, method FindAndAllocateChannels allocates new optical channels needed to support the flow increase. Note, the currently allocated channels can be sufficient, and in such a case, any new channel is not allocated. The procedure returns flow
, which cannot be accommodated in the current and new channels between the given node pairs. Next, the traffic is groomed in the available channels (Line 20) according to the
strategy. If any flow is rejected for the considered node pair, it is subtracted from the actually allocated traffic
. After processing each node pair, in Lines 22–23, the total summary served and rejected flows are updated based on the matrix of the actually realized traffic
and the initially requested traffic matrix
. Finally, the requested traffic matrix is updated, so the requested traffic change in Line 7 can be calculated correctly in the next iteration. The algorithm continues its execution until all of the traffic matrices are considered.
Algorithm 2 presents the ReleaseTrafficFromChannels procedure responsible for releasing groomed traffic from optical channels between node pairs
and
. The amount of flow to release is defined by input parameter
. In Line 2, the list of optical channels
between node pairs
u and
v is obtained from the matrix of allocated channels
. The channels are sorted according to the grooming strategy
(Line 3). The presented example assumes the BT strategy, where traffic is released from SChs with the higher starting slot index first. Note that changing grooming strategy
only affects this line of pseudocode. In Lines 4–6, variables are initialized: iteration counter
i, set of empty SChs
, and the remaining flow
that should be released from the channels. Next, the SChs are processed one-by-one untilall of the remaining flow
is released from them (Line 7). For each SCh, it is required either to release part of the flow (Line 9) or empty it completely, depending on the value of the remaining flow
. In the first case, the remaining flow
is released from the SChs’ flow. In the second case, the SCh becomes empty (no traffic is transmitted using this channel), and it is added to
. When all the requested flow has been emptied from the channels, the set of empty channels is returned from the method.
Algorithm 1: Traffic grooming, routing, space, and spectrum assignment (TG-RSSA) algorithm. |
|
Algorithm 3 describes the GroomTrafficInChannels procedure that grooms traffic in the available channels between nodes
and
. The amount of flow to groom is defined by input variable
. The pseudocode is similar to the one presented in Algorithm 2. Firstly, the set of SChs
between nodes
u and
v is obtained and sorted according to the grooming strategy
. The example is presented for the BT strategy; however, when changing strategies, only Line 3 is affected. The variable
holds the value of traffic that needs to be groomed in the channels, and it is initially equal to
. The available SChs
are processed consecutively, until not all the requested flow is groomed. In particular, if the SChs’
residual capacity is higher than the remaining flow
, the remaining flow is fully added to the current SCh, and procedure ends its execution. Otherwise, the flow of the SCh is increased to its full capacity, and the remaining flow is added to the next SCh.
Algorithm 2: ReleaseTrafficFromChannels. |
|
Algorithm 3: GroomTrafficInChannels. |
|
Algorithm 4: FindAndAllocateChannels. |
|
The FindAndAllocateChannels procedure is presented in Algorithm 4. It is responsible for evaluating if new optical channels are required to be allocated to support the flow increase between nodes u and v, or if the currently available ones are sufficient. In the former case, it allocates SChs according to the provided allocation algorithm . Firstly, the residual flow is calculated in the available SChs (Lines 2–4). In Line 5, it is calculated if the current SChs can accommodate the traffic increase and, if not, how much flow should be allocated to the newly created SChs. Note that there may not exist a contiguous spectrum block with capacity supporting the requested additional flow. In such a case, it is necessary to allocate multiple small SChs. Finally, when the network is congested, it may not be possible to find SChs of sufficient sizes to support all the flow. All of these cases should be considered, and to this end, the variable is created, indicating how much residual capacity is yet required while finding SChs and the variable, which is set to if it is not possible to find more SChs for a given node pair. In more detail, in the loop (Line 8), new SChs are found until either all the flow is addressed () or it is not possible to find new SChs (). Firstly, the SCh supporting all remaining flow is sought using the FindChannelForFlow method (Line 9). The FindChannelForFlow method finds the new SCh of at least the bit rate specified as a parameter, using the allocation algorithm , and returns nothing if it is not possible to find such a channel. Note that the capacity of the found SCh may be a little higher than the requested one due to the transceivers’ granularity and applied modulation format. If the SCh supporting all the remaining flow is not found (Line 10), the algorithm looks for a SCh of a smaller capacity. As it is not known in advance what the maximum supported flow of smaller available SCh is, the binary search is applied to find this (Lines 11–21). Let us denote as the minimum flow granularity supported by a single transceiver using the least effective modulation format (according to the network model, it is 100 Gbps). It is sufficient to find the supported flow in the binary search with the accuracy (Line 14). Next, in Line 22, the algorithm checks whether any SCh is found. If so, it is allocated, and the remaining flow is updated according to the SCh’s capacity. Otherwise, the variable is set to to break the search for new SChs. In the end, the algorithm returns the value of the flow that cannot be allocated in the created SChs.
Note, depending on the selection of the allocation algorithm, we refer to the traffic grooming algorithm as first fit traffic grooming (FF-TG), k-first fit traffic grooming (kFF-TG), and fragmentation-aware traffic grooming (FragA-TG).