BankModel
The BankModel
class defines a simple process-interaction model of a bank where service is provided by one or more tellers. Caveat: must add 'from' and 'to' components before transport!!
Value parameters
- aniRatio
-
the ratio of simulation speed vs. animation speed
- animating
-
whether to animate the model
- nStop
-
the number arrivals before stopping
- name
-
the name of the simulation model
- reps
-
the number of independent replications to run
- stream
-
the base random number stream (0 to 999)
Attributes
- Graph
-
- Supertypes
-
class Modeltrait Componenttrait Locatabletrait Identifiabletrait Modelabletrait Completionclass Coroutinetrait Runnableclass Objecttrait Matchableclass AnyShow all
Members list
Type members
Classlikes
Value members
Inherited methods
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 parameters
- value
-
the value to accumulate
Attributes
- Inherited from:
- Component
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 (priority queue) becomes empty.
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 (priority queue) becomes empty.
Attributes
- Definition Classes
- Inherited from:
- Model
Add component parts to the model.
Add component parts to the model.
Value parameters
- _parts
-
the component parts
Attributes
- Inherited from:
- Model
Add lists of component parts to the model.
Add lists of component parts to the model.
Value parameters
- _parts
-
the lists of component parts (need List rather than VEC)
Attributes
- Inherited from:
- Model
Aggregate the statistics of this component's subparts.
Put a edge command on the animation queue.
Put a edge command on the animation queue.
Value parameters
- at
-
the location of the edge (empty array => implicitly determined)
- color
-
the color the edge
- from
-
the location of the origination node
- shape
-
the shape of the edge
- to
-
the location of the destination node
- what
-
what animation command
- who
-
who is being animated
Attributes
- Inherited from:
- Model
Put a node/token command on the animation queue.
Put a node/token command on the animation queue.
Value parameters
- at
-
the location of the node/token
- color
-
the color the node/token
- shape
-
the shape of the node/token
- what
-
what animation command
- who
-
who is being animated
Attributes
- Inherited from:
- Model
Get the location where this object is currently at.
Set the location of this object.
Set the location of this object.
Value parameters
- at
-
the location of this object
Attributes
- Inherited from:
- Locatable
Cleanup the agenda and any stateful components. Any actors left in the agenda or a wait queue must be terminated. The model (i.e., the director) must be terminated as well.
Cleanup the agenda and any stateful components. Any actors left in the agenda or a wait queue must be terminated. The model (i.e., the director) must be terminated as well.
Attributes
- Inherited from:
- Model
Return the current value of the director's clock.
Indicate whether this component is composite, i.e., has subparts.
Indicate whether this component is composite, i.e., has subparts.
Attributes
- Inherited from:
- Component
Return the Coroutine counts.
Get the director who controls the play/simulation this component is in.
Get the director who controls the play/simulation this component is in.
Attributes
- Inherited from:
- Component
Set this component's director (the controller of the simulation model).
Set this component's director (the controller of the simulation model).
Value parameters
- director
-
the director of the play/simulation
Attributes
- Inherited from:
- Component
Put the components on the animation engine's queue.
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).
Attributes
- Inherited from:
- Component
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
Return the statistical results of the simulation (statistics for each part). This includes the sample/duration statistics and if 'full', time persistent statistics as well.
Return the statistical results of the simulation (statistics for each part). This includes the sample/duration statistics and if 'full', time persistent statistics as well.
Attributes
- Inherited from:
- Model
Signal via the semaphore that the simulation has finished, thereby ending the wait due to calling the waitFinished method.
Signal via the semaphore that the simulation has finished, thereby ending the wait due to calling the waitFinished method.
Attributes
- Inherited from:
- Completion
Return the hashCode as the unique id.
Return the hashCode as the unique id.
Attributes
- Definition Classes
-
Identifiable -> Any
- Inherited from:
- Identifiable
Initialize this component (all of its 'var's).
Initialize this component (all of its 'var's).
Value parameters
- label
-
the name of this component
- loc
-
the location of this component
Attributes
- Inherited from:
- Component
Initialize this component's statistical collectors. Sample statistics: all Component
s. Time-persistent statistics: all except Gate
, Source
and Sink
.
Initialize this component's statistical collectors. Sample statistics: all Component
s. Time-persistent statistics: all except Gate
, Source
and Sink
.
Value parameters
- label
-
the name of this component
Attributes
- Inherited from:
- Component
Interrupt this waiting coroutine.
Check this thread to see if it is virtual.
Return the full identity.
Set the name.
Compare the order of actors based on their 'actTime's.
Compare the order of actors based on their 'actTime's.
Value parameters
- actor1
-
the first actor in comparison
Attributes
- Inherited from:
- Model
Return time persistent statistics for value for this component (e.g. Number in queue).
Return time persistent statistics for value for this component (e.g. Number in queue).
Attributes
- Inherited from:
- Component
Schedule (first time) or reschedule (subsequent times) an actor to act.
Schedule (first time) or reschedule (subsequent times) an actor to act.
Value parameters
- actor
-
the actor to be scheduled
Attributes
- Inherited from:
- Model
Reset the agenda and stateful components for next replication.
For multiple sources and more than one replication otherwise, after one replication, all the sources are already started the first source from agenda will be invoked by the yield to null but the second resource from the won't so needs to be reset
For multiple sources and more than one replication otherwise, after one replication, all the sources are already started the first source from agenda will be invoked by the yield to null but the second resource from the won't so needs to be reset
Attributes
- Inherited from:
- Coroutine
Reset and aggregate all statistics.
Reset and aggregate all statistics.
Value parameters
- rep
-
the current replication (1, ... reps)
- rmax
-
the maximum number of replications/batches
Attributes
- Inherited from:
- Model
Thread's 'run' method delegates to the 'act' method. Upon interruption the 'act' method is run again from the beginning.
Thread's 'run' method delegates to the 'act' method. Upon interruption the 'act' method is run again from the beginning.
Attributes
- Inherited from:
- Coroutine
Get the type of the simulation object.
Execute the simulation (includes scheduling all Sources) returning summary statistics.
Execute the simulation (includes scheduling all Sources) returning summary statistics.
Attributes
- Inherited from:
- Model
Start this coroutine, i.e., invoke its 'run' -> 'act' method.
Indicate whether the model has been stopped.
Tally the duration (e.g., waiting time) of an activity or delay.
Tally the duration (e.g., waiting time) of an activity or delay.
Value parameters
- duration
-
the time duration
Attributes
- Inherited from:
- Component
Return the current acting actor.
Wait for the main simulation Thread/Coroutine to complete. This can used used to time execution of models.
Wait for the main simulation Thread/Coroutine to complete. This can used used to time execution of models.
Attributes
- See also
-
apps.process.Bank2
- Inherited from:
- Completion
Yield control from 'this' to 'that' coroutine.
Yield control from 'this' to 'that' coroutine.
Value parameters
- quit
-
whether 'this' coroutine is to terminate (true) or wait to be resumed (false)
- that
-
the other coroutine to yield control to
Attributes
- Inherited from:
- Coroutine
Inherited fields
The clock that keep track of the current simulation time
The globally unique integer identifier
Simulation execution/termination flag