scalation.simulation.agent

Members list

Type members

Classlikes

trait EdgeAgents

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 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.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Link
class Transport
class Gate(name: String, director: Model, time: Double, line: WaitQueue, onTimeRV: Variate, offTimeRV: Variate, open0: Boolean, cap: Int, prop: Property, pos: VectorD) extends SimAgent, Statistical

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 Statistical
class SimAgent
trait Topological
trait Spatial
trait PartiallyOrdered[Spatial & Topological]
trait Temporal
trait Ordered[Temporal]
trait Comparable[Temporal]
trait Identifiable
class Coroutine
trait Runnable
class Object
trait Matchable
class Any
Show all
object Gate extends VertexType

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 VertexType
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any
Show all
Self type
Gate.type
class Junction(name: String, director: Model, jTimeRV: Variate, prop: Property, pos: VectorD) extends Vertex, Statistical

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 Model directing 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 Statistical
class Vertex
trait Serializable
trait Spatial
trait PartiallyOrdered[Vertex]
trait Identifiable
class Object
trait Matchable
class Any
Show all
object Junction extends VertexType

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 VertexType
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any
Show all
Self type
Junction.type
class Link(name: String, director: Model, from: Vertex, to: Vertex, jTimeRV: Variate, prop: Property, shift1: VectorD, shift2: VectorD, shift: Int) extends Edge, EdgeAgents, Statistical

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 Model directing 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 Statistical
trait EdgeAgents
class Edge
trait Serializable
trait Spatial
trait PartiallyOrdered[Spatial]
trait Identifiable
class Object
trait Matchable
class Any
Show all
object Link extends EdgeType

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 EdgeType
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any
Show all
Self type
Link.type
class Model(_name: String, val reps: Int, startSim: Double, animating: Boolean, aniRatio: Double, width: Int, height: Int) extends Identifiable, Completion

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
trait Completion
trait Identifiable
class Object
trait Matchable
class Any
Known subtypes
object Model

The Model companion object provides a shutdown method and methods to add vertex/edge types to the model.

The Model companion object provides a shutdown method and methods to add vertex/edge types to the model.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Model.type
case class Monitor(project: String)

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 Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait QueueOps

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 Object
trait Matchable
class Any
Known subtypes
class Resource(name: String, director: Model, serviceRV: Variate, var units: Int, prop: Property, pos: VectorD) extends Vertex, Statistical

The Resource class provides services to entities (SimAgents).

The Resource class provides services to entities (SimAgents).

Value parameters

director

the Model directing 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 Statistical
class Vertex
trait Serializable
trait Spatial
trait PartiallyOrdered[Vertex]
trait Identifiable
class Object
trait Matchable
class Any
Show all
object Resource extends VertexType

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 VertexType
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any
Show all
Self type
Resource.type
class Route(_name: String, director: Model, k: Int, from: Vertex, to: Vertex, moveRV: Variate, prop: Property) extends Identifiable

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 Model directing 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
trait Identifiable
class Object
trait Matchable
class Any
object SimAgent

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

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
SimAgent.type
abstract class SimAgent(_name: String, _time: Double, director: Model, _pos: VectorD, var loc: (Element, Double), val prop: Map[String, ValueType]) extends Coroutine, Identifiable, Temporal, Spatial, Topological

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 Topological
trait Spatial
trait PartiallyOrdered[Spatial & Topological]
trait Temporal
trait Ordered[Temporal]
trait Comparable[Temporal]
trait Identifiable
class Coroutine
trait Runnable
class Object
trait Matchable
class Any
Show all
Known subtypes
class Customer
class Reporter
class Call
class Car
class Car
class Bus
class Gate
class Source
Show all
class Sink(name: String, director: Model, prop: Property, pos: VectorD) extends Vertex, Statistical

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 Statistical
class Vertex
trait Serializable
trait Spatial
trait PartiallyOrdered[Vertex]
trait Identifiable
class Object
trait Matchable
class Any
Show all
object Sink extends VertexType

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 VertexType
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any
Show all
Self type
Sink.type
class Source(name: String, director: Model, _time: Double, iArrivalRV: Variate, makeEntity: () => SimAgent, units: Int, subtype: Int, prop: Property, pos: VectorD) extends SimAgent, Statistical

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 Statistical
class SimAgent
trait Topological
trait Spatial
trait PartiallyOrdered[Spatial & Topological]
trait Temporal
trait Ordered[Temporal]
trait Comparable[Temporal]
trait Identifiable
class Coroutine
trait Runnable
class Object
trait Matchable
class Any
Show all
object Source extends VertexType

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 VertexType
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any
Show all
Self type
Source.type
trait Statistical(name: String)

The Statistical trait maintain statistical collectors.

The Statistical trait maintain statistical collectors.

Value parameters

name

the name of this statistical object

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Gate
class Junction
class Link
class Resource
class Sink
class Source
class Transport
class WaitQueue
Show all
class Transport(name: String, director: Model, from: Vertex, to: Vertex, moveRV: Variate, prop: Property, shift1: VectorD, shift2: VectorD, shift: Int) extends Edge, EdgeAgents, Statistical

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 Model directing 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 Statistical
trait EdgeAgents
class Edge
trait Serializable
trait Spatial
trait PartiallyOrdered[Spatial]
trait Identifiable
class Object
trait Matchable
class Any
Show all
object Transport extends EdgeType

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 EdgeType
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any
Show all
Self type
Transport.type
class WaitQueue(name: String, director: Model, cap: Int, prop: Property, pos: VectorD) extends Vertex, QueueOps, Statistical

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 Model directing 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 Statistical
trait QueueOps
class Vertex
trait Serializable
trait Spatial
trait PartiallyOrdered[Vertex]
trait Identifiable
class Object
trait Matchable
class Any
Show all
object WaitQueue extends VertexType

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 VertexType
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any
Show all
Self type
WaitQueue.type
class WaitQueue_LCFS(name: String, director: Model, cap: Int, prop: Property, pos: VectorD) extends Vertex, QueueOps, Statistical

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 Model directing 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 Statistical
trait QueueOps
class Vertex
trait Serializable
trait Spatial
trait PartiallyOrdered[Vertex]
trait Identifiable
class Object
trait Matchable
class Any
Show all
object WaitQueue_LCFS extends VertexType

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 VertexType
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any
Show all
Self type
final class monitorTest

Attributes

Supertypes
class Object
trait Matchable
class Any
final class simAgentTest

Attributes

Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def monitorTest(): Unit

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

def simAgentTest(): Unit

The simAgentTest function tests the SimAgent class.

The simAgentTest function tests the SimAgent class.

runMain scalation.simulation.agent.simAgentTest

Attributes