Presentation is loading. Please wait.

Presentation is loading. Please wait.

Future Research Directions in Agent Based Modelling Workshop, Leeds, UK, 2010-06-15 Large Scale Social Simulation in Java and the NeISS Project Andy Turner.

Similar presentations

Presentation on theme: "Future Research Directions in Agent Based Modelling Workshop, Leeds, UK, 2010-06-15 Large Scale Social Simulation in Java and the NeISS Project Andy Turner."— Presentation transcript:

1 Future Research Directions in Agent Based Modelling Workshop, Leeds, UK, 2010-06-15 Large Scale Social Simulation in Java and the NeISS Project Andy Turner

2 Overview Introduction Modelling people movements at an individual level –Demographics –Traffic simulation Scaling up models –Computational issues Memory handling in Java

3 Introduction GENESIS –Generative e-Social Science for Socio-Spatial Simulation –ESRC funded –A second phase research node of the UK National Centre for e-Social Science – NeISS –National e-Infrastructure for Social Simulation –JISC funded –Part of the Information Environment Program –

4 My Presentation Slides, and Notes from this meeting can all be found via the following URL:

5 Modelling People Movements at an Individual Level Model Characteristics –Scale and resolution Spatial –2D/3D Temporal –Agent and Environment Attributes –Constraints Types of model –Prehistorical –Historical –Contemporary –Use restricted v Open access

6 Contemporary Model Data Lots exists, but much is not openly available Census and Social Surveys Government statistics Traffic monitoring and surveys Crowd sourced Mobile devices Telecommunication data Navigation company data Traffic/transport systems Transport networks Public transport scheduled services Financial transactions

7 Two types of Agent Based GENESIS models 1.Demographic model –Run with time steps of a day and run for years –Basic model is aspatial Being spatially developed and incorporating migration 2.Traffic model –Run with time steps of seconds and run for days –Inherently spatial –Basic road only commuting model Being developed with density constraints and traffic queuing

8 Open Source Java GENESIS Code Base – Key third party libraries –ojALGO –JFreeChart –Traveling Salesman OSM routing library

9 Result can be reproduced although models are stochastic in nature Uses seeded psuedo-random number sequences –Results can be easily reproduced Given the same input data and model configuration –A range of results can be generated for different random seeds Iterators are used to go through collections of Objects during processing –However, the order in which objects are retrieved via the iterator does not have an effect in that the data after going through the iteration is the same each time.

10 Basic Demographic Model Deals with birth and death Starts with an initial population –Comprised of males and females Males and females may have different age specific fertility and mortality rates At each step simulates: –Death –Birth –Pregnancy –Miscarriage

11 Basic Demographic Model Detail All living Person (Agents) are tested to see if they die at each step: –Tests are done by asking for the next number from a pseudo-random sequence and comparing the number with respective age and gender specific mortality rates In the first simple model –Miscarriage rate was fixed for all ages, but was reasonably high –Gestation period was fixed at 266 days –At birth a single Agent is formed with a 50% chance of it being either male or female

12 Example Output _Year 299 –_TotalDeathsInYear 11442 –_TotalBirthsInYear 12049 –_TotalConceptionsInYear 14238 –_TotalMiscarriagesInYear 2138 Output Directory

13 Demographic considerations Seeding the initial population with pregnancies –Without this there is a significant cohort of births 266 days after the simulation starts and then again 266 days after this –Over time miscarriage helps to even out the number of new births on each day Sharply increasing Fertility probabilities at a specific age result in a secondary cohort effect –The first newborn population may tend to all have babies on the same day too Pregnancy term is not fixed, but based on a probability distribution

14 Example Platform Intel(R) Core(TM) 2 Duo CPU P9400 @ 2.4GHz 2.39 GHz, 1.95 GB RAM Ran from within Netbeans 6.7.1 Java opts ––Xmx512m –Xms512m

15 Example Run Simulation Parameters _MaximumNumberOfAgents = 1000000 _MaximumNumberOfAgentsPerAgentCollection = 10000 InitialFemalePopulation = 1000 InitialMalePopulation = 1000 TotalYears 300

16 Example Run Data No input data All data generated by simulation model –1162563 Files 1173895 Directories Size 1.92 GB (2067216392 bytes) Size on disk 4.48 GB (4819922944 bytes)

17 GENESIS Traffic Modelling Agents positioned in a confined region on a Euclidean 2D plane –First Agents made to move around this randomly by repositioning at each time tick –Next the concept of destinations was developed Rather than necessarily having a different destination at each time tick, an Agent might be assigned a destination beyond its maximum range of movement in a time tick

18 Spatial resolutions Fixed decimal place type precision high resolution raster network Movement on network also uses fixed decimal place precision Reporting done for lower resolution rasters –Both vectors of movement and population density grid outputs

19 Model Libraries Generic – Raster –Grids Vector – Agent data

20 Commuting model for Leeds seeded with UK Census data Data –2001 UK census special travel statistics data home origin and work destination at an Output Area (OA) level There are over 200,000 OA in the UK –Open Street Map (OSM) Road data Key 3 rd party library –Traveling Salesman OSM routing library

21 Example output Output Directory

22 Computational Issues These models are computationally demanding both in terms of the processing and the data storage requirements –To reduce compute times then parallelisation is key MPJ Express –For large scale simulations then there are few computers with enough fast access memory Some way of swapping data with slower access (usually persistent disk) memory is wanted Some Java Memory Handling slides coming up...

23 A method to get the amount of available JVM memory

24 A method to try to prevent OutOfMemoryError being thrown

25 A public wrapped method

26 A simple case of handling OutOfMemoryError


28 Agents and Data Structures Agents –Each of these has a unique numeric ID –Have a file location AgentCollections –These are HashSets of Agents –Have a file location AgentIDCollections –These are HashSets of Agent numeric IDs

29 Data Structure Settings 100000000000 1000000000 10000000 100000 1000 100 6 directory levels can store 100000000000 (one hundred thousand million) files.

30 Considerations and Further Work I am happy to help anyone wanting to get a copy of my code and get it running The next big computational step is to paralellise the models For the demographic models I am working on migration For the traffic models I am working on implementing density and flow based constraints

31 Acknowledgements GENESIS is funded by the UK ESRC –RES-149-25-1078 NeISS is funded by the UK JISC Thanks for help and support from: –The e-Research community –The University of Leeds School of Geography Centre for Computational Geography

32 Thank you

Download ppt "Future Research Directions in Agent Based Modelling Workshop, Leeds, UK, 2010-06-15 Large Scale Social Simulation in Java and the NeISS Project Andy Turner."

Similar presentations

Ads by Google