001    package edu.jhu.mb.ernst.engine;
002    
003    /***********************************************************************
004    * A generic interface for discrete event simulation.
005    * 
006    * At the designated event time, the event is processed.  The event can
007    * then be reinserted into the time-sorted event queue with a new time.
008    * 
009    * @version
010    *   $Date: 2012-04-15 13:06:25 -0500 (Sun, 15 Apr 2012) $
011    *   $Rev: 7 $
012    *   $Author: croft $
013    * @since
014    *   2012-02-19
015    * @author
016    *   David Wallace Croft
017    ***********************************************************************/
018    public interface  DiscreteEvent
019    ////////////////////////////////////////////////////////////////////////
020    ////////////////////////////////////////////////////////////////////////
021    {
022    
023    /***********************************************************************
024    * Gets the event time. 
025    ***********************************************************************/ 
026    double  getTime ( );
027    
028    /***********************************************************************
029    * Called at the event time to process the discrete event.
030    * 
031    * @return
032    *   Returns true if the event should be reinserted into the queue. 
033    ***********************************************************************/ 
034    boolean  process ( );
035    
036    ////////////////////////////////////////////////////////////////////////
037    ////////////////////////////////////////////////////////////////////////
038    }