scalation.process

Model

class Model extends Actor with Signals with ModelT with Component

The Model class maintains a list of components making up the model and controls the flow of entities (SimActors) through the model, following the process-interaction world-view. It maintains a time-ordered priority queue to activate/re-activate each of the entities. Each entity (SimActor) is implemeneted as a Scala Actor and therefore runs in its own thread.

Linear Supertypes
Component, Identity, Error, ModelT, Signals, Actor, Serializable, Serializable, InputChannel[Any], ActorCanReply, ReplyReactor, ReactorCanReply, Reactor[Any], Combinators, AbstractActor, CanReply[Any, Any], OutputChannel[Any], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Model
  2. Component
  3. Identity
  4. Error
  5. ModelT
  6. Signals
  7. Actor
  8. Serializable
  9. Serializable
  10. InputChannel
  11. ActorCanReply
  12. ReplyReactor
  13. ReactorCanReply
  14. Reactor
  15. Combinators
  16. AbstractActor
  17. CanReply
  18. OutputChannel
  19. AnyRef
  20. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Model(name: String, animation: Boolean = true)

    name

    the name of the model

    animation

    whether to animate the model

Type Members

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

    Definition Classes
    ReactorCanReply → CanReply

Value Members

  1. def !(msg: Any): Unit

    Definition Classes
    ReplyReactor → 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. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  11. def ?: Any

    Definition Classes
    Actor → InputChannel
  12. val DIAM: Double

    Diameter of a token (for animating entities)

    Diameter of a token (for animating entities)

    Definition Classes
    Component
  13. val RAD: Double

    Radius of a token (for animating entities)

    Radius of a token (for animating entities)

    Definition Classes
    Component
  14. val RESUME_ACTOR: String

    Definition Classes
    Signals
  15. val RESUME_DIRECTOR: String

    Definition Classes
    Signals
  16. val RETURN_RESULTS: String

    Definition Classes
    Signals
  17. 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
  18. def accumulate(value: Double, time: Double): Unit

    Accumulate the value (e.

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

    value

    the value to accumulate

    time

    the current time of the observation

    Definition Classes
    Component
  19. def act(): Unit

    The model itself is an Actor (not an ordinary SimActor) and may be thought of as the director.

    The model itself is an Actor (not an ordinary SimActor) and may be thought of as the director. The director iteratively manages the clock and the agenda of actors until the simulation flag becomes false or the agenda becomes empty.

    Definition Classes
    Model → Reactor
  20. def addComponents(_parts: List[Component]): Unit

    Add the component parts to the model.

    Add the component parts to the model.

    _parts

    the component parts

  21. def animate(who: Identity, what: Value, color: Color, shape: Shape, from: Component, to: Component, 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)

  22. 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

  23. var animating: Boolean

    Animation execution flag

    Animation execution flag

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

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

    Return where this component is at (its location).

    Return where this component is at (its location).

    Definition Classes
    Component
  26. def clock: Double

    Return the current value of the director's clock.

    Return the current value of the director's clock.

    Definition Classes
    ModelT
  27. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  28. def continue(): Unit

    Definition Classes
    Combinators
  29. 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
  30. def display(): Unit

    Put the components on the animation engine's queue.

    Put the components on the animation engine's queue.

    Definition Classes
    ModelComponent
  31. 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
  32. final def eq(arg0: AnyRef): Boolean

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

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

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

    Attributes
    protected[actors]
    Definition Classes
    Actor → Reactor
  36. def exit(reason: AnyRef): Nothing

    Attributes
    protected[actors]
    Definition Classes
    Actor
  37. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  38. 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
  39. def forward(msg: Any): Unit

    Definition Classes
    ReplyReactor → Reactor → OutputChannel
  40. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  41. def getState: Value

    Definition Classes
    Actor → ReplyReactor → Reactor
  42. 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
  43. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  44. def id: Int

    Get the id (unique identifier).

    Get the id (unique identifier).

    Definition Classes
    Identity
  45. 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
  46. def initStats(label: String): Unit

    Initialize this component's statistical collectors.

    Initialize this component's statistical collectors.

    label

    the name of this component

    Definition Classes
    Component
  47. final def isInstanceOf[T0]: Boolean

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

    Definition Classes
    Actor
  49. def link(to: AbstractActor): AbstractActor

    Definition Classes
    Actor
  50. def loop(body: ⇒ Unit): Unit

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

    Definition Classes
    Combinators
  52. def mailboxSize: Int

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

    Return the full identity.

    Return the full identity.

    Definition Classes
    Identity
  54. implicit def mkBody[A](body: ⇒ A): Body[A]

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

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

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

    Definition Classes
    AnyRef
  58. def orderedActor(actor1: SimActor): Ordered[SimActor]

    Compare the order of actors based on their actTime.

    Compare the order of actors based on their actTime.

    actor1

    the first actor in comparison

  59. 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
  60. def react(handler: PartialFunction[Any, Unit]): Nothing

    Definition Classes
    Actor → InputChannel → ReplyReactor → Reactor
  61. def reactWithin(msec: Long)(handler: PartialFunction[Any, Unit]): Nothing

    Definition Classes
    Actor → InputChannel → ReplyReactor
  62. def receive[R](f: PartialFunction[Any, R]): R

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

    Definition Classes
    Actor → InputChannel
  64. def receiver: Actor

    Definition Classes
    Reactor → OutputChannel
  65. def reply(msg: Any): Unit

    Attributes
    protected[actors]
    Definition Classes
    ReplyReactor
  66. def report: Unit

    Report on the statistical results of the simulation.

    Report on the statistical results of the simulation.

    Definition Classes
    ModelModelT
  67. def reschedule(actor: SimActor): Unit

    Schedule (first time) or reschedule (subsequent times) an actor to act.

    Schedule (first time) or reschedule (subsequent times) an actor to act.

    actor

    the actor to be scheduled

  68. def restart(): Unit

    Definition Classes
    Reactor
  69. def scheduler: IScheduler

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

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

    Attributes
    protected[actors]
    Definition Classes
    ReplyReactor
  72. def setAt(loc: Array[Double]): Unit

    Set the location of this component.

    Set the location of this component.

    loc

    the location of this component

    Definition Classes
    Component
  73. 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
  74. def setName(label: String): Unit

    Set the name.

    Set the name.

    label

    the name to assign

    Definition Classes
    Identity
  75. def simType: String

    Get the type of the simulation object.

    Get the type of the simulation object.

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

    Execute the simulation (includes scheduling all Sources) returning summary statistics.

    Execute the simulation (includes scheduling all Sources) returning summary statistics.

    startTime

    the time at which the simulation is to begin

    Definition Classes
    ModelModelT
  77. var simulating: Boolean

    Simulation execution/termination flag

    Simulation execution/termination flag

    Attributes
    protected
    Definition Classes
    ModelT
  78. def start(): Actor

    Definition Classes
    Actor → Reactor
  79. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  80. 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
  81. def theActor: SimActor

    Return the current acting actor.

  82. def toString(): String

    Definition Classes
    AnyRef → Any
  83. var trapExit: Boolean

    Definition Classes
    Actor
  84. def unlink(from: AbstractActor): Unit

    Definition Classes
    Actor
  85. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Component

Inherited from Identity

Inherited from Error

Inherited from ModelT

Inherited from Signals

Inherited from Actor

Inherited from Serializable

Inherited from Serializable

Inherited from InputChannel[Any]

Inherited from ActorCanReply

Inherited from ReplyReactor

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