lib/y_petri/simulation/timed.rb in y_petri-2.1.35 vs lib/y_petri/simulation/timed.rb in y_petri-2.1.36

- old
+ new

@@ -30,13 +30,23 @@ :flux_vector, to: :core delegate :sampling, to: :recorder - # Reads the time range (initial_time..target_time) of the simulation. + # Reads the time range. # + def flux ids_of_TS_transitions=nil + tt = TS_transitions() + return flux tt if ids_of_TS_transitions.nil? + TS_transitions( ids_of_TS_transitions ).map { |t| + flux_vector.column_to_a.fetch tt.index( t ) + } + end + + # Reads the time range (initial_time .. target_time) of the simulation. + # def time_range - initial_time..target_time + initial_time .. target_time end # Returns the settings pertaining to the Timed aspect of the simulation, # that is, +:step+, +:sampling+ and +:time+. #