Resource

scalation.simulation.agent.Resource
See theResource companion object
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).

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
Graph
Supertypes
trait Statistical
class Vertex
trait Serializable
trait Spatial
trait PartiallyOrdered[Vertex]
trait Identifiable
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

type AsPartiallyOrdered = Function1

Attributes

Inherited from:
PartiallyOrdered

Value members

Concrete methods

inline def busy: Boolean

Determine whether this resource is busy (no units available).

Determine whether this resource is busy (no units available).

Attributes

def changeUnits(agent: SimAgent, dUnits: Int): Unit

Change the number of units in this resource (e.g., add a teller).

Change the number of units in this resource (e.g., add a teller).

Value parameters

dUnits

the number of units to add (+ve) or remove (-ve)

Attributes

def release(agent: SimAgent): Unit

Release one unit of this server after work is finished.

Release one unit of this server after work is finished.

Value parameters

agent

the agent who is finished working with this server

Attributes

def work(agent: SimAgent, duration: Double): Unit

Work with one unit of this server for a period of time (models an activity).

Work with one unit of this server for a period of time (models an activity).

Value parameters

agent

the agent who is working with this server

duration

the agent's given service time (defaults to serviceRV)

Attributes

Inherited methods

def <[B >: Vertex : AsPartiallyOrdered](that: B): Boolean

Attributes

Inherited from:
PartiallyOrdered
def <=[B >: Vertex : AsPartiallyOrdered](that: B): Boolean

Attributes

Inherited from:
PartiallyOrdered
def >[B >: Vertex : AsPartiallyOrdered](that: B): Boolean

Attributes

Inherited from:
PartiallyOrdered
def >=[B >: Vertex : AsPartiallyOrdered](that: B): Boolean

Attributes

Inherited from:
PartiallyOrdered

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
override def equals(that: Any): Boolean

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

Return the center coordinates for this vertex.

Return the center coordinates for this vertex.

Attributes

Inherited from:
Vertex
override def hashCode: Int

Return the hashCode as the unique id.

Return the hashCode as the unique id.

Attributes

Definition Classes
Identifiable -> Any
Inherited from:
Identifiable
def me: String

Return the full identity.

Return the full identity.

Attributes

Inherited from:
Identifiable

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
def s_rescale(factor: Double): VectorD

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
def show(width_: Int): Unit

SHOW/print this table, one tuple per row. Formatting: regular column is 'width_' chars wide, 'X' is double that FIX - currently only works for width_, not width & @param width_ the standard column width

SHOW/print this table, one tuple per row. Formatting: regular column is 'width_' chars wide, 'X' is double that FIX - currently only works for width_, not width & @param width_ the standard column width

Attributes

Inherited from:
Vertex
override def toString: String

Convert this vertex object to a string.

Convert this vertex object to a string.

Attributes

Definition Classes
Vertex -> Spatial -> Any
Inherited from:
Vertex
override def tryCompareTo[B >: Vertex : AsPartiallyOrdered](other: B): Option[Int]

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
Vertex -> Spatial -> PartiallyOrdered
Inherited from:
Vertex
def typeName: String

Get the type of the object.

Get the type of the object.

Attributes

Inherited from:
Identifiable

Inherited fields

val id: Int

Attributes

Inherited from:
Identifiable
val tokens: Set[Topological]

Attributes

Inherited from:
Vertex