10
Multi Agent System: three behavioural frameworks integrated into a GIS Silvana Lombardo, Massimiliano Petri University of Pisa, Department of Civil Engineering Pisa, Italy {s.lombardo, m.petri} @ing.unipi.it SUMMARY In Multi Agent Systems applied to the social science simulations the construction of evolution rules applied to agents (individual agents and aggregated agents) follows three main approaches. A first approach is based on urban theories and rules derived from analytical models; a second one is based on “expert knowledge” and rules derive from the know-how of the modeler or from common sense; the last one is the more complex: rules derive directly from data. In this work we discuss adopted rules in some examples of Multi Agent Systems and describe three applications we developed. The first one uses the first mentioned approach, through a dynamic spatial interaction model integrated in a GIS software; the second one uses rules from “expert knowledge” and propose an integration between Geodatabase Data Model and MAS; the last one proposes a way to construct simple and readable rules starting from data and using Decision Tree Induction. KEYWORDS: Multi Agent System, behavioural rules, GIS, interaction model, Geodatabase, Decision Tree Induction INTRODUCTION The main objective of the tools belonging to the field of spatial modelling and simulation is to build new and more complex knowledge by working on the relations acting in space and time between spatial phenomena. A question therefore arises: what knowledge for building knowledge? How do we select and represent the relations which connect elements in space? This question become more and more relevant as the availability of computer simulation tools is rapidly increasing. Here, in particular, we refer to Multi Agent Systems as promising and flexible tool for simulating the evolution of spatial phenomena and for building scenarios of possible futures. The aim of our ongoing research is to experiment and compare different approaches to the definition of the relations driving the dynamics of spatial Multi Agent Systems. In Multi Agent Systems, related to the field of the social science simulations, the construction of evolution rules applied to agents (individual agents and aggregated agents) follows three main approaches: 1. the first one is based on urban theories: rules derive from analytical models (e.g. the Harrys and Wilson’s model or economical models such as Discrete Choice Models (Heppenstall, Evans e Birkin, 2003); 2. the second one is based on “expert knowledge”: rules derive from the know-how of modeler or from common sense. In this case one can use predefined rules that follow the BDI framework (Beliefs, Desires and Intentions) (Nonas, Poulovassilis, 1998) or the “Activity Based Approach” (Zwerts, 2004) or rules used in “Active-Databases”, designed mainly to build reactive agents; 3. the last one is the more complex: rules derive directly from data. In this approach we can use techniques of Knowledge Discovery in Databases, belonging to the field of Artificial Intelligence. This contribution is organised as follows. In the first part of this work we discuss the three approaches used to construct rules in some Multi Agent Systems and in the second part we describe

Multi Agent System: three behavioural frameworks integrated into … · Multi Agent System: three behavioural frameworks integrated into a GIS Silvana Lombardo, Massimiliano Petri

  • Upload
    lamkhue

  • View
    219

  • Download
    0

Embed Size (px)

Citation preview

Multi Agent System: three behavioural frameworksintegrated into a GIS

Silvana Lombardo, Massimiliano PetriUniversity of Pisa, Department of Civil Engineering

Pisa, Italy{s.lombardo, m.petri} @ing.unipi.it

SUMMARY In Multi Agent Systems applied to the social science simulations the construction of evolution rulesapplied to agents (individual agents and aggregated agents) follows three main approaches.A first approach is based on urban theories and rules derived from analytical models; a second one isbased on “expert knowledge” and rules derive from the know-how of the modeler or from commonsense; the last one is the more complex: rules derive directly from data. In this work we discussadopted rules in some examples of Multi Agent Systems and describe three applications wedeveloped. The first one uses the first mentioned approach, through a dynamic spatial interactionmodel integrated in a GIS software; the second one uses rules from “expert knowledge” and proposean integration between Geodatabase Data Model and MAS; the last one proposes a way to constructsimple and readable rules starting from data and using Decision Tree Induction.

KEYWORDS: Multi Agent System, behavioural rules, GIS, interaction model, Geodatabase,Decision Tree Induction

INTRODUCTION The main objective of the tools belonging to the field of spatial modelling and simulation is to buildnew and more complex knowledge by working on the relations acting in space and time betweenspatial phenomena. A question therefore arises: what knowledge for building knowledge? How do weselect and represent the relations which connect elements in space? This question become more andmore relevant as the availability of computer simulation tools is rapidly increasing. Here, inparticular, we refer to Multi Agent Systems as promising and flexible tool for simulating theevolution of spatial phenomena and for building scenarios of possible futures. The aim of our ongoing research is to experiment and compare different approaches to the definitionof the relations driving the dynamics of spatial Multi Agent Systems. In Multi Agent Systems, related to the field of the social science simulations, the construction ofevolution rules applied to agents (individual agents and aggregated agents) follows three mainapproaches:

1. the first one is based on urban theories: rules derive from analytical models (e.g. the Harrysand Wilson’s model or economical models such as Discrete Choice Models (Heppenstall,Evans e Birkin, 2003);

2. the second one is based on “expert knowledge”: rules derive from the know-how of modeleror from common sense. In this case one can use predefined rules that follow the BDIframework (Beliefs, Desires and Intentions) (Nonas, Poulovassilis, 1998) or the “ActivityBased Approach” (Zwerts, 2004) or rules used in “Active-Databases”, designed mainly tobuild reactive agents;

3. the last one is the more complex: rules derive directly from data. In this approach we canuse techniques of Knowledge Discovery in Databases, belonging to the field of ArtificialIntelligence.

This contribution is organised as follows. In the first part of this work we discuss the threeapproaches used to construct rules in some Multi Agent Systems and in the second part we describe

three corresponding applications developed by the L.I.S.T.A. (Laboratory of Territory andEnvironmental Systems Engineering) group and related to each type of the mentioned rules.

THE APPROACH “FROM THEORIES” In the first approach we can find some hybrid models that use the interaction between the meso-macro scale dynamics and the micro scale one (e.g. Heppenstall, Evans e Birkin, 2003; White,Engelen, 2000). In these contributions there is the attempt to simulate the regional changes withmacro models, often spatial dynamic models: this implies the belief that these type of environmentalchanges cannot be appreciated only with micro simulation model. Some models are based on statistics, economic theories (e.g. Waddell, Borning, Noth and others,2003); they all simulate the dynamics of real systems using rules based on various types of equations(linear, logistic regression models) or on the classic theory of travel demand (Binary, Multinomial orMultidimensional Choice Models like for example the Nested Logit Model), see Ben-Akiva, Lerman,1985.

THE APPROACH “FROM COMMON SENSE KNOWLEDGE” The second approach is characterized by models related to simulations of pedestrian movementinside the city (e.g. Schelhorn, 1999; Hanisch, Schulze, Tolujew, Richter 2003), by models related tothe growth and development of the city (e.g. Semboloni, Assfalg, Armeni, Gianassi, Marsoni, 2003;Otter, Veen, Vriend, 2001) or by models related to simulations of particular situations as the evolutionof a rural society (e.g. Rouchier, 2003). In recent years the simulations based on “Acitivity-BasedApproach” (e.g. Zwerts, 2004) are increasing: and imply daily-diaries with individual activities aboutthe urban microdynamic. Another example of model belonging to this approach is that one based onthe BDI framework (Beliefs, Desires, Intentions) (e.g. Nonas, Poulovassilis, 1998), which can beconsidered for some aspects similar to the “Active-Databases”, where relationships between theclasses of the Database in a real Database Management System (DBMS) are built.

THE APPROACH “FROM EXTRACTED KNOWLEDGE” The third approach is the only bottom-up one. Rules derive directly from data and they don’tderive from a-priori knowledge. Starting point of this approach is the analysis of internal dynamicsof an agent (its individual mental map); therefore it needs an interdisciplinary analysis related tosociology, marketing, psicology and other disciplines. This approach, by applying learningalgorithms, allows to find the rules driving the system evolution (e.g. Arentze, Timmermans, 2000;Lombardo Rabino 1998; Berling-Wolff, WU, 2004). The work of Timmermans is one of the few fully operational MAS. The input data is a datasetrelated to a survey of a sample of about 2200 household activity daily diary subdivided into week-end days and work-days. This database is used to derive a decision tree (with a Datamining tool) foreach decision step in the process model (for example some choice facets are: transport mode forwork, activity selection, activity duration, activity location and others). So each decision treeprovides valuable information for interpreting and simulating individual choice behaviour. Thesechoice heuristics aren’t imposed a priori, but they are explicitly derived from activity and traveldiary data. This work then integrates the second and the third approach.

EXPERIMENTS AND APPLICATIONS

Service dynamics simulation by Spatial Interaction approach Multi Agent System was implemented inside a Geographic Information System where behaviouralrules of agents (service users and service entrepreneurs represented as aggregated entities) aremathematical equations provided by Wilson dynamic and entropic spatial interaction model (e.g.Wilson, 1981, 2000). The behaviour of each type of agents is formalized in an equation with someparameters that represent a particular characteristic of the agent itself. The application concerns

three provinces of Tuscany: Lucca, Pisa and Livorno and analyzes the macro level dynamics due tomacro scale changes; The input data of the GIS are provided by DBMS and directly by the user; through a user friendlyinterface the users can introduce exogenous intervening changes in the properties of agents and ofenvironment (it’s possible, for example to introduce a new residential zone at the cycle x and a newipermarket at the cycle x+y); the data are then processed by the GIS. At the end of each cycle of thedynamic simulation, the new distribution of services and the structure of the transport flows arerecorded in the DBMS. When the simulation stops, that is to say when the system reaches theequilibrium or the given maximum number of iterations, the final outputs, processed by GIS, arevisualized using thematic maps (fig.1).

Figure 1: System Structure

The MAS structure is characterised by three fundamental components: the environment in whichthe agents operate, the agents themselves (including their aims and their predefined choiceprocesses), and the interaction mechanism which defines the evolution of the system. Theenvironment is characterised by two components: the spatial framework, represented by the 94municipalities and the transport infrastructure; its quality and efficiency is measured by the traveltime from cell x to cell y of the spatial grid (fig.2). The system dynamics is given by the following non linear differential equation (Lombardo, 1987):

⋅−⋅⋅⋅⋅= ∑ −

ijjj

djii

j SBfceSARdt

dSij )( βαε

1( )ijdi j

j

A S e βα − −= ⋅∑

whereSj is the number of employees in the services; the considered typology includes services with a usersbasin which exceed the local size (municipalities), for example high schools, ipermarkets, sanitaryservices, etc..;Ri is the number of users living in zone i;dij is the time distance between cell i and j (calculated with the Floyd algorithm);a is a measure of users scale-economies ;ß is a measure of users predisposition to travel ;Bj is the total cost of management and installation of services;Ai is a normalization factor;fcj is a scale factor.

Interface

DBMS Input

UserInput

MAS

S

Elaborated Input

EnvironmentAgentsRulesOutput/cicle

Results View

Final Output

Spatial DynamicInteraction Model

GIS

Figure 2: Territorial System and Service Local Units

The agents, as mentioned, are service users and service entrepreneurs represented as aggregatedentities for each municipalities and for each category. Service users obey to the following rules: theytry to reach the services with the least costs and disadvantages; in order to choose, they assess thequantity of services in each zone of the system (measured as total surface of each type of services),the travel time to go to the services, the service agglomeration level and the “confort” of travellingto reach the services located in the different zones. Service entrepreneurs try to locate theirenterprises to maximize their profit; so they assess the choice behaviours of the service users, theinstallation and management costs in each zone. The dynamics of our MAS include three differentspeeds of change: high speed for the changes of the agent-retail users preferences as a reaction toenvironment changes, medium speed for the changes of the entrepreneurs choices, much slowerspeed for the environmental changes (i.e. a new residential area). The dynamics is “tuned” on medium speed. Some results of the simulations are represented infigure 3.

Figure 3: Local units number evolution for 3 time steps

Vehicles moving in the city by Active Database approach This work is an attempt to build a Multi Agent System with a framework called “Active-Database”inside a GIS. It is possible to build the framework of a MAS from a conceptual model of the wholesystem using CASE tools (Computer Aided Software Environment) and UML language (UnifiedModeling Language). In this case we design the agents and the relationship among them by defining“a priori IF-THEN rules”. The innovative elements in this work are :• the exploitation of powerful and widespread tools such as Geodatabase and Road Network in

order to define simple and user friendly communication protocol among agents;• the attempt to develop a MAS without a discrete temporal representation with the same

updating time for each agent, We follow instead an event driven approach where each object updates himself at different times,owing to the messages that it receives. We start from the ArcGIS Transportation Data Model(UNETRANS) (Curtin, Noronha, Goodchild, Grisé, 2003). This model focuses on transportation infrastructure management. We use it to model the urbanspace of two Tuscan cities: Pisa and Livorno. In this application we construct three main datamodels: the Network Model, the Process Model and the Object Model. For the Network Model werepresent a set of points and a set of lines that connects those points (the connectivity of a network isoften referred to as its topology). So the topological properties and the branch of mathematics calledGraph Theory is used. The Process Model is implemented using the most widely knowntransportation process modell, called Urban Transportation Planning System (UTPS) also known asthe 4-Step travel demand model: trip generation, trip distribution, modal split and traffic assignment. The Object Model seeks to identify or enumerate as many transportation objects as possible andlogically organizes them in such a way that they can be most profitably used. So we have differentframework to store street networks and objects related with it. For example we have the ReferenceNetwork Layer that contains all the road rail data, the Route Feature Layer that contains morecomplex features built from the links in the Reference Network Layer. Route Feature are Bus

T=0 T=10 T=20

Routes, the directional Carriage Ways of a major highway or other features. Finally we have theEvent Layer that contains a wide range of objects related to the previous layers. Events could bemany types of assets such as traffic signs, constructions sites, bus stops, traffic accidents locationsor even mobile objects like a car, bus, truck or train that is moving across the Reference Network. Events do not have a spatial representation but are related to the underlying features. Another typeof objects are the Mobile Objects (fig. 4) that contains those ones included in transportation-relatedactivities that can be transported across the Reference Network. MobileObjects have no explicitspatial representation although physical characteristics, such as length and height, may be commonamong the MobileObjects attributes. The main rules of the system are assigned to these objects. For example if an agent as a traffic light(of the Event Layer) send a message when its color becomes red, this information reaches all therelated Mobile Objects and only the neighbouring ones apply the rules related to stop.

Vehicle

MobileObjectIDOwnerMaxSpeedHeightW idthLengthWeightLoadedWeightLoadTypeStartLocationEndLocationCapacityFleetID

Fleet

FleetIDFleetOwnerFleetName

Object

Railcar

Bicycle

Automobile

Bus

Truck

Pedestrian

Container

Emergency

Train

Convoy

Platoon

MOGroup

MinVehiclesMaxVehiclesMaxSpeedRegulationSet

MobileObject

SubType

Figure 4: UML diagram of the Mobile Objects package

For example if in a street the flows exceed the capacity, the information of traffic congestion issent to all the related mobile objects that evaluate the new crossing cost of this street and apply theconsequent decision rules. The main problem we found in this application is related to the integrity of the Geodatabase duringthe dynamics. This is due to the type of messages sent between the objects: if a message causes theupdate of some attributes belonging to the “receiving objects” in the meantime this chenge cancause a new message to another object which has not already been updated from first message.

In this case the system behaviour is wrong and the database loses its integrity and its correctness. This is the cause of the use of discrete steps in the simulations in many Multi Agents Systemsalthough with this solution obtains less realistic simulations. For these reasons, we limit ourselves to the model description and to the occurring bias , while weare developing some solutions to resolve the problems above.

Land use change evaluation by DataMining approach This application uses techniques like Decision Tree Induction to build “a posteriori IF-THEN”rules: “IF x1, x2, ..xn THEN y” starting from data; the obtained rules can be inserted in a CellularAutomata, in a MAS or can be assigned to single agents. For each step, the algorithm we use (A-Prior algorithm) calculates new target output starting from IF-conditions (x1, x2, ecc..) that changeduring the dynamics (e.g. Timmermans, 2000). We extracted rules starting from multitemporal land use maps at wo different time slices: 1978 and1992. Available vector data, related to the an area of Tuscany that comprises the districts of Pisa,San Giuliano Terme, Vecchiano and Cascina, were organized in a grid of 200 meters square cellsusing GIS tools and Map Algebra functions. Starting from the grid we calculated a table successively loaded the Datamining software WEKA(Kirkby, 2002, Witten and Frank, 2000) in order to build the rules which drive land use change from1978 to 1992. Among the various tools belonging to the field of KDS (Knowledge Discovery Systems), we used,in particular, classification methods based on decision trees induction, because they are able toprovide a highly efficient hierarchical framework and to produce IF/THEN type rules, in which the“IF” part describes the observed state, and the “THEN” part identifies the transition to another statebetween various temporal sections. Some problems emerged during this first application, mainly related to the different scale of the twoinput land use maps. The development and the construction of a tool able to achieve the previous aim included differentphases:

a) Aggregation of the original land cover classes (presenting an elevated disaggregation level) inorder to obtain a smaller set of more representative categories;

b) Construction of maps referred to different time slices: conversion of the primary data in a formatadequate to make possible the subdivision of the territory in homogenous elementary units(squared cells): this representation allows to perform conceptually correct and very quick spatialelaborations.

