Comparison of Agent-based platforms

34
Comparison of Three Agent-Based Platforms on the basis of a Simple Epidemiological Model Kishoj Bajracharya st111224 Examination Committee Dr. Raphael Duboz (Chairperson) Prof. Phan Minh Dung (Member) Dr. Sumanta Guha (Member) Asian Institute of Technology May 14, 2012 1 / 34

description

 

Transcript of Comparison of Agent-based platforms

Page 1: Comparison of Agent-based platforms

Comparison of Three Agent-Based Platforms onthe basis of a Simple Epidemiological Model

Kishoj Bajracharya st111224

Examination CommitteeDr. Raphael Duboz (Chairperson)Prof. Phan Minh Dung (Member)Dr. Sumanta Guha (Member)

Asian Institute of TechnologyMay 14, 2012

1 / 34

Page 2: Comparison of Agent-based platforms

BACKGROUND

Agent-Based System

A system having 3 components: agent, behavior rules andenviroment.

Components of Agent

Agent-Based Modeling

Modeling of system as a collection of agents inside environmentwith a set of rules.

Agent-Based Simulation

Simulation of agent-based model to perform experiments to studythe behavior of complex system.

2 / 34

Page 3: Comparison of Agent-based platforms

BACKGROUND (CONTD.)

Agent-Based Platform

Tools used for simulation and modeling of agent-based system.

Environment to develop agents, agent-based components,behavior rules, etc.

Agent-Based SIR Model

Assumptions:

1 Each individual may be in one of three states: susceptible,infected, or recovered (removed).

2 Initally, two groups of individuals in population: suceptibleand infected.

3 Infectious-Period is same for all the agents.

4 Recovered individuals cannot be infected.

Each agent interacts with other agents and influence itsbehavior.With time, the state of an agent changes. 3 / 34

Page 4: Comparison of Agent-based platforms

BACKGROUND (CONTD.)

Parameters Output

Population SizeNumber of Infected Susceptible Proportion

Infectious-Period Infected Proportionprobability of infection: Recovered Proportion

Parameters and Outputs of Simulator

Infectious-Period: Period of time in which agent is infected.

After Infectious-Period, infected agents develop a permanentimmunity to infection and recover from it.

4 / 34

Page 5: Comparison of Agent-based platforms

BACKGROUND (CONTD.)

Population Proportion Vs Time

5 / 34

Page 6: Comparison of Agent-based platforms

PROBLEM STATEMENT

Various agent-based platforms are available for agent-basedmodeling.

1 Can we trust the results obtained from them? Can we useplatforms for making predictions or forecastings?

2 How can we choose platform suitable for beginner modelers?

Simulation of ABM on different platforms

6 / 34

Page 7: Comparison of Agent-based platforms

OBJECTIVES

1 To design and simulate the same agent-based SIR model usingthree agent-based platforms: NetLogo, Repast, and Cormas.

2 To compare these platforms by comparing their simulationresults.

3 To suggest the platform suitable for beginners on the basis ofcomparison criterias based on implementation of SIR model.

Research Objectives

7 / 34

Page 8: Comparison of Agent-based platforms

AGENT BASED PLATFORMS

NetLogo

Very popular tool (educational purpose).

Provides rich integrated modeling environment.

Simple modeling language and easy to implement models.

Feasible to deploy simulations as Java applets.

Free to download and is open-source.

Not object-oriented

Repast

ABMS library developed for social targets.

Provides a core collection of classes for ABM.

Programming Language: Java.

Free and open-source

Object-oriented

8 / 34

Page 9: Comparison of Agent-based platforms

AGENT BASED PLATFORMS (Contd.)

Cormas

Cormas is developed to simulate agent based models ofsocial and biological targets.

Provides integrated modeling environment.

Programming language: Smalltalk.

Free to download but required registration with Cormascommunity for source code.

Object-oriented

9 / 34

Page 10: Comparison of Agent-based platforms

METHODOLOGY

Proposed Approach

Implement the same agent-based SIR model in all threeplatforms.

Implementation of ABM on different platforms

10 / 34

Page 11: Comparison of Agent-based platforms

SCHEDULING

1 Increment each day or tick.2 Perform agent movement on space in random direction.3 Perform agents interaction.

Check the health state of neighborhood of each agent withintheir infection range.If health state of neighborhood of susceptible agent is ‘I’ then

1 Set Infected Days := 1.2 Set the color of an susceptible agent as “red”.3 Set the health state of susceptible agent as ‘I’.

4 Update the health state for each agent.If health state is I then increment the value of Infected-Days.If health state is I and Infected-Days is greater than or equalto Infectious-Period then

