The Gate
class models the operation of gate that can open and closed. When the gate is open, entities can flow through and when closed, they cannot. They may wait in a queue or go elsewhere. A gate can model a traffic light (green => open, red => closed).
Value parameters
- cap
-
the maximum number of entities that will be released when the gate is opened
- director
-
the model/container for this gate
- line
-
the queue holding entities waiting for this gate to open
- name
-
the name of the gate
- offTimeRV
-
distribution of time that gate will be closed
- onTimeRV
-
distribution of time that gate will be open
- open0
-
whether the gate is initially closed (false) or open (true)
- pos
-
the position (Euclidean coordinates) of this gate
- prop
-
the properties of this gate
- time
-
the activation time for this gate
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
Specifies how the gate is controlled, cycling through open/green to closed/red.
Specifies how the gate is controlled, cycling through open/green to closed/red.
Attributes
Returns a Double for the amount of time the gate should stay open or closed based on whether or not the gate is open or closed
Returns a Double for the amount of time the gate should stay open or closed based on whether or not the gate is open or closed
Attributes
Toggles the value of open.
Toggles the value of open.
Attributes
Return the current color of the gate which indicates (within the animation) whether the gate is open or closed.
Return the current color of the gate which indicates (within the animation) whether the gate is open or closed.
Attributes
Return whether the gate is open (e.g., traffic light is red).
Return whether the gate is open (e.g., traffic light is red).
Attributes
Release the gate after service is finished and schedule the agents in the waiting queue up to cap.
Release the gate after service is finished and schedule the agents in the waiting queue up to cap.
Attributes
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.
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 from:
- SimAgent
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