Documentation of 'edu.rit.sim.Event' Java class
Event
edu.rit.sim

Class Event



  • public abstract class Event
    extends java.lang.Object
    Class Event is the abstract base class for an event in a discrete event simulation.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Event()
      Construct a new event.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method and Description
      void doAfter(double dt, Event event)
      Schedule the given event to be performed at a time dt in the future (at current simulation time + dt) in this event's simulation.
      void doAt(double t, Event event)
      Schedule the given event to be performed at the given time in this event's simulation.
      abstract void perform()
      Perform this event.
      Simulation simulation()
      Returns the simulation in which this event occurs.
      double time()
      Returns this event's simulation time, the time when this event is scheduled to take place.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Event

        public Event()
        Construct a new event.
    • Method Detail

      • simulation

        public final Simulation simulation()
        Returns the simulation in which this event occurs.
        Returns:
        Simulation.
      • time

        public final double time()
        Returns this event's simulation time, the time when this event is scheduled to take place.
        Returns:
        Simulation time.
      • doAt

        public final void doAt(double t,
                               Event event)
        Schedule the given event to be performed at the given time in this event's simulation.
        Parameters:
        t - Simulation time for event.
        event - Event to be performed.
        Throws:
        java.lang.IllegalArgumentException - (unchecked exception) Thrown if t is less than the current simulation time.
        java.lang.NullPointerException - (unchecked exception) Thrown if event is null.
      • doAfter

        public final void doAfter(double dt,
                                  Event event)
        Schedule the given event to be performed at a time dt in the future (at current simulation time + dt) in this event's simulation.
        Parameters:
        dt - Simulation time delta for event.
        event - Event to be performed.
        Throws:
        java.lang.IllegalArgumentException - (unchecked exception) Thrown if dt is less than zero.
        java.lang.NullPointerException - (unchecked exception) Thrown if event is null.
      • perform

        public abstract void perform()
        Perform this event. Called by the Simulation when the simulation time equals the time when this event is scheduled to take place.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.