Collection Mémoires et thèses électroniques
Accueil À propos Nous joindre

CHAPTER 7: Selection of the Simulation Tool and the Cretaion/Execution of the Multiagent Geosimulation Models Using Data

Table des matières

In this chapter, we describe and illustrate two steps of the proposed method. First, we present how we select the simulation platform that is used to execute the geosimulation model using the gathered data. In the second step we present how we create the agent models in the selected platform and how we can execute the geosimulation in this platform.

To develop an operational computer geosimulation we need to implement the simulation models on a computer. Hence, we have two choices:

(1) we can program our own geosimulation prototype using a standard programming language or (2) we can use an existing simulation tool which can be a simulation language, environment, or platform. In the two cases, the choice of the language or the simulation tool is not made in an ad-hoc manner, but it depends upon several criteria which need to be defined and discussed. Hence, the importance of the step ‘ Select the simulation tool ’ of our method. Once the language or the simulation tool is selected, the developer can use it in order to develop the geosimulation prototype and to execute the simulation models using the collected data. This chapter aims to present two steps of our proposed method. In the first step, we choose the simulation tool, while in the second step we present how we use this selected tool to create and execute the geosimulation models. The chapter is organized as follows: In Section 7.1, we present the generic descriptions of these steps. In Section 7.2, we illustrate the first step by showing how we selected the simulation tool[5] that is used to execute the shopping simulation models. Section 7.3 aims to present, in detail, the selected tool which is used to develop the shopping behavior geosimulation. Section 7.4 demonstrates how this tool is used to specify the geosimulation models of the shopping behavior in a mall, while Section 7.5 presents the execution of the shopping behavior geosimulation models (the geosimulation shopping behavior prototype), and discusses the execution results. Finally, Section 7.6 discusses the issues presented in the chapter and concludes the chapter.

In this section we provide a generic presentation of the two steps of our method: Select the geosimulation tool/platfor/language and create and execute the géosimulation models using the selected platform .

In the previous steps we designed the simulation models and we gathered the gathered data concerning the phenomenon to be simulated. In order to develop an operational geosimulation, we need to create and execute, on computer, the agent-based simulation models using the gathered data. For this reason, we may have two choices:

■ to implement our simulation models using a standard language, such as C, C++ or Java for example. In this case, we need to select the language to be used for the implantation.

■ to use an existing simulation tool/platform/language. In this case, we must choose a simulation tool/platform/language that will be used to execute the simulation models. There are several simulation tools/platforms/languages that can be used to create computer simulations. For example, the interested reader can visit the web site http://www.idsia.ch/~andrea/simtools.html, which presents a good collection of modeling and simulation resources on the Internet. Naturally, a question arises: How to select the appropriate simulation tool/platform/language for a given application ? Metrics to evaluate simulation tools/platforms/languages include modeling flexibility, ease of use, modeling structure (objects, agents, etc.), code reusability, graphic user interface, animation, hardware and software requirements, output reports, graphical images, customer support, and documentation. It is important to mention that the choice of a suitable simulation tools/platform/language depends upon the characteristics of the system to be simulated and its environment .

This step contains the following two sub-steps (see Fig 7.1):

(1) study the existing simulation tools/platforms/languages : In this sub-step, we must study several simulation tools/platform/language in order to choose the one which can be used to develop the geosimulation prototype.

(2) choose the tool/platform/language : In this sub-step, we must choose the suited tool/platform/language based upon several selection criteria and the characteristics of the phenomenon to be simulated.

Before presenting the details of this step, let us define some basic concepts:

