ABM: Issues Dr Andy Evans. Structuring a model Models generally comprise: Objects. Environment. I/O code. Data reporting code. Some kind of time sequencing.

Slides:



Advertisements
Similar presentations
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics.
Advertisements

Peer-to-peer and agent-based computing P2P Algorithms.
IT253: Computer Organization
Parallel Discrete Event Simulation Richard Fujimoto Communications of the ACM, Oct
WHAT IS AN OPERATING SYSTEM? An interface between users and hardware - an environment "architecture ” Allows convenient usage; hides the tedious stuff.
Parallel and Distributed Simulation Time Warp: Basic Algorithm.
1 Chapter 1 Why Parallel Computing? An Introduction to Parallel Programming Peter Pacheco.
Parallel and Distributed Simulation Lookahead Deadlock Detection & Recovery.
Lookahead. Outline Null message algorithm: The Time Creep Problem Lookahead –What is it and why is it important? –Writing simulations to maximize lookahead.
Intelligent Agents Russell and Norvig: 2
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
1 Reinforcement Learning Introduction & Passive Learning Alan Fern * Based in part on slides by Daniel Weld.
Planning under Uncertainty
Simulation Where real stuff starts. ToC 1.What, transience, stationarity 2.How, discrete event, recurrence 3.Accuracy of output 4.Monte Carlo 5.Random.
CS514: Intermediate Course in Operating Systems Professor Ken Birman Vivek Vishnumurthy: TA.
Ordering and Consistent Cuts Presented By Biswanath Panda.
Review: Process Management Objective: –Enable fair multi-user, multiprocess computing on limited physical resources –Security and efficiency Process: running.
1: Operating Systems Overview
High Performance Computing 1 Parallelization Strategies and Load Balancing Some material borrowed from lectures of J. Demmel, UC Berkeley.
Efficient Parallelization for AMR MHD Multiphysics Calculations Implementation in AstroBEAR.
1 New Architectures Need New Languages A triumph of optimism over experience! Ian Watson 3 rd July 2009.
Chapter 1 Program Design
Code Generation CS 480. Can be complex To do a good job of teaching about code generation I could easily spend ten weeks But, don’t have ten weeks, so.
Counters and Registers
Simulation.
Slide - 1 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation Simulation of a bank: Three tasks or processes:
Modeling and Simulation
ABM: Frameworks Dr Andy Evans. ABM Frameworks What are they? Pieces of software to help people build ABMs. Often offer the functions outlined. Wide range.
Overview Dennis L. Johnson What is GIS? Geographic Information System Geographic implies of or pertaining to the surface of the earth Information implies.
WMS systems manage and coordinate several independent subtasks. The coordination problems get even more serious when the subtasks are performed on separate.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
1 Performance Evaluation of Computer Networks: Part II Objectives r Simulation Modeling r Classification of Simulation Modeling r Discrete-Event Simulation.
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
Recursion, Complexity, and Searching and Sorting By Andrew Zeng.
Hardware Supported Time Synchronization in Multi-Core Architectures 林孟諭 Dept. of Electrical Engineering National Cheng Kung University Tainan, Taiwan,
Stochastic Algorithms Some of the fastest known algorithms for certain tasks rely on chance Stochastic/Randomized Algorithms Two common variations – Monte.
Simulation Prepared by Amani Salah AL-Saigaly Supervised by Dr. Sana’a Wafa Al-Sayegh University of Palestine.
Recursion, Complexity, and Sorting By Andrew Zeng.
1-1 Copyright © 2015, 2010, 2007 Pearson Education, Inc. Chapter 10, Slide 1 Chapter 10 Understanding Randomness.
Chapter 101 Multiprocessor and Real- Time Scheduling Chapter 10.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Introduction to Concurrency.
Parallel and Distributed Simulation Memory Management & Other Optimistic Protocols.
Programming for Geographical Information Analysis: Advanced Skills Lecture 12: Modelling IV: ABM Frameworks and Structure Dr Andy Evans With additions.
Modeling and Simulation Discrete-Event Simulation
Validation Dr Andy Evans. Preparing to model Verification Calibration/Optimisation Validation Sensitivity testing and dealing with error.
Agent-Based Models Dr Andy Evans With additions from Dr Nick Malleson.
1 More About Turing Machines “Programming Tricks” Restrictions Extensions Closure Properties.
Sequence Comparison Algorithms Ellen Walker Bioinformatics Hiram College.
1 Kyung Hee University Statecharts Spring Kyung Hee University Specifying Objects’ Behaviour  Interaction diagrams show message-passing behaviour.
M ONTE C ARLO SIMULATION Modeling and Simulation CS
1: Operating Systems Overview 1 Jerry Breecher Fall, 2004 CLARK UNIVERSITY CS215 OPERATING SYSTEMS OVERVIEW.
Fall 2015 ECEn 490 Lecture #8 1 Effective Presentations How to communicate effectively with your audience.
ABM: Issues Dr Andy Evans. Structuring a model Models generally comprise: Objects. Environment. I/O code. Data reporting code. Some kind of time sequencing.
High Level Architecture Time Management. Time management is a difficult subject There is no real time management in DIS (usually); things happen as packets.
Clock Synchronization (Time Management) Deadlock Avoidance Using Null Messages.
CS3771 Today: Distributed Coordination  Previous class: Distributed File Systems Issues: Naming Strategies: Absolute Names, Mount Points (logical connection.
1/50 University of Turkish Aeronautical Association Computer Engineering Department Ceng 541 Introduction to Parallel Computing Dr. Tansel Dökeroğlu
The Law of Averages. What does the law of average say? We know that, from the definition of probability, in the long run the frequency of some event will.
Digital Footprints By: Devon Nicholson. What is a digital footprint? A digital footprint is an online footprint in which people can look at what you have.
Implementing Dynamic Data Assimilation in the Social Sciences Andy Evans Centre for Spatial Analysis and Policy With: Jon Ward, Mathematics; Nick Malleson,
PDES Introduction The Time Warp Mechanism
Prepared by Lloyd R. Jaisingh
Parallel and Distributed Simulation Techniques
The University of Adelaide, School of Computer Science
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
Discrete Mathematics CMP-101 Lecture 12 Sorting, Bubble Sort, Insertion Sort, Greedy Algorithms Abdul Hameed
Parallel and Distributed Simulation
Parallel Exact Stochastic Simulation in Biochemical Systems
Presentation transcript:

ABM: Issues Dr Andy Evans

Structuring a model Models generally comprise: Objects. Environment. I/O code. Data reporting code. Some kind of time sequencing. Some kind of ordering of processing within a time step. Some kind of decision making and/or rulesets. In agent models these are all relatively explicit.

Structural issues with modelling Model Construction Frameworks Decision making frameworks

Structural issues with modelling Artefacts Timing Data Geography Model Construction Frameworks Decision making frameworks

Artefacts Say we had a time step in which cells became x when a neighbour up and left was x. If we calculate from the top left corner and run across each row, we get this: We see that in one time step, the third cell shouldn’t be x. We’d get a different result if we ran from the lower right. xxx x x x

Artefacts With CAs this seems simple. In the Excel CA a couple of practicals ago, we saw that you generally copy the entire grid, then put changes into another grid temporarily while doing the calculations. This is then copied back into the CA array when everything is complete. This prevents you acting on changed neighbours. However, with large agent models we don’t want to be copying the whole system each time. So, we might just wait until the end of a step and update everything. This is certainly one solution.

Synchronous scheduling In general models will have a global time sequence of time- steps (sometimes called ticks in Logo-based systems) maintained by a clock. The agents are told to enact their behaviour at given time-steps by a scheduler. When there is one global time and all agents act at this speed, none getting ahead in the sequence, this is known as synchronisation. All agents broadly see it as the same time. Synchronisation doesn’t, however, need every agent to do something each time-step: this would unnecessarily increase processing requirements. Different agents may run on different timescales (every five ticks, for example).

Event-based scheduling Different agents may run based on event triggers. In general, these still work within a synchronised time-series. Either way, as with our array problem, we need to make sure updates of contacted agents are either complete or stored for later depending on our model. However, this is often a hard choice. Does a housebuyer always arrive too late to put in an offer? Sometimes they must arrive in time. In general, therefore, we randomise the order of agent steps.

Parallel synchronisation As it is for agents, so it is for parallel models – only more so. Parallel developers think hard about synchronisation. Most models adopt conservative synchronisation of more or less strength, that is, there is some central scheduler that coordinates jobs around the global time. We need to avoid processes happening out of sync for most systems. This is particularly the case in geographical systems, which tend to be based on Markov processes / causality.

Lookahead However, some processing can be done without communication. It is also the case that events/processes can be stacked and run through in sequence at whatever speed a processor can until it needs to respond. The difference between now and the first necessary communication out is known as the lookahead. A lot of effort goes into working out what this is and how much can be done in it.

Optimistic scheduling Optimistic scheduling plays fast and loose with the amount that is done in this time, but then recovers if a critical causal event needs to be injected into a process. For example, in the Time Warp Algorithm, processing is rolled- back if necessary, including any messages sent. As you can imagine, this gets fairly complicated, and these algorithms only really work where there is history path- independence in the system.

Monte Carlo sampling It is also the case that if we have input data repeatedly entering the model, this can lead to harmonic artefacts. Data running through the system can lead to internal dynamics that cycle at the same periodicity producing artefacts; this is particularly problematic with self-adjusting systems. We need some randomisation. In general we sample input data randomly, even if we act to include certain periodicities (e.g. seasonal). We sample weighted by distribution – so-called Monte Carlo sampling. The same thing happens with geographical variation, so we randomly sample agents occurring in space too (though more rarely based on a distribution).

Stochastic models Deterministic models always end up with the same answer for the same inputs. Stochastic models include some randomisation, either of data or behaviour. As we have seen, these are usually quantified by repeated runs. However, sometimes we want to run under the same “random” conditions (e.g. to understand some behaviour). Standard computers without external inputs never generate truly random numbers – they are random-like sequences, adjusted by some random seed. If we record the random seed, we can re-run the “random” model exactly.

Space Boundary types: Infinite. Bound. Torus. Other topologies. Organisation: Continuous. Grid (square; triangular; hexagonal; other) Irregular areas, or quad-tree. Network Neighbourhoods: Moore Von Neumann Diagonal Euclidian Network

GIS and Agent Systems Problem is GIS inherently static GIS data model represents a single point in time Some work into a temporal GIS data model, but no widespread solutions But time essential in an ABM: Need to link GIS and ABM Two approaches: loose vs tight/close coupling

Tight Coupling GIS and ABM communicate directly. At each iteration the ABM updates GIS on new system state. GIS can display model state dynamically.

Loose Coupling GIS prepare input for model and display/analyse results. Model does not need to communicate with GIS directly. Quick: ABM not constrained by speed of GIS.

Issues Ideally, then, we need: A clock/ scheduler, if we’re not calling each agent every time-step (and/or some kind of event-watching system). Some way of randomising sampling of agents/agent locations. Some way of running Monte Carlo sampling of both inputs and parameters. A variety of projections/space types/boundaries.

Helpful Easy I/O. Saving model sequences as video. Connectivity to R, Excel, GISs etc. Options for distributing and describing models. Easy GUI production and visualisation of data. Given all this, the thought that someone might build an agent framework that does all this for you sounds increasingly good of them.