org.cfpm.caves.za
Class SouthAfricaModel.MinerSource

java.lang.Object
  extended by uchicago.src.sim.engine.BasicAction
      extended by org.cfpm.caves.za.SouthAfricaModel.MinerSource
Enclosing class:
SouthAfricaModel

public class SouthAfricaModel.MinerSource
extends uchicago.src.sim.engine.BasicAction

This inner class is a source of miners, i.e. it creates miners and passes them into the system over the course of the simulation. Needs a distribution to determine arrival of miners (schedules itself for the next arrival time) and a distribution to determine how many miners arrive at any given arrival time.


Field Summary
(package private)  cern.jet.random.Normal ageDist
           
(package private)  cern.jet.random.Exponential arrivalDist
           
(package private)  int lastID
           
(package private)  cern.jet.random.Normal numberDist
           
 
Fields inherited from class uchicago.src.sim.engine.BasicAction
INTERVAL_UPDATER, ONE_TIME_UPDATER, updater
 
Constructor Summary
SouthAfricaModel.MinerSource()
          creates a new MinerSource
 
Method Summary
 java.util.ArrayList<org.cfpm.caves.za.Person> createMiners(int numMiners)
          creates the specified number of miners and puts them into the model
 void execute()
           
 
Methods inherited from class uchicago.src.sim.engine.BasicAction
addToGroup, getIntervalTime, getName, getNextTime, reSchedule, setIntervalTime, setName, setNextTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastID

int lastID

arrivalDist

cern.jet.random.Exponential arrivalDist

numberDist

cern.jet.random.Normal numberDist

ageDist

cern.jet.random.Normal ageDist
Constructor Detail

SouthAfricaModel.MinerSource

public SouthAfricaModel.MinerSource()
creates a new MinerSource

Method Detail

createMiners

public java.util.ArrayList<org.cfpm.caves.za.Person> createMiners(int numMiners)
creates the specified number of miners and puts them into the model

Parameters:
numMiners - number of miners to create
Returns:
the list of miners

execute

public void execute()
Specified by:
execute in class uchicago.src.sim.engine.BasicAction