hmi.elckerlyc.scheduler
Class SmartBodySchedulingStrategy

java.lang.Object
  extended by hmi.elckerlyc.scheduler.SmartBodySchedulingStrategy
All Implemented Interfaces:
SchedulingStrategy

public class SmartBodySchedulingStrategy
extends Object
implements SchedulingStrategy

Strategy implementing the SmartBody> scheduling algorithm:
The behaviors are processed in BML order. The timing of the first behavior is constrained only by the absolute time constraints it defines and by constraints imposed by Anticipators. Subsequent behaviors are timed so that they adhere to time constraints imposed by the already processed behaviors. If time constraints allow it, each behavior will be assigned its preferred duration.

Author:
Herwin van Welbergen

Nested Class Summary
private static class SmartBodySchedulingStrategy.ConstrInfo
           
 
Field Summary
private static org.slf4j.Logger logger
           
 
Constructor Summary
SmartBodySchedulingStrategy()
           
 
Method Summary
private  boolean moveBehavior(double move, Behaviour b, ArrayList<TimePeg> movedPegs, HashMap<Behaviour,ArrayList<TimePegAndConstraint>> syncMap)
           
private  void movePeg(double move, Behaviour b, HashMap<Behaviour,ArrayList<TimePegAndConstraint>> syncMap)
           
 void schedule(BehaviourBlock bb, BMLBlockPeg bmlBlockPeg, BMLScheduler scheduler, double scheduleTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static final org.slf4j.Logger logger
Constructor Detail

SmartBodySchedulingStrategy

public SmartBodySchedulingStrategy()
Method Detail

schedule

public void schedule(BehaviourBlock bb,
                     BMLBlockPeg bmlBlockPeg,
                     BMLScheduler scheduler,
                     double scheduleTime)
Specified by:
schedule in interface SchedulingStrategy

moveBehavior

private boolean moveBehavior(double move,
                             Behaviour b,
                             ArrayList<TimePeg> movedPegs,
                             HashMap<Behaviour,ArrayList<TimePegAndConstraint>> syncMap)

movePeg

private void movePeg(double move,
                     Behaviour b,
                     HashMap<Behaviour,ArrayList<TimePegAndConstraint>> syncMap)