User-centered Responsive Sunlight Reorientation System based onMultiagent Decision-making, UDaMaS

UDaMaS (Universal Daylight Managing System), is a user-centered responsive system for built scenarios that can reorient sunlight to improve light conditions in specific urban environments.This on-going research is based on developing more efficient energy/light supply methods through IoT (internet of things) and data mining based on the improved relationship with technology.A user centered responsive multi-agent system using norm emergence is proposed for controlling the efficiency of sunlight reoriented society of mirror robots. Society of robots will make decisions about which users to serve, depending on the users' requests through the UdaMas app.


SUNLIGHT AND TECHNOLOGIES AP-PLIED TO ARCHITECTURE
Natural light can improve economic, health, and quality aspects.Proper monitoring of sunlight can both reduce energy consumption (heating and lighting) and increase comfort levels (Brandi, 2012).The use of specific design techniques and careful orientation can optimize the availability of daylight.
Over/During the past few, more sustainable systems for illumination in our built environment have been at the core of numerous research projects.In 1996, Soler (Soler, 1996) already proposed the idea of a light shelf dependent used as a potential daylight device.As soon as the first ideas of bioclimatic houses [3] appeared, enhancing the possibilities of reusing sunlight was considered.Light tubes and light shelves have been industry-standardized to improve light conditions, proving that sunlight redirection is a feasible method (Mingozzi, 1996) (Kon-tadakis, 2017).Hybrid systems such as Wang's et al (Wang, 2013) optical collector for solar optic fiber lighting have been proposed.

Case study: a block in Barcelona's "Eixample"
Due to its repetitive pattern, the Eixample neighborhood represents a great opportunity for testing systems that have to adapt to different situations but still share blocks' key aspects.That is, different buildings -façade width, floor height and windows (number, size and shape)-that make up one single eightsided urban block.
"Teoría General de la urbanización" (Cerdà, 1867 (2012)), Cerdà stated his beliefs and ideas for a hectic daily life in the densely populated city of Barcelona defending the right for every citizen to live in a healthy environment.
Cerdà believed in the advantages of a compact city.Thanks to the careful distribution of the blocks, all the homes obtained double ventilation both from the street and from the inner courtyard of the block.The direction of the blocks ensured all flats were provided with natural light (Ticó, 2009).
A series of factors related to land speculation and profits led to a succession of modifications in Cerdà's plan that drastically increased the city's density: incrementing the depth of buildings, occupying the central area with low buildings and workshops, and standardizing the four-sided block over the twosided block, as originally planned by Cerdà (Busquets, 2004).

The Sustainable Urban Mobility Plan and "the efficient block"
Since the 1990s several regulations have been studied to try to reincorporate Cerdà's initial ideas on hygiene and sustainability.For example, the goal of the global plan for the recovery of the inner courtyards of the 'Eixample' in the year 2000 was for one out of every nine blocks to have a public interior space before 2010 in order to win back open spaces less than 200m apart from each other (Pazos, 2014).
Also, the Sustainable Urban Mobility Plan of Barcelona (PMUS in Spanish) was approved by the City Council in March 2015, after a participatory process of two and a half years.The Plan is based on superblocks, defining what they call Ecosystemic Urbanism, and also, on the idea of "the efficient block".So that, the objective of increasing the ratio of public green areas per inhabitant to 5m2 per capita was established then (Pazos, 2014).
To reach that goal, 3 scenarios are proposed as the current situation is far from that desired objective.They were defined by A.S. Rueda in 2016 (Rueda, 2016).For the purpose of this research the third scenario is the most relevant: To add a new green surface inside the blocks, as out in the Regulations approved in 2000.
For these reasons and the abovementioned Cerdà principles, the research is based on Barcelona's Project "The efficient Block" (Barcelona, 2018), which tries to add more value to the city's effort of improving energy efficiency in its "Eixample" district.Therefore, the system will be located at the block's patios for reorienting sunlight towards the north façades (northwest and northeast) depending on user's needs.

