Class AbstractAction

    • Field Detail

      • frequency

        protected Frequency frequency
        The Frequency of this AbstractAction.
      • nextTime

        protected double nextTime
        The next clock tick that this AbstractAction should be executed.
      • interval

        protected double interval
        The interval at which to execute this action.
      • priority

        protected double priority
        The priority of this AbstractAction with respect to other actions scheduled for the same clock tick.
      • nonModelAction

        protected boolean nonModelAction
        If the action is a back-end action (true) or if it is a model action (false).
      • rescheduler

        protected AbstractAction.Rescheduler rescheduler
        The Rescheduler used by this AbstractAction to reschedule it for execution.
    • Constructor Detail

      • AbstractAction

        public AbstractAction​(ScheduleParameters params)
        Creates an AbstractAction using the specified ScheduleParameters. The AbstractAction's scheduling data is set from the ScheduleParameters argument.
        params - the scheduling data used by this AbstractAction
    • Method Detail

      • getNextTime

        public double getNextTime()
        Returns the next time this AbstractAction should be executed.
        Specified by:
        getNextTime in interface ISchedulableAction
        the next time this AbstractAction should be executed.
      • setIsNonModelAction

        protected void setIsNonModelAction​(IAction action)
      • setIsNonModelAction

        protected void setIsNonModelAction​(boolean nonModelAction)
      • setFrequency

        protected void setFrequency​(Frequency freq)
        Sets the frequency of this AbstractAction.
        freq - the new Frequency of execution of this AbstractAction.
      • addForExecution

        public void addForExecution​(ScheduleGroup group)
        Add this ScheduableAction to the specified group for execution.
        Specified by:
        addForExecution in interface ISchedulableAction
        group - the group to add the ISchedulableAction to.
      • getPriority

        public double getPriority()
        Gets the priority of this action. The priority refers to this AbstractAction's place in the order of execution with respect to all the other actions that will execute at the same clock tick. The range is from Double.NEGATIVE_INFINITY (execute first) to Double.POSITIVE_INFINITY (execute last). The default is ScheduleParameters.RANDOM_PRIORITY which means the priority will be randomly assigned from a uniform distribution.
        Specified by:
        getPriority in interface ISchedulableAction
        the priority of this AbstractAction.
      • getOrderIndex

        public long getOrderIndex()
        Gets an index indicating where this IAction was added to a schedule w/r to all other actions added to a schedule.
        Specified by:
        getOrderIndex in interface ISchedulableAction
        an index indicating where this IAction was added to a schedule w/r to all other actions added to a schedule.