Class RoundBasedExecutor

    • Field Detail

      • PROPERTY_MODE

        public static final java.lang.String PROPERTY_MODE
        The property for the action execution mode.
        See Also:
        Constant Field Values
      • MODE_LASTACTION

        public static final java.lang.String MODE_LASTACTION
        The value for the last action execution mode.
        See Also:
        Constant Field Values
      • timestamp

        protected long timestamp
        Last time stamp.
      • currenttime

        protected long currenttime
        Current time.
      • timer

        protected ITimer timer
        The tick timer.
      • terminated

        protected boolean terminated
        The flag indicating that the executor is terminated.
    • Constructor Detail

      • RoundBasedExecutor

        public RoundBasedExecutor()
        Creates a new round based executor.
      • RoundBasedExecutor

        public RoundBasedExecutor​(AbstractEnvironmentSpace space)
        Creates a new round based executor.
        Parameters:
        space - The space.
        clockservice - The clock service.
      • RoundBasedExecutor

        public RoundBasedExecutor​(AbstractEnvironmentSpace space,
                                  java.util.Comparator acomp)
        Creates a new round based executor.
        Parameters:
        space - The space.
        clockservice - The clock service.
        acomp - The action comparator.
    • Method Detail

      • start

        public void start()
        Start the space executor.
        Specified by:
        start in interface ISpaceExecutor
      • terminate

        public void terminate()
        Terminate the space executor.
        Specified by:
        terminate in interface ISpaceExecutor
      • monitorExecution

        protected static void monitorExecution​(IExternalAccess ea,
                                               IExecutionService exe)
        Check if no agent is running whenever the clock advances.