24 #include "utilities.hpp"
27 #include <sbml/SBMLDocument.h>
28 #include <sbml/Model.h>
29 #include <sbml/Compartment.h>
30 #include <sbml/Rule.h>
31 #include <sbml/Reaction.h>
32 #include <sbml/SpeciesReference.h>
33 #include <sbml/Parameter.h>
34 #include <sbml/KineticLaw.h>
35 #include <sbml/InitialAssignment.h>
36 #include <sbml/math/ASTNode.h>
65 CPPUNIT_ASSERT(pDataModel->
getModel() != NULL);
67 CPPUNIT_ASSERT(pDocument == NULL);
68 std::string sbmlString;
77 CPPUNIT_ASSERT(
false);
80 CPPUNIT_ASSERT(!sbmlString.empty());
83 CPPUNIT_ASSERT(pDocument != NULL);
84 const Model* pModel = pDocument->getModel();
85 CPPUNIT_ASSERT(pModel != NULL);
86 CPPUNIT_ASSERT(pModel->getListOfParameters()->size() == 2);
87 const Parameter *pP1 = NULL, *pP2 = NULL;
88 pP1 = pModel->getParameter(0);
89 CPPUNIT_ASSERT(pP1 != NULL);
91 if (pP1->getName() != std::string(
"K"))
94 pP1 = pModel->getParameter(1);
98 pP2 = pModel->getParameter(1);
101 CPPUNIT_ASSERT(pP2->getName() == std::string(
"reaction_k1"));
102 CPPUNIT_ASSERT(pP2->getConstant() ==
true);
103 CPPUNIT_ASSERT(fabs((pP2->getValue() - 0.1) / 0.1) < 1e-6);
104 CPPUNIT_ASSERT(pP1->getName() == std::string(
"K"));
105 CPPUNIT_ASSERT(pP1->getConstant() ==
false);
106 CPPUNIT_ASSERT(fabs((pP1->getValue() - 0.1) / 0.1) < 1e-6);
108 CPPUNIT_ASSERT(pModel->getListOfRules()->size() == 1);
109 const Rule* pRule = pModel->getRule(0);
110 CPPUNIT_ASSERT(pRule != NULL);
111 const AssignmentRule* pAssignmentRule =
dynamic_cast<const AssignmentRule*
>(pRule);
112 CPPUNIT_ASSERT(pAssignmentRule != NULL);
113 CPPUNIT_ASSERT(pAssignmentRule->getVariable() == pP1->getId());
114 const ASTNode* pMath = pAssignmentRule->getMath();
115 CPPUNIT_ASSERT(pMath != NULL);
116 CPPUNIT_ASSERT(pMath->getType() == AST_NAME);
117 CPPUNIT_ASSERT(pMath->getName() == std::string(pP2->getId()));
119 CPPUNIT_ASSERT(pModel->getListOfReactions()->size() == 1);
120 const Reaction* pReaction = pModel->getReaction(0);
121 CPPUNIT_ASSERT(pReaction != NULL);
122 CPPUNIT_ASSERT(pReaction->getListOfReactants()->size() == 1);
123 CPPUNIT_ASSERT(pReaction->getListOfProducts()->size() == 1);
124 CPPUNIT_ASSERT(pReaction->getListOfModifiers()->size() == 0);
125 const KineticLaw* pKLaw = pReaction->getKineticLaw();
126 CPPUNIT_ASSERT(pKLaw != NULL);
127 CPPUNIT_ASSERT(pKLaw->getListOfParameters()->size() == 0);
128 const SpeciesReference* pSpeciesReference = pReaction->getReactant(0);
129 CPPUNIT_ASSERT(pSpeciesReference != NULL);
130 CPPUNIT_ASSERT(pModel->getListOfCompartments()->size() == 1);
131 const Compartment* pCompartment = pModel->getCompartment(0);
132 CPPUNIT_ASSERT(pCompartment != NULL);
133 pMath = pKLaw->getMath();
134 CPPUNIT_ASSERT(pMath != NULL);
137 CPPUNIT_ASSERT(pMath->getType() == AST_TIMES);
138 std::vector<std::string> ids;
139 CPPUNIT_ASSERT(pMath->getNumChildren() == 2 || pMath->getNumChildren() == 3);
141 if (pMath->getNumChildren() == 3)
143 CPPUNIT_ASSERT(pMath->getChild(0)->getType() == AST_NAME);
144 CPPUNIT_ASSERT(pMath->getChild(1)->getType() == AST_NAME);
145 CPPUNIT_ASSERT(pMath->getChild(2)->getType() == AST_NAME);
146 ids.push_back(pMath->getChild(0)->getName());
147 ids.push_back(pMath->getChild(1)->getName());
148 ids.push_back(pMath->getChild(2)->getName());
152 if (pMath->getChild(0)->getType() == AST_NAME)
154 ids.push_back(pMath->getChild(0)->getName());
155 pMath = pMath->getChild(1);
159 CPPUNIT_ASSERT(pMath->getChild(1)->getType() == AST_NAME);
160 ids.push_back(pMath->getChild(1)->getName());
161 pMath = pMath->getChild(0);
164 CPPUNIT_ASSERT(pMath->getType() == AST_TIMES);
165 CPPUNIT_ASSERT(pMath->getNumChildren() == 2);
166 CPPUNIT_ASSERT(pMath->getChild(0)->getType() == AST_NAME);
167 CPPUNIT_ASSERT(pMath->getChild(1)->getType() == AST_NAME);
168 ids.push_back(pMath->getChild(0)->getName());
169 ids.push_back(pMath->getChild(1)->getName());
172 CPPUNIT_ASSERT(ids.size() == 3);
173 CPPUNIT_ASSERT(std::find(ids.begin(), ids.end(), std::string(pCompartment->getId())) != ids.end());
174 CPPUNIT_ASSERT(std::find(ids.begin(), ids.end(), std::string(pP2->getId())) != ids.end());
175 CPPUNIT_ASSERT(std::find(ids.begin(), ids.end(), std::string(pSpeciesReference->getSpecies())) != ids.end());
185 CPPUNIT_ASSERT(pDataModel->
getModel() != NULL);
187 CPPUNIT_ASSERT(pDocument == NULL);
188 std::string sbmlString;
198 CPPUNIT_ASSERT(
false);
201 CPPUNIT_ASSERT(!sbmlString.empty());
204 CPPUNIT_ASSERT(pDocument != NULL);
205 const Model* pModel = pDocument->getModel();
206 CPPUNIT_ASSERT(pModel != NULL);
207 CPPUNIT_ASSERT(pModel->getListOfParameters()->size() == 2);
208 const Parameter *pP1 = NULL, *pP2 = NULL;
209 pP1 = pModel->getParameter(0);
210 CPPUNIT_ASSERT(pP1 != NULL);
212 if (pP1->getName() != std::string(
"K"))
215 pP1 = pModel->getParameter(1);
219 pP2 = pModel->getParameter(1);
222 CPPUNIT_ASSERT(pP2->getName() == std::string(
"reaction_k1"));
223 CPPUNIT_ASSERT(pP2->getConstant() ==
true);
224 CPPUNIT_ASSERT(fabs((pP2->getValue() - 0.1) / 0.1) < 1e-6);
225 CPPUNIT_ASSERT(pP1->getName() == std::string(
"K"));
226 CPPUNIT_ASSERT(pP1->getConstant() ==
true);
227 CPPUNIT_ASSERT(fabs((pP1->getValue() - 0.1) / 0.1) < 1e-6);
229 CPPUNIT_ASSERT(pModel->getListOfInitialAssignments()->size() == 1);
230 const InitialAssignment* pAssignment = pModel->getInitialAssignment(0);
231 CPPUNIT_ASSERT(pAssignment != NULL);
232 CPPUNIT_ASSERT(pAssignment->getSymbol() == pP1->getId());
233 const ASTNode* pMath = pAssignment->getMath();
234 CPPUNIT_ASSERT(pMath != NULL);
235 CPPUNIT_ASSERT(pMath->getType() == AST_NAME);
236 CPPUNIT_ASSERT(pMath->getName() == std::string(pP2->getId()));
238 CPPUNIT_ASSERT(pModel->getListOfReactions()->size() == 1);
239 const Reaction* pReaction = pModel->getReaction(0);
240 CPPUNIT_ASSERT(pReaction != NULL);
241 CPPUNIT_ASSERT(pReaction->getListOfReactants()->size() == 1);
242 CPPUNIT_ASSERT(pReaction->getListOfProducts()->size() == 1);
243 CPPUNIT_ASSERT(pReaction->getListOfModifiers()->size() == 0);
244 const KineticLaw* pKLaw = pReaction->getKineticLaw();
245 CPPUNIT_ASSERT(pKLaw != NULL);
246 CPPUNIT_ASSERT(pKLaw->getListOfParameters()->size() == 0);
247 const SpeciesReference* pSpeciesReference = pReaction->getReactant(0);
248 CPPUNIT_ASSERT(pSpeciesReference != NULL);
249 CPPUNIT_ASSERT(pModel->getListOfCompartments()->size() == 1);
250 const Compartment* pCompartment = pModel->getCompartment(0);
251 CPPUNIT_ASSERT(pCompartment != NULL);
252 pMath = pKLaw->getMath();
253 CPPUNIT_ASSERT(pMath != NULL);
256 CPPUNIT_ASSERT(pMath->getType() == AST_TIMES);
257 std::vector<std::string> ids;
258 CPPUNIT_ASSERT(pMath->getNumChildren() == 2 || pMath->getNumChildren() == 3);
260 if (pMath->getNumChildren() == 3)
262 CPPUNIT_ASSERT(pMath->getChild(0)->getType() == AST_NAME);
263 CPPUNIT_ASSERT(pMath->getChild(1)->getType() == AST_NAME);
264 CPPUNIT_ASSERT(pMath->getChild(2)->getType() == AST_NAME);
265 ids.push_back(pMath->getChild(0)->getName());
266 ids.push_back(pMath->getChild(1)->getName());
267 ids.push_back(pMath->getChild(2)->getName());
271 if (pMath->getChild(0)->getType() == AST_NAME)
273 ids.push_back(pMath->getChild(0)->getName());
274 pMath = pMath->getChild(1);
278 CPPUNIT_ASSERT(pMath->getChild(1)->getType() == AST_NAME);
279 ids.push_back(pMath->getChild(1)->getName());
280 pMath = pMath->getChild(0);
283 CPPUNIT_ASSERT(pMath->getType() == AST_TIMES);
284 CPPUNIT_ASSERT(pMath->getNumChildren() == 2);
285 CPPUNIT_ASSERT(pMath->getChild(0)->getType() == AST_NAME);
286 CPPUNIT_ASSERT(pMath->getChild(1)->getType() == AST_NAME);
287 ids.push_back(pMath->getChild(0)->getName());
288 ids.push_back(pMath->getChild(1)->getName());
291 CPPUNIT_ASSERT(ids.size() == 3);
292 CPPUNIT_ASSERT(std::find(ids.begin(), ids.end(), std::string(pCompartment->getId())) != ids.end());
293 CPPUNIT_ASSERT(std::find(ids.begin(), ids.end(), std::string(pP2->getId())) != ids.end());
294 CPPUNIT_ASSERT(std::find(ids.begin(), ids.end(), std::string(pSpeciesReference->getSpecies())) != ids.end());
306 CPPUNIT_ASSERT(pDataModel->
getModel() != NULL);
308 CPPUNIT_ASSERT(pDocument == NULL);
309 std::string sbmlString;
318 CPPUNIT_ASSERT(
false);
321 CPPUNIT_ASSERT(!sbmlString.empty());
324 CPPUNIT_ASSERT(pDocument != NULL);
325 const Model* pModel = pDocument->getModel();
326 CPPUNIT_ASSERT(pModel != NULL);
327 CPPUNIT_ASSERT(pModel->getListOfParameters()->size() == 1);
328 const Parameter *pP1 = pModel->getParameter(0);
329 CPPUNIT_ASSERT(pP1 != NULL);
330 CPPUNIT_ASSERT(pP1->getName() == std::string(
"K"));
331 CPPUNIT_ASSERT(pP1->getConstant() ==
true);
332 CPPUNIT_ASSERT(fabs((pP1->getValue() - 0.1) / 0.1) < 1e-6);
334 CPPUNIT_ASSERT(pModel->getListOfRules()->size() == 0);
335 CPPUNIT_ASSERT(pModel->getListOfInitialAssignments()->size() == 0);
337 CPPUNIT_ASSERT(pModel->getListOfReactions()->size() == 1);
338 const Reaction* pReaction = pModel->getReaction(0);
339 CPPUNIT_ASSERT(pReaction != NULL);
340 CPPUNIT_ASSERT(pReaction->getListOfReactants()->size() == 1);
341 CPPUNIT_ASSERT(pReaction->getListOfProducts()->size() == 1);
342 CPPUNIT_ASSERT(pReaction->getListOfModifiers()->size() == 0);
343 const KineticLaw* pKLaw = pReaction->getKineticLaw();
344 CPPUNIT_ASSERT(pKLaw != NULL);
345 CPPUNIT_ASSERT(pKLaw->getListOfParameters()->size() == 1);
346 pP1 = pKLaw->getParameter(0);
347 CPPUNIT_ASSERT(pP1 != NULL);
348 CPPUNIT_ASSERT(pP1->getId() == std::string(
"k1"));
349 const SpeciesReference* pSpeciesReference = pReaction->getReactant(0);
350 CPPUNIT_ASSERT(pSpeciesReference != NULL);
351 CPPUNIT_ASSERT(pModel->getListOfCompartments()->size() == 1);
352 const Compartment* pCompartment = pModel->getCompartment(0);
353 CPPUNIT_ASSERT(pCompartment != NULL);
354 const ASTNode* pMath = pKLaw->getMath();
355 CPPUNIT_ASSERT(pMath != NULL);
358 CPPUNIT_ASSERT(pMath->getType() == AST_TIMES);
359 std::vector<std::string> ids;
360 CPPUNIT_ASSERT(pMath->getNumChildren() == 2 || pMath->getNumChildren() == 3);
362 if (pMath->getNumChildren() == 3)
364 CPPUNIT_ASSERT(pMath->getChild(0)->getType() == AST_NAME);
365 CPPUNIT_ASSERT(pMath->getChild(1)->getType() == AST_NAME);
366 CPPUNIT_ASSERT(pMath->getChild(2)->getType() == AST_NAME);
367 ids.push_back(pMath->getChild(0)->getName());
368 ids.push_back(pMath->getChild(1)->getName());
369 ids.push_back(pMath->getChild(2)->getName());
373 if (pMath->getChild(0)->getType() == AST_NAME)
375 ids.push_back(pMath->getChild(0)->getName());
376 pMath = pMath->getChild(1);
380 CPPUNIT_ASSERT(pMath->getChild(1)->getType() == AST_NAME);
381 ids.push_back(pMath->getChild(1)->getName());
382 pMath = pMath->getChild(0);
385 CPPUNIT_ASSERT(pMath->getType() == AST_TIMES);
386 CPPUNIT_ASSERT(pMath->getNumChildren() == 2);
387 CPPUNIT_ASSERT(pMath->getChild(0)->getType() == AST_NAME);
388 CPPUNIT_ASSERT(pMath->getChild(1)->getType() == AST_NAME);
389 ids.push_back(pMath->getChild(0)->getName());
390 ids.push_back(pMath->getChild(1)->getName());
393 CPPUNIT_ASSERT(ids.size() == 3);
394 CPPUNIT_ASSERT(std::find(ids.begin(), ids.end(), std::string(pCompartment->getId())) != ids.end());
396 CPPUNIT_ASSERT(std::find(ids.begin(), ids.end(), std::string(pP1->getId())) != ids.end());
397 CPPUNIT_ASSERT(std::find(ids.begin(), ids.end(), std::string(pSpeciesReference->getSpecies())) != ids.end());
401 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
402 "<!-- generated with COPASI 4.4.29 (Debug) (http://www.copasi.org) at 2009-01-21 10:40:31 UTC -->\n"
403 "<COPASI xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.copasi.org/static/schema.xsd\" versionMajor=\"1\" versionMinor=\"0\" versionDevel=\"29\">\n"
404 " <ListOfFunctions>\n"
405 " <Function key=\"Function_13\" name=\"Mass action (irreversible)\" type=\"MassAction\" reversible=\"false\">\n"
407 " k1*PRODUCT<substrate_i>\n"
409 " <ListOfParameterDescriptions>\n"
410 " <ParameterDescription key=\"FunctionParameter_81\" name=\"k1\" order=\"0\" role=\"constant\"/>\n"
411 " <ParameterDescription key=\"FunctionParameter_79\" name=\"substrate\" order=\"1\" role=\"substrate\"/>\n"
412 " </ListOfParameterDescriptions>\n"
414 " </ListOfFunctions>\n"
415 " <Model key=\"Model_0\" name=\"New Model\" timeUnit=\"s\" volumeUnit=\"ml\" quantityUnit=\"mmol\" type=\"deterministic\">\n"
417 " <body xmlns=\"http://www.w3.org/1999/xhtml\">\n"
421 " <ListOfCompartments>\n"
422 " <Compartment key=\"Compartment_0\" name=\"compartment\" simulationType=\"fixed\">\n"
424 " </ListOfCompartments>\n"
425 " <ListOfMetabolites>\n"
426 " <Metabolite key=\"Metabolite_0\" name=\"A\" simulationType=\"reactions\" compartment=\"Compartment_0\">\n"
428 " <Metabolite key=\"Metabolite_1\" name=\"B\" simulationType=\"reactions\" compartment=\"Compartment_0\">\n"
430 " </ListOfMetabolites>\n"
431 " <ListOfModelValues>\n"
432 " <ModelValue key=\"ModelValue_0\" name=\"K\" simulationType=\"assignment\">\n"
434 " <CN=Root,Model=New Model,Vector=Reactions[reaction],ParameterGroup=Parameters,Parameter=k1,Reference=Value>\n"
437 " </ListOfModelValues>\n"
438 " <ListOfReactions>\n"
439 " <Reaction key=\"Reaction_0\" name=\"reaction\" reversible=\"false\">\n"
440 " <ListOfSubstrates>\n"
441 " <Substrate metabolite=\"Metabolite_0\" stoichiometry=\"1\"/>\n"
442 " </ListOfSubstrates>\n"
443 " <ListOfProducts>\n"
444 " <Product metabolite=\"Metabolite_1\" stoichiometry=\"1\"/>\n"
445 " </ListOfProducts>\n"
446 " <ListOfConstants>\n"
447 " <Constant key=\"Parameter_78\" name=\"k1\" value=\"0.1\"/>\n"
448 " </ListOfConstants>\n"
449 " <KineticLaw function=\"Function_13\">\n"
450 " <ListOfCallParameters>\n"
451 " <CallParameter functionParameter=\"FunctionParameter_81\">\n"
452 " <SourceParameter reference=\"Parameter_78\"/>\n"
453 " </CallParameter>\n"
454 " <CallParameter functionParameter=\"FunctionParameter_79\">\n"
455 " <SourceParameter reference=\"Metabolite_0\"/>\n"
456 " </CallParameter>\n"
457 " </ListOfCallParameters>\n"
460 " </ListOfReactions>\n"
462 " <StateTemplateVariable objectReference=\"Model_0\"/>\n"
463 " <StateTemplateVariable objectReference=\"Metabolite_0\"/>\n"
464 " <StateTemplateVariable objectReference=\"Metabolite_1\"/>\n"
465 " <StateTemplateVariable objectReference=\"ModelValue_0\"/>\n"
466 " <StateTemplateVariable objectReference=\"Compartment_0\"/>\n"
467 " </StateTemplate>\n"
468 " <InitialState type=\"initialState\">\n"
469 " 0 6.022141500000001e+19 6.022141500000001e+19 0.1 1\n"
475 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
476 "<!-- generated with COPASI 4.4.29 (Debug) (http://www.copasi.org) at 2009-01-21 19:47:46 UTC -->\n"
477 "<COPASI xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.copasi.org/static/schema.xsd\" versionMajor=\"1\" versionMinor=\"0\" versionDevel=\"29\">\n"
478 " <ListOfFunctions>\n"
479 " <Function key=\"Function_13\" name=\"Mass action (irreversible)\" type=\"MassAction\" reversible=\"false\">\n"
481 " k1*PRODUCT<substrate_i>\n"
483 " <ListOfParameterDescriptions>\n"
484 " <ParameterDescription key=\"FunctionParameter_81\" name=\"k1\" order=\"0\" role=\"constant\"/>\n"
485 " <ParameterDescription key=\"FunctionParameter_79\" name=\"substrate\" order=\"1\" role=\"substrate\"/>\n"
486 " </ListOfParameterDescriptions>\n"
488 " </ListOfFunctions>\n"
489 " <Model key=\"Model_1\" name=\"New Model\" timeUnit=\"s\" volumeUnit=\"ml\" quantityUnit=\"mmol\" type=\"deterministic\">\n"
491 " <body xmlns=\"http://www.w3.org/1999/xhtml\">\n"
495 " <ListOfCompartments>\n"
496 " <Compartment key=\"Compartment_0\" name=\"compartment\" simulationType=\"fixed\">\n"
498 " </ListOfCompartments>\n"
499 " <ListOfMetabolites>\n"
500 " <Metabolite key=\"Metabolite_0\" name=\"A\" simulationType=\"reactions\" compartment=\"Compartment_0\">\n"
502 " <Metabolite key=\"Metabolite_1\" name=\"B\" simulationType=\"reactions\" compartment=\"Compartment_0\">\n"
504 " </ListOfMetabolites>\n"
505 " <ListOfModelValues>\n"
506 " <ModelValue key=\"ModelValue_0\" name=\"K\" simulationType=\"fixed\">\n"
507 " <InitialExpression>\n"
508 " <CN=Root,Model=New Model,Vector=Reactions[reaction],ParameterGroup=Parameters,Parameter=k1,Reference=Value>\n"
509 " </InitialExpression>\n"
511 " </ListOfModelValues>\n"
512 " <ListOfReactions>\n"
513 " <Reaction key=\"Reaction_0\" name=\"reaction\" reversible=\"false\">\n"
514 " <ListOfSubstrates>\n"
515 " <Substrate metabolite=\"Metabolite_0\" stoichiometry=\"1\"/>\n"
516 " </ListOfSubstrates>\n"
517 " <ListOfProducts>\n"
518 " <Product metabolite=\"Metabolite_1\" stoichiometry=\"1\"/>\n"
519 " </ListOfProducts>\n"
520 " <ListOfConstants>\n"
521 " <Constant key=\"Parameter_81\" name=\"k1\" value=\"0.1\"/>\n"
522 " </ListOfConstants>\n"
523 " <KineticLaw function=\"Function_13\">\n"
524 " <ListOfCallParameters>\n"
525 " <CallParameter functionParameter=\"FunctionParameter_81\">\n"
526 " <SourceParameter reference=\"Parameter_81\"/>\n"
527 " </CallParameter>\n"
528 " <CallParameter functionParameter=\"FunctionParameter_79\">\n"
529 " <SourceParameter reference=\"Metabolite_0\"/>\n"
530 " </CallParameter>\n"
531 " </ListOfCallParameters>\n"
534 " </ListOfReactions>\n"
536 " <StateTemplateVariable objectReference=\"Model_1\"/>\n"
537 " <StateTemplateVariable objectReference=\"Metabolite_0\"/>\n"
538 " <StateTemplateVariable objectReference=\"Metabolite_1\"/>\n"
539 " <StateTemplateVariable objectReference=\"ModelValue_0\"/>\n"
540 " <StateTemplateVariable objectReference=\"Compartment_0\"/>\n"
541 " </StateTemplate>\n"
542 " <InitialState type=\"initialState\">\n"
543 " 0 6.022141500000001e+19 6.022141500000001e+19 0.1 1\n"
549 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
550 "<!-- generated with COPASI 4.4.29 (Debug) (http://www.copasi.org) at 2009-01-21 19:51:24 UTC -->\n"
551 "<COPASI xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"http://www.copasi.org/static/schema.xsd\" versionMajor=\"1\" versionMinor=\"0\" versionDevel=\"29\">\n"
552 " <ListOfFunctions>\n"
553 " <Function key=\"Function_13\" name=\"Mass action (irreversible)\" type=\"MassAction\" reversible=\"false\">\n"
555 " k1*PRODUCT<substrate_i>\n"
557 " <ListOfParameterDescriptions>\n"
558 " <ParameterDescription key=\"FunctionParameter_81\" name=\"k1\" order=\"0\" role=\"constant\"/>\n"
559 " <ParameterDescription key=\"FunctionParameter_79\" name=\"substrate\" order=\"1\" role=\"substrate\"/>\n"
560 " </ListOfParameterDescriptions>\n"
562 " </ListOfFunctions>\n"
563 " <Model key=\"Model_1\" name=\"New Model\" timeUnit=\"s\" volumeUnit=\"ml\" quantityUnit=\"mmol\" type=\"deterministic\">\n"
565 " <body xmlns=\"http://www.w3.org/1999/xhtml\">\n"
569 " <ListOfCompartments>\n"
570 " <Compartment key=\"Compartment_0\" name=\"compartment\" simulationType=\"fixed\">\n"
572 " </ListOfCompartments>\n"
573 " <ListOfMetabolites>\n"
574 " <Metabolite key=\"Metabolite_0\" name=\"A\" simulationType=\"reactions\" compartment=\"Compartment_0\">\n"
576 " <Metabolite key=\"Metabolite_1\" name=\"B\" simulationType=\"reactions\" compartment=\"Compartment_0\">\n"
578 " </ListOfMetabolites>\n"
579 " <ListOfModelValues>\n"
580 " <ModelValue key=\"ModelValue_0\" name=\"K\" simulationType=\"fixed\">\n"
582 " </ListOfModelValues>\n"
583 " <ListOfReactions>\n"
584 " <Reaction key=\"Reaction_0\" name=\"reaction\" reversible=\"false\">\n"
585 " <ListOfSubstrates>\n"
586 " <Substrate metabolite=\"Metabolite_0\" stoichiometry=\"1\"/>\n"
587 " </ListOfSubstrates>\n"
588 " <ListOfProducts>\n"
589 " <Product metabolite=\"Metabolite_1\" stoichiometry=\"1\"/>\n"
590 " </ListOfProducts>\n"
591 " <ListOfConstants>\n"
592 " <Constant key=\"Parameter_81\" name=\"k1\" value=\"0.1\"/>\n"
593 " </ListOfConstants>\n"
594 " <KineticLaw function=\"Function_13\">\n"
595 " <ListOfCallParameters>\n"
596 " <CallParameter functionParameter=\"FunctionParameter_81\">\n"
597 " <SourceParameter reference=\"Parameter_81\"/>\n"
598 " </CallParameter>\n"
599 " <CallParameter functionParameter=\"FunctionParameter_79\">\n"
600 " <SourceParameter reference=\"Metabolite_0\"/>\n"
601 " </CallParameter>\n"
602 " </ListOfCallParameters>\n"
605 " </ListOfReactions>\n"
607 " <StateTemplateVariable objectReference=\"Model_1\"/>\n"
608 " <StateTemplateVariable objectReference=\"Metabolite_0\"/>\n"
609 " <StateTemplateVariable objectReference=\"Metabolite_1\"/>\n"
610 " <StateTemplateVariable objectReference=\"ModelValue_0\"/>\n"
611 " <StateTemplateVariable objectReference=\"Compartment_0\"/>\n"
612 " </StateTemplate>\n"
613 " <InitialState type=\"initialState\">\n"
614 " 0 6.022141500000001e+19 6.022141500000001e+19 0.1 1\n"
SBMLDocument * getCurrentSBMLDocument()
std::string exportSBMLToString(CProcessReport *pExportHandler, int sbmlLevel, int sbmlVersion)
bool load_cps_model_from_stream(std::istream &is, CCopasiDataModel &dataModel)
static const char * MODEL_STRING3
static const char * MODEL_STRING1
static CCopasiDataModel * addDatamodel()
static CCopasiDataModel * pCOPASIDATAMODEL
static void init(int argc, char *argv[], const bool &withGui=false)
static const char * MODEL_STRING2