scalation.process

Gate

class Gate extends SimActor with Component

The Gate class models the operation of gate that can open and shut. When the gate is open, entities can flow through and when shut, they cannot. They may wait in a queue or go elsewhere. A gate can model a traffic light (green => open, red => shut).

Linear Supertypes
Component, SimActor, Locatable, Ordered[SimActor], Comparable[SimActor], PQItem, Identifiable, Error, Signifiable, Actor, ReplyReactor, InternalActor, Serializable, Serializable, InputChannel[Any], ActorCanReply, InternalReplyReactor, ReactorCanReply, Reactor[Any], Combinators, AbstractActor, CanReply[Any, Any], OutputChannel[Any], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Gate
  2. Component
  3. SimActor
  4. Locatable
  5. Ordered
  6. Comparable
  7. PQItem
  8. Identifiable
  9. Error
  10. Signifiable
  11. Actor
  12. ReplyReactor
  13. InternalActor
  14. Serializable
  15. Serializable
  16. InputChannel
  17. ActorCanReply
  18. InternalReplyReactor
  19. ReactorCanReply
  20. Reactor
  21. Combinators
  22. AbstractActor
  23. CanReply
  24. OutputChannel
  25. AnyRef
  26. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Gate(name: String, director: Model, line: WaitQueue, units: Int, onTime: Variate, offTime: Variate, xy: (Double, Double), shut0: Boolean, cap: Int)

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

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

    name

    the name of the gate

    director

    the model/container for this gate

    line

    the queue holding entities waiting for this gate to open

    units

    number of units/phases of operation

    onTime

    distribution of time that gate will be open

    offTime

    distribution of time that gate will be closed

    xy

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

    shut0

    boolean indicating if the gate is initially opened or closed

    cap

    the maximum number of entities that will be released when the gate is opened

  2. new Gate(name: String, director: Model, line: WaitQueue, units: Int, onTime: Variate, offTime: Variate, at: Array[Double], shut0: Boolean = false, cap: Int = 10)

    name

    the name of the gate

    director

    the model/container for this gate

    line

    the queue holding entities waiting for this gate to open

    units

    number of units/phases of operation

    onTime

    distribution of time that gate will be open

    offTime

    distribution of time that gate will be closed

    at

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

    shut0

    boolean indicating if the gate is initially opened or closed

    cap

    the maximum number of entities that will be released when the gate is opened

Type Members

  1. type Future[+P] = scala.actors.Future[P]

    Definition Classes
    ReactorCanReply → CanReply

