Context Activity Selection and Scheduling in Context-driven Simulation 1
Jae Woong Lee1, Abdelsalam (Sumi) Helal1, Yunsick Sung2, Kyungeun Cho3 Department of Computer & Information Science & Engineering, University of Florida, Gainesville, Florida, USA 2 Department of Game Mobile Contents, Keimyung University, Daegu, South Korea 3 Department of Multimedia Engineering, Dongguk University, Seoul, South Korea {jwlee, helal}@cise.ufl.edu,
[email protected],
[email protected]
Keywords: event-driven simulation, context-driven simulation, context, human activity simulation. Abstract Human activities in smart spaces are traced by sensors and logged, as sensor events, in the form of sensory values, when the sensors detect elements of the activities. The event-driven approach that models the combination of the sensor events is one of the most common human activity simulation approaches. However, this approach is scalewise challenged as activities and spaces get more complex. A large volume of sensor events demands more human efforts in modeling, and requires higher processing overhead. We observe that rather than simulating by combining sensor events, semantical abstraction could offer a scalable alternative in managing such complexity. In our previous work, we proposed a context-driven such an approach, which scales well in complex simulation. The approach evaluates current state space and advances the simulation loop by units of context, not by sensor events. By changing the domain of simulation from event to context, we could measure a remarkable performance advantage. Through the experiment, we noticed that activity design was critical to end performance. In this paper, therefore, we focus on modeling activities for a better fit to the contextdriven approach. We introduce a new activity model along with associated algorithms to select and schedule the activities. We also provide an evaluation of the performance and computational complexity of the algorithms. 1.
INTRODUCTION Human-centric service for the elderly and people with special needs has become a hot area of research and development recently. Recognizing human activities properly has been a centerpiece in providing such services properly. Simulation of human activities is an emerging branch of simulation that aims to support research in human activity recognition. Simulation can generate synthetic datasets that can be used in developing and validating human activity recognition algorithms. Also its virtualized environment can be a testbed for testing a proposed technique or algorithm. Because it does not suffer from limitation of actually building and deploying a smart space (deploying expensive devices such as sensors and smart objects, colleting activity datasets for weeks, and engaging actual human subjects which requires government
approvals), simulation encourages researchers to move quickly in exploring new techniques for high accuracy human activity recognition. Traditionally simulation of human activities has been based on an event-driven approach, which models human activities with consecutive events along a time line [7]. DiaSim [3], SIMACT [6], and Persim [2] are simulators that apply the approach. This approach requires detail design in a low level (by sensor events) for human activities to simulate with high realism and accuracy. As more complicated and diverse human activities need to be simulated, the design through modeling sensor events demands users significant amount of efforts and increases computational complexities [1][11][13]. Also, for scaling virtual space and simulation duration, a much larger number of events will need to be defined and simulated leading to a scalability problem. In this approach, scaling simulation of human activities is very costly. To address the issue of scale, we proposed the contextdriven approach (to be contrasted with the event-driven) [11][13], which reduces complexity and human efforts of simulation design, and that produces scalable simulation. Our approach could drive the simulation at a higher level and eventually reduces the complexity to achieve scalability. As a higher-level structure, we defined context that covers all the status information of environmental entities such as space, objects, and virtual characters, including human subjects. It is a meaningful state that represents consecutive state spaces possibly happening in the smart space. Given a context, corresponded activities are selected and scheduled. Because the context-driven approach is driven by vectors of entities rather than by a single event, it reduces computational complexity and leads to scalability. The simulation core advances the simulation by hopping through key contexts, each associated with one or more activities. In this paper, we zoom in on the concept and definition of contexts as well as the associated selection and scheduling algorithms. We define contexts in terms of a set of important information required for selection and scheduling. We further define context activities to be the primary unit performed within a given context, which changes states of a smart space. To realize a high fidelity of the algorithms, contexts and context activities are modeled correlatively. We propose selection algorithms that
determine the next state to where to propel the simulation to. As contexts may have multiple context activities, proper and efficient scheduling of these activities becomes necessary. We present two scheduling algorithms that are applied after context selection. The rest of this paper is organized as follows. We briefly review previous simulation research and simulators in section II. In section III, we give a background of our context-driven simulation approach that we introduced in details in [11][13]. In section IV, we explain the context model and the context activity model that we design for our context-driven approach. Algorithms for selection of context activities and scheduling are presented next based on these models. Validation through experiments and analyses between event-driven and context-driven simulation is presented in section V. Finally, we conclude the paper and present our future work. 2.
RELATED WORK Simulation of human activities has been developed using diverse approaches. Applied by an event-driven approach, DiaSim [3] is a simulator, in which each activity invokes one event in a virtual space and synthesizes sensory data considering activities. The goal of DiaSim is to simulate applications such as fire situations and intrusions for identifying potential conflicts. Under DiaSim, therefore, human activities are events that are induced by stimulus procedures (any change in the environment that can be consumed by sensors) or services (sensors and actuators) and used to check operationality of applications. Although it successfully examines the fidelity of applications, it lacks the ability to mimic a variety of human activities. Similarly, SIMACT [6], which provides 3D environment, lacks of designing modeling various human activities. By GUI, it increases realism for space, object, and activities, but the activities should be predefined in a script. Simulating the script can imitate activities with high realism, but it may limit to extend modeling of activities. Persim [2], which is our early work in human activity simulation, enables the design and specification of human activities in pervasive spaces. It defines an activity by a human being as one event and predefines the relationship between such event and sensors that activates when each event is generated. It aims to simulate diverse and complicated human activities. However, this early version of Persim requires massive human efforts in specifying all sensor events for complex activities. This manual configuration for activities may lack adequate realism and suffer from high computational complexity as higher realism is attempted. These limitations exacerbate especially for long period simulations and for complex activities, and bring scalable issue. Some approaches can be proposed to resolve these issues. First, agent-based modeling (ABM) can address the
realism issue. In ABM, autonomous entities called agents are modeled to drive simulation through decision-making [9]. Agents are independent subjects who perform activities and interact with other agents [10]. Every agent accesses a given situation and decides what activities he or she is performing. Simulation is driven by activities of the individual agents. Unlike event-driven simulation that specifies the entire sensor events, it describes attributes, rules for interactions of activities and histories of activities for each agent. This approach enables the user to simulate more complex activities in more natural and realistic way than event-driven simulation. NetLogo and MASON are popular simulation platforms implemented through ABM [8]. Even though ABM contributes to enhancing naturality and reality of simulation, it holds the same principle of event-driven approach: activity of each agent is modeled and driven through low-level events [9]. The scalability challenge therefore remains to be addressed. Macroscopic simulation modeling [14] can address the scalable challenge and resolves it by modeling vectors of information about the simulated space, sensors, virtual characters, and their activities, rather than specifying all single events. We define the vectors as a context and refer to this simulation approach as context-driven simulation [11][13]. By progressing through the different contexts, computational complexity can be reduced and scalable simulation can be achieved. In this simulation, human efforts can be better managed in high realism simulation where it is easier to specify and design around contexts than it is around low-level events. To maximize benefits of this approach, the context and activities performed in the context (context activities) need to be well-organized. 3.
BACKGROUND OF CONTEXT-DRIVEN SIMULATION The main enhancement of context-driven simulation over the ABM approach is its scalability. By progressing through consecutive state spaces of interest – contexts, the simulation is focused, more effective and scalable. Also because inter-context causality is captured in the contextdriven approach, only relevant and available activities are considered in the simulation, which is an added source of scalability. Three components are required to describe the causality relations [13]: (1) Context graph, which consists of contexts drives the entire simulation process and draws activity scenario in smart homes, (2) Context activities, which are performed in a given context conduct daily living activities actually and change state space, and (3) State space, which describes status of spaces such as smart homes provides primary information about the environment. Context-driven simulation is processed by interactions between the key components. First, current state space is evaluated to decide a next context designed in a context graph. By the result of the evaluation, the context graph
decides whether it drives contexts or not; if current state space is evaluated that it can transition into a next context, then the next context is driven. Otherwise, the current context continues. In a given context, a set of context activities is scheduled, propelled and performed. A performed context activity reflects its effect on the state space, changing values of involved sensors. When sensor values change, the state space is reevaluated which reinspect the context graph for selecting the next context. These fundamental processes continue until simulation is terminated, as shown in Figure 1. This framework is hierarchized into two loops [13]: inner loop and outer loop. Inner loop is to select context activities AG, schedule them to find the next context activity Aj, and then propel it. When Aj is performed, evaluation for the current state space is preceded to find a next context. During the evaluation, because multiple candidates CT for the next context may be found, additional procedure to select one of CT is necessary. This entire process is repeated until a next context is found, as shown in Algorithm 1. Note that AG needs to be re-selected in the next loop, because performance of Aj changes state space, in which some context activities in AG may not be available to perform. The next context is selected from CT, is transitioned and begins in outer loop. In this paper, we focus on selecting context activities and scheduling them, therefore we only show inner loop that precedes these work. Algorithm 1. Run Context Context Set CT // candidates for possible next contexts Boolean isContextTerminated FALSE do Activity Set AG Select Context Activities //Algorithm2 Next Activity Aj Schedule Context Activities //Algorithm5 perform Aj //Animate Aj CT evaluate possible next contexts isContextTerminated evaluate context termination while CT is null or isContextTerminated return CT
4.
CONTEXT AND CONTEXT ACTIVITY In context-driven simulation, a context is the primary component in the outer loop [11]. On the other hand, in the
inner loop that imitates running a context, the primary component is a context activity that is selected and scheduled in the context. Its performance affects state space and finally changes a context in the other loop. In other words, context and context activities are correlated to each other. In this section, we model context and context activity and introduce how they inter-influence to each other. 4.1. Context and Context Activity Model Context is a general abstraction that is used mostly in research about context-awareness with various definitions [4][5]. Their common idea to define a context is that a context can characterize entities (e.g., space, sensor, human being) and describe interactions between the entities. Their research aims to analyze the status and interactions of entities and recognize a proper context. Hence, they concern how to capture contextual status and how to reason it to find the context. Simulation driven by contexts has the reverse goal of context-awareness. First a context is transitioned into; then interaction between entities occurs within that context. Through the interaction, the entities are affected, and their state is changed and so does the overall space state. Not only the selection of the next context but also the consequential effects (i.e., human activities and actuation of objects) are important in context-driven simulation. Thus, we need to find out what status entities are in (state space) and what affects them (activities and actuations). In a pervasive space, a state space can be described by the status of sensors, objects, and human residents (refer to it with sensor values for simplicity). And for affecters of entities, we care only for human activities. In our work, we define context C as a tuple with three elements following as C = (T, S, V), where T stands for the starting time of context, S for state space regarding the subset of interesting sensors involved in the context, V for status of all human subjects who are acting in a pervasive space (including location, animation, and activities that will be performed). When a context begins, next activities that can be performed should be selected as the first step. Recall that the activities are called context activities. In decision of context activities, there are two ways.
Figure 1. Context-driven framework
•
•
Motivation-oriented Selection (MoS): the current state gives hints to predict next context activities and motivate them to perform. MoD algorithms have been covered in the literature in [16]. Goal-oriented Selection (GoS): in a given state, a specific goal state should be chosen to achieve by performing next context activities [17].
The difference between two ways is shown in an example, in which a human resident found a fire in a living room. In MoS, he/she is trying to find an extinguisher and extinguish that because he/she is in a dangerous situation. In GoS, on the other hand, he/she tries to extinguish that, because he/she wants to get out of this dangerous situation and be in a safe room. In either way, context activities may be similarly chosen, but how to select them is different. The former selects context activities only based on the current state, whereas the latter needs to choose a next state as a goal first and then select them based on the goal. In the definition of context-driven simulation, a next context is not selected until updated state space satisfies predefined conditions [13]. It can increase diversity in deciding context activities and also reduce computational complexity in choosing a next context. In our approach, therefore, selection of context activities follows MoS. Applied MoS in the previous example, a human resident extinguishes fire in following phases; first, he/she recognizes fire and searches all possible activities; then he/she finds all possible ways using the activities and chooses one optimal way; he/she performs the first activity in the chosen way, and checks whether fire is extinguished; he/she repeats this process until the fire is extinguished. This process is described in Figure 2. When a given context C begins, C is analyzed to select context activities AG (Analyzing phase). Next, it is motivated to schedule context activities in AG and then find a next context activity Aj that is ready to propel (Motivating phase). Then Aj is performed and reflects its effect on state space S (Performing phase). Reflected S is evaluated to decide whether a next context C’ is transitioned or not (Evaluating phase). If the evaluation returns false, the current context C continues and repeats these entire processes. In the rest of paper, we present how to analyze context (and state space) for selecting context activities and how to motivate for scheduling them. Context C begins
Analyzing) Analyzing)
Next Context C’ is transitioned Staying in C
Selecting AG
Mo,va,ng)
Scheduling AG and finding Aj
Evalua,ng) Reflecting on S
Performing)
Figure 2. Inner context process; AG is selected context activities; Aj is the next context activity; S is a state space
Goal of the analyzing phase is to find out activities that could be performed in a given context C. These activities are available to be performed and are relevant to C. To evaluate, availability and relevance of each activity, conditions for activities to be performed and C are analyzed and compared; therefore, if C satisfies the conditions, the activities become context activities AG, which mean they could be performed within C. When simulation is processed in the middle of C, a state space is analyzed and evaluated, instead of C. Since performance of a context activity changes environment, C constitutes out of date state and state space is up-to-date. In the updated state space, some of context activities (previously selected) may be dropped and some activities (previously not selected) may become context activities. Context activities in AG can be performed in various sequences. Reviewing all possible sequences and discovering the optimal sequence is called scheduling. Motivating phase aims to provide information and schedule AG based on the information and choose the optimal schedule. Even though the chosen is the optimal and available to be performed, it may not continue to perform after the first context activity in the schedule is performed. That’s because the first performance changes the environment, in which the rest of the schedule may not be able to occur. Thus, the first context activity in the schedule is the only one that needs to be focused as immediate context activity. A context activity those conditions are most satisfied becomes the immediate context activity. It can reduce load of scheduling the entire context activities. Following these processes for selection and scheduling, context activity requires information. Conditions for the context activity to be performed [12], changes on state space to predict effect of the context activity, and animation to be performed and update actually in a virtual space. The context activity is described four properties as follows, Aj = (precond(Aj), effect+(Aj), effect-(Aj), playback(Aj))
precond(Aj) means preconditions in which conditions Aj is available to perform. effect+(Aj) is positive effect that means attending information about state space that was immaterial and irrelevant before performing Aj, but has become important and relevant. effect-(Aj) is negative effect that means ignoring information about state space that has become irrelevant. playback(Aj) stands functionality to actually animate and imitate Aj in a smart space, different than classical uses in planning that can be achieved by referring only to the precondition and the effect. It describes how Aj is operated and affects the smart space. Because precond(Aj), effect+(Aj) and effect-(Aj) should be comparable to context (or state space), they are vectorized by sensor values (or range of values), location and usage of object(s), and location of virtual characters, etc. Because playback(Aj) is related to animating of Aj, we introduce the
other three properties that are used in selection and scheduling algorithms in this paper. 4.2. Selection of Context Activities As the first step in a given context, the goal of the selection is to find as many as available context activities. It is similar that a human is trying to consider all available activities when recognizing he/she is in a specific context. In a given context C, a set of context activities AG (={A1, A2, …, Aκ}) is derived from all activities A (={A1, A2, …, Aζ}, AG ⊆ A) by generation function G. Because AG is a collection of activities, each element should be distinct. G: C AG. If AG = null, simulation will be forced to stop.
The context selection algorithm determines AG by evaluating two criteria, which are individualized for each context activity. These criteria correlate contextual information that represents the smart space elements such as state space, environment, objects, and virtual characters. A brief definition of these criteria is given below, followed by more detailed formal definitions. • •
Applicability: an activity should be available to be performed under the current context. Achievability: all context activities should be correlated to the current context, so that they can be processed to achieve a proper next context.
The two criteria are evaluated in order. By the first criteria, we collect a tentative set of AG for applicable context activities as candidates. Only the candidates that are achievable are selected a final set of context activities, while others are removed from AG. It benefits for selecting proper context activities and increases accuracy of selection as well as high realism. Algorithm 2 shows how the criteria are sequentially evaluated. Algorithm 2. Select Context Activities Context C a given context Activity Set AG AG Get Applicable Activities with C, A for each Context Activity Candidate Aj in AG if not Achievable Activity (C, Aj) remove Aj from AG end if end for return AG
//Algorithm3 //Algorithm4
4.2.1. Applicability In the real world, after analyzing the current context C, a human attempts to find which context activities are applicable. In the previous example, when a human finds fire in a room, he/she is looking for what he/she can do immediately, e.g., using an extinguisher or calling emergency. The activities, which are applicable under the current context, could become context activities. To evaluate the applicability of an activity Aj, we examine for
matching C and each precondition of precond(Aj). If C does not violate any precondition in precond(Aj), A is said to be applicable and becomes a context activity. When matching C and a precondition, all simulation entities indicated in the precondition should be evaluated. For each simulation entity Є, its current status (value) in C should satisfy condition of Є defined in precondition. matched true for each entity Є indicated in precondition ЄC status of Є in C {ЄA} all required values of Є in precondition if ЄC ∉ {ЄA}, matched false end end for
This matching is evaluated for all preconditions in precond(Aj). For instance, back to the previous scenario, an extinguisher should be available and located in a room (i.e., LOCATION = IN) and the amount of carbon dioxide filled in the extinguisher should be high enough to use (e.g., 3 ≤ AMOUNT ≤ 5). Only if all the preconditions are matched, Aj becomes applicable, shown in Algorithm 3. This algorithm collects all the applicable context activities and returns them to Algorithm 2 that called this. Algorithm 3. Get Applicable Activities Activity Set AG Boolean applicability TRUE for each Activity Aj in A Condition Set AC precond(Aj) for each Condition ac in AC if not matched ac and C applicability FALSE end if end for if applicability = TRUE add Aj into AG end if end for return AG
Even though Aj is applicable and relevant to C, it cannot always be preceded within C. Performance of Aj changes state space, which should be able to occur within C. If the state space is defined as a context that is not one of possible next contexts indicated in context graph, it violates the rule of context graph, because A transitions into where it should not go [11]. To avoid violation, one more criterion needs to be evaluated when selecting context activities. 4.2.2. Achievability By the definition of context graph CG (={C1, C2, …, Cγ}), a context C (∈ CG) must transition into one of its next contexts CN (={C1, C2, …, Cν}, CN ⊆ CG, ν < γ), if it exists. Or it should stay. When Aj is performed within C and the current state space S is changed into S’, S’ should become
one of CN or stay as one of state spaces that can exist within C. If so, S’ is called as an achievable state space, because it achieves a next context or has possibility to achieve it later. However, if S’ is equal to a context that is not one of CN, it violates the definition of context graph. Context activity that derives the S’ is violative and is uncorrelated to C. To guarantee that Aj is effective and correlated to C, we should evaluate effect of Aj and check whether its change on the current state space (that becomes S’) is achievable or not. The first step to check achievability, therefore, is to find the S’. For getting S’, we utilize state-transition function γ(S, Aj), which returns after-state S’ after performing Aj[12] in S. The after-state of S’ is represented by Γ(S). When C begins, we apply C instead of S, because the current state space is equal to C. γ(C, Aj) = (C – effect-(Aj)) ∪ effect+(Aj) Γ(C) = {γ(C, Aj) | Aj} S’ Γ(C) On the other hand, if the simulation is in the middle of the context, we transition a state from S. In this case, we use γ(S, Aj) and get the next state space Γ(S). Next, Γ(C) is compared to contexts that are not defined as CN in CG. They should not inter following statement should not have intersection as follows, Γ(C) ∩ {CG - CN} = ∅
In the middle of simulating C, Γ(S) is compared instead of Γ(C). Algorithm 4 shows that achievability of each context activity in AG, and returns its achievability. Algorithm 4. Is Achievable Activity Boolean achievability TRUE Context Set CG defined contexts from context graph Context Set CN next possible contexts of C State Space S’ state-transition by Aj // Γ(C) γ(C, Aj) remove CN from CG for each Context cc in CG if cc = S’ achievability FALSE end if end for return achievability
4.3. Scheduling of Context Activity Once AG is collected through Algorithm 2, it needs to be scheduled for performing them and reflecting their effects. Scheduling allows duplicating a context activity, dissimilar to AG that has distinct context activity. In the kitchen, for instance, a cook continues to walk around in the middle of boiling water and brining ingredients from refrigerator. Schedule of context activities is propelled one by one in order. When a context activity is performed, it affects state space, which may change applicability of context activities. Suppose that a virtual character schedules to extinguish fire
and using a fire extinguisher is the first context activity. While using the extinguisher, what if the carbon dioxide is exhausted earlier than scheduled? All the rest of schedule, no matter what context activities are followed, is not available to keep processed. Context activities need to be rescheduled for continuing extinguishing fire. Therefore, what is concerned and needs to be focused is the immediate context activity. This can ease the scheduling of context activities. To find the immediate context activity, we propose a simple heuristic approach, which is to find a context activity that is most likely performed in the current state space. Because this approach finds only one context activity, it benefits of less computational complexity. In our heuristic approach, we compare each of context activity to the current state space, and find a context activity those preconditions are most satisfied by the current state space. For comparison, we utilize Euclidean Distance that can compute vectors. When a context C begins, the distance for each context activity is calculated and the context activity with the least distance is chosen to be the most likely performed. This is called Context Inference Scheduling (CIS) because the context is referred for the comparison. A! ith context activity |C – precond(A! )| ≤ |C – precond(A! )|, j ≠ i
After a context began, the distance is calculated by referring state space S instead of C. Therefore, it is called State Space Inference Scheduling (SIS). |S – precond(A! )| ≤ |S – precond(A! )|, j ≠ i
Algorithm 5 describes how to schedule context activities and find the immediate context activity A. Algorithm 5. Schedule Context Activities Context Activity Set AG Context Activity Aj for each Context Activity ca in AG if ca is the first context activity Aj ca else if ca has minimum distance Aj ca end if end if end for return Aj
4.4. Computational Complexity Computational complexity for selection mainly depends on description of simulation scenario. When checking applicability, simulation entities Є indicated in precondition that is defined in each activity is reviewed. For the worst case, a precondition is defined by all existing simulation entity, referred by ε. It is required to check all activities in
A, which has ζ number of activities. Hence, computational complexity becomes O(ζε). Checking achievability is more complicated, because more simulation components such as context graph CG and next contexts CN are involved for each context activity in AG. Also additional computation for transitioning states is required for checking achievability. Thus, computational complexity costs O(κ(γ − ν + ε)), where κ means the number of context activities in AG, γ means the number of all contexts defined in CG, ν means the number of possible next contexts CN of C. For state-transition, the number of all simulation entities ε is required for the worst case. The total complexity is O(ζε + κ(γ − ν + ε)). Among the parameters, γ, ν, ε and ζ are fixed, when designing simulation. Even though κ is a dynamic variable during simulation, it is less than ζ. Therefore the complexity is linear and convergent. For scheduling, computational complexity is simpler, because only the immediate context activity needs to be found among all the context activities in AG. For each context activity, Euclidean Distance between a context and preconditions of a context activity is calculated. For the worst case, it cost ε similar to state-transition. Therefore, the complexity is O(κε), which is still linear and convergent. 5. CASE STUDY 5.1. Feasible Validation Approach To validate simulation of human activities, we have focused on two aspects – realism[1][2] and scalability [11][13]. In this paper, we presented selection and scheduling of context activities, which increase realism of simulation of human activities. For validation, therefore, we focus on realism of two algorithms and compare similarity of scheduled context activities in a simulated scenario and an actual scenario. This is different than comparison similarity of datasets applied in [1][2]. Comparison of datasets is not appropriate to prove similarity for scheduling of activities, because two different activities may generate similar datasets. Suppose that we simulate two activities having breakfast and having dinner in the same location. Because the sensor events in datasets look very similar, they may be considered as similar activities. It could make confusion when analyzing schedule of context activities. Therefore, we need alternative method to compare similarity of activities – comparison of schedule. To look into the similarity of scheduled activities, we apply Bayesian Network shown in Figure 3; first we create Bayesian Network with actual scenarios and populate conditional probability table (CPT). Then we apply a simulated scenario into CPT and calculate the joint probability distribution on the simulated scenario. If the probability is not enough high, it is not considered to happen actually. For reference of the acceptable probability, we apply actual scenarios and get the occurrence probability, which is used for comparing to the occurrence
probability of a simulated scenario. If their probabilities have high similarity, we could validate the simulation approach. We apply this validation way on both contexts and context activities, because contexts and context activities are strongly correlated. Due to their correlation, they all need to show high similarities for validating the algorithms. 5.2. Selective Simulation Scenario We have validated simulation using different scenarios and smart spaces to show that it was independent from simulation scenario and showed outstanding performance for any scenario. Among the dataset, we select a scenario described by Kasteren [1] and validate selection and scheduling context activities, because the scenario continues to perform activities during almost full month (24 days), whereas others are sparsely preceded. The scenario in that activities are consecutively and ceaselessly performed and logged into a dataset is useful for examining transitions between contexts through performing context activities. We split the scenario into 24 daily sub-scenarios for analyzing patterns for daily living activities. Actual'Ac(vity' Schedule'
Simula(on'
Simulated'Ac(vity' Schedule'
Bayesian'network'with'Condi(onal'Probability'Table' Probability'P'
Comparison
Probability'P’'
Figure 3. Validation using Bayesian network
In the scenario, 14 sensors are used to detect 7 activities in a smart house. And we model a context graph with five contexts: “sleeping in the bedroom,” “washing in the bath room,” “having breakfast in the kitchen,” “having dinner in the kitchen,” and “going out,” shown in Figure 4. Sleeping in the bed room Washing in the bath room
Having breakfast in kitchen
Going out Having dinner in kitchen
Figure 4. Context graph for scenario in case study
5.3. Analysis and Validation Among 24 actual sub-scenarios, we choose 20 subscenarios that have enough activities performed. Then we apply them into Bayesian network-based and create CPT. For reference, we apply each of sub-scenarios into the CPT and get occurrence probabilities, as shown in Figure 5 (a).
To analyze their feasibility and realism, we compare occurrence probabilities of simulated scenarios calculated by the same way. They may have different peak points because ADLs can be performed in different days. Therefore, we focus on their patterns and average of their probability distributions. They have similar patterns and their averages of probability distributions have similarity of 89.02%. It can draw high similarity of contexts, shown as in Figure 5 (b). Mostly context activities and contexts have similarly high probability distribution in the same day, because they are in gear. Simulated contexts have 93.31% similarity to actual contexts. 3.00E'04%
Actual%scenarios% Simulated%scenarios% Average%of%actual%scenarios% Avarage%of%simulate%scenarios%
Distribu(on+Probability+
2.50E'04%
REFERENCES [1]
[2]
[3]
[4]
[5]
2.00E'04% 1.50E'04%
[6] 1.00E'04% 5.00E'05%
[7]
0.00E+00% 1%
2%
3%
4%
5%
6%
7%
8%
9% 10% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20%
Days+
[8]
(a) 2.50E'02%
Actual%scenarios%
Simulated%scenarios%
Average%of%actual%scenarios%
Avarage%of%simulate%scenarios%
[9]
Dstribu(on+Probability+
2.00E'02%
1.50E'02%
[10]
1.00E'02%
[11]
5.00E'03%
0.00E+00% 1%
2%
3%
4%
5%
6%
7%
8%
9% 10% 11% 12% 13% 14% 15% 16% 17% 18% 19% 20%
Days+
(b)
Figure 5. Joint probability distribution of scenarios; (a) by context activities; (b) by contexts
CONCLUSION In this paper, we present two key algorithms for selecting and scheduling context activities in context-driven simulation. We introduce models for context activities and contexts to operate these algorithms efficiently. We validate this entire design by analyzing a Bayesian network-based comparison for similarity of scheduling context activities and transitioning contexts. Our validation shows significant similarity between simulated and actual context. One assumption we have in our models and algorithms is that a context activity cannot be interrupted during its simulation. This is a limitation as context activities should be allowed to be interrupted as the case in the real world. This will be a subject of further investigation in our future research.
[12] [13]
6.
[14] [15]
[16]
[17]
A. Helal, K. Cho, W. Lee, Y. Sung, J. W. Lee, and E. Kim, “3D modeling and simulation of human activities in smart spaces,” in Proc of the 9th International Conference on Ubiquitous Intelligence and Computing, pp. 112-119, Fukuoka, Japan, Sep 2012. S. Helal, J. W. Lee, S. Hossain, E. Kim, H. Hagras, and D. Cook, “Persim – simulator for human activities in pervasive spaces,” in Proc of the 7th International Conference on Intelligent Environments, pp. 192-199, Nottingham, UK, Jul 2011. W. Jouve, J. Bruneau, and C. Consel. “DiaSim: A parameterized simulator for pervasive computing applications,” in Proc of the 2009 IEEE International Conference on Pervasive Computing and Communications, pp. 1-3, Galveston, Texas, Mar 2009. D. G. Abowd, A. K. Dey, J. P. Brown, N. Davies, M. Smith, and P. Steggles, “Towards a better understanding of context and contextawareness,” in Proc of 1st Inter’l Symp. on Handheld and Ubiquitous Computing, pp. 304-307, Vol.1707, Karlsruhe, Germany, Sep 1999. S. S. Yau, Y. Wang, and F. Karim, “Development of situation-aware application software for ubiquitous computing environments,” in Proc of 26th IEEE International Computer Software and Applications Conference, pp. 233-238, Oxford, UK, Aug 2002. K. Bouchard, A. Ajroud, B. Bouchard, and A. Bouzouane, “SIMACT: A 3D open source smart home simulator for activity recognition with open database and visual editor,” in Proc of Int’l Journal of Hybrid Info/ Technology (IJHIT) Vol.5, No.3, Jul 2012. J. S. Carson, “Introduction to modeling and simulation,” in Proc of the 37th Conference on Winter Simulation, Orlando, FL, Dec 2005. M. Laclavik, S. Dlugolinsky, M. Seleng, M. Kvassay, B. Schnider, H. Bracker, M. Wrzeszcz, J. Kitowski, and L. Hluchy, “Agent-Based simulation platform evaluation in the context of human behavior modeling,” in Proc of the 10th International Conference on Advanced Agent Technology, pp. 396-410, Taipei, Taiwan, May 2011. E. Bonabeau, “Agent-based modeling: Methods and techniques for simulating human systems,” in Proc of the National Academy of Sciences, Vol.99, No.3, 7280-7287, May 2002. C. M. Macal, and M. J. North, “Tutorial on agent-based modeling and simulation,” in Proc of the 37th Conference on Winter Simulation, pp. 2-15, Orlando, FL, Dec 2005. J. W. Lee, A. Helal, Y. Sung, and K. Cho, “A context-driven approach to scalable human activity simulation,” in Proc of the 2013 ACM SIGSIM Conference on Principles of Advnaced Discrete Simulation, pp. 373-378, Montreal, Canada, May 2013. M. Ghallab, D. Nau, and P. Traverso, “Automated Planning Theory and Practice,” Morgan Kaufmann, 2004, ISBN-10: 1-55860-856-7. J. W. Lee. A. Helal, Y. Sung, and K. Cho, “Context-driven control algorithms for scalable simulation for human activities in smart homes,” in Proc of 10th IEEE International Conference on Ubiquitous Intelligence and Computing, Vietri sul Mare, Italy, Dec 2013. A. Kaufman. “A micro-macro simulation model for a signalized network,” in Proc of 13th Symp. on Simulation, pp. 87-101, 1980. T. V. Kasteren, A. Noulas, G. Englbienne, and B. K Kröse, “Accurate activity recognition in a home setting, in Proc of the 10th International Conference on Ubiquitous Computing, pp. 1-9, Seoul, Korea, Sep 2008. S. Munroe, M. Luck, and M. d’Inverno, “Towards a motivation-based appraoch for evaluating goals,” in Proc of the 2nd International Joint Conference on Autonomous Agents and Multiagent Systems, pp. 1074-1075, Melbourne, Australia, Jul 2003. C. Cheong, and M. Winikoff, “Hermes: a methodology for goal oriented agent interactions,” in Proc of the 4th International Joint Conference on Autonomous Agents and Multiagent Systems, pp 1121-1122, Utrecht, Netherlands, Jul 2005