uchicago.src.repastdemos.asynchAgents
Class Employee
java.lang.Object
uchicago.src.sim.network.DefaultNode
uchicago.src.sim.network.DefaultDrawableNode
uchicago.src.sim.engine.AsynchAgent
uchicago.src.repastdemos.asynchAgents.Employee
- All Implemented Interfaces:
- java.io.Serializable, CustomProbeable, IAsynchAgent, Drawable2DGridNode, DrawableNonGridNode, Moveable, NonGridDrawable, Node
public class Employee
- extends AsynchAgent
- implements CustomProbeable
This class represents the employees who perform tasks assigned by the boss.
This agent type is not directly executed by the model itself. When the boss
assigns a tasks to the agent, the agent schedules itself to perform the task.
- Version:
- $Revision: 1.1 $ $Date: 2005/08/12 20:04:57 $
- Author:
- Jerry Vos
- See Also:
- Serialized Form
| Methods inherited from class uchicago.src.sim.engine.AsynchAgent |
clearUtilization, findNextTaskCompletionTime, getAgentList, getDelayMaximum, getDelayMinimum, getID, getModel, getNextAvailableTime, getNextDelay, getRandomDistribution, getUtilization, getUtilizedTime, initialize, scheduleAfterWaiting, scheduleAfterWaiting, scheduleAfterWaiting, scheduleAfterWaiting, scheduleAt, scheduleAt, scheduleAt, scheduleAt, scheduleNow, scheduleNow, scheduleNow, scheduleNow, scheduleWhenAvailable, scheduleWhenAvailable, scheduleWhenAvailable, scheduleWhenAvailable, setAgentList, setDelayMaximum, setDelayMinimum, setID, setModel, setNextAvailableTime, setRandomDistribution, setUtilizedTime |
| Methods inherited from class uchicago.src.sim.network.DefaultDrawableNode |
allowResizing, calcSize, contains, getBorderColor, getBorderWidth, getColor, getFont, getHeight, getLabelColor, getNode, getWidth, getX, getY, setBorderColor, setBorderWidth, setColor, setDrawable, setDrawableNoCopy, setFont, setHeight, setLabelColor, setNodeLabel, setWidth, setX, setX, setY, setY |
| Methods inherited from class uchicago.src.sim.network.DefaultNode |
addInEdge, addInEdges, addOutEdge, addOutEdges, clearInEdges, clearOutEdges, getEdgesFrom, getEdgesTo, getFromNodes, getId, getInDegree, getInEdges, getInNodes, getNodeLabel, getNumInEdges, getNumOutEdges, getOutDegree, getOutEdges, getOutNodes, getRandomFromNode, getRandomNodeIn, getRandomNodeOut, getRandomToNode, getToNodes, hasEdgeFrom, hasEdgeTo, hasEdgeToOrFrom, makeRandomInEdge, makeRandomOutEdge, removeEdgesFrom, removeEdgesTo, removeInEdge, removeOutEdge |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_TASKS
public static final int MAX_TASKS
- See Also:
- Constant Field Values
Employee
public Employee(double x,
double y,
SimModel model)
throws RepastException
- Throws:
RepastException
Employee
public Employee(SimModel model)
throws RepastException
- Throws:
RepastException
getTaskList
public java.util.ArrayList getTaskList()
draw
public void draw(SimGraphics g)
- Description copied from interface:
Drawable2DGridNode
- Draws this Drawable2DGridNode.
- Specified by:
draw in interface Drawable2DGridNode- Specified by:
draw in interface NonGridDrawable- Overrides:
draw in class DefaultDrawableNode
- Parameters:
g - the SimGraphics object used for drawing
addTask
public boolean addTask(Task task)
- Adds a task to this employee. If this employee has too many tasks
assigned he/she refuses to do it and returns false.
- Parameters:
task - the task to perform
- Returns:
- if the task was added
performTask
public void performTask(Task taskToPerform)
resetIndices
public static void resetIndices()
getProbedProperties
public java.lang.String[] getProbedProperties()
- Description copied from interface:
CustomProbeable
- Gets the names of the properties that are allowed to be probed. The
property names returned by this method should be reflect the accessor
and mutator method names. For example, given getAge and setAge, an
appropriate property name would be Age.
- Specified by:
getProbedProperties in interface CustomProbeable
- Returns:
- an array of the property names.
getNumberOfTasks
public int getNumberOfTasks()