1 Set Infected Days := 0.2 Set the color of an infected agent as “green”.3 Set the health state of an infected agent as ‘R’.

5 Get the outputs from the model i.e. total simulation days,susceptible proportion, infected proportion, and recoveredproportion.

6 Plot the graph of population proportion Vs Time.7 Save the outputs from the model to a output file.

11 / 34

Page 12: Comparison of Agent-based platforms

SCHEDULING (CONTD.)

State Diagram for State change in an Agent

12 / 34

Page 13: Comparison of Agent-based platforms

METHODOLOGY (CONTD.)

Perform simulations with the model for various scenarios andrecord the outcomes.

Compute the mean and standard deviation of time series.

Outputs from simulation of ABM

13 / 34

Page 14: Comparison of Agent-based platforms

DATA FROM PLATFORMS

Output data from the three platforms

Plot of Time Series Data

Yellow: Susceptible

Red: Infected

Green: Recovered

Blue: StandardDeviation

14 / 34

Page 15: Comparison of Agent-based platforms

COMPARISON OF PLATFORMS

The mean time series data and their standard deviations ofthree agent-based platforms are plotted in the figure below.

Plot of Time Series Data from AllPlatforms

Red: NetLogo

Green: Repast

Blue: Cormas

Blue line: Range ofstandard deviation

15 / 34

Page 16: Comparison of Agent-based platforms

METHODOLOGY (CONTD.)

Compare agent-based platforms based on the cross-correlationanalysis and similarity using Manhattan distance.

(a) (b)

Comparison of Time series using (a) Cross-correlationand (b) Similarity using Manhattan distance.

16 / 34

Page 17: Comparison of Agent-based platforms

CROSS-CORRELATION ANALYSIS

Similarity Measure using Cross Correlation Method

17 / 34

Page 18: Comparison of Agent-based platforms

RESULTS USING CROSS-CORRELATION

Cross-correlation test between Three Platforms

18 / 34

Page 19: Comparison of Agent-based platforms

MANHATTAN DISTANCE

Similarity Test

Sim(T1,T2) is the similarity between two time series data and isdefined by following equation.

Sim(T1,T2) =1

1 +

i=n∑i=1|(ai−bi )|

n

19 / 34

Page 20: Comparison of Agent-based platforms

MANHATTAN DISTANCE (CONTD.)

Similarity Measure using Manhattan Distance

20 / 34

Page 21: Comparison of Agent-based platforms

RESULT OF MANHATTAN DISTANCE

Result of Similarity Measure using Manhattan Distance

21 / 34

Page 22: Comparison of Agent-based platforms

METHODOLOGY (CONTD.)

Suggest the platforms based on the comparison criterias.1 Popularity index of Platform2 Documentation Availability3 Modeling Speed4 Ease to use5 Programming Efforts6 Choice of Programming Language7 Simulation speed8 GUI features9 Ease of installation10 License govern

References:

Nilolai and Madey, 2009

Tobias and Hofmann

22 / 34

Page 23: Comparison of Agent-based platforms

COMPARISON OF PLATFORMS BASED ON CRITERIAS

To support beginner modelers to choose the platform based onsimplicity.

Popularity of platforms: NetLogo > Repast > Cormas.

Number of dated references in Google Scholar quoting theseminal paper of 6 ABS platforms.

Documentation Availability:1 NetLogo: Rich documentation and tutorials.2 Repast: Comprehensive documentation and large community.3 Cormas: Less documentation, offers training sessions and

electronic forums.23 / 34

Page 24: Comparison of Agent-based platforms

COMPARISON OF PLATFORMS BASED ON CRITERIAS

Modeling speed:1 NetLogo: Second fastest.2 Repast: Slow (programming).3 Cormas: Fastest.

Ease to use: NetLogo > Cormas > Repast.

Programming Efforts: Lesser the programming efforts,platforms are more prefereable.

1 NetLogo: Less Programming2 Repast: More programming (Less preferable)3 Cormas: Least Programming (Object-oriented approach).

Choice of Programming Language: It depends upon modeler’schoice. For beginners, NetLogo > Cormas > Repast.

GUI features: NetLogo > Cormas > Repast.

Licence Govern: NetLogo = Repast > Cormas.

Ease of Installation: NetLogo > Repast > Cormas.

24 / 34

Page 25: Comparison of Agent-based platforms

COMPARISON OF PLATFORMS BASED ON CRITERIAS

Simulation Speed: From the following results, Repast >NetLogo > Cormas.

Comparison on Simulation time between Platforms

