Class: YPetri::Simulation::Timeless::Recorder

Inherits:
Recorder
  • Object
show all
Defined in:
lib/y_petri/simulation/timeless/recorder.rb

Overview

A timeless recorder.

Constant Summary

Constants inherited from Recorder

Recorder::SAMPLING_DECIMAL_PLACES

Instance Attribute Summary collapse

Attributes inherited from Recorder

#features

Instance Method Summary collapse

Methods inherited from Recorder

#alert, #initialize, #new_recording, #recording

Constructor Details

This class inherits a constructor from YPetri::Simulation::Recorder

Instance Attribute Details

#next_eventObject (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

#reset!(**nn) ⇒ Object

Like YPetri::Simulation::Recording#reset, but allowing for additional named argument :next_sample that sets the event (label, hash key) of the next sample.



11
12
13
14
# File 'lib/y_petri/simulation/timeless/recorder.rb', line 11

def reset! **nn
  super
  @next_event = nn[:next_event] || 0
end