nl.tudelft.simulation.dsol.formalisms.devs
Interface SimEventInterface

All Superinterfaces:
Comparable, Serializable
All Known Implementing Classes:
AbstractSimEvent, SimEvent

public interface SimEventInterface
extends Serializable, Comparable

A SimEventInterface embodies the envolope in the scheduled method invocation information is stored.

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Since:
1.0
Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:21:28 $
Author:
Peter Jacobs

Field Summary
static short MAX_PRIORITY
          MAX_PRIORITY is a constant reflecting the maximum priority
static short MIN_PRIORITY
          MIN_PRIORITY is a constant reflecting the minimal priority
static short NORMAL_PRIORITY
          NORMAL_PRIORITY is a constant reflecting the normal priority
 
Method Summary
 void execute()
          executes the simEvent.
 double getAbsoluteExecutionTime()
           
 long getID()
          sets the id of an event.
 short getPriority()
           
 void setID(long id)
          sets the id of an event.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

MAX_PRIORITY

static final short MAX_PRIORITY
MAX_PRIORITY is a constant reflecting the maximum priority

See Also:
Constant Field Values

NORMAL_PRIORITY

static final short NORMAL_PRIORITY
NORMAL_PRIORITY is a constant reflecting the normal priority

See Also:
Constant Field Values

MIN_PRIORITY

static final short MIN_PRIORITY
MIN_PRIORITY is a constant reflecting the minimal priority

See Also:
Constant Field Values
Method Detail

execute

void execute()
             throws SimRuntimeException
executes the simEvent.

Throws:
SimRuntimeException - on execution failure

getAbsoluteExecutionTime

double getAbsoluteExecutionTime()
Returns:
the scheduled execution time of a simulation event.

getPriority

short getPriority()
Returns:
The priority of a simulation event. The priorities are programmed according to the Java thread priority. Use 10 (MAX_PRIORITY), -9, .. , 5 (NORMAL_PRIORITY), 1(MIN_PRIORITY)

getID

long getID()
sets the id of an event. Whenever a simulation event is added or removed from an eventlist, the list might want to set an ID for comparison. This is the only way to ensure a comparison on equal priority and execution time.

Returns:
retuns the id

setID

void setID(long id)
sets the id of an event. Whenever a simulation event is added or removed from an eventlist, the list might want to set an ID for comparison. This is the only way to ensure a comparison on equal priority and execution time.

Parameters:
id - the id


Copyright © 2002-2010 Delft University of Technology, the Netherlands. All Rights Reserved.