Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## nl.tudelft.simulation.dsol.formalisms.devs
Class SimEvent

    java.lang.Object
      nl.tudelft.simulation.dsol.formalisms.devs.AbstractSimEvent
          nl.tudelft.simulation.dsol.formalisms.devs.SimEvent

All Implemented Interfaces:
  java.lang.Comparable, java.io.Serializable, SimEventInterface

public class SimEvent
extends AbstractSimEvent

The SimEvent forms the essential scheduling mechanism for D-SOL. Objects do not invoke methods directly on eachother; they bundle the object on which the method is planned to be invoked together with the arguments and the name of the method in a simEvent. The SimEvent is then stored in the eventList and executed.

(c) copyright 2003 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Since:
  1.0
Version:
  1.11 2004-03-26
Author:
  Peter Jacobs
See Also:
  Serialized Form

Field Summary
`protected java.lang.Object[]` | `args` args are the arguments which are used to invoke the method with
`protected java.lang.String` | `method` method is the method which embodies the state change
`protected java.lang.Object` | `source` source reflects the source that created the simevent
`protected java.lang.Object` | `target` target reflects the target on which a state change is scheduled

Fields inherited from class nl.tudelft.simulation.dsol.formalisms.devs.AbstractSimEvent
`absoluteExecutionTime, id, priority`

Fields inherited from interface nl.tudelft.simulation.dsol.formalisms.devs.SimEventInterface
`MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY`

Constructor Summary
`SimEvent(double executionTime, java.lang.Object source, java.lang.Object target, java.lang.String method, java.lang.Object[] args)` The constuctor of the event stores the time the event must be executed and the object and method to invoke
`SimEvent(double executionTime, short priority, java.lang.Object source, java.lang.Object target, java.lang.String method, java.lang.Object[] args)` The constuctor of the event stores the time the event must be executed and the object and method to invoke

Method Summary
`void` | `execute()` executes the simEvent
`java.lang.Object[]` | `getArgs()`
`java.lang.String` | `getMethod()`
`java.lang.Object` | `getSource()`
`java.lang.Object` | `getTarget()`
`java.lang.String` | `toString()`

Methods inherited from class nl.tudelft.simulation.dsol.formalisms.devs.AbstractSimEvent
`compareTo, getAbsoluteExecutionTime, getID, getPriority, setID`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### source

    protected java.lang.Object source

  source reflects the source that created the simevent

### target

    protected java.lang.Object target

  target reflects the target on which a state change is scheduled

### method

    protected java.lang.String method

  method is the method which embodies the state change

### args

    protected java.lang.Object[] args

  args are the arguments which are used to invoke the method with

Constructor Detail

### SimEvent

    public SimEvent(double executionTime,
                    java.lang.Object source,
                    java.lang.Object target,
                    java.lang.String method,
                    java.lang.Object[] args)

  The constuctor of the event stores the time the event must be executed and the object and method to invoke

Parameters:
  `executionTime` - reflects the time the event has to be executed.
  `source` - reflects the source that created the method
  `target` - reflects the object on which the method must be invoked.
  `method` - reflects the method to invoke
  `args` - reflects the argumenst the method to invoke with

### SimEvent

    public SimEvent(double executionTime,
                    short priority,
                    java.lang.Object source,
                    java.lang.Object target,
                    java.lang.String method,
                    java.lang.Object[] args)

  The constuctor of the event stores the time the event must be executed and the object and method to invoke

Parameters:
  `executionTime` - reflects the time the event has to be executed.
  `priority` - reflects the priority of the event
  `source` - reflects the source that created the method
  `target` - reflects the object on which the method must be invoked.
  `method` - reflects the method to invoke
  `args` - reflects the argumenst the method to invoke with

Method Detail

### execute

    public void execute()
                 throws SimRuntimeException

  Description copied from class: `AbstractSimEvent`
  executes the simEvent

  Specified by:
    `execute` in interface `SimEventInterface`
  Specified by:
    `execute` in class `AbstractSimEvent`
  Throws:
    `SimRuntimeException` - on execution failure
  See Also:
    `SimEventInterface.execute()`

### getArgs

    public java.lang.Object[] getArgs()

  Returns:
    Returns the args.

### getMethod

    public java.lang.String getMethod()

  Returns:
    Returns the method.

### getSource

    public java.lang.Object getSource()

  Returns:
    Returns the source.

### getTarget

    public java.lang.Object getTarget()

  Returns:
    Returns the target.

### toString

    public java.lang.String toString()

  See Also:
    `Object.toString()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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