class Model extends Modelable with Identifiable
The Model
class schedules events and implements the time advance mechanism
for simulation model following the event-scheduling world view.
- Alphabetic
- By Inheritance
- Model
- Identifiable
- Error
- Modelable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Model(name: String, animating: Boolean = false)
- name
the name of the model
- animating
whether to animate the model (only for Event Graphs)
Value Members
-
def
addStats(stat: Statistic*): Unit
Add statistical collector to the model.
Add statistical collector to the model.
- stat
one or more statistical collectors
-
def
animate(who: Identifiable, what: animation.CommandType.Value, color: Color, shape: Shape, from: Event, to: Event, 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)
-
def
animate(who: Identifiable, what: animation.CommandType.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
-
def
cancel(event: Event): Unit
Cancel the specified 'event' so it will not occur.
Cancel the specified 'event' so it will not occur.
- event
the event to cancel
-
def
clock: Double
Return the current value of the director's clock.
Return the current value of the director's clock.
- Definition Classes
- Modelable
-
def
equals(that: Any): Boolean
- Definition Classes
- Identifiable → AnyRef → Any
-
final
def
flaw(method: String, message: String): Unit
- Definition Classes
- Error
-
def
getStatistics: ListBuffer[Statistic]
Return the statistical results of the simulation (statistics for each part).
-
def
hashCode(): Int
- Definition Classes
- Identifiable → AnyRef → Any
-
val
id: Int
- Definition Classes
- Identifiable
-
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.
- entity
the entity leaving the model
-
def
me: String
- Definition Classes
- Identifiable
-
def
name: String
- Definition Classes
- Identifiable
-
def
name_=(name: String): Unit
- Definition Classes
- Identifiable
-
def
report(vars: (String, Double)*): Unit
Report values of the specified model result/output variables.
Report values of the specified model result/output variables.
- vars
the result/output variables for the simulation
-
def
reportStats(): Unit
Report statistical results of the simulation for all the collectors.
-
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.
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.
- event
the event to schedule
-
def
simType: String
- Definition Classes
- Identifiable
-
def
simulate(startTime: Double = 0.0): Unit
Run the simulation by iteratively processing events in time order.