Model

scalation.simulation.event.Model
class Model(name: String, reps: Int, animating: Boolean) extends Modelable, Identifiable

The Model class schedules events and implements the time advance mechanism for simulation model following the event-scheduling world view.

Value parameters

animating

whether to animate the model (only for Event Graphs)

name

the name of the model

reps

the number of independent replications to run (to be implemented)

Attributes

Graph
Supertypes
trait Identifiable
trait Modelable
class Object
trait Matchable
class Any
Known subtypes
class BankModel
class BankModel2
class BankModel3
class MachineModel
class PoissonModel
class SOMEModel
Show all

Members list

Value members

Concrete methods

def addStats(stat: Statistic*): Unit

Add statistical collector to the model.

Add statistical collector to the model.

Value parameters

stat

one or more statistical collectors

Attributes

def animate(who: Identifiable, what: CommandType, 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.

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

def animate(who: Identifiable, what: CommandType, color: Color, shape: Shape, from: Event, to: Event, at: Array[Double]): Unit

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

def cancel(event: Event): Unit

Cancel the specified 'event' so it will not occur.

Cancel the specified 'event' so it will not occur.

Value parameters

event

the event to cancel

Attributes

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

Attributes

def leave(entity: Entity): Unit

Leave the model recording the entity's time in the sYstem.

Leave the model recording the entity's time in the sYstem.

Value parameters

entity

the entity leaving the model

Attributes

def report(vars: (String, Double)*): Unit

Report values of the specified model result/output variables.

Report values of the specified model result/output variables.

Value parameters

vars

the result/output variables for the simulation

Attributes

def reportStats(): Unit

Report statistical results of the simulation for all the collectors.

Report statistical results of the simulation for all the collectors.

Attributes

def schedule(event: Event): Unit

Place an event on the Future Event List 'FEL' for later execution, thus scheduling the event to occur sometime in the future. Events are ordered by their event/act time.

Place an event on the Future Event List 'FEL' for later execution, thus scheduling the event to occur sometime in the future. Events are ordered by their event/act time.

Value parameters

event

the event to schedule

Attributes

def simulate(startTime: Double): Unit

Run the simulation by iteratively processing events in time order. Requires at least one to already be scheduled (see next method).

Run the simulation by iteratively processing events in time order. Requires at least one to already be scheduled (see next method).

Value parameters

startTime

the time at which the simulation is to begin

Attributes

Inherited methods

def clock: Double

Return the current value of the director's clock.

Return the current value of the director's clock.

Attributes

Inherited from:
Modelable
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
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 name_=(name: String): Unit

Set the name.

Set the name.

Value parameters

name

the name to assign

Attributes

Inherited from:
Identifiable
def simType: String

Get the type of the simulation object.

Get the type of the simulation object.

Attributes

Inherited from:
Identifiable

Inherited fields

protected var _clock: Double

The clock that keep track of the current simulation time

The clock that keep track of the current simulation time

Attributes

Inherited from:
Modelable
val id: Int

The globally unique integer identifier

The globally unique integer identifier

Attributes

Inherited from:
Identifiable
protected var simulating: Boolean

Simulation execution/termination flag

Simulation execution/termination flag

Attributes

Inherited from:
Modelable