Resource

scalation.simulation.agent.Resource
See theResource companion class
object Resource extends VertexType

The Resource companion object establishes itself as a VertexType and provides a method of collecting its vertex instances.

Attributes

Companion
class
Graph
Supertypes
class VertexType
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any
Show all
Self type
Resource.type

Members list

Value members

Concrete methods

def add(server: Resource): Unit

Add the server vertex to the Resource vertex type.

Add the server vertex to the Resource vertex type.

Value parameters

server

the server vertex to add

Attributes

def at(xy: (Double, Double)): VectorD

Return the position extended with the wh = (width, height).

Return the position extended with the wh = (width, height).

Value parameters

xy

the coordinates for the server

Attributes

def group(director: Model, serviceRV: Variate, prop: Property, xy: (Double, Double), rsc: (String, Int, (Double, Double))*): ArrayBuffer[Resource]

Create a group of related resources using defaults for width 'w' and height 'h'.

Create a group of related resources using defaults for width 'w' and height 'h'.

Value parameters

director

the Model directing the simulation

prop

the properties of these servers

rsc

repeated resource specific info: <name, units, offset>

serviceRV

the service time distribution

xy

the (x, y) coordinates for the top-left corner of the reference resource.

Attributes

Inherited methods

inline def -(vt2: VertexType): VertexType

Attributes

Inherited from:
VertexType
def <(pname: String, pval: Double): VertexType

Return the vertices where property pname is less than value pval.

Return the vertices where property pname is less than value pval.

Value parameters

pname

the property name

pval

the property value

Attributes

Inherited from:
VertexType
def ==(pname: String, pval: ValueType): VertexType

Return the vertices where property pname has value pval.

Return the vertices where property pname has value pval.

Value parameters

pname

the property name

pval

the property value

Attributes

Inherited from:
VertexType
def add(vs: Vertex*): Unit

Add vertices into the existing list of vertices in this vertex-type.

Add vertices into the existing list of vertices in this vertex-type.

Value parameters

vs

the vertex to insert

Attributes

Inherited from:
VertexType
def buildIndex(pkey: String): Unit

Build the index for the primary key.

Build the index for the primary key.

Value parameters

pkey

the property designated as the primary key

Attributes

Inherited from:
VertexType
def check: Boolean

Check that the properties names are in the schema for this vertex-type, returning whether they match the schema.

Check that the properties names are in the schema for this vertex-type, returning whether they match the schema.

Attributes

Inherited from:
VertexType
def checkMissing(pname: String): Boolean

Check whether the given property name is defined for all the vertices in this vertex-type. Useful check before, groupBy and project operators.

Check whether the given property name is defined for all the vertices in this vertex-type. Useful check before, groupBy and project operators.

Value parameters

pname

the given property name

Attributes

Inherited from:
VertexType

Delete a single vertex from the existing list of vertices in this vertex-type, returning the updated vertex type/set.

Delete a single vertex from the existing list of vertices in this vertex-type, returning the updated vertex type/set.

Value parameters

v

the vertex to delete

Attributes

Inherited from:
VertexType

Make all the vectices in this vertex-type distinct, i.e., no duplicate vertices.

Make all the vectices in this vertex-type distinct, i.e., no duplicate vertices.

Attributes

Inherited from:
VertexType
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
def find(key: ValueType): Vertex

Find the unique vertex based on the primary key.

Find the unique vertex based on the primary key.

Value parameters

key

the primary key

Attributes

Inherited from:
VertexType
def groupBy(pname: String, agg_name: String, agg_fn: Double => Double): VertexType

Group the vertices within this vertex-type by the values of the given property name and apply the aggregate function agg_fn on the agg_name property.

Group the vertices within this vertex-type by the values of the given property name and apply the aggregate function agg_fn on the agg_name property.

Value parameters

agg_fn

the aggrgate function

agg_name

the property name for the aggregate

pname

the property name on which to group

Attributes

Inherited from:
VertexType
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

Insert a single vertex into the existing list of vertices in this vertex-type, returning the updated vertex type/set.

Insert a single vertex into the existing list of vertices in this vertex-type, returning the updated vertex type/set.

