Sha256: b38f3c7a2565df886e00d781b3c2a900668081517a970c86b914e9ded815544d

Contents?: true

Size: 829 Bytes

Versions: 1

Compression:

Stored size: 829 Bytes

Contents

# encoding: utf-8

# Timeless simulator core. Knows thus far only one, but potentially several
# methods applicable to timeless systems simulations.
# 
class YPetri::Core::Timeless
  ★ YPetri::Core
  
  require_relative 'timeless/basic'
  
  METHODS = { basic: Basic } # basic PN execution
  # Note: the reason why Timeless core has distinct basic method is because
  # without having to consider timed transitions, it can be made simpler.

  def initialize **named_args
    super
    extend METHODS.fetch simulation_method
  end
  
  # Computes the system state delta.
  # 
  def delta
    delta_timeless # this method was taken from core.rb
    # delta_ts + delta_tS # this is the contents of delta_timeless method
  end

  # Computes the system state delta.
  # 
  def Δ
    delta
  end
end # module YPetri::Core::Timeless

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
y_petri-2.3.12 lib/y_petri/core/timeless.rb