class BankModel extends Model
The BankModel
class defines a simple Event-Scheduling model of a Bank where
service is provided by one teller and models an M/M/1 queue.
- Alphabetic
- By Inheritance
- BankModel
- Model
- Identifiable
- Error
- Modelable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
BankModel(name: String, nArrivals: Int, iArrivalRV: Variate, serviceRV: Variate)
- name
the name of the simulation model
- nArrivals
the number of arrivals to generate (stopping condition)
- iArrivalRV
the inter-arrival time distribution
- serviceRV
the service time distribution
Type Members
-
case class
Arrival(customer: Entity, delay: Double) extends Event with Product with Serializable
Arrival
is a subclass ofEvent
for handling arrival events.Arrival
is a subclass ofEvent
for handling arrival events. The 'occur' method triggers future events and updates the current state.- customer
the entity that arrives, in this case a bank customer
- delay
the time delay for this event's occurrence
-
case class
Departure(customer: Entity, delay: Double) extends Event with Product with Serializable
Departure
is a subclass ofEvent
for handling departure events.Departure
is a subclass ofEvent
for handling departure events. The 'occur' method triggers future events and updates the current state.- customer
the entity that departs, in this case a bank customer
- delay
the time delay for this event's occurrence
Value Members
-
def
addStats(stat: Statistic*): Unit
- Definition Classes
- Model
-
def
animate(who: Identifiable, what: scalation.animation.CommandType.Value, color: Color, shape: Shape, from: Event, to: Event, at: Array[Double]): Unit
- Definition Classes
- Model
-
def
animate(who: Identifiable, what: scalation.animation.CommandType.Value, color: Color, shape: Shape, at: Array[Double]): Unit
- Definition Classes
- Model
-
def
cancel(event: Event): Unit
- Definition Classes
- Model
-
def
clock: Double
- Definition Classes
- Modelable
-
def
equals(that: Any): Boolean
- Definition Classes
- Identifiable → AnyRef → Any
- val firstArrival: Entity
-
final
def
flaw(method: String, message: String): Unit
- Definition Classes
- Error
-
def
getStatistics: ListBuffer[Statistic]
- Definition Classes
- Model
-
def
hashCode(): Int
- Definition Classes
- Identifiable → AnyRef → Any
-
val
id: Int
- Definition Classes
- Identifiable
-
def
leave(entity: Entity): Unit
- Definition Classes
- Model
-
def
me: String
- Definition Classes
- Identifiable
- var nArr: Double
- var nIn: Double
- var nOut: Double
-
def
name: String
- Definition Classes
- Identifiable
-
def
name_=(name: String): Unit
- Definition Classes
- Identifiable
-
def
report(vars: (String, Double)*): Unit
- Definition Classes
- Model
-
def
reportStats(): Unit
- Definition Classes
- Model
-
def
schedule(event: Event): Unit
- Definition Classes
- Model
-
def
simType: String
- Definition Classes
- Identifiable
-
def
simulate(startTime: Double): Unit
- Definition Classes
- Model → Modelable
- val t_a_stat: Statistic
- val t_s_stat: Statistic
- val waitQueue: WaitQueue