Interface ICommunicationScheduler

All Known Implementing Classes:
SynchronousScheduler

public interface ICommunicationScheduler

Interface for Communication round scheduling. This determines the order in which various robots will iterate through the broadcast, recieve, update cycle. The first classes to implement this interface will merely use it to wrap a synchronized communication schedule, but asynchronous communication is also possible.

Since:
1.0

Method Summary
 double getNextRoundAndFiringSchedule(double lfCurrTime, int nTotalAgents, java.util.Set<java.lang.Integer> setActiveAgents)
          Gets the time of the next communication round, populates setActiveAgents with the indices of those agents which are active on this round.
 double getNextRoundTime(double lfCurrTime)
          Gets the time of the next communication round.
 

Method Detail

getNextRoundTime

double getNextRoundTime(double lfCurrTime)
Gets the time of the next communication round. Useful for the differential equation solver, as these communication times are usually discontinuities

Parameters:
lfCurrTime - absolute current time
Returns:
absolute time of next communication round (not "time till next round").

getNextRoundAndFiringSchedule

double getNextRoundAndFiringSchedule(double lfCurrTime,
                                     int nTotalAgents,
                                     java.util.Set<java.lang.Integer> setActiveAgents)
Gets the time of the next communication round, populates setActiveAgents with the indices of those agents which are active on this round.

Parameters:
lfCurrTime - current time
nTotalAgents - agents are index 0 through nTotalAgents-1
setActiveAgents - initially empty, then populated with indices (of type Integer) of agents to fire next round.
Returns:
absolute time of next communication round