Architecture, sunlight and human health
One of the key issues for Cerdà when defining inner courtyards was the optimal planning of natural lighting, providing sustainable solutions including great visual comfort.So that, the role of sunlight in the life of human beings can be considered fundamental.
Ne'eman et al published the results of a survey conducted of 647 users of four types of buildings (houses, schools, offices and hospitals) in London (Ne'eman, 1976).Despite the fact that the results were linked to the kind of building, A. Aguilar (Aguilar Sánchez, 2014), concludes in her thesis that some generalizations can be established in relation to the presence of sunlight in the different spaces.
Neer's research focuses on the spectral quality of solar light demonstrating the required light levels are high (5000 lux) and are quite far from the real building situations.
Hence, the following points were considered for the Façade Filter Module (FFM) design of the system (later on described as subsystem 2): • Sunlight must not affect the surfaces on which users develop visual tasks.• Solar reflexes can be tolerated on surfaces other than those of work.• An uncontrolled light contrast causes glare but, designed and controlled, gives rise to interesting reflections.• Window size.Boubekri et al. (Boubekri, 1991).• Window position.
• Size of source and amount of sunlight.

Solar exposure analysis
As A. Curreli (Curreli, 2015) states in her thesis, in the case study scenario in Barcelona, the overall orientation of the Eixample pattern is positive as far as energy efficiency is concerned.However, she adds some important considerations regarding the distribution of solar radiation and the efficiency opportunities for a passive use of the sun on the façades.In that sense, the most critical consequence for the indoor spaces that only overlook the north side of the block is that they do not have the chance to enjoy the benefits of direct sunlight precisely when the thermal and lighting demands are the highest.In fact, the author points out that this condition is found in several blocks of the Eixample district, where the large size (25-30 m) of the blocks requires reconsidering single dwellings.The author considers the possibility of improving the solar performance of the façades to a certain extent in winter.It is therefore mandatory to build a system that can adapt to the heterogeneity of the Eixample.Our Solar Exposure Analysis was developed parametrizing the sun path over a theorical-standard block based on current urban regulations (figure 2).Seasons across the year were remapped so as to acquire equal importance, and so summer does not have more impact because it is longer (Huellasolar, 2018).
Initial results show that almost half of the homes (44.74%) are below average, the majority of them being in very low sun exposure conditions (40.97% receive less than 25% of sunlight).Because of the excessive fragmentation of the Eixample, most of the flats only have access to one façade, which means there is still room for improvement.
A first estimation for the application of the UDaMaS in the center of the inner courtyards of the Eixample provides better results: 40.14% of the very low bracket is upgraded to high solar exposure (50-75% exposure).On top of that, the upgrade addresses the worst situations in the inner south corner, which represent 24.97% of the inner north façades.For the purpose of this research, solar access is defined by the urban fabric, the location of the buildings and the portion of sky visible to the user.

UDAMAS. SYSTEM DESIGN & CONFIGU-RATION
In 1996 Kaiser (Herzog, 1996) identified three kinds of sun use that should be taken into account and guaranteed in an urban environment: individual use, technical and social use.
According to this approach, converting solar inputs into urban project actions must be carried out through micro-surgery operations, as defined by the Barcelona architect Solà-Morales.This means acting in the urban fabric through minimal interventions tailored to the existing environment.

Introduction
Y. Shoham introduced "Agent Oriented Programming" (Shoham, 1993) as a new programming paradigm, based on a societal view of computation.The key idea proposed was based on directly programming agents in terms of intentional notions like belief, commitment, and intention.
The motivation behind said proposal was to use the intentional stance as an abstraction mechanism for representing the properties of complex systems.In the same way we use the intentional stance to describe humans, it might be useful to describe the programming of machines.
Multi agent systems, agents as a tool for understanding human societies, from the very first samples by A. Turner and his team (Turner, 2002), have provided a novel new tool to simulate societies which may help shed some light on various kinds of social processes and the way humans interact with their built environments.

