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);
const CExpression * getExpressionPtr() const
size_t getCompartmentNumber() const
SBMLDocument * getCurrentSBMLDocument()
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 Type subType(const Type &type)
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.
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