EASE.Agents.Engine
Class Controller

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--EASE.Agents.Engine.Controller

public class Controller
extends java.lang.Thread


Field Summary
private  ActInterface actuators
           
private  AllAgents allAgents
           
private  long cycleTime
           
private  Debugger debugger
           
private  int outputCounter
           
private  int outputRate
           
private  long outputTime
           
private  boolean stop
           
private  java.util.Vector toDelete
           
 
Fields inherited from class java.lang.Thread
contextClassLoader, daemon, eetop, group, inheritedAccessControlContext, initial_stack_memory, MAX_PRIORITY, MIN_PRIORITY, name, NORM_PRIORITY, priority, PrivateInfo, single_step, stillborn, stopThreadPermission, target, threadInitNumber, threadQ, values
 
Constructor Summary
Controller(ActInterface actuators)
          Starts up the controller.
 
Method Summary
private  java.util.Vector agents()
           
private  java.util.Vector factories()
           
private  void performAction(InstantiatedAgent agent)
           
private  void performEngineerAction(InstantiatedEngineer agent)
          Perform actions for an engineer.
private  void performInstantiatedListAction(InstantiatedListAgent listManager)
          Perform InstantiatedListAgent action.
private  void performManagerAction(InstantiatedManager manager)
          Perform actions of a manager.
 void run()
          For ever For each agent execute agent End Start factory threads When out of time stop factory threads get and output factory output End
 void safeStop()
           
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, exit, getContextClassLoader, getName, getPriority, getThreadGroup, init, interrupt, interrupt0, interrupted, isAlive, isDaemon, isInterrupted, isInterrupted, join, join, join, nextThreadNum, registerNatives, resume, resume0, setContextClassLoader, setDaemon, setName, setPriority, setPriority0, sleep, sleep, start, stop, stop, stop0, suspend, suspend0, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

stop

private boolean stop

actuators

private ActInterface actuators

debugger

private Debugger debugger

allAgents

private AllAgents allAgents

toDelete

private java.util.Vector toDelete

cycleTime

private long cycleTime

outputTime

private long outputTime

outputRate

private int outputRate

outputCounter

private int outputCounter
Constructor Detail

Controller

public Controller(ActInterface actuators)
Starts up the controller.

Parameter is the output interface to the simulator.

Will need a paramater which is the specification to run . .

Method Detail

run

public void run()
For ever For each agent execute agent End Start factory threads When out of time stop factory threads get and output factory output End
Overrides:
run in class java.lang.Thread

performAction

private void performAction(InstantiatedAgent agent)

performEngineerAction

private void performEngineerAction(InstantiatedEngineer agent)
Perform actions for an engineer.

Either register or deregister with a single factory or terminate itself (or more than one).


performManagerAction

private void performManagerAction(InstantiatedManager manager)
Perform actions of a manager.

Either makes or breaks contracts (or both).

Fix to include the parameters.


performInstantiatedListAction

private void performInstantiatedListAction(InstantiatedListAgent listManager)
Perform InstantiatedListAgent action.

Either make or break contracts (or both)


safeStop

public void safeStop()

agents

private java.util.Vector agents()

factories

private java.util.Vector factories()