c) Construction of automated procedures within G.I.S. in order to perform various kinds ofcartographic analysis such as map overlays, neighbouring analysis and so on. We consideredvarious degrees of “ neighbouring ” , namely adjacency ( set of cells that share at least an edgewith the selected element) and neighbouring (set of all the elements that lie to a given distancefrom the selected 'core' element). Moreover, we have identified some kinds of infrastructures(roads, railroads, stations, etc.) that intersect each elementary territorial unit.

d) The results of these elaborations are put in the form of simple tables, in which, for each spatialentity there is a description (defined by means of alphanumeric attributes) of the state of the celland a description of the states of the neighbouring entities, previously characterized. These tablescontain all the attributes necessary to describe the spatial structure of the analised territory, inparticulary the identification number of the cell that generates the neighbouring, the land usecode, the consistency of the neighbouring cells and so on;

e) The report table created in the previous phase was used as input for the automatic learning tool,an algorithm able to extract land transformation rules . We classify the data by means of decisiontrees induction, based on a recursive partitioning of data set. The classification results can bevisualised by using a tree structure like a flow chart in which we can find a root, edges, nodesand leaves. The tree that partitions the data into groups that are maximally homogeneous interms of the response variable (target attribute = land use) is considered the best hypothesis. The

root represents the attribute on which the partition has been performed, the nodes are labelledwith names of the remaining attributes, the edges with the possible values that attributes canassume and the leaves are labelled with the different classes. Such a framework is easy to beinterpreted, as in it each path going from the root to one leaf, through the edges corresponding tothe attribute values, represents a classification rule (in figure 5 you can see an example of rulesextracted from the data)

