17 #include "utilities.hpp"
27 #include <sbml/SBMLDocument.h>
28 #include <sbml/Model.h>
29 #include <sbml/Compartment.h>
30 #include <sbml/Species.h>
31 #include <sbml/Parameter.h>
32 #include <sbml/Reaction.h>
33 #include <sbml/math/ASTNode.h>
57 CPPUNIT_ASSERT(pModel != NULL);
58 CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() ==
CModel::mMol);
59 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
60 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
61 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
62 const CCompartment* pCompartment = pModel->getCompartments()[0];
63 CPPUNIT_ASSERT(pCompartment != NULL);
65 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 2);
66 const CMetab* pB = pModel->getMetabolites()[1];
67 CPPUNIT_ASSERT(pB != NULL);
69 CMetab* pA = pModel->getMetabolites()[0];
70 CPPUNIT_ASSERT(pA != NULL);
74 CPPUNIT_ASSERT(pModel->getModelValues().size() == 3);
80 for (i = 0; i < 3; ++i)
82 if (pModel->getModelValues()[i]->getObjectName() ==
"K1")
84 pK1 = pModel->getModelValues()[i];
90 pDummy1 = pModel->getModelValues()[i];
94 pDummy2 = pModel->getModelValues()[i];
99 CPPUNIT_ASSERT(pK1 != NULL);
101 CPPUNIT_ASSERT(fabs((pK1->getInitialValue() - 4.0) / 4.0) < 1e-9);
102 CPPUNIT_ASSERT(pDummy1 != NULL);
105 CPPUNIT_ASSERT(pExpr != NULL);
107 CPPUNIT_ASSERT(pNode != NULL);
111 CPPUNIT_ASSERT(pNode != NULL);
115 CPPUNIT_ASSERT(pObjectNode != NULL);
117 CPPUNIT_ASSERT(!objectCN.empty());
118 std::vector<CCopasiContainer*> listOfContainers;
119 listOfContainers.push_back(pModel);
121 CPPUNIT_ASSERT(pObject != NULL);
123 CPPUNIT_ASSERT(pObject->
getObjectName() == std::string(
"Value"));
126 CPPUNIT_ASSERT(pNumberNode != NULL);
128 CPPUNIT_ASSERT(fabs((pNumberNode->getValue() - 0.5) / 0.5) < 1e-3);
129 CPPUNIT_ASSERT(pNumberNode->getSibling() == NULL);
131 CPPUNIT_ASSERT(pDummy2 != NULL);
134 CPPUNIT_ASSERT(pExpr != NULL);
135 pNode = pExpr->getRoot();
136 CPPUNIT_ASSERT(pNode != NULL);
140 CPPUNIT_ASSERT(pNode != NULL);
144 CPPUNIT_ASSERT(pObjectNode != NULL);
145 objectCN = pObjectNode->getObjectCN();
146 CPPUNIT_ASSERT(!objectCN.empty());
148 CPPUNIT_ASSERT(pObject != NULL);
149 CPPUNIT_ASSERT(pObject->isReference() ==
true);
150 CPPUNIT_ASSERT(pObject->getObjectName() == std::string(
"Value"));
151 CPPUNIT_ASSERT(pObject->getObjectParent() == pK1);
153 CPPUNIT_ASSERT(pNumberNode != NULL);
155 CPPUNIT_ASSERT(fabs((pNumberNode->getValue() - 0.2) / 0.2) < 1e-3);
156 CPPUNIT_ASSERT(pNumberNode->getSibling() == NULL);
158 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
159 const CReaction* pReaction = pModel->getReactions()[0];
160 CPPUNIT_ASSERT(pReaction != NULL);
162 CPPUNIT_ASSERT(pReaction->isReversible() ==
false);
164 const CFunction* pKineticFunction = pReaction->getFunction();
165 CPPUNIT_ASSERT(pKineticFunction != NULL);
167 const CChemEq* pChemEq = &pReaction->getChemEq();
168 CPPUNIT_ASSERT(pChemEq != NULL);
172 CPPUNIT_ASSERT(pElement != NULL);
173 CPPUNIT_ASSERT(fabs(pElement->getMultiplicity() - 1.0) < 1e-3);
174 CPPUNIT_ASSERT(pElement->getMetabolite() == pA);
177 CPPUNIT_ASSERT(pElement != NULL);
178 CPPUNIT_ASSERT(fabs(pElement->getMultiplicity() - 1.0) < 1e-3);
179 CPPUNIT_ASSERT(pElement->getMetabolite() == pB);
182 const std::vector<std::vector<std::string> > parameterMappings = pReaction->getParameterMappings();
183 CPPUNIT_ASSERT(parameterMappings.size() == 3);
184 CPPUNIT_ASSERT(parameterMappings[0].size() == 1);
185 CPPUNIT_ASSERT(parameterMappings[0][0] == pDummy1->
getKey());
186 CPPUNIT_ASSERT(parameterMappings[1].size() == 1);
187 CPPUNIT_ASSERT(parameterMappings[1][0] == pDummy2->
getKey());
188 CPPUNIT_ASSERT(parameterMappings[2].size() == 1);
189 CPPUNIT_ASSERT(parameterMappings[2][0] == pA->getKey());
192 CPPUNIT_ASSERT(funPars.size() == 3);
195 pNode = pKineticFunction->getRoot();
196 CPPUNIT_ASSERT(pNode != NULL);
198 CPPUNIT_ASSERT(pOpNode != NULL);
201 CPPUNIT_ASSERT(pNode2 != NULL);
203 CPPUNIT_ASSERT(pVarNode != NULL);
204 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[2]->getObjectName());
205 CPPUNIT_ASSERT(pVarNode->
getSibling() == NULL);
207 CPPUNIT_ASSERT(pOpNode != NULL);
209 pNode2 =
dynamic_cast<const CEvaluationNode*
>(pOpNode->getChild()->getSibling());
210 CPPUNIT_ASSERT(pNode2 != NULL);
212 CPPUNIT_ASSERT(pVarNode != NULL);
213 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[0]->getObjectName());
215 CPPUNIT_ASSERT(pOpNode != NULL);
217 pNode2 =
dynamic_cast<const CEvaluationNode*
>(pOpNode->getChild()->getSibling());
218 CPPUNIT_ASSERT(pNode2 != NULL);
220 CPPUNIT_ASSERT(pVarNode != NULL);
221 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[1]->getObjectName());
223 CPPUNIT_ASSERT(pNode2 != NULL);
225 CPPUNIT_ASSERT(pVarNode != NULL);
226 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[0]->getObjectName());
240 CPPUNIT_ASSERT(pDocument != NULL);
241 const Model* pCModel = pDocument->getModel();
242 CPPUNIT_ASSERT(pCModel != NULL);
245 CPPUNIT_ASSERT(pCModel->getNumCompartments() == 1);
246 const Compartment* pCCompartment = pCModel->getCompartment(0);
247 CPPUNIT_ASSERT(pCCompartment->getConstant() ==
true);
248 CPPUNIT_ASSERT(pCModel->getNumSpecies() == 2);
249 const Species* pSpeciesA = pCModel->getSpecies(0);
250 CPPUNIT_ASSERT(pCModel->getNumParameters() == 3);
251 const Parameter* pParameterK1 = pCModel->getParameter(0);
252 CPPUNIT_ASSERT(pParameterK1 != NULL);
253 CPPUNIT_ASSERT(pParameterK1->getConstant() ==
true);
254 const Parameter* pParameterDummy1 = pCModel->getParameter(1);
255 CPPUNIT_ASSERT(pParameterDummy1 != NULL);
256 CPPUNIT_ASSERT(pParameterDummy1->getConstant() ==
false);
257 const Parameter* pParameterDummy2 = pCModel->getParameter(2);
258 CPPUNIT_ASSERT(pParameterDummy2 != NULL);
259 CPPUNIT_ASSERT(pParameterDummy2->getConstant() ==
false);
261 const AssignmentRule* pARule =
dynamic_cast<const AssignmentRule*
>(pCModel->getRule(pParameterDummy1->getId()));
262 CPPUNIT_ASSERT(pARule != NULL);
263 const ASTNode* pANode = pARule->getMath();
264 CPPUNIT_ASSERT(pANode != NULL);
265 CPPUNIT_ASSERT(pANode->getType() == AST_FUNCTION_DELAY);
266 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
267 const ASTNode* pChild = pANode->getChild(0);
268 CPPUNIT_ASSERT(pChild != NULL);
269 CPPUNIT_ASSERT(pChild->getType() == AST_NAME);
270 CPPUNIT_ASSERT(pChild->getName() == pParameterK1->getId());
271 pChild = pANode->getChild(1);
272 CPPUNIT_ASSERT(pChild != NULL);
273 CPPUNIT_ASSERT(pChild->getType() == AST_REAL);
274 CPPUNIT_ASSERT(fabs((pChild->getReal() - 0.5) / 0.5) < 1e-9);
276 pARule =
dynamic_cast<const AssignmentRule*
>(pCModel->getRule(pParameterDummy2->getId()));
277 CPPUNIT_ASSERT(pARule != NULL);
278 pANode = pARule->getMath();
279 CPPUNIT_ASSERT(pANode != NULL);
280 CPPUNIT_ASSERT(pANode->getType() == AST_FUNCTION_DELAY);
281 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
282 pChild = pANode->getChild(0);
283 CPPUNIT_ASSERT(pChild != NULL);
284 CPPUNIT_ASSERT(pChild->getType() == AST_NAME);
285 CPPUNIT_ASSERT(pChild->getName() == pParameterK1->getId());
286 pChild = pANode->getChild(1);
287 CPPUNIT_ASSERT(pChild != NULL);
288 CPPUNIT_ASSERT(pChild->getType() == AST_REAL);
289 CPPUNIT_ASSERT(fabs((pChild->getReal() - 0.2) / 0.2) < 1e-9);
291 const Reaction* pCReaction = pCModel->getReaction(0);
293 CPPUNIT_ASSERT(pCReaction != NULL);
294 CPPUNIT_ASSERT(pCReaction->getNumReactants() == 1);
295 CPPUNIT_ASSERT(pCReaction->getNumProducts() == 1);
297 CPPUNIT_ASSERT(pCReaction->isSetKineticLaw() ==
true);
298 const KineticLaw* pLaw = pCReaction->getKineticLaw();
299 CPPUNIT_ASSERT(pLaw != NULL);
300 CPPUNIT_ASSERT(pLaw->isSetMath() ==
true);
301 pANode = pLaw->getMath();
302 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
303 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
304 CPPUNIT_ASSERT(pANode->getChild(0)->getType() == AST_NAME);
305 CPPUNIT_ASSERT(pANode->getChild(0)->getName() == pCCompartment->getId());
306 pANode = pANode->getChild(1);
307 CPPUNIT_ASSERT(pANode != NULL);
309 CPPUNIT_ASSERT(pANode->getType() == AST_FUNCTION);
310 CPPUNIT_ASSERT(pANode->getNumChildren() == 3);
311 CPPUNIT_ASSERT(pANode->getChild(0) != NULL);
312 CPPUNIT_ASSERT(pANode->getChild(0)->getType() == AST_NAME);
313 CPPUNIT_ASSERT(pANode->getChild(0)->getName() == pParameterDummy1->getId());
314 CPPUNIT_ASSERT(pANode->getChild(1) != NULL);
315 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
316 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == pParameterDummy2->getId());
317 CPPUNIT_ASSERT(pANode->getChild(2) != NULL);
318 CPPUNIT_ASSERT(pANode->getChild(2)->getType() == AST_NAME);
319 CPPUNIT_ASSERT(pANode->getChild(2)->getName() == pSpeciesA->getId());
321 CPPUNIT_ASSERT(pCModel->getListOfFunctionDefinitions()->size() == 1);
322 const FunctionDefinition* pFunDef = pCModel->getFunctionDefinition(0);
323 CPPUNIT_ASSERT(pFunDef != NULL);
324 CPPUNIT_ASSERT(pFunDef->getId() == pANode->getName());
325 pANode = pFunDef->getMath();
326 CPPUNIT_ASSERT(pANode != NULL);
327 CPPUNIT_ASSERT(pANode->getType() == AST_LAMBDA);
328 CPPUNIT_ASSERT(pANode->getNumChildren() == 4);
329 CPPUNIT_ASSERT(pANode->getChild(0)->getType() == AST_NAME);
330 std::string paramName1 = pANode->getChild(0)->getName();
331 CPPUNIT_ASSERT(!paramName1.empty());
332 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
333 std::string paramName2 = pANode->getChild(1)->getName();
334 CPPUNIT_ASSERT(!paramName2.empty());
335 CPPUNIT_ASSERT(pANode->getChild(2)->getType() == AST_NAME);
336 std::string paramName3 = pANode->getChild(2)->getName();
337 CPPUNIT_ASSERT(!paramName3.empty());
340 pANode = pANode->getChild(3);
341 CPPUNIT_ASSERT(pANode != NULL);
342 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
343 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
344 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
345 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == paramName3);
346 pANode = pANode->getChild(0);
347 CPPUNIT_ASSERT(pANode != NULL);
348 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
349 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
350 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
351 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == paramName1);
352 pANode = pANode->getChild(0);
353 CPPUNIT_ASSERT(pANode != NULL);
354 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
355 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
356 CPPUNIT_ASSERT(pANode->getChild(0)->getType() == AST_NAME);
357 CPPUNIT_ASSERT(pANode->getChild(0)->getName() == paramName1);
358 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
359 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == paramName2);
367 CPPUNIT_ASSERT(pModel != NULL);
368 CPPUNIT_ASSERT(pModel->getQuantityUnitEnum() ==
CModel::mMol);
369 CPPUNIT_ASSERT(pModel->getVolumeUnitEnum() ==
CModel::ml);
370 CPPUNIT_ASSERT(pModel->getTimeUnitEnum() ==
CModel::s);
371 CPPUNIT_ASSERT(pModel->getCompartments().size() == 1);
372 const CCompartment* pCompartment = pModel->getCompartments()[0];
373 CPPUNIT_ASSERT(pCompartment != NULL);
375 CPPUNIT_ASSERT(pModel->getMetabolites().size() == 2);
376 const CMetab* pB = pModel->getMetabolites()[1];
377 CPPUNIT_ASSERT(pB != NULL);
379 CMetab* pA = pModel->getMetabolites()[0];
380 CPPUNIT_ASSERT(pA != NULL);
384 CPPUNIT_ASSERT(pModel->getModelValues().size() == 7);
395 pK1 = pModel->getModelValues()[
"K1"];
396 CPPUNIT_ASSERT(pK1 != NULL);
397 pDummy1 = pModel->getModelValues()[
"delay_replacement_parameter_0"];
398 CPPUNIT_ASSERT(pDummy1 != NULL);
399 pDummy2 = pModel->getModelValues()[
"delay_replacement_parameter_1"];
400 CPPUNIT_ASSERT(pDummy2 != NULL);
401 pDummy3 = pModel->getModelValues()[
"delay_replacement_parameter_2"];
402 CPPUNIT_ASSERT(pDummy3 != NULL);
403 pDummy4 = pModel->getModelValues()[
"delay_replacement_parameter_3"];
404 CPPUNIT_ASSERT(pDummy4 != NULL);
406 CPPUNIT_ASSERT(pModel->getReactions().size() == 1);
407 const CReaction* pReaction = pModel->getReactions()[0];
408 CPPUNIT_ASSERT(pReaction != NULL);
410 std::string reactionId = pReaction->getSBMLId();
411 pGlobalized1 = pModel->getModelValues()[reactionId+
"_local_0"];
412 CPPUNIT_ASSERT(pGlobalized1 != NULL);
413 pGlobalized2 = pModel->getModelValues()[reactionId+
"_local_1"];
414 CPPUNIT_ASSERT(pGlobalized2 != NULL);
417 CPPUNIT_ASSERT(pK1 != NULL);
419 CPPUNIT_ASSERT(fabs((pK1->getInitialValue() - 4.0) / 4.0) < 1e-9);
421 CPPUNIT_ASSERT(pGlobalized1 != NULL);
423 CPPUNIT_ASSERT(fabs((pGlobalized1->
getInitialValue() - 0.3) / 0.3) < 1e-9);
425 CPPUNIT_ASSERT(pGlobalized2 != NULL);
427 CPPUNIT_ASSERT(fabs((pGlobalized2->
getInitialValue() - 0.2) / 0.2) < 1e-9);
432 CPPUNIT_ASSERT(pExpr != NULL);
434 CPPUNIT_ASSERT(pNode != NULL);
438 CPPUNIT_ASSERT(pNode != NULL);
442 CPPUNIT_ASSERT(pObjectNode != NULL);
444 CPPUNIT_ASSERT(!objectCN.empty());
445 std::vector<CCopasiContainer*> listOfContainers;
446 listOfContainers.push_back(pModel);
448 CPPUNIT_ASSERT(pObject != NULL);
450 CPPUNIT_ASSERT(pObject->
getObjectName() == std::string(
"Value"));
453 CPPUNIT_ASSERT(pNumberNode != NULL);
455 CPPUNIT_ASSERT(fabs((pNumberNode->getValue() - 0.5) / 0.5) < 1e-3);
456 CPPUNIT_ASSERT(pNumberNode->getSibling() == NULL);
461 CPPUNIT_ASSERT(pExpr != NULL);
462 pNode = pExpr->getRoot();
463 CPPUNIT_ASSERT(pNode != NULL);
467 CPPUNIT_ASSERT(pNode != NULL);
471 CPPUNIT_ASSERT(pObjectNode != NULL);
472 objectCN = pObjectNode->getObjectCN();
473 CPPUNIT_ASSERT(!objectCN.empty());
475 CPPUNIT_ASSERT(pObject != NULL);
476 CPPUNIT_ASSERT(pObject->isReference() ==
true);
477 CPPUNIT_ASSERT(pObject->getObjectName() == std::string(
"Value"));
478 CPPUNIT_ASSERT(pObject->getObjectParent() == pK1);
480 CPPUNIT_ASSERT(pNumberNode != NULL);
482 CPPUNIT_ASSERT(fabs((pNumberNode->getValue() - 0.2) / 0.2) < 1e-3);
483 CPPUNIT_ASSERT(pNumberNode->getSibling() == NULL);
488 CPPUNIT_ASSERT(pExpr != NULL);
489 pNode = pExpr->getRoot();
490 CPPUNIT_ASSERT(pNode != NULL);
494 CPPUNIT_ASSERT(pNode != NULL);
498 CPPUNIT_ASSERT(pObjectNode != NULL);
499 objectCN = pObjectNode->getObjectCN();
500 CPPUNIT_ASSERT(!objectCN.empty());
502 CPPUNIT_ASSERT(pObject != NULL);
503 CPPUNIT_ASSERT(pObject->isReference() ==
true);
504 CPPUNIT_ASSERT(pObject->getObjectName() == std::string(
"Value"));
505 CPPUNIT_ASSERT(pObject->getObjectParent() == pGlobalized1);
507 CPPUNIT_ASSERT(pNumberNode != NULL);
509 CPPUNIT_ASSERT(fabs((pNumberNode->getValue() - 0.5) / 0.5) < 1e-3);
510 CPPUNIT_ASSERT(pNumberNode->getSibling() == NULL);
515 CPPUNIT_ASSERT(pExpr != NULL);
516 pNode = pExpr->getRoot();
517 CPPUNIT_ASSERT(pNode != NULL);
521 CPPUNIT_ASSERT(pNode != NULL);
525 CPPUNIT_ASSERT(pObjectNode != NULL);
526 objectCN = pObjectNode->getObjectCN();
527 CPPUNIT_ASSERT(!objectCN.empty());
529 CPPUNIT_ASSERT(pObject != NULL);
530 CPPUNIT_ASSERT(pObject->isReference() ==
true);
531 CPPUNIT_ASSERT(pObject->getObjectName() == std::string(
"Value"));
532 CPPUNIT_ASSERT(pObject->getObjectParent() == pGlobalized2);
534 CPPUNIT_ASSERT(pNumberNode != NULL);
536 CPPUNIT_ASSERT(fabs((pNumberNode->getValue() - 0.5) / 0.5) < 1e-3);
537 CPPUNIT_ASSERT(pNumberNode->getSibling() == NULL);
539 CPPUNIT_ASSERT(pReaction->isReversible() ==
false);
541 const CFunction* pKineticFunction = pReaction->getFunction();
542 CPPUNIT_ASSERT(pKineticFunction != NULL);
544 const CChemEq* pChemEq = &pReaction->getChemEq();
545 CPPUNIT_ASSERT(pChemEq != NULL);
549 CPPUNIT_ASSERT(pElement != NULL);
550 CPPUNIT_ASSERT(fabs(pElement->getMultiplicity() - 1.0) < 1e-3);
551 CPPUNIT_ASSERT(pElement->getMetabolite() == pA);
554 CPPUNIT_ASSERT(pElement != NULL);
555 CPPUNIT_ASSERT(fabs(pElement->getMultiplicity() - 1.0) < 1e-3);
556 CPPUNIT_ASSERT(pElement->getMetabolite() == pB);
559 const std::vector<std::vector<std::string> > parameterMappings = pReaction->getParameterMappings();
560 CPPUNIT_ASSERT(parameterMappings.size() == 7);
561 CPPUNIT_ASSERT(parameterMappings[0].size() == 1);
562 CPPUNIT_ASSERT(pReaction->isLocalParameter(0) ==
false);
563 CPPUNIT_ASSERT(parameterMappings[0][0] == pDummy1->
getKey());
564 CPPUNIT_ASSERT(parameterMappings[1].size() == 1);
565 CPPUNIT_ASSERT(pReaction->isLocalParameter(1) ==
false);
566 CPPUNIT_ASSERT(parameterMappings[1][0] == pDummy2->
getKey());
567 CPPUNIT_ASSERT(parameterMappings[2].size() == 1);
568 CPPUNIT_ASSERT(pReaction->isLocalParameter(2) ==
false);
569 CPPUNIT_ASSERT(parameterMappings[2][0] == pDummy3->
getKey());
570 CPPUNIT_ASSERT(parameterMappings[3].size() == 1);
571 CPPUNIT_ASSERT(pReaction->isLocalParameter(3) ==
false);
572 CPPUNIT_ASSERT(parameterMappings[3][0] == pDummy4->
getKey());
573 CPPUNIT_ASSERT(parameterMappings[4].size() == 1);
574 CPPUNIT_ASSERT(pReaction->isLocalParameter(4) ==
true);
575 const CCopasiParameter* pLocalParam = pReaction->getParameters().getParameter(
"k1");
576 CPPUNIT_ASSERT(pLocalParam != NULL);
577 CPPUNIT_ASSERT(parameterMappings[5].size() == 1);
578 CPPUNIT_ASSERT(pReaction->isLocalParameter(5) ==
false);
579 CPPUNIT_ASSERT(parameterMappings[5][0] == pGlobalized1->
getKey());
580 CPPUNIT_ASSERT(parameterMappings[6].size() == 1);
581 CPPUNIT_ASSERT(parameterMappings[6][0] == pA->getKey());
584 CPPUNIT_ASSERT(funPars.size() == 7);
587 pNode = pKineticFunction->getRoot();
588 CPPUNIT_ASSERT(pNode != NULL);
590 CPPUNIT_ASSERT(pOpNode != NULL);
593 CPPUNIT_ASSERT(pNode2 != NULL);
595 CPPUNIT_ASSERT(pVarNode != NULL);
596 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[5]->getObjectName());
597 CPPUNIT_ASSERT(pVarNode->
getSibling() == NULL);
599 CPPUNIT_ASSERT(pOpNode != NULL);
601 pNode2 =
dynamic_cast<const CEvaluationNode*
>(pOpNode->getChild()->getSibling());
602 CPPUNIT_ASSERT(pNode2 != NULL);
604 CPPUNIT_ASSERT(pVarNode != NULL);
605 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[2]->getObjectName());
607 CPPUNIT_ASSERT(pOpNode != NULL);
609 pNode2 =
dynamic_cast<const CEvaluationNode*
>(pOpNode->getChild()->getSibling());
610 CPPUNIT_ASSERT(pNode2 != NULL);
612 CPPUNIT_ASSERT(pVarNode != NULL);
613 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[3]->getObjectName());
615 CPPUNIT_ASSERT(pOpNode != NULL);
617 pNode2 =
dynamic_cast<const CEvaluationNode*
>(pOpNode->getChild()->getSibling());
618 CPPUNIT_ASSERT(pNode2 != NULL);
620 CPPUNIT_ASSERT(pVarNode != NULL);
621 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[2]->getObjectName());
623 CPPUNIT_ASSERT(pOpNode != NULL);
625 pNode2 =
dynamic_cast<const CEvaluationNode*
>(pOpNode->getChild()->getSibling());
626 CPPUNIT_ASSERT(pNode2 != NULL);
628 CPPUNIT_ASSERT(pVarNode != NULL);
629 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[4]->getObjectName());
631 CPPUNIT_ASSERT(pOpNode != NULL);
633 pNode2 =
dynamic_cast<const CEvaluationNode*
>(pOpNode->getChild()->getSibling());
634 CPPUNIT_ASSERT(pNode2 != NULL);
636 CPPUNIT_ASSERT(pVarNode != NULL);
637 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[6]->getObjectName());
639 CPPUNIT_ASSERT(pOpNode != NULL);
641 pNode2 =
dynamic_cast<const CEvaluationNode*
>(pOpNode->getChild()->getSibling());
642 CPPUNIT_ASSERT(pNode2 != NULL);
644 CPPUNIT_ASSERT(pVarNode != NULL);
645 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[0]->getObjectName());
647 CPPUNIT_ASSERT(pOpNode != NULL);
649 pNode2 =
dynamic_cast<const CEvaluationNode*
>(pOpNode->getChild()->getSibling());
650 CPPUNIT_ASSERT(pNode2 != NULL);
652 CPPUNIT_ASSERT(pVarNode != NULL);
653 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[1]->getObjectName());
656 CPPUNIT_ASSERT(pNode2 != NULL);
658 CPPUNIT_ASSERT(pVarNode != NULL);
659 CPPUNIT_ASSERT(pVarNode->
getData() == funPars[0]->getObjectName());
674 CPPUNIT_ASSERT(pDocument != NULL);
675 const Model* pCModel = pDocument->getModel();
676 CPPUNIT_ASSERT(pCModel != NULL);
679 CPPUNIT_ASSERT(pCModel->getNumCompartments() == 1);
680 const Compartment* pCCompartment = pCModel->getCompartment(0);
681 CPPUNIT_ASSERT(pCCompartment->getConstant() ==
true);
682 CPPUNIT_ASSERT(pCModel->getNumSpecies() == 2);
683 const Species* pSpeciesA = pCModel->getSpecies(0);
684 CPPUNIT_ASSERT(pCModel->getNumParameters() == 7);
685 const Parameter* pParameterK1 = pCModel->getParameter(0);
686 CPPUNIT_ASSERT(pParameterK1 != NULL);
687 CPPUNIT_ASSERT(pParameterK1->getConstant() ==
true);
688 CPPUNIT_ASSERT(fabs((pParameterK1->getValue() - 4.0) / 4.0) < 1e-9);
689 const Parameter* pParameterDummy1 = pCModel->getParameter(1);
690 CPPUNIT_ASSERT(pParameterDummy1 != NULL);
691 CPPUNIT_ASSERT(pParameterDummy1->getConstant() ==
false);
692 const Parameter* pParameterDummy2 = pCModel->getParameter(2);
693 CPPUNIT_ASSERT(pParameterDummy2 != NULL);
694 CPPUNIT_ASSERT(pParameterDummy2->getConstant() ==
false);
695 const Parameter* pParameterDummy3 = pCModel->getParameter(3);
696 CPPUNIT_ASSERT(pParameterDummy3 != NULL);
697 CPPUNIT_ASSERT(pParameterDummy3->getConstant() ==
false);
698 const Parameter* pGlobalizedParam1 = pCModel->getParameter(4);
699 CPPUNIT_ASSERT(pGlobalizedParam1 != NULL);
700 CPPUNIT_ASSERT(pGlobalizedParam1->getConstant() ==
true);
701 CPPUNIT_ASSERT(fabs((pGlobalizedParam1->getValue() - 0.3) / 0.3) < 1e-9);
702 const Parameter* pParameterDummy4 = pCModel->getParameter(5);
703 CPPUNIT_ASSERT(pParameterDummy4 != NULL);
704 CPPUNIT_ASSERT(pParameterDummy4->getConstant() ==
false);
705 const Parameter* pGlobalizedParam2 = pCModel->getParameter(6);
706 CPPUNIT_ASSERT(pGlobalizedParam2 != NULL);
707 CPPUNIT_ASSERT(pGlobalizedParam2->getConstant() ==
true);
708 CPPUNIT_ASSERT(fabs((pGlobalizedParam2->getValue() - 0.2) / 0.2) < 1e-9);
711 const AssignmentRule* pARule =
dynamic_cast<const AssignmentRule*
>(pCModel->getRule(pParameterDummy1->getId()));
712 CPPUNIT_ASSERT(pARule != NULL);
713 const ASTNode* pANode = pARule->getMath();
714 CPPUNIT_ASSERT(pANode != NULL);
715 CPPUNIT_ASSERT(pANode->getType() == AST_FUNCTION_DELAY);
716 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
717 const ASTNode* pChild = pANode->getChild(0);
718 CPPUNIT_ASSERT(pChild != NULL);
719 CPPUNIT_ASSERT(pChild->getType() == AST_NAME);
720 CPPUNIT_ASSERT(pChild->getName() == pParameterK1->getId());
721 pChild = pANode->getChild(1);
722 CPPUNIT_ASSERT(pChild != NULL);
723 CPPUNIT_ASSERT(pChild->getType() == AST_REAL);
724 CPPUNIT_ASSERT(fabs((pChild->getReal() - 0.5) / 0.5) < 1e-9);
726 pARule =
dynamic_cast<const AssignmentRule*
>(pCModel->getRule(pParameterDummy2->getId()));
727 CPPUNIT_ASSERT(pARule != NULL);
728 pANode = pARule->getMath();
729 CPPUNIT_ASSERT(pANode != NULL);
730 CPPUNIT_ASSERT(pANode->getType() == AST_FUNCTION_DELAY);
731 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
732 pChild = pANode->getChild(0);
733 CPPUNIT_ASSERT(pChild != NULL);
734 CPPUNIT_ASSERT(pChild->getType() == AST_NAME);
735 CPPUNIT_ASSERT(pChild->getName() == pParameterK1->getId());
736 pChild = pANode->getChild(1);
737 CPPUNIT_ASSERT(pChild != NULL);
738 CPPUNIT_ASSERT(pChild->getType() == AST_REAL);
739 CPPUNIT_ASSERT(fabs((pChild->getReal() - 0.2) / 0.2) < 1e-9);
742 pARule =
dynamic_cast<const AssignmentRule*
>(pCModel->getRule(pParameterDummy3->getId()));
743 CPPUNIT_ASSERT(pARule != NULL);
744 pANode = pARule->getMath();
745 CPPUNIT_ASSERT(pANode != NULL);
746 CPPUNIT_ASSERT(pANode->getType() == AST_FUNCTION_DELAY);
747 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
748 pChild = pANode->getChild(0);
749 CPPUNIT_ASSERT(pChild != NULL);
750 CPPUNIT_ASSERT(pChild->getType() == AST_NAME);
751 CPPUNIT_ASSERT(pChild->getName() == pGlobalizedParam1->getId());
752 pChild = pANode->getChild(1);
753 CPPUNIT_ASSERT(pChild != NULL);
754 CPPUNIT_ASSERT(pChild->getType() == AST_REAL);
755 CPPUNIT_ASSERT(fabs((pChild->getReal() - 0.5) / 0.5) < 1e-9);
758 pARule =
dynamic_cast<const AssignmentRule*
>(pCModel->getRule(pParameterDummy4->getId()));
759 CPPUNIT_ASSERT(pARule != NULL);
760 pANode = pARule->getMath();
761 CPPUNIT_ASSERT(pANode != NULL);
762 CPPUNIT_ASSERT(pANode->getType() == AST_FUNCTION_DELAY);
763 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
764 pChild = pANode->getChild(0);
765 CPPUNIT_ASSERT(pChild != NULL);
766 CPPUNIT_ASSERT(pChild->getType() == AST_NAME);
767 CPPUNIT_ASSERT(pChild->getName() == pGlobalizedParam2->getId());
768 pChild = pANode->getChild(1);
769 CPPUNIT_ASSERT(pChild != NULL);
770 CPPUNIT_ASSERT(pChild->getType() == AST_REAL);
771 CPPUNIT_ASSERT(fabs((pChild->getReal() - 0.5) / 0.5) < 1e-9);
773 const Reaction* pCReaction = pCModel->getReaction(0);
775 CPPUNIT_ASSERT(pCReaction != NULL);
776 CPPUNIT_ASSERT(pCReaction->getNumReactants() == 1);
777 CPPUNIT_ASSERT(pCReaction->getNumProducts() == 1);
779 CPPUNIT_ASSERT(pCReaction->isSetKineticLaw() ==
true);
780 const KineticLaw* pLaw = pCReaction->getKineticLaw();
781 CPPUNIT_ASSERT(pLaw != NULL);
782 CPPUNIT_ASSERT(pLaw->getNumParameters() == 1);
783 const Parameter* pLocalP = pLaw->getParameter(0);
784 CPPUNIT_ASSERT(pLocalP != NULL);
785 CPPUNIT_ASSERT(fabs((pLocalP->getValue() - 0.1) / 0.1) < 1e-9);
786 CPPUNIT_ASSERT(pLaw->isSetMath() ==
true);
787 pANode = pLaw->getMath();
788 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
789 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
790 CPPUNIT_ASSERT(pANode->getChild(0)->getType() == AST_NAME);
791 CPPUNIT_ASSERT(pANode->getChild(0)->getName() == pCCompartment->getId());
792 pANode = pANode->getChild(1);
793 CPPUNIT_ASSERT(pANode != NULL);
795 CPPUNIT_ASSERT(pANode->getType() == AST_FUNCTION);
796 CPPUNIT_ASSERT(pANode->getNumChildren() == 7);
797 CPPUNIT_ASSERT(pANode->getChild(0) != NULL);
798 CPPUNIT_ASSERT(pANode->getChild(0)->getType() == AST_NAME);
799 CPPUNIT_ASSERT(pANode->getChild(0)->getName() == pParameterDummy1->getId());
800 CPPUNIT_ASSERT(pANode->getChild(1) != NULL);
801 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
802 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == pParameterDummy2->getId());
803 CPPUNIT_ASSERT(pANode->getChild(2) != NULL);
804 CPPUNIT_ASSERT(pANode->getChild(2)->getType() == AST_NAME);
805 CPPUNIT_ASSERT(pANode->getChild(2)->getName() == pParameterDummy3->getId());
806 CPPUNIT_ASSERT(pANode->getChild(3) != NULL);
807 CPPUNIT_ASSERT(pANode->getChild(3)->getType() == AST_NAME);
808 CPPUNIT_ASSERT(pANode->getChild(3)->getName() == pParameterDummy4->getId());
809 CPPUNIT_ASSERT(pANode->getChild(4) != NULL);
810 CPPUNIT_ASSERT(pANode->getChild(4)->getType() == AST_NAME);
811 CPPUNIT_ASSERT(pANode->getChild(4)->getName() == pLocalP->getId());
812 CPPUNIT_ASSERT(pANode->getChild(5) != NULL);
813 CPPUNIT_ASSERT(pANode->getChild(5)->getType() == AST_NAME);
814 CPPUNIT_ASSERT(pANode->getChild(5)->getName() == pGlobalizedParam1->getId());
815 CPPUNIT_ASSERT(pANode->getChild(6) != NULL);
816 CPPUNIT_ASSERT(pANode->getChild(6)->getType() == AST_NAME);
817 CPPUNIT_ASSERT(pANode->getChild(6)->getName() == pSpeciesA->getId());
819 CPPUNIT_ASSERT(pCModel->getListOfFunctionDefinitions()->size() == 1);
820 const FunctionDefinition* pFunDef = pCModel->getFunctionDefinition(0);
821 CPPUNIT_ASSERT(pFunDef != NULL);
822 CPPUNIT_ASSERT(pFunDef->getId() == pANode->getName());
823 pANode = pFunDef->getMath();
824 CPPUNIT_ASSERT(pANode != NULL);
825 CPPUNIT_ASSERT(pANode->getType() == AST_LAMBDA);
826 CPPUNIT_ASSERT(pANode->getNumChildren() == 8);
827 CPPUNIT_ASSERT(pANode->getChild(0)->getType() == AST_NAME);
828 std::string paramName1 = pANode->getChild(0)->getName();
829 CPPUNIT_ASSERT(!paramName1.empty());
830 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
831 std::string paramName2 = pANode->getChild(1)->getName();
832 CPPUNIT_ASSERT(!paramName2.empty());
833 CPPUNIT_ASSERT(pANode->getChild(2)->getType() == AST_NAME);
834 std::string paramName3 = pANode->getChild(2)->getName();
835 CPPUNIT_ASSERT(!paramName3.empty());
836 CPPUNIT_ASSERT(pANode->getChild(3)->getType() == AST_NAME);
837 std::string paramName4 = pANode->getChild(3)->getName();
838 CPPUNIT_ASSERT(!paramName4.empty());
839 CPPUNIT_ASSERT(pANode->getChild(4)->getType() == AST_NAME);
840 std::string paramName5 = pANode->getChild(4)->getName();
841 CPPUNIT_ASSERT(!paramName5.empty());
842 CPPUNIT_ASSERT(pANode->getChild(5)->getType() == AST_NAME);
843 std::string paramName6 = pANode->getChild(5)->getName();
844 CPPUNIT_ASSERT(!paramName6.empty());
845 CPPUNIT_ASSERT(pANode->getChild(6)->getType() == AST_NAME);
846 std::string paramName7 = pANode->getChild(6)->getName();
847 CPPUNIT_ASSERT(!paramName7.empty());
850 pANode = pANode->getChild(7);
851 CPPUNIT_ASSERT(pANode != NULL);
852 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
853 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
854 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
855 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == paramName6);
856 pANode = pANode->getChild(0);
857 CPPUNIT_ASSERT(pANode != NULL);
858 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
859 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
860 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
861 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == paramName3);
862 pANode = pANode->getChild(0);
863 CPPUNIT_ASSERT(pANode != NULL);
864 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
865 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
866 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
867 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == paramName4);
868 pANode = pANode->getChild(0);
869 CPPUNIT_ASSERT(pANode != NULL);
870 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
871 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
872 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
873 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == paramName3);
874 pANode = pANode->getChild(0);
875 CPPUNIT_ASSERT(pANode != NULL);
876 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
877 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
878 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
879 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == paramName5);
880 pANode = pANode->getChild(0);
881 CPPUNIT_ASSERT(pANode != NULL);
882 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
883 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
884 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
885 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == paramName7);
886 pANode = pANode->getChild(0);
887 CPPUNIT_ASSERT(pANode != NULL);
888 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
889 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
890 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
891 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == paramName1);
892 pANode = pANode->getChild(0);
893 CPPUNIT_ASSERT(pANode != NULL);
894 CPPUNIT_ASSERT(pANode->getType() == AST_TIMES);
895 CPPUNIT_ASSERT(pANode->getNumChildren() == 2);
896 CPPUNIT_ASSERT(pANode->getChild(0)->getType() == AST_NAME);
897 CPPUNIT_ASSERT(pANode->getChild(0)->getName() == paramName1);
898 CPPUNIT_ASSERT(pANode->getChild(1)->getType() == AST_NAME);
899 CPPUNIT_ASSERT(pANode->getChild(1)->getName() == paramName2);
903 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
904 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">\n"
905 " <model id=\"Model_1\" name=\"New Model\">\n"
907 " <body xmlns=\"http://www.w3.org/1999/xhtml\">\n"
908 " <p>Model with delay in kinetic law</p>\n"
911 " <listOfUnitDefinitions>\n"
912 " <unitDefinition id=\"volume\">\n"
914 " <unit kind=\"litre\" scale=\"-3\"/>\n"
916 " </unitDefinition>\n"
917 " <unitDefinition id=\"substance\">\n"
919 " <unit kind=\"mole\" scale=\"-3\"/>\n"
921 " </unitDefinition>\n"
922 " </listOfUnitDefinitions>\n"
923 " <listOfCompartments>\n"
924 " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>\n"
925 " </listOfCompartments>\n"
927 " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\"/>\n"
928 " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"1\"/>\n"
929 " </listOfSpecies>\n"
930 " <listOfParameters>\n"
931 " <parameter id=\"parameter_1\" name=\"K1\" value=\"4\"/>\n"
932 " </listOfParameters>\n"
933 " <listOfReactions>\n"
934 " <reaction id=\"reaction_1\" name=\"reaction_0\" reversible=\"false\">\n"
935 " <listOfReactants>\n"
936 " <speciesReference species=\"species_1\"/>\n"
937 " </listOfReactants>\n"
938 " <listOfProducts>\n"
939 " <speciesReference species=\"species_2\"/>\n"
940 " </listOfProducts>\n"
942 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
945 " <ci> compartment_1 </ci>i\n"
947 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/delay\">\n"
950 " <ci> parameter_1 </ci>\n"
954 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/delay\">\n"
957 " <ci> parameter_1 </ci>\n"
961 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/delay\">\n"
964 " <ci> parameter_1 </ci>\n"
967 " <ci> species_1 </ci>\n"
972 " </listOfReactions>\n"
978 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
979 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version3\" level=\"2\" version=\"3\">\n"
980 " <model id=\"Model_1\" name=\"New Model\">\n"
982 " <body xmlns=\"http://www.w3.org/1999/xhtml\">\n"
983 " <p>Model with delay in kinetic law as well as local parameters in delay expression</p>\n"
986 " <listOfUnitDefinitions>\n"
987 " <unitDefinition id=\"volume\">\n"
989 " <unit kind=\"litre\" scale=\"-3\"/>\n"
991 " </unitDefinition>\n"
992 " <unitDefinition id=\"substance\">\n"
994 " <unit kind=\"mole\" scale=\"-3\"/>\n"
996 " </unitDefinition>\n"
997 " </listOfUnitDefinitions>\n"
998 " <listOfCompartments>\n"
999 " <compartment id=\"compartment_1\" name=\"compartment\" size=\"1\"/>\n"
1000 " </listOfCompartments>\n"
1001 " <listOfSpecies>\n"
1002 " <species id=\"species_1\" name=\"A\" compartment=\"compartment_1\" initialConcentration=\"1\"/>\n"
1003 " <species id=\"species_2\" name=\"B\" compartment=\"compartment_1\" initialConcentration=\"1\"/>\n"
1004 " </listOfSpecies>\n"
1005 " <listOfParameters>\n"
1006 " <parameter id=\"parameter_1\" name=\"K1\" value=\"4\"/>\n"
1007 " </listOfParameters>\n"
1008 " <listOfReactions>\n"
1009 " <reaction id=\"reaction_1\" name=\"reaction_0\" reversible=\"false\">\n"
1010 " <listOfReactants>\n"
1011 " <speciesReference species=\"species_1\"/>\n"
1012 " </listOfReactants>\n"
1013 " <listOfProducts>\n"
1014 " <speciesReference species=\"species_2\"/>\n"
1015 " </listOfProducts>\n"
1017 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
1020 " <ci> compartment_1 </ci>i\n"
1022 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/delay\">\n"
1025 " <ci> parameter_1 </ci>\n"
1029 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/delay\">\n"
1032 " <ci> parameter_1 </ci>\n"
1036 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/delay\">\n"
1039 " <ci> parameter_1 </ci>\n"
1042 " <ci> species_1 </ci>\n"
1045 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/delay\">\n"
1052 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/delay\">\n"
1059 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/delay\">\n"
1068 " <listOfParameters>"
1069 " <parameter id=\"k1\" value=\"0.1\"/>"
1070 " <parameter id=\"k2\" value=\"0.2\"/>"
1071 " <parameter id=\"k3\" value=\"0.3\"/>"
1072 " </listOfParameters>"
1075 " </listOfReactions>\n"
const CExpression * getExpressionPtr() const
Header file of class CExpression.
size_t getCompartmentNumber() const
SBMLDocument * getCurrentSBMLDocument()
Header file of class CModelEntity and CModelValue.
CCopasiNode< Data > * getSibling()
const std::string & getObjectName() const
std::string exportSBMLToString(CProcessReport *pExportHandler, int sbmlLevel, int sbmlVersion)
virtual size_t size() const
const Type & getType() const
static const char * MODEL_STRING2
static CCopasiDataModel * pCOPASIDATAMODEL
const C_FLOAT64 & getInitialValue() const
const CCopasiVector< CChemEqElement > & getProducts() const
static Type type(const Type &type)
virtual const std::string & getKey() const
const CCopasiVector< CChemEqElement > & getSubstrates() const
static CCopasiDataModel * addDatamodel()
static Type subType(const Type &type)
static const char * MODEL_STRING1
const CCopasiVector< CChemEqElement > & getModifiers() const
static bool checkForMessage(const size_t &number)
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
static void init(int argc, char *argv[], const bool &withGui=false)
virtual const Data & getData() const
const CModelEntity::Status & getStatus() const
CCopasiNode< Data > * getChild()
CCopasiObject * ObjectFromName(const std::vector< CCopasiContainer * > &listOfContainer, const CCopasiObjectName &CN) const
void test_delay_in_kinetic_law()
CCopasiContainer * getObjectParent() const
void test_delay_in_kinetic_law_local_parameter()