scalation.simulation.agent
Members list
Packages
Type members
Classlikes
The EdgeAgents trait keeps track of which agents are on a particular edge, e.g., Link, Transport. It also allows agents to be found based on their location on a edge.
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).
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
- Supertypes
-
trait Statisticalclass SimAgenttrait Topologicaltrait Spatialtrait Temporaltrait Ordered[Temporal]trait Comparable[Temporal]trait Identifiableclass Coroutinetrait Runnableclass Objecttrait Matchableclass AnyShow all
The Gate companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
The Gate companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
Attributes
- Companion
- class
- Supertypes
-
class VertexTypetrait Serializabletrait Identifiableclass Objecttrait Matchableclass AnyShow all
- Self type
-
Gate.type
The Junction class provides a connector between two Transports/Routes. Since Lines and QCurves have limitations (e.g., hard to make a loop back), a junction may be needed.
The Junction class provides a connector between two Transports/Routes. Since Lines and QCurves have limitations (e.g., hard to make a loop back), a junction may be needed.
Value parameters
- director
-
the
Modeldirecting the simulation - jTimeRV
-
the jump-time through the junction
- name
-
the name of this junction
- pos
-
the Euclidean coordinates of this junction
- prop
-
the properties of this junction
Attributes
- Companion
- object
- Supertypes
-
trait Statisticalclass Vertextrait Serializabletrait Spatialtrait PartiallyOrdered[Vertex]trait Identifiableclass Objecttrait Matchableclass AnyShow all
The Junction companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
The Junction companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
Attributes
- Companion
- class
- Supertypes
-
class VertexTypetrait Serializabletrait Identifiableclass Objecttrait Matchableclass AnyShow all
- Self type
-
Junction.type
The Link class provides a pathway between two vertices (jump through an edge).
The Link class provides a pathway between two vertices (jump through an edge).
Value parameters
- director
-
the
Modeldirecting the simulation - from
-
the first/starting vertex
- jTimeRV
-
the jump time random variate
- name
-
the name of this link
- prop
-
the properties (Map) of this link
- shift
-
the orthogonal shift of the edge - FIX - make shifting more uniform
- shift1
-
the x-y shift for the transport's first end-point (from-side)
- shift2
-
the x-y shift for the transport's second end-point (to-side)
- to
-
the second/ending vertex
Attributes
- Companion
- object
- Supertypes
-
trait Statisticaltrait EdgeAgentsclass Edgetrait Serializabletrait Spatialtrait PartiallyOrdered[Spatial]trait Identifiableclass Objecttrait Matchableclass AnyShow all
The Link companion object establishes itself as a EdgeType and provides a method of collecting its edge instances.
The Link companion object establishes itself as a EdgeType and provides a method of collecting its edge instances.
Attributes
- Companion
- class
- Supertypes
-
class EdgeTypetrait Serializabletrait Identifiableclass Objecttrait Matchableclass AnyShow all
- Self type
-
Link.type
The Model class maintains a property graph making up the model and controls the flow of entities (SimAgents) 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.
The Model class maintains a property graph making up the model and controls the flow of entities (SimAgents) 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
- Supertypes
- Known subtypes
-
class BankModelclass CallCenterModelclass Traffic2LModelclass Traffic4LModelclass UGABusRoutesModel
The Model companion object provides a shutdown method and methods to add vertex/edge types to the model.
The Monitor class is used to trace the actions/events in the models.
The Monitor class is used to trace the actions/events in the models.
Value parameters
- project
-
the project to be monitored
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The QueueOps trait specifies operations to be supported by wait queues.
The QueueOps trait specifies operations to be supported by wait queues.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class WaitQueueclass WaitQueue_LCFS
The Resource class provides services to entities (SimAgents).
The Resource class provides services to entities (SimAgents).
Value parameters
- director
-
the
Modeldirecting the simulation - name
-
the name of this server
- pos
-
the Euclidean coordinates of this server
- prop
-
the properties of this server
- serviceRV
-
the service time random variate
- units
-
the number of service units (e.g., bank tellers)
Attributes
- Companion
- object
- Supertypes
-
trait Statisticalclass Vertextrait Serializabletrait Spatialtrait PartiallyOrdered[Vertex]trait Identifiableclass Objecttrait Matchableclass AnyShow all
The Resource companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
The Resource companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
Attributes
- Companion
- class
- Supertypes
-
class VertexTypetrait Serializabletrait Identifiableclass Objecttrait Matchableclass AnyShow all
- Self type
-
Resource.type
The Route class provides a multi-lane pathway between two vertices (motion on multiple edges). A Route is a composite edge that bundles several Transports.
The Route class provides a multi-lane pathway between two vertices (motion on multiple edges). A Route is a composite edge that bundles several Transports.
Value parameters
- _name
-
the name of the route
- director
-
the
Modeldirecting the simulation - from
-
the starting vertex
- k
-
the number of lanes/transports in the route
- moveRV
-
the movement random variate
- prop
-
the properties (Map) of this transport
- to
-
the ending vertex
Attributes
- Supertypes
The SimAgent companion object provides static information for the class. The director keeps track of the current number of live agents (nAgents). Gates are not considered live, since they simply cycle until the simulation ends. Sources are considered live, since they produce application agents and terminate when their production finishes.
The SimAgent companion object provides static information for the class. The director keeps track of the current number of live agents (nAgents). Gates are not considered live, since they simply cycle until the simulation ends. Sources are considered live, since they produce application agents and terminate when their production finishes.
Attributes
The SimAgent abstract class represents entities that are active in the model. The act abstract method, which specifies entity behavior, must be defined for each subclass. Each SimAgent extends extends Coroutine and may be roughly thought of as running in its own thread/virtual-thread. SimAgent adds knowledge of its own properties, the agents it follows, and the component it is currently at.
The SimAgent abstract class represents entities that are active in the model. The act abstract method, which specifies entity behavior, must be defined for each subclass. Each SimAgent extends extends Coroutine and may be roughly thought of as running in its own thread/virtual-thread. SimAgent adds knowledge of its own properties, the agents it follows, and the component it is currently at.
Value parameters
- _name
-
the name of this simulation agent (name from
Identifiable) - _pos
-
the position (Euclidean coordinates) of this agent
- _time
-
the activation time for this agent
- director
-
the director controlling the model
- loc
-
the location (graph coordinates) of this agent
- prop
-
the properties (Map) for this agent, e.g., color, weight
Attributes
- Companion
- object
- Supertypes
-
trait Topologicaltrait Spatialtrait Temporaltrait Ordered[Temporal]trait Comparable[Temporal]trait Identifiableclass Coroutinetrait Runnableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
The Sink class is used to terminate entities SimAgents when they are finished.
The Sink class is used to terminate entities SimAgents when they are finished.
Value parameters
- director
-
the director controlling the model
- name
-
the name of this sink
- pos
-
the position (Euclidean coordinate) of this sink
- prop
-
the properties of this sink
Attributes
- Companion
- object
- Supertypes
-
trait Statisticalclass Vertextrait Serializabletrait Spatialtrait PartiallyOrdered[Vertex]trait Identifiableclass Objecttrait Matchableclass AnyShow all
The Sink companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
The Sink companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
Attributes
- Companion
- class
- Supertypes
-
class VertexTypetrait Serializabletrait Identifiableclass Objecttrait Matchableclass AnyShow all
- Self type
-
Sink.type
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.
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
- Supertypes
-
trait Statisticalclass SimAgenttrait Topologicaltrait Spatialtrait Temporaltrait Ordered[Temporal]trait Comparable[Temporal]trait Identifiableclass Coroutinetrait Runnableclass Objecttrait Matchableclass AnyShow all
The Source companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
The Source companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
Attributes
- Companion
- class
- Supertypes
-
class VertexTypetrait Serializabletrait Identifiableclass Objecttrait Matchableclass AnyShow all
- Self type
-
Source.type
The Statistical trait maintain statistical collectors.
The Statistical trait maintain statistical collectors.
Value parameters
- name
-
the name of this statistical object
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
The Transport class provides a pathway between two vertices (motion on an edge).
The Transport class provides a pathway between two vertices (motion on an edge).
Value parameters
- director
-
the
Modeldirecting the simulation - from
-
the first/starting vertex
- moveRV
-
the movement random variate
- name
-
the name of this transport
- prop
-
the properties (Map) of this transport
- shift
-
the orthogonal shift of the edge - FIX - make shifting more uniform
- shift1
-
the x-y shift for the transport's first end-point (from-side)
- shift2
-
the x-y shift for the transport's second end-point (to-side)
- to
-
the second/ending vertex
Attributes
- Companion
- object
- Supertypes
-
trait Statisticaltrait EdgeAgentsclass Edgetrait Serializabletrait Spatialtrait PartiallyOrdered[Spatial]trait Identifiableclass Objecttrait Matchableclass AnyShow all
The Transport companion object establishes itself as a EdgeType and provides a method of collecting its edge instances.
The Transport companion object establishes itself as a EdgeType and provides a method of collecting its edge instances.
Attributes
- Companion
- class
- Supertypes
-
class EdgeTypetrait Serializabletrait Identifiableclass Objecttrait Matchableclass AnyShow all
- Self type
-
Transport.type
The WaitQueue class is a wrapper for Scala's Queue class, which supports First-Come, First-Serve 'FCSC' Queues. It adds monitoring capabilities and optional capacity restrictions. If the queue is full, entities (SimAgents) attempting to enter the queue are 'barred'. At the model level, such entities may be (1) held in place, (2) take an alternate route, or (3) be lost (e.g., dropped call/packet).
The WaitQueue class is a wrapper for Scala's Queue class, which supports First-Come, First-Serve 'FCSC' Queues. It adds monitoring capabilities and optional capacity restrictions. If the queue is full, entities (SimAgents) attempting to enter the queue are 'barred'. At the model level, such entities may be (1) held in place, (2) take an alternate route, or (3) be lost (e.g., dropped call/packet).
Value parameters
- cap
-
the capacity of the queue (defaults to unbounded)
- director
-
the
Modeldirecting the simulation - name
-
the name of this wait-queue
- pos
-
the Euclidean coordinates for this wait-queue
- prop
-
the properties of this wait-queue
Attributes
- Companion
- object
- Supertypes
-
trait Statisticaltrait QueueOpsclass Vertextrait Serializabletrait Spatialtrait PartiallyOrdered[Vertex]trait Identifiableclass Objecttrait Matchableclass AnyShow all
The WaitQueue companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
The WaitQueue companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
Attributes
- Companion
- class
- Supertypes
-
class VertexTypetrait Serializabletrait Identifiableclass Objecttrait Matchableclass AnyShow all
- Self type
-
WaitQueue.type
The WaitQueue_LCFS class is a wrapper for Scala's Stack class, which supports Last-Come, First-Serve 'LCSC' Queues. It adds monitoring capabilities and optional capacity restrictions. If the queue is full, entities (SimAgents) attempting to enter the queue are 'barred'. At the model level, such entities may be (1) held in place, (2) take an alternate route, or (3) be lost (e.g., dropped call/packet).
The WaitQueue_LCFS class is a wrapper for Scala's Stack class, which supports Last-Come, First-Serve 'LCSC' Queues. It adds monitoring capabilities and optional capacity restrictions. If the queue is full, entities (SimAgents) attempting to enter the queue are 'barred'. At the model level, such entities may be (1) held in place, (2) take an alternate route, or (3) be lost (e.g., dropped call/packet).
Value parameters
- cap
-
the capacity of the queue (defaults to unbounded)
- director
-
the
Modeldirecting the simulation - name
-
the name of this wait-queue
- pos
-
the Euclidean coordinates for this wait-queue
- prop
-
the properties of this wait-queue
Attributes
- Companion
- object
- Supertypes
-
trait Statisticaltrait QueueOpsclass Vertextrait Serializabletrait Spatialtrait PartiallyOrdered[Vertex]trait Identifiableclass Objecttrait Matchableclass AnyShow all
The WaitQueue_LCFS companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
The WaitQueue_LCFS companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.
Attributes
- Companion
- class
- Supertypes
-
class VertexTypetrait Serializabletrait Identifiableclass Objecttrait Matchableclass AnyShow all
- Self type
-
WaitQueue_LCFS.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Concrete methods
The MonitorTest function is used to test the Monitor class.
The MonitorTest function is used to test the Monitor class.
runMain scalation.simulation.agent.monitorTest
Attributes
The simAgentTest function tests the SimAgent class.
The simAgentTest function tests the SimAgent class.
runMain scalation.simulation.agent.simAgentTest