Figure 5: Example of rules extracted from data

f) Analisys of the obtained rules in order to find meaningful relations between socio-economicaland spatial evolution.

g) Introduction of the rules inside a Cellular Automata to execute the dynamic simulation based onthe mining rules (fig.6 and fig. 7).

Figure 6: Land use map (1978)

IF (NEWCODE 78=PP) AND (NSTRADE=NULL) AND (OL-INT=NULL) AND (SE-INT=NULL) THEN NEWCODE 92=BO

IF NEWCODE 78=SE AND UD-INT=MEDIUM AND VI-INT=NULL AND NSTRADE-INT = TANTE THEN NEWCODE 92=UD

IF NEWCODE 78=FR AND BO-INT=NULL AND FR-INT=MEDIUM AND NSTRADE-INT=MEDIUM THEN NEWCODE 92=SE

IF NEWCODE 78=IP AND BO-ADIAC=NULL AND PP-INT=MEDIUM THENNEWCODE 92=UD

whereNEWCODE 78= land use code in 1978; NSTRADE= number of streets inside every cell;OL-INT= number of olive trees cells in the first order Moore neighbourhood; SE = Crop,FR= orchard, PP = grass and grazing, BO = wood, IP = Productive settlements

The simulation results show a good predictive capacity about real territorial evolutionprocesses; this is expecially true in suburban areas (as linear expansion of urbanized zonesand replaicement of sowable lands with orchards). The prevision of land use dynamics isless precise in urban areas due to used cells size (200x200 meters).

