zeus.actors
Class ExecutionMonitor

java.lang.Object
  extended byjava.lang.Thread
      extended byzeus.actors.ExecutionMonitor
All Implemented Interfaces:
java.lang.Runnable

public class ExecutionMonitor
extends java.lang.Thread

This component controls the invocation of the domain functions that implement the agent's task abilities. Domain functions are typically external program code or legacy systems that implement the methods of the ZeusTask interface. A domain function is invoked with the task's preconditions as its input arguments, and upon completion its declared effects will be passed back to the agent through this component.

Another important role of the Execution Monitor is to detect failure during the scheduled execution of a plan. This can occur for a number of reasons:

  1. a resource reserved by an task might have been deleted,
  2. an operator might begin execution but fail to complete for some reason,
  3. an operator might successfully complete execution but return the wrong or incomplete results, or
  4. some promised resource from another agent might not arrive on time

Should any of the above occur, the Execution Monitor will trigger remedial action, which may involve replanning.


Field Summary
protected  AgentContext context
           
private  HSet[] eventMonitor
           
protected  boolean monitoring
           
static int TICK
           
static double UPDATE_FRACTION
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ExecutionMonitor()
           
ExecutionMonitor(AgentContext context)
           
 
Method Summary
 void addClockMonitor(ClockMonitor monitor, long type)
           
 AgentContext getAgentContext()
           
protected  void notifyMonitors(int tick, int event_type)
           
 void removeClockMonitor(ClockMonitor monitor, long type)
           
 void run()
           
 void stopMonitoring()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TICK

public static final int TICK
See Also:
Constant Field Values

UPDATE_FRACTION

public static final double UPDATE_FRACTION
See Also:
Constant Field Values

eventMonitor

private HSet[] eventMonitor

monitoring

protected boolean monitoring

context

protected AgentContext context
Constructor Detail

ExecutionMonitor

public ExecutionMonitor()

ExecutionMonitor

public ExecutionMonitor(AgentContext context)
Method Detail

getAgentContext

public AgentContext getAgentContext()

stopMonitoring

public void stopMonitoring()

run

public void run()

addClockMonitor

public void addClockMonitor(ClockMonitor monitor,
                            long type)

removeClockMonitor

public void removeClockMonitor(ClockMonitor monitor,
                               long type)

notifyMonitors

protected void notifyMonitors(int tick,
                              int event_type)


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.