Keywords

1 Introduction

Human activity is a highly complex process in which individuals not only decide about frequency of activities, but also about sequencing, timing and duration of activities. Most of the published studies on simulators of human activities are based on behaviorism models using psychological approaches. This paper presents a simulation of human activities based on a mathematical approach using the multiagent model. Experiments on real systems face many crucial problems—take too much time and face many technical problems such as limitations of sensors, loss of data during logouts, and more. In this context, building a simulator for generating data with the use of ideal sensors, configurable profiles of the inhabitants and flexible duration of experiments is very practical.

On the other hand, there are also complex systems proposals such as the Framework of Ubiquitous Healthcare System Based on Cloud Computing for Elderly Living, which are based on the smart phone capabilities and several sensors located within the environment (see [1] or [2]). The sensors transmit data into the computational unit which processes the data and executes actions on the actuators based on the built-in algorithms. Such complex systems can use information from smart phone sensors and combine it with sensors located within the environment [3].

With the increasing number of external sensors and different devices capable of measuring various biometric data, a large number of particular applications are coming into the market. New approaches and methods are studied and experimentally validated. Watch Dog system, for example, uses multicriteria Analytic hierarchy model to combine data from sensors with expert knowledge [4]. The Watch Dog application has been modified to be prepared to communicate with such sensors, process the data and send the results to the appropriate destination. Result of this process can be for example calling an emergency or just notifying relatives about non-standard situation.

External sensors capable of measuring various biometric data can be connected using the wireless technology such as Bluetooth. These sensors can measure, inter alia, blood pressure, pulse, temperature, moisture or the position of the limbs. All the information from sensors is processed in the device or in a case of more complex computation on the server application. The aim of the system is to evaluate the actual state of the monitored person according to the measured values and to make appropriate actions. Some of the measured values can be normal, some of them can be suspicious, and some can be strictly alerting. Suspicious values can signify danger only when are observed together with suspicious values from some other sensors. The importance of each sensor value can vary according to the context and so different types of dangerous situations can be expressed by a combination of measured values.

In the following, second part of the paper, ambient intelligence utilization for home health care is described. Third part contains information about usage of software AnyLogic for creation of an intelligent environment simulation. For better understanding of the dependencies in the simulation a concept map is created. Detailed description of simulated intelligent systems, residents and the simulation results are in the end of the third part.

2 Ambient Intelligence for Home Health Care

Recent intensive research of Ambient Intelligence approaches and applications has resulted in significant results in several specific areas oriented mainly on independent living support of seniors and handicapped persons. One of these—the Ambient Assisted Living (AAL)—has very close relations also with the eHealth area, and certainly with already matured technology of Smart Homes as well. According to a recent review [5], the technology of Smart Homes can be considered to be an instance of ambient assisted living technologies that are designed to assist the homes residents accomplishing their daily-living activities while preserving their privacy. The smart home technologies and solutions have already proven to be a good and acceptable alternative to formal care in hospitals and care homes.

Nehmer with his colleagues [6] emphasized, that Ambient Intelligence systems can be subdivided into three domains: emergency treatment and assistance, autonomy enhancement, and comfort features. According to them, emergency treatment is considered to be the core functionality of every AmI system, where it aims at early prediction and recovery from critical situations, like heart attacks, injuries or sudden falls.

The Smart Home technologies are considered to be a useful way to reduce living and care costs and to improve the quality of life for people with care needs. They have been applied already for many purposes like energy saving, security and safety, fall detection, light management, smoke and fire detection, etc. using various solutions such as video monitoring, alarms, smart planners and calendars, or reminders [5]. Equipped with sensors, actuators and cameras to collect different types of data on about the home and the residents, Smart Homes can enable automatic systems or caregivers to control the environment on behalf of the residents, monitor and even predict their actions and ubiquitously track their health condition (see also [7] or [8]).

Although the Smart Home technologies are a good way to reduce namely care costs, making use from the patient’s home environment, it is evident that the design and deployment of the appropriate sensors and other necessary equipment could be quite costly. Sometimes the results need not to be adequate for the particular usage, mostly because this kind of systems is extremely difficult to test and verify (cf. e.g., [9] or [10]). Therefore, various simulation tools and techniques are considered to be useful and applicable [11, 12], or [13]. A general architecture for testing, validating and verifying AmI environments, called AmISim, has been developed by Garcia-Valverde et al. [14]. A methodology for the validation of ubiquitous computing applications focusing on the use of artificial societies has been developed recently by Serrano and Botia [15]. A visionary paper introducing a number of new ideas in this direction was published by Ishida and Hattori [16].