Figure 7: Land use map (2020)CONCLUSIONS The research works analysed and the study cases developed show, in our opinion, that themost promising way in the direction of building behavioural rules which drive agent-basedmicro-scale simulations is the use of Data Mining tools, such as Genetic algorithms,Neural Network, Decision Tree Induction. These last turn out to be specially suited forterritorial/social analyses, as they produce rules easily interpretable and then allowing bothto individuate specific local dynamics and to provide models which are more simple andtansparent for evaluation and decision purposes. This property cannot be found in complexmathematical models, often based on equations with parameters to be estimated, difficult tobe calibrated and whose physical meaning often is lost. Moreover, it is important to integrate micro-scale models, based on rules extracted bymeans of Datamining techniques, with meso-scale models, as those used in the firstapplication above described. It could led to the revision of classical theories. Given this, the further developments of our research will concern the building of a hybridMAS, which couple a meso-scale dynamic model with a Data Mining tool working on a data basebuilt with the micro-scale Acitivity-Based Approach. Such integrated tool will allow to solve the border problems of the micro-model, byworking on a system which is not closed, but interacting with neighbouring areas throughbehavioural meso scale rules. We programming a sample survey on the population of Pisa (segmented as residents,students, commuters and tourist) in order to build a decision tree related to each choice

facet. The resulting model will be certainly simplified and less realistic than other alreadybuilt models, neverthless, it will have the merit of being easily understood by the final users(eg. Decision makers). In this way, the gap still existing between the research on MAS andtheir effective use in planning will be perhaps reduced.

