Class: YPetri::Core::Timeless

Inherits:
Object
  • Object
show all
Defined in:
lib/y_petri/core/timeless.rb

Overview

Timeless simulator core. Knows thus far only one, but potentially several methods applicable to timeless systems simulations.

Defined Under Namespace

Modules: Basic

Constant Summary collapse

METHODS =

basic PN execution

{ basic: Basic }

Instance Method Summary collapse

Constructor Details

#initialize(**named_args) ⇒ Timeless

Returns a new instance of Timeless.


23
24
25
26
# File 'lib/y_petri/core/timeless.rb', line 23

def initialize **named_args
  super
  extend METHODS.fetch simulation_method
end

Instance Method Details

#deltaObject Also known as: Δ

Computes the system state delta.


30
31
32
33
# File 'lib/y_petri/core/timeless.rb', line 30

def delta
  delta_timeless # this method was taken from core.rb
  # delta_ts + delta_tS # this is the contents of delta_timeless method
end

#timed?Boolean

This inquirer (=Boolean selector) is always false for timeless cores.

Returns:

  • (Boolean)

17
# File 'lib/y_petri/core/timeless.rb', line 17

def timed?; false end

#timeless?Boolean

This inquirer (=Boolean selector) is always true for timeless cores.

Returns:

  • (Boolean)

21
# File 'lib/y_petri/core/timeless.rb', line 21

def timeless?; true end