SlideShare una empresa de Scribd logo
1 de 85
Introduction to Computing
for Complex Systems
(Lab Session 6)
Goals For Today
Quick Review of Old Material
Automation I --- Run Experiment
Automation II --- If, Ifelse &
While loops
Quick Review of
Old Material
The Flocking Model
simple behavioral rules
local interaction between agents
can produce
behavior that
appears to
have a
top down /
command & control
structure
+
The Flocking Code
Produces
The Flocking Model
Parameter Sweeps?
We would like to be able to evaluate all possible parameter values
with all possible parameter values
100 doves
100 hawks
100 retaliators
10 values
10 costs
100 reproduce-thresholds
100 init-energies
100 energy-time-thresholds
x
at least say
25-50 values
per parameter
configuration to
get some sort of
a statistical distribution
100,000,000,000,000
However, this is going to be non-trivial matter
Even for a limited set of parameter configurations, some sort of
automation is going to be needed
Automated Analysis
of Model Runs
Part I
T-800
•  We have demonstrated automation is
useful but …
•  how do actually we do It?
Automated Analysis
of Model Runs
•  We Will Highlight 3 ways to undertake
automation:
– Run Experiment button
– Handwritten loops
– Behavior Space
Automated Analysis
of Model Runs
•  Please open the Forest Fire model
•  In the Models Library
•  Fire model is in
Earth Science
Run Experiment
Single Variable Models
•  The Forest Fire model uses one variable,
the density of the trees, to model the
spread of a fire.
•  It will be fairly easy for us to “sweep the
parameter space” in this model, since
there is only one variable.
•  Let’s edit the Forest Fire model so we can
see the output of each run.
•  Go to the “to go” procedure and replace
the [stop] after “if not any? turtles” with the
following three lines…
Single Variable Models
Replace [stop] and
Insert new code
Default
version
new
Replace [stop] and
Insert new code
Default
version
new
Note: Removing Stop will
cause the loop to run
infinitely
Here is the Modified
“to Go” Procedures
The Payoff
•  These edits will output the percent of the
forest that burned during each run of the
model and the density of the trees during
that run.
•  The output will appear in the Command
Center at the bottom of the screen.
•  Go ahead and run the model a few
times…
The Payoff
If you made the
proper
modification it
should
automatically
produce
multiple runs
for a given
density
You can pull
the command
center open by
clicking and
dragging here
Turn off
“view updates”
and the model
will run
MUCH
faster
•  Just In case you could not get the code to
work
How Do I Download
Modified Fire Model?
•  To Download the model from the course
webpage:
http://computationallegalstudies.com/icpsr-class /
•  Look for Fire Automation Part 1
•  You Might Say … If I could just automate
this why did we do this by hand?
•  Fair enough … but this provides real
appreciation of automation
•  reflect upon other things we are doing in
the social sciences that would benefit from
automation …
RE Homework Assign #1
Automated Analysis
of Model Runs
Part II
T-1000
•  Previous method is very quick but it is a bit
unwieldy
•  Ideally we could:
– (a) control how many times the model will run
per density setting
– (b) calculate the average % burned under
each density setting
Next Step in Automation
•  Let’s modify the fire model so it will do this.
•  Clear our previous changes by Reopening
the original version of the Fire Model from
the models library
Next Step in Automation
•  Our modified model will allow user to
select an interval of density settings to test
– the amount of times the model should run for
each selected density
–  will also return the average percentage of the
forest burned for each density setting.
Next Step in Automation
•  delete the ‘density’ slider and replace it
with two sliders called ‘mindensity’ and
‘maxdensity’
•  This will provide the user a way to specify
the interval of densities they wish to test.
Changing the Sliders
(1) Click the
“add button”
and select
a slider
Deleting / Adding
Sliders
(2) Set it up
exactly like the
current
“density” slider
(3) Add Both the
“Max-Density”
And
“Min-Density
Slider
Deleting / Adding
Sliders
(4) Delete the
Original Density
Slider by Right
Click
Here It is
on
a PC
•  Because we have not yet changed the
code, the program will warn us that the
variable ‘density’ is now undefined.
•  When it shows you this, replace ‘density’
with ‘mindensity’ in the code
Next Step in Automation
•  When adding the sliders, remember to put
a % in the Units box.
•  Again, you can edit any slider by right
clicking it (crtl + click on Mac)
Fixing the Sliders
•  Now let’s add an Input Box, so the user
can put the number of times they want the
model to run per density setting.
•  Right click on any of the white portion of
the interface and select Input.
Adding an Input Box
•  The program will now allow you to give a
title to the Input box and select what type
of input will go into it.
•  Give the box the title
“RunsPerDensitySetting” and select
number from the draw down menu called
‘Type’.
Naming an Input Box
•  This will create a variable called
‘RunsPerDensitySetting’, which will
determine how many times the model
should run for each of the user’s selected
density settings.
“RunsPerDensitySetting”
•  The Interface should now look like the
following slide:
•  Note: this text is merely for the tutorial
purposes and is not required
Our New Interface
Here is our
new
Button
Syncing the Code
•  We need to sync the front end interface
with backend code
•  Goal: allow user to select an interval for
analysis
•  In this case, the density of the forest and
the corresponding “percent-burned”
Two Major Loops
•  With a few adjustments we will be able to
create two major loops
•  Loop 1: Sweeps through the density range
selected by the enduser
•  Here end user want to evaluate
range 50-65
•  Loop 2: Run the model for the number of
iterations that are selected by the enduser
•  Here end user wants to do 5 runs per
density setting
Two Major Loops
•  First, copy all of the ‘to setup’ procedure
and paste it below the current one. Don’t
delete the old one!
•  Change the procedure’s name to ‘to setup-
experiment.’
The Mechanics of Syncing
the Code
•  In the ‘to setup-experiment’ procedure,
change the ‘clear-all’ command to ‘ct cp’
•  CT = Clear Turtles
•  CP = Clear Patches
The Mechanics of Syncing
the Code
change clear-
all to ct cp
•  By Switching out ‘Clear-all’ for the “ct cp”
the program will not zero out variables
when it finishes
The Mechanics of Syncing
the Code
we will create a count of:
(a) how many times the program has run per
density setting
(b) a variable that will sum up the percent
burned.
The Mechanics of Syncing
the Code
•  The last edits will be to the ‘to go’
procedure.
•  next couple of slides will walk us through
how to add the code as well as an
explanation of what the modifications will
do.
The Mechanics of Syncing
the Code
•  First we will add an ifelse conditional
under ‘to go’ and before ‘if not any?
turtles’.
The “IfElse” Conditional
•  An ifelse conditional has two components,
the part that is executed when the if
conditional is true, and the part executed
when it is not true.
•  These two parts are included in two pairs
of brackets.
The “IfElse” Conditional
•  Here is a pseudo code example:
– ifelse it is raining
– [bring an umbrella] (this is the “If”)
– [don’t bring umbrella] (this is the “else”)
•  Do not separate the ‘if’ from the ‘else’
The “IfElse” Conditional
•  The following slides with modifications will
show the old code in white, and the new
code in red.
The “IfElse” Conditional
All Modifications
are in Red
•  to go
ifelse mindensity <= maxdensity [
if not any? Turtles
•  Here is the modified version of
“to go”
•  Now add the end bracket after ‘tick’ near
the end of the program.
The “IfElse” Conditional
Modifications
•  tick
•  ]
•  end
•  After the end bracket, add the ‘else’
portion of the ifelse.
•  Remember, do not write the word ‘else’
before the brackets…
Modifications
•  tick
•  ]
•  [ output-print (word "End of Experiment")
stop ]
•  end
Modifications
•  The “ifelse” conditional will create a loop
that will ensure the program runs through
all the user’s selected density settings by
adding 1 to the variable ‘mindensity’ each
time it completes the loop.
The Key idea of ifelse
•  Once ‘mindensity’ completes the run for
the last density setting (‘maxdensity’) the if
conditional (mindensity <= maxdensity) will
no longer be true
•  Thus, the program will go to the else
brackets and execute the stop running
command.
Just to Reiterate
•  Next, under the ‘if not any? turtles’
conditional we will remove the stop
command and replace it with a while loop.
•  This loop will output the percent burned
during a given run, as well as sum up the
percent burned during the runs under a
given density setting.
The While Loop
•  A while loop is like an if conditional, except
the condition is kept inside a bracket in
addition to the commands that will be
executed if the conditional is true.
•  The while loop continues to execute the
commands as long as the conditional is
true.
The While Loop
while loops
•  Here is a pseudo code example:
– while [it is raining]
– [bring and use an umbrella]
•  Together with “If”, “ifelse” and the “for
loop” -- “While Loops” are very powerful
tools in the programmers tool kit
•  You can specify how many times the loop
should repeat a set of commands by
creating a variable that counts how many
times the program has completed the loop.
while loops
•  You can then tell the program to run the
while loop until the variable counts up to a
number
•  The variable we will use will be called
‘loopcounter’.
while loops
Back to Modifications
•  Now we will add the while loop.
•  If you haven’t already, delete ‘stop’ under
‘if not any? turtles’ and hit ‘Enter’ a few
times.
•  Then add the following…
Here is the New Code
Modifications
•  The previous while loop uses two
variables that have not yet been specified.
•  Add ‘loopcounter’ and ‘average’ to the
global variables
Modifications
•  Add ‘loopcounter’ and ‘average’ to the
global variables at the top of the page
•  Lastly, we will add an “if” conditional that
will calculate and output the average
percent burned for a given density setting
•  Additionally, it will clear everything for the
next density setting runs.
The “if” conditional
•  This will add 1 to the ‘mindensity’ variable,
so that our original “ifelse” conditional can
check if there are more settings to test.
The “if” conditional
•  Add the following directly under the while
loop but still inside the brackets from the
‘if not any? turtles’ conditional…
The Final
Product
•  The prior Slide is a view of what the ‘to go’
procedure should look like
•  remember that the variables ‘loopcounter’
and ‘average’ should have also been
added to the global variables at the top of
the page.
The Final Product
•  Just In case you could not get the code to
work
How Do I Download
Modified Fire Model?
•  To Download the perfected model from the
course webpage
http://computationallegalstudies.com/icpsr-class /
•  Look for Fire Automation Part 2
Running the Model
•  Now that we are finished, let’s return to the
interface and run the model for a few
density settings.
•  Select the minimum and maximum values
for the interval of densities you wish to test
using the sliders.
Running the Model
•  Assume we wanted to
evaluate density values
between 55-65
•  Set the sliders
•  Type in the number of desired
models runs
Now Click
(1) Setup
(2) Go
Output appears
in the
command
center
Output appears
in the
command
center
Drag the
command
center open to
see the output
Turn Off “view
updates”
To increase
speed
•  With the code modifications, it certainly
becomes easier to get data on averages.
•  But what if we were interested in more
than just the average, such as
distributional data about the outcomes?
Exploring the new model
•  Many of important lessons that agent
based models teach us can be boiled
down into a warning not to assume
individuals can be described by the
average outcome or characteristics of a
group.
Limits of the new model
•  It would be better if we could get data from
all the runs and analyze it using statistical
software outside Netlogo.
Limits of the new model

Más contenido relacionado

Destacado

ICPSR - Complex Systems Models in the Social Sciences - Lecture 7 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 7 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 7 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 7 - Professor...
Daniel Katz
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
Daniel Katz
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 4 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 4 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 4 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 4 - Professor...
Daniel Katz
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 5 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 5 - Profe...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 5 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 5 - Profe...
Daniel Katz
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...
Daniel Katz
 
Complex Systems Computing - Webscraping - Bonus Module
Complex Systems Computing - Webscraping - Bonus ModuleComplex Systems Computing - Webscraping - Bonus Module
Complex Systems Computing - Webscraping - Bonus Module
Daniel Katz
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
Daniel Katz
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 8 and 9 - Pro...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 8 and 9 - Pro...ICPSR - Complex Systems Models in the Social Sciences - Lecture 8 and 9 - Pro...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 8 and 9 - Pro...
Daniel Katz
 
ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Profe...ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Profe...
Daniel Katz
 
Empresa de jehimi salva
Empresa de jehimi salvaEmpresa de jehimi salva
Empresa de jehimi salva
salva15517288
 
Presentation @ 24th International Conference on Legal Knowledge and Informati...
Presentation @ 24th International Conference on Legal Knowledge and Informati...Presentation @ 24th International Conference on Legal Knowledge and Informati...
Presentation @ 24th International Conference on Legal Knowledge and Informati...
Daniel Katz
 
Tobacco control in china progress barriers and challenges
Tobacco control in china   progress barriers and challengesTobacco control in china   progress barriers and challenges
Tobacco control in china progress barriers and challenges
Zhuo Chen
 
What is Computational Legal Studies? Presentation @ University of Houston - ...
What is Computational Legal Studies?  Presentation @ University of Houston - ...What is Computational Legal Studies?  Presentation @ University of Houston - ...
What is Computational Legal Studies? Presentation @ University of Houston - ...
Daniel Katz
 
Sinks Method Paper Presentation @ Duke Political Networks Conference 2010
Sinks Method Paper Presentation @ Duke Political Networks Conference 2010Sinks Method Paper Presentation @ Duke Political Networks Conference 2010
Sinks Method Paper Presentation @ Duke Political Networks Conference 2010
Daniel Katz
 
Thomas Schelling Segregation Model - An Exercise in Mapping the Dependencies ...
Thomas Schelling Segregation Model - An Exercise in Mapping the Dependencies ...Thomas Schelling Segregation Model - An Exercise in Mapping the Dependencies ...
Thomas Schelling Segregation Model - An Exercise in Mapping the Dependencies ...
Daniel Katz
 

Destacado (20)

ICPSR - Complex Systems Models in the Social Sciences - Lecture 7 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 7 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 7 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 7 - Professor...
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 4 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 4 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 4 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 4 - Professor...
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 5 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 5 - Profe...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 5 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 5 - Profe...
 
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Lab Session 9 - Profe...
 
Complex Systems Computing - Webscraping - Bonus Module
Complex Systems Computing - Webscraping - Bonus ModuleComplex Systems Computing - Webscraping - Bonus Module
Complex Systems Computing - Webscraping - Bonus Module
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 6 - Professor...
 
ICPSR - Complex Systems Models in the Social Sciences - Lecture 8 and 9 - Pro...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 8 and 9 - Pro...ICPSR - Complex Systems Models in the Social Sciences - Lecture 8 and 9 - Pro...
ICPSR - Complex Systems Models in the Social Sciences - Lecture 8 and 9 - Pro...
 
ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Profe...ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Profe...
ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Profe...
 
