uchicago.src.repastdemos.asynchAgents
Class AsynchAgentsModel

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

public class AsynchAgentsModel
extends SimpleModel

A model illustrating the use of the asynchronous agents and schedule.

Version:
$Revision: 1.1 $ $Date: 2005/08/12 20:04:57 $
Author:
Jerry Vos

Field Summary
protected  Office office
           
 
Fields inherited from class uchicago.src.sim.engine.SimpleModel
agentList, autoStep, isGui, name, params, schedule, seed, shuffle, startAt
 
Fields inherited from class uchicago.src.sim.engine.SimModelImpl
descriptors, modelManipulator
 
Constructor Summary
AsynchAgentsModel()
           
 
Method Summary
 void begin()
          Begins a simulation run.
protected  void buildDisplay()
          This builds the display surface for the office
protected  void buildGraphs()
          This builds the error graphs.
 int getEmployeeCount()
           
 java.lang.String[] getInitParam()
          Gets the names of the initial model parameters to set.
 java.lang.String getName()
          Gets the name of this model.
 int getOfficeHeight()
           
 int getOfficeWidth()
           
 int getTasksAssignedPerTick()
           
static void main(java.lang.String[] args)
           
 void setEmployeeCount(int employeeCount)
           
 void setOfficeHeight(int officeHeight)
           
 void setOfficeWidth(int officeWidth)
           
 void setTasksAssignedPerTick(int val)
           
 void setup()
          Sets up the model for the next run, clears out all the old employees and the old displays
protected  void step()
           
 
Methods inherited from class uchicago.src.sim.engine.SimpleModel
atEnd, atPause, buildModel, buildSchedule, getNextDoubleFromTo, getNextIntFromTo, getSchedule, postStep, preStep, run, runAutoStep, setRngSeed, setStoppingTime, setStoppingTime
 
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, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

office

protected Office office
Constructor Detail

AsynchAgentsModel

public AsynchAgentsModel()
Method Detail

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.

Specified by:
getInitParam in interface SimModel
Overrides:
getInitParam in class SimpleModel
Returns:
a String[] of the initial parameter names

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.

Specified by:
begin in interface SimModel
Overrides:
begin in class SimpleModel

buildDisplay

protected void buildDisplay()
This builds the display surface for the office


buildGraphs

protected void buildGraphs()
This builds the error graphs.


setup

public void setup()
Sets up the model for the next run, clears out all the old employees and the old displays

Specified by:
setup in interface SimModel
Overrides:
setup in class SimpleModel

step

protected void step()
Overrides:
step in class SimpleModel

getName

public java.lang.String getName()
Description copied from class: SimpleModel
Gets the name of this model.

Specified by:
getName in interface SimModel
Overrides:
getName in class SimpleModel
Returns:
the name of the model/simulation

getEmployeeCount

public int getEmployeeCount()
Returns:
Returns the number of employees in the office.

setEmployeeCount

public void setEmployeeCount(int employeeCount)
Parameters:
employeeCount - The number of employees in the office.

getOfficeHeight

public int getOfficeHeight()
Returns:
returns the officeHeight

setOfficeHeight

public void setOfficeHeight(int officeHeight)
Parameters:
officeHeight - the officeHeight

getOfficeWidth

public int getOfficeWidth()
Returns:
returns the officeWidth

setOfficeWidth

public void setOfficeWidth(int officeWidth)
Parameters:
officeWidth - the officeWidth

getTasksAssignedPerTick

public int getTasksAssignedPerTick()

setTasksAssignedPerTick

public void setTasksAssignedPerTick(int val)

main

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