test/simulation_test.rb in y_petri-2.1.49 vs test/simulation_test.rb in y_petri-2.1.50
- old
+ new
@@ -23,11 +23,11 @@
describe "simulation setup" do
before do
@p = @w.Place.send :new, name: :A, default_marking: 1
@q = @w.Place.send :new, name: :B, default_marking: 2
- @net = @w.Net.of @p, @q
+ @net = @w.Net.of [ @p, @q ]
end
it "should allow to set up a simplistic simulation instance" do
@net.simulation
@net.simulation marking_clamps: { @q => 42 } # one clamp
@@ -102,11 +102,11 @@
@TS.codomain.must_equal [@q, @p]
end
describe "ts transition" do
before do
- @net = @w.Net.of @p, @q, @ts
+ @net = @w.Net.of [ @p, @q, @ts ]
end
describe "no clamps" do
before do
@sim = @net.simulation net: @net
@@ -152,11 +152,11 @@
end
end # ts transition
describe "tS transition" do
before do
- @net = @w.Net.of @p, @q, @tS
+ @net = @w.Net.of [ @p, @q, @tS ]
end
describe "no clamps" do
before do
@sim = @net.simulation net: @net
@@ -182,11 +182,11 @@
end
end # tS transition
describe "Ts transition" do
before do
- @net = @w.Net.of @p, @q, @Ts
+ @net = @w.Net.of [ @p, @q, @Ts ]
end
describe "no clamps" do
before do
@sim = @net.simulation sampling: 1
@@ -217,11 +217,11 @@
end
end # Ts transition
describe "TS transition" do
before do
- @net = @w.Net.of @p, @q, @TS
+ @net = @w.Net.of [ @p, @q, @TS ]
end
describe "no clamps" do
before do
@sim = @net.simulation sampling: 1
@@ -303,10 +303,10 @@
describe "timed simulation" do
before do
self.class.class_exec { include YPetri }
A = Place m!: 0.5
B = Place m!: 0.5
- A_pump = T s: { A: -1 } do 0.005 end
+ A_pump = TT s: { A: -1 } do 0.005 end
B_decay = Transition s: { B: -1 }, rate: 0.05
run!
end
it "should behave" do