Empresa de jehimi salva
Empresa de jehimi salvaEmpresa de jehimi salva
Empresa de jehimi salva
 
Using legal challenges, Kirstie Douse
Using legal challenges, Kirstie Douse Using legal challenges, Kirstie Douse
Using legal challenges, Kirstie Douse
 
Presentation @ 24th International Conference on Legal Knowledge and Informati...
Presentation @ 24th International Conference on Legal Knowledge and Informati...Presentation @ 24th International Conference on Legal Knowledge and Informati...
Presentation @ 24th International Conference on Legal Knowledge and Informati...
 
Coding
CodingCoding
Coding
 
Tobacco control in china progress barriers and challenges
Tobacco control in china   progress barriers and challengesTobacco control in china   progress barriers and challenges
Tobacco control in china progress barriers and challenges
 
What is Computational Legal Studies? Presentation @ University of Houston - ...
What is Computational Legal Studies?  Presentation @ University of Houston - ...What is Computational Legal Studies?  Presentation @ University of Houston - ...
What is Computational Legal Studies? Presentation @ University of Houston - ...
 
Sinks Method Paper Presentation @ Duke Political Networks Conference 2010
Sinks Method Paper Presentation @ Duke Political Networks Conference 2010Sinks Method Paper Presentation @ Duke Political Networks Conference 2010
Sinks Method Paper Presentation @ Duke Political Networks Conference 2010
 
Encuesta informatica
Encuesta informaticaEncuesta informatica
Encuesta informatica
 
Go Forth And Code
Go Forth And CodeGo Forth And Code
Go Forth And Code
 
Technology, Data and Computation Session @ The World Bank - Law, Justice, and...
Technology, Data and Computation Session @ The World Bank - Law, Justice, and...Technology, Data and Computation Session @ The World Bank - Law, Justice, and...
Technology, Data and Computation Session @ The World Bank - Law, Justice, and...
 
Thomas Schelling Segregation Model - An Exercise in Mapping the Dependencies ...
Thomas Schelling Segregation Model - An Exercise in Mapping the Dependencies ...Thomas Schelling Segregation Model - An Exercise in Mapping the Dependencies ...
Thomas Schelling Segregation Model - An Exercise in Mapping the Dependencies ...
 

Similar a ICPSR - Complex Systems Models in the Social Sciences - Lab Session 6 - Professor Daniel Martin Katz

CODE TUNINGtertertertrtryryryryrtytrytrtry
CODE TUNINGtertertertrtryryryryrtytrytrtryCODE TUNINGtertertertrtryryryryrtytrytrtry
CODE TUNINGtertertertrtryryryryrtytrytrtry
kapib57390
 
classVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptxclassVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptx
ssusere336f4
 
Assignment 1 Hypothetical Machine SimulatorCSci 430 Int.docx
Assignment 1  Hypothetical Machine SimulatorCSci 430 Int.docxAssignment 1  Hypothetical Machine SimulatorCSci 430 Int.docx
Assignment 1 Hypothetical Machine SimulatorCSci 430 Int.docx
jane3dyson92312
 
ICPSR - Complex Systems Computing - Session 7 - 2012
ICPSR - Complex Systems Computing - Session 7 - 2012ICPSR - Complex Systems Computing - Session 7 - 2012
ICPSR - Complex Systems Computing - Session 7 - 2012
Daniel Katz
 
OverviewAssignment 1 Hypothetical Machine SimulatorCSci 43.docx
OverviewAssignment 1  Hypothetical Machine SimulatorCSci 43.docxOverviewAssignment 1  Hypothetical Machine SimulatorCSci 43.docx
OverviewAssignment 1 Hypothetical Machine SimulatorCSci 43.docx
honey690131
 
Notes2
Notes2Notes2
Notes2
hccit
 
Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!
Luigi Vanfretti
 

Similar a ICPSR - Complex Systems Models in the Social Sciences - Lab Session 6 - Professor Daniel Martin Katz (20)

cnn ppt.pptx
cnn ppt.pptxcnn ppt.pptx
cnn ppt.pptx
 
12. Parallel Algorithms.pptx
12. Parallel Algorithms.pptx12. Parallel Algorithms.pptx
12. Parallel Algorithms.pptx
 
CODE TUNINGtertertertrtryryryryrtytrytrtry
CODE TUNINGtertertertrtryryryryrtytrytrtryCODE TUNINGtertertertrtryryryryrtytrytrtry
CODE TUNINGtertertertrtryryryryrtytrytrtry
 
Mlcc #4
Mlcc #4Mlcc #4
Mlcc #4
 
classVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptxclassVII_Coding_Teacher_Presentation.pptx
classVII_Coding_Teacher_Presentation.pptx
 
Assignment 1 Hypothetical Machine SimulatorCSci 430 Int.docx
Assignment 1  Hypothetical Machine SimulatorCSci 430 Int.docxAssignment 1  Hypothetical Machine SimulatorCSci 430 Int.docx
Assignment 1 Hypothetical Machine SimulatorCSci 430 Int.docx
 
ICPSR - Complex Systems Computing - Session 7 - 2012
ICPSR - Complex Systems Computing - Session 7 - 2012ICPSR - Complex Systems Computing - Session 7 - 2012
ICPSR - Complex Systems Computing - Session 7 - 2012
 
08 neural networks
08 neural networks08 neural networks
08 neural networks
 
Infrastructure as Code, Theory Crash Course
Infrastructure as Code, Theory Crash CourseInfrastructure as Code, Theory Crash Course
Infrastructure as Code, Theory Crash Course
 
Software + Babies
Software + BabiesSoftware + Babies
Software + Babies
 
CPP04 - Selection
CPP04 - SelectionCPP04 - Selection
CPP04 - Selection
 
Introduction to c first week slides
Introduction to c first week slidesIntroduction to c first week slides
Introduction to c first week slides
 
OverviewAssignment 1 Hypothetical Machine SimulatorCSci 43.docx
OverviewAssignment 1  Hypothetical Machine SimulatorCSci 43.docxOverviewAssignment 1  Hypothetical Machine SimulatorCSci 43.docx
OverviewAssignment 1 Hypothetical Machine SimulatorCSci 43.docx
 
Notes2
Notes2Notes2
Notes2
 
CPP10 - Debugging
CPP10 - DebuggingCPP10 - Debugging
CPP10 - Debugging
 
04 performance
04 performance04 performance
04 performance
 
Velocity 2015: Building Self-Healing Systems
Velocity 2015: Building Self-Healing SystemsVelocity 2015: Building Self-Healing Systems
Velocity 2015: Building Self-Healing Systems
 
Velocity 2015 building self healing systems (slide share version)
Velocity 2015 building self healing systems (slide share version)Velocity 2015 building self healing systems (slide share version)
Velocity 2015 building self healing systems (slide share version)
 
Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!Hands-on-OpenIPSL.org using OpenModelica!
Hands-on-OpenIPSL.org using OpenModelica!
 
Ansible module development 101
Ansible module development 101Ansible module development 101
Ansible module development 101
 

Más de Daniel Katz

Más de Daniel Katz (20)

Legal Analytics versus Empirical Legal Studies - or - Causal Inference vs Pre...
Legal Analytics versus Empirical Legal Studies - or - Causal Inference vs Pre...Legal Analytics versus Empirical Legal Studies - or - Causal Inference vs Pre...
Legal Analytics versus Empirical Legal Studies - or - Causal Inference vs Pre...
 
Can Law Librarians Help Law Become More Data Driven ? An Open Question in Ne...
Can Law Librarians Help Law Become More Data Driven ?  An Open Question in Ne...Can Law Librarians Help Law Become More Data Driven ?  An Open Question in Ne...
Can Law Librarians Help Law Become More Data Driven ? An Open Question in Ne...
 
Why We Are Open Sourcing ContraxSuite and Some Thoughts About Legal Tech and ...
Why We Are Open Sourcing ContraxSuite and Some Thoughts About Legal Tech and ...Why We Are Open Sourcing ContraxSuite and Some Thoughts About Legal Tech and ...
Why We Are Open Sourcing ContraxSuite and Some Thoughts About Legal Tech and ...
 
