uchicago.src.repastdemos.regression
Class RegressionOfficeModel

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

public class RegressionOfficeModel
extends SimpleModel

A model illustrating the use of the openforecast regression library.

Version:
$Revision: 1.1 $ $Date: 2005/08/12 20:04:54 $
Author:
Prakash Thimmapuram

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
RegressionOfficeModel()
           
 
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.
 int getLengthOfHistory()
           
 java.lang.String getName()
          Gets the name of this model.
 int getOfficeHeight()
           
 int getOfficeWidth()
           
 double getPolynomimalCoefficient1()
           
 double getPolynomimalCoefficient2()
           
 double getPolynomimalCoefficient3()
           
static void main(java.lang.String[] args)
           
protected  void postStep()
           
protected  void preStep()
           
 void setEmployeeCount(int employeeCount)
           
 void setLengthOfHistory(int lengthOfHistory)
           
 void setOfficeHeight(int officeHeight)
           
 void setOfficeWidth(int officeWidth)
           
 void setPolynomimalCoefficient1(double polynomimalCoefficient1)
           
 void setPolynomimalCoefficient2(double polynomimalCoefficient2)
           
 void setPolynomimalCoefficient3(double polynomimalCoefficient3)
           
 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, 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

RegressionOfficeModel

public RegressionOfficeModel()
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

preStep

protected void preStep()
Overrides:
preStep in class SimpleModel

step

protected void step()
Overrides:
step in class SimpleModel

postStep

protected void postStep()
Overrides:
postStep 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

setPolynomimalCoefficient1

public void setPolynomimalCoefficient1(double polynomimalCoefficient1)
Parameters:
polynomimalCoefficient1 - The polynomimalCoefficient1 to set.

getPolynomimalCoefficient1

public double getPolynomimalCoefficient1()
Returns:
Returns the polynomimalCoefficient1.

setPolynomimalCoefficient2

public void setPolynomimalCoefficient2(double polynomimalCoefficient2)
Parameters:
polynomimalCoefficient2 - The polynomimalCoefficient2 to set.

getPolynomimalCoefficient2

public double getPolynomimalCoefficient2()
Returns:
Returns the polynomimalCoefficient2.

setPolynomimalCoefficient3

public void setPolynomimalCoefficient3(double polynomimalCoefficient3)
Parameters:
polynomimalCoefficient3 - The polynomimalCoefficient3 to set.

getPolynomimalCoefficient3

public double getPolynomimalCoefficient3()
Returns:
Returns the polynomimalCoefficient3.

setLengthOfHistory

public void setLengthOfHistory(int lengthOfHistory)
Parameters:
lengthOfHistory - The lengthOfHistory to set.

getLengthOfHistory

public int getLengthOfHistory()
Returns:
Returns the lengthOfHistory.

main

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