Blecic Iccsa 2008


Published on

Third International Workshop on "Geographical Analysis, Urban Modeling, Spatial Statistics"

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Blecic Iccsa 2008

  1. 1. <ul><li>A Software Infrastructure for Multi-Agent Geosimulation Applications </li></ul><ul><li>Ivan Blecic, Arnaldo Cecchini, Giuseppe A. Trunfio </li></ul><ul><li>Laboratory of Analysis and Models for Planning </li></ul><ul><li>Department of Architecture and Planning </li></ul><ul><li>University of Sassari </li></ul><ul><li>Italy </li></ul>Third International Workshop on &quot;Geographical Analysis,Urban Modeling, Spatial Statistics“ GEOG-AN-MOD 08
  2. 2. Multi-Agent Geosimulation (MAG) <ul><li>modelling phenomena taking place in geographical environments through the use of agent-based approach within high-resolution spatial models </li></ul>GIS geo-spatial datasets (buildings,infrastructures, terrain elements) mobile artificial agents ( pedestrians, consumers,household, vehicles ) + =
  3. 3. MAG models… <ul><li>… are developed to realistically represent phenomena taking place in space (e.g. urban systems) </li></ul><ul><ul><li>Land-use dynamics </li></ul></ul><ul><ul><li>Urban patterns (e.g. householder residential behaviour ) </li></ul></ul><ul><ul><li>Urban sprawl </li></ul></ul><ul><ul><li>Pedestrian crowding </li></ul></ul><ul><ul><li>… </li></ul></ul><ul><li>… are used to execute simulations with the purpose of: </li></ul><ul><ul><li>Understanding systems (e.g. the consequences of individual-level choices at a global level) </li></ul></ul><ul><ul><li>What-if analysis, policy evaluation and decision support </li></ul></ul><ul><ul><li>… . </li></ul></ul>
  4. 4. Developing and executing MAG applications <ul><li>Development phase : </li></ul><ul><ul><li>Typically needs some programming skills </li></ul></ul><ul><ul><ul><li>issues : efficiency of spatial queries even for moving objects, accessing spatial data, computing spatial relationships among geometries, scheduling, etc. </li></ul></ul></ul><ul><ul><li>Often needs to involve experts from different fields </li></ul></ul><ul><ul><li>Availability of data for inferring empirical rules, calibration, validation etc. </li></ul></ul><ul><li>Application phase: </li></ul><ul><ul><li>The application must allow to effectively execute simulations for different scenarios </li></ul></ul><ul><ul><ul><li>Including calibration and validation </li></ul></ul></ul><ul><ul><li>Interoperability with GIS for further analysis of spatial outcomes of the simulation </li></ul></ul>
  5. 5. <ul><li>According to Mandl (2000), four alternatives for coupling simulation applications and GIS: </li></ul><ul><ul><li>loose coupling : GIS and simulation software are two separate software applications, and the data of one is integrated into another. </li></ul></ul><ul><ul><li>direct co-operative coupling : GIS and simulation software in a server-client interaction. </li></ul></ul><ul><ul><li>indirect co-operative coupling : a third programming environment couples GIS and simulation software. </li></ul></ul><ul><ul><li>tight coupling : GIS functionality is directly implemented in simulation software or vice versa. </li></ul></ul><ul><li>In any case a programmer can exploit the wide availability of libraries and environments </li></ul><ul><ul><li>Swarm, RePast, etc… </li></ul></ul><ul><ul><li>GIS libraries </li></ul></ul>Developing and executing Geosimulation applications
  6. 6. Vector vs. Raster in MAG models <ul><li>Mixed Vector/Raster representation : </li></ul><ul><ul><li>more realistic simulations; </li></ul></ul><ul><ul><li>Direct use of vector spatial data (e.g. demographic data, land-uses, buildings shapes, etc.), without the need of rasterisation. </li></ul></ul><ul><ul><li>better interoperability with GIS applications (the geo-spatial features can directly be mapped to objects and agents of the model, and vice versa); </li></ul></ul><ul><ul><li>the accuracy of spatial perception engine can take significant advantages from the existing algorithms of computational geometry. </li></ul></ul><ul><ul><li>Computationally expensive agents’ spatial perception </li></ul></ul><ul><li>Raster representation: </li></ul><ul><ul><li>the dimension of cells determines both the accuracy of the representation of complex shapes (e.g. buildings in a city) and the spatial resolution of agents' movements; </li></ul></ul><ul><ul><li>need of rasterising vector data; </li></ul></ul><ul><ul><li>spatial output only of raster type; </li></ul></ul><ul><ul><li>fairly efficient spatial perception algorithms. </li></ul></ul>
  7. 7. Development Tools for Agent Simulations Missing dimensions?: model complexity, …
  8. 8. MAGI M ulti A gent G eosimulation I nfrastructure <ul><li>Software environment for the design, development and execution of MAG applications </li></ul>
  9. 9. Main features of MAGI <ul><li>Enables the development of a wide range of MAG models </li></ul><ul><li>The resulting models can be integrated with different computational approaches </li></ul><ul><li>Offers an effective graphical user interface </li></ul>Simulation monitoring Simulation steering Model development support
  10. 10. Main features of MAGI <ul><li>Development phase : </li></ul><ul><li>Simulation phase : </li></ul>Different models (on-line and/or off-line coupling with MAGI) Outcomes for post-processing
  11. 11. The main ingredients of MAGI <ul><li>Portable C++ libraries: </li></ul><ul><ul><li>GEOS (Geometry Engine Open Source) </li></ul></ul><ul><ul><li>Leaf-prior Update R-Tree (spatial indexing for moving objects) </li></ul></ul><ul><ul><li>OpenTreads (Threads management) </li></ul></ul><ul><li>Windows Development and Simulation Environment: </li></ul><ul><ul><li>MinGW (Minimalist GNU for Windows – C++ open source development tool) </li></ul></ul><ul><ul><li>GDAL/OGR ( open source library for accessing raster and vector geospatial data formats) </li></ul></ul>
  12. 12. GEOS <ul><li>GEOS is an API of 2D spatial predicates and functions </li></ul><ul><li>It has the following design goals: </li></ul><ul><ul><li>It conforms to the Simple Features Specification for SQL published by the Open GIS Consortium </li></ul></ul><ul><ul><li>It provides a complete, consistent, robust implementation of fundamental 2D spatial algorithms </li></ul></ul><ul><ul><li>It is fast enough for production use </li></ul></ul><ul><ul><li>It is written in C++ </li></ul></ul><ul><ul><li>It is open source </li></ul></ul>
  13. 13. GEOS & MAGI <ul><li>Each agent is associated to a geometry </li></ul><ul><li>In addition, each agent has: </li></ul><ul><ul><li>Properties (i.e. C++ objects, representing integer, real numbers, vectors, list, graphs, etc., which define the agent’s state ) </li></ul></ul><ul><ul><li>Behavioral rules (e.g. for updating the agent’s properties or geometry) </li></ul></ul><ul><ul><li>Spatial contexts, which can be dynamically updated </li></ul></ul>Point LineString LinearRing Polygon
  14. 14. MAGI Agents <ul><li>Agents can represent static geographic objects … </li></ul><ul><li>… or cells </li></ul><ul><ul><li>this enables the development of Cellular Automata models </li></ul></ul>
  15. 15. MAGI Agents <ul><li>Agents can move in and interact with the environment </li></ul>
  16. 16. Layers <ul><li>Agents are organized in layers </li></ul>Global parameter and functions are also allowed (e.g. a parameter may affect more than one layers) Layer parameters are variables accounting for relevant properties which can influence the agents’ behaviour Layer functions can be defined and scheduled for execution during simulations (e.g. layer functions can update layer parameters)
  17. 17. Agent’s spatial context <ul><li>Each agent holds a spatial context : (i.e. the lists of entities of interest for the agent itself) </li></ul><ul><li>MAGI allows: </li></ul>Standard CA neighbourhoods (static) Spatial contexts resulting from a (spatial) perception activity (dynamic) Custom neighbourhoods (static) On regular tessellations
  18. 18. Spatial perception <ul><li>Dynamic spatial contexts can be defined by custom spatial queries which are iterated with a specified frequency during the simulation : </li></ul>
  19. 19. Spatial perception <ul><li>The C++ library offers specific spatial queries implementing visual perception algorithms which operate on vector data </li></ul>
  20. 20. Spatial perception <ul><li>spatial queries are inherently computationally expensive </li></ul><ul><li>In MAGI spatial queries are robust and efficient thanks to: </li></ul><ul><ul><li>a spatial indexing technique specific for moving objects ; </li></ul></ul><ul><ul><li>the use of binary predicates offered by GEOS ; </li></ul></ul>
  21. 21. Spatial perception: indexing agents <ul><li>MAGI class library: includes a spatial indexing specific for moving objects (i.e. the Leaf-prior Update R-Tree) which makes efficient both the execution of spatial queries and the index updating operations (required when an agent change its position in space) </li></ul>
  22. 22. Spatial perception: binary Predicates <ul><li>MAGI supports, through GEOS, a complete set of geometric binary predicates. </li></ul><ul><li>Binary predicate methods take two geometries as arguments and return a boolean indicating whether the geometries are in the named spatial relationship . </li></ul><ul><li>The relationships supported are: equals, disjoint, intersects, touches, crosses, within, contains, overlaps </li></ul><ul><li>Binary predicates can be used by agent’s behavioral rules and spatial queries for updating of its spatial context, in order to simulate spatial perception and reasoning </li></ul>B A
  23. 23. Spatial perception: computational efficiency A) agents avoid collisions but ignore other agents; B) agents avoid collisions and perceive other agents in their field of vision <ul><li>Moving agents perceiving other moving agents in a vector space can be computationally expensive as the number of agents increases </li></ul>
  24. 24. Agent behaviour <ul><li>The agent behaviour is defined by actions </li></ul><ul><li>Actions can update the state of the agent itself, the state of the environment or the state of other agents </li></ul>
  25. 25. Scheduling <ul><li>The simulation proceeds in time-steps </li></ul><ul><li>Two main types of scheduling: </li></ul><ul><ul><li>Simultaneous updating : agents are assumed to change simultaneously (like cells’ states in Cellular Automata) </li></ul></ul><ul><ul><ul><li>conflicts can arise when agents compete over limited resources </li></ul></ul></ul><ul><ul><li>Sequential updating : agents’ states change in sequence (each agent observes the reality left by the previous one) </li></ul></ul><ul><ul><ul><li>conflicts between agents are resolved but the order of updating may influence results. </li></ul></ul></ul><ul><ul><ul><li>Sequential random updating is also available; </li></ul></ul></ul>
  26. 26. MAGI GUI Model structure editing Editing of behavioral rules and queries Model building Model execution
  27. 27. MAGI GUI XML model structure editing
  28. 28. MAGI GUI <ul><li>MAGI provides interfaces for exchanging raster and vector spatial data with GIS through GDAL/OGR </li></ul><ul><ul><li>GDAL/OGR is provided by the Open Source Geospatial Foundation . It presents a single abstract data model to the calling application for all supported formats. </li></ul></ul>Samples are mapped into agent states
  29. 29. MAGI GUI Parameter monitoring and editing
  30. 30. A model step-by-step <ul><ul><li>Number and type of global parameters </li></ul></ul><ul><ul><li>Global functions </li></ul></ul><ul><ul><li>Layers </li></ul></ul>Step 1 : definition of model structure <ul><ul><li>For each layer: </li></ul></ul><ul><ul><ul><li>Name </li></ul></ul></ul><ul><ul><ul><li>Type of agent activation </li></ul></ul></ul><ul><ul><ul><li>Type of boundary (e.g. toroidal space ?) </li></ul></ul></ul><ul><ul><ul><li>Type of entities (e.g. cells ?) </li></ul></ul></ul><ul><ul><ul><li>Number and type of layer parameters </li></ul></ul></ul><ul><ul><ul><li>Layer functions </li></ul></ul></ul>
  31. 31. A model step-by-step <ul><li>Step 2 : definition of agents </li></ul><ul><ul><li>Type of geometry </li></ul></ul><ul><ul><li>Structure of agent’s state (number and type of properties) </li></ul></ul><ul><ul><li>Actions defining agent’s behaviour (C++ source code) </li></ul></ul><ul><ul><li>Number and type of Neighbor lists </li></ul></ul><ul><ul><ul><li>spatial queries in case of query-based lists </li></ul></ul></ul>
  32. 32. Under development: <ul><li>Application examples </li></ul><ul><li>Multi-threading based concurrent computation </li></ul><ul><ul><li>for exploiting the multi-core processor architectures (the current trends in processor technology indicate that the number of processor cores in one chip will continue to increase) </li></ul></ul><ul><li>OpenGL visualization capabilities </li></ul>