Module: YPetri::Core::Timed::QuasiEuler

Includes:
Euler
Defined in:
lib/y_petri/core/timed/quasi_euler.rb

Overview

Euler method with timeless transitions firing every time tick.

Instance Method Summary collapse

Methods included from Euler

#delta

Instance Method Details

#simulation_methodObject

Name of this method.



10
11
12
# File 'lib/y_petri/core/timed/quasi_euler.rb', line 10

def simulation_method
  :quasi_euler
end

#step!(Δt = simulation.step_size) ⇒ Object

Makes a single step by Δt.



16
17
18
19
20
# File 'lib/y_petri/core/timed/quasi_euler.rb', line 16

def step! Δt=simulation.step_size
  fail NotImplementedError
  # Now one would have to compare whichever comes first, time tick or the
  # end of Δt, and then again and again, until Δt is fired...
end