Input: An IR request R(s,d,C) and network topology G(V, E); Output: The best candidate spectrum block B and the routing path where the block is located; Phase I: Network Initialization (OHM routing process) 1: for each s-d pair in G(V, E) do 2: calculate all feasible routing paths; 3: calculate WP with Formula (2) for each feasible path of s-d pair; 4: choose the first K candidate paths according to the ascending order of WP; 5: take each s-d pair and the corresponding K candidate paths as key value pairs and store them in the dictionary RP. 6: end for Phase II: Dynamic Service Provision (MCF spectrum allocation process) 7: Extract K candidate paths corresponding to the requested s-d from RP; 8: for each path do 9: build the path resource model for path; 10: find all candidate spectrum blocks based on spectrum block search strategy; 11: for each spectrum block B do 12: calculate FM with Formula (7); 13: end for 14: end for 15: if candidate spectrum blocks exist then 16: determine the best spectrum block B with minimum FM; 17: assign the best block and the corresponding path to the request; 18: else 19: block the request; 20: end if |