BIBLIOGRAPHYArentze T. & Timmermans H., 2000 Albatross – A learning-based transportation oriented simulation

system.Ben-Akiva M. & Lerman S. R., 1985 Discrete Choice Analysis Theory and Application to travel

demand, The MIT Press, Cambridge, Massachussetts.Berling-Wolff S. & Wu J., 2004 Modeling urban landscape dynamics: a review, Ecological Research

19, pp. 119-129.Cecchini A., 1999 The Multi-Cellular Automaton: a tool to build more sophisticated models. A

theoretical foundation and a practical implementation, Laboratorio sulla Simulazione,DAEST-IUAV, Venice, Italy.

Curtin K. & Noronha V. & Goodchild M. & Grisé S., 2003 ArcGIS Transportation Data Model(UNETRANS) - UNETRANS Data Model Reference.

Gimblett R. (edited by), 2002 Integrating Geographic Information and Agent-basedModelingTechniques for Simulating Social and Ecological Processes. Oxford UniversityPress.

Jager W. & Jannsen M., 2003 The need for development of behaviourally realistic agents,Sichman, Bousquet, Daidsson (eds), Springer-Verlag Berlin Heidelberg, pp. 36-49

Kirkby R., 2002 WEKA Explorer User Guide, University of Waikato.Lombardo S., 1987 Modelli dinamici del sistema integrato territorio e trasporti: i risultati di alcune

