COPASI API  4.16.103
test000063.cpp
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/sbml/unittests/test000063.cpp,v $
3 // $Revision: 1.6 $
4 // $Name: $
5 // $Author: gauges $
6 // $Date: 2010/03/11 11:52:00 $
7 // End CVS Header
8 
9 // Copyright (C) 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
16 // and The University of Manchester.
17 // All rights reserved.
18 
19 #include "test000063.h"
20 
21 #include <sstream>
22 #include "utilities.hpp"
24 #include "copasi/model/CModel.h"
27 
28 #include "sbml/SBMLDocument.h"
29 #include "sbml/Model.h"
30 #include "sbml/Rule.h"
31 #include "sbml/Species.h"
32 #include "sbml/Parameter.h"
33 #include "sbml/math/ASTNode.h"
34 
36 
37 CCopasiDataModel* test000063::pCOPASIDATAMODEL = NULL;
38 
40 {
41  // Create the root container.
42  CCopasiRootContainer::init(0, NULL, false);
43  // Create the global data model.
45 }
46 
48 {
50 }
51 
53 {
54  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
55  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(test000063::MODEL_STRING1));
56  CModel* pModel = pDataModel->getModel();
57  CPPUNIT_ASSERT(pModel != NULL);
58  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
59  CPPUNIT_ASSERT(pModel->getMetabolites().size() == 2);
60  CPPUNIT_ASSERT(pModel->getReactions().size() == 0);
61  CPPUNIT_ASSERT(pModel->getEvents().size() == 1);
62  // run a simulation for 4 seconds and check the values of both species at 1
63  // second and at 3 seconds
64 }
65 
66 /**
67  * Simple model with two species. One is determined by an assignment, the
68  * other is set in an event assignment.
69  */
70 const char* test000063::MODEL_STRING1 =
71  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
72  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
73  " <model id=\"Model_1\" name=\"Model 1\">"
74  " <listOfUnitDefinitions>"
75  " <unitDefinition id=\"volume\">"
76  " <listOfUnits>"
77  " <unit kind=\"litre\" scale=\"-3\"/>"
78  " </listOfUnits>"
79  " </unitDefinition>"
80  " <unitDefinition id=\"substance\">"
81  " <listOfUnits>"
82  " <unit kind=\"mole\" scale=\"-3\"/>"
83  " </listOfUnits>"
84  " </unitDefinition>"
85  " </listOfUnitDefinitions>"
86  " <listOfCompartments>"
87  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
88  " </listOfCompartments>"
89  " <listOfSpecies>"
90  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
91  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
92  " </listOfSpecies>"
93  " <listOfRules>"
94  " <assignmentRule variable=\"species_1\">"
95  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
96  " <apply>"
97  " <times/>"
98  " <ci>species_2</ci>"
99  " <cn> 2.0 </cn>"
100  " </apply>"
101  " </math>"
102  " </assignmentRule>"
103  " </listOfRules>"
104  " <listOfEvents>"
105  " <event id=\"event_1\" name=\"event_1\">"
106  " <trigger>"
107  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
108  " <apply>"
109  " <gt/>"
110  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
111  " <cn> 2.0 </cn>"
112  " </apply>"
113  " </math>"
114  " </trigger>"
115  " <listOfEventAssignments>"
116  " <eventAssignment variable=\"species_2\">"
117  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
118  " <cn> 2.0 </cn>"
119  " </math>"
120  " </eventAssignment>"
121  " </listOfEventAssignments>"
122  " </event>"
123  " </listOfEvents>"
124  " </model>"
125  "</sbml>"
126  ;
127 
128 /**
129  * Simple model with two species. One is determined by an ode , the
130  * other is set in an event assignment.
131  */
132 const char* test000063::MODEL_STRING2 =
133  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
134  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
135  " <model id=\"Model_1\" name=\"Model 1\">"
136  " <listOfUnitDefinitions>"
137  " <unitDefinition id=\"volume\">"
138  " <listOfUnits>"
139  " <unit kind=\"litre\" scale=\"-3\"/>"
140  " </listOfUnits>"
141  " </unitDefinition>"
142  " <unitDefinition id=\"substance\">"
143  " <listOfUnits>"
144  " <unit kind=\"mole\" scale=\"-3\"/>"
145  " </listOfUnits>"
146  " </unitDefinition>"
147  " </listOfUnitDefinitions>"
148  " <listOfCompartments>"
149  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
150  " </listOfCompartments>"
151  " <listOfSpecies>"
152  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
153  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
154  " </listOfSpecies>"
155  " <listOfRules>"
156  " <rateRule variable=\"species_1\">"
157  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
158  " <cn> 2.0 </cn>"
159  " </math>"
160  " </rateRule>"
161  " </listOfRules>"
162  " <listOfEvents>"
163  " <event id=\"event_1\" name=\"event_1\">"
164  " <trigger>"
165  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
166  " <apply>"
167  " <gt/>"
168  " <ci>species_1</ci>"
169  " <cn> 8.0 </cn>"
170  " </apply>"
171  " </math>"
172  " </trigger>"
173  " <listOfEventAssignments>"
174  " <eventAssignment variable=\"species_2\">"
175  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
176  " <cn> 2.0 </cn>"
177  " </math>"
178  " </eventAssignment>"
179  " </listOfEventAssignments>"
180  " </event>"
181  " </listOfEvents>"
182  " </model>"
183  "</sbml>"
184  ;
185 
186 /**
187  * Simple model with two species. The compartment volume is determined by a
188  * rate rule.
189  * The second species is set by an event that is dependent on the compartment
190  * volume.
191  */
192 const char* test000063::MODEL_STRING3 =
193  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
194  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
195  " <model id=\"Model_1\" name=\"Model 1\">"
196  " <listOfUnitDefinitions>"
197  " <unitDefinition id=\"volume\">"
198  " <listOfUnits>"
199  " <unit kind=\"litre\" scale=\"-3\"/>"
200  " </listOfUnits>"
201  " </unitDefinition>"
202  " <unitDefinition id=\"substance\">"
203  " <listOfUnits>"
204  " <unit kind=\"mole\" scale=\"-3\"/>"
205  " </listOfUnits>"
206  " </unitDefinition>"
207  " </listOfUnitDefinitions>"
208  " <listOfCompartments>"
209  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" constant=\"false\"/>"
210  " </listOfCompartments>"
211  " <listOfSpecies>"
212  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
213  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
214  " </listOfSpecies>"
215  " <listOfRules>"
216  " <rateRule variable=\"compartment_1\">"
217  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
218  " <cn> 2.0 </cn>"
219  " </math>"
220  " </rateRule>"
221  " </listOfRules>"
222  " <listOfEvents>"
223  " <event id=\"event_1\" name=\"event_1\">"
224  " <trigger>"
225  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
226  " <apply>"
227  " <gt/>"
228  " <ci> compartment_1 </ci>"
229  " <cn> 6.0 </cn>"
230  " </apply>"
231  " </math>"
232  " </trigger>"
233  " <listOfEventAssignments>"
234  " <eventAssignment variable=\"species_2\">"
235  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
236  " <cn> 2.0 </cn>"
237  " </math>"
238  " </eventAssignment>"
239  " </listOfEventAssignments>"
240  " </event>"
241  " </listOfEvents>"
242  " </model>"
243  "</sbml>"
244  ;
245 
246 /**
247  * Simple model with two species and a parameter. The parameter is determined
248  * by an ode rule.
249  * The second species is set by an event that is dependent on the parameter
250  * volume.
251  */
252 const char* test000063::MODEL_STRING4 =
253  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
254  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
255  " <model id=\"Model_1\" name=\"Model 1\">"
256  " <listOfUnitDefinitions>"
257  " <unitDefinition id=\"volume\">"
258  " <listOfUnits>"
259  " <unit kind=\"litre\" scale=\"-3\"/>"
260  " </listOfUnits>"
261  " </unitDefinition>"
262  " <unitDefinition id=\"substance\">"
263  " <listOfUnits>"
264  " <unit kind=\"mole\" scale=\"-3\"/>"
265  " </listOfUnits>"
266  " </unitDefinition>"
267  " </listOfUnitDefinitions>"
268  " <listOfCompartments>"
269  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
270  " </listOfCompartments>"
271  " <listOfSpecies>"
272  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
273  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
274  " </listOfSpecies>"
275  " <listOfParameters>"
276  " <parameter id=\"parameter_1\" name=\"parameter_1\" value=\"2.0\" constant=\"false\" units=\"dimensionless\"/>"
277  " </listOfParameters>"
278  " <listOfRules>"
279  " <rateRule variable=\"parameter_1\">"
280  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
281  " <cn> 2.0 </cn>"
282  " </math>"
283  " </rateRule>"
284  " </listOfRules>"
285  " <listOfEvents>"
286  " <event id=\"event_1\" name=\"event_1\">"
287  " <trigger>"
288  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
289  " <apply>"
290  " <gt/>"
291  " <ci> parameter_1 </ci>"
292  " <cn> 6.0 </cn>"
293  " </apply>"
294  " </math>"
295  " </trigger>"
296  " <listOfEventAssignments>"
297  " <eventAssignment variable=\"species_2\">"
298  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
299  " <cn> 2.0 </cn>"
300  " </math>"
301  " </eventAssignment>"
302  " </listOfEventAssignments>"
303  " </event>"
304  " </listOfEvents>"
305  " </model>"
306  "</sbml>"
307  ;
308 
309 /**
310  * Simple model with two species and two reactions.
311  * The second species is set by an event that is dependent on the reaction
312  * rate of the second reaction.
313  */
314 const char* test000063::MODEL_STRING5 =
315  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
316  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
317  " <model id=\"Model_1\" name=\"Model 1\">"
318  " <listOfUnitDefinitions>"
319  " <unitDefinition id=\"volume\">"
320  " <listOfUnits>"
321  " <unit kind=\"litre\" scale=\"-3\"/>"
322  " </listOfUnits>"
323  " </unitDefinition>"
324  " <unitDefinition id=\"substance\">"
325  " <listOfUnits>"
326  " <unit kind=\"mole\" scale=\"-3\"/>"
327  " </listOfUnits>"
328  " </unitDefinition>"
329  " </listOfUnitDefinitions>"
330  " <listOfCompartments>"
331  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
332  " </listOfCompartments>"
333  " <listOfSpecies>"
334  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
335  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
336  " </listOfSpecies>"
337  " <listOfReactions>"
338  " <reaction id=\"reaction_1\" name=\"constant flux\">"
339  " <listOfProducts>"
340  " < speciesReference species = \"species_1\"/>"
341  " </listOfProducts>"
342  " <kineticLaw>"
343  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
344  " <cn> 2.0 </cn>"
345  " </math>"
346  " </kineticLaw>"
347  " </reaction>"
348  " <reaction id=\"reaction_2\" name=\"constant flux\">"
349  " <listOfReactants>"
350  " < speciesReference species = \"species_1\"/>"
351  " </listOfReactants>"
352  " <listOfProducts>"
353  " <speciesReference species=\"species_2\"/>"
354  " </listOfProducts>"
355  " <kineticLaw>"
356  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
357  " <ci> species_1 </ci>"
358  " </math>"
359  " </kineticLaw>"
360  " </reaction>"
361  " </listOfReactions>"
362  " <listOfEvents>"
363  " <event id=\"event_1\" name=\"event_1\">"
364  " <trigger>"
365  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
366  " <apply>"
367  " <gt/>"
368  " <ci> reaction_2 </ci>"
369  " <cn> 6.0 </cn>"
370  " </apply>"
371  " </math>"
372  " </trigger>"
373  " <listOfEventAssignments>"
374  " <eventAssignment variable=\"species_2\">"
375  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
376  " <cn> 2.0 </cn>"
377  " </math>"
378  " </eventAssignment>"
379  " </listOfEventAssignments>"
380  " </event>"
381  " </listOfEvents>"
382  " </model>"
383  "</sbml>"
384  ;
385 
386 /**
387  * Simple model with two species and two reactions.
388  * The second species is set by an event that is dependent on the reaction
389  * rate of the second reaction.
390  * The second species is also set by a second time dependent event.
391  */
392 const char* test000063::MODEL_STRING6 =
393  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
394  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
395  " <model id=\"Model_1\" name=\"Model 1\">"
396  " <listOfUnitDefinitions>"
397  " <unitDefinition id=\"volume\">"
398  " <listOfUnits>"
399  " <unit kind=\"litre\" scale=\"-3\"/>"
400  " </listOfUnits>"
401  " </unitDefinition>"
402  " <unitDefinition id=\"substance\">"
403  " <listOfUnits>"
404  " <unit kind=\"mole\" scale=\"-3\"/>"
405  " </listOfUnits>"
406  " </unitDefinition>"
407  " </listOfUnitDefinitions>"
408  " <listOfCompartments>"
409  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
410  " </listOfCompartments>"
411  " <listOfSpecies>"
412  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
413  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
414  " </listOfSpecies>"
415  " <listOfReactions>"
416  " <reaction id=\"reaction_1\" name=\"constant flux\">"
417  " <listOfProducts>"
418  " < speciesReference species = \"species_1\"/>"
419  " </listOfProducts>"
420  " <kineticLaw>"
421  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
422  " <cn> 2.0 </cn>"
423  " </math>"
424  " </kineticLaw>"
425  " </reaction>"
426  " <reaction id=\"reaction_2\" name=\"constant flux\">"
427  " <listOfReactants>"
428  " < speciesReference species = \"species_1\"/>"
429  " </listOfReactants>"
430  " <listOfProducts>"
431  " <speciesReference species=\"species_2\"/>"
432  " </listOfProducts>"
433  " <kineticLaw>"
434  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
435  " <ci> species_1 </ci>"
436  " </math>"
437  " </kineticLaw>"
438  " </reaction>"
439  " </listOfReactions>"
440  " <listOfEvents>"
441  " <event id=\"event_1\" name=\"event_1\">"
442  " <trigger>"
443  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
444  " <apply>"
445  " <gt/>"
446  " <ci> reaction_2 </ci>"
447  " <cn> 6.0 </cn>"
448  " </apply>"
449  " </math>"
450  " </trigger>"
451  " <listOfEventAssignments>"
452  " <eventAssignment variable=\"species_2\">"
453  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
454  " <cn> 2.0 </cn>"
455  " </math>"
456  " </eventAssignment>"
457  " </listOfEventAssignments>"
458  " </event>"
459  " <event id=\"event_2\" name=\"event_2\">"
460  " <trigger>"
461  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
462  " <apply>"
463  " <gt/>"
464  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
465  " <cn> 8.0 </cn>"
466  " </apply>"
467  " </math>"
468  " </trigger>"
469  " <listOfEventAssignments>"
470  " <eventAssignment variable=\"species_2\">"
471  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
472  " <cn> 2.0 </cn>"
473  " </math>"
474  " </eventAssignment>"
475  " </listOfEventAssignments>"
476  " </event>"
477  " </listOfEvents>"
478  " </model>"
479  "</sbml>"
480  ;
481 
482 /**
483  * Simple model with two species. One species is determined by a rate rule,
484  * the other is set by an event that is determined by the first species.
485  * The assignment expression references the species itself.
486  */
487 const char* test000063::MODEL_STRING7 =
488  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
489  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
490  " <model id=\"Model_1\" name=\"Model 1\">"
491  " <listOfUnitDefinitions>"
492  " <unitDefinition id=\"volume\">"
493  " <listOfUnits>"
494  " <unit kind=\"litre\" scale=\"-3\"/>"
495  " </listOfUnits>"
496  " </unitDefinition>"
497  " <unitDefinition id=\"substance\">"
498  " <listOfUnits>"
499  " <unit kind=\"mole\" scale=\"-3\"/>"
500  " </listOfUnits>"
501  " </unitDefinition>"
502  " </listOfUnitDefinitions>"
503  " <listOfCompartments>"
504  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\" />"
505  " </listOfCompartments>"
506  " <listOfSpecies>"
507  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
508  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
509  " </listOfSpecies>"
510  " <listOfRules>"
511  " <rateRule variable=\"species_1\">"
512  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
513  " <cn> 2.0 </cn>"
514  " </math>"
515  " </rateRule>"
516  " </listOfRules>"
517  " <listOfEvents>"
518  " <event id=\"event_1\" name=\"event_1\">"
519  " <trigger>"
520  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
521  " <apply>"
522  " <gt/>"
523  " <ci> species_1 </ci>"
524  " <cn> 6.0 </cn>"
525  " </apply>"
526  " </math>"
527  " </trigger>"
528  " <listOfEventAssignments>"
529  " <eventAssignment variable=\"species_2\">"
530  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
531  " <apply>"
532  " <times/>"
533  " <cn> 2.0 </cn>"
534  " <ci> species_2 </ci>"
535  " </apply>"
536  " </math>"
537  " </eventAssignment>"
538  " </listOfEventAssignments>"
539  " </event>"
540  " </listOfEvents>"
541  " </model>"
542  "</sbml>"
543  ;
544 
545 /**
546  * Simple model with two species.
547  * Both species are set by event assignments.
548  * The event is supposed to fire every three seconds from second 2.
549  * This is achieved by simulating the modulo function.
550  * This model is solely made of events.
551  */
552 const char* test000063::MODEL_STRING8 =
553  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
554  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
555  " <model id=\"Model_1\" name=\"Model 1\">"
556  " <listOfUnitDefinitions>"
557  " <unitDefinition id=\"volume\">"
558  " <listOfUnits>"
559  " <unit kind=\"litre\" scale=\"-3\"/>"
560  " </listOfUnits>"
561  " </unitDefinition>"
562  " <unitDefinition id=\"substance\">"
563  " <listOfUnits>"
564  " <unit kind=\"mole\" scale=\"-3\"/>"
565  " </listOfUnits>"
566  " </unitDefinition>"
567  " </listOfUnitDefinitions>"
568  " <listOfCompartments>"
569  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
570  " </listOfCompartments>"
571  " <listOfSpecies>"
572  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
573  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
574  " </listOfSpecies>"
575  " <listOfEvents>"
576  " <event id=\"event_1\" name=\"event_1\">"
577  " <trigger>"
578  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
579  " <apply>"
580  " <lt/>"
581  " <apply>"
582  " <minus/>"
583  " <apply>"
584  " <divide/>"
585  " <apply>"
586  " <minus/>"
587  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
588  " <cn> 2.0 </cn>"
589  " </apply>"
590  " <cn> 3.0 </cn>"
591  " </apply>"
592  " <apply>"
593  " <floor/>"
594  " <apply>"
595  " < divide / > "
596  " <apply>"
597  " < minus / > "
598  " < csymbol encoding = \"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
599  " <cn> 2.0 </cn>"
600  " </apply>"
601  " <cn> 3.0 </cn>"
602  " </apply>"
603  " </apply>"
604  " < / apply > "
605  " <cn> 0.001 < / cn > "
606  " < / apply > "
607  " < / math > "
608  " < / trigger > "
609  " <listOfEventAssignments>"
610  " < eventAssignment variable = \"species_1\">"
611  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
612  " <apply>"
613  " <times/>"
614  " <cn> 2.0 </cn>"
615  " <ci> species_1 </ci>"
616  " </apply>"
617  " </math>"
618  " </eventAssignment>"
619  " <eventAssignment variable=\"species_2\">"
620  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
621  " <apply>"
622  " <times/>"
623  " <cn> 2.0 </cn>"
624  " <ci> species_2 </ci>"
625  " </apply>"
626  " </math>"
627  " </eventAssignment>"
628  " </listOfEventAssignments>"
629  " </event>"
630  " </listOfEvents>"
631  " </model>"
632  "</sbml>"
633  ;
634 
635 /**
636  * Simple model with two species.
637  * This model represents an event endlessloop.
638  * There are three events, the first one triggers when time is greater 1
639  * second and it modifies species_1.
640  * The second event is triggered if species_1 becomes larger than species_2 and
641  * it enlarges species_2.
642  * And the third triggers when species_2 becomes larger than species_1 and
643  * enlarger species_1.
644  */
645 const char* test000063::MODEL_STRING9 =
646  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
647  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
648  " <model id=\"Model_1\" name=\"Model 1\">"
649  " <listOfUnitDefinitions>"
650  " <unitDefinition id=\"volume\">"
651  " <listOfUnits>"
652  " <unit kind=\"litre\" scale=\"-3\"/>"
653  " </listOfUnits>"
654  " </unitDefinition>"
655  " <unitDefinition id=\"substance\">"
656  " <listOfUnits>"
657  " <unit kind=\"mole\" scale=\"-3\"/>"
658  " </listOfUnits>"
659  " </unitDefinition>"
660  " </listOfUnitDefinitions>"
661  " <listOfCompartments>"
662  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
663  " </listOfCompartments>"
664  " <listOfSpecies>"
665  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
666  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
667  " </listOfSpecies>"
668  " <listOfEvents>"
669  " <event id=\"event_1\" name=\"event_1\">"
670  " <trigger>"
671  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
672  " <apply>"
673  " <gt/>"
674  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
675  " <cn> 1.0 </cn>"
676  " </apply>"
677  " </math>"
678  " </trigger>"
679  " <listOfEventAssignments>"
680  " <eventAssignment variable=\"species_1\">"
681  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
682  " <apply>"
683  " <times/>"
684  " <cn> 2.0 </cn>"
685  " <ci> species_2 </ci>"
686  " </apply>"
687  " </math>"
688  " </eventAssignment>"
689  " </listOfEventAssignments>"
690  " </event>"
691  " <event id=\"event_2\" name=\"event_2\">"
692  " <trigger>"
693  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
694  " <apply>"
695  " <gt/>"
696  " <ci> species_2 </ci>"
697  " <ci> species_1 </ci>"
698  " </apply>"
699  " </math>"
700  " </trigger>"
701  " <listOfEventAssignments>"
702  " <eventAssignment variable=\"species_1\">"
703  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
704  " <apply>"
705  " <times/>"
706  " <cn> 2.0 </cn>"
707  " <ci> species_2 </ci>"
708  " </apply>"
709  " </math>"
710  " </eventAssignment>"
711  " </listOfEventAssignments>"
712  " </event>"
713  " <event id=\"event_3\" name=\"event_3\">"
714  " <trigger>"
715  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
716  " <apply>"
717  " <gt/>"
718  " <ci> species_1 </ci>"
719  " <ci> species_2 < / ci >"
720  " </apply>"
721  " </math>"
722  " </trigger>"
723  " <listOfEventAssignments>"
724  " <eventAssignment variable=\"species_2\">"
725  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
726  " <apply>"
727  " <times/>"
728  " <cn> 2.0 </cn>"
729  " <ci> species_1 </ci>"
730  " </apply>"
731  " </math>"
732  " </eventAssignment>"
733  " </listOfEventAssignments>"
734  " </event>"
735  " </listOfEvents>"
736  " </model>"
737  "</sbml>"
738  ;
739 
740 /**
741  * Simple model with two species.
742  * Two events trigger at the same time.
743  * Each modifies one of the species and references the other species.
744  */
745 const char* test000063::MODEL_STRING10 =
746  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
747  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
748  " <model id=\"Model_1\" name=\"Model 1\">"
749  " <listOfUnitDefinitions>"
750  " <unitDefinition id=\"volume\">"
751  " <listOfUnits>"
752  " <unit kind=\"litre\" scale=\"-3\"/>"
753  " </listOfUnits>"
754  " </unitDefinition>"
755  " <unitDefinition id=\"substance\">"
756  " <listOfUnits>"
757  " <unit kind=\"mole\" scale=\"-3\"/>"
758  " </listOfUnits>"
759  " </unitDefinition>"
760  " </listOfUnitDefinitions>"
761  " <listOfCompartments>"
762  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
763  " </listOfCompartments>"
764  " <listOfSpecies>"
765  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
766  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
767  " </listOfSpecies>"
768  " <listOfEvents>"
769  " <event id=\"event_1\" name=\"event_1\">"
770  " <trigger>"
771  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
772  " <apply>"
773  " <gt/>"
774  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
775  " <cn> 1.0 </cn>"
776  " </apply>"
777  " </math>"
778  " </trigger>"
779  " <listOfEventAssignments>"
780  " <eventAssignment variable=\"species_1\">"
781  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
782  " <apply>"
783  " <times/>"
784  " <cn> 2.0 </cn>"
785  " <ci> species_2 </ci>"
786  " </apply>"
787  " </math>"
788  " </eventAssignment>"
789  " </listOfEventAssignments>"
790  " </event>"
791  " <event id=\"event_2\" name=\"event_2\">"
792  " <trigger>"
793  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
794  " <apply>"
795  " <gt/>"
796  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
797  " <cn> 1.0 </cn>"
798  " </apply>"
799  " </math>"
800  " </trigger>"
801  " <listOfEventAssignments>"
802  " <eventAssignment variable=\"species_2\">"
803  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
804  " <apply>"
805  " <times/>"
806  " <cn> 2.0 </cn>"
807  " <ci> species_1 </ci>"
808  " </apply>"
809  " </math>"
810  " </eventAssignment>"
811  " </listOfEventAssignments>"
812  " </listOfEvents>"
813  " </model>"
814  "</sbml>"
815  ;
816 
817 /**
818  * Simple model with two species.
819  * Two events. One triggers at a certain time and modifies one species. This
820  * modification triggers the second event at the same time.
821  * Although both events trigger at the same point in time, the result should be
822  * different from the model above.
823  */
824 const char* test000063::MODEL_STRING11 =
825  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
826  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
827  " <model id=\"Model_1\" name=\"Model 1\">"
828  " <listOfUnitDefinitions>"
829  " <unitDefinition id=\"volume\">"
830  " <listOfUnits>"
831  " <unit kind=\"litre\" scale=\"-3\"/>"
832  " </listOfUnits>"
833  " </unitDefinition>"
834  " <unitDefinition id=\"substance\">"
835  " <listOfUnits>"
836  " <unit kind=\"mole\" scale=\"-3\"/>"
837  " </listOfUnits>"
838  " </unitDefinition>"
839  " </listOfUnitDefinitions>"
840  " <listOfCompartments>"
841  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
842  " </listOfCompartments>"
843  " <listOfSpecies>"
844  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
845  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
846  " </listOfSpecies>"
847  " <listOfEvents>"
848  " <event id=\"event_1\" name=\"event_1\">"
849  " <trigger>"
850  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
851  " <apply>"
852  " <gt/>"
853  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
854  " <cn> 1.0 </cn>"
855  " </apply>"
856  " </math>"
857  " </trigger>"
858  " <listOfEventAssignments>"
859  " <eventAssignment variable=\"species_1\">"
860  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
861  " <apply>"
862  " <times/>"
863  " <cn> 2.0 </cn>"
864  " <ci> species_2 </ci>"
865  " </apply>"
866  " </math>"
867  " </eventAssignment>"
868  " </listOfEventAssignments>"
869  " </event>"
870  " <event id=\"event_2\" name=\"event_2\">"
871  " <trigger>"
872  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
873  " <apply>"
874  " <gt/>"
875  " <ci> species_1 </ci>"
876  " <cn> 7.0 </cn>"
877  " </apply>"
878  " </math>"
879  " </trigger>"
880  " <listOfEventAssignments>"
881  " <eventAssignment variable=\"species_2\">"
882  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
883  " <apply>"
884  " <times/>"
885  " <cn> 2.0 </cn>"
886  " <ci> species_1 </ci>"
887  " </apply>"
888  " </math>"
889  " </eventAssignment>"
890  " </listOfEventAssignments>"
891  " </listOfEvents>"
892  " </model>"
893  "</sbml>"
894  ;
895 
896 /**
897  * Simple model with two species. One is determined by an assignment, the
898  * other is set in an event assignment.
899  * The event has a delay.
900  */
901 const char* test000063::MODEL_STRING12 =
902  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
903  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
904  " <model id=\"Model_1\" name=\"Model 1\">"
905  " <listOfUnitDefinitions>"
906  " <unitDefinition id=\"volume\">"
907  " <listOfUnits>"
908  " <unit kind=\"litre\" scale=\"-3\"/>"
909  " </listOfUnits>"
910  " </unitDefinition>"
911  " <unitDefinition id=\"substance\">"
912  " <listOfUnits>"
913  " <unit kind=\"mole\" scale=\"-3\"/>"
914  " </listOfUnits>"
915  " </unitDefinition>"
916  " </listOfUnitDefinitions>"
917  " <listOfCompartments>"
918  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
919  " </listOfCompartments>"
920  " <listOfSpecies>"
921  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
922  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
923  " </listOfSpecies>"
924  " <listOfRules>"
925  " <assignmentRule variable=\"species_1\">"
926  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
927  " <apply>"
928  " <times/>"
929  " <ci>species_2</ci>"
930  " <cn> 2.0 </cn>"
931  " </apply>"
932  " </math>"
933  " </assignmentRule>"
934  " </listOfRules>"
935  " <listOfEvents>"
936  " <event id=\"event_1\" name=\"event_1\">"
937  " <trigger>"
938  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
939  " <apply>"
940  " <gt/>"
941  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
942  " <cn> 2.0 </cn>"
943  " </apply>"
944  " </math>"
945  " </trigger>"
946  " <delay>"
947  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
948  " <cn> 2.0 </cn>"
949  " </math>"
950  " </delay>"
951  " <listOfEventAssignments>"
952  " <eventAssignment variable=\"species_2\">"
953  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
954  " <cn> 2.0 </cn>"
955  " </math>"
956  " </eventAssignment>"
957  " </listOfEventAssignments>"
958  " </event>"
959  " </listOfEvents>"
960  " </model>"
961  "</sbml>"
962  ;
963 
964 /**
965  * Simple model with two species.
966  * Two events trigger at the same time.
967  * Each modifies one of the species and references the other species.
968  * Both events use the same delay.
969  */
970 const char* test000063::MODEL_STRING13 =
971  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
972  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
973  " <model id=\"Model_1\" name=\"Model 1\">"
974  " <listOfUnitDefinitions>"
975  " <unitDefinition id=\"volume\">"
976  " <listOfUnits>"
977  " <unit kind=\"litre\" scale=\"-3\"/>"
978  " </listOfUnits>"
979  " </unitDefinition>"
980  " <unitDefinition id=\"substance\">"
981  " <listOfUnits>"
982  " <unit kind=\"mole\" scale=\"-3\"/>"
983  " </listOfUnits>"
984  " </unitDefinition>"
985  " </listOfUnitDefinitions>"
986  " <listOfCompartments>"
987  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
988  " </listOfCompartments>"
989  " <listOfSpecies>"
990  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
991  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
992  " </listOfSpecies>"
993  " <listOfEvents>"
994  " <event id=\"event_1\" name=\"event_1\">"
995  " <trigger>"
996  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
997  " <apply>"
998  " <gt/>"
999  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
1000  " <cn> 1.0 </cn>"
1001  " </apply>"
1002  " </math>"
1003  " </trigger>"
1004  " <delay>"
1005  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1006  " <cn> 2.0 </cn>"
1007  " </math>"
1008  " </delay>"
1009  " <listOfEventAssignments>"
1010  " <eventAssignment variable=\"species_1\">"
1011  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1012  " <apply>"
1013  " <times/>"
1014  " <cn> 2.0 </cn>"
1015  " <ci> species_2 </ci>"
1016  " </apply>"
1017  " </math>"
1018  " </eventAssignment>"
1019  " </listOfEventAssignments>"
1020  " </event>"
1021  " <event id=\"event_2\" name=\"event_2\">"
1022  " <trigger>"
1023  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1024  " <apply>"
1025  " <gt/>"
1026  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
1027  " <cn> 1.0 </cn>"
1028  " </apply>"
1029  " </math>"
1030  " </trigger>"
1031  " <delay>"
1032  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1033  " <cn> 2.0 </cn>"
1034  " </math>"
1035  " </delay>"
1036  " <listOfEventAssignments>"
1037  " <eventAssignment variable=\"species_2\">"
1038  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1039  " <apply>"
1040  " <times/>"
1041  " <cn> 2.0 </cn>"
1042  " <ci> species_1 </ci>"
1043  " </apply>"
1044  " </math>"
1045  " </eventAssignment>"
1046  " </listOfEventAssignments>"
1047  " </listOfEvents>"
1048  " </model>"
1049  "</sbml>"
1050  ;
1051 
1052 /**
1053  * Simple model with two species.
1054  * Two events. One triggers at a certain time and modifies one species. This
1055  * modification triggers the second event at the same time.
1056  * Although both events trigger at the same point in time, the result should be
1057  * different from the model above.
1058  * Both event use the same delay
1059  */
1060 const char* test000063::MODEL_STRING14 =
1061  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1062  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1063  " <model id=\"Model_1\" name=\"Model 1\">"
1064  " <listOfUnitDefinitions>"
1065  " <unitDefinition id=\"volume\">"
1066  " <listOfUnits>"
1067  " <unit kind=\"litre\" scale=\"-3\"/>"
1068  " </listOfUnits>"
1069  " </unitDefinition>"
1070  " <unitDefinition id=\"substance\">"
1071  " <listOfUnits>"
1072  " <unit kind=\"mole\" scale=\"-3\"/>"
1073  " </listOfUnits>"
1074  " </unitDefinition>"
1075  " </listOfUnitDefinitions>"
1076  " <listOfCompartments>"
1077  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
1078  " </listOfCompartments>"
1079  " <listOfSpecies>"
1080  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
1081  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
1082  " </listOfSpecies>"
1083  " <listOfEvents>"
1084  " <event id=\"event_1\" name=\"event_1\">"
1085  " <trigger>"
1086  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1087  " <apply>"
1088  " <gt/>"
1089  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
1090  " <cn> 1.0 </cn>"
1091  " </apply>"
1092  " </math>"
1093  " </trigger>"
1094  " <delay>"
1095  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1096  " <cn> 2.0 </cn>"
1097  " </math>"
1098  " </delay>"
1099  " <listOfEventAssignments>"
1100  " <eventAssignment variable=\"species_1\">"
1101  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1102  " <apply>"
1103  " <times/>"
1104  " <cn> 2.0 </cn>"
1105  " <ci> species_2 </ci>"
1106  " </apply>"
1107  " </math>"
1108  " </eventAssignment>"
1109  " </listOfEventAssignments>"
1110  " </event>"
1111  " <event id=\"event_2\" name=\"event_2\">"
1112  " <trigger>"
1113  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1114  " <apply>"
1115  " <gt/>"
1116  " <ci> species_1 </ci>"
1117  " <cn> 7.0 </cn>"
1118  " </apply>"
1119  " </math>"
1120  " </trigger>"
1121  " <delay>"
1122  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1123  " <cn> 2.0 </cn>"
1124  " </math>"
1125  " </delay>"
1126  " <listOfEventAssignments>"
1127  " <eventAssignment variable=\"species_2\">"
1128  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1129  " <apply>"
1130  " <times/>"
1131  " <cn> 2.0 </cn>"
1132  " <ci> species_1 </ci>"
1133  " </apply>"
1134  " </math>"
1135  " </eventAssignment>"
1136  " </listOfEventAssignments>"
1137  " </listOfEvents>"
1138  " </model>"
1139  "</sbml>"
1140  ;
1141 
1142 /**
1143  * Simple model with two species.
1144  * Two events trigger at the same time.
1145  * Each modifies one of the species and references the other species.
1146  * Both events use different delays.
1147  */
1148 const char* test000063::MODEL_STRING15 =
1149  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1150  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1151  " <model id=\"Model_1\" name=\"Model 1\">"
1152  " <listOfUnitDefinitions>"
1153  " <unitDefinition id=\"volume\">"
1154  " <listOfUnits>"
1155  " <unit kind=\"litre\" scale=\"-3\"/>"
1156  " </listOfUnits>"
1157  " </unitDefinition>"
1158  " <unitDefinition id=\"substance\">"
1159  " <listOfUnits>"
1160  " <unit kind=\"mole\" scale=\"-3\"/>"
1161  " </listOfUnits>"
1162  " </unitDefinition>"
1163  " </listOfUnitDefinitions>"
1164  " <listOfCompartments>"
1165  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
1166  " </listOfCompartments>"
1167  " <listOfSpecies>"
1168  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
1169  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
1170  " </listOfSpecies>"
1171  " <listOfEvents>"
1172  " <event id=\"event_1\" name=\"event_1\">"
1173  " <trigger>"
1174  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1175  " <apply>"
1176  " <gt/>"
1177  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
1178  " <cn> 1.0 </cn>"
1179  " </apply>"
1180  " </math>"
1181  " </trigger>"
1182  " <delay>"
1183  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1184  " <cn> 3.0 </cn>"
1185  " </math>"
1186  " </delay>"
1187  " <listOfEventAssignments>"
1188  " <eventAssignment variable=\"species_1\">"
1189  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1190  " <apply>"
1191  " <times/>"
1192  " <cn> 2.0 </cn>"
1193  " <ci> species_2 </ci>"
1194  " </apply>"
1195  " </math>"
1196  " </eventAssignment>"
1197  " </listOfEventAssignments>"
1198  " </event>"
1199  " <event id=\"event_2\" name=\"event_2\">"
1200  " <trigger>"
1201  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1202  " <apply>"
1203  " <gt/>"
1204  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
1205  " <cn> 1.0 </cn>"
1206  " </apply>"
1207  " </math>"
1208  " </trigger>"
1209  " <delay>"
1210  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1211  " <cn> 2.0 </cn>"
1212  " </math>"
1213  " </delay>"
1214  " <listOfEventAssignments>"
1215  " <eventAssignment variable=\"species_2\">"
1216  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1217  " <apply>"
1218  " <times/>"
1219  " <cn> 2.0 </cn>"
1220  " <ci> species_1 </ci>"
1221  " </apply>"
1222  " </math>"
1223  " </eventAssignment>"
1224  " </listOfEventAssignments>"
1225  " </listOfEvents>"
1226  " </model>"
1227  "</sbml>"
1228  ;
1229 
1230 /**
1231  * Simple model with two species.
1232  * Two events. One triggers at a certain time and modifies one species. This
1233  * modification triggers the second event at the same time.
1234  * Although both events trigger at the same point in time, the result should be
1235  * different from the model above.
1236  * Both event use different delays.
1237  */
1238 const char* test000063::MODEL_STRING16 =
1239  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1240  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1241  " <model id=\"Model_1\" name=\"Model 1\">"
1242  " <listOfUnitDefinitions>"
1243  " <unitDefinition id=\"volume\">"
1244  " <listOfUnits>"
1245  " <unit kind=\"litre\" scale=\"-3\"/>"
1246  " </listOfUnits>"
1247  " </unitDefinition>"
1248  " <unitDefinition id=\"substance\">"
1249  " <listOfUnits>"
1250  " <unit kind=\"mole\" scale=\"-3\"/>"
1251  " </listOfUnits>"
1252  " </unitDefinition>"
1253  " </listOfUnitDefinitions>"
1254  " <listOfCompartments>"
1255  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
1256  " </listOfCompartments>"
1257  " <listOfSpecies>"
1258  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"3.0\"/>"
1259  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
1260  " </listOfSpecies>"
1261  " <listOfEvents>"
1262  " <event id=\"event_1\" name=\"event_1\">"
1263  " <trigger>"
1264  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1265  " <apply>"
1266  " <gt/>"
1267  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
1268  " <cn> 1.0 </cn>"
1269  " </apply>"
1270  " </math>"
1271  " </trigger>"
1272  " <delay>"
1273  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1274  " <cn> 3.0 </cn>"
1275  " </math>"
1276  " </delay>"
1277  " <listOfEventAssignments>"
1278  " <eventAssignment variable=\"species_1\">"
1279  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1280  " <apply>"
1281  " <times/>"
1282  " <cn> 2.0 </cn>"
1283  " <ci> species_2 </ci>"
1284  " </apply>"
1285  " </math>"
1286  " </eventAssignment>"
1287  " </listOfEventAssignments>"
1288  " </event>"
1289  " <event id=\"event_2\" name=\"event_2\">"
1290  " <trigger>"
1291  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1292  " <apply>"
1293  " <gt/>"
1294  " <ci> species_1 </ci>"
1295  " <cn> 7.0 </cn>"
1296  " </apply>"
1297  " </math>"
1298  " </trigger>"
1299  " <delay>"
1300  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1301  " <cn> 2.0 </cn>"
1302  " </math>"
1303  " </delay>"
1304  " <listOfEventAssignments>"
1305  " <eventAssignment variable=\"species_2\">"
1306  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1307  " <apply>"
1308  " <times/>"
1309  " <cn> 2.0 </cn>"
1310  " <ci> species_1 </ci>"
1311  " </apply>"
1312  " </math>"
1313  " </eventAssignment>"
1314  " </listOfEventAssignments>"
1315  " </listOfEvents>"
1316  " </model>"
1317  "</sbml>"
1318  ;
1319 
1320 /**
1321  * Simple model with two species. One is determined by an ode , the
1322  * other is set in an event assignment.
1323  * The delay in the event has to be calculated from the trigger time.
1324  */
1325 const char* test000063::MODEL_STRING17 =
1326  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
1327  "<sbml xmlns=\"http://www.sbml.org/sbml/level2\" level=\"2\" version=\"1\">"
1328  " <model id=\"Model_1\" name=\"Model 1\">"
1329  " <listOfUnitDefinitions>"
1330  " <unitDefinition id=\"volume\">"
1331  " <listOfUnits>"
1332  " <unit kind=\"litre\" scale=\"-3\"/>"
1333  " </listOfUnits>"
1334  " </unitDefinition>"
1335  " <unitDefinition id=\"substance\">"
1336  " <listOfUnits>"
1337  " <unit kind=\"mole\" scale=\"-3\"/>"
1338  " </listOfUnits>"
1339  " </unitDefinition>"
1340  " </listOfUnitDefinitions>"
1341  " <listOfCompartments>"
1342  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>"
1343  " </listOfCompartments>"
1344  " <listOfSpecies>"
1345  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"0.0\"/>"
1346  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"5.0\"/>"
1347  " </listOfSpecies>"
1348  " <listOfRules>"
1349  " <rateRule variable=\"species_1\">"
1350  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1351  " <cn> 2.0 </cn>"
1352  " </math>"
1353  " </rateRule>"
1354  " </listOfRules>"
1355  " <listOfEvents>"
1356  " <event id=\"event_1\" name=\"event_1\">"
1357  " <trigger>"
1358  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1359  " <apply>"
1360  " <gt/>"
1361  " <ci>species_1</ci>"
1362  " <cn> 8.0 </cn>"
1363  " </apply>"
1364  " </math>"
1365  " </trigger>"
1366  " <delay>"
1367  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1368  " <apply>"
1369  " <divide/>"
1370  " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>"
1371  " <cn> 2.0 </cn>"
1372  " < / apply > "
1373  " < / math > "
1374  " < / delay > "
1375  " <listOfEventAssignments>"
1376  " < eventAssignment variable = \"species_2\">"
1377  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">"
1378  " <cn> 2.0 </cn>"
1379  " </math>"
1380  " </eventAssignment>"
1381  " </listOfEventAssignments>"
1382  " </event>"
1383  " </listOfEvents>"
1384  " </model>"
1385  "</sbml>"
1386  ;
static const char * MODEL_STRING15
Definition: test000063.h:51
static const char * MODEL_STRING4
Definition: test000063.h:40
void test_events_1()
Definition: test000063.cpp:52
Header file of class CModelEntity and CModelValue.
void tearDown()
Definition: test000063.cpp:47
static const char * MODEL_STRING2
Definition: test000063.h:38
static const char * MODEL_STRING8
Definition: test000063.h:44
static const char * MODEL_STRING17
Definition: test000063.h:53
static const char * MODEL_STRING7
Definition: test000063.h:43
static const char * MODEL_STRING13
Definition: test000063.h:49
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000063.h:54
static const char * MODEL_STRING12
Definition: test000063.h:48
static const char * MODEL_STRING1
Definition: test000063.h:37
static const char * MODEL_STRING3
Definition: test000063.h:39
static const char * MODEL_STRING6
Definition: test000063.h:42
static const char * MODEL_STRING5
Definition: test000063.h:41
static const char * MODEL_STRING10
Definition: test000063.h:46
static const char * MODEL_STRING9
Definition: test000063.h:45
static const char * MODEL_STRING14
Definition: test000063.h:50
static CCopasiDataModel * addDatamodel()
void setUp()
Definition: test000063.cpp:39
static const char * MODEL_STRING16
Definition: test000063.h:52
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
static void init(int argc, char *argv[], const bool &withGui=false)
Definition: CModel.h:50
static const char * MODEL_STRING11
Definition: test000063.h:47