Systems - Science Direct

7 downloads 0 Views 1MB Size Report
for elderly people staying alone at home, allowing care and health centers to ... Keywords: Mobile agents; Multi-agent systems; Elderly care systems; Internet ... of life. Technology development has reached a state where we can envisage a ...
Robotics and Autonomous ELSEVIER

Systems

Robotics and Autonomous Systems 27 (1999) 59-75

Intelligent mobile agents in elderly care L.M. C a m a r i n h a - M a t o s a,,, W. Vieira a,b,1 a Faculty of Sciences and Technology, New University of Lisbon, Quinta da Torre, 2825 Monte Caparica, Portugal b lnstituto Superior de Engenharia de Lisboa, Rua Conselheiro Emidio Navarro, 1900 Lisbon, Portugal

Received 30 April 1998; received in revised form 23 November 1998

Abstract

Society is currently filcing the ageing of the population which, together with the increasing engagement of both men and women in out of home work activities, demand new solutions for taking care of elderly people. Inexpensive support systems for elderly people staying alone at home, allowing care and health centers to remotely observe and help them, are becoming feasible with today's teclmology. In this paper, an architecture for such a system based on the Intemet and extensively exploiting the multi-agent systems paradigm is presented that includes both stationary and mobile agents. Furthermore, an adaptation mechanism that allows mobile agents to adapt themselves to diversified local environments is presented, including prototype implementation details. © 1999 Elsevier Science B.V. All rights reserved. Keywords: Mobile agents; Multi-agent systems;Elderly care systems; Internet applications

1. Introduction 1.1.

Mo~va~on

Elderly people are becoming a very important percentage of the population of the industrialized countries [29]. Some of these people often require special attention and vigilance due to the progressively reduced degree of autonomy they might present. The traditional approach for taking care of these people has either been resorting to support from relatives, or from elderly care centers. However these solutions have become inappropriate mainly for the following reasons:

* Corresponding author. Tel.: -t-351-1-2948517; fax: +351-12941253; e-mail: [email protected] 1E-mail: [email protected]

(i) the involvement of relatives is more and more difficult since the social evolution in the developed countries has led to more and more people (specially women) to get involved in work outside their homes; (ii) care centers present both cost problems and social uproot of the involved people; (iii) many elderly people preserve enough robustness to stay at their homes, what is very often the solution they prefer and is better for their quality of life. Technology development has reached a state where we can envisage a solution which allows those elderly people whose degree of autonomy, although reduced, is significant to stay at their homes, provided adequate vigilance services exist. The degree of vigilance is dependent on the degree of autonomy and mobility of the person involved and can be as simple as an active advice and agenda system or it can include more

0921-8890/99/$ - see front matter © 1999 Elsevier Science B.V. All rights reserved. PII: S0921-8890(98)00083-9

60

L.M. Camarinha-Matos, W. Vieira/Robotics and Autonomous Systems 27 (1999) 59-75

sophisticated equipment (sensors, robotized home appliances, etc.) coping with the evolution of technology. Yet another very important factor related to elderly is the need for leisure support, since they remain alone at home for long periods of time. This kind of support must include both effective help in the use of home equipment (video, TV, etc.) and services that allow elderly people to find, buy or rent some entertainment materials or to agree on some common schedules with other people in the same situation (an appointment for a bridge game at some elderly social center, for instance). The lnternet appears to be the best choice for the communication infrastructure for this kind of system due to its low cost and widespread availability. On the other hand, multi-agent systems (MASS) [22,35] have proved to be a powerful framework for the development of complex distributed systems. In such kind of application there are several situations where remote operation, or remote supervision, of machinery is needed which therefore implies some kind of telerobotics and tele-supervision capabilities. These two areas are also gaining more and more research attention, what is due to the many potential applications, ranging from machines operating in hazardous or inaccessible environments to spatial vehicles operating with large autonomy. In particular, telerobotics and tele-supervision applications which make use of the Internet have been progressively increasing for a wide domain of applications (remotely operated robots and telescopes, manufacturing systems, virtual laboratories, etc.). The traditional approaches taken in telerobotics and tele-supervision assume a set of pre-defined services which a user can activate on simple machine and sensorial remote environments. On the other hand, to a great extent, the research efforts in this area have been put on feedback methods (telepresence [27], for example) with the primary intent to allow such users to operate the existing remote machinery via a low level closed loop control procedure. However, if complex machinery or sensorial environments are considered to be remotely operated with maximum flexibility, we cannot stand on a set of pre-defined services and on simple monitoring/recovering procedures. Also, for large or variable time-delays and low availability of the communication channels, remote low level closed loop control is impractical and higher levels of control

(such as supervisory control, for example) and autonomy are required [27,32]. So, more sophisticated and more reliable solutions have to be found leading to an increase of the autonomy of the machinery being operated, yet preserving a high degree of flexibility. The mobile agents paradigm shows important advantages when tele-manipulation and tele-supervision are considered [3,4], because: (i) moving the code to the places where the machines and sensors are located, contributes to enable real-time response; (ii) since new mobile agents can be built and sent for remote execution whenever needed, greater flexibility is achieved. Furthermore, the use of mobile agents has other potential benefits: (i) it eases the correction of errors in software; (ii) it eases rescue operations if an autonomous vehicle gets lost; (iii) it, naturally, leads to adaptive and up-to-date systems; (iv) it eases remote maintenance and diagnosis. However, in order for the same mobile agent to be executed at several places, it must carry only a general action plan, which must be refined/adapted when the agent reaches each target place. Therefore, agents must be equipped with plan refining capabilities, which allow them to, based on the abstract plans they carry, build specific plans suitable for execution in the particular environment of each site they reach. 1.2. Structure o f the paper

The remainder of this paper is structured as follows. In Section 2, the main requirements for elderly support systems are pointed out, independently of any particular implementation. Section 3 presents a brief description of the multi-agent and mobile agent systems paradigms. Section 4 is dedicated to the introduction of an architecture for such a support system. In Section 5, the implementation of some sub-sets of this architecture is discussed, and an adaptation mechanism for mobile agents is proposed. Finally, in Section 6, some conclusions are presented.

2. Requirements for elderly support systems In Section 1, several aspects related to elderly care were discussed and the need for innovative solutions was concluded. In this section, the main requirements for an elderly support system are analyzed in terms

L.M. Camarinha-Matos, W. Vieira/Robotics and Autonomous Systems 27 (1999) 59-75

of its main components and participants. The final conclusions of this analysis will be exploited later in Section 4, when a general architecture for such a system is presented. Elderly needs. At the base of the system we have the elderly people who, in spite of their natural loss of capabilities, maintain enough autonomy to securely and adequately carry out many of their daily tasks if appropriate support is given them. These people spend most of their time at home but, occasionally, may go out for short periods of time with several possible destinations: health centers, social care centers, leisure centers, etc. These people often exhibit some medication and alimentary care needs and are susceptible to sudden changes in their health state. In order to provide them with the appropriate level of support, it is, therefore, necessary to have some vigilance and advice/help systems located at their homes and at the places they visit (elderly care centers, health centers, etc.). Additionally, some form of personal information maintenance, which includes medication and food constraints, personal interests and preferences, etc. must be provided. Home sites. A form of guaranteeing security of elderly people when staying at home and help them in their daily tasks (use of home appliances that show a continuous technologi.cal evolution, for example) must be found. It is also necessary that elderly people be engaged in leisure activities in order not to feel lonely. Therefore mechanisms to propose leisure activities (video, music, etc.) alad to help elderly persons in the use of home equipment must be provided. It should be noted that this is ~. highly heterogeneous scenario: each home environment and the needs of each person are distinct. Care centers' needs. Nowadays, social care centers face big difficulties since they must either employ a lot of social assistant,,; or choose to rend their services within the walls. In order to encompass these limitations a system offering remote social care services is needed. Services for helping/reminding elderly persons at home and monitor their activity from the social centers must be prowided. Health centers' needs. Elderly people often require special health vigilance, including monitoring of their physical and emotional conditions and the fulfillment of some medication agenda. Since the available resources at the health ~zenters are very scarce, it is often

61

