## 1 Introduction  
The effective management of environmental factors such as temperature, light, humidity, air quality, and occupancy is essential for an efficient working environment. Research has shown that optimizing these factors has positive effects on concentration, productivity, and overall performance [1]. In contrast, external environmental factors--such as air pollution and extreme temperatures--have negative impacts on human health and work performance [2]. Additionally, the extremities of indoor temperatures are highlighted as having adverse consequences on productivity and general health [3]. Elevated CO\({}_{2}\) levels in indoor air can lead to a decline in cognitive functions, difficulty concentrating, and overall fatigue. Inadequate ventilation can exacerbate these effects, while regular ventilation is critical for maintaining indoor air quality [4]. Additionally, exposure to noise has been found to disrupt teaching and learning processes, with noise levels influencing the perceived learning performance of students [5]. The quality of the learning environment also plays a crucial role in academic performance. Natural light, in particular, has been shown to improve health, satisfaction, attention, and performance for students and staff [6]. Moreover, lighting such as blue-tuned white light has been found to enhance cognitive function and reduce eye fatigue, benefiting environments where long periods of reading and research occur, such as libraries [7]. Today, university libraries have evolved into dynamic, technologically advanced spaces that support academic and social development. In this context, fog computing plays a vital role. Fog computing is a distributed computing paradigm that processes data at the network's edge, reducing latency and improving efficiency. The low latency and mobility support offered by fog computing in real-time applications, such as IoT devices and smart cities, also provide significant benefits in managing environmental factors in library settings [8]. By enabling real-time data processing from sensors, fog computing allows for the effective monitoring of environmental factors such as temperature, humidity, and air quality in library spaces, enhancing user productivity [9]. Furthermore, combining fog and cloud computing offers an ideal solution for managing large-scale data processing and storage needs in libraries, improving efficiency and reducing costs [10]. University libraries, as fundamental pillars of higher education, serve as central spaces for access to information, learning, and research processes for students, academics, and researchers [11]. These libraries are public spaces that play a crucial role in providing access to information, supporting learning, and facilitating research activities for both students and academic staff [12]. Today, these spaces are defined not only as providers of information but also as dynamic structures that support academic and social development, responding to changing needs [13]. Therefore, the design and management processes should be organized in a way that aligns with the institution's educational goals and addresses the evolving needs of users. In recent years, rapid advancements in educational technologies and changes in learning habits have led to significant transformations in libraries [14]. Although the focus of this research is specifically on university libraries, this choice is not arbitrary. Libraries present a unique context for environmental optimization due to their distinct characteristics, such as their diverse user base, fluctuating occupancy rates, and the need for a conducive atmosphere for study and research. Unlike other settings like offices, restaurants, or industrial environments, libraries face specific challenges in creating an optimal environment that supports both individual and group activities, making them an ideal case study for this research.