Value parameters

v

the vertex to insert

Attributes

Inherited from:
VertexType
infix def intersect(vt2: VertexType): VertexType

Intersect this vertex-type with a second vertex-type.

Intersect this vertex-type with a second vertex-type.

Value parameters

vt2

the second vertex-type

Attributes

Inherited from:
VertexType
def limit(n: Int, s: Int): VertexType

Limit the number of vertices to n after skipping the first s.

Limit the number of vertices to n after skipping the first s.

Value parameters

n

the number of vertices to keep

s

the number of vertices to skip

Attributes

Inherited from:
VertexType
def me: String

Return the full identity.

Return the full identity.

Attributes

Inherited from:
Identifiable
infix def minus(vt2: VertexType): VertexType

Subtract (minus) second vertex-type from this vertex-type.

Subtract (minus) second vertex-type from this vertex-type.

Value parameters

vt2

the second vertex-type

Attributes

Inherited from:
VertexType

Return a new shape object based on the shape template.

Return a new shape object based on the shape template.

Attributes

Inherited from:
VertexType
def orderBy(pname: String): VertexType

Order the vertices within this vertex-type by the values of the given property name.

Order the vertices within this vertex-type by the values of the given property name.

Value parameters

pname

the property name on which to sort

Attributes

Inherited from:
VertexType
inline def project(x: String): VertexType

Attributes

Inherited from:
VertexType

Project each vertex in this vertex-type onto to the given subschema x of properties.

Project each vertex in this vertex-type onto to the given subschema x of properties.

Value parameters

x

the subset of property names to project onto

Attributes

Inherited from:
VertexType
def rename(pOld: String, pNew: String): VertexType

Rename the old property name with the new property name.

Rename the old property name with the new property name.

Value parameters

pNew

new property name

pOld

existing property name

Attributes

Inherited from:
VertexType
def select(pred: Property => Boolean): VertexType

Select the vertices in this vertex-type that satisfy the predicate.

Select the vertices in this vertex-type that satisfy the predicate.

Value parameters

pred

the predicate to satisfy

Attributes

Inherited from:
VertexType
def show(rng: Range): Unit

SHOW/print this vertex-type, one vertex per row. Formatting: regular column is 'width_' chars wide, 'X' is double that FIX - currently only works for width_, not width

SHOW/print this vertex-type, one vertex per row. Formatting: regular column is 'width_' chars wide, 'X' is double that FIX - currently only works for width_, not width

Value parameters

rng

the range of vertices to show (e.g, 0 until 10), defaults to all

Attributes

Inherited from:
VertexType
override def toString: String

Convert this vertex-type to a string.

Convert this vertex-type to a string.

Attributes

Definition Classes
VertexType -> Any
Inherited from:
VertexType
def typeName: String

Get the type of the object.

Get the type of the object.

Attributes

Inherited from:
Identifiable
infix def union(vt2: VertexType): VertexType

Union this vertex-type with a second vertex-type with no duplication.

Union this vertex-type with a second vertex-type with no duplication.

Value parameters

vt2

the second vertex-type

Attributes

Inherited from:
VertexType
infix def unionAll(vt2: VertexType): VertexType

Union this vertex-type with a second vertex-type.

Union this vertex-type with a second vertex-type.

Value parameters

vt2

the second vertex-type

Attributes

Inherited from:
VertexType
inline def π(x: String): VertexType

Attributes

Inherited from:
VertexType
inline def σ(pred: Property => Boolean): VertexType

Attributes

Inherited from:
VertexType
inline def (vt2: VertexType): VertexType

Attributes

Inherited from:
VertexType
inline def (vt2: VertexType): VertexType

Attributes

Inherited from:
VertexType

Inherited fields

val color: Color

Attributes

Inherited from:
VertexType
val id: Int

Attributes

Inherited from:
Identifiable
val name: String

Attributes

Inherited from:
Identifiable
val schema: Schema

Attributes

Inherited from:
VertexType
val shape: Shape

Attributes

Inherited from:
VertexType
val verts: ArrayBuffer[Vertex]

Attributes

Inherited from:
VertexType