clarion.system
Class Task

java.lang.Object
  extended byclarion.system.Task
Direct Known Subclasses:
TaskAGL, TaskPC, TaskXOR

public abstract class Task
extends java.lang.Object


Field Summary
protected  TaskAgent[] agents
          the agents running simultineously.
protected  Global[] globals
          the global settings of agents.
protected  WriteFile modelDataFile
          the file used to store the simulation data.
protected  int runningAgentNum
          the # of agents running simultineously.
protected  java.lang.String[] settingNames
          the setting names of agents.
 
Constructor Summary
Task()
           
 
Method Summary
 TaskAgent getAgent(int agentIdx)
          Returns a specific agent.
 int getRunningAgentNum()
          Returns the number of agent running simultaneously.
 java.lang.String getSettingName(int agentIdx)
          Returns the setting name for this agent.
 void init()
          initialize the Global object associated with each agent without using GUI.
 void setAgent(int agentIdx, TaskAgent agent)
          Sets a specific agent.
 void setDataFile(WriteFile file)
          Sets the model dats file to store the simulation data.
 void setGlobals(Global[] globals)
          Sets the global settings each agent is associated with.
 void setRunningAgentNum(int num)
          Sets the number of agent running simultaneously.
 void setSettingNames(java.lang.String[] settingNames)
          Sets setting names for running agents.
abstract  void start()
          the start point of simulation of a task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runningAgentNum

protected int runningAgentNum
the # of agents running simultineously.


agents

protected TaskAgent[] agents
the agents running simultineously.


globals

protected Global[] globals
the global settings of agents.


settingNames

protected java.lang.String[] settingNames
the setting names of agents.


modelDataFile

protected WriteFile modelDataFile
the file used to store the simulation data.

Constructor Detail

Task

public Task()
Method Detail

getRunningAgentNum

public int getRunningAgentNum()
Returns the number of agent running simultaneously.


setRunningAgentNum

public void setRunningAgentNum(int num)
Sets the number of agent running simultaneously.


getAgent

public TaskAgent getAgent(int agentIdx)
Returns a specific agent.


setAgent

public void setAgent(int agentIdx,
                     TaskAgent agent)
Sets a specific agent.

Parameters:
agentIdx - the agent index on the agent group.

getSettingName

public java.lang.String getSettingName(int agentIdx)
Returns the setting name for this agent.


setSettingNames

public void setSettingNames(java.lang.String[] settingNames)
Sets setting names for running agents.


setGlobals

public void setGlobals(Global[] globals)
Sets the global settings each agent is associated with.


setDataFile

public void setDataFile(WriteFile file)
Sets the model dats file to store the simulation data.


init

public void init()
initialize the Global object associated with each agent without using GUI.


start

public abstract void start()
the start point of simulation of a task.