COPASI API  4.16.103
test000078.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 #include "test000078.h"
12 
13 #include <sstream>
14 #include "utilities.hpp"
16 #include "copasi/model/CModel.h"
17 #include "copasi/model/CMetab.h"
19 #include "copasi/model/CReaction.h"
30 
31 #include "sbml/SBMLDocument.h"
32 #include "sbml/Model.h"
33 
35 
36 CCopasiDataModel* test000078::pCOPASIDATAMODEL = NULL;
37 
39 {
40  // Create the root container.
41  CCopasiRootContainer::init(0, NULL, false);
42  // Create the global data model.
44 }
45 
47 {
49 }
50 
52 {
53  CCopasiDataModel* pDataModel = pCOPASIDATAMODEL;
54 
55  try
56  {
57  CPPUNIT_ASSERT(pDataModel->importSBMLFromString(MODEL_STRING1));
58  }
59  catch (...)
60  {
61  // there should not be any exceptions
62  CPPUNIT_ASSERT(false);
63  }
64 
65  CModel* pModel = pDataModel->getModel();
66  CPPUNIT_ASSERT(pModel != NULL);
67  CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() == CModel::Mol);
68  CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() == CModel::l);
69  CPPUNIT_ASSERT(pModel->getTimeUnitEnum() == CModel::s);
70  // check if the function definitions were imported correctly
72  const CEvaluationTree* pFun = pFunDB->findFunction("function_1");
73  CPPUNIT_ASSERT(pFun != NULL);
74  const CKinFunction* pKinFun = dynamic_cast<const CKinFunction*>(pFun);
75  CPPUNIT_ASSERT(pKinFun != NULL);
76  // 1 parameter called k
77  // expression is 3.0 * k
78  const CFunctionParameters* pFunParams = &pKinFun->getVariables();
79  CPPUNIT_ASSERT(pFunParams != NULL);
80  CPPUNIT_ASSERT(pFunParams->size() == 1);
81  const CFunctionParameter* pFunParam = (*pFunParams)[0];
82  CPPUNIT_ASSERT(pFunParam != NULL);
83  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("k"));
84  const CEvaluationNode* pRoot = pKinFun->getRoot();
85  CPPUNIT_ASSERT(pRoot != NULL);
86  CPPUNIT_ASSERT(CEvaluationNode::type(pRoot->getType()) == CEvaluationNode::OPERATOR);
88  const CEvaluationNode* pChild = dynamic_cast<const CEvaluationNode*>(pRoot->getChild());
89  CPPUNIT_ASSERT(pChild != NULL);
90  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::NUMBER);
92  const CEvaluationNodeNumber* pNumberNode = dynamic_cast<const CEvaluationNodeNumber*>(pChild);
93  CPPUNIT_ASSERT(pNumberNode != NULL);
94  CPPUNIT_ASSERT(fabs((pNumberNode->getValue() - 3.0) / 3.0) < 1e-6);
95  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getSibling());
96  CPPUNIT_ASSERT(pChild != NULL);
97  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
99  const CEvaluationNodeVariable* pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
100  CPPUNIT_ASSERT(pVarNode != NULL);
101  CPPUNIT_ASSERT(pVarNode->getData() == std::string("k"));
102  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getSibling());
103  CPPUNIT_ASSERT(pChild == NULL);
104 
105  pFun = pFunDB->findFunction("function_2");
106  CPPUNIT_ASSERT(pFun != NULL);
107  pKinFun = dynamic_cast<const CKinFunction*>(pFun);
108  CPPUNIT_ASSERT(pKinFun != NULL);
109  // 2 parameters called A and B
110  // expression is A + B
111  pFunParams = &pKinFun->getVariables();
112  CPPUNIT_ASSERT(pFunParams != NULL);
113  CPPUNIT_ASSERT(pFunParams->size() == 2);
114  pFunParam = (*pFunParams)[0];
115  CPPUNIT_ASSERT(pFunParam != NULL);
116  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("A"));
117  pFunParam = (*pFunParams)[1];
118  CPPUNIT_ASSERT(pFunParam != NULL);
119  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("B"));
120  pRoot = pKinFun->getRoot();
121  CPPUNIT_ASSERT(pRoot != NULL);
122  CPPUNIT_ASSERT(CEvaluationNode::type(pRoot->getType()) == CEvaluationNode::OPERATOR);
124  pChild = dynamic_cast<const CEvaluationNode*>(pRoot->getChild());
125  CPPUNIT_ASSERT(pChild != NULL);
126  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
128  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
129  CPPUNIT_ASSERT(pVarNode != NULL);
130  CPPUNIT_ASSERT(pVarNode->getData() == std::string("B"));
131  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getSibling());
132  CPPUNIT_ASSERT(pChild != NULL);
133  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
135  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
136  CPPUNIT_ASSERT(pVarNode != NULL);
137  CPPUNIT_ASSERT(pVarNode->getData() == std::string("A"));
138  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getSibling());
139  CPPUNIT_ASSERT(pChild == NULL);
140 
141  pFun = pFunDB->findFunction("function_3");
142  CPPUNIT_ASSERT(pFun != NULL);
143  pKinFun = dynamic_cast<const CKinFunction*>(pFun);
144  CPPUNIT_ASSERT(pKinFun != NULL);
145  // 2 parameters called k and C
146  // expression is C - (k * 1.3)
147  pFunParams = &pKinFun->getVariables();
148  CPPUNIT_ASSERT(pFunParams != NULL);
149  CPPUNIT_ASSERT(pFunParams->size() == 2);
150  pFunParam = (*pFunParams)[0];
151  CPPUNIT_ASSERT(pFunParam != NULL);
152  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("k"));
153  pFunParam = (*pFunParams)[1];
154  CPPUNIT_ASSERT(pFunParam != NULL);
155  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("C"));
156  pRoot = pKinFun->getRoot();
157  CPPUNIT_ASSERT(pRoot != NULL);
158  CPPUNIT_ASSERT(CEvaluationNode::type(pRoot->getType()) == CEvaluationNode::OPERATOR);
160  pChild = dynamic_cast<const CEvaluationNode*>(pRoot->getChild());
161  CPPUNIT_ASSERT(pChild != NULL);
162  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
164  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
165  CPPUNIT_ASSERT(pVarNode != NULL);
166  CPPUNIT_ASSERT(pVarNode->getData() == std::string("C"));
167  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getSibling());
168  CPPUNIT_ASSERT(pChild != NULL);
169  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::OPERATOR);
171  CPPUNIT_ASSERT(pChild->getSibling() == NULL);
172  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getChild());
173  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
175  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
176  CPPUNIT_ASSERT(pVarNode != NULL);
177  CPPUNIT_ASSERT(pVarNode->getData() == std::string("k"));
178  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getSibling());
179  CPPUNIT_ASSERT(pChild != NULL);
180  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::NUMBER);
182  pNumberNode = dynamic_cast<const CEvaluationNodeNumber*>(pChild);
183  CPPUNIT_ASSERT(pNumberNode != NULL);
184  CPPUNIT_ASSERT(fabs((pNumberNode->getValue() - 1.3) / 1.3) < 1e-6);
185  CPPUNIT_ASSERT(pChild->getSibling() == NULL);
186 
187  pFun = pFunDB->findFunction("function_4");
188  CPPUNIT_ASSERT(pFun != NULL);
189  pKinFun = dynamic_cast<const CKinFunction*>(pFun);
190  CPPUNIT_ASSERT(pKinFun != NULL);
191  // 2 parameters called x and y
192  // expression is function_2(x,y)/2.0
193  pFunParams = &pKinFun->getVariables();
194  CPPUNIT_ASSERT(pFunParams != NULL);
195  CPPUNIT_ASSERT(pFunParams->size() == 2);
196  pFunParam = (*pFunParams)[0];
197  CPPUNIT_ASSERT(pFunParam != NULL);
198  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("x"));
199  pFunParam = (*pFunParams)[1];
200  CPPUNIT_ASSERT(pFunParam != NULL);
201  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("y"));
202  pRoot = pKinFun->getRoot();
203  CPPUNIT_ASSERT(pRoot != NULL);
204  CPPUNIT_ASSERT(CEvaluationNode::type(pRoot->getType()) == CEvaluationNode::OPERATOR);
206  pChild = dynamic_cast<const CEvaluationNode*>(pRoot->getChild());
207  CPPUNIT_ASSERT(pChild != NULL);
208  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::CALL);
210  const CEvaluationNodeCall* pCallNode = dynamic_cast<const CEvaluationNodeCall*>(pChild);
211  CPPUNIT_ASSERT(pCallNode != NULL);
212  CPPUNIT_ASSERT(pCallNode->getData() == std::string("function_2"));
213  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getChild());
214  CPPUNIT_ASSERT(pChild != NULL);
215  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
217  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
218  CPPUNIT_ASSERT(pVarNode != NULL);
219  CPPUNIT_ASSERT(pVarNode->getData() == std::string("x"));
220  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getSibling());
221  CPPUNIT_ASSERT(pChild != NULL);
222  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
224  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
225  CPPUNIT_ASSERT(pVarNode != NULL);
226  CPPUNIT_ASSERT(pVarNode->getData() == std::string("y"));
227  CPPUNIT_ASSERT(pChild->getSibling() == NULL);
228  pChild = dynamic_cast<const CEvaluationNode*>(pRoot->getChild()->getSibling());
229  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::NUMBER);
231  pNumberNode = dynamic_cast<const CEvaluationNodeNumber*>(pChild);
232  CPPUNIT_ASSERT(pNumberNode != NULL);
233  CPPUNIT_ASSERT(fabs((pNumberNode->getValue() - 2.0) / 2.0) < 1e-6);
234  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getSibling());
235  CPPUNIT_ASSERT(pChild == NULL);
236 
237  pFun = pFunDB->findFunction("function_5");
238  CPPUNIT_ASSERT(pFun != NULL);
239  pKinFun = dynamic_cast<const CKinFunction*>(pFun);
240  CPPUNIT_ASSERT(pKinFun != NULL);
241  // 3 parameters called a, b and c
242  // expression is function_3(c,a) + (function_1(b) - 5.23)
243  pFunParams = &pKinFun->getVariables();
244  CPPUNIT_ASSERT(pFunParams != NULL);
245  CPPUNIT_ASSERT(pFunParams->size() == 3);
246  pFunParam = (*pFunParams)[0];
247  CPPUNIT_ASSERT(pFunParam != NULL);
248  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("a"));
249  pFunParam = (*pFunParams)[1];
250  CPPUNIT_ASSERT(pFunParam != NULL);
251  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("b"));
252  pFunParam = (*pFunParams)[2];
253  CPPUNIT_ASSERT(pFunParam != NULL);
254  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("c"));
255  pRoot = pKinFun->getRoot();
256  CPPUNIT_ASSERT(pRoot != NULL);
257  CPPUNIT_ASSERT(CEvaluationNode::type(pRoot->getType()) == CEvaluationNode::OPERATOR);
259  pChild = dynamic_cast<const CEvaluationNode*>(pRoot->getChild());
260  CPPUNIT_ASSERT(pChild != NULL);
261  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::CALL);
263  pCallNode = dynamic_cast<const CEvaluationNodeCall*>(pChild);
264  CPPUNIT_ASSERT(pCallNode != NULL);
265  CPPUNIT_ASSERT(pCallNode->getData() == std::string("function_3"));
266  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getChild());
267  CPPUNIT_ASSERT(pChild != NULL);
268  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
270  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
271  CPPUNIT_ASSERT(pVarNode != NULL);
272  CPPUNIT_ASSERT(pVarNode->getData() == std::string("c"));
273  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getSibling());
274  CPPUNIT_ASSERT(pChild != NULL);
275  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
277  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
278  CPPUNIT_ASSERT(pVarNode != NULL);
279  CPPUNIT_ASSERT(pVarNode->getData() == std::string("a"));
280  CPPUNIT_ASSERT(pChild->getSibling() == NULL);
281  pChild = dynamic_cast<const CEvaluationNode*>(pRoot->getChild()->getSibling());
282  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::OPERATOR);
284  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getChild());
285  CPPUNIT_ASSERT(pChild != NULL);
286  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::CALL);
288  pCallNode = dynamic_cast<const CEvaluationNodeCall*>(pChild);
289  CPPUNIT_ASSERT(pCallNode != NULL);
290  CPPUNIT_ASSERT(pCallNode->getData() == std::string("function_1"));
291  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getChild());
292  CPPUNIT_ASSERT(pChild != NULL);
293  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
295  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
296  CPPUNIT_ASSERT(pVarNode != NULL);
297  CPPUNIT_ASSERT(pVarNode->getData() == std::string("b"));
298  CPPUNIT_ASSERT(pChild->getSibling() == NULL);
299  pChild = dynamic_cast<const CEvaluationNode*>(pRoot->getChild()->getSibling()->getChild()->getSibling());
300  CPPUNIT_ASSERT(pChild != NULL);
301  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::NUMBER);
303  pNumberNode = dynamic_cast<const CEvaluationNodeNumber*>(pChild);
304  CPPUNIT_ASSERT(pNumberNode != NULL);
305  CPPUNIT_ASSERT(fabs((pNumberNode->getValue() - 5.23) / 5.23) < 1e-6);
306  CPPUNIT_ASSERT(pChild->getSibling() == NULL);
307 
308  pFun = pFunDB->findFunction("function_6");
309  CPPUNIT_ASSERT(pFun != NULL);
310  pKinFun = dynamic_cast<const CKinFunction*>(pFun);
311  CPPUNIT_ASSERT(pKinFun != NULL);
312  // 3 parameters called k1, k2 and k3
313  // expression is function_5(k1,k2,k3)
314  pFunParams = &pKinFun->getVariables();
315  CPPUNIT_ASSERT(pFunParams != NULL);
316  CPPUNIT_ASSERT(pFunParams->size() == 3);
317  pFunParam = (*pFunParams)[0];
318  CPPUNIT_ASSERT(pFunParam != NULL);
319  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("k1"));
320  pFunParam = (*pFunParams)[1];
321  CPPUNIT_ASSERT(pFunParam != NULL);
322  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("k2"));
323  pFunParam = (*pFunParams)[2];
324  CPPUNIT_ASSERT(pFunParam != NULL);
325  CPPUNIT_ASSERT(pFunParam->getObjectName() == std::string("k3"));
326  pRoot = pKinFun->getRoot();
327  CPPUNIT_ASSERT(pRoot != NULL);
328  CPPUNIT_ASSERT(CEvaluationNode::type(pRoot->getType()) == CEvaluationNode::CALL);
330  pCallNode = dynamic_cast<const CEvaluationNodeCall*>(pRoot);
331  CPPUNIT_ASSERT(pCallNode != NULL);
332  CPPUNIT_ASSERT(pCallNode->getData() == std::string("function_5"));
333  pChild = dynamic_cast<const CEvaluationNode*>(pRoot->getChild());
334  CPPUNIT_ASSERT(pChild != NULL);
335  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
337  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
338  CPPUNIT_ASSERT(pVarNode != NULL);
339  CPPUNIT_ASSERT(pVarNode->getData() == std::string("k1"));
340  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getSibling());
341  CPPUNIT_ASSERT(pChild != NULL);
342  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
344  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
345  CPPUNIT_ASSERT(pVarNode != NULL);
346  CPPUNIT_ASSERT(pVarNode->getData() == std::string("k2"));
347  pChild = dynamic_cast<const CEvaluationNode*>(pChild->getSibling());
348  CPPUNIT_ASSERT(pChild != NULL);
349  CPPUNIT_ASSERT(CEvaluationNode::type(pChild->getType()) == CEvaluationNode::VARIABLE);
351  pVarNode = dynamic_cast<const CEvaluationNodeVariable*>(pChild);
352  CPPUNIT_ASSERT(pVarNode != NULL);
353  CPPUNIT_ASSERT(pVarNode->getData() == std::string("k3"));
354  CPPUNIT_ASSERT(pChild->getSibling() == NULL);
355 
356  CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
357  const CCompartment* pCompartment = pModel->getCompartments()[0];
358  CPPUNIT_ASSERT(pCompartment != NULL);
359  CPPUNIT_ASSERT(pCompartment->getStatus() == CModelEntity::FIXED);
360  CPPUNIT_ASSERT(pModel->getMetabolites().size() == 6);
361  // check metabolites
362  const CMetab* pMetab = pModel->getMetabolites()[0];
363  CPPUNIT_ASSERT(pMetab != NULL);
364  CPPUNIT_ASSERT(pMetab->getObjectName() == "A");
365  CPPUNIT_ASSERT(pMetab->getStatus() == CModelEntity::REACTIONS);
366  pMetab = pModel->getMetabolites()[1];
367  CPPUNIT_ASSERT(pMetab != NULL);
368  CPPUNIT_ASSERT(pMetab->getObjectName() == "B");
369  CPPUNIT_ASSERT(pMetab->getStatus() == CModelEntity::REACTIONS);
370 
371  pMetab = pModel->getMetabolites()[2];
372  CPPUNIT_ASSERT(pMetab != NULL);
373  CPPUNIT_ASSERT(pMetab->getObjectName() == "C");
374  CPPUNIT_ASSERT(pMetab->getStatus() == CModelEntity::ASSIGNMENT);
375  // check assignment
376  const CEvaluationTree* pTree = pMetab->getExpressionPtr();
377  CPPUNIT_ASSERT(pTree != NULL);
378  pRoot = pTree->getRoot();
379  CPPUNIT_ASSERT(pRoot != NULL);
380  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot) != NULL);
381  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot)->getData() == "function_5");
382 
383  pMetab = pModel->getMetabolites()[3];
384  CPPUNIT_ASSERT(pMetab != NULL);
385  CPPUNIT_ASSERT(pMetab->getObjectName() == "D");
386  CPPUNIT_ASSERT(pMetab->getStatus() == CModelEntity::ODE);
387  // check ode
388  pTree = pMetab->getExpressionPtr();
389  CPPUNIT_ASSERT(pTree != NULL);
390  pRoot = pTree->getRoot();
391  CPPUNIT_ASSERT(pRoot != NULL);
392  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot) != NULL);
393  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot)->getData() == "function_2");
394 
395  pMetab = pModel->getMetabolites()[4];
396  CPPUNIT_ASSERT(pMetab != NULL);
397  CPPUNIT_ASSERT(pMetab->getObjectName() == "E");
398  CPPUNIT_ASSERT(pMetab->getStatus() == CModelEntity::ODE);
399  // check ode
400  pTree = pMetab->getExpressionPtr();
401  CPPUNIT_ASSERT(pTree != NULL);
402  pRoot = pTree->getRoot();
403  CPPUNIT_ASSERT(pRoot != NULL);
404  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot) != NULL);
405  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot)->getData() == "function_4");
406 
407  pMetab = pModel->getMetabolites()[5];
408  CPPUNIT_ASSERT(pMetab != NULL);
409  CPPUNIT_ASSERT(pMetab->getObjectName() == "F");
410  CPPUNIT_ASSERT(pMetab->getStatus() == CModelEntity::ODE);
411  // check ode
412  pTree = pMetab->getExpressionPtr();
413  CPPUNIT_ASSERT(pTree != NULL);
414  pRoot = pTree->getRoot();
415  CPPUNIT_ASSERT(pRoot != NULL);
416  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot) != NULL);
417  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot)->getData() == "function_6");
418 
419  // check model values
420  CPPUNIT_ASSERT(pModel->getModelValues().size() == 3);
421  const CModelValue* pModelValue = pModel->getModelValues()[0];
422  CPPUNIT_ASSERT(pModelValue != NULL);
423  CPPUNIT_ASSERT(pModelValue->getObjectName() == "K1");
424  CPPUNIT_ASSERT(pModelValue->getStatus() == CModelEntity::ASSIGNMENT);
425  // check assignment
426  pTree = pModelValue->getExpressionPtr();
427  CPPUNIT_ASSERT(pTree != NULL);
428  pRoot = pTree->getRoot();
429  CPPUNIT_ASSERT(pRoot != NULL);
430  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot) != NULL);
431  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot)->getData() == "function_1");
432 
433  pModelValue = pModel->getModelValues()[1];
434  CPPUNIT_ASSERT(pModelValue != NULL);
435  CPPUNIT_ASSERT(pModelValue->getObjectName() == "K2");
436  CPPUNIT_ASSERT(pModelValue->getStatus() == CModelEntity::FIXED);
437 
438  pModelValue = pModel->getModelValues()[2];
439  CPPUNIT_ASSERT(pModelValue != NULL);
440  CPPUNIT_ASSERT(pModelValue->getObjectName() == "K3");
441  // check assignment
442  pTree = pModelValue->getExpressionPtr();
443  CPPUNIT_ASSERT(pTree != NULL);
444  pRoot = pTree->getRoot();
445  CPPUNIT_ASSERT(pRoot != NULL);
446  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot) != NULL);
447  CPPUNIT_ASSERT(dynamic_cast<const CEvaluationNodeCall*>(pRoot)->getData() == "function_3");
448 
449  CPPUNIT_ASSERT(pModel->getReactions().size() == 6);
450  // check reactions
451  const CReaction* pReaction = pModel->getReactions()[0];
452  CPPUNIT_ASSERT(pReaction != NULL);
453  CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 1);
454  CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
455  CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
456  CPPUNIT_ASSERT(pReaction->isReversible() == true);
457  // check the kinetic law
458  CPPUNIT_ASSERT(pReaction->getParameters().size() == 1);
459  const CFunction* pFunction = pReaction->getFunction();
460  CPPUNIT_ASSERT(pFunction != NULL);
461  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::UserDefined);
462  CPPUNIT_ASSERT(pFunction->getObjectName() == "Function for reaction1");
463  pRoot = pFunction->getRoot();
464  CPPUNIT_ASSERT(pRoot != NULL);
465 
466  pReaction = pModel->getReactions()[1];
467  CPPUNIT_ASSERT(pReaction != NULL);
468  CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 1);
469  CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
470  CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
471  CPPUNIT_ASSERT(pReaction->isReversible() == true);
472  // check the kinetic law
473  CPPUNIT_ASSERT(pReaction->getParameters().size() == 2);
474  pFunction = pReaction->getFunction();
475  CPPUNIT_ASSERT(pFunction != NULL);
476  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::UserDefined);
477  CPPUNIT_ASSERT(pFunction->getObjectName() == "Function for reaction2");
478  pRoot = pFunction->getRoot();
479  CPPUNIT_ASSERT(pRoot != NULL);
480 
481  pReaction = pModel->getReactions()[2];
482  CPPUNIT_ASSERT(pReaction != NULL);
483  CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 1);
484  CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
485  CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
486  CPPUNIT_ASSERT(pReaction->isReversible() == true);
487  // check the kinetic law
488  CPPUNIT_ASSERT(pReaction->getParameters().size() == 1);
489  pFunction = pReaction->getFunction();
490  CPPUNIT_ASSERT(pFunction != NULL);
491  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::UserDefined);
492  CPPUNIT_ASSERT(pFunction->getObjectName() == "Function for reaction3");
493  pRoot = pFunction->getRoot();
494  CPPUNIT_ASSERT(pRoot != NULL);
495 
496  pReaction = pModel->getReactions()[3];
497  CPPUNIT_ASSERT(pReaction != NULL);
498  CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 1);
499  CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
500  CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
501  CPPUNIT_ASSERT(pReaction->isReversible() == true);
502  // check the kinetic law
503  CPPUNIT_ASSERT(pReaction->getParameters().size() == 0);
504  pFunction = pReaction->getFunction();
505  CPPUNIT_ASSERT(pFunction != NULL);
506  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::UserDefined);
507  CPPUNIT_ASSERT(pFunction->getObjectName() == "Function for reaction4");
508  pRoot = pFunction->getRoot();
509  CPPUNIT_ASSERT(pRoot != NULL);
510 
511  pReaction = pModel->getReactions()[4];
512  CPPUNIT_ASSERT(pReaction != NULL);
513  CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 1);
514  CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
515  CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
516  CPPUNIT_ASSERT(pReaction->isReversible() == true);
517  // check the kinetic law
518  CPPUNIT_ASSERT(pReaction->getParameters().size() == 2);
519  pFunction = pReaction->getFunction();
520  CPPUNIT_ASSERT(pFunction != NULL);
521  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::UserDefined);
522  CPPUNIT_ASSERT(pFunction->getObjectName() == "Function for reaction5");
523  pRoot = pFunction->getRoot();
524  CPPUNIT_ASSERT(pRoot != NULL);
525 
526  pReaction = pModel->getReactions()[5];
527  CPPUNIT_ASSERT(pReaction != NULL);
528  CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 1);
529  CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
530  CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
531  CPPUNIT_ASSERT(pReaction->isReversible() == true);
532  // check the kinetic law
533  CPPUNIT_ASSERT(pReaction->getParameters().size() == 3);
534  pFunction = pReaction->getFunction();
535  CPPUNIT_ASSERT(pFunction != NULL);
536  CPPUNIT_ASSERT(pFunction->getType() == CEvaluationTree::UserDefined);
537  CPPUNIT_ASSERT(pFunction->getObjectName() == "Function for reaction6");
538  pRoot = pFunction->getRoot();
539  CPPUNIT_ASSERT(pRoot != NULL);
540 }
541 
542 const char* test000078::MODEL_STRING1 =
543  "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
544  "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version4\" level=\"2\" version=\"4\">\n"
545  " <model id=\"Model_1\" name=\"New Model\">\n"
546  " <notes>\n"
547  " <body xmlns=\"http://www.w3.org/1999/xhtml\">\n"
548  " <p>Model with function call in kinetics and rules.</p>\n"
549  " <p>This is to check import of unordered function definitions as allowed in L2V4</p>\n"
550  " </body>\n"
551  " </notes>\n"
552  " <listOfFunctionDefinitions>\n"
553  " <functionDefinition id=\"function_6\" name=\"function_6\">\n"
554  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
555  " <lambda>\n"
556  " <bvar>\n"
557  " <ci> k1 </ci>\n"
558  " </bvar>\n"
559  " <bvar>\n"
560  " <ci> k2 </ci>\n"
561  " </bvar>\n"
562  " <bvar>\n"
563  " <ci> k3 </ci>\n"
564  " </bvar>\n"
565  " <apply>\n"
566  " <ci> function_5 </ci>\n"
567  " <ci> k1 </ci>\n"
568  " <ci> k2 </ci>\n"
569  " <ci> k3 </ci>\n"
570  " </apply>\n"
571  " </lambda>\n"
572  " </math>\n"
573  " </functionDefinition>\n"
574  " <functionDefinition id=\"function_4\" name=\"function_4\">\n"
575  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
576  " <lambda>\n"
577  " <bvar>\n"
578  " <ci> x </ci>\n"
579  " </bvar>\n"
580  " <bvar>\n"
581  " <ci> y </ci>\n"
582  " </bvar>\n"
583  " <apply>\n"
584  " <divide/>\n"
585  " <apply>\n"
586  " <ci> function_2 </ci>\n"
587  " <ci> x </ci>\n"
588  " <ci> y </ci>\n"
589  " </apply>\n"
590  " <cn> 2.0 </cn>\n"
591  " </apply>\n"
592  " </lambda>\n"
593  " </math>\n"
594  " </functionDefinition>\n"
595  " <functionDefinition id=\"function_5\" name=\"function_5\">\n"
596  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
597  " <lambda>\n"
598  " <bvar>\n"
599  " <ci> a </ci>\n"
600  " </bvar>\n"
601  " <bvar>\n"
602  " <ci> b </ci>\n"
603  " </bvar>\n"
604  " <bvar>\n"
605  " <ci> c </ci>\n"
606  " </bvar>\n"
607  " <apply>\n"
608  " <plus/>\n"
609  " <apply>\n"
610  " <ci> function_3 </ci>\n"
611  " <ci> c </ci>\n"
612  " <ci> a </ci>\n"
613  " </apply>\n"
614  " <apply>\n"
615  " <minus/>\n"
616  " <apply>\n"
617  " <ci> function_1 </ci>\n"
618  " <ci> b </ci>\n"
619  " </apply>\n"
620  " <cn> 5.23 </cn>\n"
621  " </apply>\n"
622  " </apply>\n"
623  " </lambda>\n"
624  " </math>\n"
625  " </functionDefinition>\n"
626  " <functionDefinition id=\"function_2\" name=\"function_2\">\n"
627  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
628  " <lambda>\n"
629  " <bvar>\n"
630  " <ci> A </ci>\n"
631  " </bvar>\n"
632  " <bvar>\n"
633  " <ci> B </ci>\n"
634  " </bvar>\n"
635  " <apply>\n"
636  " <plus/>\n"
637  " <ci> B </ci>\n"
638  " <ci> A </ci>\n"
639  " </apply>\n"
640  " </lambda>\n"
641  " </math>\n"
642  " </functionDefinition>\n"
643  " <functionDefinition id=\"function_3\" name=\"function_3\">\n"
644  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
645  " <lambda>\n"
646  " <bvar>\n"
647  " <ci> k </ci>\n"
648  " </bvar>\n"
649  " <bvar>\n"
650  " <ci> C </ci>\n"
651  " </bvar>\n"
652  " <apply>\n"
653  " <minus/>\n"
654  " <ci> C </ci>\n"
655  " <apply>\n"
656  " <times/>\n"
657  " <ci> k </ci>\n"
658  " <cn> 1.3 </cn>\n"
659  " </apply>\n"
660  " </apply>\n"
661  " </lambda>\n"
662  " </math>\n"
663  " </functionDefinition>\n"
664  " <functionDefinition id=\"function_1\" name=\"function_1\">\n"
665  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
666  " <lambda>\n"
667  " <bvar>\n"
668  " <ci> k </ci>\n"
669  " </bvar>\n"
670  " <apply>\n"
671  " <times/>\n"
672  " <cn> 3.0 </cn>\n"
673  " <ci> k </ci>\n"
674  " </apply>\n"
675  " </lambda>\n"
676  " </math>\n"
677  " </functionDefinition>\n"
678  " </listOfFunctionDefinitions>\n"
679  " <listOfCompartments>\n"
680  " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>\n"
681  " </listOfCompartments>\n"
682  " <listOfSpecies>\n"
683  " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\"/>\n"
684  " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"1\"/>\n"
685  " <species id=\"species_3\" name=\"C\" compartment=\"compartment_1\" initialConcentration=\"1\" constant=\"false\"/>\n"
686  " <species id=\"species_4\" name=\"D\" compartment=\"compartment_1\" initialConcentration=\"1\" constant=\"false\"/>\n"
687  " <species id=\"species_5\" name=\"E\" compartment=\"compartment_1\" initialConcentration=\"1\" constant=\"false\"/>\n"
688  " <species id=\"species_6\" name=\"F\" compartment=\"compartment_1\" initialConcentration=\"1\" constant=\"false\"/>\n"
689  " </listOfSpecies>\n"
690  " <listOfParameters>\n"
691  " <parameter id=\"parameter_1\" name=\"K1\" value=\"1.1\" constant=\"false\"/>\n"
692  " <parameter id=\"parameter_2\" name=\"K2\" value=\"1.2\"/>\n"
693  " <parameter id=\"parameter_3\" name=\"K3\" value=\"1.3\" constant=\"false\"/>\n"
694  " </listOfParameters>\n"
695  " <listOfRules>\n"
696  " <assignmentRule variable=\"parameter_1\">\n"
697  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
698  " <apply>\n"
699  " <ci> function_1 </ci>\n"
700  " <cn> 4.5 </cn>\n"
701  " </apply>\n"
702  " </math>\n"
703  " </assignmentRule>\n"
704  " <assignmentRule variable=\"parameter_3\">\n"
705  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
706  " <apply>\n"
707  " <ci> function_3 </ci>\n"
708  " <cn> 2.0 </cn>\n"
709  " <ci> parameter_1 </ci>\n"
710  " </apply>\n"
711  " </math>\n"
712  " </assignmentRule>\n"
713  " <assignmentRule variable=\"species_3\">\n"
714  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
715  " <apply>\n"
716  " <ci> function_5 </ci>\n"
717  " <ci> parameter_1 </ci>\n"
718  " <cn> 2.4 </cn>\n"
719  " <cn> 3.5 </cn>\n"
720  " </apply>\n"
721  " </math>\n"
722  " </assignmentRule>\n"
723  " <rateRule variable=\"species_4\">\n"
724  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
725  " <apply>\n"
726  " <ci> function_2 </ci>\n"
727  " <ci> parameter_1 </ci>\n"
728  " <cn> 3.4 </cn>\n"
729  " </apply>\n"
730  " </math>\n"
731  " </rateRule>\n"
732  " <rateRule variable=\"species_5\">\n"
733  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
734  " <apply>\n"
735  " <ci> function_4 </ci>\n"
736  " <cn> 1.4 </cn>\n"
737  " <ci> parameter_2 </ci>\n"
738  " </apply>\n"
739  " </math>\n"
740  " </rateRule>\n"
741  " <rateRule variable=\"species_6\">\n"
742  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
743  " <apply>\n"
744  " <ci> function_6 </ci>\n"
745  " <ci> parameter_3 </ci>\n"
746  " <ci> parameter_1 </ci>\n"
747  " <cn> 3.4 </cn>\n"
748  " </apply>\n"
749  " </math>\n"
750  " </rateRule>\n"
751  " </listOfRules>\n"
752  " <listOfReactions>\n"
753  " <reaction id=\"reaction1\" reversible=\"true\">\n"
754  " <listOfReactants>\n"
755  " <speciesReference species=\"species_1\"/>\n"
756  " </listOfReactants>\n"
757  " <listOfProducts>\n"
758  " <speciesReference species=\"species_2\"/>\n"
759  " </listOfProducts>\n"
760  " <kineticLaw>\n"
761  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
762  " <apply>\n"
763  " <times/>\n"
764  " <ci> compartment_1 </ci>\n"
765  " <apply>\n"
766  " <ci> function_1 </ci>\n"
767  " <ci> parameter_1 </ci>\n"
768  " </apply>\n"
769  " </apply>\n"
770  " </math>\n"
771  " </kineticLaw>\n"
772  " </reaction>\n"
773  " <reaction id=\"reaction2\" reversible=\"true\">\n"
774  " <listOfReactants>\n"
775  " <speciesReference species=\"species_1\"/>\n"
776  " </listOfReactants>\n"
777  " <listOfProducts>\n"
778  " <speciesReference species=\"species_2\"/>\n"
779  " </listOfProducts>\n"
780  " <kineticLaw>\n"
781  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
782  " <apply>\n"
783  " <times/>\n"
784  " <ci> compartment_1 </ci>\n"
785  " <apply>\n"
786  " <ci> function_2 </ci>\n"
787  " <ci> parameter_1 </ci>\n"
788  " <ci> parameter_2 </ci>\n"
789  " </apply>\n"
790  " </apply>\n"
791  " </math>\n"
792  " </kineticLaw>\n"
793  " </reaction>\n"
794  " <reaction id=\"reaction3\" reversible=\"true\">\n"
795  " <listOfReactants>\n"
796  " <speciesReference species=\"species_1\"/>\n"
797  " </listOfReactants>\n"
798  " <listOfProducts>\n"
799  " <speciesReference species=\"species_2\"/>\n"
800  " </listOfProducts>\n"
801  " <kineticLaw>\n"
802  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
803  " <apply>\n"
804  " <times/>\n"
805  " <ci> compartment_1 </ci>\n"
806  " <apply>\n"
807  " <ci> function_3 </ci>\n"
808  " <ci> parameter_1 </ci>\n"
809  " <ci> species_2 </ci>\n"
810  " </apply>\n"
811  " </apply>\n"
812  " </math>\n"
813  " </kineticLaw>\n"
814  " </reaction>\n"
815  " <reaction id=\"reaction4\" reversible=\"true\">\n"
816  " <listOfReactants>\n"
817  " <speciesReference species=\"species_1\"/>\n"
818  " </listOfReactants>\n"
819  " <listOfProducts>\n"
820  " <speciesReference species=\"species_2\"/>\n"
821  " </listOfProducts>\n"
822  " <kineticLaw>\n"
823  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
824  " <apply>\n"
825  " <times/>\n"
826  " <ci> compartment_1 </ci>\n"
827  " <apply>\n"
828  " <ci> function_4 </ci>\n"
829  " <ci> species_1 </ci>\n"
830  " <ci> species_2 </ci>\n"
831  " </apply>\n"
832  " </apply>\n"
833  " </math>\n"
834  " </kineticLaw>\n"
835  " </reaction>\n"
836  " <reaction id=\"reaction5\" reversible=\"true\">\n"
837  " <listOfReactants>\n"
838  " <speciesReference species=\"species_1\"/>\n"
839  " </listOfReactants>\n"
840  " <listOfProducts>\n"
841  " <speciesReference species=\"species_2\"/>\n"
842  " </listOfProducts>\n"
843  " <kineticLaw>\n"
844  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
845  " <apply>\n"
846  " <times/>\n"
847  " <ci> compartment_1 </ci>\n"
848  " <apply>\n"
849  " <ci> function_5 </ci>\n"
850  " <ci> parameter_1 </ci>\n"
851  " <ci> parameter_3 </ci>\n"
852  " <ci> species_2 </ci>\n"
853  " </apply>\n"
854  " </apply>\n"
855  " </math>\n"
856  " </kineticLaw>\n"
857  " </reaction>\n"
858  " <reaction id=\"reaction6\" reversible=\"true\">\n"
859  " <listOfReactants>\n"
860  " <speciesReference species=\"species_1\"/>\n"
861  " </listOfReactants>\n"
862  " <listOfProducts>\n"
863  " <speciesReference species=\"species_2\"/>\n"
864  " </listOfProducts>\n"
865  " <kineticLaw>\n"
866  " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
867  " <apply>\n"
868  " <times/>\n"
869  " <ci> compartment_1 </ci>\n"
870  " <apply>\n"
871  " <ci> function_6 </ci>\n"
872  " <ci> parameter_1 </ci>\n"
873  " <ci> parameter_2 </ci>\n"
874  " <ci> parameter_3 </ci>\n"
875  " </apply>\n"
876  " </apply>\n"
877  " </math>\n"
878  " </kineticLaw>\n"
879  " </reaction>\n"
880  " </listOfReactions>\n"
881  " </model>\n"
882  "</sbml>\n"
883  ;
Header file of class CExpression.
static CCopasiDataModel * pCOPASIDATAMODEL
Definition: test000078.h:34
void test_l2v4_import_unordered_functions()
Definition: test000078.cpp:51
const CCopasiVector< CMetab > & getMetabolites() const
Definition: CModel.cpp:1051
const CCopasiVectorN< CModelValue > & getModelValues() const
Definition: CModel.cpp:1060
CModel::QuantityUnit getQuantityUnitEnum() const
Definition: CModel.cpp:2331
virtual size_t size() const
void setUp()
Definition: test000078.cpp:38
const C_FLOAT64 & getValue() const
const Type & getType() const
void tearDown()
Definition: test000078.cpp:46
Definition: CMetab.h:178
static Type type(const Type &type)
virtual const Data & getData() const
static CFunctionDB * getFunctionList()
static CCopasiDataModel * addDatamodel()
CCopasiVectorNS< CCompartment > & getCompartments()
Definition: CModel.cpp:1145
static Type subType(const Type &type)
CModel::TimeUnit getTimeUnitEnum() const
Definition: CModel.cpp:2243
static const char * MODEL_STRING1
Definition: test000078.h:33
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
CCopasiVectorNS< CReaction > & getReactions()
Definition: CModel.cpp:1039
static void init(int argc, char *argv[], const bool &withGui=false)
Definition: CModel.h:50
virtual const Data & getData() const
Definition: CCopasiNode.h:118
CModel::VolumeUnit getVolumeUnitEnum() const
Definition: CModel.cpp:2175
CEvaluationNode * getRoot()
CFunctionParameters & getVariables()
Definition: CFunction.cpp:148