test/simulation_test.rb in y_petri-2.3.11 vs test/simulation_test.rb in y_petri-2.3.12

- old
+ new

@@ -121,11 +121,11 @@ # @sim.ts_tt.first.domain.names.must_equal [] # @sim.timed?.must_equal false # @sim.m.must_equal [1, 2] # @sim.p_m.must_equal( { A: 1, B: 2 } ) # @sim.recording.must_equal( { 0 => [1, 2]} ) -# @sim.simulation_method.must_equal :pseudo_euler +# @sim.simulation_method.must_equal :basic # @sim.core.must_be_kind_of YPetri::Core # @sim.ts_tt.first.domain.must_equal [] # @sim.send( :ts_transitions ).first.domain_access_code.must_equal '' # λ = @sim.send( :transitions ).ts.first.delta_closure # λ.arity.must_equal 0 @@ -193,11 +193,11 @@ # @sim = @net.simulation sampling: 1 # end # it "should behave" do # @sim.timed?.must_equal true -# @sim.simulation_method.must_equal :pseudo_euler +# @sim.simulation_method.must_equal :basic # @sim.Ts_tt.size.must_equal 1 # @sim.send( :transitions ).Ts.first.gradient_closure.call.must_equal [1] # @sim.Ts_tt.first.codomain.names.must_equal [:A] # @sim.recording.must_equal( { 0.0 => [1, 2] } ) # @sim.step! 1 @@ -210,11 +210,11 @@ # @sim = @net.simulation sampling: 1, marking_clamps: { B: 43 } # end # it "should behave" do # @sim.send( :transitions ).Ts.first.codomain.names.must_equal [:A] -# @sim.simulation_method.must_equal :pseudo_euler +# @sim.simulation_method.must_equal :basic # @sim.timed?.must_equal true # @sim.core.timed?.must_equal true # @sim.reset! # @sim.time.must_equal 0 # @sim.p_m.must_equal( { A: 1, B: 43 } ) @@ -287,11 +287,11 @@ # end # it "should behave" do # s = simulation # assert ! s.timed? -# s.core.must_be_kind_of YPetri::Core::Timeless::PseudoEuler +# s.core.ancestors.must_include YPetri::Core::Timeless::Basic # ds = s.recording # ds.size.must_equal 6 # ds.events.must_equal [0, 1, 2, 3, 4, 5] # ds.interpolate( 1 ) # .must_equal [2.5, 3.5] @@ -332,10 +332,10 @@ end it "should behave" do places.map( &:marking ).must_equal [0.5, 0.5] # marking unaffected s = simulation - s.settings.must_equal( { method: :pseudo_euler, guarded: false, + s.settings.must_equal( { method: :basic, guarded: false, step: 0.1, sampling: 5, time: 0..60 } ) assert s.recording.to_csv.start_with?( ":event,:A,:B\n" + "0.0,0.5,0.5\n" + "5.0,0.475,0.38916\n" + "10.0,0.45,0.30289\n" +