Value Members

  1. def !(msg: Any): Unit

    Definition Classes
    InternalReplyReactor → Reactor → OutputChannel
  2. def !!(msg: Any): Future[Any]

    Definition Classes
    ActorCanReply → ReactorCanReply → CanReply
  3. def !![A](msg: Any, handler: PartialFunction[Any, A]): Future[A]

    Definition Classes
    ActorCanReply → ReactorCanReply → CanReply
  4. final def !=(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  6. def !?(msec: Long, msg: Any): Option[Any]

    Definition Classes
    ActorCanReply → ReactorCanReply → CanReply
  7. def !?(msg: Any): Any

    Definition Classes
    ActorCanReply → ReactorCanReply → CanReply
  8. final def ##(): Int

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

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

    Definition Classes
    Ordered
  11. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  13. def >(that: SimActor): Boolean

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

    Definition Classes
    Ordered
  15. def ?: Any

    Definition Classes
    InternalActor → InputChannel
  16. val DIAM: Double

    Diameter of a token (for animating entities)

    Diameter of a token (for animating entities)

    Definition Classes
    Component
  17. val RAD: Double

    Radius of a token (for animating entities)

    Radius of a token (for animating entities)

    Definition Classes
    Component
  18. val RESUME_ACTOR: String

    Signal for resuming an actor

    Signal for resuming an actor

    Attributes
    protected
    Definition Classes
    Signifiable
  19. val RESUME_DIRECTOR: String

    Signal for resuming the director

    Signal for resuming the director

    Attributes
    protected
    Definition Classes
    Signifiable
  20. val RETURN_RESULTS: String

    Signal indicating results returned

    Signal indicating results returned

    Attributes
    protected
    Definition Classes
    Signifiable
  21. def accum(value: Double): Unit

    Accumulate the value (e.

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

    value

    the value to accumulate

    Definition Classes
    Component
  22. def act(): Unit

    Specifies how the gate is controlled.

    Specifies how the gate is controlled.

    Definition Classes
    GateSimActor → Reactor
  23. 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
  24. def aggregate(): Unit

    Aggregate the statistics of this component's subparts.

    Aggregate the statistics of this component's subparts.

    Definition Classes
    Component
  25. val arrivalT: Double

    The time at which the entity/sim-actor arrived

    The time at which the entity/sim-actor arrived

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

    Definition Classes
    Any
  27. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. 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
  29. 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
  30. def compareTo(that: SimActor): Int

    Definition Classes
    Ordered → Comparable
  31. def composite: Boolean

    Indicate whether this component is composite, i.

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

    Definition Classes
    Component
  32. def continue(): Unit

    Definition Classes
    Combinators
  33. def display(): Unit

    Tell the animation engine to display this Gate.

    Tell the animation engine to display this Gate.

    Definition Classes
    GateComponent
  34. def duration: Double

    Returns a Double for the amount of time the gate should stay open or closed based on whether or not the gate is open or closed

  35. def durationStat: Statistic

    Return sample statistics for durations for this component (e.

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

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

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

    Definition Classes
    AnyRef → Any
  38. def exceptionHandler: PartialFunction[Exception, Unit]

    Attributes
    protected[scala.actors]
    Definition Classes
    Reactor
  39. def exit(): Nothing

    Attributes
    protected[scala.actors]
    Definition Classes
    InternalActor → Reactor
  40. def exit(reason: AnyRef): Nothing

    Attributes
    protected[scala.actors]
    Definition Classes
    InternalActor
  41. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  42. 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
  43. def flip(): Unit

    Toggles the value of shut.

  44. def forward(msg: Any): Unit

    Definition Classes
    InternalReplyReactor → Reactor → OutputChannel
  45. def gateColor: Color

    Return the current color of the gate which indicates (within the animation) whether the gate is open or closed.

  46. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  47. def getState: scala.actors.Actor.State.Value

    Definition Classes
    InternalActor → InternalReplyReactor → Reactor
  48. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  49. def id: Int

    Get the id (unique identifier).

    Get the id (unique identifier).

    Definition Classes
    Identifiable
  50. 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
  51. 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
  52. def internalSender: OutputChannel[Any]

    Attributes
    protected[scala.actors]
    Definition Classes
    InternalReplyReactor
  53. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  54. def link(body: ⇒ Unit): Actor

    Definition Classes
    InternalActor
  55. def link(to: ActorRef): ActorRef

    Definition Classes
    InternalActor
  56. def link(to: AbstractActor): AbstractActor

    Definition Classes
    InternalActor
  57. def loop(body: ⇒ Unit): Unit

    Definition Classes
    Combinators
  58. def loopWhile(cond: ⇒ Boolean)(body: ⇒ Unit): Unit

    Definition Classes
    Combinators
  59. def mailboxSize: Int

    Attributes
    protected[scala.actors]
    Definition Classes
    Reactor
  60. def me: String

    Return the full identity.

    Return the full identity.

    Definition Classes
    Identifiable
  61. implicit def mkBody[A](body: ⇒ A): Body[A]

    Definition Classes
    Reactor → Combinators
  62. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  65. def nowActing(): Unit

    Set the yetToAct flag to false once a SimActor has acted.

    Set the yetToAct flag to false once a SimActor has acted.

    Definition Classes
    SimActor
  66. def persistentStat: TimeStatistic

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

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

    Definition Classes
    Component
  67. def react(handler: PartialFunction[Any, Unit]): Nothing

    Definition Classes
    InternalActor → InputChannel → InternalReplyReactor → Reactor
  68. def reactWithin(msec: Long)(handler: PartialFunction[Any, Unit]): Nothing

    Definition Classes
    InternalActor → InputChannel → InternalReplyReactor
  69. def receive[R](f: PartialFunction[Any, R]): R

    Definition Classes
    InternalActor → InputChannel
  70. def receiveWithin[R](msec: Long)(f: PartialFunction[Any, R]): R

    Definition Classes
    InternalActor → InputChannel
  71. def receiver: Actor

    Definition Classes
    Reactor → OutputChannel
  72. def release(): Unit

    Release the Gate after service is finished (also check waiting queue).

  73. def reply(msg: Any): Unit

    Attributes
    protected[scala.actors]
    Definition Classes
    InternalReplyReactor
  74. def restart(): Unit

    Definition Classes
    Reactor
  75. 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
  76. def scheduler: IScheduler

    Attributes
    protected[scala.actors]
    Definition Classes
    InternalActor → Reactor
  77. def send(msg: Any, replyTo: OutputChannel[Any]): Unit

    Definition Classes
    Reactor → OutputChannel
  78. def sender: OutputChannel[Any]

    Attributes
    protected[scala.actors]
    Definition Classes
    ReplyReactor
  79. 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
  80. 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
  81. def setName(label: String): Unit

    Set the name.

    Set the name.

    label

    the name to assign

    Definition Classes
    Identifiable
  82. 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
  83. 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
  84. def shut: Boolean

    Return whether the gate is shut (e.

    Return whether the gate is shut (e.g., traffic light is red).

  85. def simType: String

    Get the type of the simulation object.

    Get the type of the simulation object.

    Definition Classes
    Identifiable
  86. def start(): Actor

    Definition Classes
    Actor → InternalActor → Reactor
  87. 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
  88. def subtype: Int

    Return the sim-actor's subtype.

    Return the sim-actor's subtype.

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

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

    Tally the duration (e.

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

    duration

    the time duration

    Definition Classes
    Component
  91. def time: Double

    Return the time on the director's clock

    Return the time on the director's clock

    Definition Classes
    SimActor
  92. 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
  93. 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
  94. def trapExit: Boolean

    Definition Classes
    InternalActor
  95. def trapExit_=(value: Boolean): Unit

    Definition Classes
    InternalActor
  96. def unlink(from: ActorRef): Unit

    Definition Classes
    InternalActor
  97. def unlink(from: AbstractActor): Unit

    Definition Classes
    InternalActor
  98. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  101. def yetToAct: Boolean

    Return whether this actor has yet to act.

    Return whether this actor has yet to act.

    Definition Classes
    SimActor
  102. 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

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 Signifiable

Inherited from Actor

Inherited from ReplyReactor

Inherited from InternalActor

Inherited from Serializable

Inherited from Serializable

Inherited from InputChannel[Any]

Inherited from ActorCanReply

Inherited from InternalReplyReactor

Inherited from ReactorCanReply

Inherited from Reactor[Any]

Inherited from Combinators

Inherited from AbstractActor

Inherited from CanReply[Any, Any]

Inherited from OutputChannel[Any]

Inherited from AnyRef

Inherited from Any

Ungrouped