the case that one doctor or nurse have many elderly people to take care of, which frequently implies poor service quality. So, it is necessary to find some kind of remote monitoring/vigilance of the elderly persons' health state, in order to improve the quality of the offered services. Relatives' needs. As previously mentioned, in the developed countries, it is very common that the elderly person's relatives are engaged in jobs outside their homes. Consequently, they cannot offer personal care during their absence. However, in general, relatives can and want to offer help/advice to their elderly persons. Moreover, relatives will feel better themselves if they have some way to observe the activity and help the elderly persons from their jobs/places. A remote monitoring/vigilance facility is, therefore, an important functionality that could be operated from the job site via Internet. Leisure centers' needs. Leisure centers are extremely important for the elderly people in what concerns their free time occupation. In fact, day centers provide support for a user to buy or rent some materials (books, videos, meals, etc.) and allow users to get engaged, either locally or remotely, on several social activities, such as a bridge game with other users, for example. The limitations, needs and preferences of the elderly persons must somehow be considered in these centers and supported by technology. Sales services. Due to the reduced mobility of elderly people, some sort of specialized electronic commerce could be provided allowing for an easy way for these people to choose and buy some goods. These services can exist in a leisure center or in specialized centers for this purpose. The rapid developments in the electronic commerce area have to be analyzed in terms of the specificity of this social sector. Safety and privacy issues. One of the most critical aspects to be considered in this kind of support system is the users' (elderly persons) safety. So, special effort must be put in providing local and remote vigilance agents who must preserve the users safety with a very high degree of certainty. Not only shall the sensors data be analyzed but also the users activity must be monitored (using presence sensors, image sensors, etc.). Depending on the health situation of the user, his/her personal data must be updated on the remote center at a sufficiently high rate in order to allow adequate response in case of failure of the home equipment or

62

L.M. Camarinha-Matos, W. Vieira/Robotics and Autonomous Systems 27 (1999) 59-75

loss of communication between the remote center and the user's home. If appropriate, redundancy must be implemented for the critical systems. However, there is a trade-off between users' safety and privacy. Since a system which does not preserve enough privacy will not be attractive to the users, a balanced approach has to be found. Although the degree of privacy to be preserved depends on the health situation of the user, there are lower bound limits if privacy must be guaranteed.

3. Intelligent agents People from different communities use the term agent with many different meanings. FIPA (Foundation for Intelligent Physical Agents) defines an agent as 'an entity that resides in environments where it interprets "sensor" data that reflect events in the environment and executes "motor" commands that produce effects in the environment' [10]. Although this definition is somewhat vague, it is equivalent to many others found in the literature. A more systematic vision of an agent is achieved by analyzing the characteristics an agent must have. The following attributes are commonly associated with agents (even though not all of them need to be present): (i) Autonomy. An agent can operate under its own control without the direct intervention of others, either humans or not. (ii) Social ability. Agents can interact with other agents and other entities. (iii) Reactivity. Agents are capable of reacting to changes they perceive in their environments. (iv) Pro-activeness. Agents are not purely reactive entities. They exhibit goal-directed behavior, which means, they can take the initiative during their operation. (v) Mobility. Agents can move through a net of execution environments. (vi) Continuous operation. Agents are not one-shot computation units. Instead, they are continuous running processes. (vii) Adaptability. Agents have the ability to selfadapt to changes in their environments. Many types of agents have been proposed. The summary which follows is based on a taxonomy of intelligent agents given in [21].

3.1. Local agents Local agents are stationary agents that only access local resources. This class is commonly associated with agents that act as intelligent advisory or interface systems, such as personal assistants. They have been also coined under the name "(intelligent) interface agents". Intelligent interface agents may play an important role in an elderly support system, since their adaptive nature might be a precious instrument in achieving adequate flexibility that allows such a system to be used for users with very heterogeneous capabilities. 3.2. Networked agents Networked agents are agents that have the ability to access both local and remote resources. They often operate in an isolated manner and add to the functionality of local agents the ability to extensively use the services available in a network (such as the Internet) to collect information available in the network according to user preferences. These type of agents are also known under the terms "softbots" and "knowbots", "spiders", "web-crawlers", etc. Networked agents may also play a significant role in elderly support systems. For example, they can be used by a user (elderly person) to collect information, to perform some kind of electronic commerce, etc. Specifically, networked agents who exhibit mobility may be very useful in elderly support systems. 3.3. DAl-based (co-operative) agents DAI-based agents are agents integrated in a multiagent system (MAS), running in a distributed environment. Besides the local goals of each agent, global objectives are established which commit all or some sub-group of agents to their completion. Some advantages of this approach are: (i) It is a natural way for controlling the complexity of large highly distributed systems. (ii) It allows the construction of scalable systems since the addition of more agents is an easy task. (iii) Due to their distributed nature, multi-agent systems are potentially more robust and tolerant to failures than centralized systems and often have

