**5. Conclusions, Future Work and Future Challenges**

A C2F2C based framework has been proposed and implemented for intelligently allocating the resources in the residential buildings. This framework is based on three layers where consumers' requests have been considered constant for every hour of a day. Two control parameters: clusters of buildings and load requests are considered from any region. Whereas the performance parameters are RPH, RT, PT and the cost (i.e., VMs, MGs and data transfer). The optimization of these parameters have been performed by the SJF, ESCE and RR algorithms in this study. Two scenarios are considered for simulations: resource allocation using MGs and resource allocation using MGs, electric vehicles and power storage resources. Each scenario is further categorized into two other scenarios: one DC with 25 VMs and two DCs with 50 VMs. The performance of the proposed framework has increased, i.e., 50% in scenarios *1(2)* and *2(2)* as compared to the scenarios *1(1)* and *2(1)* in terms of RT and PT. Tradeoff occurs in the PT, as our system has processed and received more requests and it takes a lot of time to process the consumers' demands. In scenarios *1(2)* and *2(2)*, tradeoff occurs in cost due to maximum resource utilization using proposed algorithm. Simulation results also show that our technique has outperformed the prior techniques in terms of the aforementioned parameters as shown in the simulation section.

We described a C2F2C framework with simulations to support our idea. We believe that there are many other modern solutions; e.g., use of SDNs or blockchain that could replace the role of the cloud. This is one of our future interests.

For substantiating the implications of this study, the following future challenges need to be tackled intelligently.


**Author Contributions:** S.J. and N.J. proposed and implemented the main idea. T.S. and Z.W. performed the mathematical modeling and wrote the simulation section. A.R. and A.H. organized and refined the manuscript.

**Funding:** This research received no external funding.

**Acknowledgments:** This work was supported by AI and Data Analytics (AIDA) Lab Prince Sultan University Riyadh Saudi Arabia.

**Conflicts of Interest:** All authors are agreed on this work. The authors declare no conflict of interest.

#### **References**


c 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