Definition of the system
The sunlight in the patios is reconsidered as the increasing segmentation of flats, deprives numerous façades of sunlight.The system developed for the project considers the patio façades oriented to the north (northeast and northwest).
Because of the aforementioned reasons and the idea of the robotic system being a dynamic element that could help increase dynamism in the relations between users and the public space of the patios through its sculptural qualities, the majority of the UdaMAs will be installed in the recovered patios.Depending on the users' requests, the data read, preestablished preferences, and the weather conditions and solar time throughout the day and year, the system decides which users will get the re-oriented sunlight, for how long and for what particular rooms in their homes.The use of pre-installed filters on façades, the type of lighting and its intensity can be customized, and unwanted looks can be prevented.
The system proposed for sunlight reorientation is divided into various sub-systems: 1. Sub-system "Block courtyard central reflector system" (BCCRS): A robotic system composed of a number of long "tentacles", each of which is connected to an orientable mirror at the top part.The system is installed in the patio and interacts through sensors and the user's data.Dynamic mirror units interpret the movement of other units to avoid not only mirroring the same user, but also to prevent paths from crossing, collisions, and shadowing.A multiagent system using norm emergence makes the decisions about which users to serve and how to behave.The decision-making outputs are: on/off unit, user unit to mirror and path to follow.2. Sub-system "Façade Filter Module" (FFM): An affordable easy fabrication filter pre-installed on the façade that will be able to provide users with different types of light, intensity and color.Decision-making outputs are: on/off mechanism and filter type to deploy depending on pre-set preferences of users.3. Sub-system "app/interface for user inputs and preferences": A web platform-mobile app that gathers users' data from sensing devices in their homes and also from users' lighting preferences.
The human/home inputs (HHi) are: Body Tª and Heart Frequency (Body related variables), Lumens and Temperature (Interior space related).User Preferences (UPre) are: Type and intensity of light (for type of FFM activation); Lighting desired schedule; Weather input (We), differentiating night/day, on/off solar energy capturing, month and sunny/cloudy.

Main characteristics of the system
The system's algorithm is a self-organized multiagent system so every patio is mapped as the agent system's environment and a number of agents are placed in all the patios, equal to the number of dynamic mirror "tentacles" installed in them.
The main idea of the experiment was not only to understand all the system variables, system efficiency and possible user customization, but also to be able to understand the decision-making process of the agents.The main aim of the research is a bottom up creation of complex social behavior that is supposed to occur based on local interactions between agents lacking a central authority acting over the system.
It is essential for the balance of freedom of election and movement for every agent to develop understandable social behavior.We are looking for emergent behavior at the system's macro level, based on micro-levels behavior and interactions.
The agents all belong to the same class in the first experiments, although different kinds of agents will be added in later tests.A smell agent will be coded with the intention of trying to avoid the need of a coordinator agent.
Agents are supposed to be capable of: • Independent action for agents regarding user action and needs to reach objectives through autonomous action in the environment.• Interaction.
• Cooperation, coordination and negotiation: different components of the system will be able to cooperate and compete if necessary.• Move freely in the environment with the only condition of not crashing into another agent or trail and being forced to negotiate when that happens.
• Negotiate in a further research situation and proposed agreements with other agents when their paths are colliding or crossing to reach an aim.

Phases defined
Phase 1.Initial implementation: The first experimental phase is developed from a mere architectural background.After a simple abstraction of the environment and solar exposure calculation, communication between agent trials will be developed.The main characteristics of this first research phase are simplification and abstraction to test the communication and system efficiency in responding to user needs.This phase, described in this article, is characterized by the language used.No agent-based archetypes are used in an effort to understand variables influencing the future agent society.Phase 2. Implementation of Agent Oriented Language Archetypes: Agent based language is implemented while data keep being virtual and pseudo-randomly generated.AgentSpeak using Jason is applied and the environment is coded in JAVA.3D environment and a User's app are also introduced.
Phase 3. Real scenario data evaluation: After developing the UdaMas App, some real data will be implemented for softbots behavioural studies.

