ArcD

scalation.simulation.activity.ArcD
class ArcD(val place: PlaceD, val transition: Transition, incoming: Boolean, val minFluids: VectorD, rates: VectorD, derv: Array[Derivative], testArc: Boolean, scaleFactor: Double) extends PetriNetRules, Identifiable

The ArcD class represents an arc connecting continuous place with a transition. If incoming is true the arc is from the place to transition, otherwise it is from the transition to the place (outgoing).

Value parameters

derv

the array of derivative functions for ODE's

incoming

whether the arc goes into a transition

minFluids

minimum amount of fluid to transport over the arc

place

the continuous place at one end of the arc

rates

the rate vector for the linear flow model

scaleFactor

the scale factor for the firing delay

testArc

whether the arc is a test arc meaning the tokens/fluids stay

transition

the transition the other end of the arc

Attributes

Graph
Supertypes
trait Identifiable
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def _fluidFlow(fluids: VectorD, time: Double, firingDelay: Double): VectorD

Compute the amount of fluid of each color to flow over 'this' arc.

Compute the amount of fluid of each color to flow over 'this' arc.

Value parameters

firingDelay

the time it takes for the transition to fire

fluids

the amount of fluid available

time

the current time

Attributes

Inherited methods

def calcFiringDelay(v: Variate, w_t: VectorD, t: VectorI, w_f: VectorD, f: VectorD): Double

Function to compute the delay in firing a transition. The base time is given by a random variate. This is adjusted by weight vectors multiplying the number of aggregate tokens and the aggregate amount of fluids summed over all input places: delay = v + w_t * t + w_f * f.

Function to compute the delay in firing a transition. The base time is given by a random variate. This is adjusted by weight vectors multiplying the number of aggregate tokens and the aggregate amount of fluids summed over all input places: delay = v + w_t * t + w_f * f.

Value parameters

f

the aggregate fluid level vector (summed over all input places)

t

the aggregate token vector (summed over all input places)

v

the random variate used to compute base firing time

w_f

the weight for the fluid vector

w_t

the weight for the token vector

Attributes

Inherited from:
PetriNetRules
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 fluidFlow(f: VectorD, derv: Array[Derivative], t0: Double, d: Double): VectorD

Compute the amount of fluid to flow over an arc according to the system of first-order Ordinary Differential Equation 'ODE's: "integral 'derv' from t0 to t". Supports ODE base flow models.

Compute the amount of fluid to flow over an arc according to the system of first-order Ordinary Differential Equation 'ODE's: "integral 'derv' from t0 to t". Supports ODE base flow models.

Value parameters

d

the time delay

derv

the array of derivative functions

f

the fluid vector (amount of fluid per color)

t0

the current time

Attributes

Inherited from:
PetriNetRules
def fluidFlow(f: VectorD, b: VectorD, r: VectorD, d: Double): VectorD

Compute the amount of fluid to flow over an arc according to the vector expression: b + r * (f-b) * d. If r is 0, returns b. Supports linear (w.r.t. time delay) and constant (d == 0) flow models.

Compute the amount of fluid to flow over an arc according to the vector expression: b + r * (f-b) * d. If r is 0, returns b. Supports linear (w.r.t. time delay) and constant (d == 0) flow models.

Value parameters

b

the constant vector for base fluid flow

d

the time delay

f

the fluid vector (amount of fluid per color)

r

the rate vector (amounts of fluids per unit time)

Attributes

Inherited from:
PetriNetRules
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
def thresholdD(f: VectorD, b: VectorD): Boolean

Return whether the vector inequality is true: f >= b. The firing threshold should be checked for every incoming arc. If all return true, the transition should fire.

Return whether the vector inequality is true: f >= b. The firing threshold should be checked for every incoming arc. If all return true, the transition should fire.

Value parameters

b

The base constant vector

f

The fluid vector (amount of fluid per color)

Attributes

Inherited from:
PetriNetRules
def thresholdI(t: VectorI, b: VectorI): Boolean

Return whether the vector inequality is true: t >= b. The firing threshold should be checked for every incoming arc. If all return true, the transition should fire.

Return whether the vector inequality is true: t >= b. The firing threshold should be checked for every incoming arc. If all return true, the transition should fire.

Value parameters

b

the base constant vector

t

the token vector (number of tokens per color)

Attributes

Inherited from:
PetriNetRules
def tokenFlow(t: VectorI, b: VectorI, r: VectorI, d: Double): VectorI

Compute the number of tokens to flow over an arc according to the vector expression: b + r * (t-b) * d. If d is 0, returns b. Supports linear (w.r.t. time delay) and constant (d == 0) flow models.

Compute the number of tokens to flow over an arc according to the vector expression: b + r * (t-b) * d. If d is 0, returns b. Supports linear (w.r.t. time delay) and constant (d == 0) flow models.

Value parameters

b

the constant vector for base token flow

d

the time delay

r

the rate vector (number of tokens per unit time)

t

the token vector (number of tokens per color)

Attributes

Inherited from:
PetriNetRules

Concrete fields

val place: PlaceD

Inherited fields

val id: Int

The globally unique integer identifier

The globally unique integer identifier

Attributes

Inherited from:
Identifiable