The Model
class maintains a property graph making up the model and controls the flow of entities (SimAgent
s) through the model, following the agent-based simulation world-view. It maintains a time-ordered priority queue to activate/re-activate each of the entities. Each entity (SimAgent
) is implemented as a Coroutine
and may be thought of as running in its own thread.
Value parameters
- _name
-
the name of this simulation model
- aniRatio
-
the ratio of simulation speed vs. animation speed
- animating
-
whether to animate the model
- reps
-
the number of independent replications
- startSim
-
the start time of this simulation
Attributes
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
-
class BankModelclass CallCenterModelclass Traffic2LModelclass Traffic4LModelclass UGABusRoutesModel
Members list
Type members
Classlikes
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
- Supertypes
-
class SimAgenttrait Topologicaltrait Spatialtrait Temporaltrait Ordered[Temporal]trait Comparable[Temporal]trait Identifiableclass Coroutinetrait Runnableclass Objecttrait Matchableclass AnyShow all
Value members
Concrete methods
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
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
Finish up the simulation.
Finish up the simulation.
Attributes
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
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
Reset the agenda and stateful components for next replication.
Reset the agenda and stateful components for next replication.
Attributes
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
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
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
Execute the simulation (includes scheduling all Sources) returning summary statistics.
Execute the simulation (includes scheduling all Sources) returning summary statistics.
Attributes
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 methods
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
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
Return the full identity.
Get the type of the object.
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