LM. Camarinha-Matos, W. V~eira/Roboticsand Autonomous Systems 27 (1999) 59-75 the capability to recover from failure of some of its components (agents) with graceful degradation in performance [16]. A central aspect of MAS is co-ordination which means that the overall behavior of an MAS has to be controlled somehow, in order to take advantage of the interaction among the agents to meet some global constraint, and to prevent the system to fall in a chaotic behavior. Several co-ordination approaches for MAS have been suggested [23]: (i) Organizational structuring exploits the existing domain organizational structure, which implicitly defines the agents' responsibilities, capabilities, connectivity and control flow. (ii) Contracting is a co-ordination strategy intended to co-ordinate tasks among agents assuming a decentralized market structure. Basically, an agent (the manager) a~.anounces a task to other agents (the contractors) which, in response, submit bids to the manager, according to their evaluation of the announced task and their own capabilities. The manager chooses the contractor based on the received bids. The most renowned implementation of this technique is the contract net protocol [31]. (iii) In multi-agent planning agents build a global (multi-agent) plan that specifies the future actions and interactions the agents must carry out in order to fulfill their goals. In centralized multi-agent planning a co-ordinating agent receives all partial (local) plans, analyzes them, and by modifying them, removes inconsistencies and conflicts, and combines them to obtain a global plan; in distributed multi-agent planning each agent is provided with a model of the other agents' plans, and by communicating to each other, they update their own local plans and the models of other agents they hawL trying to remove any conflicts, and eventually, achieve a global plan. (iv) As it is stated in [23], most co-ordination schemes involve negotiation. Furthermore, a significant part of the work: which has been done in the coordination area stresses negotiation as a mean to reach co-ordination. Some of the approaches that have been used. are based on the game theory and on human-inspired negotiation strategies. Interaction among agents in MAS implies the existence of some communication language or proto-

63

col. Some of the communication solutions which have been considered are: (i) No communication, where agents reason about each other's plans without explicit communication, but rather, agents reason about some previous knowledge they have about other agents. This approach has many obvious disadvantages, which makes it of theoretical interest only. (ii) Ad hoc agent communication languages have been used. Standard message passing protocols, blackboards, and tuple (information) spaces have been used to support some proprietary agent communication languages in very specific application areas (such as the implementation of high level protocols for inter-agent communication, like the contract net protocol). Since they are not standard solutions, their use is limited to the applications that motivated their development. (iii) Knowledge query and manipulation language (KQML) [9] emerged as part of the ARPA knowledge sharing effort initiative. It is based on concepts from the speech act theory and it relies on an extensible set of performatives, which define the permissible speech act agents may use. The performatives constitute the support for the development of higher level models of communication (contract nets, negotiation, etc.). Due to its "de facto" standardization status, KQML has attracted many users, in spite of the commonly referred shortcoming of lack of precise semantics. (iv) FIPA is another organization which has been putting many efforts on standardization of several aspects related to MAS. In its 1997 and 1998 draft specifications, FIPA addressed a large range of domains for MAS standardization. In particular, the specification of an agent communication language based on speech act theory was worked out, trying to overcome some of the insufficiencies of KQML [11]. Several application areas for MAS have been reported. Some of them are: intelligent manufacturing [1,13,26,30] distributed health care [17], distributed elderly care [5], intelligent networking [12], electricity transportation management [19], etc. Elderly support systems are inherently distributed systems. This characteristic makes them good candidates for the application of MAS concepts [5].

64

LM. Camarinha-Matos, W. Vieira/Robotics and Autonomous Systems 27 (1999) 59-75

3.4. Mobile agents

Mobile agents are those agents that have the ability to move (or to be moved) from one machine to another. Two main approaches have been explored for mobile agents [15]. In weak mobility, mobility is achieved by transference of code to another network node, possibly accompanied by initialization data, but without any transfer of the agent's dynamic execution state. Very commonly the life-cycle model of these agents is of the type task-based where the agent is responsible to indicate, before its movement, the next task to be started in the destination node. Most of the Java mobile agents (such as IBM Agglets, MOLE, Concordia, etc.) are implemented this way. In strong mobility when the agent is transferred, its execution is suspended, its code and execution state (both static data and dynamic state) are moved to the destination node where the agent's execution is resumed. This is the kind of mobility exhibited by such systems as Telescript [34] and Agent Tcl [20]. Strong mobility can be achieved by migration where the agent suspends its execution, its code and state are transferred to the destination node and the execution resumed, or by remote cloning where a copy of the agent is created in the destination node. The main difference between these two strategies is that in the last case both the agent and its copy exist after the cloning process. Several advantages of mobile agents have been pointed out: (i) They may reduce bandwidth requirements, since in moving to the machine where the data are, they can perform all the computations there and transmit just the result to the original machine. (ii) They can act autonomously, even in the case of temporary absence of a network connection to the machine from where they were launched (an important aspect, for example, in mobile computing). (iii) They provide high scalability to the systems since functionality may be added whenever needed. (iv) They are specially well suited for remote operation, where they conciliate reliability and flexibility [3,4], because, on the one hand, in moving to the place where the machines or devices to be operated are, they provide execution supervision locally, and so, they do not rely on the availability, delays and reliability of the network, and on