Definition of agents & the environment
For the purpose of this research, the agents are Intelligent Agents, incorporated in a computer system able to perform flexible autonomous actions in the environment.The first implementation, prior to developing a real mechanical scenario test, is based on the design of the agents as merely virtual, softbots, within a virtual environment.
For the purpose of this research, the definition of the environment is characterized by (Haddadi, 1996): Inaccessibility, dynamism, un-determinism, continuos and non-episodic.
The future physical software agents will be locked on their XYZ coordinates at the tentacles' base, which means the initial position of every robot, when not operating, will always be on the same XYZ coordinates and all the tentacles will be vertically positioned.The physical units of the future design will be non-mobile robots arms systems locked on their foundations to the ground.
With regard to their internal architecture, the agents chosen are not purely reactive.Understanding every iteration of the system of the real environment situation versus the expected environment situation is of utmost importance for the decisionmaking process in this research.
Two types of agents are considered as possible options forming hybrid architecture: Reactive agents with an internal state and Deliberative agents (with either expected utilities or specific goals).
The implemented BDI (Belief-Desire-Intention) Agents and their BDI-based agent architecture, the PRS, count on each agent being equipped with a plan library, representing that agent's procedural knowledge: knowledge about the mechanisms that can be used by the agent in order to realize its intentions (Dignum, 2004).
The options available to an agent are directly determined by the plans an agent has and for the first phase of our research that plan library will be coded manually in Java.An agent with no plans will be considered as an agent with no options.As PRS agents, they will have explicit representations of beliefs, desires, and intentions.
The agent's social abilities will be the basis for the type or coordination implemented as well as for the degree of coordination (Rosenschein, 1994).Competition is not a priori considered useful for this particular case and neither is centralized coordination trusting emergent social abilities of the system.Therefore, several social abstractions will be implemented: trust, reputation and the possibility of an emergent social structure or role as pointed out earlier (Mui, 2002).

System's language
Some simple environments were ruled out at the beginning of this phase.After rejecting StarLogo because of its simplicity, NetLogo and Repast were considered.They were dismissed due to the difficulty of drawing a 2D environment that could easily be transformed into a simulation of the real 3D environment of every patio in the future.Finally, Java (through Processing) was chosen to develop the first phase of the research.
Communication between agents turned out to be inefficient without the implementation of an agent-based language.One of the best-known approaches to develop cognitive agents is the BDI architecture.A simple simulation was coded using this architecture for the first phase.

Definition of variables & environment mapping methodology
The development of a multi-agent system should fruitfully exploit the higher-level abstractions that follow (Shoham, 1997): • Agents, autonomous entities, independent locus of control situated in an environment, interacting with each other.• The environment, entities and resources agents perceive, control, consume or exploit.• Roles and interactions: identify functionalities, activities, responsibilities and patterns.• Organizational Rules, which can be constraints on roles and interactions or relations between roles, between protocols interactions, roles, protocols, and between roles and protocols (open/close systems).
Prior to the final decisions on abstract mapping of the environment for this first case study, variables influencing the system were collated and studied.The variables for this phase are directly related to the decision-making of the agents but in phase 2 they will be kept locked within the Java environment and transformed into beliefs, desires and intentions.The variables influencing the system were divided into two types according to their dependency.: Environment dependent (Variables dependent on environment reading) and User dependent (variables dependent on user needs, pre-sets and requests).
Some of the variables have not been implemented at this stage of the research as they are considered matter of further research based on more complete and complex experiment trials for the UdaMaS.
In the case of the wearable device variables, the user can choose to wear the device (checking body temperature and heart frequency) at home or not, but it is dismissed for this stage.The second type of variables that will not be implemented during initial testing are the mirror orientation angle because of the initial simplification in this phase of the project.
This first phase of the study will be based on: Room Lumens requested, façade system filter requested to be applied (four types considered), Temperature of the room, type of room (2 types considered), Number of users requesting the service.
As shown in the image below, the façade considered for this case study has a mixture of typologies of windows and types of rooms.
For the purpose of this initial study and mapping, only the façade that is oriented to the north will be considered, dismissing the part of the lateral façades that are oriented towards the northwest and north-east.A 2D environment was mapped including 84 windows that were considered to be the kind of windows used in rooms often lacking natural sunlight: living rooms and bedrooms.Small windows like the ones used in bathrooms are ruled out.Users presets through the app are represented inside each window by means of a color circle.Also windows colored in orange mean to represent users requesting the service.So that for every window, as shown in the image: • Circle 1, Façade filter request number: 1=yellow,2=red,3=blue,4=green.• Circle 2, room type: living room=grey, bed-room=black (random at this stage).• Circle 3, room Tª: ok=grey, too high=white (so if >27º system off ). • Circle 4, room Lux: ok=grey, too high=white (so if >500lux system off ).
After installing the mirrors within the 2D environment, an experiment will be carried out through a random number of users requesting the service and through the system composed of ten orientable mir-rors.As the 2D environment is an abstract simplification, the movement of the mirrors will also be abstract, considering their 2D paths and not the 3D behavior using XYZ coordinates.
Once the mirrors have been installed, a random requested user pattern is generated for the façade.Then, a generation of random agent movements is initiated to be studied and a smell agent is created to avoid collisions.Also pre-sets of the users through the app have been represented graphically inside each window by a color circle.

