From 39115b3901b0ba6ac579ddd5ecc2a75ef06737ed Mon Sep 17 00:00:00 2001 From: Jonathan Cooper Date: Wed, 21 Feb 2018 11:37:06 +0000 Subject: [PATCH 01/13] Add first equation in test CellML file --- tests/cellml_files/test_simple_odes.cellml | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 tests/cellml_files/test_simple_odes.cellml diff --git a/tests/cellml_files/test_simple_odes.cellml b/tests/cellml_files/test_simple_odes.cellml new file mode 100644 index 00000000..d346d5bf --- /dev/null +++ b/tests/cellml_files/test_simple_odes.cellml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + time + + sv1 + + 1 + + + + + From a89e30b71823772f0c929cf84a2800c88431c9d3 Mon Sep 17 00:00:00 2001 From: Jonathan Cooper Date: Wed, 21 Feb 2018 14:09:53 +0000 Subject: [PATCH 02/13] Add 2 more independent ODEs Note that these have variables with the same names but different ids. --- tests/cellml_files/test_simple_odes.cellml | 73 +++++++++++++++++++++- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/tests/cellml_files/test_simple_odes.cellml b/tests/cellml_files/test_simple_odes.cellml index d346d5bf..709d0e4e 100644 --- a/tests/cellml_files/test_simple_odes.cellml +++ b/tests/cellml_files/test_simple_odes.cellml @@ -14,7 +14,10 @@ The last case checks whether connecting 'time' across components will work natur We will also check some connection features (units conversions, encapsulation) and annotations. --> - + @@ -46,9 +49,9 @@ We will also check some connection features (units conversions, encapsulation) a - + - + @@ -68,4 +71,68 @@ We will also check some connection features (units conversions, encapsulation) a + + + + + + + + + + + + + + + + + + time + + sv1 + + a + + + + + + + + + + + + + + + + + + + + + + time + + sv1 + + a + + + a + -1 + + + + + + + + + + + From 78cc2a7e180c39b823dfe43881f48ad40d306785 Mon Sep 17 00:00:00 2001 From: Jonathan Cooper Date: Wed, 21 Feb 2018 14:12:24 +0000 Subject: [PATCH 03/13] Connect up time --- tests/cellml_files/test_simple_odes.cellml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/cellml_files/test_simple_odes.cellml b/tests/cellml_files/test_simple_odes.cellml index 709d0e4e..2d1e8a63 100644 --- a/tests/cellml_files/test_simple_odes.cellml +++ b/tests/cellml_files/test_simple_odes.cellml @@ -127,6 +127,24 @@ We will also check some connection features (units conversions, encapsulation) a + + + + + + + + + + + + + + + + + + From 5e51edf9fad7830da3dfead2700b21c87a779491 Mon Sep 17 00:00:00 2001 From: Jonathan Cooper Date: Wed, 21 Feb 2018 14:23:31 +0000 Subject: [PATCH 04/13] Rename units --- tests/cellml_files/test_simple_odes.cellml | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/cellml_files/test_simple_odes.cellml b/tests/cellml_files/test_simple_odes.cellml index 2d1e8a63..2b3a28e6 100644 --- a/tests/cellml_files/test_simple_odes.cellml +++ b/tests/cellml_files/test_simple_odes.cellml @@ -19,25 +19,25 @@ We will also check some connection features (units conversions, encapsulation) a xmlns:cellml="http://www.cellml.org/cellml/1.0#" xmlns:cmeta="http://www.cellml.org/metadata/1.0#"> - + - - + + - + - + - - - + + + - + @@ -48,8 +48,8 @@ We will also check some connection features (units conversions, encapsulation) a - - + + @@ -66,22 +66,22 @@ We will also check some connection features (units conversions, encapsulation) a sv1 - 1 + 1 - - + + - + @@ -99,15 +99,15 @@ We will also check some connection features (units conversions, encapsulation) a - - + + - + From 0d22b430c92d33af158cde4700d5326938a48c12 Mon Sep 17 00:00:00 2001 From: Jonathan Cooper Date: Wed, 21 Feb 2018 14:51:24 +0000 Subject: [PATCH 05/13] Add a coupled pair of ODEs with encapsulation --- tests/cellml_files/test_simple_odes.cellml | 96 +++++++++++++++++++++- 1 file changed, 94 insertions(+), 2 deletions(-) diff --git a/tests/cellml_files/test_simple_odes.cellml b/tests/cellml_files/test_simple_odes.cellml index 2b3a28e6..6e992b6f 100644 --- a/tests/cellml_files/test_simple_odes.cellml +++ b/tests/cellml_files/test_simple_odes.cellml @@ -35,6 +35,14 @@ We will also check some connection features (units conversions, encapsulation) a + + + + + + + + @@ -122,14 +130,78 @@ We will also check some connection features (units conversions, encapsulation) a a - -1 + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + time + + x + + + y + + + + + + + + + + + + + + + + + + + + + time + + y + + x - + + + + + @@ -145,6 +217,26 @@ We will also check some connection features (units conversions, encapsulation) a + + + + + + + + + + + + + + + + + + + + From 80f829b20b41c34e5c2b961f9972421608a6041e Mon Sep 17 00:00:00 2001 From: Jonathan Cooper Date: Thu, 1 Mar 2018 12:15:10 +0000 Subject: [PATCH 06/13] Fix CellML validation issues --- tests/cellml_files/test_simple_odes.cellml | 27 +++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/tests/cellml_files/test_simple_odes.cellml b/tests/cellml_files/test_simple_odes.cellml index 6e992b6f..bbf5319b 100644 --- a/tests/cellml_files/test_simple_odes.cellml +++ b/tests/cellml_files/test_simple_odes.cellml @@ -146,7 +146,7 @@ We will also check some connection features (units conversions, encapsulation) a - + @@ -165,21 +165,23 @@ We will also check some connection features (units conversions, encapsulation) a x - y + + y + 1 + - - - - - - - - + + + + + + + @@ -190,7 +192,10 @@ We will also check some connection features (units conversions, encapsulation) a y - x + + x + 1 + From 9a366e28e5d89026c6ffc309179cbed3d53e9145 Mon Sep 17 00:00:00 2001 From: Jonathan Cooper Date: Fri, 2 Mar 2018 16:24:04 +0000 Subject: [PATCH 07/13] Add more detailed notes on test cases --- tests/cellml_files/test_simple_odes.cellml | 32 +++++++++++++++------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/tests/cellml_files/test_simple_odes.cellml b/tests/cellml_files/test_simple_odes.cellml index bbf5319b..68e90a0d 100644 --- a/tests/cellml_files/test_simple_odes.cellml +++ b/tests/cellml_files/test_simple_odes.cellml @@ -1,17 +1,29 @@ Date: Fri, 2 Mar 2018 16:24:30 +0000 Subject: [PATCH 08/13] Add derived_from_state_var test case --- tests/cellml_files/test_simple_odes.cellml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/cellml_files/test_simple_odes.cellml b/tests/cellml_files/test_simple_odes.cellml index 68e90a0d..b7843fed 100644 --- a/tests/cellml_files/test_simple_odes.cellml +++ b/tests/cellml_files/test_simple_odes.cellml @@ -147,6 +147,28 @@ For annotations, we check: + + + + + + + + + + + + + + dbl_sv1 + + sv1 + 2 + + + + + - + From dd7218f13b7e9c743d2920b15a57223e3decf105 Mon Sep 17 00:00:00 2001 From: Jonathan Cooper Date: Fri, 2 Mar 2018 16:30:20 +0000 Subject: [PATCH 10/13] Add deriv_on_rhs test case --- tests/cellml_files/test_simple_odes.cellml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/cellml_files/test_simple_odes.cellml b/tests/cellml_files/test_simple_odes.cellml index 088d746d..f5b904c3 100644 --- a/tests/cellml_files/test_simple_odes.cellml +++ b/tests/cellml_files/test_simple_odes.cellml @@ -169,6 +169,29 @@ For annotations, we check: + + + + + + + + sv1_rate + + + time + + sv1 + + + + + + + + + + + + + + + + + + + + + + + + + time + + sv1 + + 0.001 + + + + + + + + + + + + + + + + + + + + + time + + sv1 + + 1000 + + + + @@ -317,6 +375,15 @@ For annotations, we check: + + + + + + + + + From d0b12e6882db30acb149bcbbb24dcf02cc7cb77e Mon Sep 17 00:00:00 2001 From: Jonathan Cooper Date: Fri, 2 Mar 2018 17:18:25 +0000 Subject: [PATCH 12/13] Add state var units conversion cases --- tests/cellml_files/test_simple_odes.cellml | 71 +++++++++++++++++++++- 1 file changed, 68 insertions(+), 3 deletions(-) diff --git a/tests/cellml_files/test_simple_odes.cellml b/tests/cellml_files/test_simple_odes.cellml index d7ae24b8..5bc19d50 100644 --- a/tests/cellml_files/test_simple_odes.cellml +++ b/tests/cellml_files/test_simple_odes.cellml @@ -11,9 +11,9 @@ This model is designed to test the following kinds of equations: * circle_parent: dx/dt = -y, dy/dt = x, x(0) = 0, y(0) = 1 This one also checks encapsulation: x and y ODEs are within child components. All information flow directions are covered. -* time_units_conversion1: d(sv1)/d(time) = 0.0001, sv1(0) = 1, time in seconds locally +* time_units_conversion1: d(sv1)/d(time) = 0.001, sv1(0) = 1, time in seconds locally * time_units_conversion2: d(sv1)/d(time) = 1000, sv1(0) = 1, time in microseconds locally -* state_units_conversion1: d(sv1)/d(time) = 0.0001, sv1(0) = 1, sv1 in volts locally, exported to proto in mV +* state_units_conversion1: d(sv1)/d(time) = 0.001, sv1(0) = 1, sv1 in volts locally, exported to proto in mV * state_units_conversion2: d(sv1)/d(time) = 1000, sv1(0) = 1, sv1 in microvolts locally, exported to proto in mV * deriv_on_rhs1a: sv1_rate = d(sv1)/d(time), where sv1 & time are connected to parent time_units_conversion1 * deriv_on_rhs2a: sv1_rate = d(sv1)/d(time), where sv1 & time are connected to parent time_units_conversion2 @@ -37,12 +37,18 @@ For annotations, we check: + + + + + + @@ -292,7 +298,7 @@ For annotations, we check: - + @@ -315,6 +321,56 @@ For annotations, we check: + + + + + + + + + + + + + + + + + time + + sv1 + + 0.001 + + + + + + + + + + + + + + + + + + + + + time + + sv1 + + 1000 + + + + @@ -384,6 +440,15 @@ For annotations, we check: + + + + + + + + + From 6cf7da5792b717ccf79abbd9122119ec025bad04 Mon Sep 17 00:00:00 2001 From: Jonathan Cooper Date: Thu, 22 Mar 2018 08:47:54 +0000 Subject: [PATCH 13/13] Add egs of derivatives on the RHS --- tests/cellml_files/test_simple_odes.cellml | 134 +++++++++++++++++++++ 1 file changed, 134 insertions(+) diff --git a/tests/cellml_files/test_simple_odes.cellml b/tests/cellml_files/test_simple_odes.cellml index 5bc19d50..684c0c88 100644 --- a/tests/cellml_files/test_simple_odes.cellml +++ b/tests/cellml_files/test_simple_odes.cellml @@ -296,6 +296,31 @@ For annotations, we check: + + + + + + + + + + + + + + sv1_rate + + + + time + + sv1 + + + + + @@ -321,6 +346,31 @@ For annotations, we check: + + + + + + + + + + + + + + sv1_rate + + + + time + + sv1 + + + + + @@ -346,6 +396,31 @@ For annotations, we check: + + + + + + + + + + + + + + sv1_rate + + + + time + + sv1 + + + + + @@ -371,6 +446,31 @@ For annotations, we check: + + + + + + + + + + + + + + sv1_rate + + + + time + + sv1 + + + + + @@ -378,6 +478,18 @@ For annotations, we check: + + + + + + + + + + + + @@ -449,6 +561,28 @@ For annotations, we check: + + + + + + + + + + + + + + + + + + + + + +