Class: YPetri::Simulation::Timeless::Recorder
- Defined in:
- lib/y_petri/simulation/timeless/recorder.rb
Overview
Timeless recorder.
Constant Summary
Constants inherited from Recorder
Recorder::SAMPLING_DECIMAL_PLACES
Instance Attribute Summary collapse
-
#next_event ⇒ Object
readonly
Returns the value of attribute next_event.
Attributes inherited from Recorder
Instance Method Summary collapse
-
#back! ⇒ Object
Backsteps the simulation.
-
#reset!(next_event: 0, **named_args) ⇒ Object
Like YPetri::Simulation::Recording#reset, but allowing for additional named argument
:next_event
that sets the event (label, hash key) of the next sample.
Methods inherited from Recorder
#alert!, #initialize, #new_recording, #recording
Constructor Details
This class inherits a constructor from YPetri::Simulation::Recorder
Instance Attribute Details
#next_event ⇒ Object (readonly)
Returns the value of attribute next_event.
5 6 7 |
# File 'lib/y_petri/simulation/timeless/recorder.rb', line 5 def next_event @next_event end |
Instance Method Details
#back! ⇒ Object
Backsteps the simulation.
17 18 19 |
# File 'lib/y_petri/simulation/timeless/recorder.rb', line 17 def back! fail NotImplementedError, "Backstep for timeless simulation not done yet!" end |
#reset!(next_event: 0, **named_args) ⇒ Object
Like YPetri::Simulation::Recording#reset, but allowing for additional named argument :next_event
that sets the event (label, hash key) of the next sample.
11 12 13 |
# File 'lib/y_petri/simulation/timeless/recorder.rb', line 11 def reset! next_event: 0, **named_args super.tap { @next_event = next_event } end |