279 CPPUNIT_ASSERT(result =
true);
284 CPPUNIT_ASSERT(
false);
288 CPPUNIT_ASSERT(pModel != NULL);
294 CPPUNIT_ASSERT(pReaction != NULL);
299 for (i = 0; i < iMax; ++i)
312 CPPUNIT_ASSERT(pConstParameter != NULL);
313 CPPUNIT_ASSERT(pNonConstParameter != NULL);
315 CPPUNIT_ASSERT(pReaction->getChemEq().getSubstrates().size() == 1);
316 CPPUNIT_ASSERT(pReaction->getChemEq().getProducts().size() == 1);
317 CPPUNIT_ASSERT(pReaction->getChemEq().getModifiers().size() == 0);
318 CPPUNIT_ASSERT(pReaction->isReversible() ==
false);
319 const CFunction* pKineticLaw = pReaction->getFunction();
320 CPPUNIT_ASSERT(pKineticLaw != NULL);
322 const std::vector< std::vector<std::string> > & parameterMappings = pReaction->getParameterMappings();
323 CPPUNIT_ASSERT(parameterMappings.size() == 2);
324 CPPUNIT_ASSERT(parameterMappings[0].size() == 1);
325 CPPUNIT_ASSERT(parameterMappings[0][0] == pConstParameter->
getKey());
326 CPPUNIT_ASSERT(parameterMappings[1].size() == 1);
327 std::string substrateKey = parameterMappings[1][0];
329 CPPUNIT_ASSERT(pTempObject != NULL);
330 const CMetab* pSubstrate =
dynamic_cast<const CMetab*
>(pTempObject);
331 CPPUNIT_ASSERT(pSubstrate != NULL);
334 CPPUNIT_ASSERT(pExpression != NULL);
336 CPPUNIT_ASSERT(pRoot != NULL);
339 CPPUNIT_ASSERT(pObjectNode != NULL);
341 std::vector<CCopasiContainer*> listOfContainers;
344 CPPUNIT_ASSERT(pObject != NULL);
350 std::ostringstream result;
359 std::vector<CRegisteredObjectName>* pHeader = pReport->
getHeaderAddr();
360 std::vector<CRegisteredObjectName>* pBody = pReport->
getBodyAddr();
401 TaskList.
remove(
"Time-Course");
402 TaskList.
add(pTrajectoryTask,
true);
407 pTrajectoryTask->
process(
true);
413 CPPUNIT_ASSERT(
false);
417 CPPUNIT_ASSERT(!result.str().empty());
418 std::string result_string = result.str();
419 std::string delimiter =
"\n";
420 std::string delimiter2 =
",";
421 std::size_t lastPos = result_string.find_first_not_of(delimiter);
423 std::string line, number_string;
424 unsigned int index = 0;
426 std::size_t lastPos2;
430 while (lastPos != std::string::npos)
432 pos = result_string.find_first_of(delimiter, lastPos);
433 line = result_string.substr(lastPos, pos - lastPos);
434 lastPos = result_string.find_first_not_of(delimiter, pos);
435 lastPos2 = line.find_first_not_of(delimiter2);
442 while (lastPos2 != std::string::npos)
444 pos2 = line.find_first_of(delimiter2, lastPos2);
445 number_string = line.substr(lastPos2, pos2 - lastPos2);
446 lastPos2 = line.find_first_not_of(delimiter2, pos2);
469 current =
strToDouble(number_string.c_str(), NULL);
470 CPPUNIT_ASSERT(fabs((current - last) / last) < 1e-20);
483 CPPUNIT_ASSERT(index > 1);
486 CPPUNIT_ASSERT(last < *pMethod->getParameter(
"Absolute Tolerance")->getValue().pDOUBLE);
const CExpression * getExpressionPtr() const
bool setValue(const CType &value)
void setScheduled(const bool &scheduled)
virtual bool initialize(const OutputFlag &of, COutputHandler *pOutputHandler, std::ostream *pOstream)
CCopasiProblem * getProblem()
virtual CCopasiObjectName getCN() const
bool setTaskType(const CCopasiTask::Type &taskType)
const CCopasiVector< CMetab > & getMetabolites() const
const std::string & getObjectName() const
const CCopasiVectorN< CModelValue > & getModelValues() const
virtual size_t size() const
const CRegisteredObjectName & getObjectCN() const
CCopasiObject * get(const std::string &key)
const Type & getType() const
const CCopasiReportSeparator & getSeparator() const
virtual bool process(const bool &useInitialValues)
void setDuration(const C_FLOAT64 &duration)
void setSeparator(const CCopasiReportSeparator &Separator)
void setIsTable(bool table)
virtual bool setModel(CModel *pModel)
const CReportDefinitionVector * getReportDefinitionList() const
void setInitialTime(const C_FLOAT64 &time)
const C_FLOAT64 & getInitialValue() const
static const char * MODEL_STRING5
static Type type(const Type &type)
virtual bool add(const CType &src)
virtual const std::string & getKey() const
void setTimeSeriesRequested(bool flag)
CCopasiVectorN< CCopasiTask > * getTaskList()
void setStepNumber(const unsigned C_INT32 &stepNumber)
CCopasiParameter * getParameter(const std::string &name)
CReportDefinition * createReportDefinition(const std::string &name, const std::string &comment)
virtual void remove(const std::string &name)
void setTarget(const std::string &target)
CCopasiVectorNS< CCompartment > & getCompartments()
CCopasiMethod * getMethod()
static CKeyFactory * getKeyFactory()
double strToDouble(const char *str, char const **pTail)
std::vector< CRegisteredObjectName > * getBodyAddr()
bool importSBMLFromString(const std::string &sbmlDocumentText, CProcessReport *pImportHandler=NULL, const bool &deleteOldData=true)
The class for handling a chemical kinetic function.
CCopasiVectorNS< CReaction > & getReactions()
static CCopasiDataModel * pCOPASIDATAMODEL
void setReportDefinition(CReportDefinition *reportDef)
CCopasiObject * ObjectFromName(const std::vector< CCopasiContainer * > &listOfContainer, const CCopasiObjectName &CN) const
virtual bool setMethodType(const int &type)
std::vector< CRegisteredObjectName > * getHeaderAddr()
CEvaluationNode * getRoot()
CCopasiContainer * getObjectParent() const