Event

scalation.simulation.event.Event
abstract class Event(val entity: Entity, director: Model, delay: Double, stat: Statistic, val proto: EventNode) extends Identifiable, Ordered[Event]

The Event class provides facilities for defining simulation events. Subclasses of Event provide event-logic in their implementation of the 'occur' method. Note: unique identification is mixed in via the Identifiable trait.

Value parameters

delay

the time delay before this event's occurrence

director

the controller/scheduler that this event is a part of

entity

the entity involved in this event

proto

the prototype (serves as node in animation) for this event

stat

the object for collecting statistics about delay times

Attributes

Graph
Supertypes
trait Ordered[Event]
trait Comparable[Event]
trait Identifiable
class Object
trait Matchable
class Any
Show all
Known subtypes
class Arrival
class Departure
class Arrival
class Departure
class Arrival
class Departure
class Arrival
class Departure
class Arrival
class Departure
class Arrival
class Departure
class Arrival
class Arrival
class Arrival
class EventNode
class Arrival
Show all

Members list

Value members

Abstract methods

def occur(): Unit

Execute this event where the event-logic is specified in the 'occur' method. This method is abstract, so it must be implemented in subclasses and it (1) may schedule other events and (2) may specify state changes.

Execute this event where the event-logic is specified in the 'occur' method. This method is abstract, so it must be implemented in subclasses and it (1) may schedule other events and (2) may specify state changes.

Attributes

Concrete methods

def cancel(): Unit

Cancel 'this' event by marking it not live.

Cancel 'this' event by marking it not live.

Attributes

def compare(ev: Event): Int

Compare the activation times (actTime) of the two events ('ev' and 'this'). Note: the order is reversed since Scala's Priority Queue is Highest Priority First (HPF).

Compare the activation times (actTime) of the two events ('ev' and 'this'). Note: the order is reversed since Scala's Priority Queue is Highest Priority First (HPF).

Value parameters

ev

the other event

Attributes

def live: Boolean

Return whether this event is live (i.e., not cancelled).

Return whether this event is live (i.e., not cancelled).

Attributes

override def toString: String

Convert the event to a string.

Convert the event to a string.

Attributes

Definition Classes
Any

Inherited methods

def <(that: Event): Boolean

Attributes

Inherited from:
Ordered
def <=(that: Event): Boolean

Attributes

Inherited from:
Ordered
def >(that: Event): Boolean

Attributes

Inherited from:
Ordered
def >=(that: Event): Boolean

Attributes

Inherited from:
Ordered
def compareTo(that: Event): Int

Attributes

Inherited from:
Ordered
override def equals(that: Any): Boolean

Determine whether Identifiable object 'this' equals Identifiable object 'that'. Works since 'id' is unique for all Identifiable objects.

Determine whether Identifiable object 'this' equals Identifiable object 'that'. Works since 'id' is unique for all Identifiable objects.

Attributes

Definition Classes
Identifiable -> Any
Inherited from:
Identifiable
override def hashCode: Int

Return the hashCode as the unique id.

Return the hashCode as the unique id.

Attributes

Definition Classes
Identifiable -> Any
Inherited from:
Identifiable
def me: String

Return the full identity.

Return the full identity.

Attributes

Inherited from:
Identifiable
def name: String

Get the name.

Get the name.

Attributes

Inherited from:
Identifiable
def name_=(name: String): Unit

Set the name.

Set the name.

Value parameters

name

the name to assign

Attributes

Inherited from:
Identifiable
def simType: String

Get the type of the simulation object.

Get the type of the simulation object.

Attributes

Inherited from:
Identifiable

Concrete fields

val actTime: Double

The activation/occurrence time for the event

The activation/occurrence time for the event

Attributes

val entity: Entity

Inherited fields

val id: Int

The globally unique integer identifier

The globally unique integer identifier

Attributes

Inherited from:
Identifiable