std::string CEFMTask::getReactionEquation(const std::map< size_t, C_FLOAT64 >::const_iterator & itReaction) const { CEFMProblem * pProblem = static_cast<CEFMProblem *>(mpProblem); const CReaction * pReaction = pProblem->getReorderedReactions()[itReaction->first]; #ifdef COPASI_SSA if (mpMethod->getSubType() == CCopasiMethod::stoichiometricStabilityAnalysis) { CSSAMethod * method = static_cast<CSSAMethod *>(mpMethod); std::string retstring = getReactionEquationForward(index1, index2); if (pReaction->isReversible()) { if (method->isReactionReversed(pMethod->getFluxModes()[index1].getReactionIndex(index2))) retstring = getReactionEquationBackward(index1, index2); } return retstring; } else #endif //COPASI_SSA return CChemEqInterface::getChemEqString(mpProblem->getModel(), *pReaction, false); }
bool 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; }