=Paper= {{Paper |id=Vol-1294/paper17 |storemode=property |title=Smart Home for Elderly: Modeling and Simulation |pdfUrl=https://ceur-ws.org/Vol-1294/paper17.pdf |volume=Vol-1294 |dblpUrl=https://dblp.org/rec/conf/icaase/KissoumKB14 }} ==Smart Home for Elderly: Modeling and Simulation== https://ceur-ws.org/Vol-1294/paper17.pdf
ICAASE'2014                                                                   Smart Home for Elderly: Modeling and Simulation




                             Smart Home for Elderly:
                             Modeling and Simulation


           Yacine Kissoum                              Sara Kerraoui                     Mohamed Lamine Boughaouas
 Faculty of Sciences, Computer Science      Faculty of Sciences, Computer Science     Faculty of Sciences, Computer Science
               Department                                 Department                                Department
  Université 20 Août 1955, Skikda.           Université 20 Août 1955, Skikda.           Université 20 Août 1955, Skikda.
               Algeria                                    Algeria                                     Algeria
      kissoumyacine@yahoo.fr                      kerraouisara@hotmail.fr                 moha.boughouas@gmail.com




Abstract – The development trend of computing is that the intelligence will become ambient. It is a one-user
multi-device paradigm. These devices are transparent to the user and they can react in a proactive and non-
intrusive manner. Moreover, among the general population those most likely to benefit from the development
of this technology are the elderly and dependent people. They often wish to continue living independently in
their home as opposed to being forced to live in a hospital. For that, homes should be smart in order to
provide safety, security to reduce falls, disability, stress, fear or social isolation. Nevertheless, much of
processes used for smart home design are ad-hoc. To cope with this drawback, while taking into account
both dimensions of time and space, it is required to use a suitable formal model that is able to handle smart
home domain specific nature. This paper proposes a technique that uses reference nets to model and
simulate a smart home which is sensitive, adaptive and responsive to elderly’s health, needs and
preferences.

Keywords – Ambient intelligence, Multi agent systems, Nets within nets, Elderly, Timed nets, Smart home.



                                                                   way. Those mechanisms provide on demand
1. INTRODUCTION                                                    personalized services and stimulate users through
                                                                   their environment according specific situation
In recent years, there has been an important growth in             characteristics [1].
the field of Ambient Intelligence (AmI) [5, 6],                    Moreover, the percentage of elderly in today’s
involving major changes in the daily lives of people.              societies keeps on growing. With the current trends in
The vision of Ambient Intelligence implies a                       population demographics, it is becoming increasingly
seamless environment of computing and advanced                     difficult for governments worldwide to fully support
networking technology that is aware of human                       the health and social care systems [11]. The use of
presence, personalities, needs and which is capable of             smart technologies, including smart homes could
responding intelligently to spoken or gestured                     arguably relieve the pressure on aged care health and
indications of desire, and even in engaging in                     social support services [10]. The challenge with
intelligent dialogue. However, the development of                  smart home technologies for elderly is to create a
systems that clearly fulfill the needs of AmI is                   home environment that is safe and secure to reduce
difficult and not always satisfactory. It requires a               falls, disability, stress, fear or social isolation [4].
joint development of methods, techniques and
                                                                   Like any other system, smart home development
technologies based on services. An AmI based
                                                                   starts with a high level model and proceeds through a
system consists on a set of human actors and adaptive              process of refinement, simulation, verification,
mechanisms which work together in a distributed
                                                                   implementation and test. Much of processes used for



International Conference on Advanced Aspects of Software Engineering
ICAASE, November, 2-4, 2014, Constantine, Algeria.                                                                      148
ICAASE'2014                                                                     Smart Home for Elderly: Modeling and Simulation




smart home design are ad-hoc. By time, all the gritty              independent space that allows guaranteeing adequate
details of implementation are taken care with the                  medical supervision with dedicated sensors. Soprano-
original system description has pretty much been lost,             UE project2 (Services-Oriented programmable Smart
causing a lack of design oversight and a surplus of                environments for older Europeans), funded by the
one-time-only design artifacts [2]. Besides, very little           European commission, aims to help older people to
can be done within a smart home system without an                  have a more independent life. The main contribution
explicit or implicit reference to where and when the               of the project was the creation of middleware
meaningful events occurred. For a system to make                   OpenAAL for software implementation of smart
sensible decisions it has to be aware of where the                 homes.This is an open software framework that takes
inhabitants are and have been during some period of                as input the information from sensors installed in the
time. These insights, together with other information,             house and that the active services to perform actions
will provide important clues on the type of activities             on the environment. The originality of this system is
the user is engaged in and the most adequate                       to provide two layers for semantic representations of
response.                                                          the environment: the first is a description of sensors
So, to cope with the ad-hoc nature of smart home                   and their states, and the second describes the situation
systems design process and to take into account both               of the inhabitants, activities, location, and
dimensions, space and time, to understand key                      emergency. Another project is the DAT project [3]
elements of a situation under development, it’s                    that aims at building up a smart home environment
required to use a suitable formal model that is able to            where people with disabilities can improve their
handle smart home domain specific nature. Thanks to                abilities to cope with daily life activities by means of
Köhler et al [6] who proposed a model that deals with              technologically advanced home automation solutions.
complex systems in an elegant and intuitive manner                 The project has a threefold purpose. The smart home
without losing formal accuracy. A model built upon a               will be used as a physical setting, where clients with
formalism that has a formal semantics to support                   disabilities can follow individual programs aimed at
verification, timed simulation and execution. The                  improving their independence in the home
proposed approach for modeling smart home                          environment.
proposed so far is based on such a model called
Reference net [10]. Reference nets are based on the
                                                                   3. TIMED NETS AND MOBILITY
nets within nets paradigm that generalizes token to
data types and even nets.                                          Reference nets [12] are a graphical notation that are
The paper is structured as follows: section 2 surveys              especially well suited for the description and
related work. In section 3 we give a short                         execution of complex, concurrent processes. As for
introduction on the paradigm of reference net and                  other net formalisms, there exist tools for the
show how this paradigm can be used to model the                    simulation of reference nets called Renew (for
mobility concept in multi-agent special case. Section              Reference Net workshop). Reference nets extend
4 describes the case study which will be modeled in                black and colored Petri nets by means of net
section 5; Sections 6 discusses the result of                      instances, nets as token objects, communication via
simulation. Finally the section 7 concludes this work.             synchronous channels, and different arc types.
                                                                   Definitions of these extensions are given in [8, 9].
                                                                   While pure Petri nets capture the causality and
2. RELATED WORK                                                    conflict situations of a system nicely, there are
                                                                   reasons to add a notion of time to the formalism in
Smart home are often the ideal solution for                        order to model additional dependencies. This is
individuals with different needs and abilities. This is            especially true in the case of simulations of real-
why several projects were introduced in recent years.              world systems.
Pan et al. [5] for example presented a homecare                    In timed nets, a time stamp is attached to each token.
service that tackles the problem of fall discovery                 It denotes the time when the token becomes
using a tri-axial accelerometer and reporting such a               available. Delays may be used with arcs in order to
discovery to an emergency center. The paper                        control the time stamps of token and the firing times
introduces a fall detector based on a neural network               of transitions. A delay is added to an arc by adding to
and a multi-agent architecture for requesting                      the arc inscription the symbol @ and an expression
emergency services. The Aging in place project 1 from              that evaluates to the number of time units. For
the University of Missouri gives seniors an

                                                                   2
1                                                                      http://www.soprano-ip.org/
    http : //aginginplace.missouri.edu/



International Conference on Advanced Aspects of Software Engineering
ICAASE, November, 2-4, 2014, Constantine, Algeria.                                                                         149
ICAASE'2014                                                                   Smart Home for Elderly: Modeling and Simulation




example, x@t indicates that the token value x has to               4. SMART HOME FOR ELDERLY CASE
be move after t time units.                                        STUDY
Look to Figure 1. This is an example model of a
simple traffic light where yellow light is omitted. On             Let us imagine a house with several rooms: living
the left hand side net, the token in the place green has           room, kitchen, bed room, next room, bath room and
to move to the yellow place after 30 units of time.                the front yard. To be smart, such a house should
This will synchronize the transition inscribed with by             contain a large set of services that cooperate to
the channel this:go1() which make the token on the                 simplify the life of the owner, to make energy saving,
place red (on the right hand side net) moving to the               and to provide comfort and security solutions. Figure
green place. Subsequently after 30 units of time, the              2 show an example of a smart home where various
transition inscribed by the channel this:go2() on the              home devices are scattered over rooms to constitute a
right hand side net become enabled and the traffic                 cooperating environment that provide smart services
light will switch to red. Note that cars, modeled as               to the owner.
mobile agents, are created every 10 units of time on
the lower nets (a:new cars_1() and b:new car_2()),
each being numbered accordingly. Cars on either side
cannot move only if the transition isL1Green
(respectively isL2Green) is enabled. Such transitions
are modeled using test arcs. Test arcs, which have no
arrowheads, allow a single token to be accessed
(tested) by several test arcs at once.




                                                                              Figure 2: The smart home case study.
                                                                   More precisely, to ensure security and safety of the
                                                                   owner the smart home uses information from
                                                                   temperature level sensors (Tl), temperature rate
                                                                   sensors (Tr) and smoke detectors (S) to detect
                                                                   possible fire and to take adequate actions. In the
           Figure 1: The traffic light example.                    kitchen, where there is a possibility of gas leakage, a
This example gives an idea how the interplay                       gas detector is installed (G). Gas leakage keeps an
between object net (token net) and system net can be               open eye to detect any gas leakage and take
used to model mobile entities moving through a                     immediate action. There are image sensors (I) and
system net. Such a net offers or denies possibilities to           motion detectors (M) in all places to identify any
move around, while the mobile object net moves at                  visitor and check whether he is authorized or no.
the right time by activating respectively, the                     Glass break sensors (B) and contact switch (C) are
transition that is inscribed with the precondition of              also installed on all windows/doors to monitor their
the channel, and the move transition in the system                 safety. In addition, smart home provides energy
net. Without the viewpoint of nets as tokens, the                  saving solutions through installing occupancy sensors
modeler would have to encode the mobile agent as a                 (O) in all rooms. Systems like lighting (L) will
data structure for example. As a consequence, the                  consider environmental conditions for their operation
inner actions of the mobile entity cannot be modeled               to help saving more energy.
directly, so they have to be lifted up to the system               The overall system will be designed according to
net, which seems quite unnatural. By using nets                    MULAN [7] architecture. MULAN is implemented
within nets we can investigate the concurrency of the              in RENEW3 and has the general structure as depicted
system and the mobile agent in one model without                   in Figure 3 Each box describes one level of
losing the needed abstraction [10].                                abstraction in terms of a system net.
To investigate this modeling method, below we
introduce the smart home for elderly case study. Then
we show how we model this example by means of
reference net paradigm.                                            3
                                                                       www.renew.de




International Conference on Advanced Aspects of Software Engineering
ICAASE, November, 2-4, 2014, Constantine, Algeria.                                                                       150
ICAASE'2014                                                                  Smart Home for Elderly: Modeling and Simulation




The net in the upper left side of Figure 3 describes an            modeling concept. The idea can be further extended
agent system, which places contain agent platforms                 to any smart home room and to any additional
as tokens. The transitions describe communication or               services.
mobility channels, which build up the infrastructure.
By zooming into the platform token on place p3, the
structure of a platform becomes visible. The central
place agents host all agents, which are currently on
this platform. Each platform offers services to the
agents. Agents can be created (transition new) or
destroyed (transition destroy). Agents can
communicate by message exchange. Two agents of
the same platform can communicate by the transition
internal communication. External communication
only binds one agent, since the other agent is bound
on a second platform somewhere else in the agent
system. Also mobility facilities are provided on a
platform: agents can leave the platform via the
transition send agent or enter the platform via the
transition receive agent.
Agents are also modeled in terms of nets. They are
encapsulated, since the only way of interaction is by                       Figure 4: The smart home system net.
message passing. Agents can be intelligent, since
they have access to a knowledge base. The behavior                 To be smart, rooms should be sensible to the human
of the agent is described in terms of protocols, which             presence. Being sensible demands recognizing the
are again nets. Protocols are located as templates on              user, learning or knowing her/his preferences, and the
the place protocols. Protocol templates can be                     capability to exhibit empathy with or react to the
instantiated, which happens for example if a message               user’s mood and the prevailing situation. This is why
arrives. An instantiated protocol is part of a                     we have attached to each room a cognitive stationary
conversation and lies in the place conversations.                  agent (blue transitions). These agents are: the hall
                                                                   agent, the kitchen agent, the living room agent, the
                                                                   bed room agents, the next room agent and the bath
                                                                   room agent. Also, from all the electronic devices
                                                                   scattered over the house we have selected those
                                                                   laying in the living room and in the kitchen, namely:
                                                                   the TV agent, the AC agent, the cooker agent and gas
                                                                   leakage detector which are modeled again as agents
                                                                   (brown transitions). There is also one particular agent
                                                                   (red transition) responsible of checking the blood
                                                                   pressure and/or glucose rate of the elderly at random
                                                                   times of a day. It may take the form of a bracelet
                                                                   hanging on the wrist of the elderly. Finally, this
Figure 3: Agent systems as nets within nets (adapted from          model of house is filled with life by implementing
                          [9])                                     human house inhabitants (yellow transitions). These
                                                                   ones are the owner (the elderly); his doctor and let us
                                                                   say his son (the creation and arc inscriptions of these
5. MODELING SMART HOME COMPONENTS                                  two agents will be detailed so far). All these agents
                                                                   share the same structure depicted in lower right side
Using nets within nets as a modeling paradigm
                                                                   of Figure 3 (of course their knowledge bases and
allows for the direct use of system models at
                                                                   protocols are different).
execution time. This can be exploited as follows: The
overall system will be designed as a system net with               The behaviors of these agents are described in terms
places defining locations (rooms) in or in front of the            of protocols. The protocol selection can basically be
house: Transitions model possible movements                        performed pro-actively or reactively. This distinction
between these rooms (green transitions), Figure 4.                 corresponds to the bilateral access to the place
Due to the paper size limitation, only a subset of                 holding the protocols: protocols. The only difference
services will be presented here to highlight the                   in enabling and occurrence of the transitions rea and
                                                                   pro is the arc from the place incoming messages to


International Conference on Advanced Aspects of Software Engineering
ICAASE, November, 2-4, 2014, Constantine, Algeria.                                                                      151
ICAASE'2014                                                                 Smart Home for Elderly: Modeling and Simulation




the transition rea (see agent box of Figure 3). So it              It is important to note that elderly preferences
may only be enabled by incoming messages. Both the                 described in each agent’s working memory, depend
reaction to arriving messages and the commencement                 on the room in which he is. It will be favorite
of a new conversation is influenced by the knowledge               program TV or multimedia playlist for the living
base place.                                                        room agent, water temperature for the bath room
Human preferences and moods are part of these                      agent, light dimming and air conditioner levels for
agent’s knowledge bases. In simple cases the                       the bed room agent. The following templates define
knowledge base place can be implemented for                        the owner of the house (the elderly) and people close
example as subnets. This is true in the case of sensors            to him.
(modeled as reactive agents). Unfortunately, using                 (deftemplate elderly (slot name) (slot
such implementation for cognitive agents leads to a                sex) (slot age) (multislot disease)
closed model that is often needed to rethink                       (multislot     TVprefer)    (multislot
                                                                   Musicprefer))
completely before introducing any modification. For                (deftemplate related (slot name) (slot
this kind of agent advanced implementations of the                 sex) (slot age) (slot type) (slot
knowledge place as the connections to an inference                 telephone))
engine are also possible. In this way, we will make
                                                                   Other facts necessary to our room’s agents are given
use of Java Expert System Shell4 (JESS). As for other
                                                                   in the following. They let them, among others, to
expert systems, JESS is composed from a rule base
                                                                   create the desired ambiance once the owner enters the
which corresponds to the knowledge base and a
                                                                   living room or the kitchen.
working memory which corresponds to the fact base.
                                                                   (deftemplate enter (slot name) (slot
Its inference engine is composed from the pattern
                                                                   room) (slot time))
matcher which decides what rules to fire and when                  (deftemplate television (slot state)
and the agenda which schedules the order in which                  (slot channel))
activated rules will fire. The execution engine is                 (deftemplate airCond (slot state) (slot
responsible for firing rules and executing other code.             temperature))
At home, the behavior of the owner is highly                       (deftemplate coffeeMaker (slot drink)
                                                                   (slot sugar))
dependent on the timeframe in which he is located.
Intuitively these slots are morning, noon, afternoon               Also, and because this house is owned by an elderly
and evening. Thus, different scenarios related to such             suffering from one or more diseases (usually
parts of the day can be imagined. The ‘’wakeup                     chronic), agents should be able to analyze the
mode’’, the ‘’leave home mode’’, the ‘’return home                 significant factors related to these diseases.
mode’’, the ‘’evening mode‘’ and the ‘’go to sleep                 Therefore, our agents will use the following
mode’’ are examples of these scenarios.                            templates:
Before discussing one of these scenarios, we start by              (deftemplate     bloodpressure   (slot
                                                                   maxVal) (slot minVal))
defining the working memory and the rule bases of
                                                                   (deftemplate glucose (slot rate) (slot
each our agents. A particular attention will be given              state))
to the living room and the kitchen agents. Indeed,
such agents must keep an open eye on the elderly                   Finally, we must note that in a smart home, devices
living in this house. For this, it is necessary that they          are often used to build an environment in which
store information about this person, its environment               many features of the home are automated. But in
as well as other agents. Also, they must exchange                  some situations the user decides whether to perform
their respective information to ensure the welfare of              tasks alone (manual mode) or allow devices
the elderly. For that, each JESS rule engine holds a               throughout the home to realize its tasks (automatic
collection of knowledge nuggets called facts. Every                mode).
fact has a template. The template has a name and a                 Assigning values to these slots allows room’s agents
set of slots, and each fact gets these things from its             to identify persons having access to the house. An
template. We start by defining the ACL message                     example of authorized persons is as follows:
template as following:                                             (assert (elderly (name Ben) (sex male)
(deftemplate       ACLMessage                     (slot            (age      69)      (disease      Diabetes
communicative-act) (slot sender)                  (slot            Hypertension)    (TVprefer   News    Docs
receiver) (slot conversation-id)                  (slot            Entertainment)   (foodprefer   tea   fish
protocol)    (slot     language)                  (slot            salad))
ontology) (slot content))                                          (assert (related (name Tim) (sex male)
                                                                   (age   45)   (type   doctor)  (telephone
4                                                                  077777777))
    http://herzberg.ca.sandia.gov




International Conference on Advanced Aspects of Software Engineering
ICAASE, November, 2-4, 2014, Constantine, Algeria.                                                                     152
ICAASE'2014                                                                  Smart Home for Elderly: Modeling and Simulation




(assert (related (name Bob) (sex male)                             JESS program laying in the elderly agent knowledge
(age   35)    (type   son)  (telephone                             place (modeled in our case as mobile agent)
06666666))                                                         concludes with a valid fact “take breakfast”. Note
Now we can define some JESS rules. Every JESS                      that both JESS and Renew are written in Java. More
rule has two parts, separated by the "=>" symbol. The              precisely, references net are themselves Java objects.
first part consists of the LHS pattern. The second part            Making calls from JESS code to nets is just as easy as
consists of the RHS action. The LHS of a rule                      to make calls from nets to JESS code. So, Driven by
consists of patterns which are used to match facts in              this fact, the elderly agent selects a plan to execute:
the working memory, while the RHS contains                         “enter kitchen”. Actually the plan execution
function calls. Examples of such rules are the                     corresponds to the selection and the instantiation of
following. In the first one, as soon as the owner                  the exact protocol and commencement of the
enters the living room, the agent will check the                   conversation. Figure 5 shows such a protocol.
current time (morning in this case) then turn on the
television and air conditioner with the owner’s
desired channel and temperature. In the second, the
kitchen agent will ask the coffee machine to prepare a
tea without sugar.
1 :(defrule rule1                                                            Figure 5: The enter kitchen protocol.
(enter {name == Ben && room == living
room && time >= 8 && time <= 10})                                  This protocol is selected pro-actively. After its
(elderly {Tvpref == news})                                         instantiation, the transition mv(“kt”) produces a
    =>                                                             performative i that define the entering agent’s
(assert (television (state ON) (channel                            identity, and which is directed to kitchen agent main
NSN)))                                                             interface over the k:out(i) channel; subsequently the
(assert     (airCond      (state    ON)                            agent terminates (by enabling the :stop() transition).
(temperature 25)))
2 :(defrule rule2
                                                                   The k:out(i) is met by synchronizing with the same
(enter {name == Ben && room == kitchen                             transition in the kitchen agent net (:in(i)) which
&& time > 10 && time <= 12})                                       induce the enabling of transition rea on agent main
(elderly {foodpref == Tea})                                        net. Influenced by the identity of the person entering
    =>                                                             the kitchen and the inference results provided by the
(assert (coffeeMaker (drink Tea) (sugar                            JESS program laying in knowledge base of the
No)))                                                              kitchen agent, this one will instantiate, first, the
In addition, the following rules allow
                                                                   “welcome” protocol. So, knowing the entering
the bracelet agent to decide on the
health of the elderly based on his                                 person’s identity and preferences, this protocol will
blood glucose.                                                     welcomes the entering person, then verify whether
3 :(defrule rule3                                                  the manual or the automatic mode is selected
(glucose {rate < 0.60 })                                           (transition h:isManual()), in the first case, the kitchen
    =>                                                             agent will do nothing but keep a close eye on the
(assert (ACLMessage (communicative-act                             elderly. In the second, it produces a performative d
INFORM) (sender wrAg) (receiver lrAg)                              defining the kind of the drink to prepare and over the
(content        "hypoglycemia        ")
                                                                   channel c:out(d), it will send it the ‘’request drink’’
(conversation-id "call son"))
4 :(defrule rule4                                                  protocol (Figure 6). With the same manner this
(glucose {rate > 0.70 && rate <1.10 &&                             protocol terminates by enabling the transition :stop().
state == fasting })
    =>
(assert (ACLMessage (communicative-act
INFORM) (sender wrAg) (receiver kiAg)
(content " normoglycemia "))
5 :(defrule rule6
(glucose {rate > 1.10 })
    =>
(assert (ACLMessage (communicative-act                                         Figure 6: The welcome protocol.
INFORM) (sender wrAg) (receiver kiAg)
(content     "      hyperglycemia    ")                            After that this agent will instantiate the “request
(conversation-id "call doctor"))                                   drink” protocol (the automatic mode). So receiving
Let us focus on the elderly agent. Suppose that we are             the kind of required drink, the transition compose
in the “wakeup mode”, the execution of the of the                  produces a performative containing a string that is



International Conference on Advanced Aspects of Software Engineering
ICAASE, November, 2-4, 2014, Constantine, Algeria.                                                                      153
ICAASE'2014                                                                  Smart Home for Elderly: Modeling and Simulation




directed over the channel c:out(s) to the coffee maker             activated or not. If so, the agent will switch to
agent; subsequently the protocol is blocked waiting                automatic mode so it can broadcast safety messages
for an answer message. An arriving answer enables                  to other agents by enabling the transition this:Safety()
the transition answer. After occurrence of such a                  (turn off the cooker, the TV, the alarm, etc.).
transition the protocol is not blocked any further, and
the receiver will process the answer. Two situations
are possible: if the received answer is positive, then
the agent will update his beliefs; otherwise the
kitchen agent will undertake adequate actions. In
either case the protocol instance is deleted (by
enabling the stop transition), Figure 7.
                                                                              Figure 9: The emergency protocol.


                                                                   6. THE SIMULATION

                                                                   Having defined the features of the smart home
                                                                   components, the system is now ready for execution
          Figure 7: The request drink protocol.                    (simulation). Figure 10 shows an ordinary simulation
Figure 8 shows the prepare drink protocol. The                     state. Only the living room and the hall places are
transition :in(dr) is responsible of passing the kind of           depicted. In addition the living room agent net and its
drink required (tea, coffee, or milk). Then the                    protocol, the window in the background contains the
protocol starts by verifying randomly if the required              JESS facts and rules representing the knowledge base
quantity for the drink preparation is less to the                  of the living room agent.
available one. If yes, the prepare transition is enabled           It is now easy to see the state of the overall system by
(note that drink preparation may take five minutes on              looking at the system net. In fact, it is possible to take
average). Otherwise, the transition supply is executed             control of the whole agent system implementing the
and the transition :out(res) will inform the sender                living room agent scenario by just double clicking on
(the kitchen agent) that his request is fulfilled or not.          one of the corresponding token. The tool RENEW
                                                                   will display the respective net allowing for a
                                                                   complete inspection of the running system without
                                                                   having to interrupt it. The advantage is twofold [10].
                                                                      Whereas a normal modeling process requires at
                                                                       least three stages to reach an executable
                                                                       program: (a) model the system, (b) implement
                                                                       the model and (c) write the visualization for the
          Figure 8: The prepare drink protocol
                                                                       program, using the nets within nets paradigm,
The above protocols describe how agents collaborate                    the modeling process concludes with a running
to assist elderly in the wake up scenario. Let us see                  system model.
how these agents take care of elderly health.                         The visualization of the system model at
Remember the bracelet agent that checks the glucose                    execution time is indeed the implementation of
rate of the elderly at random time of a day. It is                     the system. This eliminates several potential
modeled as a mobile agent (having the same structure                   sources of errors shifting from model to
as other agents) that is transported by the elderly                    implementation to visualization in an ordinary
agent. Now, suppose that the manual mode is                            software design process.
activated, the cooker state is on and the bracelet agent
has detected a hyperglycemia. Once received, the
room agent in where the elderly is, instantiates the               7. CONCLUSION
protocol depicted in Figure 9. This one starts by
                                                                   In this paper we have presented an approach for
executing the transition inscribed by the channels
                                                                   modeling of cooperating ambient agent cohabiting an
callSon and callDoctor. It is modeled to meet by
                                                                   elderly’s home. An important argument for using the
synchronization the same transitions in the house net
                                                                   reference nets paradigm is its strong expressiveness,
(see Figure 4). The doctor, for example, takes three
                                                                   openness and versatility without losing formal
hours on average with a negative-exponential
                                                                   accuracy. Indeed, using such a paradigm, the
distribution to reach the front yard place. After that,
                                                                   modeling process concludes with a running system
the agent will check whether the manual mode is


International Conference on Advanced Aspects of Software Engineering
ICAASE, November, 2-4, 2014, Constantine, Algeria.                                                                       154
ICAASE'2014                                                                  Smart Home for Elderly: Modeling and Simulation




                                           Figure 10: An example of simulation.

model. Also, this paradigm is selected not only for                [5] J.-I. Pan, Yung, C.-Y., Liang, C.-C., Lai, L.-F.:
mobility purposes in multi-agent systems, but mainly               An intelligent homecare emergency service system
because it is built upon a formalism that has a formal             for elder falling. In: World Congress on Medical
semantics to support verification, execution and                   Physics and Biomedical Engineering, pp. 424--428.
timed simulation. We think that such robust and easy-              Springer, 2006.
to-use tool reduces considerably the large initial                 [6] M. Anastasopoulos, D., Bartelt, C., Koch, J. &
effort in term of man-hours required mainly in                     Rausch, A. Towards a Reference Middleware
constructing and validating smart home models.                     Architecture for Ambient Intelligence Systems. ACM
Additional services such as fire system, curtain                   Conference on Object-Oriented Programming,
control, climate control system, multimedia control                Systems, Languages, and Applications. 2005
system and so on, will be directly integrated in the               [7] M. Duvigneau, D. Moldt and H. Rölke,
design of the reference net based multi agent system               Concurrent architecture for a multi-agent platform, in
architecture MULAN.                                                Proceedings of the Workshop on Agent Oriented
                                                                   Software Engineering (AOSE’02), LNCS 2585,
                                                                   Springer Verlag, 2003.
8. REFERENCES
                                                                   [8] M. Köhler, D. Moldt, and H. Rölke, Modeling the
[1] A. Ricci, Buda, C. and Zaghini, N. An agent-                   structure and behavior of petri net agents, J.M.
oriented programming model for SOA & web                           ICATPN 2001, LNCS 2075, 2001, 224–241.
services. In 5th IEEE International Conference on                  [9] M. Köhler, D. Moldt and H. Rölke, Modelling
industrial Informatics (INDIN'07),Vienna, Austria.                 mobility and mobile agents using nets within nets,
pp. 1059-1064, 2007                                                ICATPN 2003, LNCS 2679, 2003, 121–139.
[2] A. K. Nabih, M. M. Gomaa, H. S. Osman and G.                   [10] M. Morris, Ozanne E, Miller K, Santamaria N,
M. Aly, Modeling, Simulation and control of smart                  Pearce A, Smart technologies for older people: A
home Using Petri Nets, International Journal of                    systematic literature review of smart technologies
Smart home. Vol. 5 N° 3, July 2011                                 that promote health and wellbeing of older people
[3] A. Renzo, V. Gower, A. Caracciolo, G. Del                      living at home. IBES, The University of Melbourne,
Zanna and M. Di Rienzo, The DAT Project: A Smart                   Australia. 2012.
Home Environment for People with Disabilities.                     [11] Agoulmine, Deen MJ, Jeong-Soo L, Meyyappan
LNCS 4061, pp.492-499, springer –Verlag Berlin                     M, U-health smart home: Innovative solutions for the
Heidelberg 2006.                                                   management of the elderly and chronic diseases.
[4] J. Barlow, Venables T, Will technological                      IEEE Nanotechnology Magazine 5: 6-11. 2011
innovation create the true lifetime home? Housing                  [12] O. Kummer, Simulating synchronous channels
Studies 19: 795-810. 2004                                          and net instances. Workshop Algorithmen und
                                                                   Werkzeuge für Petrinetze 1998, 73–78.




International Conference on Advanced Aspects of Software Engineering
ICAASE, November, 2-4, 2014, Constantine, Algeria.                                                                      155