CallCenterModel

scalation.simulation.agent.example_1.CallCenterModel
class CallCenterModel(name: String, reps: Int, startSim: Double, animating: Boolean, aniRatio: Double, nStop: Int, stream: Int) extends Model

The CallCenterModel class defines a simple agent-based simulation model of a call center where service is provided by one or more tele-service representatives.

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

startSim

the start time of the simulation

stream

the base random number stream (0 to 999)

Attributes

Graph
Supertypes
class Model
trait Completion
trait Identifiable
class Object
trait Matchable
class Any
Show all

Members list

Type members

Classlikes

case class Call() extends SimAgent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class SimAgent
trait Topological
trait Spatial
trait PartiallyOrdered[Spatial & Topological]
trait Temporal
trait Ordered[Temporal]
trait Comparable[Temporal]
trait Identifiable
class Coroutine
trait Runnable
class Object
trait Matchable
class Any
Show all

Inherited classlikes

class Reporter(actTime: Double) extends SimAgent

The Reporter inner class observes the statistic at a specific time so schedule this reporter.

The Reporter inner class observes the statistic at a specific time so schedule this reporter.

Value parameters

actTime

the activation for the reporter.

Attributes

Inherited from:
Model
Supertypes
class SimAgent
trait Topological
trait Spatial
trait PartiallyOrdered[Spatial & Topological]
trait Temporal
trait Ordered[Temporal]
trait Comparable[Temporal]
trait Identifiable
class Coroutine
trait Runnable
class Object
trait Matchable
class Any
Show all

Value members

Inherited methods

def animate(agent: SimAgent, what: CommandType, color: Color, shape: Shape): Unit

Put a token command (CreateToken, MoveToken or DestroyToken) on the animation queue.

Put a token command (CreateToken, MoveToken or DestroyToken) on the animation queue.

Value parameters

agent

who is being animated

color

the color the token

shape

the shape of the token

what

what animation command

Attributes

Inherited from:
Model
def customReport(statList: ArrayBuffer[Statistical]): Unit

Report (custom) on the statistical results of a simulation run.

Report (custom) on the statistical results of a simulation run.

Value parameters

statList

the list of statistics

Attributes

Inherited from:
Model
override def equals(that: Any): Boolean

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
def finishedup(): Unit

Finish up the simulation.

Finish up the simulation.

Attributes

Inherited from:
Model
def getStatistics: ArrayBuffer[Statistic]

Return the statistical results of the simulation (statistics for each vertex). Includes both sample and time-persistent statistics.

Return the statistical results of the simulation (statistics for each vertex). Includes both sample and time-persistent statistics.

Attributes

Inherited from:
Model
def hasFinished(): Unit

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
override def hashCode: Int

Return the hashCode as the unique id.

Return the hashCode as the unique id.

Attributes

Definition Classes
Identifiable -> Any
Inherited from:
Identifiable
def me: String

Return the full identity.

Return the full identity.

Attributes

Inherited from:
Identifiable
def reschedule(agent: SimAgent, delay: Double): Unit

Reschedule the agent to act (be activated) at agent.time (optionally delayed) for those agents ahead of director.clock.

Reschedule the agent to act (be activated) at agent.time (optionally delayed) for those agents ahead of director.clock.

Value parameters

agent

the agent to be rescheduled

delay

the amount of time to delay the agent's activation time

Attributes

Inherited from:
Model
def reset(): Unit

Reset the agenda and stateful components for next replication.

Reset the agenda and stateful components for next replication.

Attributes

Inherited from:
Model
def resetStats(rep: Int, rmax: Int): Unit

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
def resimulate(firstTime: Boolean, simStart: Double): Unit

Re-simulate over the same components multiple times with different input(source); this is not the same as replication, replication input(source) is the same

Re-simulate over the same components multiple times with different input(source); this is not the same as replication, replication input(source) is the same

Value parameters

firstTime

whether it is the first time

simStart

the time of simulation start

Attributes

Inherited from:
Model
def schedule(agent: SimAgent, delay: Double): Unit

Schedule the agent to act (be activated) at agent.time (optionally delayed).

Schedule the agent to act (be activated) at agent.time (optionally delayed).

Value parameters

agent

the agent to be scheduled

delay

the amount of time to delay the agent's activation time

Attributes

Inherited from:
Model
def simulate(): Unit

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

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

Attributes

Inherited from:
Model
def typeName: String

Get the type of the object.

Get the type of the object.

Attributes

Inherited from:
Identifiable
def waitFinished(): Unit

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
def yield2Next(agent1: SimAgent, quit: Boolean): Unit

Yield to the next agent, i.e., agent1 -- yield-to -> agent2.

Yield to the next agent, i.e., agent1 -- yield-to -> agent2.

Value parameters

agent1

the currently executing agent

quit

whether agent1 wants to quit/terminate

Attributes

Inherited from:
Model

Concrete fields

val drop: Sink
val entry: Source
val hangUp: Sink
val lambda: Double
val mu: Double
val nPhones: Int
val toDrop: Link
val toHangUp: Link
val toPhone: Link

Inherited fields

Attributes

Inherited from:
Model
val id: Int

Attributes

Inherited from:
Identifiable
var rep: Int

Attributes

Inherited from:
Model
val statV: LinkedHashMap[String, VectorD]

The map of statistics vectors records the means of each replication

The map of statistics vectors records the means of each replication

Attributes

Inherited from:
Model