uchicago.src.repastdemos.jinGirNew
Class JinGirNewModelII

java.lang.Object
  extended by uchicago.src.sim.engine.SimModelImpl
      extended by uchicago.src.repastdemos.jinGirNew.JinGirNewModelII
All Implemented Interfaces:
DescriptorContainer, SimEventProducer, SimModel

public class JinGirNewModelII
extends SimModelImpl

This is an implementation of the second model (model II) described in Jin, Girvan, and Newman, "The Structure of Growing Social Networks." Santa Fe Institute 2001 working paper. This paper can be found on-line at http://www.santafe.edu/sfi/publications/Abstracts/01-06-032abs.html

Their abstract follows:

"We propose some simple models of the growth of social networks, based on three general principles: (1) meetings take place between pairs of individuals at a rate which is high if a pair has one or more mutual friends and low otherwise; (2) acquaintances between pairs of individuals who rarely meet decay over time; (3) there is an upper limit on the number of friendships an individual can maintain. using computer simulations, we find that models that incorporatge all of these features reproduce many of the features of real social networks, including high levels of clustering or network transitivity and strong community structure in which individuals have more links to others within their community than to individuals from other communities."

See the repast/demo/jinGirNew/readme for details on the parameters of this model.

Version:
$Revision: 1.1 $ $Date: 2005/08/12 20:04:52 $

Field Summary
 
Fields inherited from class uchicago.src.sim.engine.SimModelImpl
descriptors, modelManipulator
 
Constructor Summary
JinGirNewModelII()
           
 
Method Summary
 void begin()
          Begins a simulation run.
 void buildDisplay()
           
 void buildModel()
           
 boolean getDegreeHist()
           
 java.lang.String[] getInitParam()
          Gets the names of the initial model parameters to set.
 java.lang.String getLayoutType()
           
 int getMaxDegree()
           
 java.lang.String getName()
          Gets the name of the model/simulation.
 int getNumNodes()
           
 boolean getPlot()
           
 double getRemoveProb()
           
 double getRsub0()
           
 double getRsub1()
           
 Schedule getSchedule()
          Gets the Schedule created by the model.
 int getStartRemoveAfter()
           
 int getUpdateEveryN()
           
 int getWorldXSize()
           
 int getWorldYSize()
           
 void initialAction()
           
static void main(java.lang.String[] args)
           
 void mainAction()
           
 void removeInitialAction()
           
 void setDegreeHist(boolean val)
           
 void setLayoutType(java.lang.String type)
           
 void setMaxDegree(int degree)
           
 void setNumNodes(int n)
           
 void setPlot(boolean val)
           
 void setRemoveProb(double prob)
           
 void setRsub0(double R)
           
 void setRsub1(double R)
           
 void setStartRemoveAfter(int steps)
           
 void setup()
          Prepares a model for a new run, typically by deallocating objects or setting them to some reasonable default.
 void setUpdateEveryN(int updates)
           
 void setWorldXSize(int size)
           
 void setWorldYSize(int size)
           
 
Methods inherited from class uchicago.src.sim.engine.SimModelImpl
addPropertyListener, addSimEventListener, clearMediaProducers, clearPropertyListeners, fireBooleanPropertyEvent, fireEndSim, fireNumericPropertyEvent, fireObjectPropertyEvent, firePauseSim, fireSimEvent, fireStopSim, fireStringPropertyEvent, generateNewSeed, getController, getMediaProducers, getModelManipulator, getParameterDescriptors, getPropertiesValues, getRngSeed, getTickCount, pause, registerDisplaySurface, registerMediaProducer, removePropertyListener, removeSimEventListener, setController, setRngSeed, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JinGirNewModelII

public JinGirNewModelII()
Method Detail

getDegreeHist

public boolean getDegreeHist()

setDegreeHist

public void setDegreeHist(boolean val)

getPlot

public boolean getPlot()

setPlot

public void setPlot(boolean val)

getMaxDegree

public int getMaxDegree()

setMaxDegree

public void setMaxDegree(int degree)

getRsub0

public double getRsub0()

setRsub0

public void setRsub0(double R)

getRsub1

public double getRsub1()

setRsub1

public void setRsub1(double R)

getLayoutType

public java.lang.String getLayoutType()

setLayoutType

public void setLayoutType(java.lang.String type)

setUpdateEveryN

public void setUpdateEveryN(int updates)

getUpdateEveryN

public int getUpdateEveryN()

getRemoveProb

public double getRemoveProb()

setRemoveProb

public void setRemoveProb(double prob)

getStartRemoveAfter

public int getStartRemoveAfter()

setStartRemoveAfter

public void setStartRemoveAfter(int steps)

setNumNodes

public void setNumNodes(int n)

getNumNodes

public int getNumNodes()

getWorldXSize

public int getWorldXSize()

setWorldXSize

public void setWorldXSize(int size)

getWorldYSize

public int getWorldYSize()

setWorldYSize

public void setWorldYSize(int size)

buildModel

public void buildModel()

buildDisplay

public void buildDisplay()

initialAction

public void initialAction()

mainAction

public void mainAction()

removeInitialAction

public void removeInitialAction()

begin

public void begin()
Description copied from interface: SimModel
Begins a simulation run. All initialization, building the model, diplay, etc. should take place here. This method is called whenever the start button (or the step button if the run has not yet begun) is clicked. If running in batch mode this is called to kick off a new simulation run.


setup

public void setup()
Description copied from interface: SimModel
Prepares a model for a new run, typically by deallocating objects or setting them to some reasonable default. Called whenever the setup button is clicked or if operating in batch mode whenever a single run has ended in preparation for the next. Also called when the model is first loaded.


getInitParam

public java.lang.String[] getInitParam()
Description copied from interface: SimModel
Gets the names of the initial model parameters to set. These names must have get and set methods supplied by the model. For example, for the parameter maxAge, the model must have getMaxAge and setMaxAge methods.

Returns:
a String[] of the initial parameter names

getSchedule

public Schedule getSchedule()
Description copied from interface: SimModel
Gets the Schedule created by the model.

Returns:
the schedule created by the model

getName

public java.lang.String getName()
Description copied from interface: SimModel
Gets the name of the model/simulation.

Returns:
the name of the model/simulation

main

public static void main(java.lang.String[] args)