Skip to content

Instantly share code, notes, and snippets.

@stepheneb
Last active January 7, 2020 23:32
Show Gist options
  • Select an option

  • Save stepheneb/1320456 to your computer and use it in GitHub Desktop.

Select an option

Save stepheneb/1320456 to your computer and use it in GitHub Desktop.
NetLogo Fast Bureaucrats model exploring self-organized-criticality (Java Applet).

See live example

source: gist.github.com/gists/1320456

Seth Tisue wrote Bureaucrats-fast a simplified re-write of this model written by Bob Tinker Bureaucrats.v6 exploring Self-Organised Criticality

The mathematics of avalanche size and frequency follows a power law that can be simulated to a first approximation by any system that exhibits self-organized criticality (SOC). In "How Nature Works"" Per Bak reports a simplified model of a sandpile that he, Chao Tang, and Curt Wiesenfeld developed that shows SOC, the so-called BTW model. Bak also mentions that Grassberger describes a representation of this model that is fanciful but equivalent to the BTW model. Imagine an N-by-N grid of office desks and a bureaucrat sitting at each. A folder is randomly assigned to one desk. The bureaucrat does nothing until four or more folders are on his desk at which time he sends one to each of his four nearest neighbors. Any bureaucrat sitting at the edge of this array throws a folder out the window if there is no desk to send it to. Sometimes, adding one folder can cause multiple redistributions of folders as one bureaucrat's actions causes neighbors to exceed three folders, which then ripples through the office. In principle, just adding one new folder might involve redistribution at every desk, sometimes multiple times.

<html>
<head>
<title>Bureaucrats-fast</title>
<style type="text/css">
:link { color: rgb(110,0,110); }
:visited { color: rgb(110,0,110); }
body { margin-left: 5px; font-family: arial, sans-serif; background: white; font-size: 12pt }
p { margin-left: 15px; margin-bottom: 3px }
</style>
</head>
<body>
<p>
<applet code="org.nlogo.lite.Applet"
archive="http://ccl.northwestern.edu/netlogo/5.0RC3/NetLogoLite.jar"
width="751" height="351">
<param name="DefaultModel"
value="http://bl.ocks.org/d/1320456/Bureaucrats-fast.nlogo">
<param name="java_arguments"
value="-Djnlp.packEnabled=true">
</applet>
</p>
<p>powered by <a target="_blank" href="http://ccl.northwestern.edu/netlogo/">NetLogo</a></p>
<p>view/download model file:<a href="Bureaucrats-fast.nlogo">Bureaucrats-fast.nlogo</a></p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment