The Source
class is used to periodically inject entities (SimAgent
) into a running simulation model. Will act as an arrival generator. Source is both a simulation Vertex
and special SimAgent
and therefore runs in own thread.
Value parameters
- _time
-
the activation time for this source
- director
-
the director controlling the model
- iArrivalRV
-
the inter-arrival time distribution
- makeEntity
-
the function to make entities of a specified type
- name
-
the name of this source
- pos
-
the position (Euclidean coordinates) of this source
- prop
-
the properties of this source
- subtype
-
the subtype can be used for behavior specialization
- units
-
the number of entities to make
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Statisticalclass SimAgenttrait Topologicaltrait Spatialtrait Temporaltrait Ordered[Temporal]trait Comparable[Temporal]trait Identifiableclass Coroutinetrait Runnableclass Objecttrait Matchableclass AnyShow all
Members list
Type members
Inherited types
Attributes
- Inherited from:
- PartiallyOrdered
Value members
Concrete methods
The Source
s as special SimAgent
will act over time to make entities (other SimAgent
s).
The Source
s as special SimAgent
will act over time to make entities (other SimAgent
s).
Attributes
Compare two spatial objects based on their space coordinates.
Compare two spatial objects based on their space coordinates.
Value parameters
- other
-
the other item to compare with this item
Attributes
- Definition Classes
Inherited methods
Attributes
- Inherited from:
- PartiallyOrdered
Attributes
- Inherited from:
- PartiallyOrdered
Attributes
- Inherited from:
- PartiallyOrdered
Attributes
- Inherited from:
- PartiallyOrdered
Compare two temporal objects based on their time coordinate.
Compare two temporal objects based on their time coordinate.
Value parameters
- other
-
the other item to compare with this item
Attributes
- Inherited from:
- Temporal
Return the Coroutine counts.
Return sample statistics for durations for this component (e.g., Time in queue).
Return sample statistics for durations for this component (e.g., Time in queue).
Attributes
- Inherited from:
- Statistical
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
Find the SimAgent
ahead (e.g., to follow). Must be nearest ahead in your element.
Find the SimAgent
ahead (e.g., to follow). Must be nearest ahead in your element.
Value parameters
- d
-
the maximum allowed distance to be considered in the neighborhood
Attributes
- Inherited from:
- SimAgent
Return the hashCode as the unique id.
Return the hashCode as the unique id.
Attributes
- Definition Classes
-
Identifiable -> Any
- Inherited from:
- Identifiable
Interrupt this waiting coroutine.
Check this thread to see if it is virtual.
Return the full identity.
Return the topological objects/tokens in the neighborhood of this token within distance d.
Return the topological objects/tokens in the neighborhood of this token within distance d.
Value parameters
- d
-
the maximum allowed distance to be considered in the neighborhood
Attributes
- Inherited from:
- Topological
Return the topological objects/tokens in the neighborhood of this token.
Return the topological objects/tokens in the neighborhood of this token.
Attributes
- Inherited from:
- Topological
Return time persistent statistics for value for this component (e.g. Number in queue).
Return time persistent statistics for value for this component (e.g. Number in queue).
Attributes
- Inherited from:
- Statistical
Rescale from actual-time (e.g., minutes) to animation-time (milliseconds).
Rescale from actual-time (e.g., minutes) to animation-time (milliseconds).
Value parameters
- factor
-
the time rescaling factor
Attributes
- Inherited from:
- Temporal
Reorient the simulation agent behind when making a change (e.g., exit, turn or lane change).
Reorient the simulation agent behind when making a change (e.g., exit, turn or lane change).
Attributes
- Inherited from:
- SimAgent
For multiple sources and more than one replication otherwise, after one replication, all the sources are already started the first source from agenda will be invoked by the yield to null but the second resource from the won't so needs to be reset
For multiple sources and more than one replication otherwise, after one replication, all the sources are already started the first source from agenda will be invoked by the yield to null but the second resource from the won't so needs to be reset
Attributes
- Inherited from:
- Coroutine
Thread's 'run' method delegates to the 'act' method. Upon interruption the 'act' method is run again from the beginning.
Thread's 'run' method delegates to the 'act' method. Upon interruption the 'act' method is run again from the beginning.
Attributes
- Inherited from:
- Coroutine
Rescale from actual-position (e.g., world-coordinates) to animation-position (screen-coordinates).
Rescale from actual-position (e.g., world-coordinates) to animation-position (screen-coordinates).
Value parameters
- factor
-
the space rescaling factor
Attributes
- Inherited from:
- Spatial
Set the initial position of this agent using the given x and y coordinates. Add half width and height to position center rather than top-left.
Set the initial position of this agent using the given x and y coordinates. Add half width and height to position center rather than top-left.
Value parameters
- x
-
the x-coordinate
- y
-
the y-coordinate
Attributes
- Inherited from:
- SimAgent
Start this coroutine, i.e., invoke its 'run' -> 'act' method.
Convert the simulation agent to a string.
Get the type of the object.
Update the location of this agent by moving distance units along the given edge.
Update the location of this agent by moving distance units along the given edge.
Value parameters
- distance
-
the incremental distance to move along the edge
- edge
-
the current edge (typically the same one it was on)
Attributes
- Inherited from:
- SimAgent
Update the position of this agent by moving distance units in the direction determined by the angle.
Update the position of this agent by moving distance units in the direction determined by the angle.
Value parameters
- angle
-
the angle/direction to move in (0 radians => move right)
- distance
-
the incremental distance to move
Attributes
- Inherited from:
- SimAgent
Yield control TO the director so the director can take the next action. For efficiency, can yield THROUGH the director to the next agent, rather than TO the director itself. CURRENTLY ONLY THROUGH WORKS.
Yield control TO the director so the director can take the next action. For efficiency, can yield THROUGH the director to the next agent, rather than TO the director itself. CURRENTLY ONLY THROUGH WORKS.
Value parameters
- quit
-
the flag indicating whether this agent is done
Attributes
- Inherited from:
- SimAgent
Yield control from 'this' to 'that' coroutine.
Yield control from 'this' to 'that' coroutine.
Value parameters
- quit
-
whether 'this' coroutine is to terminate (true) or wait to be resumed (false)
- that
-
the other coroutine to yield control to
Attributes
- Inherited from:
- Coroutine
Inherited fields
Attributes
- Inherited from:
- Topological
Attributes
- Inherited from:
- Topological
Attributes
- Inherited from:
- Identifiable