Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lifeware
biocham
Commits
74a7faf6
Commit
74a7faf6
authored
Dec 13, 2019
by
HEMERY Mathieu
Browse files
Add tests for rosenbrock events
parent
9faf5fe7
Changes
2
Hide whitespace changes
Inline
Side-by-side
library/initial.bc
View file @
74a7faf6
...
...
@@ -7,7 +7,7 @@ option(
error_epsilon_relative: 1e-6,
initial_step_size: 1e-6,
maximum_step_size: 1e-2,
minimum_step_size: 1e-
4
,
minimum_step_size: 1e-
5
,
precision: 6, %5
nusmv_initial_states: all,
nusmv_counter_example: no,
...
...
rosenbrock.plt
View file @
74a7faf6
...
...
@@ -18,6 +18,13 @@ check_integration_2([Head|Tail], Epsilon) :-
ValueS is sin(T), near(ValueS, Sin, Epsilon),
check_integration_2(Tail, Epsilon).
check_integration_ball([], _Epsilon) :- !.
check_integration_ball([Head|Tail], Epsilon) :-
Head = row(_T,_TT,X,_Y),
X >= -Epsilon,
check_integration_ball(Tail, Epsilon).
:- begin_tests(rosenbrock).
test(eva_coeff_1) :-
...
...
@@ -52,4 +59,22 @@ test(cosinus_integration, [setup(command(clear_model)), cleanup(command(clear_mo
get_table_data(D),
check_integration_2(D, 1e-5).
test(test_ball, [setup(command(clear_model)), cleanup(command(clear_model))]) :-
command(load("library/examples/RobustMonitoring/ball.bc")),
command(option(maximum_step_size:1e-2)),
command(numerical_simulation(method:rsbk)),
get_table_data(D),
check_integration_ball(D, 1e-3).
test(test_time_event, [setup(command(clear_model)), cleanup(command(clear_model))]) :-
command(k*a for a => b),
command(present(a,1.0)),
command(parameter(k=1)),
command(add_event('Time'>2, k=0)),
command(add_event('Time'>=4, k=1)),
command(numerical_simulation(method:rsbk, time:5)),
get_table_data(D),
last(D, row(T,_B,A)),
near(A, exp(2-T), 1e-5).
:- end_tests(rosenbrock).
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment