de.cesr.more.util
Class MSchedule

java.lang.Object
  extended by de.cesr.more.util.MSchedule
All Implemented Interfaces:
MoreSchedule

public class MSchedule
extends Object
implements MoreSchedule

MORe Simple and inefficient stand-alone schedule (mainly for testing purposes). Does not consider priorities! Later schedulings overwrite older one for the same action!

Date:
10.12.2010

Field Summary
protected  double currentStep
           
 
Constructor Summary
MSchedule()
           
 
Method Summary
 double getCurrentTick()
           
 String getScheduleInfo()
          Returns a string containing all scheduled actions including their schedule parameters.
 boolean isScheduled(MoreAction action, int timestep)
          Checks whether the given MoreAction is scheduled for the given timestep.
 void removeAction(MoreAction action)
           
 void schedule(MScheduleParameters params, MoreAction action)
           
 void step(double step)
          Execute actions scheduled for the given step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentStep

protected double currentStep
Constructor Detail

MSchedule

public MSchedule()
Method Detail

removeAction

public void removeAction(MoreAction action)
Specified by:
removeAction in interface MoreSchedule
See Also:
MoreSchedule.removeAction(de.cesr.more.measures.util.MoreAction)

schedule

public void schedule(MScheduleParameters params,
                     MoreAction action)
Specified by:
schedule in interface MoreSchedule
See Also:
MoreSchedule.schedule(de.cesr.more.measures.util.MScheduleParameters, de.cesr.more.measures.util.MoreAction)

step

public void step(double step)
Execute actions scheduled for the given step.

Parameters:
step -

isScheduled

public boolean isScheduled(MoreAction action,
                           int timestep)
Checks whether the given MoreAction is scheduled for the given timestep.

Parameters:
action -
timestep -
Returns:
Created by Sascha Holzhauer on 22.12.2010

getScheduleInfo

public String getScheduleInfo()
Returns a string containing all scheduled actions including their schedule parameters.

Specified by:
getScheduleInfo in interface MoreSchedule
Returns:
information about scheduled actions Created by Sascha Holzhauer on 23.12.2010

getCurrentTick

public double getCurrentTick()
Specified by:
getCurrentTick in interface MoreSchedule
See Also:
MoreSchedule.getCurrentTick()