sperimentazioni, in Territorio e Trasporti, Modelli matematici per l’analisi e la pianificazione,FrancoAngeli press, Milano.

Lombardo S. & M.Petri & D.Zotta, 2004 Intelligent Gis and Retail Location Dynamics: A MultiAgent System Integrated with ArcGIS, Proceedings of the International Conference onComputer Science and Its Applications – Part II, May 2004, Perugia, Italy, Springer Verlag,ISBN 3540220569, pp. 1046-1056.

Lombardo S. & Papini L. & Rabino G., 1998 Learning urban cellular automata in a real world. Thecase study of Rome metropolitan area, in Cellular Automata: Research Toward Industry,Bandini S., Serra R., Suggi F. (edited by), Springler Verlag, Berlino, pp. 165-184.

Nonas E. & Poulovassilis A., 1998 Optimisation of Active Rule Agents Using a Genetic AlgorithmApproach.

Waddel P. & Borning A. & Noth M. & others, 2003 Microsimulation of Urban Development andLocation Choices: Design and Implementation of UrbanSim, University of Washington,Seattle.

White R. & Engelen G., 2000 High-resolution integrated modelling of the spatial dynamics of urbanand regional systems, Pergamon press, Computers, Environment and Urban Systems, 24, pp.383-400

Wilson A.G., 1981 Catastrophe theory and bifurcation: applications to urban and regional systems,Croom Helm, London, University of California Press, Berkeley.

Wilson A.G., 2000 Complex Spatial System: The modelling foundations of urban and regionalanalysis, Prentice Hall ed., ISBN 0582418968, pp. 62-77.

Witten I.H. & Frank E., 2000 WEKA – Machine Learning Algorithms in Java, University of Waikato,Morgan Kaufmann Publishers.

Heppenstall A.J. & Evans A.J. & Birkin M., 2003 A hybrid multi-agent/spatial interaction modelsystem for petrol price setting.