25 / 34

Page 26: Comparison of Agent-based platforms

COMPARISON OF PLATFORMS BASED ON CRITERIAS

Following are the rating of platforms.1 Very High: Platform is highly suitable with respect to given

criteria.2 High: Platform is suitable with respect to given criteria.3 Low: Platform is less suitable with respect to given criteria.4 Very Low: Platform is least suitable with respect to given

criteria.

Each criteria is assigned a weight factor depending upon therating of that criteria.

f =

1 for Very High;

0.8 for High;

0.6 for Low;

0.4 for Very Low;

(2)

26 / 34

Page 27: Comparison of Agent-based platforms

COMPARISON OF PLATFORMS BASED ON CRITERIAS

Comparison Criteria NetLogo Repast CormasPopularity index of Plat-form

Very High High Low

Documentation Availability Very High High Low

Modeling Speed High Very Low Very High

Ease to use Very High Very Low High

Programming Efforts High Very Low Very High

Choice of ProgrammingLanguage

Very High Very Low High

Simulation speed High Very High Very Low

GUI features Very High Very Low High

Ease of installation Very High High Low

License govern Very High Very High High

Rating of Agent-based Platforms based on the features

27 / 34

Page 28: Comparison of Agent-based platforms

RANK SUM

Comparison Criteria Rank W=n-r+1 NormalizedWeight(wi )

Popularity index of Platform 1 10 0.182

Documentation Availability 2 9 0.164

Modeling Speed 3 8 0.145

Ease to use 4 7 0.127

Programming Efforts 5 6 0.109

Choice of Prog. Language 6 5 0.091

Simulation speed 7 4 0.073

GUI 8 3 0.055

Ease of installation 9 2 0.036

License govern 10 1 0.018

wi =n − ri + 1

k=10∑k=1

n − rk + 1

(3)

28 / 34

Page 29: Comparison of Agent-based platforms

CUMULATIVE WEIGHTAGE CALCULATION

Comparison Criteria wi NetLogo(wi × f )

Repast(wi×f )

Cormas(wi×f )

Popularity index of Platform 0.182 0.182 0.1456 0.1116

Documentation Availability 0.164 0.164 0.1312 0.0984

Modeling Speed 0.145 0.116 0.058 0.145

Ease to use 0.127 0.127 0.0508 0.1016

Programming Efforts 0.109 0.0872 0.0436 0.109

Choice of Prog. Language 0.091 0.09 0.036 0.072

Simulation speed 0.073 0.0584 0.073 0.0292

GUI 0.055 0.055 0.022 0.044

Ease of installation 0.036 0.036 0.0288 0.0216

License govern 0.018 0.018 0.018 0.0144

Total Sum 1 0.934 0.607 0.7468

W =i=10∑i=1

(wi × f )/(i=10∑i=1

wi ) (4)29 / 34

Page 30: Comparison of Agent-based platforms

COMPARISON OF PLATFORMS BASED ON CRITERIAS

Outputs

Greater the cumulative weightage of the platform, higher wasthe preference of the platform for ABM.

The cumulative weightage of NetLogo, Repast and Cormaswere 0.934, 0.607 and 0.7468 respectively.

For the beginner modeler: NetLogo > Cormas > Repast.

30 / 34

Page 31: Comparison of Agent-based platforms

CONCLUSION

Agent-based SIR models were implemented on NetLogo,Repast, and Cormas.

Using cross-correlation test and similarity test (Manhattandistance)

Higher the threshold value, lower was the probability ofsimilarity between the agent-based platforms.For the lower thresholds:

Platforms NetLogo and Cormas were more similar thanNetLogo and Repast.Platforms Repast and Cormas were dissimilar.

For the higher thresholds, the results of the agent-basedplatforms are dissimilar.

For beginner modeler, NetLogo > Cormas > Repast.

31 / 34

Page 32: Comparison of Agent-based platforms

CONCLUSION (CONTD.)

Platforms cannot be used for making prediction or forecasting

Simulation results cannot be trusted.Not realistic in real practices.

Platforms can be used as

The framework to develop a model in easier way.Tool for educational purpose.Tool to analyse the behavior of the system with modeler’s ownway of thinking.

32 / 34

Page 33: Comparison of Agent-based platforms

FUTURE IMPLEMENTATION

Use of several agent-based models for similarity measure ofagent-based platforms.

We can add more agent-based platforms.

Our results showed that platforms showed different resultseven though shape or patterns were similar. How to choosethe correct platform?

33 / 34

Page 34: Comparison of Agent-based platforms

THANK YOU

QUESTIONS???

34 / 34