import java.util.Set; import java.lang.Integer; /** *

* 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. *

* @author Michael Schuresko * @version %I%, %G% * @since 1.0 */ public interface ICommunicationScheduler { /** * Gets the time of the next communication round. * Useful for the differential equation solver, * as these communication times are usually discontinuities * @param lfCurrTime absolute current time * @return absolute time of next communication round (not "time till next * round"). */ public double getNextRoundTime(double lfCurrTime); /** * Gets the time of the next communication round, * populates setActiveAgents * with the indices of those agents which are active on this round. * @param lfCurrTime current time * @param nTotalAgents agents are index 0 through nTotalAgents-1 * @param setActiveAgents initially empty, then populated with * indices (of type Integer) of agents to fire next round. * @return absolute time of next communication round */ public double getNextRoundAndFiringSchedule(double lfCurrTime, int nTotalAgents, Set setActiveAgents); }