Fin (Legal) Tech – Law’s Future from Finance’s Past (Some Thoughts About the ...
Fin (Legal) Tech – Law’s Future from Finance’s Past (Some Thoughts About the ...Fin (Legal) Tech – Law’s Future from Finance’s Past (Some Thoughts About the ...
Fin (Legal) Tech – Law’s Future from Finance’s Past (Some Thoughts About the ...
 
Exploring the Physical Properties of Regulatory Ecosystems - Professors Danie...
Exploring the Physical Properties of Regulatory Ecosystems - Professors Danie...Exploring the Physical Properties of Regulatory Ecosystems - Professors Danie...
Exploring the Physical Properties of Regulatory Ecosystems - Professors Danie...
 
Law + Complexity & Prediction: Toward a Characterization of Legal Systems as ...
Law + Complexity & Prediction: Toward a Characterization of Legal Systems as ...Law + Complexity & Prediction: Toward a Characterization of Legal Systems as ...
Law + Complexity & Prediction: Toward a Characterization of Legal Systems as ...
 
Building Your Personal (Legal) Brand - Some Thoughts for Law Students and Oth...
Building Your Personal (Legal) Brand - Some Thoughts for Law Students and Oth...Building Your Personal (Legal) Brand - Some Thoughts for Law Students and Oth...
Building Your Personal (Legal) Brand - Some Thoughts for Law Students and Oth...
 
Measure Twice, Cut Once - Solving the Legal Profession Biggest Challenges Tog...
Measure Twice, Cut Once - Solving the Legal Profession Biggest Challenges Tog...Measure Twice, Cut Once - Solving the Legal Profession Biggest Challenges Tog...
Measure Twice, Cut Once - Solving the Legal Profession Biggest Challenges Tog...
 
Artificial Intelligence and Law - 
A Primer
Artificial Intelligence and Law - 
A Primer Artificial Intelligence and Law - 
A Primer
Artificial Intelligence and Law - 
A Primer
 
Machine Learning as a Service: #MLaaS, Open Source and the Future of (Legal) ...
Machine Learning as a Service: #MLaaS, Open Source and the Future of (Legal) ...Machine Learning as a Service: #MLaaS, Open Source and the Future of (Legal) ...
Machine Learning as a Service: #MLaaS, Open Source and the Future of (Legal) ...
 
LexPredict - Empowering the Future of Legal Decision Making
LexPredict - Empowering the Future of Legal Decision MakingLexPredict - Empowering the Future of Legal Decision Making
LexPredict - Empowering the Future of Legal Decision Making
 
{Law, Tech, Design, Delivery} Observations Regarding Innovation in the Legal ...
{Law, Tech, Design, Delivery} Observations Regarding Innovation in the Legal ...{Law, Tech, Design, Delivery} Observations Regarding Innovation in the Legal ...
{Law, Tech, Design, Delivery} Observations Regarding Innovation in the Legal ...
 
Legal Analytics Course - Class 11 - Network Analysis and Law - Professors Dan...
Legal Analytics Course - Class 11 - Network Analysis and Law - Professors Dan...Legal Analytics Course - Class 11 - Network Analysis and Law - Professors Dan...
Legal Analytics Course - Class 11 - Network Analysis and Law - Professors Dan...
 
Legal Analytics Course - Class 12 - Data Preprocessing using dPlyR - Professo...
Legal Analytics Course - Class 12 - Data Preprocessing using dPlyR - Professo...Legal Analytics Course - Class 12 - Data Preprocessing using dPlyR - Professo...
Legal Analytics Course - Class 12 - Data Preprocessing using dPlyR - Professo...
 
Legal Analytics Course - Class 10 - Information Visualization + DataViz in R ...
Legal Analytics Course - Class 10 - Information Visualization + DataViz in R ...Legal Analytics Course - Class 10 - Information Visualization + DataViz in R ...
Legal Analytics Course - Class 10 - Information Visualization + DataViz in R ...
 
Legal Analytics Course - Class #4 - Github and RMarkdown Tutorial - Professor...
Legal Analytics Course - Class #4 - Github and RMarkdown Tutorial - Professor...Legal Analytics Course - Class #4 - Github and RMarkdown Tutorial - Professor...
Legal Analytics Course - Class #4 - Github and RMarkdown Tutorial - Professor...
 
Legal Analytics Course - Class 9 - Clustering Algorithms (K-Means & Hierarch...
Legal Analytics Course - Class 9 -  Clustering Algorithms (K-Means & Hierarch...Legal Analytics Course - Class 9 -  Clustering Algorithms (K-Means & Hierarch...
Legal Analytics Course - Class 9 - Clustering Algorithms (K-Means & Hierarch...
 
Legal Analytics Course - Class 8 - Introduction to Random Forests and Ensembl...
Legal Analytics Course - Class 8 - Introduction to Random Forests and Ensembl...Legal Analytics Course - Class 8 - Introduction to Random Forests and Ensembl...
Legal Analytics Course - Class 8 - Introduction to Random Forests and Ensembl...
 
Legal Analytics Course - Class 7 - Binary Classification with Decision Tree L...
Legal Analytics Course - Class 7 - Binary Classification with Decision Tree L...Legal Analytics Course - Class 7 - Binary Classification with Decision Tree L...
Legal Analytics Course - Class 7 - Binary Classification with Decision Tree L...
 
Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...
Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...
Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...
 

Último

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Último (20)

Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 

ICPSR - Complex Systems Models in the Social Sciences - Lab Session 6 - Professor Daniel Martin Katz

  • 1. Introduction to Computing for Complex Systems (Lab Session 6)
  • 2. Goals For Today Quick Review of Old Material Automation I --- Run Experiment Automation II --- If, Ifelse & While loops
  • 4. The Flocking Model simple behavioral rules local interaction between agents can produce behavior that appears to have a top down / command & control structure +
  • 7. Parameter Sweeps? We would like to be able to evaluate all possible parameter values with all possible parameter values 100 doves 100 hawks 100 retaliators 10 values 10 costs 100 reproduce-thresholds 100 init-energies 100 energy-time-thresholds x at least say 25-50 values per parameter configuration to get some sort of a statistical distribution 100,000,000,000,000 However, this is going to be non-trivial matter Even for a limited set of parameter configurations, some sort of automation is going to be needed
  • 8. Automated Analysis of Model Runs Part I T-800
  • 9. •  We have demonstrated automation is useful but … •  how do actually we do It? Automated Analysis of Model Runs
  • 10. •  We Will Highlight 3 ways to undertake automation: – Run Experiment button – Handwritten loops – Behavior Space Automated Analysis of Model Runs
  • 11. •  Please open the Forest Fire model •  In the Models Library •  Fire model is in Earth Science Run Experiment
  • 12. Single Variable Models •  The Forest Fire model uses one variable, the density of the trees, to model the spread of a fire. •  It will be fairly easy for us to “sweep the parameter space” in this model, since there is only one variable.
  • 13. •  Let’s edit the Forest Fire model so we can see the output of each run. •  Go to the “to go” procedure and replace the [stop] after “if not any? turtles” with the following three lines… Single Variable Models
  • 14. Replace [stop] and Insert new code Default version new
  • 15. Replace [stop] and Insert new code Default version new Note: Removing Stop will cause the loop to run infinitely
  • 16. Here is the Modified “to Go” Procedures
  • 17. The Payoff •  These edits will output the percent of the forest that burned during each run of the model and the density of the trees during that run.
  • 18. •  The output will appear in the Command Center at the bottom of the screen. •  Go ahead and run the model a few times… The Payoff
  • 19. If you made the proper modification it should automatically produce multiple runs for a given density
  • 20. You can pull the command center open by clicking and dragging here
  • 21. Turn off “view updates” and the model will run MUCH faster
  • 22. •  Just In case you could not get the code to work How Do I Download Modified Fire Model? •  To Download the model from the course webpage: http://computationallegalstudies.com/icpsr-class / •  Look for Fire Automation Part 1
  • 23. •  You Might Say … If I could just automate this why did we do this by hand? •  Fair enough … but this provides real appreciation of automation •  reflect upon other things we are doing in the social sciences that would benefit from automation … RE Homework Assign #1
  • 24. Automated Analysis of Model Runs Part II T-1000
  • 25. •  Previous method is very quick but it is a bit unwieldy •  Ideally we could: – (a) control how many times the model will run per density setting – (b) calculate the average % burned under each density setting Next Step in Automation
  • 26. •  Let’s modify the fire model so it will do this. •  Clear our previous changes by Reopening the original version of the Fire Model from the models library Next Step in Automation
  • 27. •  Our modified model will allow user to select an interval of density settings to test – the amount of times the model should run for each selected density –  will also return the average percentage of the forest burned for each density setting. Next Step in Automation
  • 28. •  delete the ‘density’ slider and replace it with two sliders called ‘mindensity’ and ‘maxdensity’ •  This will provide the user a way to specify the interval of densities they wish to test. Changing the Sliders
  • 29. (1) Click the “add button” and select a slider Deleting / Adding Sliders (2) Set it up exactly like the current “density” slider
  • 30. (3) Add Both the “Max-Density” And “Min-Density Slider Deleting / Adding Sliders (4) Delete the Original Density Slider by Right Click
  • 32. •  Because we have not yet changed the code, the program will warn us that the variable ‘density’ is now undefined. •  When it shows you this, replace ‘density’ with ‘mindensity’ in the code Next Step in Automation
  • 33.
  • 34. •  When adding the sliders, remember to put a % in the Units box. •  Again, you can edit any slider by right clicking it (crtl + click on Mac) Fixing the Sliders
  • 35. •  Now let’s add an Input Box, so the user can put the number of times they want the model to run per density setting. •  Right click on any of the white portion of the interface and select Input. Adding an Input Box
  • 36.
  • 37. •  The program will now allow you to give a title to the Input box and select what type of input will go into it. •  Give the box the title “RunsPerDensitySetting” and select number from the draw down menu called ‘Type’. Naming an Input Box
  • 38.
  • 39. •  This will create a variable called ‘RunsPerDensitySetting’, which will determine how many times the model should run for each of the user’s selected density settings. “RunsPerDensitySetting”
  • 40. •  The Interface should now look like the following slide: •  Note: this text is merely for the tutorial purposes and is not required Our New Interface
  • 42. Syncing the Code •  We need to sync the front end interface with backend code •  Goal: allow user to select an interval for analysis •  In this case, the density of the forest and the corresponding “percent-burned”
  • 43. Two Major Loops •  With a few adjustments we will be able to create two major loops •  Loop 1: Sweeps through the density range selected by the enduser •  Here end user want to evaluate range 50-65
  • 44. •  Loop 2: Run the model for the number of iterations that are selected by the enduser •  Here end user wants to do 5 runs per density setting Two Major Loops
  • 45. •  First, copy all of the ‘to setup’ procedure and paste it below the current one. Don’t delete the old one! •  Change the procedure’s name to ‘to setup- experiment.’ The Mechanics of Syncing the Code
  • 46.
  • 47. •  In the ‘to setup-experiment’ procedure, change the ‘clear-all’ command to ‘ct cp’ •  CT = Clear Turtles •  CP = Clear Patches The Mechanics of Syncing the Code
  • 49. •  By Switching out ‘Clear-all’ for the “ct cp” the program will not zero out variables when it finishes The Mechanics of Syncing the Code
  • 50. we will create a count of: (a) how many times the program has run per density setting (b) a variable that will sum up the percent burned. The Mechanics of Syncing the Code
  • 51. •  The last edits will be to the ‘to go’ procedure. •  next couple of slides will walk us through how to add the code as well as an explanation of what the modifications will do. The Mechanics of Syncing the Code
  • 52. •  First we will add an ifelse conditional under ‘to go’ and before ‘if not any? turtles’. The “IfElse” Conditional
  • 53. •  An ifelse conditional has two components, the part that is executed when the if conditional is true, and the part executed when it is not true. •  These two parts are included in two pairs of brackets. The “IfElse” Conditional
  • 54. •  Here is a pseudo code example: – ifelse it is raining – [bring an umbrella] (this is the “If”) – [don’t bring umbrella] (this is the “else”) •  Do not separate the ‘if’ from the ‘else’ The “IfElse” Conditional
  • 55. •  The following slides with modifications will show the old code in white, and the new code in red. The “IfElse” Conditional
  • 56. All Modifications are in Red •  to go ifelse mindensity <= maxdensity [ if not any? Turtles •  Here is the modified version of “to go”
  • 57. •  Now add the end bracket after ‘tick’ near the end of the program. The “IfElse” Conditional
  • 59. •  After the end bracket, add the ‘else’ portion of the ifelse. •  Remember, do not write the word ‘else’ before the brackets… Modifications
  • 60. •  tick •  ] •  [ output-print (word "End of Experiment") stop ] •  end Modifications
  • 61. •  The “ifelse” conditional will create a loop that will ensure the program runs through all the user’s selected density settings by adding 1 to the variable ‘mindensity’ each time it completes the loop. The Key idea of ifelse
  • 62. •  Once ‘mindensity’ completes the run for the last density setting (‘maxdensity’) the if conditional (mindensity <= maxdensity) will no longer be true •  Thus, the program will go to the else brackets and execute the stop running command. Just to Reiterate
  • 63. •  Next, under the ‘if not any? turtles’ conditional we will remove the stop command and replace it with a while loop. •  This loop will output the percent burned during a given run, as well as sum up the percent burned during the runs under a given density setting. The While Loop
  • 64. •  A while loop is like an if conditional, except the condition is kept inside a bracket in addition to the commands that will be executed if the conditional is true. •  The while loop continues to execute the commands as long as the conditional is true. The While Loop
  • 65. while loops •  Here is a pseudo code example: – while [it is raining] – [bring and use an umbrella] •  Together with “If”, “ifelse” and the “for loop” -- “While Loops” are very powerful tools in the programmers tool kit
  • 66. •  You can specify how many times the loop should repeat a set of commands by creating a variable that counts how many times the program has completed the loop. while loops
  • 67. •  You can then tell the program to run the while loop until the variable counts up to a number •  The variable we will use will be called ‘loopcounter’. while loops
  • 68. Back to Modifications •  Now we will add the while loop. •  If you haven’t already, delete ‘stop’ under ‘if not any? turtles’ and hit ‘Enter’ a few times. •  Then add the following…
  • 69. Here is the New Code
  • 70. Modifications •  The previous while loop uses two variables that have not yet been specified. •  Add ‘loopcounter’ and ‘average’ to the global variables
  • 71. Modifications •  Add ‘loopcounter’ and ‘average’ to the global variables at the top of the page
  • 72. •  Lastly, we will add an “if” conditional that will calculate and output the average percent burned for a given density setting •  Additionally, it will clear everything for the next density setting runs. The “if” conditional
  • 73. •  This will add 1 to the ‘mindensity’ variable, so that our original “ifelse” conditional can check if there are more settings to test. The “if” conditional
  • 74. •  Add the following directly under the while loop but still inside the brackets from the ‘if not any? turtles’ conditional…
  • 76. •  The prior Slide is a view of what the ‘to go’ procedure should look like •  remember that the variables ‘loopcounter’ and ‘average’ should have also been added to the global variables at the top of the page. The Final Product
  • 77. •  Just In case you could not get the code to work How Do I Download Modified Fire Model? •  To Download the perfected model from the course webpage http://computationallegalstudies.com/icpsr-class / •  Look for Fire Automation Part 2
  • 78. Running the Model •  Now that we are finished, let’s return to the interface and run the model for a few density settings. •  Select the minimum and maximum values for the interval of densities you wish to test using the sliders.
  • 79. Running the Model •  Assume we wanted to evaluate density values between 55-65 •  Set the sliders •  Type in the number of desired models runs
  • 80. Now Click (1) Setup (2) Go Output appears in the command center
  • 82. Drag the command center open to see the output Turn Off “view updates” To increase speed
  • 83. •  With the code modifications, it certainly becomes easier to get data on averages. •  But what if we were interested in more than just the average, such as distributional data about the outcomes? Exploring the new model
  • 84. •  Many of important lessons that agent based models teach us can be boiled down into a warning not to assume individuals can be described by the average outcome or characteristics of a group. Limits of the new model
  • 85. •  It would be better if we could get data from all the runs and analyze it using statistical software outside Netlogo. Limits of the new model