scalation.event.ModelTest

PhoneModel

class PhoneModel extends Model

This class models a simple phone simulation.

Linear Supertypes
Model, Identity, Error, ModelT, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. PhoneModel
  2. Model
  3. Identity
  4. Error
  5. ModelT
  6. AnyRef
  7. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PhoneModel(name: String, arrivalDist: Variate, maxCalls: Int, serviceDist: Variate)

    name

    the name of the simulation model

    arrivalDist

    the inter-arrival time distribution

    maxCalls

    the maximum number of phone call (stopping condition)

    serviceDist

    the service time distribution

Type Members

  1. case class Arrival(call: Entity) extends Event with Product with Serializable

    Create a subclass of Event for Arrival events.

  2. case class Departure(call: Entity) extends Event with Product with Serializable

    Create a subclass of Event for Departure events.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. var _clock: Double

    The clock that keep track of the current simulation time

    The clock that keep track of the current simulation time

    Attributes
    protected
    Definition Classes
    ModelT
  7. val aLinks: Array[CausalLink]

  8. def animate(who: Identity, what: Value, color: Color, shape: Shape, from: Event, to: Event, at: Array[Double] = Array ()): Unit

    Put a edge command on the animation queue.

    Put a edge command on the animation queue.

    who

    who is being animated

    what

    what animation command

    color

    the color the edge

    shape

    the shape of the edge

    from

    the location of the origination node

    to

    the location of the destination node

    at

    the location of the edge (empty array => implicitly determined)

    Definition Classes
    Model
  9. def animate(who: Identity, what: Value, color: Color, shape: Shape, at: Array[Double]): Unit

    Put a node/token command on the animation queue.

    Put a node/token command on the animation queue.

    who

    who is being animated

    what

    what animation command

    color

    the color the node/token

    shape

    the shape of the node/token

    at

    the location of the node/token

    Definition Classes
    Model
  10. var animating: Boolean

    Animation execution flag

    Animation execution flag

    Attributes
    protected
    Definition Classes
    ModelT
  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. var busy: Boolean

  13. def cancel(event: Event): Unit

    Remove an event from the Future Event List (FEL) before it occurs, thus cancelling the event.

    Remove an event from the Future Event List (FEL) before it occurs, thus cancelling the event.

    event

    the event to cancel

    Definition Classes
    Model
  14. def clock: Double

    Return the current value of the director's clock.

    Return the current value of the director's clock.

    Definition Classes
    ModelT
  15. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  19. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  20. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  21. def getStatistics: ListBuffer[Statistic]

    Return the statistical results of the simulation (statistics for each part).

    Return the statistical results of the simulation (statistics for each part).

    Definition Classes
    ModelModelT
  22. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  23. def id: Int

    Get the id (unique identifier).

    Get the id (unique identifier).

    Definition Classes
    Identity
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def me: String

    Return the full identity.

    Return the full identity.

    Definition Classes
    Identity
  26. var nCalls: Double

  27. var nDrops: Double

  28. var nHangups: Double

  29. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  30. final def notify(): Unit

    Definition Classes
    AnyRef
  31. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  32. val protoArrival: Arrival

  33. val protoDeparture: Departure

  34. def report: Unit

    Report on the statistical results of the simulation for the overall model.

    Report on the statistical results of the simulation for the overall model.

    Definition Classes
    ModelModelT
  35. def report(vars: Array[(String, Double)]): Unit

    Report on the statistical results of the simulation for the overall model.

    Report on the statistical results of the simulation for the overall model.

    vars

    the result/output variables for the simulation

    Definition Classes
    Model
  36. def report(eventType: String, links: Array[CausalLink] = Array ()): Unit

    Report on the statistical results of the simulation for a given type of event.

    Report on the statistical results of the simulation for a given type of event.

    eventType

    the type of event (e.g., Arrival, Departure)

    links

    the causal links enimating from this event type

    Definition Classes
    Model
  37. def schedule(event: Event, timeDelay: Double): Unit

    Place an event on the Future Event List (FEL) for later execution, thus scheduling the event to occur sometime in the future.

    Place an event on the Future Event List (FEL) for later execution, thus scheduling the event to occur sometime in the future. Events are ordered by their event/act time.

    event

    the event to schedule

    timeDelay

    how far in the future to schedule the event

    Definition Classes
    Model
  38. def setName(label: String): Unit

    Set the name.

    Set the name.

    label

    the name to assign

    Definition Classes
    Identity
  39. def simType: String

    Get the type of the simulation object.

    Get the type of the simulation object.

    Definition Classes
    Identity
  40. def simulate(firstEvent: Event, startTime: Double): ListBuffer[Statistic]

    Run the simulation by iteratively processing events in time order.

    Run the simulation by iteratively processing events in time order.

    firstEvent

    the first event is used to prime the simulation

    startTime

    the time at which the simulation is to begin

    Definition Classes
    Model
  41. def simulate(startTime: Double = 0.): ListBuffer[Statistic]

    Run the simulation by iteratively processing events in time order.

    Run the simulation by iteratively processing events in time order. Requires at least one to already be scheduled (see next method).

    startTime

    the time at which the simulation is to begin

    Definition Classes
    ModelModelT
  42. var simulating: Boolean

    Simulation execution/termination flag

    Simulation execution/termination flag

    Attributes
    protected
    Definition Classes
    ModelT
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  44. def toString(): String

    Definition Classes
    AnyRef → Any
  45. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  46. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  47. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Model

Inherited from Identity

Inherited from Error

Inherited from ModelT

Inherited from AnyRef

Inherited from Any