scalation.activity

Transition

class Transition extends PQItem with Ordered[Transition] with PetriNetRules with Identity

This class represents a timed transition.

Linear Supertypes
PetriNetRules, Ordered[Transition], Comparable[Transition], PQItem, Identity, Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Transition
  2. PetriNetRules
  3. Ordered
  4. Comparable
  5. PQItem
  6. Identity
  7. Error
  8. AnyRef
  9. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Transition(x: Double, y: Double, firingDist: Variate, colors: Array[Color])

    x

    the x-coordinate for this transition

    y

    the y-coordinate for this transition

    firingDist

    the random variate for the firing distribution

    colors

    the colors of the tokens (needed for firing rules)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def <(that: Transition): Boolean

    Definition Classes
    Ordered
  5. def <=(that: Transition): Boolean

    Definition Classes
    Ordered
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. def >(that: Transition): Boolean

    Definition Classes
    Ordered
  9. def >=(that: Transition): Boolean

    Definition Classes
    Ordered
  10. var actTime: Double

    The activation time for the item in the time-ordered priority queue

    The activation time for the item in the time-ordered priority queue

    Definition Classes
    PQItem
  11. def addFluids(_fluids: VectorD): Unit

    Add fluids to this transition.

    Add fluids to this transition.

    _fluids

    the fluid vector to add

  12. def addTokens(_tokens: VectorI): Unit

    Add tokens to this transition.

  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def calcFiringDelay(v: Variate, w_t: VectorD, t: VectorI, w_f: VectorD, f: VectorD): Double

    Function to compute the delay in firing a transition.

    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.

    v

    the random variate used to compute base firing time

    w_t

    the weight for the token vector

    t

    the aggregate token vector (summed over all input places)

    w_f

    the weight for the fluid vector

    f

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

    Definition Classes
    PetriNetRules
  15. def checkGuard: Boolean

    Check the incoming arcs from discrete place for enough tokens of the right colors and the incoming arcs from continuous places for enough fluid of the right colors.

  16. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  17. def compare(tr2: Transition): Int

    Compare this transition to tr2 based on firing time.

    Compare this transition to tr2 based on firing time.

    tr2

    the other transition

    Definition Classes
    Transition → Ordered
  18. def compare(other: PQItem): Int

    Compare two items (PQItems) based on their actTime.

    Compare two items (PQItems) based on their actTime.

    other

    the other item to compare with this item

    Definition Classes
    PQItem
  19. def compareTo(that: Transition): Int

    Definition Classes
    Ordered → Comparable
  20. def connect(_pnet: PetriNet, _inI: Array[ArcI], _inD: Array[ArcD], _outI: Array[ArcI], _outD: Array[ArcD]): Unit

    Connect this transition to all the incoming and outgoing arcs as well as the containing Petri net.

    Connect this transition to all the incoming and outgoing arcs as well as the containing Petri net.

    _pnet

    the containing Petri net

    _inI

    the incoming arcs from discrete/Int places

    _inD

    the incoming arcs from continuous/Double places

    _outI

    the outgoing arcs to discrete/Int places

    _outD

    the outgoing arcs to continuous/Double places

  21. def connect(_pnet: PetriNet, _in: Array[ArcD], _out: Array[ArcD]): Unit

    Connect this transition to all the incoming and outgoing continuous arcs as well as the containing Petri net.

    Connect this transition to all the incoming and outgoing continuous arcs as well as the containing Petri net.

    _pnet

    the containing Petri net

    _in

    the incoming arcs from continuous/Double places

    _out

    the outgoing arcs to continuous/Double places

  22. def connect(_pnet: PetriNet, _in: Array[ArcI], _out: Array[ArcI]): Unit

    Connect this transition to all the incoming and outgoing discrete arcs as well as the containing Petri net.

    Connect this transition to all the incoming and outgoing discrete arcs as well as the containing Petri net.

    _pnet

    the containing Petri net

    _in

    the incoming arcs from discrete/Int places

    _out

    the outgoing arcs to discrete/Int places

  23. var cqueue: SynchronizedQueue[AnimateCommand]

    The animation command queue

  24. def enable(): Double

    Enable this transition by computing the firing delay.

    Enable this transition by computing the firing delay. Should immediately place it on the time ordered firing list. Also, move tokens/fluids from input places to this transition.

  25. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  27. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  28. def fire(): Unit

    Fire this transition by moving the requisite number and color of tokens from this transition to each outgoing discrete place and the requisite amount and color of fluid to each outgoing continuous place.

  29. var firingDelay: Double

    The firing delay for this transition

  30. def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  31. def fluidFlow(f: VectorD, derv: Array[(Double, Double) ⇒ Double], 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".

    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.

    f

    the fluid vector (amount of fluid per color)

    derv

    the array of derivative functions

    t0

    the current time

    d

    the time delay

    Definition Classes
    PetriNetRules
  32. def fluidFlow(f: VectorD, b: VectorD, r: VectorD = null, d: Double = 0): VectorD

    Compute the amount of fluid to flow over an arc according to the vector expression: b + r * (f-b) * d.

    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.

    f

    the fluid vector (amount of fluid per color)

    b

    the constant vector for base fluid flow

    r

    the rate vector (amounts of fluids per unit time)

    d

    the time delay

    Definition Classes
    PetriNetRules
  33. var fluids: VectorD

    Fluid vector for transition

  34. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  35. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  36. def id: Int

    Get the id (unique identifier).

    Get the id (unique identifier).

    Definition Classes
    Identity
  37. var inD: Array[ArcD]

    Arcs incoming from continuous places

  38. var inI: Array[ArcI]

    Arcs incoming from discrete places

  39. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  40. var locked: Boolean

    A transition is locked from the time it is enabled until it fires

  41. def me: String

    Return the full identity.

    Return the full identity.

    Definition Classes
    Identity
  42. def name: String

    Get the name.

    Get the name.

    Definition Classes
    Identity
  43. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  44. final def notify(): Unit

    Definition Classes
    AnyRef
  45. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  46. var outD: Array[ArcD]

    Arcs outgoing to continuous places

  47. var outI: Array[ArcI]

    Arcs outgoing to discrete places

  48. var pnet: PetriNet

    The containing Petri net

  49. def setName(label: String): Unit

    Set the name.

    Set the name.

    label

    the name to assign

    Definition Classes
    Identity
  50. def simType: String

    Get the type of the simulation object.

    Get the type of the simulation object.

    Definition Classes
    Identity
  51. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  52. def takeFluids(_fluids: VectorD): Unit

    Take fluids from this transition.

    Take fluids from this transition.

    _fluids

    the fluid vector to take away

  53. def takeTokens(_tokens: VectorI): Unit

    Take tokens from this transition.

  54. def thresholdD(f: VectorD, b: VectorD): Boolean

    Return whether the vector inequality is true: f >= b.

    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.

    f

    The fluid vector (amount of fluid per color)

    b

    The base constant vector

    Definition Classes
    PetriNetRules
  55. def thresholdI(t: VectorI, b: VectorI): Boolean

    Return whether the vector inequality is true: t >= b.

    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.

    t

    the token vector (number of tokens per color)

    b

    the base constant vector

    Definition Classes
    PetriNetRules
  56. def toString(): String

    Convert the item (PQItem) to a string.

    Convert the item (PQItem) to a string.

    Definition Classes
    PQItem → AnyRef → Any
  57. def tokenFlow(t: VectorI, b: VectorI, r: VectorI = null, d: Double = 0): VectorI

    Compute the number of tokens to flow over an arc according to the vector expression: b + r * (t-b) * d.

    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.

    t

    the token vector (number of tokens per color)

    b

    the constant vector for base token flow

    r

    the rate vector (number of tokens per unit time)

    d

    the time delay

    Definition Classes
    PetriNetRules
  58. var tokens: VectorI

    Token vector for transition

  59. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  60. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  61. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  62. val x: Double

    the x-coordinate for this transition

  63. val y: Double

    the y-coordinate for this transition

Inherited from PetriNetRules

Inherited from Ordered[Transition]

Inherited from Comparable[Transition]

Inherited from PQItem

Inherited from Identity

Inherited from Error

Inherited from AnyRef

Inherited from Any