## 2 Literature Review
These were classified according to the integration of occupancy information with control systems, and the strengths and limitations of the research, as well as research gaps in this field, were discussed from different aspects, including performance evaluation metrics, control methods, occupancy models, and building types. Predictive control strategies were proposed in the literature as a solution to this issue by enhancing thermal comfort of occupants, and the review revealed that MPC was the most frequently employed approach for occupancy-based optimal control in the literature. Model predictive control (MPC) is a control scheme that employs a model to anticipate the future behavior of a system over a finite time horizon. Based on these predictions and the current measured or estimated state of the system, the optimal control inputs with respect to a defined control objective and subject to system constraints are calculated. Subsequently, after a defined time interval, the aforementioned measurement, estimation, and computation process is repeated with a shifted horizon. The principal benefits of MPC in comparison to conventional reactive control methodologies, such as PID, are as follows. Firstly, the characteristic of proactive control action, whereby the controller anticipates future disturbances and setpoints, is worthy of note. Secondly, MPC can explicitly consider nonlinear systems. Thirdly, MPC can accommodate arbitrary control objectives, including traditional set-point tracking and regulation, as well as economic MPC, where control actions are optimized to satisfy generic economic or performance cost functions. Finally, MPC explicitly considers physical, safety, or operational system constraints. MPC was first introduced in the 1980s for the regulation of processes in the chemical industry. However, it was not until the 2010s that its use experienced significant growth in the field of thermal regulation for buildings, due to the high computational requirements needed [32]. A first implementation of the present model predictive controller applied to the temperature control of a real building was presented in [33]. The paper [34] presented a unified framework for model predictive control (MPC) technology in building management, with a particular focus on real-world applications. From a theoretical perspective, it provided an overview of MPC formulations for building control, modelling paradigms, and model types, together with the algorithms necessary for real-life implementation. Similarly, an overview of the applications of MPC in building HVAC systems has been provided in [35]. Furthermore, the article discusses modelling techniques and optimization algorithms in greater detail. The reference [36] developed a machine learning-based MPC with an instantaneous linearization scheme, linear MPC, to control the indoor climate of a hospital. Although the approach is advantageous for computation time, the cooling energy consumption of MPC without linearization is still lower than that of linear MPC. In reference [37], temperature and humidity are considered but not for renewable energy systems. The objective of [38] was to examine advanced control strategies and their influence on buildings and technical systems with regard to energy and cost savings, addressing research gaps in advanced control strategies for buildings and HVAC systems. Their findings indicate that, despite the prevalence of MPC in building applications, it is not optimally suited to systems characterized by uncertainties and unpredictable data, and significant advancements have been made, especially as more intelligent technologies, such as cloud computing and IoT, are being developed. The principal objective of the paper [39] was to define the MPC formulation framework and undertake a critical analysis of the results produced by a range of existing MPC algorithms for the management of building and HVAC systems. The potential benefits of the application of MPC in improving energy efficiency in buildings were highlighted.