SUBSYSTEM 3, UDAMAS APP-INTERFACE FOR USER PREFERENCES
The role of the inhabitants of the block is crucial for the purpose of this research.As it is a user-centered computer system interacting with the built environment, an important step in the system design is to choose which the role of the user, the block inhabitant, will be.The user flowchart has been designed to clarify not only its degree of interaction with the whole system but also its ability to customize it depending on particular user needs.Users can track all the values depicted in figure 7., as well as customize presets manually, but the final purpose is to translate all data in a few modes that the device will later manage and predict itself.The main focus of the design were usability and user-friendliness, it was decided to divide App features depending on whether the user navigates through environment or user-dependent variables situations.

Solar exposure conclusions
Due to the consecutive subdivision of the flats in the blocks of the Eixample, the amount of sunlight has become reduced as mentioned in section 1; 44.74% of the flats facing courtyards in light conditions are below the WHO requirements.Further research and estimations show that the iconic blocks of the Eixample district are an ideal location to test this kind of systems, allowing 40.14% of the 'very low' bracket to be upgraded to high light conditions (figure 5).

First phase achievements: initial implementation
Visual parametric add-ons for Grasshopper3D like Culebra, VOID, and Quelea have proven insufficient to embed all the rules and emergent behaviour needed for a multi-agent-based system capable to learn from user interaction and be aware of the environment.
As mentioned, a virtual abstraction of the real environment for testing was decided to be coded in Java.The results of programming out of a built-in platform for agent communication were divided in three sub-phases/tests.The first one was based on just one agent reading the environment and acting on it, being merely a virtual robot.This one agent was able to understand the environment and make decisions regarding which user to provide the service with by simply using comparative probability based on experience.Memory and experience-based learning thus validated the decision-making process.
The second sub-phase was devoted to test communication.Two agents were coded and placed in the patio.Both, after having mapped the envi-ronment for the first time, were supposed to start communication in real time and to exchange experience and feedback.Both agents demonstrate they communicate adequately (message and blackboard were tested) and collaboration in information exchange and decision-making was within the acceptable range of error and time relevance.
It was during sub-phase three when communication protocols showed that a high-level language implementation was highly needed.Eight agents were installed in the patio for a maximum range of 84 windows as described earlier.The results indicated communication was too slow and therefore inefficient, as the decision-making process was not being timeefficient enough to avoid path interferences.Time is not only relevant, it is also the basic measure for the agents so they can react in time to avoid paths from crossing and collision.Nevertheless, it was impossible to prevent the paths from crossing because the minimum safe distance was not observed.Hence, the last steps of this first phase were not as satisfactory as expected.The blackboard method and message passing communication did not lead to efficient enough decision-making.