3 Simulation

The aim of the project is to simulate an environment containing ambient intelligent features and to simulate behavior of residents. The simulation is mainly focused on an intelligent house or office equipped with different sensors and actuators. Various layouts of the house and location of the sensors can be created in the simulation model. Information from the sensors about residents is evaluated by the control system of the house and relevant actions are executed. Several relevant projects and studies can be found in [13, 14] or [15]. Advantage of our approach is in using a free multimethod simulation modeling tool AnyLogic (see, e.g., [17]). AnyLogic uses in-build elements as well as own Java code, which can be easily implemented in the project. Usage of Java enables to program own types of sensors, actuators and algorithms for evaluating the data. Sensors can be merged into the more complex systems. Currently, five types of such sensor systems are implemented and more will be added. It is worth telling that up to now we do not know about any paper focused on using AnyLogic for agent-based simulation of intelligent environments for inhabitants with special needs.

3.1 Example Study

This study is mainly focused on the monitoring inhabitants needs and their health statuses. Different situations affecting the inhabitants’ health are simulated. The most important among them is the situation of a heart attack occurring by some of the inhabitants. Based on the selected attributes which are health status, blood pressure, cholesterol level and smoking habits, there is the possibility of a heart attack. The reaction of the environment and EMR (Emergency Medical Responders) arrival in the case of a heart attack is simulated.

3.2 Concept Map of the Simulation

The problem of model identification is highly complex and only slightly structured task. During numerous interviews with experts, many more or less significant and sometimes even contradicting opinions have been proved. To be able to devise any functional and relevant model, some method of generalization of the initial ideas and knowledge should be applied. One well-developed approach, based on the specific domain conceptualization, can be supported by the use of several concept mapping tools.

Concept mapping was introduced in 1972 to meet the ability of people to acquire science concepts [18]. Underlying the research program and the development of the concept mapping tool was an explicit cognitive psychology of learning and an explicit constructivist epistemology. In 1987, collaboration began between Novak and Caas and others at the Florida Institute for Human and Machine Cognition, then part of the University of West Florida. Extending the use of concept mapping to other applications such as the integration of concept mapping with the World Wide Web (WWW) led towards the development of software that enhanced the potential of concept mapping, evolving into the current version of CmapTools now used worldwide in schools, universities, corporations, and governmental and non-governmental agencies [19].

The development of new products, services or processes involves the creation, re-creation and integration of conceptual models from the related scientific and technical domains [20]. Simplified conceptual model of interactions between the inhabitants and their environment, together with the structure of the environment is shown at Fig. 1.

Fig. 1
figure 1

Concept map of basic interactions within the simulation model

3.3 Model Prerequisites

Residents live in a house equipped with ambient intelligent features. There are five types of systems. First and second are more complex systems. Last three are basic systems. New simple and complex systems will be added during extension of this simulation.

Each of the following systems can be switched on or off before each simulation run and subsequent impact on the residents’ life can be tested. Systems are independent to each other.

  1. 1.

    Health emergency recognition system (HERS)

  2. 2.

    Smart heating system

  3. 3.

    Medicine reminder

  4. 4.

    Time to sleep reminder

  5. 5.

    Intelligent fridge

3.3.1 Health Emergency Recognition System

Health emergency recognition system (HERS) simulates a complex system composed of many sensors, which can recognize a critical situation—a person needs an urgent medical assistance. In such case, an EMR is called immediately. HERS is based on Watch Dog [4] and Hausy projects [21]. The Watch Dog is a mobile application for detection of life-threatening situations which is currently under development. Research is focused on a connection with the HAUSY (Home AUtomation SYstem). HAUSY is a system for a complex management of an intelligent house. The current implementation in the AnyLogic does not simulate each sensor of the HAUSY and Watch Dog separately. However the model simulates the behavior of such a system as a whole, and it is called HERS—Health emergency recognition system.

3.3.2 Smart Heating System

