这篇教程C++ CCopasiMessage函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CCopasiMessage函数的典型用法代码示例。如果您正苦于以下问题:C++ CCopasiMessage函数的具体用法?C++ CCopasiMessage怎么用?C++ CCopasiMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CCopasiMessage函数的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CCopasiMessagebool CEFMMethod::initialize(){ CEFMTask * pTask = dynamic_cast< CEFMTask * >(getObjectParent()); if (pTask == NULL) { CCopasiMessage(CCopasiMessage::ERROR, MCEFMAnalysis + 1); return false; } CEFMProblem * pProblem = dynamic_cast< CEFMProblem *>(pTask->getProblem()); if (pProblem == NULL) { CCopasiMessage(CCopasiMessage::ERROR, MCEFMAnalysis + 2); return false; } mpFluxModes = & pProblem->getFluxModes(); mpReorderedReactions = & pProblem->getReorderedReactions(); mpReorderedReactions->clear(); mpFluxModes->clear(); return true;}
开发者ID:jonasfoe,项目名称:COPASI,代码行数:26,
示例2: assert//virtualbool CLyapWolfMethod::isValidProblem(const CCopasiProblem * pProblem){ if (!CLyapMethod::isValidProblem(pProblem)) return false; const CLyapProblem * pLP = dynamic_cast<const CLyapProblem *>(pProblem); assert(pLP); C_FLOAT64 stepSize = getValue< C_FLOAT64 >("Orthonormalization Interval"); C_FLOAT64 transientTime = pLP->getTransientTime(); C_FLOAT64 endTime = getValue< C_FLOAT64 >("Overall time"); if (transientTime >= endTime) { // CCopasiMessage(CCopasiMessage::EXCEPTION, MCLyap + 4); return false; } if (stepSize > (endTime - transientTime)) { // CCopasiMessage(CCopasiMessage::EXCEPTION, MCLyap + 5); return false; } return true;}
开发者ID:jonasfoe,项目名称:COPASI,代码行数:28,
示例3: switch// virtualCXMLHandler * ReactionGlyphHandler::processStart(const XML_Char * pszName, const XML_Char ** papszAttrs){ CXMLHandler * pHandlerToCall = NULL; switch (mCurrentElement.first) { case ReactionGlyph: { //workload const char * key; const char * name; const char * reaction; key = mpParser->getAttributeValue("key", papszAttrs); name = mpParser->getAttributeValue("name", papszAttrs); reaction = mpParser->getAttributeValue("reaction", papszAttrs, false); mpData->pReactionGlyph = new CLReactionGlyph(name); const char * objectRole = mpParser->getAttributeValue("objectRole", papszAttrs, false); if (objectRole != NULL && objectRole[0] != 0) { mpData->pReactionGlyph->setObjectRole(objectRole); } if (reaction && reaction[0]) { CReaction * pReaction = dynamic_cast< CReaction * >(mpData->mKeyMap.get(reaction)); if (!pReaction) { CCopasiMessage(CCopasiMessage::WARNING, MCXML + 19, "ReactionGlyph" , key); } else { mpData->pReactionGlyph->setModelObjectKey(pReaction->getKey()); } } mpData->pCurrentLayout->addReactionGlyph(mpData->pReactionGlyph); addFix(key, mpData->pReactionGlyph); } break; case BoundingBox: case Curve: case ListOfMetaboliteReferenceGlyphs: pHandlerToCall = getHandler(mCurrentElement.second); break; default: CCopasiMessage(CCopasiMessage::EXCEPTION, MCXML + 2, mpParser->getCurrentLineNumber(), mpParser->getCurrentColumnNumber(), pszName); break; } return pHandlerToCall;}
开发者ID:copasi,项目名称:COPASI,代码行数:59,
示例4: CCopasiMessage//virtualbool CTrajectoryMethodDsaLsodar::isValidProblem(const CCopasiProblem * pProblem){ if (!CTrajectoryMethod::isValidProblem(pProblem)) return false; const CTrajectoryProblem * pTP = dynamic_cast<const CTrajectoryProblem *>(pProblem); if (pTP->getDuration() < 0.0) { //back integration not possible CCopasiMessage(CCopasiMessage::ERROR, MCTrajectoryMethod + 9); return false; } //events are not supported at the moment if (mpContainer->getEvents().size() > 0) { CCopasiMessage(CCopasiMessage::ERROR, MCTrajectoryMethod + 23); return false; } //TODO: rewrite CModel::suitableForStochasticSimulation() to use // CCopasiMessage std::string message = mpContainer->getModel().suitableForStochasticSimulation(); if (message != "") { //model not suitable, message describes the problem CCopasiMessage(CCopasiMessage::ERROR, message.c_str()); return false; } /* Lower Limit, Upper Limit */ *mpLowerLimit = getValue< C_FLOAT64 >("Lower Limit"); *mpUpperLimit = getValue< C_FLOAT64 >("Upper Limit"); if (*mpLowerLimit > *mpUpperLimit) { CCopasiMessage(CCopasiMessage::ERROR, MCTrajectoryMethod + 4, *mpLowerLimit, *mpUpperLimit); return false; } /* Partitioning Interval */ // nothing to be done here so far /* Use Random Seed */ // should be checked in the widget later on /* Random Seed */ // nothing to be done here return true;}
开发者ID:copasi,项目名称:COPASI,代码行数:53,
示例5: fabsbool CTSSATask::processStep(const C_FLOAT64 & nextTime){ C_FLOAT64 CompareTime = nextTime - 100.0 * fabs(nextTime) * std::numeric_limits< C_FLOAT64 >::epsilon(); if (*mpCurrentTime <= CompareTime) { do { mpTSSAMethod->step(nextTime - *mpCurrentTime); if (*mpCurrentTime > CompareTime) break; /* Here we will do conditional event processing */ /* Currently this is correct since no events are processed. */ CCopasiMessage(CCopasiMessage::EXCEPTION, MCTSSAMethod + 3); } while (true); mpTSSAProblem->getModel()->setState(*mpCurrentState); mpTSSAProblem->getModel()->updateSimulatedValues(true); return true; } CompareTime = nextTime + 100.0 * fabs(nextTime) * std::numeric_limits< C_FLOAT64 >::epsilon(); if (*mpCurrentTime >= CompareTime) { do { mpTSSAMethod->step(nextTime - *mpCurrentTime); if (*mpCurrentTime < CompareTime) break; /* Here we will do conditional event processing */ /* Currently this is correct since no events are processed. */ CCopasiMessage(CCopasiMessage::EXCEPTION, MCTSSAMethod + 3); } while (true); mpTSSAProblem->getModel()->setState(*mpCurrentState); mpTSSAProblem->getModel()->updateSimulatedValues(true); return true; } // Current time is approximately nextTime; return false;}
开发者ID:nabel,项目名称:copasi-simple-api,代码行数:51,
示例6: switchvoid CCopasiXMLParser::ModelParameterGroupElement::end(const XML_Char *pszName){ switch (mCurrentElement) { case ModelParameterGroup: if (strcmp(pszName, "ModelParameterGroup")) CCopasiMessage(CCopasiMessage::EXCEPTION, MCXML + 11, pszName, "ModelParameterGroup", mParser.getCurrentLineNumber()); mCommon.pCurrentModelParameter = mCommon.ModelParameterGroupStack.top(); mCommon.ModelParameterGroupStack.pop(); mParser.popElementHandler(); mLastKnownElement = START_ELEMENT; /* Tell the parent element we are done. */ mParser.onEndElement(pszName); break; case Content: if (strcmp(pszName, "ModelParameterGroup") && strcmp(pszName, "ModelParameter")) { CCopasiMessage(CCopasiMessage::EXCEPTION, MCXML + 11, pszName, "ModelParameterGroup or ModelParameter", mParser.getCurrentLineNumber()); } if (mCommon.pCurrentModelParameter != NULL) { mCommon.ModelParameterGroupStack.top()->add(mCommon.pCurrentModelParameter); mCommon.pCurrentModelParameter = NULL; } // Content may be repeated therefore we set to the previous element which is ModelParameterGroup. mCurrentElement = mLastKnownElement = ModelParameterGroup; break; case UNKNOWN_ELEMENT: mCurrentElement = mLastKnownElement; break; default: CCopasiMessage(CCopasiMessage::EXCEPTION, MCXML + 11, pszName, "???", mParser.getCurrentLineNumber()); break; } return;}
开发者ID:jonasfoe,项目名称:COPASI,代码行数:51,
示例7: CCopasiMessage//virtualbool CTauLeapMethod::isValidProblem(const CCopasiProblem * pProblem){ if (!CTrajectoryMethod::isValidProblem(pProblem)) return false; const CTrajectoryProblem * pTP = dynamic_cast<const CTrajectoryProblem *>(pProblem); if (pTP->getDuration() < 0.0) { //back integration not possible CCopasiMessage(CCopasiMessage::ERROR, MCTrajectoryMethod + 9); return false; } if (mpContainer->getReactions().size() < 1) { //at least one reaction necessary CCopasiMessage(CCopasiMessage::ERROR, MCTrajectoryMethod + 17); return false; } //check for ODE rules if (mpContainer->getCountODEs() > 0) { //ode rule found CCopasiMessage(CCopasiMessage::ERROR, MCTrajectoryMethod + 28); return false; } //events are not supported at the moment if (mpContainer->getEvents().size() > 0) { CCopasiMessage(CCopasiMessage::ERROR, MCTrajectoryMethod + 23); return false; } //TODO: rewrite CModel::suitableForStochasticSimulation() to use // CCopasiMessage std::string message = mpContainer->getModel().suitableForStochasticSimulation(); if (message != "") { //model not suitable, message describes the problem CCopasiMessage(CCopasiMessage::ERROR, message.c_str()); return false; } return true;}
开发者ID:jonasfoe,项目名称:COPASI,代码行数:49,
示例8: whileCTrajectoryMethod::Status CTauLeapMethod::step(const double & deltaT){ // do several steps C_FLOAT64 Time = mpCurrentState->getTime(); C_FLOAT64 EndTime = Time + deltaT; size_t Steps = 0; while (Time < EndTime) { mMethodState.setTime(Time); mpModel->setState(mMethodState); mpModel->updateSimulatedValues(false); // We do not need to update the the method state since the only independent state // values are species of type reaction which are all controlled by the method. Time += doSingleStep(EndTime - Time); if (++Steps > mMaxSteps) { CCopasiMessage(CCopasiMessage::EXCEPTION, MCTrajectoryMethod + 12); } } *mpCurrentState = mpProblem->getModel()->getState(); mpCurrentState->setTime(Time); return NORMAL;}
开发者ID:PriKalra,项目名称:COPASI,代码行数:30,
示例9: whileCTrajectoryMethod::Status CStochDirectMethod::step(const double & deltaT){ C_FLOAT64 EndTime = *mpContainerStateTime + deltaT; if (mTargetTime != EndTime) { // We have a new end time and reset the root counter. mTargetTime = EndTime; mSteps = 0; } while (*mpContainerStateTime < EndTime) { // The Container State Time is updated during the reaction firing or root interpolation doSingleStep(*mpContainerStateTime, EndTime); if (mStatus == ROOT || (mNumRoot > 0 && checkRoots())) { return ROOT; } if (mpProblem->getAutomaticStepSize()) { break; } if (++mSteps > mMaxSteps) { CCopasiMessage(CCopasiMessage::EXCEPTION, MCTrajectoryMethod + 12); } } return NORMAL;}
开发者ID:jonasfoe,项目名称:COPASI,代码行数:35,
示例10: CCopasiMessage// staticvoid CRDFParser::ErrorHandler(void *, raptor_locator * pLocator, const char * message){ CCopasiMessage(CCopasiMessage::ERROR, MCMiriam + 1, raptor_locator_line(pLocator), raptor_locator_column(pLocator), message);}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:8,
示例11: getObjectDataModelbool CReportDefinition::preCompileTable(const std::vector< CCopasiContainer * > & listOfContainer){ bool success = true; mHeaderVector.clear(); mBodyVector.clear(); mFooterVector.clear(); std::vector<CRegisteredObjectName>::const_iterator it = mTableVector.begin(); std::vector<CRegisteredObjectName>::const_iterator end = mTableVector.end(); CCopasiDataModel* pDataModel = getObjectDataModel(); CCopasiObject * pObject; for (; it != end; ++it) { pObject = pDataModel->ObjectFromName(listOfContainer, *it); if (pObject != NULL) { addTableElement(pObject); } else { CCopasiMessage(CCopasiMessage::WARNING, MCCopasiTask + 6, it->c_str()); } } return success;}
开发者ID:ShuoLearner,项目名称:COPASI,代码行数:30,
示例12: imageCLTextureSpec* CQQtImageTexturizer::create_texture_for_image(const std::string& filename, const char* format){ CLTextureSpec* pResult = NULL; // use UTF8 strings for filenames since this seems to be safer across platforms QImage image(FROM_UTF8(filename), format); if (!image.isNull()) { image = image.mirrored(); QImage glImage = QGLWidget::convertToGLFormat(image); pResult = new CLTextureSpec; pResult->mTextureWidth = pResult->mTextWidth = glImage.width(); pResult->mTextureHeight = pResult->mTextHeight = glImage.height(); pResult->mNumComponents = 4; glGenTextures(1, &pResult->mTextureName); assert(pResult->mTextureName != 0); glBindTexture(GL_TEXTURE_2D, pResult->mTextureName); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)pResult->mTextureWidth, (GLsizei)pResult->mTextureHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, glImage.bits()); } else { CCopasiMessage(CCopasiMessage::ERROR, MCLayout + 1, filename.c_str()); } return pResult;}
开发者ID:jonasfoe,项目名称:COPASI,代码行数:31,
示例13: CCopasiMessage// make to support parallel tasksvoid CReport::generateObjectsFromName(const CObjectInterface::ContainerList & listOfContainer, std::vector< CObjectInterface * > & objectList, CReport *& pReport, const std::vector<CRegisteredObjectName>* nameVector){ objectList.clear(); unsigned C_INT32 i; CObjectInterface * pObjectInterface; CReportDefinition * pReportDefinition; for (i = 0; i < nameVector->size(); i++) { pObjectInterface = CObjectInterface::GetObjectFromCN(listOfContainer, (*nameVector)[i]); if (pObjectInterface == NULL) { CCopasiMessage(CCopasiMessage::WARNING, MCCopasiTask + 6, (*nameVector)[i].c_str()); continue; } if (!i && (pReportDefinition = dynamic_cast< CReportDefinition * >(pObjectInterface)) != NULL) { pReport = new CReport(); pReport->setReportDefinition(pReportDefinition); return; } mObjects.insert(pObjectInterface); objectList.push_back(pObjectInterface); }}
开发者ID:jonasfoe,项目名称:COPASI,代码行数:34,
示例14: switch// virtualCXMLHandler * SubstrateHandler::processStart(const XML_Char * pszName, const XML_Char ** papszAttrs){ const char * Metabolite; CMetab * pMetabolite; const char * Stoichiometry; switch (mCurrentElement.first) { case Substrate: Metabolite = mpParser->getAttributeValue("metabolite", papszAttrs); Stoichiometry = mpParser->getAttributeValue("stoichiometry", papszAttrs); pMetabolite = dynamic_cast< CMetab * >(mpData->mKeyMap.get(Metabolite)); if (!pMetabolite) fatalError(); mpData->pReaction->addSubstrate(pMetabolite->getKey(), CCopasiXMLInterface::DBL(Stoichiometry)); break; default: CCopasiMessage(CCopasiMessage::EXCEPTION, MCXML + 2, mpParser->getCurrentLineNumber(), mpParser->getCurrentColumnNumber(), pszName); break; } return NULL;}
开发者ID:copasi,项目名称:COPASI,代码行数:30,
示例15: switch// virtualbool ReportDefinitionHandler::processEnd(const XML_Char * pszName){ bool finished = false; switch (mCurrentElement.first) { case ReportDefinition: finished = true; break; case Comment: // check parameter type CCopasiStaticString mpData->pReport->setComment(mpData->CharacterData); mpData->CharacterData = ""; break; case Table: case Header: case Body: case Footer: break; default: CCopasiMessage(CCopasiMessage::EXCEPTION, MCXML + 2, mpParser->getCurrentLineNumber(), mpParser->getCurrentColumnNumber(), pszName); break; } return finished;}
开发者ID:copasi,项目名称:COPASI,代码行数:31,
示例16: CCopasiMessagevoid CTrajectoryTask::processStart(const bool & useInitialValues){ if (useInitialValues) { if (mpTrajectoryProblem->getStartInSteadyState()) { if (!mpSteadyState->process(true)) { CCopasiMessage(CCopasiMessage::ERROR, "Steady state could not be reached."); } mpSteadyState->getObjectDataModel()->getModel()->setTime(0); } else { mpTrajectoryProblem->getModel()->applyInitialValues(); } } *mpCurrentState = mpTrajectoryProblem->getModel()->getState(); mpTrajectoryMethod->setCurrentState(mpCurrentState); mpTrajectoryMethod->start(mpCurrentState); return;}
开发者ID:PriKalra,项目名称:COPASI,代码行数:26,
示例17: while// virtualCTrajectoryMethod::Status CTrajectoryMethodDsaLsodar::step(const double & deltaT, const bool & /* final */){ // do several steps: C_FLOAT64 Time = *mpContainerStateTime; C_FLOAT64 EndTime = Time + deltaT; C_FLOAT64 Tolerance = 100.0 * (fabs(EndTime) * std::numeric_limits< C_FLOAT64 >::epsilon() + std::numeric_limits< C_FLOAT64 >::min()); size_t Steps = 0; while (fabs(Time - EndTime) > Tolerance) { Time += doSingleStep(Time, EndTime); *mpContainerStateTime = Time; if (mStatus != CTrajectoryMethod::NORMAL) { break; } if (++Steps > *mpMaxSteps) { CCopasiMessage(CCopasiMessage::EXCEPTION, MCTrajectoryMethod + 12); } } return mStatus;}
开发者ID:copasi,项目名称:COPASI,代码行数:30,
示例18: whileCTrajectoryMethod::Status CTauLeapMethod::step(const double & deltaT){ // do several steps C_FLOAT64 Time = *mpContainerStateTime; C_FLOAT64 EndTime = Time + deltaT; size_t Steps = 0; while (Time < EndTime) { // We do not need to update the the method state since the only independent state // values are species of type reaction which are all controlled by the method. Time += doSingleStep(EndTime - Time); *mpContainerStateTime = Time; mpContainer->updateSimulatedValues(false); if (++Steps > mMaxSteps) { CCopasiMessage(CCopasiMessage::EXCEPTION, MCTrajectoryMethod + 12); } if (mpProblem->getAutomaticStepSize()) break; } return NORMAL;}
开发者ID:jonasfoe,项目名称:COPASI,代码行数:27,
示例19: doSingleStepCTrajectoryMethod::Status CHybridMethod::step(const double & deltaT){ // write the current state to the model // mpProblem->getModel()->setState(mpCurrentState); // is that correct? // check for possible overflows size_t i; // do several steps C_FLOAT64 time = *mpContainerStateTime; C_FLOAT64 endTime = time + deltaT; for (i = 0; ((i < mMaxSteps) && (time < endTime)); i++) { time = doSingleStep(time, endTime); } *mpContainerStateTime = time; mpContainer->updateSimulatedValues(false); if ((i >= mMaxSteps) && (!mMaxStepsReached)) { mMaxStepsReached = true; //only report this message once CCopasiMessage(CCopasiMessage::WARNING, "maximum number of reaction events was reached in at least one simulation step./nThat means time intervals in the output may not be what you requested."); } return NORMAL;}
开发者ID:jonasfoe,项目名称:COPASI,代码行数:28,
示例20: fatalErrorvoid CModelAdd::simpleCall(){ if (!mpModel) { fatalError(); } if (!mmModel) { fatalError(); } keyMap[mmModel->getKey()] = mpModel->getKey(); std::string name = "model_2"; // temporary we do not take care about naming conflicts. // : "model_2" is the appendix for the names of compartments and reactions, // comming form the second model bool progress = addCompartments(name) && addMetabolites(name) && addModelValues(name) && addCompartmentsExpressions() && addMetabolitesExpressions() && addModelValuesExpressions() && addReactions(name) && addEvents(name); if (!progress) { CCopasiMessage(CCopasiMessage::ERROR, MCModelMerging + 1); return; } mpModel->compileIfNecessary(NULL);}
开发者ID:jonasfoe,项目名称:COPASI,代码行数:35,
示例21: toEnumbool CQExperimentData::saveTable(CExperiment * pExperiment){ CExperimentObjectMap & ObjectMap = pExperiment->getObjectMap(); size_t i, imax = mpTable->rowCount(); bool FoundTime = false; bool Changed = false; ObjectMap.setNumCols(imax); for (i = 0; i < imax; i++) { CExperiment::Type Type = toEnum(TO_UTF8(mpTable->item((int) i, COL_TYPE)->text()), CExperiment::TypeName, CExperiment::ignore); if (Type == CExperiment::time) FoundTime = true; if (ObjectMap.getRole(i) != Type) { ObjectMap.setRole(i, Type); Changed = true; } if (ObjectMap.getObjectCN(i) != TO_UTF8(mpTable->item((int) i, COL_OBJECT_HIDDEN)->text())) { ObjectMap.setObjectCN(i, TO_UTF8(mpTable->item((int) i, COL_OBJECT_HIDDEN)->text())); Changed = true; } QString ScaleText = mpTable->item((int) i, COL_SCALE)->text(); // Empty fields are treated as default. if (ScaleText == "") ScaleText = QString::number(std::numeric_limits<C_FLOAT64>::quiet_NaN()); if (Type == CExperiment::dependent && ScaleText[0] != '(' && QString::number(ObjectMap.getScale(i)) != ScaleText) { ObjectMap.setScale(i, ScaleText.toDouble()); Changed = true; } } pExperiment->updateFittedPoints(); if (!FoundTime && pExperiment->getExperimentType() == CCopasiTask::timeCourse && pExperiment == mpExperiment) { CCopasiMessage(CCopasiMessage::WARNING, MCFitting + 3, mpExperiment->getObjectName().c_str()); CQMessageBox::information(this, "Specification Error", FROM_UTF8(CCopasiMessage::getAllMessageText()), QMessageBox::Ok, QMessageBox::Ok); CCopasiMessage::clearDeque(); } return Changed;}
开发者ID:sachiinb,项目名称:COPASI,代码行数:59,
注:本文中的CCopasiMessage函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CD3DX12_HEAP_PROPERTIES函数代码示例 C++ CComVariant函数代码示例 |