Research Article

GravCPA: Controller Placement Algorithm Based on Traffic Gravitation in SDN

Algorithm 2

Controller Placement Algorithm (gravCPA).
Input:
Output: dictionary structure:
Initialize:
Process
1for in do
2  
3  while and change do
4   
5   
6   
7   
8  end while
9   find the closest node to
10  
11  for in \{ for in if \} do
12    if calOptFunc  < calOptFunc
13  end for
14  
15 end for
16 return
Function 2 calOptFunc  int:
17 calculate the value of equation (7)
18 return