the other hand, they allow an easy way of extending functionality. However, mobile agents present some difficult problems: (i) They require special servers to run on. (ii) Security is a major concem in mobile agents. In fact, "how can servers trust mobile agents", and "how can we protect agents from servers" are hot research domains. Certification of the agents' owners and of the servers is one of the solutions that have been proposed, but there are still some problems to address in what security is concerned. (iii) Naming and tracking schemes for mobile agents which allow easy and efficient ways to track a mobile agent, and thus, to know its execution state and to establish direct connection with it is a difficult area too. Despite some controversy about the real need for mobile agents, they have been gaining more and more adherents, as is confirmed by the OMG MASIF (mobile agent system interoperability facility) [24] and by the Part 11 of the FIPA98 draft specification (agent management support for mobility) [14] standard proposals. During the last few years many application areas for mobile agents have been reported. Some of them are: electronic commerce [34], intelligent networking [2,18,21], support for mobile computing [7,20], virtual enterprises [25], workflow management [6], telemanipulation and tele-supervision [3,4], etc. Mobile agents represent a powerful framework for the development of elderly support systems, since they allow for the design of very flexible solutions, namely in what remote help and remote supervision is concerned, as is described in the next sections.

4. An architecture for elderly support systems Many of the characteristics referred to in Section 2 can be supported by current technology. Some of them require additional progress, as is the case of home appliances which, besides automated operation capabilities, must integrate some kind of remote control (from a personal computer, for example). It is the authors' opinion that the evolution in this direction is just a matter of time.

L.M. Camarinha-Matos, W. Vieira/Robotics and Autonomous Systems 27 (1999) 59-75

As this system reveals high geographical distribution, Internet is a reasonable choice due to its low cost and widespread ,'wailability. Using the Internet, homes, care centers, health centers, and leisure centers can be inexpensively linked despite the distances among them. For the monitoring of the health state of the elderly persons, as well as for the observation of their activity, a lot of sensors and measurement devices exist, ranging from very simple presence sensors to sophisticated blood pressure measurements devices. Therefore it is possible to implement intelligent monitoring systems either for the vigilance of the elderly persons' health states and the observation of their daily activity at their homes. It is likely that future developments in home appliances will allow them to be interconnected in a local network and to be controlled from a computer. This will make it possible 1~oimplement sophisticated help systems for elderly people. In particular, the use of image and voice sensors in conjunction with such sort of intelligent home appli~mces allows the implementation of intelligent adaptive: interfaces for helping/guiding elderly persons in their daily tasks. On the other hand, the developments in the area of multi-agent systems have proved to be effective in the development of complex distributed systems such as the one we are discussing. Mobile agents are also recognised to be very appropriate to the development of distributed applications over the Internet due to their low bandwidth requirements and flexibility/scalability characteristics. Furthermore, developments in the field of the smart cards, cellular phones and handheld network communicators will allow the implementation of personal mobile agents which "live" inside such devices and which accompany the user wherever he/she goes, carrying the user's personal history and data. Therefore, inexpensive and flexible elderly care systems will be possible in the near future. According to the perspectives mentioned above, a multi-agent architecture based on the Intemet and exploiting the mobile agents paradigm is proposed. As shown in Fig. 1, the general framework of the proposed system includes several places where elderly persons live ("home places" - HPs), care center places ("care center places" CCPs), health center places ("health center places" - HCPs), leisure places ("leisure places" - LPs), and several places

65