- Scenario: It is defined in the Oxford English Dictionary as follows: (a) an outline of any possible sequence of future events; or (b) an outline of an intended course of action; (c) a scientific model or description intended to account for observable facts). ’ (http://www.oed.com/)

- Simulation scenario: It is defined as the definition of the sketch or the outline of a simulation. This sketch or outline involves the following elements: actors of the simulation, the simulation environment, the simulation time period, circumstances or future events occurring during the simulation execution, etc.

During this step, we perform the simulation models on the selected simulation tool/platform/language, using the gathered data characterizing the system/behavior to be simulated and its environment. This step contains the following sub-steps (see Fig 7.2):

(1) Create the multiagent geosimulation models in the selected tool/platform/language : In this sub-step, we translate the multiagent geosimulation model into the selected tool’s formalism in order to create the agents’ models in the simulation platform. Hence, the structures and behaviors of the agents belonging to the multiagent geosimulation models (abstract, common, active, passive, etc.) are represented by the structures and behaviors of the agents using the selected tool. Sometimes, the selected tool may be based on a specific formalism that we must respect when defining the structures and behaviors of the agents. In this sub-step, we also must create the simulation scenario.

Generally, the structures and behaviors of the agents representing the system to be simulated, the agents representing the simulation environment, and the geosimulation scenarios, are stored in specific files or databases which are managed by the simulation tool.

(2) Execute the multiagent geosimulation models in the selected tool/platform/language : In this sub-step, we execute the geosimulation models that were created in the previous sub-step and stored in files or databases, using the input data which is gathered in the fourth step of the method.

In the remaining part of the chapter, we illustrate these two steps using the customers’ shopping behavior as case study.

In order to run the simulation models on a computer, we need to use a simulation tool. Due to variety of types of simulations, several simulation tools exist that can be used to execute the simulation models. Naturally, a question arises: How to select the appropriate simulation tool for a given application? Metrics to evaluate simulation tools are numerous. In the following points, we present the most important ones, which can help the designer, to choose the suitable simulation tool for his applications.

Ease of using simulation tool : One of the main criteria considered when selecting a simulation tool is its ease of use. For most developers, the use of simulations to obtain results will be the most interesting part of work. Therefore, the quicker a model can be implemented and experimented with, the better. The main factor influencing how easy it is to use a tool is how much, and what type, of programming experience is required. Some tools require the developer to have an extended knowledge of a particular language, while, other tools allow the user to do most implementation via a relatively user-friendly graphical interface, or by employing selected ‘English-like’ programming commands.

Flexibility : If we have a system/behavior that we would like to simulate, the question is: ‘Is the tool capable of implementing the system/behavior in which we are interested?’. Without looking at each individual case, there is no easy way to answer this question. However, it may be useful to look at models that have already been implemented using the tool to see whether or not there are common points with the models we want to simulate.

Background support : An important point to consider when choosing a simulation tool is the amount of background support (manuals, newsgroups, support groups, etc.) available, as well as the quality and the openness of the source code. If the developer has a problem with the implementation, it is very useful to draw upon outside help and examples.

Ability to support agent technology : Since we deal with agent-based simulation, it is important that the selected simulation tool supports the agent technology (agent- based tool).

Characteristics and capabilities of the agents : An important and critical point is related to the agent’s capabilities. If we want to simulate complex behaviors in geographic environments such as human behavior, it is important that the tool provides agents with advanced capabilities. Moreover, since we deal with geosimulation, the agents must have knowledge-based capabilities which enable them to apprehend space (perception of space features, reasoning capabilities, etc.).

Ability to support spatial and geographic data/knowledge : The final point to consider concerns geographic data. If we want to simulate systems or behaviors in spatial contexts or environments, we need a simulation tool that supports and able to integrate geographic data.

Several simulation tools exit, that may or not may be commercial, but they have proven their efficiency in the simulation of complex systems and behaviors. These simulation tools can be in the form of a language simulation program, a simulation development environment, or both. In the following points, we present some well-known multiagent simulation tools existing today.

The Swarm system : It was originally developed by the Santa Fe Institute (http://www.santafe.edu/), specifically for multiagent simulation of complex adaptative systems. The Swarm system provides a set of libraries that the developer uses to build models, as well as to analyze, display, and control experiments performed on these models. The libraries are written in Objective C (http://theory.uwinnipeg.ca/gnu/libobjects/objective-c_toc.html), and until recently, building a simulator meant programming in a combination of Objective C and Swarm. However, it is now possible to use Java (along with Swarm) to call upon the facilities offered by the libraries. In the Swarm system, the fundamental component that organizes the agents of a Swarm model is a ‘swarm’. A swarm is a collection of agents whose the behavior is controlled by a schedule of events. The swarm represents an entire model: it contains the agents as well as the representation of time. The Swarm system supports hierarchical modeling whereby an agent can be composed of swarms of other agents, in nested structures. In this case, the higher level agent’s behavior is defined by the emergent phenomena of the agents inside its swarm. This multi-level model approach, offered by the Swarm system, is very powerful. Multiple swarms can be used to model agents that themselves build models of their own world. In the Swarm system, agents may themselves own swarms, which are models that an agent builds for itself to understand its own world. The Swarm system is a powerful tool that can be used to develop agent-based simulation, but it is limited for geosimulation because it does not support and integrate geographic data in the simulation.

AgentSheets : It is an agent-based simulation tool, founded upon a spreadsheet approach. Instead of the spreadsheet grid’s cells being occupied by numbers, they are instead occupied by agents. The simulations then take place on the grid where the agents live. AgentSheets is very simple to use because it employs the visual programming paradigm, meaning that all development is completed via a graphical interface (dragging and dropping elements from toolboxes, etc.). Agents are created in a window called a ‘gallery’ and have an associated behavior, specified by sets of rules (methods) and events. The way that AgentSheets operates is intuitively easy to understand, which makes it remarquably quick to develop simple simulations. This tool has three particular limitations: the first, one agent cannot send information to another agent (this would be problematic if we wanted to model the communication of information between agents in a simulation); the second, one agent cannot change the attribute of another agent (this could be problematic if we wanted to model a situation where one agent influences a second agent); and the third which is critical for us, the tool can not support geographic data and the agents are not equipped with advanced spatial capabilities such as apprehending space for example.

MAML (Multi-Agent Modeling Language) : It was developed by the Complex Adaptative Systems Laboratory at the Central European University in Hungary. The language was initially developed to help social science students, with limited programming experience, to create agent-based models quickly. The ultimate goal of the project is to develop a user-friendly environment (complete with a graphical interface). MAML actually sits on top of the Swarm system, and is intended to make the latter easier to use by providing macro-keywords that define the structure of the simulator and access the Swarm libraries. MAML works at a higher level of abstraction than the Swarm system and with clearer constructs. However, in addition to learning MAML, the developer also needs to know Objective C language, as well as the Swarm system. This point currently limits MAML’s usefulness to unexperienced programmers. Another point that limits MAML’s use in geosimulation is that it does not support geographic data and the agents are not equipped with spatial cognitive capabilities which are important to develop geosimulation applications.

The MAGS (MultiAgent GeoSimulation) platform : This platform has been developed in our lab, in the Computer Science Department at Laval University (Moulin et al., 2003). It aims to develop simulation applications that simulate complex behavior in georeferenced environments. This platform is based upon recent progress in the fields of multiagent systems and geographic information systems, in order to provide more realistic simulations of spatial behaviors in geographic environments (Moulin et al., 2003). The agents in MAGS are equipped with advanced knowledge-based capabilities (perception of space, memorization, etc.) that are useful to simulate complex behaviors in geographic environments such as human behavior. Furthermore, the MAGS platform supports geographic data which can be easily integrated and used in it (see Section 7.4).

The CORMAS platform (COmmon pool Ressources and Multi-Agent Systems) (http://cormas.cirad.fr/): CORMAS is a multi-agent simulation platform specially designed for renewable resource management. It provides a framework to build models of the interactions between individuals and groups using natural resources. Using CORMAS, the design of the spatial features of the simulation is represented by a hierarchy of ‘spatial entities’. A spatial entity represents the smallest homogeneous portion of the geographic environment in the simulation model. For example, these spatial entities can be elementary (cells in a grid) or compound (sets of spatial entities). When these spatial entities yield resources, it falls within their competence of arbitrating, according to some pre-defined protocols, between potential concurrent demands formulated by the agents exploiting these resources. The way the agents are exploiting the resources may depend on their own representation of the environment, which they build from these same spatial entities (Bousquet et al., 1998). As one can see, CORMAS is dedicated to the creation of multi-agent systems, specifically for the domain of natural-resources management which is far from our working domain. It is relevant to notice that the CORMAS system can use geographic data stored in a GIS but it needs some conversions of geographic data into text files that can be used to create the spatial entities in the grid.

The GEAMAS platform ((GEneric Architecture for Multi-Agent Simulation systems)) (Marcenac et al., 1998): GEAMAS is a multi-agent software platform intended to develop simulation applications. Based upon a layered architecture, GEAMAS allows a better understanding of how the emergence of a global behavior occurs, and why the multi-agent approach works in this context. The version 2.0 of GEAMAS is structured in three modules: the Kernel , the Generation Environment and the Simulation Environment . The Kernel implements an object model for agents and provides generic classes (create the structures and the behaviors of agents). The Generation Environment allows the graphical design of simulation environment (create the simulation environment). The Simulation Environment enables the observation of the simulations evolution via Graphical User Interface tools (the interface of the simulation). The implementation uses the Java language (Marcenac et al., 1998). The GEAMAS can be ffectively used to simulate social behaviors but, it does not take into account the spatial aspects of the simulation which are important in the géosimulation and is not able to take advantage of geographic data stored in a GIS.

Our main objective is to simulate complex behaviors in geographic environments using agent technology. In order to simulate a complex behavior such as human behaviors in geographic environments, we need a tool whose agents are equipped with advanced spatial and ‘cognitive’ capabilities which enable them to apprehend space. The tool must be able to integrate and use geographic data in order to represent the spatial features of the simulation environment. Given our main objective and taking into account the most important selection criteria of simulation tools, we chose the MAGS platform to develop our shopping behavior simulation prototype. This choice was motivated by several factors, the most important of which are:

- The agents of the MAGS platform are equipped with advanced knowledge-based and spatial and non-spatial capabilities: such as perception, navigation, memorization, communication, etc.

- In the MAGS platform, it is easy to integrate in the simulation platform geographic data, coming from GIS or other data sources. Moreover, this data can be in 2D or in 3D modes.

- The MAGS platform is a user-friendly environment that can be easily used to develop complex geosimulations in georeferenced environments. As will be mentionned in Section 7.4, The MAGS platform has a user-friendly module which can be used to specify simulation scenarios and which is independent from the geosimulation engine.

We present the MAGS platform in more details in the following section.

MAGS is a generic platform that can be used to simulate, in real-time, thousands of knowledge-based agents navigating in a 2D or 3D virtual environment. MAGS agents have several knowledge-based capabilities such as perception, navigation, memorization, communication, and objective-based behavior, which allow them to display an autonomous behavior within a 2D-3D geographic virtual environment (Moulin et al., 2003). The agents in MAGS are able to perceive the elements contained in the environment, to navigate autonomously inside it, and to react to changes occurring in the environment. These agents have several knowledge-based capabilities (Moulin et al., 2003).

- The agent perception process : In MAGS, agents can perceive (1) terrain characteristics, such as elevation and slopes; (2) the elements contained in the landscape surrounding the agent, including buildings and static objects; (3) other mobile agents navigating in the agent's range of perception; (4) dynamic areas or volumes whose shape changes during the simulation (ex.: smoky areas or zones having pleasant odors) (Bouden, 2004); (5) spatial events, such as explosions, etc., occurring in the agent's vicinity; (6) messages communicated by other agents (Moulin et al., 2003).

- The agent navigation process : In MAGS, agents can use two navigation modes: Following-a-path-mode , in which agents follow specific paths that are stored in a bitmap called ARIANE_MAP, or Obstacle-avoidance-mode , in which the agents move through open spaces avoiding obstacles. In MAGS, the obstacles to be avoided are recoded in a specific bitmap called OBSTACLE_MAP.

- The memorization process : In MAGS, agents have three kinds of memory: Perception memory in which the agent stores what it perceives during the last few simulation steps; Working memory , in which the agent memorizes what it perceives during a bit of time , and Long-term memory in which the agent stores what it perceives during one or several simulations (Perron et al., 2004).

- The agent's characteristics : In MAGS, an agent is characterized by a number of variables whose values describe the agent's state at any given time. We distinguish static states from dynamic states . A static state does not change during the simulation, and is represented by a variable and its current value (ex.: gender, age group, occupation, marital status). A dynamic state is one that can possibly change during the simulation (ex.: hunger, tiredness, stress). A dynamic state is represented by a variable, associated with a function which computes how its values change during the simulation. The variable is characterized by an initial value, a maximum value, an increase rate, a decrease rate, an upper threshold, and a lower threshold, which are all used by the function. Using these parameters, the system can simulate the evolution of the agents' dynamic states, as well as trigger the relevant behaviors (Moulin et al., 2003).

- The objective-based behavior : In MAGS, an agent is associated with a set of objectives which it tries to reach. The objectives are organized in hierarchies that are composed of nodes which represent composite objectives, and leaves which represent elementary objectives associated with actions that can be performed by the agent. Each agent owns a set of objectives corresponding to its needs. An objective is associated with rules, containing constraints on the activation and completion of the objective (Moulin et al., 2003).

- The agent communication process : MAGS agents can communicate with each other by exchanging messages using mailbox-based communication.

The spatial characteristics of the environment and static objects are generated from data stored in Geographic Information Systems and other related databases. These characteristics are recorded in a raster mode which enables agents to access the information contained in various bitmaps, that encode different types of information about the virtual environment, in addition to the objects contained within it. In MAGS, the simulation environment is not static and may change during a simulation. For example, we can add new obstacles, or gaseous phenomena, such as smoke, dense gases, and odors, which are represented using particle systems, etc. (Moulin et al., 2003).

The MAGS platform offers to its users a user-friendly module that can be used to specify geosimulation scenarios. In the scenario specification, the user specifies the characteristics of the simulation agents, their behaviors, the features of the simulation environment, and some events that may occur during the simulation (Bellafkir, 2003).

This section presents how we use the MAGS platform in order to specify (create) and develop (execute) the shopping behavior simulation models and scenarios.

The MAGS platform has two main modules that are used to specify and execute all simulation models. The first one is used to specify the simulation (the agents’ structures and behaviors, as well as the simulation scenario), while the second one is the simulation engine which executes the simulation. These modules are presented in Fig 7.3.

To use the MAGS platform’ modules in order to develop a geosimulation prototype, we need to follow the following steps:

- Specify the structures of the agents belonging to the simulation: This specification is based upon the structures of the agents’ models which were designed in the third step of our method. The agents specified at this step can be active (actors) or passive (agents belonging to the simulation environment).

- Integrate the geographic data in the simulation: At this point, we integrate the geographic characteristics of the simulation environment into the simulation. These characteristics can be in 2D or 3D modes.

- Specify the behavior of the active agents that represent the actors of the simulation: This specification is based upon the behaviors of the agents’ models which were designed in the third step of our method.

- Specify the simulation scenarios: At this step we specify the events that can occur during the simulation execution. As example of events we can cite: an explosion that occurs in the simulation in a specific place and time.

- Execute the specification mentioned above in the simulation engine of the MAGS platform.

The details of use of these two modules for the specification and execution of shopping behavior simulation models are presented in the following sub-sections.

Before executing the simulation models in MAGS, they must be specified. In this specification, we need to respect a specific formalism of the MAGS platform. This specification is made using a specific module of the MAGS platform which is called the ‘ scenarios management module ’. This module is also used to enter the input data into the simulation models. This data, which is related to the agents and the simulation environment, is stored in specific simulation binary files that are then executed by the MAGS engine. This module is presented as a user-friendly interface (see Fig 7.4).

The Scenarios Management Module allows users to enter into the simulation two categories of data:

- non spatial/geographic data: This data feeds the non-spatial structures and behaviors of the simulation agents.

- spatial/geographic data: This data is related to the simulation environment (bitmap layers for the 2D and 3D models). This geographic data is used by the agents when they accomplish their spatial behaviors in the simulation.

Before demonstrating how we use the interface to specify and feed the simulation models, it is relevant to present some information about the formalism used with the MAGS platform. It is important to understand this formalism in order to comprehend the simulation specification.

The environment in MAGS: The spatial/geographic data of the environment

Using specific MAGS utilitary modules, the spatial characteristics of the simulation environment are generated from data stored in a geographic information system (GIS) and other databases. These characteristics are recorded in a raster mode which enables agents to access the information contained in various bitmaps, which encode different types of information about the virtual environment, in addition to the objects contained within. The main bitmaps used by the agents are:

- AgentsMap: It contains information about the locations of agents belonging to the environment;

- ObstacleMap: It contains the locations of obstacles in the environment;

- AriadneMap: It contains the paths that can be followed by mobile agents;

- HeightMap: It represents the elevations of the environment;

- TextureMap: It is used to visualize the simulation in 2D mode;

The information contained in the various bitmaps is used by the agent’s fundamental mechanisms: perception, navigation, decision making, etc.

The 3D spatial characteristics of the environment are recorded in a 3D file with .X extension (Microsoft direct X format), which is used by MAGS’s visualization module in order to display the simulation in a 3D mode. The 3D model is also generated from data stored in the GIS.

The agents’ structures in MAGS

The characteristics of the agents are specified by two states : static states and dynamic states (Fig 7.5). We recall that a static state does not change during the simulation and is represented by a variable and its current value, while a dynamic state is a state which can possibly change during the simulation (e.g., the agent’s tiredness, hunger, etc.). A dynamic state is represented by a variable associated with a function which is used to compute how this variable changes values during the simulation.

Based upon this formalism, all the elements belonging to the agents’ structures designed in Chapter 5 are specified using static or dynamic states. The laters are related to some needs which can change during the simulation. In order to characterize the needs we can use the hierarchy of needs proposed by (Maslow, 1954).

The agents’ behaviors in MAGS

In MAGS, an agent can have one or more profiles . A Profile is a role (or several roles) that can be played by the agent during the simulation. According to each profile, the agent can accomplish a specific behavior. An agent’s profile is associated with a set of objectives that it tries to reach. An objective is a goal that the agent intends to attend during the simulation. The objectives are organized in hierarchies, that are trees composed of nodes representing composite objectives, as well as leaves representing elementary objectives, which are associated with actions that the agent can perform (see Fig 7.6).

An objective is associated with two groups of rules:

- activation rules which contain constraints about the activation of the objective.

- completion rules which contain constraints about the completion of the objective.

The constraints are dependent on time, on the agent’s states and the environment’s states. These constraints are specified, using so- called ‘ Preconditions ’, and each precondition is composed of one or several ‘ FormulaElements ’ (see Fig 7.7). A FormulaElement represents a numeric, or logical, operation that relates two operands, representing two states values of an agent.

An objective can be recurrent or not. If the objective is recurrent, it is activated and executed continually during the simulation, otherwise, it is executed once. In MAGS, the objective has a life-cycle . This life-cycle can have the following values: activated (if the objective is activated), inactivated (if it is not activated), current (if it is in execution), interrupted (if it is interrupted and another objective is being executed), finished with success (if its execution is finished with success), and finished without success (if it is finished without success).

The selection of the current agent’s behavior depends upon the priorities of the objectives (Moulin et al., 2003). The priority of an objective varies depending on the priority of the need related to this objective. Each agent’s need is associated with a priority, which varies according to the agent’s profile. An objective priority is primarily a function of the corresponding need’s priority. It is also subject to modifications brought about by the opportunities that the agent perceives, or by temporal constraints (see Fig 7.6).

Using the MAGS’s scenario management module, the user can specify the behavior of the active agents of the simulation. In this sub-section, we introduce how we use this module to specify the behavior of the most important active agent in the shopping behavior simulation, which is the shopper agent. Before specifying the shopping behavior of the shopper agent in MAGS, we present some shopping behavior patterns that we created in order to specify the shopping agents’ behaviors.

Supported by our collected data concerning shoppers in Square One mall, we notice that these shoppers come to the mall with various purposes and intentions. Some shoppers intend to buy products or services, others wish to explore the mall, while still others go specifically to meet friends, etc. These activities can be categorized by definite shopping behavior patterns discussed in the literature. Shoppers can be categorized particularly by the activities’ taxonomy described by (Ruiz et al., 2004):

Recreational mall shoppers : They go to the mall for the exercise, to talk to other shoppers, to see other clients, to have a snack, etc. The shoppers having this behavior pattern are especially motivated by social interaction and leisure;

Full-experience mall shoppers : They go to the mall to talk with other customers, browse, buy snacks, and to purchase things or services (planned and unplanned). They are the ‘best’ customers for the mall, they seem to enjoy life at the mall;

Traditional mall shoppers : They are concentrated on purchasing activities: they browse and make purchases; however, they do not make unplanned purchases; and

Mission mall shoppers : They go to the mall to buy something specific. They only purchase selected items that they already planned to buy.

The taxonomy of behavior patterns presented above is relevant, but not useful to us because the descriptions are not precise enough to develop a computer simulation. If we want to simulate shopping behaviors in a mall, we need more detailed and precise shopping behavior patterns. (Bloch et al., 1994) presented an interesting and detailed taxonomy of shopping behavior patterns based upon shoppers’ activities in the mall. This taxonomy is presented in Table 7.1.

Supported by our literature review, we can affirm that the taxonomy presented by (Bloch et al., 1994) is not complete. (Bloch et al., 1994) did not present certain shopping behavior activities in a mall (go to a restaurant to eat, go to an exit door to leave the mall, etc.). Furthermore, (Bloch et al., 1994) presented the shopping behavior based upon the activities that a shopper can do in a mall. In our work, we look at the shopping behavior as the activities that the mall can offer to its shoppers. These activities essentially depend upon the spatial characteristics of the mall (the areas contained in a mall), because each spatial entity in the mall offers different kinds of activities to the shoppers. Hence, we extended the taxonomy presented by (Bloch et al., 1994) as follows:

- Based upon the activities presented in the (Bloch et al., 1994)’s taxonomy of shoppers, we noticed that shoppers always have one or several destinations (in the mall) in order to accomplish their activities. Also, we noticed some general activities such as browsing. In our taxonomy, these types of activities are detailed in different specific activities related to some places in the mall.

- Shoppers inside the mall may feel hungry or thirsty. Therefore, they may go to a restaurant. They also may feel the need to use the restrooms, which they will visit. They may also visit a store because they heard music playing or because they smelled a pleasant odor coming from a store. Furthermore, if they need to exit the mall, they will go to an exit door in order to leave. Therefore, as one see, a shopper always has a place to go, based upon the internal and external factors that influence it.

The taxonomy of shopping activities that we use to specify mall’s shopping behavior of the shopper agents is presented in Table 7.2.

The destination choice related to the shopping activity depends upon many factors. It can depend upon the agent’s preferences, the distance between the agent and the destination, the environment’s elements perceived by the agent, etc. The activities’ patterns are identified in the MAGS platform in terms of a hierarchy of objectives whose root is the global objective ‘ Do shopping ’ for the shopper agent (see Fig 7.19).

It is essential to note that all the activity patterns of the proposed taxonomy do not have the same priority. For example, visiting a store, browsing, or going to a restaurant do not have the same priority as going to the restroom or leaving the mall. The differences in priorities fit well with the structure of objectives that takes into account the concept of priority. It is also important to mention that the priority can change from one shopper agent to another.

At every moment of a shopping trip, the shopper agent makes decisions regarding its next destination. Based upon internal variables (objectives, preferences, etc.), external variables (the environment), and priorities of objectives, the agent must choose its destination.

In the following paragraph, we present details of the MAGS’ specification of the objective that initialise the shopping behavior: The Goal Start_Shopping . The other objectives representing the main patterns of shopping behavior are presented in the Annex C of this thesis.

The objective Goal Start_Shopping aims to initiate the shopping behavior. It is composed of two sub-goals: in the first goal the agent chooses the next destination in the mall, and in the second it moves to this destination. The specifications of this objective are presented in Fig 7.20.

The sub-goals composing the Goal Start_Shopping are specified in MAGS as the following:

- Sub-Goal Goal Choose_Next_Destination : With this sub-goal, the shopper agent makes decisions about its next destination. This destination may be a store, an exit door, restroom, etc.

■ Recurrence: This sub-goal is not recurrent.

■ Activation rule Empty : This sub-goal does not have any activation rule. Hence, it is executed only at the beginning of the simulation.

■ Body Action Choose_Next_Destination : Within this sub-goal, a shopper agents chooses its mall’s next destination. The choice depends upon several factors: its shopping list items, its preferences, the perceived elements in the environment, the elements in its memory, the distances between it and destinations, etc.

■ Completion rule Action_Update_Goal_Choose_Next_Destination_Success : This rule contains only an action, which updates the sub-goal’s life-cycle as finished with success.

the next sub-goal is:

- Sub-Goal Goal Go_To_Next_Destination : This sub-goal allows the shopper agent to move to the chosen destination in the previous sub-goal.

■ Recurrence: This sub-goal is not recurrent.

■ Activation rule Precondition Goal_Choose_Next_Destination_Is_Success : If the previous sub-goal successfully completed, this goal can be activated. This rule links this sub-goal with the previous one.

■ Body Action Go to next destination : Using this action, the shopper agent moves to the next chosen destination.

■ Completion rule Action Update goal go to next destination success : This rule contains an action that updates the sub-goal’s life-cycle as finished with success.

All the specifications mentioned in the previous sections are stored in the simulation binary files related to the shopping behavior prototype. These files are then opened by the second module of MAGS: the simulation engine. In Fig 7.21, we display a 2D screenshot of a simulation that involved some of the 390 software shopper agents, all navigating in the virtual shopping mall. Figs 7.22 and 7.23 show 3D screenshots of this simulation.

In the simulation prototype, which we called Mall_MAGS, each shopper agent comes to the mall in order to visit a list of specific stores or kiosks that are chosen before the simulation, on the basis of the agent’s characteristics. It enters through a particular door and begins its shopping trip. Based upon its location in the mall, its knowledge (memorization process), and what it perceived in the mall (perception process), it decides which store or kiosk to visit next (decision making process). When it chooses a store or kiosk, it moves in its direction (navigation process). Sometimes, when it is moving toward the chosen store or kiosk, it may perceive another store or kiosk (perception process) that belongs to its shopping list, and that it did not know before. In this case, the shopper agent goes to this place, and memorizes it (memorization process) for its next shopping trips. The shopper agent accomplishes this behavior continually, until it visits all the stores or kiosks, or until it has no time left for the shopping trip. If the agent still has time to shop, and some stores or kiosks that are on its list are located in the mall, but it does not know where they are, the agent starts to explore the shopping mall in search of these stores or kiosks. When the shopper agent reaches the maximum time allowed for its shopping trip, it leaves the mall.

A shopper agent can also come to the mall, without a specific list of stores or kiosks to visit. It goes to the mall to explore it, to see people, or to do exercise, etc. In the exploration mode, the shopper agent follows its preferred paths. In this mode the moving actions of the agent, to the stores, kiosks, music zones, odor zones, lighting zones, are all directed by its habits and preferences. For example, if the shopper agent likes cars, and it passes in front of a car exhibition, it can attend it. To extend our simulation prototype we can simulate the shopper’s reactions to the mall’s atmosphere. We can insert special agents that emit music, lighting, or odor. If the agent is in the exploration mode and likes the music, or the lighting, or the odor broadcasted by these special agents, the shopper agent can move toward them and possibly enter a store.

During its shopping trip, a shopper agent may feel the need to eat or to use the restroom (simulated by a dynamic variable reaching a given threshold). Since these needs have a higher priority than that simply to shop or play, the agent temporarily suspends its shopping trip and goes to the locations where it can eat something or use the restrooms. In our geosimulation prototype, the priorities of the shopping behavior activities are defined, based upon Maslow’s hierarchy of needs (Maslow, 1970).

Using the MAGS functionalities the user can manipulate the simulation with flexibility. For example, he/she can control the time of the simulation, he/she can access all the information about the agents in the simulation (states values, behaviors, memory, etc.), and he/she can control the visualization of the simulation in 2D and 3D, as well as navigate in the 3D environment during the simulation.

This chapter presented and illustrated the two steps belonging to our proposed method. The first one aims to select the simulation platform, which is used to develop the simulation models, while the second one presents the creation of the agents in the selected platform, as well as the execution of these models using the selected platform. For the shopping behavior case study, we chose the MAGS (MultiAgent GeoSimulation) platform in order to create the shopping behavior simulation prototype. What motivated us to choose this platform is the fact that it allows us to use advanced spatial and knowledge-based capabilities of its agents to develop simulations in georeferenced environments. What’s more, the MAGS platform can integrate and use easily geographic data, which is an extremely an important aspect for a geosimulation. The second part of this chapter presented in detail how we used the MAGS platform in order to develop the shopping behavior simulator which is called Mall_MAGS.

When executing the Mall_MAGS prototype, we can see hundreds of shopper agents navigating in a georeferenced environment representing a mall and performing shopping behavior. In the simulation, the shopper agents are equipped with advanced spatial knowledge-based capabilities which increase the realism of the behavior simulation. The simulation is presented in 2D and 3D modes. It is known, that simulating in 3D mode increases the realism of the visualization of the simulation. In the literature, we did not find any geosimulation prototypes exhibiting, simultaneously, these characteristics. Hence, our prototype can be considered as a contribution to the field of computer simulation, and especially, to the field of multiagent geosimulation.

The next chapter presents how we can generate and analyze output data from the simulation for the end-users in order to help them assess the simulation.



[5] The term ‘tool’ can be used instead of the terms ‘platforms’, ‘language’, ‘program’, or ‘software’.

© Walid Ali, 2006