PlaceI

scalation.simulation.activity.PlaceI
class PlaceI(val x: Double, val y: Double, var tokens: VectorI) extends Identifiable

The PlaceI class represents a discrete place (can hold tokens).

Value parameters

tokens

the number of tokens per color

x

the place's x-coordinate

y

the place's y-coordinate

Attributes

Graph
Supertypes
trait Identifiable
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def add(_tokens: VectorI): Unit

Add tokens to 'this' discrete place.

Add tokens to 'this' discrete place.

Value parameters

_token

the token vector to add

Attributes

def holds(_tokens: VectorI): Boolean

Determine whether 'this' place holds at least the token vector (i.e., the requisite number of tokens of each color). Alternative: use threshold predicate in PetriNetRules.

Determine whether 'this' place holds at least the token vector (i.e., the requisite number of tokens of each color). Alternative: use threshold predicate in PetriNetRules.

Value parameters

_token

the token vector

Attributes

def take(_tokens: VectorI): Unit

Take tokens from 'this' discrete place.

Take tokens from 'this' discrete place.

Value parameters

_token

the token vector to take away

Attributes

Inherited methods

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
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
def name: String

Get the name.

Get the name.

Attributes

Inherited from:
Identifiable
def name_=(name: String): Unit

Set the name.

Set the name.

Value parameters

name

the name to assign

Attributes

Inherited from:
Identifiable
def simType: String

Get the type of the simulation object.

Get the type of the simulation object.

Attributes

Inherited from:
Identifiable

Concrete fields

val x: Double
val y: Double

Inherited fields

val id: Int

The globally unique integer identifier

The globally unique integer identifier

Attributes

Inherited from:
Identifiable