from where relatives may observe the behavior of the elderly people staying in HPs or give him/her some help ("relatives' places" - RPs). Places for the advertisement/purchasing of goods are also considered ("commerce places" - CPs). A HP is a place where an elderly person lives and stays alone for long periods of time. So, it must have a convenient environment in order to appropriately implement the characteristics discussed in Section 2. Fig. 2(a) represents a structure for a HP. As it shows, each HP may comprise a set of sensors (temperature, presence, etc.), a set of measurement devices (blood pressure, body temperature, etc.), and a set of robotized home equipment (microwave ovens, air conditioning equipment, light control equipment, etc.). The main components of a HP are: (i) The monitor agent (HP-MA) which is responsible for the vigilance of the welfare of the elderly person, by analysis of sensor values (environmental and physical measures). (ii) The agenda agent (HP-AA) which is responsible for guaranteeing the fulfillment of a pre-defined agenda (for example, for taking care of the time at which some medicines have to be taken by the elderly person). (iii) The advice/help agent (HP-HA) which, by means of intelligent adaptive interfaces, is responsible to give the elderly person advice or help in several occasions (how to use a HIFI equipment, for exanlple). (iv) The mobile agents support system which allows mobile agents sent from care centers, health centers or from a relative's job, to run in the HP (HPMAS). The HP-MAS also allows a HP to launch mobile agents (for example, a mobile agent can be launched to go and visit some CP in order to buy some goods). (v) Interface with the elderly person's personal agent (HP-PAI). The personal agent can temporarily reside in a smart card, or in a cellular phone, for example. As an alternative, the HP-MA and HP-AA functionalities would be performed by mobile agents sent by HCPs, CCPs, or RPs. A CCP allows institutions that provide care to elderly to do that in a remote manner, whenever the degree of autonomy of the elderly person allows him/her to stay at home. As shown in Fig. 2(b), a CCP may

66

L.M. Camarinha-Matos, W. Vieira/Robotics and Autonomous Systems 27 (1999) 59-75

llCP Fig. 1. Several types of elderly related places interconnected through the Internet.

apt~wem Mcmau~ ~ ItlNtA HP-.4~ Home

~

S

HCP-MA$

a)

b)

c)

co

e)

0

Fig. 2. Structure of HPs, CCPs, HCPs, LPs, CPs and RPs. launch mobile agents to run in some HP (using the mobile agents support, CCP-MAS). These agents are intended to give some kind of support/help to the elderly person. For example, a mobile agent can be sent to help the elderly person in food preparation. Di-

alog agents (CCP-DA) may be created in CCPs for maintaining high level dialogs with the sent mobile agents. The adoption of mobile agents for the services a CCP can provide allows a high degree of flexibility and scalability for the system. A CCP also includes a

L.M. Camarinha-Matos, W. Vieira/Robotics and Autonomous Systems 27 (1999) 59-75

database with elderly persons' data (CCP-EDB) and a management system (CCP-MS), which is responsible for the global management of the CCP (addition of a new user, removing of a user, launching agents to the HPs, etc.). A HCP allows remote rendering of health services and vigilance. This is possible only in those cases where the elderly persons preserve enough degree of autonomy. As Fig. 2(c) shows, a HCP is composed of the following systems: the alarm agent (HCP-AA) which is responsible for the treatment of the alarms received from monitor agents in the home places (HPMA); support to launch mobile agents (HCP-MAS) to run in some HP for some kinds of health care or health vigilance; several dialog agents (HCP-DA) for maintaining high level dialogs with the sent mobile agents; an interface to the users' (elderly people) personal agents (HCP-PAI) (for updating their data when they visit the health center); a database with users' data and a management system also exist in a HCP. A RP is a place from where a relative may send a mobile agent to a HP for observing or giving some help to the elderly person who lives there. A RP comprises the support for launching mobile agents (RP-MAS) and agents that support the dialog with the agents sent to a HP (RP-DA) as Fig. 2(d) shows. A commerce place (CP) is a virtual market where companies can advertise and sell goods. It comprises a set of agents, which represent some shops (CPSHOP). Mobile agents specialized in shopping can be sent from a HP to buy some goods in a CP, so, support for execution of mobile agents must be provided (CP-MAS). Also, support for advertisement (CP-AS) must be included in a CP which allows shopping mobile agents to search the advertisement lists and to find the products they search. A CP can be integrated in a LP. Fig. 2(e) represents a CP. Finally, an LP is a place which the elderly person can visit and where ihe/she can eat some meal, rent some book or get engaged in some social activity with other elderly persons. An LP contains an interface with the elderly persons' personal agents (LP-PAI) in order to acquire the user preferences and food and medication restrictions. An LP also provides some form of negotiation/co-ordination between personal agents (LP-NC). This enables the personal agents of two or more elderly persons to negotiate the engagement of

