Skip to content
Snippets Groups Projects
Commit 6c2ea466 authored by pjs's avatar pjs
Browse files

Updated MyModelArgs test case logic

parent 1c381596
No related branches found
No related tags found
No related merge requests found
...@@ -11,10 +11,13 @@ class MyModel ...@@ -11,10 +11,13 @@ class MyModel
end end
def increment(n:, char:) def increment(n:, char:)
@x += n if model_time < 10.0
schedule(:increment, 2.0 * rand(2), n: @x, char: char - 1, priority: 3) @x += n
printf "%f, %f, %c\n", model_time, @x, char schedule(:increment, rand(3), n: @x, char: char - 1, priority: 3)
cancel_all :increment if model_time > 10 printf "%f, %f, %c\n", model_time, @x, char
else
cancel_all :increment
end
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment