39 #include "sbml/SBMLDocument.h"
40 #include "sbml/Model.h"
41 #include "sbml/FunctionDefinition.h"
42 #include "sbml/math/ASTNode.h"
43 #include "sbml/Rule.h"
44 #include "sbml/KineticLaw.h"
45 #include "sbml/Reaction.h"
46 #include "sbml/InitialAssignment.h"
47 #include "sbml/Event.h"
48 #include "sbml/Trigger.h"
49 #include "sbml/EventAssignment.h"
82 CPPUNIT_ASSERT(pCModel != NULL);
83 CPPUNIT_ASSERT(pCModel->getCompartments().size() == 1);
84 const CCompartment* pCCompartment = pCModel->getCompartments()[0];
85 CPPUNIT_ASSERT(pCCompartment != NULL);
89 std::vector<CCopasiContainer*> listOfContainers;
93 CPPUNIT_ASSERT(pCModel->getMetabolites().size() == 4);
95 const CMetab* pCSpecies1 = NULL;
96 const CMetab* pCSpecies2 = NULL;
97 unsigned int i, iMax = pCModel->getMetabolites().size();
99 for (i = 0; i < iMax; ++i)
101 if (pCModel->getMetabolites()[i]->getObjectName() == std::string(
"species_1"))
103 pCSpecies1 = pCModel->getMetabolites()[i];
105 else if (pCModel->getMetabolites()[i]->getObjectName() == std::string(
"species_2"))
107 pCSpecies2 = pCModel->getMetabolites()[i];
111 CPPUNIT_ASSERT(pCSpecies1 != NULL);
113 const CExpression* pCExpression = pCSpecies1->getExpressionPtr();
114 CPPUNIT_ASSERT(pCExpression != NULL);
116 CPPUNIT_ASSERT(pCRoot != NULL);
119 CPPUNIT_ASSERT(pCCallNode != NULL);
120 CPPUNIT_ASSERT(pCCallNode->
getData() == std::string(
"time_dependent"));
123 CPPUNIT_ASSERT(pCChild1 != NULL);
127 CPPUNIT_ASSERT(pCChild2 != NULL);
130 CPPUNIT_ASSERT(pCObjectNode != NULL);
131 pCObjectName = &pCObjectNode->getObjectCN();
133 CPPUNIT_ASSERT(pCObject != NULL);
135 CPPUNIT_ASSERT(pCObject->
getObjectName() == std::string(
"Time"));
138 CPPUNIT_ASSERT(pCSpecies2 != NULL);
141 CPPUNIT_ASSERT(pCExpression != NULL);
142 pCRoot = pCExpression->getRoot();
143 CPPUNIT_ASSERT(pCRoot != NULL);
146 CPPUNIT_ASSERT(pCCallNode != NULL);
147 CPPUNIT_ASSERT(pCCallNode->
getData() == std::string(
"time_dependent"));
150 CPPUNIT_ASSERT(pCChild1 != NULL);
153 pCChild2 =
dynamic_cast<const CEvaluationNode*
>(pCChild1->getSibling());
154 CPPUNIT_ASSERT(pCChild2 != NULL);
157 CPPUNIT_ASSERT(pCObjectNode != NULL);
158 pCObjectName = &pCObjectNode->getObjectCN();
160 CPPUNIT_ASSERT(pCObject != NULL);
162 CPPUNIT_ASSERT(pCObject->
getObjectName() == std::string(
"Time"));
165 CPPUNIT_ASSERT(pCModel->getModelValues().size() == 5);
172 iMax = pCModel->getModelValues().size();
174 for (i = 0; i < iMax; ++i)
176 if (pCModel->getModelValues()[i]->getObjectName() == std::string(
"parameter_1"))
178 pCModelValue1 = pCModel->getModelValues()[i];
180 else if (pCModel->getModelValues()[i]->getObjectName() == std::string(
"parameter_2"))
182 pCModelValue2 = pCModel->getModelValues()[i];
184 else if (pCModel->getModelValues()[i]->getObjectName() == std::string(
"parameter_4"))
186 pCModelValue4 = pCModel->getModelValues()[i];
188 else if (pCModel->getModelValues()[i]->getObjectName() == std::string(
"parameter_5"))
190 pCModelValue5 = pCModel->getModelValues()[i];
194 CPPUNIT_ASSERT(pCModelValue1 != NULL);
196 pCExpression = pCModelValue1->getExpressionPtr();
197 CPPUNIT_ASSERT(pCExpression != NULL);
198 pCRoot = pCExpression->getRoot();
199 CPPUNIT_ASSERT(pCRoot != NULL);
202 CPPUNIT_ASSERT(pCCallNode != NULL);
203 CPPUNIT_ASSERT(pCCallNode->
getData() == std::string(
"time_dependent"));
206 CPPUNIT_ASSERT(pCChild1 != NULL);
209 pCChild2 =
dynamic_cast<const CEvaluationNode*
>(pCChild1->getSibling());
210 CPPUNIT_ASSERT(pCChild2 != NULL);
213 CPPUNIT_ASSERT(pCObjectNode != NULL);
214 pCObjectName = &pCObjectNode->getObjectCN();
216 CPPUNIT_ASSERT(pCObject != NULL);
218 CPPUNIT_ASSERT(pCObject->
getObjectName() == std::string(
"Time"));
221 CPPUNIT_ASSERT(pCModelValue2 != NULL);
224 CPPUNIT_ASSERT(pCExpression != NULL);
225 pCRoot = pCExpression->getRoot();
226 CPPUNIT_ASSERT(pCRoot != NULL);
229 CPPUNIT_ASSERT(pCCallNode != NULL);
230 CPPUNIT_ASSERT(pCCallNode->
getData() == std::string(
"time_dependent"));
233 CPPUNIT_ASSERT(pCChild1 != NULL);
236 pCChild2 =
dynamic_cast<const CEvaluationNode*
>(pCChild1->getSibling());
237 CPPUNIT_ASSERT(pCChild2 != NULL);
240 CPPUNIT_ASSERT(pCObjectNode != NULL);
241 pCObjectName = &pCObjectNode->getObjectCN();
243 CPPUNIT_ASSERT(pCObject != NULL);
245 CPPUNIT_ASSERT(pCObject->
getObjectName() == std::string(
"Time"));
248 CPPUNIT_ASSERT(pCModelValue4 != NULL);
251 CPPUNIT_ASSERT(pCExpression != NULL);
252 pCRoot = pCExpression->getRoot();
253 CPPUNIT_ASSERT(pCRoot != NULL);
256 CPPUNIT_ASSERT(pCCallNode != NULL);
257 CPPUNIT_ASSERT(pCCallNode->
getData() == std::string(
"time_dependent"));
260 CPPUNIT_ASSERT(pCChild1 != NULL);
263 pCChild2 =
dynamic_cast<const CEvaluationNode*
>(pCChild1->getSibling());
264 CPPUNIT_ASSERT(pCChild2 != NULL);
267 CPPUNIT_ASSERT(pCObjectNode != NULL);
268 pCObjectName = &pCObjectNode->getObjectCN();
270 CPPUNIT_ASSERT(pCObject != NULL);
272 CPPUNIT_ASSERT(pCObject->
getObjectName() == std::string(
"Initial Time"));
275 CPPUNIT_ASSERT(pCModelValue5 != NULL);
278 CPPUNIT_ASSERT(pCExpression != NULL);
279 pCRoot = pCExpression->getRoot();
280 CPPUNIT_ASSERT(pCRoot != NULL);
283 CPPUNIT_ASSERT(pCCallNode != NULL);
285 CPPUNIT_ASSERT(pCCallNode->
getData() == std::string(
"indirectly_time_dependent"));
287 CPPUNIT_ASSERT(pCChild1 != NULL);
291 pCChild2 =
dynamic_cast<const CEvaluationNode*
>(pCChild1->getSibling());
292 CPPUNIT_ASSERT(pCChild2 != NULL);
295 CPPUNIT_ASSERT(pCObjectNode != NULL);
296 pCObjectName = &pCObjectNode->getObjectCN();
298 CPPUNIT_ASSERT(pCObject != NULL);
300 CPPUNIT_ASSERT(pCObject->
getObjectName() == std::string(
"Initial Time"));
303 CPPUNIT_ASSERT(pCModel->getReactions().size() == 1);
304 const CReaction* pCReaction = pCModel->getReactions()[0];
305 CPPUNIT_ASSERT(pCReaction != NULL);
306 CPPUNIT_ASSERT(pCReaction->isReversible() ==
false);
307 const CChemEq& chemEq = pCReaction->getChemEq();
308 CPPUNIT_ASSERT(chemEq.getSubstrates().size() == 1);
309 CPPUNIT_ASSERT(chemEq.getProducts().size() == 1);
310 CPPUNIT_ASSERT(chemEq.getModifiers().size() == 0);
311 const CFunction* pCFunction = pCReaction->getFunction();
312 CPPUNIT_ASSERT(pCFunction != NULL);
313 pCRoot = pCFunction->getRoot();
314 CPPUNIT_ASSERT(pCRoot != NULL);
317 CPPUNIT_ASSERT(pCCallNode != NULL);
318 CPPUNIT_ASSERT(pCCallNode->
getData() == std::string(
"time_dependent"));
321 CPPUNIT_ASSERT(pCChild1 != NULL);
324 pCChild2 =
dynamic_cast<const CEvaluationNode*
>(pCChild1->getSibling());
325 CPPUNIT_ASSERT(pCChild2 != NULL);
328 std::string variableName = pCChild2->
getData();
329 const std::vector<std::string>& parameterMapping = pCReaction->getParameterMapping(variableName);
330 CPPUNIT_ASSERT(parameterMapping.size() == 1);
331 std::string objectKey = parameterMapping[0];
332 CPPUNIT_ASSERT(!objectKey.empty());
334 CPPUNIT_ASSERT(pCObject != NULL);
335 CPPUNIT_ASSERT(pCObject == pCModel);
338 CPPUNIT_ASSERT(pCModel->getEvents().size() == 1);
339 const CEvent* pCEvent = pCModel->getEvents()[0];
340 CPPUNIT_ASSERT(pCEvent != NULL);
342 pCExpression = pCEvent->getTriggerExpressionPtr();
343 CPPUNIT_ASSERT(pCExpression != NULL);
344 pCRoot = pCExpression->getRoot();
345 CPPUNIT_ASSERT(pCRoot != NULL);
350 CPPUNIT_ASSERT(pCChild1 != NULL);
354 CPPUNIT_ASSERT(pCCallNode != NULL);
355 CPPUNIT_ASSERT(pCCallNode->
getData() == std::string(
"time_dependent"));
358 CPPUNIT_ASSERT(pCChild1 != NULL);
361 pCChild2 =
dynamic_cast<const CEvaluationNode*
>(pCChild1->getSibling());
362 CPPUNIT_ASSERT(pCChild2 != NULL);
365 CPPUNIT_ASSERT(pCObjectNode != NULL);
366 pCObjectName = &pCObjectNode->getObjectCN();
368 CPPUNIT_ASSERT(pCObject != NULL);
369 CPPUNIT_ASSERT(pCObject->isReference() ==
true);
370 CPPUNIT_ASSERT(pCObject->getObjectName() == std::string(
"Time"));
371 CPPUNIT_ASSERT(pCObject->getObjectParent() == pCModel);
375 CPPUNIT_ASSERT(pCChild2 != NULL);
379 CPPUNIT_ASSERT(pCEvent->getAssignments().size() == 1);
380 pCExpression = pCEvent->getAssignments()[0]->getExpressionPtr();
381 CPPUNIT_ASSERT(pCExpression != NULL);
382 pCRoot = pCExpression->getRoot();
383 CPPUNIT_ASSERT(pCRoot != NULL);
386 CPPUNIT_ASSERT(pCCallNode != NULL);
387 CPPUNIT_ASSERT(pCCallNode->
getData() == std::string(
"time_dependent"));
390 CPPUNIT_ASSERT(pCChild1 != NULL);
393 pCChild2 =
dynamic_cast<const CEvaluationNode*
>(pCChild1->getSibling());
394 CPPUNIT_ASSERT(pCChild2 != NULL);
397 CPPUNIT_ASSERT(pCObjectNode != NULL);
398 pCObjectName = &pCObjectNode->getObjectCN();
400 CPPUNIT_ASSERT(pCObject != NULL);
401 CPPUNIT_ASSERT(pCObject->isReference() ==
true);
402 CPPUNIT_ASSERT(pCObject->getObjectName() == std::string(
"Time"));
403 CPPUNIT_ASSERT(pCObject->getObjectParent() == pCModel);
407 CPPUNIT_ASSERT(pFunctionDB != NULL);
408 const CEvaluationTree* pCTree = pFunctionDB->findFunction(
"time_dependent");
409 CPPUNIT_ASSERT(pCTree != NULL);
410 pCFunction =
dynamic_cast<const CFunction*
>(pCTree);
411 CPPUNIT_ASSERT(pCFunction != NULL);
413 CPPUNIT_ASSERT(pCFunction->getVariables().size() == 2);
414 pCRoot = pCFunction->getRoot();
418 CPPUNIT_ASSERT(pCChild1 != NULL);
420 pCChild2 =
dynamic_cast<const CEvaluationNode*
>(pCChild1->getSibling());
421 CPPUNIT_ASSERT(pCChild2 != NULL);
423 CPPUNIT_ASSERT(pCChild2->getSibling() == NULL);
425 pCTree = pFunctionDB->findFunction(
"indirectly_time_dependent");
426 CPPUNIT_ASSERT(pCTree != NULL);
427 pCFunction =
dynamic_cast<const CFunction*
>(pCTree);
428 CPPUNIT_ASSERT(pCFunction != NULL);
430 CPPUNIT_ASSERT(pCFunction->getVariables().size() == 2);
431 pCRoot = pCFunction->getRoot();
434 CPPUNIT_ASSERT(pCChild1 != NULL);
436 pCChild2 =
dynamic_cast<const CEvaluationNode*
>(pCChild1->getSibling());
437 CPPUNIT_ASSERT(pCChild2 != NULL);
439 CPPUNIT_ASSERT(pCChild2->getSibling() == NULL);
445 CPPUNIT_ASSERT(pSBMLDocument != NULL);
446 const Model* pModel = pSBMLDocument->getModel();
447 CPPUNIT_ASSERT(pModel != NULL);
448 iMax = pModel->getNumFunctionDefinitions();
449 CPPUNIT_ASSERT(iMax == 2);
450 const FunctionDefinition* pFunctionDefinition1 = NULL;
451 const FunctionDefinition* pFunctionDefinition2 = NULL;
453 for (i = 0; i < iMax; ++i)
455 if (pModel->getFunctionDefinition(i)->getId() == std::string(
"functionDefinition_1"))
457 pFunctionDefinition1 = pModel->getFunctionDefinition(i);
459 else if (pModel->getFunctionDefinition(i)->getId() == std::string(
"functionDefinition_2"))
461 pFunctionDefinition2 = pModel->getFunctionDefinition(i);
465 CPPUNIT_ASSERT(pFunctionDefinition1 != NULL);
466 CPPUNIT_ASSERT(pFunctionDefinition1->getNumArguments() == 1);
467 const ASTNode* pRoot = pFunctionDefinition1->getMath();
468 CPPUNIT_ASSERT(pRoot != NULL);
470 CPPUNIT_ASSERT(pRoot->getNumChildren() == 2);
471 pRoot = pRoot->getChild(1);
472 CPPUNIT_ASSERT(pRoot != NULL);
473 CPPUNIT_ASSERT(pRoot->getType() == AST_TIMES);
474 CPPUNIT_ASSERT(pRoot->getNumChildren() == 2);
475 CPPUNIT_ASSERT(pRoot->getChild(0)->getType() == AST_NAME_TIME);
476 CPPUNIT_ASSERT(pRoot->getChild(1)->getType() == AST_NAME);
478 CPPUNIT_ASSERT(pFunctionDefinition2 != NULL);
479 CPPUNIT_ASSERT(pFunctionDefinition2->getNumArguments() == 1);
480 pRoot = pFunctionDefinition2->getMath();
481 CPPUNIT_ASSERT(pRoot != NULL);
483 CPPUNIT_ASSERT(pRoot->getNumChildren() == 2);
484 pRoot = pRoot->getChild(1);
485 CPPUNIT_ASSERT(pRoot != NULL);
486 CPPUNIT_ASSERT(pRoot->getType() == AST_FUNCTION);
487 CPPUNIT_ASSERT(pRoot->getNumChildren() == 1);
488 CPPUNIT_ASSERT(pRoot->getChild(0)->getType() == AST_NAME);
489 CPPUNIT_ASSERT(pRoot->getChild(0)->getName() == std::string(
"n"));
492 iMax = pModel->getListOfInitialAssignments()->size();
493 CPPUNIT_ASSERT(iMax == 2);
494 const InitialAssignment* pInitialAssignment1 = NULL;
495 const InitialAssignment* pInitialAssignment2 = NULL;
497 for (i = 0; i < iMax; ++i)
499 if (pModel->getInitialAssignment(i)->getSymbol() == std::string(
"parameter_4"))
501 pInitialAssignment1 = pModel->getInitialAssignment(i);
503 else if (pModel->getInitialAssignment(i)->getSymbol() == std::string(
"parameter_5"))
505 pInitialAssignment2 = pModel->getInitialAssignment(i);
509 CPPUNIT_ASSERT(pInitialAssignment1 != NULL);
510 pRoot = pInitialAssignment1->getMath();
511 CPPUNIT_ASSERT(pRoot->getType() == AST_FUNCTION);
512 CPPUNIT_ASSERT(pRoot->getName() == std::string(
"functionDefinition_1"));
513 CPPUNIT_ASSERT(pRoot->getNumChildren() == 1);
514 CPPUNIT_ASSERT(pRoot->getChild(0)->getType() == AST_REAL);
516 CPPUNIT_ASSERT(pInitialAssignment2 != NULL);
517 pRoot = pInitialAssignment2->getMath();
518 CPPUNIT_ASSERT(pRoot->getType() == AST_FUNCTION);
519 CPPUNIT_ASSERT(pRoot->getName() == std::string(
"functionDefinition_2"));
520 CPPUNIT_ASSERT(pRoot->getNumChildren() == 1);
521 CPPUNIT_ASSERT(pRoot->getChild(0)->getType() == AST_REAL);
524 iMax = pModel->getListOfRules()->size();
525 CPPUNIT_ASSERT(iMax == 4);
527 for (i = 0; i < iMax; ++i)
532 const Rule* pRule = pModel->getRule(i);
533 CPPUNIT_ASSERT(pRule != NULL);
534 pRoot = pRule->getMath();
535 CPPUNIT_ASSERT(pRoot != NULL);
536 CPPUNIT_ASSERT(pRoot->getType() == AST_FUNCTION);
537 CPPUNIT_ASSERT(pRoot->getNumChildren() == 1);
538 CPPUNIT_ASSERT(pRoot->getChild(0)->getType() == AST_REAL);
542 CPPUNIT_ASSERT(pModel->getListOfReactions()->size() == 1);
543 const Reaction* pReaction = pModel->getReaction(0);
544 CPPUNIT_ASSERT(pReaction != NULL);
545 const KineticLaw* pKineticLaw = pReaction->getKineticLaw();
546 CPPUNIT_ASSERT(pKineticLaw != NULL);
547 pRoot = pKineticLaw->getMath();
548 CPPUNIT_ASSERT(pRoot != NULL);
550 CPPUNIT_ASSERT(pRoot->getType() == AST_TIMES);
551 CPPUNIT_ASSERT(pRoot->getNumChildren() == 2);
552 CPPUNIT_ASSERT(pRoot->getChild(0)->getType() == AST_NAME);
553 CPPUNIT_ASSERT(pRoot->getChild(1)->getType() == AST_FUNCTION);
554 pRoot = pRoot->getChild(1);
555 CPPUNIT_ASSERT(pRoot->getNumChildren() == 1);
556 CPPUNIT_ASSERT(pRoot->getChild(0)->getType() == AST_REAL);
559 CPPUNIT_ASSERT(pModel->getListOfEvents()->size() == 1);
560 const Event* pEvent = pModel->getEvent(0);
561 CPPUNIT_ASSERT(pEvent != NULL);
562 const Trigger* pTrigger = pEvent->getTrigger();
563 CPPUNIT_ASSERT(pTrigger != NULL);
564 pRoot = pTrigger->getMath();
565 CPPUNIT_ASSERT(pRoot != NULL);
567 CPPUNIT_ASSERT(pRoot->getType() == AST_RELATIONAL_GT);
568 CPPUNIT_ASSERT(pRoot->getNumChildren() == 2);
569 CPPUNIT_ASSERT(pRoot->getChild(1) != NULL);
570 CPPUNIT_ASSERT(pRoot->getChild(1)->getType() == AST_REAL);
571 CPPUNIT_ASSERT(pRoot->getChild(0) != NULL);
572 pRoot = pRoot->getChild(0);
573 CPPUNIT_ASSERT(pRoot != NULL);
574 CPPUNIT_ASSERT(pRoot->getType() == AST_FUNCTION);
575 CPPUNIT_ASSERT(pRoot->getNumChildren() == 1);
576 CPPUNIT_ASSERT(pRoot->getChild(0)->getType() == AST_REAL);
578 CPPUNIT_ASSERT(pEvent->getListOfEventAssignments()->size() == 1);
579 const EventAssignment* pEventAssignment = pEvent->getEventAssignment(0);
580 CPPUNIT_ASSERT(pEventAssignment != NULL);
581 pRoot = pEventAssignment->getMath();
582 CPPUNIT_ASSERT(pRoot != NULL);
583 CPPUNIT_ASSERT(pRoot->getType() == AST_FUNCTION);
584 CPPUNIT_ASSERT(pRoot->getNumChildren() == 1);
585 CPPUNIT_ASSERT(pRoot->getChild(0)->getType() == AST_REAL);
589 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
590 "<sbml xmlns=\"http://www.sbml.org/sbml/level2/version2\" level=\"2\" version=\"2\">\n"
591 " <model id=\"model_1\" name=\"model_1\">\n"
593 " <p xmlns=\"http://www.w3.org/1999/xhtml\">\n"
594 " This model contains an explicitly time dependent function definition.\n"
595 " On import in COPASI this should be converted to a function definition that has time as it's only argument.\n"
596 " All calls to this function must be replaced.\n"
599 " <listOfFunctionDefinitions>\n"
600 " <functionDefinition id=\"functionDefinition_1\" name=\"time_dependent\">\n"
601 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
608 " <csymbol encoding=\"text\" definitionURL=\"http://www.sbml.org/sbml/symbols/time\"> time </csymbol>\n"
613 " </functionDefinition>\n"
614 " <functionDefinition id=\"functionDefinition_2\" name=\"indirectly_time_dependent\">\n"
615 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
621 " <ci> functionDefinition_1 </ci>\n"
626 " </functionDefinition>\n"
627 " </listOfFunctionDefinitions>\n"
628 " <listOfCompartments>\n"
629 " <compartment id=\"compartment_1\" name=\"compartment_1\" size=\"1\" />\n"
630 " </listOfCompartments>\n"
632 " <species id=\"species_1\" name=\"species_1\" compartment=\"compartment_1\" initialConcentration=\"0.0\" />\n"
633 " <species id=\"species_2\" name=\"species_2\" compartment=\"compartment_1\" initialConcentration=\"0.0\" />\n"
634 " <species id=\"species_3\" name=\"species_3\" compartment=\"compartment_1\" initialConcentration=\"0.0\" />\n"
635 " <species id=\"species_4\" name=\"species_4\" compartment=\"compartment_1\" initialConcentration=\"0.0\" />\n"
636 " </listOfSpecies>\n"
637 " <listOfParameters>\n"
638 " <parameter id=\"parameter_1\" name=\"parameter_1\" constant=\"false\"/>\n"
639 " <parameter id=\"parameter_2\" name=\"parameter_2\" constant=\"false\"/>\n"
640 " <parameter id=\"parameter_3\" name=\"parameter_3\" constant=\"false\"/>\n"
641 " <parameter id=\"parameter_4\" name=\"parameter_4\" constant=\"true\"/>\n"
642 " <parameter id=\"parameter_5\" name=\"parameter_5\" constant=\"true\"/>\n"
643 " </listOfParameters>\n"
644 " <listOfInitialAssignments>\n"
645 " <initialAssignment symbol=\"parameter_4\">\n"
646 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
648 " <ci> functionDefinition_1 </ci>\n"
652 " </initialAssignment>\n"
653 " <initialAssignment symbol=\"parameter_5\">\n"
654 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
656 " <ci> functionDefinition_2 </ci>\n"
660 " </initialAssignment>\n"
661 " </listOfInitialAssignments>\n"
663 " <assignmentRule variable=\"parameter_1\">\n"
664 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
666 " <ci> functionDefinition_1 </ci>\n"
670 " </assignmentRule>\n"
671 " <rateRule variable=\"parameter_2\">\n"
672 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
674 " <ci> functionDefinition_1 </ci>\n"
679 " <assignmentRule variable=\"species_1\">\n"
680 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
682 " <ci> functionDefinition_1 </ci>\n"
686 " </assignmentRule>\n"
687 " <rateRule variable=\"species_2\">\n"
688 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
690 " <ci> functionDefinition_1 </ci>\n"
696 " <listOfReactions>\n"
697 " <reaction id=\"reaction_1\" name=\"reaction_1\" reversible=\"false\">\n"
698 " <listOfReactants>\n"
699 " <speciesReference species=\"species_3\"/>\n"
700 " </listOfReactants>\n"
701 " <listOfProducts>\n"
702 " <speciesReference species=\"species_4\"/>\n"
703 " </listOfProducts>\n"
705 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
708 " <ci> compartment_1 </ci>\n"
710 " <ci> functionDefinition_1 </ci>\n"
717 " </listOfReactions>\n"
721 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
725 " <ci> functionDefinition_1 </ci>\n"
732 " <listOfEventAssignments>\n"
733 " <eventAssignment variable=\"parameter_3\">\n"
734 " <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n"
736 " <ci> functionDefinition_1 </ci>\n"
740 " </eventAssignment>\n"
741 " </listOfEventAssignments>\n"
const CExpression * getExpressionPtr() const
Header file of class CExpression.
SBMLDocument * getCurrentSBMLDocument()
Header file of class CModelEntity and CModelValue.
void test_import_time_dependent_function_definition()
static const char * MODEL_STRING1
const std::string & getObjectName() const
CCopasiObject * get(const std::string &key)
const Type & getType() const
static CCopasiDataModel * pCOPASIDATAMODEL
static Type type(const Type &type)
virtual const Data & getData() const
static CFunctionDB * getFunctionList()
static CCopasiDataModel * addDatamodel()
static Type subType(const Type &type)
static CKeyFactory * getKeyFactory()
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)
Header file of class CEvent.
virtual const Data & getData() const
const CModelEntity::Status & getStatus() const
CCopasiNode< Data > * getChild()
CCopasiObject * ObjectFromName(const std::vector< CCopasiContainer * > &listOfContainer, const CCopasiObjectName &CN) const
CCopasiContainer * getObjectParent() const
const CExpression * getInitialExpressionPtr() const