scalation.process

Source

Related Docs: object Source | package process

class Source extends SimActor with Component

The Source class is used to periodically inject entities (SimActors) into a running simulation model. May act as an arrival generator. Source is both a simulation Component and special SimActor and therefore runs in own thread.

Linear Supertypes
Component, SimActor, Locatable, Ordered[SimActor], Comparable[SimActor], PQItem, Identifiable, Error, Coroutine, Runnable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Source
  2. Component
  3. SimActor
  4. Locatable
  5. Ordered
  6. Comparable
  7. PQItem
  8. Identifiable
  9. Error
  10. Coroutine
  11. Runnable
  12. AnyRef
  13. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Source(name: String, director: Model, makeEntity: () ⇒ SimActor, subtype: Int, units: Int, iArrivalTime: Variate, xy: (Double, Double))

    Auxiliary constructor that uses defaults for width (w) and height (h).

    Auxiliary constructor that uses defaults for width (w) and height (h).

    name

    the name of the source

    director

    the director controlling the model

    makeEntity

    the function to make entities of a specified type

    units

    the number of entities to make

    iArrivalTime

    the inter-arrival time distribution

    xy

    the (x, y) coordinates for the top-left corner of the source.

  2. new Source(name: String, director: Model, makeEntity: () ⇒ SimActor, subtype: Int, units: Int, iArrivalTime: Variate, at: Array[Double])

    name

    the name of the source

    director

    the director controlling the model

    makeEntity

    the function to make entities of a specified type

    subtype

    indicator of the subtype of the entities to me made

    units

    the number of entities to make

    iArrivalTime

    the inter-arrival time distribution

    at

    the location of the source (x, y, w, h)

Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def <(that: SimActor): Boolean

    Definition Classes
    Ordered
  4. def <=(that: SimActor): Boolean

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

    Definition Classes
    AnyRef → Any
  6. def >(that: SimActor): Boolean

    Definition Classes
    Ordered
  7. def >=(that: SimActor): Boolean

    Definition Classes
    Ordered
  8. val DIAM: Double

    Diameter of a token (for animating entities)

    Diameter of a token (for animating entities)

    Definition Classes
    Component
  9. val RAD: Double

    Radius of a token (for animating entities)

    Radius of a token (for animating entities)

    Definition Classes
    Component
  10. def accum(value: Double): Unit

    Accumulate the value (e.g., number in queue) weighted by its time duration.

    Accumulate the value (e.g., number in queue) weighted by its time duration.

    value

    the value to accumulate

    Definition Classes
    Component
  11. def act(): Unit

    The Sources as a special SimActor will act over time to make entities (other SimActors).

    The Sources as a special SimActor will act over time to make entities (other SimActors).

    Definition Classes
    SourceSimActorCoroutine
  12. var actTime: Double

    The activation time for the item in the time-ordered priority queue

    The activation time for the item in the time-ordered priority queue

    Definition Classes
    PQItem
  13. def addZombie(z: SimActor): Unit

    Add a zombie actor to add to queue of zombies.

    Add a zombie actor to add to queue of zombies.

    z

    the zombie actor to add to queue

  14. def aggregate(): Unit

    Aggregate the statistics of this component's subparts.

    Aggregate the statistics of this component's subparts.

    Definition Classes
    Component
  15. def arrivalT: Double

    Return this actor's arrival/(re)-creation time.

    Return this actor's arrival/(re)-creation time.

    Definition Classes
    SimActor
  16. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  17. def at: Array[Double]

    Return where this object is at (its location).

    Return where this object is at (its location).

    Definition Classes
    Locatable
  18. def cleanup(): Unit

    Clean-up all of the zombie actors for this source.

    Clean-up all of the zombie actors for this source. The model should call this method after all replications have been run.

  19. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. def compare(actor2: SimActor): Int

    Compare the activation times of the two actors, 'this' and 'actror2'.

    Compare the activation times of the two actors, 'this' and 'actror2'. Their activation times are used to order them in the director's agenda (a time-based priority queue).

    actor2

    the other actor to compare with this

    Definition Classes
    SimActor → Ordered
  21. def compare(other: PQItem): Int

    Compare two items (PQItems) based on their actTime.

    Compare two items (PQItems) based on their actTime.

    other

    the other item to compare with this item

    Definition Classes
    PQItem
  22. def compareTo(that: SimActor): Int

    Definition Classes
    Ordered → Comparable
  23. def composite: Boolean

    Indicate whether this component is composite, i.e., has subparts.

    Indicate whether this component is composite, i.e., has subparts.

    Definition Classes
    Component
  24. def counts: (Int, Int, Int)

    Return the Coroutine counts.

    Return the Coroutine counts.

    Definition Classes
    Coroutine
  25. def director: Model

    Return the director who controls the play/simulation this component is in.

    Return the director who controls the play/simulation this component is in.

    Definition Classes
    Component
  26. def display(): Unit

    Display this source as a node on the animation canvas.

    Display this source as a node on the animation canvas.

    Definition Classes
    SourceComponent
  27. def durationStat: Statistic

    Return sample statistics for durations for this component (e.g., Time in queue).

    Return sample statistics for durations for this component (e.g., Time in queue).

    Definition Classes
    Component
  28. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  29. def equals(that: Any): Boolean

    Determine whether Identifiable object 'this' equals Identifiable object 'that'.

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. 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
  32. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  33. def hashCode(): Int

    Return the hashCode as the unique id.

    Return the hashCode as the unique id.

    Definition Classes
    Identifiable → AnyRef → Any
  34. def id: Int

    Get the id (unique identifier).

    Get the id (unique identifier).

    Definition Classes
    Identifiable
  35. def initComponent(label: String, loc: Array[Double]): Unit

    Initialize this component (all of its vars).

    Initialize this component (all of its vars).

    label

    the name of this component

    loc

    the location of this component

    Definition Classes
    Component
  36. def initStats(label: String): Unit

    Initialize this component's statistical collectors.

    Initialize this component's statistical collectors. Sample statistics: all Components. Time-persistent statistics: all except Gate, Source and Sink.

    label

    the name of this component

    Definition Classes
    Component
  37. def interrupt(): Unit

    Interrupt this waiting zombie coroutine.

    Interrupt this waiting zombie coroutine.

    Definition Classes
    Coroutine
  38. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  39. def isZombie: Boolean

    Return whether this coroutine is a zombie.

    Return whether this coroutine is a zombie.

    Definition Classes
    Coroutine
  40. def me: String

    Return the full identity.

    Return the full identity.

    Definition Classes
    Identifiable
  41. def mySource: Source

    Return the sim-actor's source.

    Return the sim-actor's source.

    Definition Classes
    SimActor
  42. def name: String

    Get the name.

    Get the name.

    Definition Classes
    Identifiable
  43. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  46. def persistentStat: TimeStatistic

    Return time persistent statistics for value for this component (e.g.

    Return time persistent statistics for value for this component (e.g. Number in queue).

    Definition Classes
    Component
  47. def run(): Unit

    Thread's 'run' method delegates to the 'act' method.

    Thread's 'run' method delegates to the 'act' method. Upon interruption the 'act' method is run again from the beginning.

    Definition Classes
    Coroutine → Runnable
  48. def schedule(delay: Double): Unit

    Schedule a reactivation of this SimActor delay time units in the future.

    Schedule a reactivation of this SimActor delay time units in the future.

    delay

    the time delay before reactivation

    Definition Classes
    SimActor
  49. def setArrivalT(aTime: Double): Unit

    Set this actor's arrival/(re)-creation time.

    Set this actor's arrival/(re)-creation time.

    Definition Classes
    SimActor
  50. def setAt(loc: Array[Double]): Unit

    Set the location of this object.

    Set the location of this object.

    loc

    the location of this object

    Definition Classes
    Locatable
  51. def setDirector(dir: Model): Unit

    Set this component's director (the controller of the simulation model).

    Set this component's director (the controller of the simulation model).

    dir

    the director of the play/simulation

    Definition Classes
    Component
  52. def setMySource(mySource: Source): Unit

    Set the sim-actor's source.

    Set the sim-actor's source.

    Definition Classes
    SimActor
  53. def setName(label: String): Unit

    Set the name.

    Set the name.

    label

    the name to assign

    Definition Classes
    Identifiable
  54. def setSubtype(subtype: Int): Unit

    Set the sim-actor's subtype.

    Set the sim-actor's subtype.

    subtype

    the sim-actors subtype

    Definition Classes
    SimActor
  55. def setTrajectory(t: Double): Unit

    Set the value of the trajectory along the curve for this SimActor.

    Set the value of the trajectory along the curve for this SimActor.

    t

    the new trajectory for the SimActor

    Definition Classes
    SimActor
  56. def simType: String

    Get the type of the simulation object.

    Get the type of the simulation object.

    Definition Classes
    Identifiable
  57. def start(): Unit

    Start this coroutine, i.e., invoke its 'run' -> 'act' method.

    Start this coroutine, i.e., invoke its 'run' -> 'act' method.

    Definition Classes
    Coroutine
  58. val subpart: ListBuffer[Component]

    List of subparts of the Component (empty for atomics, nonempty for composites)

    List of subparts of the Component (empty for atomics, nonempty for composites)

    Definition Classes
    Component
  59. def subtype: Int

    Return the sim-actor's subtype.

    Return the sim-actor's subtype.

    Definition Classes
    SimActor
  60. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  61. def tally(duration: Double): Unit

    Tally the duration (e.g., waiting time) of an activity or delay.

    Tally the duration (e.g., waiting time) of an activity or delay.

    duration

    the time duration

    Definition Classes
    Component
  62. def toString(): String

    Show the SimActor's full name and activation time.

    Show the SimActor's full name and activation time.

    Definition Classes
    SimActorPQItem → AnyRef → Any
  63. def trajectory: Double

    Return the current trajectory (along the Qcurve) of this SimActor.

    Return the current trajectory (along the Qcurve) of this SimActor.

    Definition Classes
    SimActor
  64. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  67. def yieldToDirector(quit: Boolean = false): Unit

    Yield control to the director so the director can take the next action.

    Yield control to the director so the director can take the next action.

    quit

    the flag indicating whether this actor is done

    Definition Classes
    SimActor
  68. def yyield(that: Coroutine, quit: Boolean = false): Unit

    Yield control from 'this' to 'that' coroutine.

    Yield control from 'this' to 'that' coroutine.

    that

    the other coroutine to yield control to

    quit

    whether 'this' coroutine is to terminate (true) or wait to be resumed (false)

    Definition Classes
    Coroutine
  69. def zombify(): Unit

    Zombify this coroutine.

    Zombify this coroutine.

    Definition Classes
    Coroutine

Inherited from Component

Inherited from SimActor

Inherited from Locatable

Inherited from Ordered[SimActor]

Inherited from Comparable[SimActor]

Inherited from PQItem

Inherited from Identifiable

Inherited from Error

Inherited from Coroutine

Inherited from Runnable

Inherited from AnyRef

Inherited from Any

Ungrouped