Research Article
IoT-B&B: Edge-Based NFV for IoT Devices with CPE Crowdsourcing
Algorithm 2
IoT-B&B cost estimation algorithm.
function CLOUDCOST | cpu_left | memory_left | link_bw_left | cost | for all do | cpu_left cpu_left − | memory_left memory_left − | link_bw_left link_bw_left − | end for | cost cost + cpu_left | cost cost + memory_left | cost cost + link_bw_left | return cost | end function | | function BNBCOST | cost | if user of does not own then | cost cost + | cost cost + | cost cost + | cost cost × | end if | return cost | end function |
|