FURTHER DEVELOPMENT 5.1 Preliminary project impact
The a priori expected results based on the project proposed recover Cerda's initial concern about sunlight through a simple AI based system, incorporating another inhabitant-environment interaction in the historically important neighborhood.Previous examples and initial research on light devices and sun redirection support the feasibility of the project.
Moreover, preliminary estimations of sunlight improvement are relevant enough to address the issue (see section 4.1).
The final stages of the project will incorporate: • Custom solar exposure analysis adapted to different environments.• Window image recognition to suit the different façades • Lens and refraction studies to better manage sunlight • Robotics incorporation to express the decisions of the multi-agent system

Concerning coding language
As mentioned in the results section, communication between agents was inefficient without the implementation of an agent-based language.Jason is the first fully-fledged interpreter for a much-improved version of AgentSpeak, including speech-act based inter-agent communication.AgentSpeak has been one of the most influential abstract languages based on the BDI architecture.The type of agents programmed with AgentSpeak is sometimes referred to as reactive planning systems.Three languages were considered: JADEx, (as proper JADE only proposes merely reactive agents), JASON and 2APL.They were understood to be the main three archetypes for other languages.Because of its functionality, JASON was the language chosen for the last part of the research process, from phase 2 onwards.
The Agent-Oriented Methodologies considered for the next research phase are GAIA (which encourages a developer to think of building agentbased systems as a process of organizational design), Prometheus (which focuses mainly on the internal agent architecture; it is basically a methodology for designing BDI agent systems) and ADELFE (a methodology for the development of adaptive multiagent systems).The environment is considered dynamic and the system open.For the implementation of the second phase, GAIA v.1 will be is dismissed as it does not allow the social behavior required.(Kinny, 2000 ) GAIA v.2, despite allowing some social behavior the authors considered interesting is also ruled out due to the lack of environment dynamism.A priori, the architecture of Prometheus (Padgham, 2002) is the chosen methodology.
Therefore, system will be redesigned being defined by: Stakeholders (actors), Goals (establishing a clear goal diagram), Scenarios (user case scenarios) and Functionalities (Roles).
The interactions of the system with the environment are intended to be described in terms of Beliefs, Desires, Actions, Perceptions, Events, Plans and external data.In the current state of the research, we are developing the variable transformation of the already scripted abstraction of the environment in Java into formal semantics and data structures of Jason's agents.
Figure 1 Built volume evolution of Cerda's blocks from 1890 to nowadays by Cerdà.Values as green areas, sight views, ventilation and solar exposure are sacrificed.Source: Authors.(Barcelona, 2019) Figure 2 Sunlight distribution on inner courtyard façades.Source: AuthorsIn fact, the author points out that this condition is found in several blocks of the Eixample district, where the large size (25-30 m) of the blocks requires reconsidering single dwellings.The author considers the possibility of improving the solar performance of the façades to a certain extent in winter.It is therefore mandatory to build a system that can adapt to the heterogeneity of the Eixample.Our Solar Exposure Analysis was developed parametrizing the sun path over a theorical-standard block based on current urban regulations (figure2).Seasons across the year were remapped so as to acquire equal importance, and so summer does not have more impact because it is longer(Huellasolar,  2018).Initial results show that almost half of the homes (44.74%) are below average, the majority of them being in very low sun exposure conditions (40.97% receive less than 25% of sunlight).Because of the excessive fragmentation of the Eixample, most of the flats only have access to one façade, which means there is still room for improvement.On the right, sunlight brackets based on percent- Figure 3 On the left, breakdown of the four main ranges based on their exposure.Exposure is very/high or very low.It worth noting the second range (low exposure) is almost non-existent.
Figure 4 Diagram showing the cluster of mirrors reflecting different sun positions to light north façades.Plan, left.Section, middle.Detail, right.
Figure 5 Two main agents working on architectures initially proposed.Left, reactive agents' workflow.Right, deliberative agents' workflow.
Figure 6 Environment abstraction and mapping sample.
Figure 8 Initial agent's location and trainning tests.Two kinds of undesired behavior appeared: some agents became disoriented and although they did not collide, they were moving within the minimum safe distance range.