edu.mit.sketch.system
Class StageBasedScheduler

java.lang.Object
  |
  +--java.util.Observable
        |
        +--edu.mit.sketch.system.Scheduler
              |
              +--edu.mit.sketch.system.StageBasedScheduler

public class StageBasedScheduler
extends Scheduler

I am calling this the Stage Based Scheduler because it chooses what knowledge source to run next in order of stages of processing that they pertain to. (i.e. low level, bottom up, top down... etc).

Created: Tue Feb 12 10:38:09 2002
Copyright: Copyright (C) 2001 by MIT. All rights reserved.


Fields inherited from class edu.mit.sketch.system.Scheduler
m_blackboard, m_items, m_ksManager, m_system, m_triggeredKSs
 
Constructor Summary
StageBasedScheduler(BlackboardSystem bbs)
           
 
Method Summary
protected  SchedulerItem chooseNextItem()
          This function is really the meat of the whole show.
protected  boolean doneProcessing()
          We are done if the stack is empty and there are no more unprocessed BBItems.
protected  SchedulerItem postProcessingStep()
          Ask if this particular scheduler has a post processing process to run.
protected  boolean readyToProcess()
          Very simple mechanism.
 
Methods inherited from class edu.mit.sketch.system.Scheduler
addNewBBItem, getRecentItems, hasUnprocessed, isStackEmpty, popStack, triggerKSs
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StageBasedScheduler

public StageBasedScheduler(BlackboardSystem bbs)
Method Detail

doneProcessing

protected boolean doneProcessing()
We are done if the stack is empty and there are no more unprocessed BBItems. This is likely a very common done condition.
Overrides:
doneProcessing in class Scheduler

chooseNextItem

protected SchedulerItem chooseNextItem()
This function is really the meat of the whole show. Here's how this one works: If there are things in the scheduling stack, do those. Otherwise, if there are new things on the blackboard see what new KSs can run. Select a KS by its procssing type: first LowLevel ones, then Bottom Up then Top Down, then whatever else (I have to figure out exactly how this is going to work still).
Overrides:
chooseNextItem in class Scheduler

postProcessingStep

protected SchedulerItem postProcessingStep()
Description copied from class: Scheduler
Ask if this particular scheduler has a post processing process to run.
Overrides:
postProcessingStep in class Scheduler

readyToProcess

protected boolean readyToProcess()
Very simple mechanism. Just process data every time we get it.
Overrides:
readyToProcess in class Scheduler