uchicago.src.sim.engine
Class RemoteBatchController

java.lang.Object
  extended by uchicago.src.sim.engine.BaseController
      extended by uchicago.src.sim.engine.BatchController
          extended by uchicago.src.sim.engine.RemoteBatchController
All Implemented Interfaces:
IController, SimEventListener, TickCounter

public class RemoteBatchController
extends BatchController

The Controller that handles a single remote model.


Field Summary
protected  long batchCount
           
protected  HomeController control
           
 
Fields inherited from class uchicago.src.sim.engine.BatchController
autoRecording, batchListeners, dynNameList, finished, nameList, nameParam, pArray, recorder, stopped
 
Fields inherited from class uchicago.src.sim.engine.BaseController
done, doStep, executeBegin, exitOnExit, go, isGui, listenerList, model, monitor, params, pauseActionsExecuted, pauseAt, pauseAtAction, pauseSim, persistentObj, runFinished, runThread, schedule, simRun, sleepValue, time
 
Constructor Summary
RemoteBatchController()
          No-arg constructor for making Active
RemoteBatchController(HomeController c)
          Create a RemoteController using a HomeController
 
Method Summary
 java.lang.Object beginRemoteRun()
           
 void exitSim()
          Exits the entire simulation.
 java.lang.Object getPersistentObj(java.lang.Object key)
          retrieve a persistent object
 boolean getPutPersistentObject(java.lang.Object key, java.lang.Object value)
           
 long getRunCount()
          Gets the number of the current batch run
 void putPersistentObj(java.lang.Object key, java.lang.Object val)
          Store a persistent object
 void quit()
           
 void setModel(SimModel model)
          Sets the model to be controlled by this BatchController.
 void setModelClass(java.lang.Class modelClass)
          Instantiate the model
 void setModelClass(java.lang.String modelClass)
          Instantiate the model
protected  void setModelParameters()
           
 void start()
          Starts an individual run of the simulation
 void stopRun()
          Stops an individual run of the simulation, increments the parameters appropriately, and if necessary starts another run.
 
Methods inherited from class uchicago.src.sim.engine.BatchController
addBatchListener, begin, doWriteHeader, endSim, fireBatchEvent, incrementBatchCount, isAutoRecording, isBatch, isGUI, onTickCountUpdate, removeBatchListener, setAutoRecording, setWriteHeader, simEventPerformed
 
Methods inherited from class uchicago.src.sim.engine.BaseController
addSimEventListener, beginModel, fireSimEvent, getCellDepth, getCellHeight, getCellWidth, getCurrentTime, getDefaultModelParameters, getExitOnExit, getModel, getModelParameters, getPauseAt, getRandomSeed, getSchedule, notifyMonitor, pauseSim, removeSimEventListener, setCellDepth, setCellHeight, setCellWidth, setExitOnExit, setPauseAt, setRandomSeed, setSchedule, setupSchedule, startSim, stopSim
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

batchCount

protected long batchCount

control

protected HomeController control
Constructor Detail

RemoteBatchController

public RemoteBatchController()
No-arg constructor for making Active


RemoteBatchController

public RemoteBatchController(HomeController c)
Create a RemoteController using a HomeController

Parameters:
c -
Method Detail

setModel

public void setModel(SimModel model)
Sets the model to be controlled by this BatchController.

Specified by:
setModel in interface IController
Overrides:
setModel in class BatchController
Parameters:
model - the model to be controlled by this BatchController

setModelParameters

protected void setModelParameters()

stopRun

public void stopRun()
Stops an individual run of the simulation, increments the parameters appropriately, and if necessary starts another run.

Overrides:
stopRun in class BatchController

getRunCount

public long getRunCount()
Description copied from class: BatchController
Gets the number of the current batch run

Specified by:
getRunCount in interface IController
Overrides:
getRunCount in class BatchController

start

public void start()
Description copied from class: BatchController
Starts an individual run of the simulation

Overrides:
start in class BatchController

setModelClass

public void setModelClass(java.lang.Class modelClass)
Instantiate the model

Parameters:
modelClass -

setModelClass

public void setModelClass(java.lang.String modelClass)
Instantiate the model

Parameters:
modelClass -

putPersistentObj

public void putPersistentObj(java.lang.Object key,
                             java.lang.Object val)
Store a persistent object

Specified by:
putPersistentObj in interface IController
Overrides:
putPersistentObj in class BaseController
Parameters:
key -
val -

getPersistentObj

public java.lang.Object getPersistentObj(java.lang.Object key)
retrieve a persistent object

Specified by:
getPersistentObj in interface IController
Overrides:
getPersistentObj in class BaseController
Parameters:
key -
Returns:

getPutPersistentObject

public boolean getPutPersistentObject(java.lang.Object key,
                                      java.lang.Object value)

beginRemoteRun

public java.lang.Object beginRemoteRun()
                                throws java.lang.Exception
Throws:
java.lang.Exception

exitSim

public void exitSim()
Description copied from interface: IController
Exits the entire simulation. No more runs can be executed after a simulation has exited.

Specified by:
exitSim in interface IController
Overrides:
exitSim in class BatchController

quit

public void quit()