67

their owners in some common social activity. Fig. 2(f) represents the structure of an LE Besides the places discussed above, a large sort of mobile agents can exist within this architecture. The following are some of them: (i) A care center place may send several mobile agents to a home place. For example, agents to help elderly persons in food preparation, to monitor their activity, etc. (ii) A health center place may send mobile agents to a home place for observing some specific conditions of the elderly persons (measure his/her blood pressure, for example). (iii) From RPs, relatives may send mobile agents to a home place for helping/reminding or for observing the elderly persons' behavior. (iv) A home place may send a mobile agent to visit some commerce places in order to buy some goods. The mobile agents sent to a HP from RPs, CCPs or HCPs must have some capabilities to adapt themselves to the actual environment they reach, since, depending on a number of factors (economic situation, or level of disability, for instance), different HPs will have different capabilities. Therefore, some mechanism must be provided to allow this kind of self-adaptation. Finally, personal agents, who act as representatives for elderly persons, must be guaranteed to be updated with the most recent personal data and history of their owners.

5. Implementation aspects For the implementation of the architecture described in the previous section, an incremental development process was adopted. The developed prototype comprises the support for launching and running mobile agents and most of the aspects involved in a HP. The implemented part also allows mobile agents to be sent by CCPs and HCPs for execution in a HP. Since the described architecture is highly distributed and its main components may run on different platforms, a platform-independent language had to be chosen. Java was chosen because it is platform-independent and it already provides some mechanisms for remote downloading of code and for security implementation.

L.M. Camarinha-Matos, W. Vieira/Robotics and Autonomous Systems 27 (1999) 59-75

68

Since Java is not equipped with sophisticated symbolic processing capabilities which are convenient for programming intelligent applications, some support is given to ease the integration of symbolic processing languages within the existing mobile agents system. Currently, integration has been achieved for the following languages: (a) JESS (Java expert system shell), a clone of the CLIPS expert system shell. Since JESS is built in Java, its integration carries no serious difficulties. (b) Prolog. Since at the time of this writing there were not any known serious Java implementation of Prolog, guaranteeing multi-platform compatibility became difficult. Because recent releases of both BinProlog and SicstusProlog support some kind of integration with Java, and also because there are versions of these two systems for the most used platforms, they were selected for integration with the implemented mobile agents system. Fig. 3 illustrates the structure of the receiving platform for a home place (HP). Mobile agents may carry pieces of JESS or Prolog code, corresponding to specific parts of their functionality. However, the agent itself must, still, be implemented in Java, acting as a shell that transports code developed in the other two languages. Interaction with the physical systems is achieved by means of the Java native method invocation. This implies the writing of a shared library (or a DLL, in Windows systems) for each different platform, which may cause some compatibility problems. However, this is a very specific and small area where, due to hardware specificity, some kind of particular intervention would be necessary anyway.

Fig. 3 represents the basic structure of the implemented HP.

5.1. The monitor agent Within a HP the monitor agent (HP-MA) is responsible for observing the well-being of the elderly person. By reading some sensors it can decide about the environmental conditions as well as the physical conditions of the person. It can react to some unwanted situation, either by trying to correct the situation (altering the setup of an air conditioning device, for example), or by sending alarms to a health centre and giving advice to the elderly person in order that he/she can him/herself correct the anomaly. Basically, a HP-MA is implemented as a Java thread which cyclically executes a set of JESS rules (although HP-MAs can be implemented entirely in Java [3]). These rules define how to process the sensorial data available in the HP.

5.2. The agenda agent The agenda agent runs within a HP (HP-AA) and is responsible for guaranteeing the fulfillment of some pre-defined agenda. The agenda may contain a medication timetable, a meal timetable, etc. Mobile agents sent by HCPs, CCPs or RPs may modify the agenda. The agenda agent works essentially in a time-driven basis. Like HP-MAs, HP-AAs are implemented as Java threads that run JESS code whenever some time period elapses.

5.3. Adaptive mobile agents

tk

/"

Agent

"~

Agents

I

MobileAgents ExecutionPlatform JESS classes

I

I [

Local

SkillsandResources

JAVA I virtualmachine

PROLOG interpreter

Fig. 3. Structure of a receiving platform for a HP.

J

As previously mentioned, mobile agents play a very important role in the proposed architecture. This motivated the development of a platform for launching and running mobile agents (named IMAJ - "inceptive mobile agents is Java") [5]. This platform allows the creation of Java mobile agents that run on specialized servers (the IMAJ servers). Both the construction of the mobile agents and the building of the servers are supported by the system. Capabilities to run JESS and Prolog code were added to the basic mobile agent Java class.

AM. Camarinha-Matos, W. Vieira/Robotics and Autonomous Systems 27 (1999) 59-75 Recalling Section 3, the IMAJ agents use weak mobility. When an agent requests its transference to another node, its static state (values of the attributes of its static objects) and code are transferred (Java serialization is used). Whenever an agent reaches a destination server, it starts execution at the same specific entry point (method). It is the responsibility of the programmer to guarantee that the agent is switched to the appropriate branch of code, based on its current attribute values. On top of this environment, a prototype elderly care system, called MobCARE, was implemented. As previously referred to, one of the difficulties associated with the elderly care systems is that the environmental richness of the various home places may vary considerably, depending on the degree of autonomy of its user and/or on economical factors. This means a mobile agent can find quite different devices (sensors, measurement devices, home appliances, etc.) in the various nodes it visits, and therefore, it must have some adaptation mechanism that allows it to recognize and adapt to the distinct local environments. For example, in the architecture presented in Section 4, there are several mobile agents visiting a HP whose intended services depend on some kind of manipulation of the e:dsting devices. If no adaptation mechanism was provided, then different classes of agents would have to be implemented for different classes of equipment possibilities in all HPs. In the proposed solution, each of these agents carries with it an abstract action plan describing the high level sequence of actions the agent must execute. However, in order for the agent to execute a specific sequence of actions, it must identify the exact resources that exist in the HP and refine the abstract plan in accordance to those available resources. To achieve this, a standard taxonomy must be adopted to describe the capabilities of each place. As an illustration example, let us consider a mobile agent sent to a HP tc help the user in warming up a meal. Fig. 4 shows a possible abstract plan carded by an agent. When the agent reaches a HP it must decide how to do each of the actions al-aT, according to the capabilities it finds in that place. For example, action 1a (call user's attention) may be done by talking to the user if a voice synthesizer exists, or else, a light of

69

I. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

,

,

Legend

I

[ a~ - call user's attention; a2 - get meal fromrefrigerator; a3 set the table; a4 up meal;as servemeal -

-

w a r m

-

', a~- waittill eating finished; a7- clear the table [. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

I

Fig. 4. An abstract plan for warming up a meal. some color may be flashed or a message may be sent to some kind of display, whereas action a4 (warm up meal) may be done almost entirely automatically if a robotized microwave oven exists, or otherwise some indications may be given to the user if only a normal microwave oven is present. Capabilities. In order to support a flexible solution, each place must indicate the capabilities it offers. A uniform taxonomy for the classification of the capabilities is necessary. In the current prototype, a simplified mechanism is implemented for the declaration of the local skills, consisting in a set of facts listing what capabilities are available. In our application example, let us assume that some place has a robotized microwave and a voice synthesizer. This is indicated by the following predicates: capability(rmw, 2, [acquire/O, open/l, setup/2, start/3, wait_close/4, wait_done/5, release/6]) . capability(voice, i, [acquire/O, talk/l, release/2]) . The first fact tells the agent that a robotized microwave exists. The list included as second argument of the fact clause describes the functions supported by this capability (for example, acquire is used by the agent to get control of the device, release is used to free the device, open is used to open the door of the microwave, etc.). The numerical codes shown are used during the execution of the plan refinement procedure to relate the capabilities and its functions to the lower levels of control (Java code). Abstract plans. The abstract plan carried by the agent is represented by a tuple (A, O), A being a set

70

L.M. Camarinha-Matos, W. Vieira/Robotics and Autonomous Systems 27 (1999) 59-75

A = {(aI,(CAT, {}, {}, {user_present})), (a2,(GMR, {}, {user_present}, {has_meal})), (a3,(ST, {}, {user_present}, {table_set})), (as,(WM {(warm_time,90)}, {has_meal}, {meal_warmed})), (as,(SM,{ },{tableset, meal_warmed}, {meal_served})), (a6,(WEF, {}, {meal_served}, {eat_finished})), (aT,(CT,{ },{eat_finished}, {help_warmmeal_done}))} 0 = {al

Suggest Documents