Smart heating system is a system based on temperature sensors located within the environment and actuators with the ability to close the windows. The temperature is set due to the preferences of the residents if are at home. During a day, when residents are at work, the temperature is lowered. Before arrival of the residents, the temperature is set to a preferred level again. If residents forget to close windows and leave the house, actuators can close the windows automatically.

3.3.3 Medicine Reminder

It is quite easy to forget to take a medicine or not to remember if a medicine has been already taken today. The Medical reminder simulates a simple system for reminding to take the medicine. More sophisticated systems for more serious situations when it is critical to take a medicine at the right time can communicate with the home system, and contact selected persons via the internet or SMS if medicine has not been taken.

3.3.4 Time to Sleep Reminder

Second of simple systems is Time to sleep reminder. The system reminds resident about time to go to bed every half an hour after the preferred time when a person should go to sleep.

3.3.5 Intelligent Fridge

Intelligent fridge enables to notify about an ending expiration date of the groceries. There is only a minimal probability of fall sick from the expired food if this system is activated in the simulation.

3.4 Residents

Residents are modeled as autonomous agents. Each resident has its attributes, needs and day cycle. Needs such as hunger gradually rise and if any of the needs is on a high level, residents do actions to fulfill it.

3.4.1 Residents’ Needs

There are basic needs: hunger, toilet, cleanness, energy and free time in this model. Important is also current health status of the residents. If health status is under set level (90 %) there is a bigger probability that resident becomes ill. During the illness, the energy drops faster and the resident does not go to work.

3.4.2 Residents Day Cycle

Residents get up in the morning, do the hygiene and make a breakfast. Then they drive or go to a work. The temperature inside the house is automatically set to a lower values. After return from the work residents do free time activities such as reading a book, going outside for a walk or watching TV. If a residents’ energy is low, they can also take a nap. After a dinner, residents can go to sleep or continue to do some free-time activities based on their energy. During weekends residents can do free time activities or make a whole day travels.

3.5 Simulation Results

In the Table 1 are results from the 15 repetitions of the model run simulating 30 years. Small family house with two inhabitants has been created and all sensors systems described in Sect. 3.3 has been added. Layout of the house can be seen on Fig. 2. Two residents with age starting at 40 and normal day cycle live in the simulated house. Desired temperature inside the house is 21 °C respectively 18.5 °C if residents are not at home. If a health level is below 70 %, resident stays at home and cures. Probability of getting sick increases when the health level is under 90 % Factors such as eating of the spoiled food or low temperature affects residents’ health status.

Table 1 One year average for period of 30 years
Fig. 2
figure 2

3D view of the simulated environment

In the simulations with all intelligent features activated, there were significant savings on the heating costs. Concurrently, a number of spoiled food dropped to zero and average value of residents’ health was higher because of positive effect of smart systems. System eliminated (1) low temperatures inside the house caused by unwillingly opened windows, (2) eating spoiled food (3) reminded residents to use pills and (4) in some cases prevented from going late to sleep. Due to the higher health level, the number of sick days also decreased significantly.

3.5.1 Simulation of HERS System

After a serious heart attack occurrence, a medical treatment has to be provided within 20 min [22]. Without the system HERS there is a small probability that resident will be able to call an EMR himself. A roommate has to notice this critical situation and call an EMR. HERS should be able to recognize automatically critical situation—fall of a person and notify roommate, relatives or EMR. In the Table 2, it can be seen a number of deaths after the heart attack with and without the system HERS activated. There are two types of heart attacks. Inevitable death means that death comes immediately after the heart attack. Preventable means that resident had chance to be rescued.

Table 2 Count of death occurrence, AmI features ON (sum of 15 simulation runs)

4 Conclusion

The tool programmed in AnyLogic for creation and simulation of an intelligent environment had been introduced. Substantial costs can be saved by modeling intelligent environment before its realization. Different house layouts and various sensors can be tested. AnyLogic brings the possibility to add algorithms created in the Java and test different setups of control systems. Residents are modeled as autonomous agents with individual needs and behavior. Many scenarios of different situations can be tested. As an example of a simulation, a house with intelligent systems focused on residents with serious health issues was created and positive impact of the systems on the residents’ health status was shown.

New emerging technologies can be tested using the proposed model. It is also possible to test technologies which are still under development, without technical barriers. Results from the simulation runs then can substantiate further adjustments of physical prototypes, which are part of the simulation. Finally, new technological solutions can be inspired by the results of the simulated scenarios.