Research Article

GravCPA: Controller Placement Algorithm Based on Traffic Gravitation in SDN

Algorithm 1

Subdomain Division Algorithm (gravSDA).
Input:
Output:
Initialize:
calculate values using equations (4) and (5)
 = sorted (, key = lambda )
Process
1 while is change and do
2  
3  for node in do
4   
5   ifthen
6    update and is change
7    
8   end if
9  end for
10   = sorted (, key = lambda )
11 end while
12 for node in do
13  
14 end for
15 return subDomain
Function 1 findMaxNeighbors label:
16 
17 for node in do
18  
19 end for
20 return