COPASI API  4.16.103
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
CMCAMethod Class Reference

#include <CMCAMethod.h>

Inheritance diagram for CMCAMethod:
Inheritance graph
[legend]
Collaboration diagram for CMCAMethod:
Collaboration graph
[legend]

Public Member Functions

bool CalculateMCA (C_FLOAT64 res)
 
bool calculateUnscaledConcentrationCC ()
 
void calculateUnscaledElasticities (C_FLOAT64 res)
 
bool calculateUnscaledFluxCC (const bool &status)
 
bool checkSummationTheorems (const C_FLOAT64 &resolution)
 
 CMCAMethod (const CCopasiContainer *pParent=NULL)
 
 CMCAMethod (const CMCAMethod &src, const CCopasiContainer *pParent=NULL)
 
virtual bool elevateChildren ()
 
const CModelgetModel () const
 
const CMatrix< C_FLOAT64 > & getScaledConcentrationCC () const
 
const CArrayAnnotationgetScaledConcentrationCCAnn () const
 
const CMatrix< C_FLOAT64 > & getScaledElasticities () const
 
const CArrayAnnotationgetScaledElasticitiesAnn () const
 
const CMatrix< C_FLOAT64 > & getScaledFluxCC () const
 
const CArrayAnnotationgetScaledFluxCCAnn () const
 
const
CSteadyStateMethod::ReturnCode
getSteadyStateStatus () const
 
const CMatrix< C_FLOAT64 > & getUnscaledConcentrationCC () const
 
const CArrayAnnotationgetUnscaledConcentrationCCAnn () const
 
const CMatrix< C_FLOAT64 > & getUnscaledElasticities () const
 
const CArrayAnnotationgetUnscaledElasticitiesAnn () const
 
const CMatrix< C_FLOAT64 > & getUnscaledFluxCC () const
 
const CArrayAnnotationgetUnscaledFluxCCAnn () const
 
virtual bool isValidProblem (const CCopasiProblem *pProblem)
 
C_INT32 load (CReadConfig &configBuffer)
 
virtual bool process ()
 
virtual void resizeAllMatrices ()
 
bool scaleMCA (const bool &status, C_FLOAT64 res)
 
void setFactor (C_FLOAT64 factor)
 
void setModel (CModel *model)
 
void setSteadyStateResolution (C_FLOAT64 factor)
 
void setSteadyStateTask (CSteadyStateTask *pSteadyStateTask)
 
virtual ~CMCAMethod ()
 
- Public Member Functions inherited from CCopasiMethod
 CCopasiMethod (const CCopasiMethod &src, const CCopasiContainer *pParent=NULL)
 
const CCopasiMethod::SubTypegetSubType () const
 
const CCopasiTask::TypegetType () const
 
virtual void load (CReadConfig &configBuffer, CReadConfig::Mode mode=CReadConfig::SEARCH)
 
virtual void print (std::ostream *ostream) const
 
virtual void printResult (std::ostream *ostream) const
 
virtual bool setCallBack (CProcessReport *pCallBack)
 
virtual ~CCopasiMethod ()
 
- Public Member Functions inherited from CCopasiParameterGroup
bool addGroup (const std::string &name)
 
bool addParameter (const CCopasiParameter &parameter)
 
bool addParameter (const std::string &name, const CCopasiParameter::Type type)
 
template<class CType >
bool addParameter (const std::string &name, const CCopasiParameter::Type type, const CType &value)
 
void addParameter (CCopasiParameter *pParameter)
 
CCopasiParameterGroupassertGroup (const std::string &name)
 
template<class CType >
CCopasiParameterassertParameter (const std::string &name, const CCopasiParameter::Type type, const CType &defaultValue)
 
index_iterator beginIndex () const
 
name_iterator beginName () const
 
 CCopasiParameterGroup (const CCopasiParameterGroup &src, const CCopasiContainer *pParent=NULL)
 
 CCopasiParameterGroup (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &objectType="ParameterGroup")
 
void clear ()
 
index_iterator endIndex () const
 
name_iterator endName () const
 
CCopasiParameterGroupgetGroup (const std::string &name)
 
const CCopasiParameterGroupgetGroup (const std::string &name) const
 
CCopasiParameterGroupgetGroup (const size_t &index)
 
const CCopasiParameterGroupgetGroup (const size_t &index) const
 
size_t getIndex (const std::string &name) const
 
std::string getKey (const std::string &name) const
 
std::string getKey (const size_t &index) const
 
virtual const std::string & getName (const size_t &index) const
 
virtual const CObjectInterfacegetObject (const CCopasiObjectName &cn) const
 
CCopasiParametergetParameter (const std::string &name)
 
const CCopasiParametergetParameter (const std::string &name) const
 
CCopasiParametergetParameter (const size_t &index)
 
const CCopasiParametergetParameter (const size_t &index) const
 
CCopasiParameter::Type getType (const std::string &name) const
 
CCopasiParameter::Type getType (const size_t &index) const
 
std::string getUniqueParameterName (const CCopasiParameter *pParameter) const
 
const CCopasiParameter::ValuegetValue (const std::string &name) const
 
const CCopasiParameter::ValuegetValue (const size_t &index) const
 
CCopasiParameter::ValuegetValue (const std::string &name)
 
CCopasiParameter::ValuegetValue (const size_t &index)
 
CCopasiParameterGroupoperator= (const CCopasiParameterGroup &rhs)
 
bool removeParameter (const std::string &name)
 
bool removeParameter (const size_t &index)
 
template<class CType >
bool setValue (const std::string &name, const CType &value)
 
template<class CType >
bool setValue (const size_t &index, const CType &value)
 
size_t size () const
 
bool swap (const size_t &iFrom, const size_t &iTo)
 
bool swap (index_iterator &from, index_iterator &to)
 
virtual ~CCopasiParameterGroup ()
 
- Public Member Functions inherited from CCopasiParameter
 CCopasiParameter (const CCopasiParameter &src, const CCopasiContainer *pParent=NULL)
 
 CCopasiParameter (const std::string &name, const Type &type, const void *pValue=NULL, const CCopasiContainer *pParent=NULL, const std::string &objectType="Parameter")
 
virtual CCopasiObjectName getCN () const
 
virtual const std::string & getKey () const
 
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
 
const CCopasiParameter::TypegetType () const
 
const ValuegetValue () const
 
ValuegetValue ()
 
virtual voidgetValuePointer () const
 
CCopasiObjectgetValueReference () const
 
bool isValidValue (const C_FLOAT64 &value) const
 
bool isValidValue (const C_INT32 &value) const
 
bool isValidValue (const unsigned C_INT32 &value) const
 
bool isValidValue (const bool &value) const
 
bool isValidValue (const std::string &value) const
 
bool isValidValue (const CCopasiObjectName &value) const
 
bool isValidValue (const std::vector< CCopasiParameter * > &value) const
 
CCopasiParameteroperator= (const CCopasiParameter &rhs)
 
template<class CType >
bool setValue (const CType &value)
 
bool setValue (const std::vector< CCopasiParameter * > &value)
 
virtual ~CCopasiParameter ()
 
- Public Member Functions inherited from CCopasiContainer
virtual bool add (CCopasiObject *pObject, const bool &adopt=true)
 
 CCopasiContainer (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=CCopasiObject::Container)
 
 CCopasiContainer (const CCopasiContainer &src, const CCopasiContainer *pParent=NULL)
 
virtual std::string getChildObjectUnits (const CCopasiObject *pObject) const
 
virtual const objectMapgetObjects () const
 
virtual std::string getUnits () const
 
virtual const CCopasiObjectgetValueObject () const
 
virtual bool remove (CCopasiObject *pObject)
 
virtual ~CCopasiContainer ()
 
- Public Member Functions inherited from CCopasiObject
void addDirectDependency (const CCopasiObject *pObject)
 
 CCopasiObject (const CCopasiObject &src, const CCopasiContainer *pParent=NULL)
 
void clearDirectDependencies ()
 
void clearRefresh ()
 
bool dependsOn (DataObjectSet candidates, const DataObjectSet &context=DataObjectSet()) const
 
void getAllDependencies (DataObjectSet &dependencies, const DataObjectSet &context) const
 
virtual const DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) const
 
CCopasiContainergetObjectAncestor (const std::string &type) const
 
CCopasiDataModelgetObjectDataModel ()
 
const CCopasiDataModelgetObjectDataModel () const
 
const std::string & getObjectName () const
 
CCopasiContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const
CObjectInterface::ObjectSet
getPrerequisites () const
 
virtual RefreshgetRefresh () const
 
UpdateMethodgetUpdateMethod () const
 
bool hasCircularDependencies (DataObjectSet &candidates, DataObjectSet &verified, const DataObjectSet &context) const
 
bool hasUpdateMethod () const
 
bool isArray () const
 
bool isContainer () const
 
bool isDataModel () const
 
bool isMatrix () const
 
bool isNameVector () const
 
bool isNonUniqueName () const
 
virtual bool isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const
 
bool isReference () const
 
bool isRoot () const
 
bool isSeparator () const
 
bool isStaticString () const
 
bool isValueBool () const
 
bool isValueDbl () const
 
bool isValueInt () const
 
bool isValueInt64 () const
 
bool isValueString () const
 
bool isVector () const
 
virtual bool mustBeDeleted (const DataObjectSet &deletedObjects) const
 
void removeDirectDependency (const CCopasiObject *pObject)
 
void setDirectDependencies (const DataObjectSet &directDependencies)
 
bool setObjectName (const std::string &name)
 
virtual bool setObjectParent (const CCopasiContainer *pParent)
 
void setObjectValue (const C_FLOAT64 &value)
 
void setObjectValue (const C_INT32 &value)
 
void setObjectValue (const bool &value)
 
template<class CType >
void setRefresh (CType *pType, void(CType::*method)(void))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_FLOAT64 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_INT32 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const bool &))
 
virtual ~CCopasiObject ()
 
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
 
virtual ~CObjectInterface ()
 

Static Public Member Functions

static CMCAMethodcreateMethod (CCopasiMethod::SubType subType=CCopasiMethod::mcaMethodReder)
 
- Static Public Member Functions inherited from CCopasiObject
static std::vector< Refresh * > buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet())
 
static void setRenameHandler (CRenameHandler *rh)
 

Private Member Functions

bool createLinkMatrix (const bool &useSmallbone=false)
 
void initializeParameter ()
 
void initObjects ()
 

Private Attributes

CMatrix< bool > mElasticityDependencies
 
C_FLOAT64 mFactor
 
CLinkMatrix mLinkZero
 
CModelmpModel
 
CSteadyStateTaskmpSteadyStateTask
 
bool * mpUseReeder
 
bool * mpUseSmallbone
 
CMatrix< C_FLOAT64mReducedStoichiometry
 
CMatrix< C_FLOAT64mScaledConcCC
 
CArrayAnnotationmScaledConcCCAnn
 
CMatrix< C_FLOAT64mScaledElasticities
 
CArrayAnnotationmScaledElasticitiesAnn
 
CMatrix< C_FLOAT64mScaledFluxCC
 
CArrayAnnotationmScaledFluxCCAnn
 
C_INT16 mSSReder
 
CSteadyStateMethod::ReturnCode mSSStatus
 
std::vector< C_FLOAT64mSsx
 
C_FLOAT64 mSteadyStateResolution
 
CMatrix< C_FLOAT64mUnscaledConcCC
 
CArrayAnnotationmUnscaledConcCCAnn
 
CMatrix< C_FLOAT64mUnscaledElasticities
 
CArrayAnnotationmUnscaledElasticitiesAnn
 
CMatrix< C_FLOAT64mUnscaledFluxCC
 
CArrayAnnotationmUnscaledFluxCCAnn
 

Additional Inherited Members

- Public Types inherited from CCopasiMethod
enum  SubType {
  unset = 0, RandomSearch, RandomSearchMaster, SimulatedAnnealing,
  CoranaWalk, DifferentialEvolution, ScatterSearch, GeneticAlgorithm,
  EvolutionaryProgram, SteepestDescent, HybridGASA, GeneticAlgorithmSR,
  HookeJeeves, LevenbergMarquardt, NelderMead, SRES,
  Statistics, ParticleSwarm, Praxis, TruncatedNewton,
  Newton, deterministic, LSODAR, directMethod,
  stochastic, tauLeap, adaptiveSA, hybrid,
  hybridLSODA, hybridODE45, DsaLsodar, tssILDM,
  tssILDMModified, tssCSP, mcaMethodReder, scanMethod,
  lyapWolf, sensMethod, EFMAlgorithm, EFMBitPatternTreeAlgorithm,
  EFMBitPatternAlgorithm, Householder, crossSectionMethod, linearNoiseApproximation
}
 
- Public Types inherited from CCopasiParameterGroup
typedef parameterGroup::iterator index_iterator
 
typedef
CCopasiContainer::objectMap::iterator 
name_iterator
 
typedef std::vector
< CCopasiParameter * > 
parameterGroup
 
- Public Types inherited from CCopasiParameter
enum  Type {
  DOUBLE = 0, UDOUBLE, INT, UINT,
  BOOL, GROUP, STRING, CN,
  KEY, FILE, EXPRESSION, INVALID
}
 
- Public Types inherited from CCopasiContainer
typedef std::multimap
< std::string, CCopasiObject * > 
objectMap
 
- Public Types inherited from CCopasiObject
typedef std::set< const
CCopasiObject * > 
DataObjectSet
 
typedef std::vector< Refresh * > DataUpdateSequence
 
- Public Types inherited from CObjectInterface
typedef std::set< const
CObjectInterface * > 
ObjectSet
 
typedef std::vector
< CObjectInterface * > 
UpdateSequence
 
- Static Public Attributes inherited from CCopasiMethod
static const std::string SubTypeName []
 
static const char * XMLSubType []
 
- Static Public Attributes inherited from CCopasiParameter
static const std::string TypeName []
 
static const char * XMLType []
 
- Static Public Attributes inherited from CCopasiContainer
static const std::vector
< CCopasiContainer * > 
EmptyList
 
- Protected Types inherited from CCopasiObject
enum  Flag {
  Container = 0x1, Vector = 0x2, Matrix = 0x4, NameVector = 0x8,
  Reference = 0x10, ValueBool = 0x20, ValueInt = 0x40, ValueInt64 = 0x80,
  ValueDbl = 0x100, NonUniqueName = 0x200, StaticString = 0x400, ValueString = 0x800,
  Separator = 0x1000, ModelEntity = 0x2000, Array = 0x4000, DataModel = 0x8000,
  Root = 0x10000, Gui = 0x20000
}
 
- Protected Member Functions inherited from CCopasiMethod
 CCopasiMethod (const CCopasiTask::Type &taskType, const SubType &subType, const CCopasiContainer *pParent=NULL)
 
- Protected Member Functions inherited from CCopasiParameterGroup
 CCopasiParameterGroup ()
 
- Protected Member Functions inherited from CCopasiContainer
template<class CType >
CCopasiObjectaddMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
void initObjects ()
 
- Protected Member Functions inherited from CCopasiObject
 CCopasiObject ()
 
 CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0)
 
- Protected Attributes inherited from CCopasiMethod
CProcessReportmpCallBack
 
- Protected Attributes inherited from CCopasiParameter
std::string mKey
 
CCopasiObjectmpValueReference
 
size_t mSize
 
Value mValue
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

Definition at line 27 of file CMCAMethod.h.

Constructor & Destructor Documentation

CMCAMethod::CMCAMethod ( const CCopasiContainer pParent = NULL)

Default constructor

Parameters
constCCopasiContainer * pParent (Default: NULL)

Default constructor

Definition at line 42 of file CMCAMethod.cpp.

References initializeParameter(), and initObjects().

Referenced by createMethod().

42  :
44  mpModel(NULL),
45  mpUseReeder(NULL),
46  mpUseSmallbone(NULL),
47  mFactor(1.0e-9),
48  mSteadyStateResolution(1.0e-9),
50  mpSteadyStateTask(NULL),
51  mLinkZero(),
54 {
56  initObjects();
57 }
CSteadyStateMethod::ReturnCode mSSStatus
Definition: CMCAMethod.h:217
CSteadyStateTask * mpSteadyStateTask
Definition: CMCAMethod.h:219
CLinkMatrix mLinkZero
Definition: CMCAMethod.h:221
void initObjects()
Definition: CMCAMethod.cpp:77
CMatrix< C_FLOAT64 > mReducedStoichiometry
Definition: CMCAMethod.h:223
bool * mpUseSmallbone
Definition: CMCAMethod.h:176
CMatrix< bool > mElasticityDependencies
Definition: CMCAMethod.h:225
CModel * mpModel
Definition: CMCAMethod.h:172
void initializeParameter()
Definition: CMCAMethod.cpp:138
bool * mpUseReeder
Definition: CMCAMethod.h:174
C_FLOAT64 mSteadyStateResolution
Definition: CMCAMethod.h:215
C_FLOAT64 mFactor
Definition: CMCAMethod.h:213
CMCAMethod::CMCAMethod ( const CMCAMethod src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters
constCMCAMethod & src
constCCopasiContainer * pParent (Default: NULL)

Definition at line 59 of file CMCAMethod.cpp.

References initializeParameter(), and initObjects().

60  :
61  CCopasiMethod(src, pParent),
62  mpModel(NULL),
63  mpUseReeder(NULL),
64  mpUseSmallbone(NULL),
65  mFactor(src.mFactor),
68  mpSteadyStateTask(NULL),
69  mLinkZero(src.mLinkZero),
72 {
74  initObjects();
75 }
CSteadyStateMethod::ReturnCode mSSStatus
Definition: CMCAMethod.h:217
CSteadyStateTask * mpSteadyStateTask
Definition: CMCAMethod.h:219
CLinkMatrix mLinkZero
Definition: CMCAMethod.h:221
void initObjects()
Definition: CMCAMethod.cpp:77
CMatrix< C_FLOAT64 > mReducedStoichiometry
Definition: CMCAMethod.h:223
bool * mpUseSmallbone
Definition: CMCAMethod.h:176
CMatrix< bool > mElasticityDependencies
Definition: CMCAMethod.h:225
CModel * mpModel
Definition: CMCAMethod.h:172
void initializeParameter()
Definition: CMCAMethod.cpp:138
bool * mpUseReeder
Definition: CMCAMethod.h:174
C_FLOAT64 mSteadyStateResolution
Definition: CMCAMethod.h:215
C_FLOAT64 mFactor
Definition: CMCAMethod.h:213
CMCAMethod::~CMCAMethod ( )
virtual

Destructor

Deconstructor

Definition at line 132 of file CMCAMethod.cpp.

References DESTRUCTOR_TRACE.

133 {
135  //delSsipvt();
136 }
#define DESTRUCTOR_TRACE
Definition: copasi.h:206

Member Function Documentation

bool CMCAMethod::CalculateMCA ( C_FLOAT64  res)

the steady state MCA entry point

Parameters
ss_solutionrefer to steady-state solution
referto the resolution

Definition at line 673 of file CMCAMethod.cpp.

References calculateUnscaledConcentrationCC(), calculateUnscaledElasticities(), calculateUnscaledFluxCC(), checkSummationTheorems(), createLinkMatrix(), CSteadyStateMethod::found, MCMCA, mpModel, mpUseReeder, mpUseSmallbone, mSSStatus, mUnscaledConcCC, mUnscaledFluxCC, scaleMCA(), and CCopasiMessage::WARNING.

Referenced by process().

674 {
675  bool success = true;
676  bool SummationTheoremsOK = false;
677 
678  assert(mpModel);
679 
681 
683  {
684  if (*mpUseReeder)
685  {
688  success &= calculateUnscaledFluxCC(success);
689  success &= scaleMCA(success, res);
690  SummationTheoremsOK = checkSummationTheorems(res);
691  }
692 
693  if (*mpUseSmallbone && !SummationTheoremsOK)
694  {
695  success = true;
696 
697  createLinkMatrix(true);
699  success &= calculateUnscaledFluxCC(success);
700  success &= scaleMCA(success, res);
701  SummationTheoremsOK = checkSummationTheorems(res);
702  }
703 
704  if (!SummationTheoremsOK)
705  {
707  }
708  }
709  else
710  {
711  mUnscaledConcCC = std::numeric_limits< C_FLOAT64 >::quiet_NaN();
712  mUnscaledFluxCC = std::numeric_limits< C_FLOAT64 >::quiet_NaN();
713  }
714 
715  return success;
716 }
CMatrix< C_FLOAT64 > mUnscaledConcCC
Definition: CMCAMethod.h:184
CSteadyStateMethod::ReturnCode mSSStatus
Definition: CMCAMethod.h:217
#define MCMCA
CMatrix< C_FLOAT64 > mUnscaledFluxCC
Definition: CMCAMethod.h:187
bool scaleMCA(const bool &status, C_FLOAT64 res)
Definition: CMCAMethod.cpp:440
bool checkSummationTheorems(const C_FLOAT64 &resolution)
Definition: CMCAMethod.cpp:598
bool createLinkMatrix(const bool &useSmallbone=false)
Definition: CMCAMethod.cpp:718
bool * mpUseSmallbone
Definition: CMCAMethod.h:176
void calculateUnscaledElasticities(C_FLOAT64 res)
Definition: CMCAMethod.cpp:203
CModel * mpModel
Definition: CMCAMethod.h:172
bool * mpUseReeder
Definition: CMCAMethod.h:174
bool calculateUnscaledConcentrationCC()
Definition: CMCAMethod.cpp:311
bool calculateUnscaledFluxCC(const bool &status)
Definition: CMCAMethod.cpp:403
bool CMCAMethod::calculateUnscaledConcentrationCC ( )

Definition at line 311 of file CMCAMethod.cpp.

References CVectorCore< CType >::array(), CMatrix< CType >::array(), C_FLOAT64, C_INT, dgemm_(), dgetrf_(), dgetri_(), CLinkMatrix::doColumnPivot(), K, CLinkMatrix::leftMultiply(), mLinkZero, mpModel, mReducedStoichiometry, mUnscaledConcCC, mUnscaledElasticities, CMatrix< CType >::numCols(), CMatrix< CType >::numRows(), CMatrix< CType >::resize(), CVector< CType >::resize(), CLinkMatrix::rightMultiply(), CLinkMatrix::undoColumnPivot(), and CLinkMatrix::undoRowPivot().

Referenced by CalculateMCA().

312 {
313  assert(mpModel);
314 
315  // TODO CRITICAL We must not use the reduced stoichiometry matrix
316  // Instead use N * mLinkZero
317 
318  // Calculate RedStoi * mUnscaledElasticities;
319  // Note the columns of mUnscaledElasticities must be reordered
320 
322 
323  // Initialize the unscaled concentration control coefficients to 0.0
324  mUnscaledConcCC = 0.0;
325 
326  // aux1 := mUnscaledElasticities * L
327  CMatrix<C_FLOAT64> aux1;
329 
330  // We can now undo the column pivoting
332 
333  assert(mReducedStoichiometry.numCols() == aux1.numRows());
334 
335  // aux2 := RedStoi * aux1
336  // DGEMM (TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
337  // C := alpha A B + beta C
339 
340  char TRANSA = 'N';
341  char TRANSB = 'N';
342  C_INT M = (C_INT) aux2.numCols(); /* LDA, LDC */
343  C_INT N = (C_INT) aux2.numRows();
345  C_FLOAT64 Alpha = 1.0;
346  C_INT LDA = (C_INT) aux1.numCols();
348  C_FLOAT64 Beta = 0.0;
349  C_INT LDC = (C_INT) aux2.numCols();
350 
351  dgemm_(&TRANSA, &TRANSB, &M, &N, &K, &Alpha, aux1.array(), &LDA,
352  mReducedStoichiometry.array(), &LDB, &Beta, aux2.array(), &LDC);
353 
354  // Invert aux2
355  C_INT info;
356  CVector<C_INT> Ipiv(M);
357 
358  // LU decomposition of aux2 (for inversion)
359  dgetrf_(&M, &M, aux2.array(), &M, Ipiv.array(), &info);
360 
361  if (info != 0) return false;
362 
363  C_INT lwork = -1; // Instruct dgetri_ to determine work array size.
364  CVector< C_FLOAT64 > work(1);
365 
366  dgetri_(&M, aux2.array(), &M, Ipiv.array(), work.array(), &lwork, &info);
367 
368  lwork = (C_INT) work[0];
369  work.resize(lwork);
370 
371  // now invert aux2 (result in aux2)
372  dgetri_(&M, aux2.array(), &M, Ipiv.array(), work.array(), &lwork, &info);
373 
374  if (info != 0) return false;
375 
376  // aux1 := -1.0 * aux2 * RedStoi
377 
378  aux1.resize(aux2.numRows(), mReducedStoichiometry.numCols());
379 
380  M = (C_INT) aux1.numCols();
381  N = (C_INT) aux1.numRows();
382  K = (C_INT) aux2.numCols();
383  Alpha = -1.0;
385  LDB = (C_INT) aux2.numCols();
386  Beta = 0.0;
387  LDC = (C_INT) aux1.numCols();
388 
389  // DGEMM (TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
390  // C := alpha A B + beta C
391  dgemm_(&TRANSA, &TRANSB, &M, &N, &K, &Alpha, mReducedStoichiometry.array(), &LDA,
392  aux2.array(), &LDB, &Beta, aux1.array(), &LDC);
393 
394  // mUnscaledConcCC := L * aux1
396 
397  // We need to swap the rows since they are with respect to reordered stoichiometry .
399 
400  return true;
401 }
int dgetrf_(integer *m, integer *n, doublereal *a, integer *lda, integer *ipiv, integer *info)
#define C_INT
Definition: copasi.h:115
CMatrix< C_FLOAT64 > mUnscaledConcCC
Definition: CMCAMethod.h:184
#define K
CLinkMatrix mLinkZero
Definition: CMCAMethod.h:221
virtual size_t numRows() const
Definition: CMatrix.h:138
bool leftMultiply(const CMatrix< C_FLOAT64 > &M, CMatrix< C_FLOAT64 > &P) const
bool rightMultiply(const C_FLOAT64 &alpha, const CMatrix< C_FLOAT64 > &M, CMatrix< C_FLOAT64 > &P) const
CMatrix< C_FLOAT64 > mReducedStoichiometry
Definition: CMCAMethod.h:223
int dgemm_(char *transa, char *transb, integer *m, integer *n, integer *k, doublereal *alpha, doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal *beta, doublereal *c, integer *ldc)
virtual void resize(size_t rows, size_t cols, const bool &copy=false)
Definition: CMatrix.h:151
bool doColumnPivot(CMatrix< C_FLOAT64 > &matrix) const
CMatrix< C_FLOAT64 > mUnscaledElasticities
Definition: CMCAMethod.h:181
#define C_FLOAT64
Definition: copasi.h:92
bool undoColumnPivot(CMatrix< C_FLOAT64 > &matrix) const
CModel * mpModel
Definition: CMCAMethod.h:172
int dgetri_(integer *n, doublereal *a, integer *lda, integer *ipiv, doublereal *work, integer *lwork, integer *info)
virtual size_t numCols() const
Definition: CMatrix.h:144
bool undoRowPivot(CMatrix< C_FLOAT64 > &matrix) const
virtual CType * array()
Definition: CMatrix.h:337
void CMCAMethod::calculateUnscaledElasticities ( C_FLOAT64  res)

Definition at line 203 of file CMCAMethod.cpp.

References CVectorCore< CType >::array(), CMatrix< CType >::array(), CCopasiVector< T >::begin(), C_FLOAT64, CCopasiVector< T >::end(), CModel::getMetabolitesX(), CModel::getNumDependentReactionMetabs(), CModel::getNumIndependentReactionMetabs(), CModel::getParticleFlux(), CModel::getReactions(), mElasticityDependencies, mFactor, min, mpModel, mUnscaledElasticities, CMatrix< CType >::size(), CCopasiVector< T >::size(), and CModel::updateSimulatedValues().

Referenced by CalculateMCA().

204 {
205  assert(mpModel);
206 
207  // We need the number of metabolites determined by reactions.
208  size_t numMetabs =
210 
212  CCopasiVector< CMetab >::iterator endSpecies = itSpecies + numMetabs;
213 
214  // Calculate the dependencies of the elasticities this is helpful for scaling to determine
215  // whether 0/0 is 0 or NaN
216 
217  bool * pElasticityDependency = mElasticityDependencies.array();
220 
221  for (; itReac != endReac; ++itReac)
222  {
223  CCopasiObject::DataObjectSet ReactionDependencies;
224  (*itReac)->getParticleFluxReference()->getAllDependencies(ReactionDependencies, DataObjectSet());
225 
226  itSpecies = mpModel->getMetabolitesX().begin();
227 
228  for (; itSpecies != endSpecies; ++itSpecies, ++pElasticityDependency)
229  {
230  *pElasticityDependency = (ReactionDependencies.find((*itSpecies)->getValueReference()) != ReactionDependencies.end());
231  }
232  }
233 
234  const CVector< C_FLOAT64 > & ParticleFlux = mpModel->getParticleFlux();
235 
236  // mUnscaledElasticities.resize(numReacs, numMetabs);
237  C_FLOAT64 * pElasticity;
238 
240 
241  C_FLOAT64 Store, InvDelta;
242 
243  C_FLOAT64 X1, X2;
244 
245  // Arrays to store function value
246  size_t numReacs = mpModel->getReactions().size();
247 
248  CVector< C_FLOAT64 > Y1(numReacs);
249 
250  C_FLOAT64 * pY1;
251 
252  CVector< C_FLOAT64 > Y2(numReacs);
253 
254  C_FLOAT64 * pY2;
255 
256  // calculate elasticities
257  itSpecies = mpModel->getMetabolitesX().begin();
258 
259  for (size_t j = 0; itSpecies != endSpecies; ++itSpecies, ++j)
260  {
261  Store = (*itSpecies)->getValue();
262 
263  // We only need to make sure that we do not have an underflow problem
264  if (fabs(Store) < 100 * std::numeric_limits< C_FLOAT64 >::min())
265  {
266  X1 = 0.0;
267 
268  if (Store < 0.0)
270  else
272  }
273  else
274  {
275  X1 = Store * (1.0 + mFactor);
276  X2 = Store * (1.0 - mFactor);
277  }
278 
279  InvDelta = 1.0 / (X1 - X2);
280 
281  // let's take X+dx
282  (*itSpecies)->setValue(X1);
283  mpModel->updateSimulatedValues(false); // TODO test if true or false should be used.
284 
285  // get the fluxes
286  Y1 = ParticleFlux;
287 
288  // now X-dx
289  (*itSpecies)->setValue(X2);
290  mpModel->updateSimulatedValues(false); // TODO test if true or false should be used.
291 
292  // get the fluxes
293  Y2 = ParticleFlux;
294 
295  // set column j of Dxv
296  pElasticity = mUnscaledElasticities.array() + j;
297  pY1 = Y1.array();
298  pY2 = Y2.array();
299 
300  for (; pElasticity < pElasticityEnd; pElasticity += numMetabs, ++pY1, ++pY2)
301  * pElasticity = (*pY1 - *pY2) * InvDelta;
302 
303  // restore the value of the species
304  (*itSpecies)->setValue(Store);
305  }
306 
307  // make sure the fluxes are correct afterwards (needed for scaling of the MCA results)
309 }
virtual size_t size() const
const CVector< C_FLOAT64 > & getParticleFlux() const
Definition: CModel.cpp:1045
iterator begin()
void updateSimulatedValues(const bool &updateMoieties)
Definition: CModel.cpp:1851
iterator end()
std::vector< CType * >::const_iterator const_iterator
Definition: CCopasiVector.h:57
size_t getNumDependentReactionMetabs() const
Definition: CModel.cpp:1133
CMatrix< bool > mElasticityDependencies
Definition: CMCAMethod.h:225
size_t getNumIndependentReactionMetabs() const
Definition: CModel.cpp:1130
CMatrix< C_FLOAT64 > mUnscaledElasticities
Definition: CMCAMethod.h:181
#define C_FLOAT64
Definition: copasi.h:92
virtual size_t size() const
Definition: CMatrix.h:132
CCopasiVectorNS< CReaction > & getReactions()
Definition: CModel.cpp:1039
CModel * mpModel
Definition: CMCAMethod.h:172
const CCopasiVector< CMetab > & getMetabolitesX() const
Definition: CModel.cpp:1057
std::set< const CCopasiObject * > DataObjectSet
virtual CType * array()
Definition: CMatrix.h:337
#define min(a, b)
Definition: f2c.h:175
C_FLOAT64 mFactor
Definition: CMCAMethod.h:213
bool CMCAMethod::calculateUnscaledFluxCC ( const bool &  status)

Definition at line 403 of file CMCAMethod.cpp.

References CMatrix< CType >::array(), C_FLOAT64, C_INT, dgemm_(), dlaset_(), K, mpModel, mUnscaledConcCC, mUnscaledElasticities, mUnscaledFluxCC, CMatrix< CType >::numCols(), and CMatrix< CType >::numRows().

Referenced by CalculateMCA().

404 {
405  assert(mpModel);
406  //size_t i, j, k;
407 
408  // mUnscaledFluxCC := I + mUnscaledElasticities * mUnscaledConcCC
409 
410  char UPLO = 'A';
412  C_FLOAT64 Alpha = 0.0;
413  C_FLOAT64 Beta = 1.0;
414 
415  // Initialize mUnscaledFluxCC to the identity matrix;
416  dlaset_(&UPLO, &M, &M, &Alpha, &Beta, mUnscaledFluxCC.array(), &M);
417 
418  if (status)
419  {
420  char TRANSA = 'N';
421  char TRANSB = 'N';
422  M = (C_INT) mUnscaledFluxCC.numCols(); /* LDA, LDC */
425 
429 
430  Alpha = 1.0;
431  Beta = 1.0;
432 
433  dgemm_(&TRANSA, &TRANSB, &M, &N, &K, &Alpha, mUnscaledConcCC.array(), &LDA,
434  mUnscaledElasticities.array(), &LDB, &Beta, mUnscaledFluxCC.array(), &LDC);
435  }
436 
437  return status;
438 }
#define C_INT
Definition: copasi.h:115
CMatrix< C_FLOAT64 > mUnscaledConcCC
Definition: CMCAMethod.h:184
#define K
int dlaset_(char *uplo, integer *m, integer *n, doublereal *alpha, doublereal *beta, doublereal *a, integer *lda)
virtual size_t numRows() const
Definition: CMatrix.h:138
CMatrix< C_FLOAT64 > mUnscaledFluxCC
Definition: CMCAMethod.h:187
int dgemm_(char *transa, char *transb, integer *m, integer *n, integer *k, doublereal *alpha, doublereal *a, integer *lda, doublereal *b, integer *ldb, doublereal *beta, doublereal *c, integer *ldc)
CMatrix< C_FLOAT64 > mUnscaledElasticities
Definition: CMCAMethod.h:181
#define C_FLOAT64
Definition: copasi.h:92
CModel * mpModel
Definition: CMCAMethod.h:172
virtual size_t numCols() const
Definition: CMatrix.h:144
virtual CType * array()
Definition: CMatrix.h:337
bool CMCAMethod::checkSummationTheorems ( const C_FLOAT64 resolution)

Check whether the summation theorems hold.

Definition at line 598 of file CMCAMethod.cpp.

References CVectorCore< CType >::array(), CMatrix< CType >::array(), C_FLOAT64, max, min, mScaledConcCC, mScaledFluxCC, CMatrix< CType >::numCols(), CMatrix< CType >::numRows(), CVector< CType >::resize(), and CMatrix< CType >::size().

Referenced by CalculateMCA().

599 {
600  bool success = true;
601 
602  C_FLOAT64 * pScaled = mScaledConcCC.array();
603  C_FLOAT64 * pScaledRowEnd = pScaled + mScaledConcCC.numCols();
604  C_FLOAT64 * pScaledEnd = pScaled + mScaledConcCC.size();
605 
609  Sum = 0.0;
610  Max = 0.0;
611  C_FLOAT64 * pSum = Sum.array();
612  C_FLOAT64 * pMax = Max.array();
613  C_FLOAT64 * pError = Error.array();
614 
615  for (; pScaled != pScaledEnd; pScaledRowEnd += mScaledConcCC.numCols(), ++pSum, ++pMax, ++pError)
616  {
617  for (; pScaled != pScaledRowEnd; ++pScaled)
618  {
619  success &= !isnan(*pScaled);
620 
621  *pSum += *pScaled;
622  *pMax = std::max(*pMax, fabs(*pScaled));
623  }
624 
625  *pError = (*pMax > 100.0 * std::numeric_limits< C_FLOAT64 >::min()) ? fabs(*pSum) / *pMax : 0.0;
626  success &= *pError < resolution;
627  }
628 
629  pScaled = mScaledFluxCC.array();
630  pScaledRowEnd = pScaled + mScaledFluxCC.numCols();
631  pScaledEnd = pScaled + mScaledFluxCC.size();
632 
634  Max.resize(mScaledFluxCC.numRows());
635  Error.resize(mScaledFluxCC.numRows());
636  Sum = 0.0;
637  Max = 0.0;
638 
639  pSum = Sum.array();
640  pMax = Max.array();
641  pError = Error.array();
642 
643  for (; pScaled != pScaledEnd; pScaledRowEnd += mScaledConcCC.numCols(), ++pSum, ++pMax, ++pError)
644  {
645  for (; pScaled != pScaledRowEnd; ++pScaled)
646  {
647  success &= !isnan(*pScaled);
648 
649  *pSum += *pScaled;
650  *pMax = std::max(*pMax, fabs(*pScaled));
651  }
652 
653  *pError = (*pMax > 100.0 * std::numeric_limits< C_FLOAT64 >::min()) ? fabs(1.0 - *pSum) / *pMax : 0.0;
654  success &= *pError < resolution;
655  }
656 
657  return success;
658 }
virtual size_t numRows() const
Definition: CMatrix.h:138
void resize(size_t size, const bool &copy=false)
Definition: CVector.h:301
CMatrix< C_FLOAT64 > mScaledConcCC
Definition: CMCAMethod.h:193
#define C_FLOAT64
Definition: copasi.h:92
CType * array()
Definition: CVector.h:139
virtual size_t size() const
Definition: CMatrix.h:132
virtual size_t numCols() const
Definition: CMatrix.h:144
CMatrix< C_FLOAT64 > mScaledFluxCC
Definition: CMCAMethod.h:196
virtual CType * array()
Definition: CMatrix.h:337
#define min(a, b)
Definition: f2c.h:175
#define max(a, b)
Definition: f2c.h:176
bool CMCAMethod::createLinkMatrix ( const bool &  useSmallbone = false)
private

Definition at line 718 of file CMCAMethod.cpp.

References CLinkMatrix::build(), CLinkMatrix::doRowPivot(), CSteadyStateTask::getJacobian(), CModel::getL0(), CLinkMatrix::getNumIndependent(), CModel::getNumIndependentReactionMetabs(), CModel::getRedStoi(), CModel::getStoi(), mLinkZero, mpModel, mpSteadyStateTask, mReducedStoichiometry, CMatrix< CType >::numCols(), and CMatrix< CType >::resize().

Referenced by CalculateMCA().

719 {
720  if (mpModel == NULL ||
721  mpSteadyStateTask == NULL)
722  {
723  return false;
724  }
725 
726  if (useSmallbone)
727  {
732  }
733  else
734  {
735  mLinkZero = mpModel->getL0();
737  }
738 
739  return true;
740 }
bool build(const CMatrix< C_FLOAT64 > &matrix, size_t maxRank=C_INVALID_INDEX)
Definition: CLinkMatrix.cpp:44
CSteadyStateTask * mpSteadyStateTask
Definition: CMCAMethod.h:219
CLinkMatrix mLinkZero
Definition: CMCAMethod.h:221
const size_t & getNumIndependent() const
const CMatrix< C_FLOAT64 > & getRedStoi() const
Definition: CModel.cpp:1154
bool doRowPivot(CMatrix< C_FLOAT64 > &matrix) const
CMatrix< C_FLOAT64 > mReducedStoichiometry
Definition: CMCAMethod.h:223
virtual void resize(size_t rows, size_t cols, const bool &copy=false)
Definition: CMatrix.h:151
size_t getNumIndependentReactionMetabs() const
Definition: CModel.cpp:1130
const CLinkMatrix & getL0() const
Definition: CModel.cpp:1169
CModel * mpModel
Definition: CMCAMethod.h:172
const CMatrix< C_FLOAT64 > & getStoi() const
Definition: CModel.cpp:1160
virtual size_t numCols() const
Definition: CMatrix.h:144
const CMatrix< C_FLOAT64 > & getJacobian() const
CMCAMethod * CMCAMethod::createMethod ( CCopasiMethod::SubType  subType = CCopasiMethod::mcaMethodReder)
static

Create a MCA method. Note: the returned object has to be released after use with delete

Definition at line 34 of file CMCAMethod.cpp.

References CMCAMethod().

Referenced by CMCATask::createMethod().

35 {
36  return new CMCAMethod();
37 }
CMCAMethod(const CCopasiContainer *pParent=NULL)
Definition: CMCAMethod.cpp:42
bool CMCAMethod::elevateChildren ( )
virtual

This methods must be called to elevate subgroups to derived objects. The default implementation does nothing.

Returns
bool success

Reimplemented from CCopasiParameterGroup.

Definition at line 154 of file CMCAMethod.cpp.

References initializeParameter().

155 {
157  return true;
158 }
void initializeParameter()
Definition: CMCAMethod.cpp:138
const CModel * CMCAMethod::getModel ( ) const

Get the Model

Definition at line 797 of file CMCAMethod.cpp.

References mpModel.

Referenced by CMCAResultSubwidget::loadAll().

798 {
799  return this->mpModel;
800 }
CModel * mpModel
Definition: CMCAMethod.h:172
const CMatrix<C_FLOAT64>& CMCAMethod::getScaledConcentrationCC ( ) const
inline

Definition at line 80 of file CMCAMethod.h.

References mScaledConcCC.

81  {return mScaledConcCC;}
CMatrix< C_FLOAT64 > mScaledConcCC
Definition: CMCAMethod.h:193
const CArrayAnnotation* CMCAMethod::getScaledConcentrationCCAnn ( ) const
inline

Definition at line 92 of file CMCAMethod.h.

References mScaledConcCCAnn.

Referenced by CMCAResultSubwidget::loadConcentrationCCs(), and CMCATask::printResult().

93  {return mScaledConcCCAnn;}
CArrayAnnotation * mScaledConcCCAnn
Definition: CMCAMethod.h:194
const CMatrix<C_FLOAT64>& CMCAMethod::getScaledElasticities ( ) const
inline

Definition at line 77 of file CMCAMethod.h.

References mScaledElasticities.

78  {return mScaledElasticities;}
CMatrix< C_FLOAT64 > mScaledElasticities
Definition: CMCAMethod.h:190
const CArrayAnnotation* CMCAMethod::getScaledElasticitiesAnn ( ) const
inline

Definition at line 88 of file CMCAMethod.h.

References mScaledElasticitiesAnn.

Referenced by CMCAResultSubwidget::loadElasticities(), and CMCATask::printResult().

89  {return mScaledElasticitiesAnn;}
CArrayAnnotation * mScaledElasticitiesAnn
Definition: CMCAMethod.h:191
const CMatrix<C_FLOAT64>& CMCAMethod::getScaledFluxCC ( ) const
inline

Definition at line 83 of file CMCAMethod.h.

References mScaledFluxCC.

84  {return mScaledFluxCC;}
CMatrix< C_FLOAT64 > mScaledFluxCC
Definition: CMCAMethod.h:196
const CArrayAnnotation* CMCAMethod::getScaledFluxCCAnn ( ) const
inline

Definition at line 96 of file CMCAMethod.h.

References mScaledFluxCCAnn.

Referenced by CMCAResultSubwidget::loadFluxCCs(), and CMCATask::printResult().

97  {return mScaledFluxCCAnn;}
CArrayAnnotation * mScaledFluxCCAnn
Definition: CMCAMethod.h:197
const CSteadyStateMethod::ReturnCode& CMCAMethod::getSteadyStateStatus ( ) const
inline

Definition at line 147 of file CMCAMethod.h.

References mSSStatus.

Referenced by CMCAResultSubwidget::loadAll(), and CMCATask::printResult().

148  {return mSSStatus;}
CSteadyStateMethod::ReturnCode mSSStatus
Definition: CMCAMethod.h:217
const CMatrix<C_FLOAT64>& CMCAMethod::getUnscaledConcentrationCC ( ) const
inline

Definition at line 67 of file CMCAMethod.h.

References mUnscaledConcCC.

68  {return mUnscaledConcCC;}
CMatrix< C_FLOAT64 > mUnscaledConcCC
Definition: CMCAMethod.h:184
const CArrayAnnotation* CMCAMethod::getUnscaledConcentrationCCAnn ( ) const
inline

Definition at line 90 of file CMCAMethod.h.

References mUnscaledConcCCAnn.

Referenced by CMCAResultSubwidget::loadConcentrationCCs(), and CMCATask::printResult().

91  {return mUnscaledConcCCAnn;}
CArrayAnnotation * mUnscaledConcCCAnn
Definition: CMCAMethod.h:185
const CMatrix<C_FLOAT64>& CMCAMethod::getUnscaledElasticities ( ) const
inline

Definition at line 62 of file CMCAMethod.h.

References mUnscaledElasticities.

63  {return mUnscaledElasticities;}
CMatrix< C_FLOAT64 > mUnscaledElasticities
Definition: CMCAMethod.h:181
const CArrayAnnotation* CMCAMethod::getUnscaledElasticitiesAnn ( ) const
inline

Definition at line 86 of file CMCAMethod.h.

References mUnscaledElasticitiesAnn.

Referenced by CMCAResultSubwidget::loadElasticities(), and CMCATask::printResult().

87  {return mUnscaledElasticitiesAnn;}
CArrayAnnotation * mUnscaledElasticitiesAnn
Definition: CMCAMethod.h:182
const CMatrix<C_FLOAT64>& CMCAMethod::getUnscaledFluxCC ( ) const
inline

Definition at line 72 of file CMCAMethod.h.

References mUnscaledFluxCC.

73  {return mUnscaledFluxCC;}
CMatrix< C_FLOAT64 > mUnscaledFluxCC
Definition: CMCAMethod.h:187
const CArrayAnnotation* CMCAMethod::getUnscaledFluxCCAnn ( ) const
inline

Definition at line 94 of file CMCAMethod.h.

References mUnscaledFluxCCAnn.

Referenced by CMCAResultSubwidget::loadFluxCCs(), and CMCATask::printResult().

95  {return mUnscaledFluxCCAnn;}
CArrayAnnotation * mUnscaledFluxCCAnn
Definition: CMCAMethod.h:188
void CMCAMethod::initializeParameter ( )
private

Initialize the method parameter

Definition at line 138 of file CMCAMethod.cpp.

References CCopasiParameterGroup::assertParameter(), CCopasiParameter::BOOL, CCopasiParameterGroup::getParameter(), CCopasiParameter::getValue(), mpUseReeder, mpUseSmallbone, CCopasiParameter::Value::pBOOL, CCopasiParameter::Value::pUDOUBLE, CCopasiParameterGroup::removeParameter(), CCopasiParameterGroup::setValue(), and CCopasiParameter::UDOUBLE.

Referenced by CMCAMethod(), and elevateChildren().

139 {
140  CCopasiParameter *pParm;
141 
142  assertParameter("Modulation Factor", CCopasiParameter::UDOUBLE, 1.0e-009);
143 
144  if ((pParm = getParameter("MCA.ModulationFactor")) != NULL)
145  {
146  setValue("Modulation Factor", *pParm->getValue().pUDOUBLE);
147  removeParameter("MCA.ModulationFactor");
148  }
149 
152 }
bool removeParameter(const std::string &name)
const Value & getValue() const
bool setValue(const std::string &name, const CType &value)
CCopasiParameter * getParameter(const std::string &name)
bool * mpUseSmallbone
Definition: CMCAMethod.h:176
CCopasiParameter * assertParameter(const std::string &name, const CCopasiParameter::Type type, const CType &defaultValue)
bool * mpUseReeder
Definition: CMCAMethod.h:174
void CMCAMethod::initObjects ( )
private

Definition at line 77 of file CMCAMethod.cpp.

References mScaledConcCC, mScaledConcCCAnn, mScaledElasticities, mScaledElasticitiesAnn, mScaledFluxCC, mScaledFluxCCAnn, mUnscaledConcCC, mUnscaledConcCCAnn, mUnscaledElasticities, mUnscaledElasticitiesAnn, mUnscaledFluxCC, mUnscaledFluxCCAnn, CArrayAnnotation::setDescription(), CArrayAnnotation::setDimensionDescription(), CArrayAnnotation::setMode(), and CArrayAnnotation::VECTOR.

Referenced by CMCAMethod().

78 {
80  tmp = new CArrayAnnotation("Unscaled elasticities", this,
83  tmp->setDescription("Unscaled elasticity matrix");
84  tmp->setDimensionDescription(0, "Reactions (reduced system)");
85  tmp->setDimensionDescription(1, "Species (reduced system)");
87 
88  tmp = new CArrayAnnotation("Unscaled concentration control coefficients", this,
91  tmp->setDescription("Unscaled concentration control coefficients");
92  tmp->setDimensionDescription(0, "Species (reduced system)");
93  tmp->setDimensionDescription(1, "Reactions (reduced system)");
94  mUnscaledConcCCAnn = tmp;
95 
96  tmp = new CArrayAnnotation("Unscaled flux control coefficients", this,
99  tmp->setDescription("Unscaled flux control coefficients");
100  tmp->setDimensionDescription(0, "Reactions (reduced system)");
101  tmp->setDimensionDescription(1, "Reactions (reduced system)");
102  mUnscaledFluxCCAnn = tmp;
103 
104  tmp = new CArrayAnnotation("Scaled elasticities", this,
107  tmp->setDescription("Scaled elasticity matrix");
108  tmp->setDimensionDescription(0, "Reactions (reduced system)");
109  tmp->setDimensionDescription(1, "Species (reduced system)");
111 
112  tmp = new CArrayAnnotation("Scaled concentration control coefficients", this,
115  tmp->setDescription("Scaled concentration control coefficients");
116  tmp->setDimensionDescription(0, "Species (reduced system)");
117  tmp->setDimensionDescription(1, "Reactions (reduced system)");
118  mScaledConcCCAnn = tmp;
119 
120  tmp = new CArrayAnnotation("Scaled flux control coefficients", this,
123  tmp->setDescription("Scaled flux control coefficients");
124  tmp->setDimensionDescription(0, "Reactions (reduced system)");
125  tmp->setDimensionDescription(1, "Reactions (reduced system)");
126  mScaledFluxCCAnn = tmp;
127 }
CArrayAnnotation * mScaledElasticitiesAnn
Definition: CMCAMethod.h:191
CMatrix< C_FLOAT64 > mUnscaledConcCC
Definition: CMCAMethod.h:184
CMatrix< C_FLOAT64 > mScaledElasticities
Definition: CMCAMethod.h:190
CArrayAnnotation * mScaledConcCCAnn
Definition: CMCAMethod.h:194
CMatrix< C_FLOAT64 > mUnscaledFluxCC
Definition: CMCAMethod.h:187
void setDescription(const std::string &s)
CArrayAnnotation * mScaledFluxCCAnn
Definition: CMCAMethod.h:197
CMatrix< C_FLOAT64 > mScaledConcCC
Definition: CMCAMethod.h:193
CArrayAnnotation * mUnscaledElasticitiesAnn
Definition: CMCAMethod.h:182
void setMode(size_t d, Mode m)
void setDimensionDescription(size_t d, const std::string &s)
CMatrix< C_FLOAT64 > mUnscaledElasticities
Definition: CMCAMethod.h:181
CArrayAnnotation * mUnscaledConcCCAnn
Definition: CMCAMethod.h:185
CArrayAnnotation * mUnscaledFluxCCAnn
Definition: CMCAMethod.h:188
CMatrix< C_FLOAT64 > mScaledFluxCC
Definition: CMCAMethod.h:196
bool CMCAMethod::isValidProblem ( const CCopasiProblem pProblem)
virtual

Check if the method is suitable for this problem

Returns
bool suitability of the method

Reimplemented from CCopasiMethod.

Definition at line 803 of file CMCAMethod.cpp.

References CModelEntity::ASSIGNMENT, CCopasiVector< T >::begin(), CStateTemplate::beginIndependent(), CCopasiVector< T >::end(), CStateTemplate::endIndependent(), CCopasiMessage::ERROR, CModel::getCompartments(), CCopasiProblem::getModel(), CModel::getNumIndependentReactionMetabs(), CModel::getStateTemplate(), CCopasiMethod::isValidProblem(), mpUseReeder, and mpUseSmallbone.

804 {
805  if (!CCopasiMethod::isValidProblem(pProblem)) return false;
806 
807  const CMCAProblem * pP = dynamic_cast<const CMCAProblem *>(pProblem);
808 
809  if (!pP)
810  {
811  //not a TrajectoryProblem
812  CCopasiMessage(CCopasiMessage::ERROR, "Problem is not an MCA problem.");
813  return false;
814  }
815 
816  CModel * pModel = pP->getModel();
817 
818  if (pModel == NULL)
819  return false;
820 
821  // Check if the model contains an ODE.
822  size_t NumODE =
824 
825  if (pModel->getNumIndependentReactionMetabs() < NumODE)
826  {
827  CCopasiMessage(CCopasiMessage::ERROR, "MCA is not applicable for a system with explicit ODEs.");
828  return false;
829  }
830 
831  // Check if the model has a compartment with an assignment
834 
835  for (; it != end; ++it)
836  if ((*it)->getStatus() == CModelEntity::ASSIGNMENT)
837  {
838  CCopasiMessage(CCopasiMessage::ERROR, "MCA is not applicable for a system with changing volumes.");
839  return false;
840  }
841 
842  if (!*mpUseReeder && !*mpUseSmallbone)
843  {
844  CCopasiMessage(CCopasiMessage::ERROR, "At least one of the algorithm Reeder or Smallbone must be selected.");
845  return false;
846  }
847 
848  return true;
849 }
iterator begin()
virtual bool isValidProblem(const CCopasiProblem *pProblem)
iterator end()
std::vector< CType * >::const_iterator const_iterator
Definition: CCopasiVector.h:57
CModelEntity ** beginIndependent()
Definition: CState.cpp:208
bool * mpUseSmallbone
Definition: CMCAMethod.h:176
size_t getNumIndependentReactionMetabs() const
Definition: CModel.cpp:1130
CCopasiVectorNS< CCompartment > & getCompartments()
Definition: CModel.cpp:1145
const CStateTemplate & getStateTemplate() const
Definition: CModel.cpp:1172
Definition: CModel.h:50
bool * mpUseReeder
Definition: CMCAMethod.h:174
CModel * getModel() const
CModelEntity ** endIndependent()
Definition: CState.cpp:209
C_INT32 CMCAMethod::load ( CReadConfig configBuffer)

Read SSMCAUnscaled from configuration file

Definition at line 745 of file CMCAMethod.cpp.

References C_INT32, CReadConfig::getVariable(), CReadConfig::LOOP, and mSSReder.

746 {
747  C_INT32 Fail = 0;
748 
749  if ((Fail = configBuffer.getVariable("SSMCAUnscaled", "C_INT16",
750  (void *) & mSSReder,
752  return Fail;
753 
754  return Fail;
755 }
#define C_INT32
Definition: copasi.h:90
C_INT32 getVariable(const std::string &name, const std::string &type, void *pout, CReadConfig::Mode mode=CReadConfig::NEXT)
Definition: CReadConfig.cpp:81
C_INT16 mSSReder
Definition: CMCAMethod.h:202
bool CMCAMethod::process ( )
virtual

Definition at line 757 of file CMCAMethod.cpp.

References CalculateMCA(), and mSteadyStateResolution.

Referenced by CMCATask::process().

758 {
759  // check if current state is a steady state
760  // if not, calculate TimeMCA only
761  if (1 /*mIsSteadyState*/)
762  {
764  }
765  else
766  {
767  // CalculateTimeMCA(mSteadyStateResolution);
768  }
769 
770  return true;
771 }
bool CalculateMCA(C_FLOAT64 res)
Definition: CMCAMethod.cpp:673
C_FLOAT64 mSteadyStateResolution
Definition: CMCAMethod.h:215
void CMCAMethod::resizeAllMatrices ( )
virtual

Resizes all result matrices and updates the corresponding array annotations. This needs to be called before output initialization (in case the output references parts of the matrix) from the task initialization, but it also needs to be called before selecting elements of the matrices in the object selection dialog. The model needs to be set before calling this.

Definition at line 160 of file CMCAMethod.cpp.

References CModel::getMetabolitesX(), CModel::getNumDependentReactionMetabs(), CModel::getNumIndependentReactionMetabs(), CModel::getReactions(), CModel::getTotSteps(), mElasticityDependencies, mpModel, mScaledConcCC, mScaledConcCCAnn, mScaledElasticities, mScaledElasticitiesAnn, mScaledFluxCC, mScaledFluxCCAnn, mUnscaledConcCC, mUnscaledConcCCAnn, mUnscaledElasticities, mUnscaledElasticitiesAnn, mUnscaledFluxCC, mUnscaledFluxCCAnn, CMatrix< CType >::numCols(), CMatrix< CType >::numRows(), CMatrix< CType >::resize(), CArrayAnnotation::resize(), and CArrayAnnotation::setCopasiVector().

Referenced by CMCATask::updateMatrices().

161 {
162  if (!mpModel) return;
163 
169 
171  mpModel->getTotSteps());
175 
180 
185 
186  // Reactions are columns, species are rows
191 
192  // Reactions are columns and rows
197 
199 }
CArrayAnnotation * mScaledElasticitiesAnn
Definition: CMCAMethod.h:191
CMatrix< C_FLOAT64 > mUnscaledConcCC
Definition: CMCAMethod.h:184
CMatrix< C_FLOAT64 > mScaledElasticities
Definition: CMCAMethod.h:190
CArrayAnnotation * mScaledConcCCAnn
Definition: CMCAMethod.h:194
virtual size_t numRows() const
Definition: CMatrix.h:138
CMatrix< C_FLOAT64 > mUnscaledFluxCC
Definition: CMCAMethod.h:187
CArrayAnnotation * mScaledFluxCCAnn
Definition: CMCAMethod.h:197
size_t getTotSteps() const
Definition: CModel.cpp:1136
CMatrix< C_FLOAT64 > mScaledConcCC
Definition: CMCAMethod.h:193
size_t getNumDependentReactionMetabs() const
Definition: CModel.cpp:1133
void setCopasiVector(size_t d, const CCopasiContainer *v)
CMatrix< bool > mElasticityDependencies
Definition: CMCAMethod.h:225
virtual void resize(size_t rows, size_t cols, const bool &copy=false)
Definition: CMatrix.h:151
size_t getNumIndependentReactionMetabs() const
Definition: CModel.cpp:1130
CArrayAnnotation * mUnscaledElasticitiesAnn
Definition: CMCAMethod.h:182
CMatrix< C_FLOAT64 > mUnscaledElasticities
Definition: CMCAMethod.h:181
CArrayAnnotation * mUnscaledConcCCAnn
Definition: CMCAMethod.h:185
CCopasiVectorNS< CReaction > & getReactions()
Definition: CModel.cpp:1039
CModel * mpModel
Definition: CMCAMethod.h:172
const CCopasiVector< CMetab > & getMetabolitesX() const
Definition: CModel.cpp:1057
virtual size_t numCols() const
Definition: CMatrix.h:144
CArrayAnnotation * mUnscaledFluxCCAnn
Definition: CMCAMethod.h:188
CMatrix< C_FLOAT64 > mScaledFluxCC
Definition: CMCAMethod.h:196
bool CMCAMethod::scaleMCA ( const bool &  status,
C_FLOAT64  res 
)

Scales the coefficients (i.e. Kacser format, rather than Reder)

Definition at line 440 of file CMCAMethod.cpp.

References CMatrix< CType >::array(), CCopasiVector< T >::begin(), C_FLOAT64, CCopasiVector< T >::end(), CSteadyStateMethod::found, CModel::getMetabolitesX(), CModel::getNumDependentReactionMetabs(), CModel::getNumIndependentReactionMetabs(), CModel::getReactions(), CModelEntity::getValue(), mElasticityDependencies, mpModel, mScaledConcCC, mScaledElasticities, mScaledFluxCC, mSSStatus, mUnscaledConcCC, mUnscaledElasticities, mUnscaledFluxCC, and CMatrix< CType >::numCols().

Referenced by CalculateMCA().

441 {
442  assert(mpModel);
443  // The number of metabs determined by reaction.
444  size_t numSpeciesReaction =
447  CCopasiVector< CMetab >::const_iterator itSpecies = metabs.begin();
448  CCopasiVector< CMetab >::const_iterator endSpecies = itSpecies + numSpeciesReaction;
449 
452  CCopasiVector< CReaction >::const_iterator endReaction = reacs.end();
453 
454  size_t col;
455 
456  // Scale Elasticities
457  C_FLOAT64 * pUnscaled;
458  C_FLOAT64 * pScaled;
459  bool * pElasticityDependency;
460 
461  // Reactions are rows, species are columns
462  for (col = 0; itSpecies != endSpecies; ++itSpecies, col++)
463  {
464  C_FLOAT64 VolumeInv = 1.0 / (*itSpecies)->getCompartment()->getValue();
465  C_FLOAT64 Number = (*itSpecies)->getValue();
466 
467  for (itReaction = reacs.begin(),
468  pUnscaled = mUnscaledElasticities.array() + col,
469  pScaled = mScaledElasticities.array() + col,
470  pElasticityDependency = mElasticityDependencies.array() + col;
471  itReaction != endReaction;
472  ++itReaction,
473  pUnscaled += numSpeciesReaction,
474  pScaled += numSpeciesReaction,
475  pElasticityDependency += numSpeciesReaction)
476  {
477  if (!*pElasticityDependency)
478  {
479  *pScaled = 0.0;
480  }
481  else if (fabs((*itReaction)->getFlux() * VolumeInv) >= res)
482  {
483  *pScaled = *pUnscaled * Number / (*itReaction)->getParticleFlux();
484  }
485  else
486  {
487  *pScaled = (((*itReaction)->getFlux() < 0.0) ? - std::numeric_limits<C_FLOAT64>::infinity() : std::numeric_limits<C_FLOAT64>::infinity());
488  }
489  }
490  }
491 
492  //if we are not in a steady state we cannot calculate CCs
494  !status)
495  {
496  mScaledConcCC = std::numeric_limits< C_FLOAT64 >::quiet_NaN();
497  mScaledFluxCC = std::numeric_limits< C_FLOAT64 >::quiet_NaN();
498 
499  return false;
500  }
501 
502  // Scale ConcCC
503  // Reactions are columns, species are rows
504  itSpecies = metabs.begin();
505  pUnscaled = mUnscaledConcCC.array();
506  pScaled = mScaledConcCC.array();
507 
508  for (; itSpecies != endSpecies; ++itSpecies)
509  {
510  // In rare occasions the concentration might not be updated
511  (*(*itSpecies)->getConcentrationReference()->getRefresh())();
512  C_FLOAT64 alt = fabs((*itSpecies)->getConcentration());
513 
514  for (itReaction = reacs.begin(); itReaction != endReaction; ++itReaction, ++pUnscaled, ++pScaled)
515  {
516  if (alt >= res)
517  *pScaled =
518  *pUnscaled * (*itReaction)->getParticleFlux() / (*itSpecies)->getValue();
519  else
520  *pScaled = *pUnscaled * std::numeric_limits<C_FLOAT64>::infinity();
521  }
522  }
523 
525  itReaction = reacs.begin();
526  pUnscaled = mUnscaledFluxCC.array();
527  pScaled = mScaledFluxCC.array();
528 
529  for (; itReaction != endReaction; ++itReaction)
530  {
531  const CCompartment * pCompartment = (*itReaction)->getLargestCompartment();
532  C_FLOAT64 Resolution = res * pCompartment->getValue();
533 
534  C_FLOAT64 Scale = (*itReaction)->getFlux();
535  C_FLOAT64 tmp = 0.0;
536  C_FLOAT64 eq = 0.0;
537 
538  // We use the summation theorem to verify the scaling
539  C_FLOAT64 *pSum = pUnscaled;
540  C_FLOAT64 *pSumEnd = pSum + mScaledFluxCC.numCols();
541 
542  for (itReactionCol = reacs.begin(); pSum != pSumEnd; ++itReactionCol, ++pSum)
543  {
544  tmp += *pSum * (*itReactionCol)->getFlux();
545  eq += fabs(*pSum);
546  }
547 
548  eq /= mScaledFluxCC.numCols();
549 
550  if (fabs(tmp) < Resolution && eq >= Resolution)
551  {
552  Scale = std::numeric_limits< C_FLOAT64 >::infinity();
553  }
554 
555  tmp = 0.0;
556 
557  for (itReactionCol = reacs.begin(); itReactionCol != endReaction; ++itReactionCol, ++pUnscaled, ++pScaled)
558  {
559  // In the diagonal the scaling factors cancel.
560  if (eq < res)
561  {
562  *pScaled = (itReactionCol != itReaction) ? 0.0 : 1.0;
563  }
564  else if (itReactionCol == itReaction)
565  {
566  *pScaled = *pUnscaled;
567  }
568  else if (fabs(Scale) >= res)
569  {
570  *pScaled = *pUnscaled * (*itReactionCol)->getFlux() / Scale;
571  }
572  else
573  {
574  const CCompartment * pCompartmentCol = (*itReactionCol)->getLargestCompartment();
575  C_FLOAT64 ScaleCol = (pCompartmentCol == NULL) ?
576  fabs((*itReactionCol)->getFlux()) :
577  fabs((*itReactionCol)->getFlux() / pCompartmentCol->getValue());
578 
579  if (fabs(ScaleCol) <= res)
580  {
581  *pScaled = std::numeric_limits< C_FLOAT64 >::quiet_NaN();
582  }
583  else
584  {
585  *pScaled = (((*itReaction)->getFlux() < 0.0) ?
586  - std::numeric_limits<C_FLOAT64>::infinity() :
587  std::numeric_limits<C_FLOAT64>::infinity());
588  }
589  }
590 
591  tmp += *pScaled;
592  }
593  }
594 
595  return true;
596 }
CMatrix< C_FLOAT64 > mUnscaledConcCC
Definition: CMCAMethod.h:184
CSteadyStateMethod::ReturnCode mSSStatus
Definition: CMCAMethod.h:217
CMatrix< C_FLOAT64 > mScaledElasticities
Definition: CMCAMethod.h:190
iterator begin()
CMatrix< C_FLOAT64 > mUnscaledFluxCC
Definition: CMCAMethod.h:187
iterator end()
std::vector< CType * >::const_iterator const_iterator
Definition: CCopasiVector.h:57
CMatrix< C_FLOAT64 > mScaledConcCC
Definition: CMCAMethod.h:193
size_t getNumDependentReactionMetabs() const
Definition: CModel.cpp:1133
CMatrix< bool > mElasticityDependencies
Definition: CMCAMethod.h:225
size_t getNumIndependentReactionMetabs() const
Definition: CModel.cpp:1130
CMatrix< C_FLOAT64 > mUnscaledElasticities
Definition: CMCAMethod.h:181
const C_FLOAT64 & getValue() const
#define C_FLOAT64
Definition: copasi.h:92
CCopasiVectorNS< CReaction > & getReactions()
Definition: CModel.cpp:1039
CModel * mpModel
Definition: CMCAMethod.h:172
const CCopasiVector< CMetab > & getMetabolitesX() const
Definition: CModel.cpp:1057
virtual size_t numCols() const
Definition: CMatrix.h:144
CMatrix< C_FLOAT64 > mScaledFluxCC
Definition: CMCAMethod.h:196
virtual CType * array()
Definition: CMatrix.h:337
void CMCAMethod::setFactor ( C_FLOAT64  factor)

Definition at line 787 of file CMCAMethod.cpp.

References mFactor.

788 {
789  this->mFactor = factor;
790 }
C_FLOAT64 mFactor
Definition: CMCAMethod.h:213
void CMCAMethod::setModel ( CModel model)

Set the Model

Definition at line 663 of file CMCAMethod.cpp.

References mpModel.

Referenced by CMCATask::printResult(), and CMCATask::updateMatrices().

664 {
665  mpModel = model;
666 }
CModel * mpModel
Definition: CMCAMethod.h:172
void CMCAMethod::setSteadyStateResolution ( C_FLOAT64  factor)

Definition at line 792 of file CMCAMethod.cpp.

References mSteadyStateResolution.

793 {
794  this->mSteadyStateResolution = resolution;
795 }
C_FLOAT64 mSteadyStateResolution
Definition: CMCAMethod.h:215
void CMCAMethod::setSteadyStateTask ( CSteadyStateTask pSteadyStateTask)

Definition at line 773 of file CMCAMethod.cpp.

References CSteadyStateTask::getResult(), mpSteadyStateTask, mSSStatus, and CSteadyStateMethod::notFound.

Referenced by CMCATask::process().

774 {
775  mpSteadyStateTask = pSteadyStateTask;
776 
777  if (mpSteadyStateTask != NULL)
778  {
780  }
781  else
782  {
784  }
785 }
const CSteadyStateMethod::ReturnCode & getResult() const
CSteadyStateMethod::ReturnCode mSSStatus
Definition: CMCAMethod.h:217
CSteadyStateTask * mpSteadyStateTask
Definition: CMCAMethod.h:219

Member Data Documentation

CMatrix< bool > CMCAMethod::mElasticityDependencies
private

Definition at line 225 of file CMCAMethod.h.

Referenced by calculateUnscaledElasticities(), resizeAllMatrices(), and scaleMCA().

C_FLOAT64 CMCAMethod::mFactor
private

Modulation factor for finite differences derivation

Definition at line 213 of file CMCAMethod.h.

Referenced by calculateUnscaledElasticities(), and setFactor().

CLinkMatrix CMCAMethod::mLinkZero
private

Definition at line 221 of file CMCAMethod.h.

Referenced by calculateUnscaledConcentrationCC(), and createLinkMatrix().

CModel* CMCAMethod::mpModel
private
CSteadyStateTask* CMCAMethod::mpSteadyStateTask
private

Definition at line 219 of file CMCAMethod.h.

Referenced by createLinkMatrix(), and setSteadyStateTask().

bool* CMCAMethod::mpUseReeder
private

Definition at line 174 of file CMCAMethod.h.

Referenced by CalculateMCA(), initializeParameter(), and isValidProblem().

bool* CMCAMethod::mpUseSmallbone
private

Definition at line 176 of file CMCAMethod.h.

Referenced by CalculateMCA(), initializeParameter(), and isValidProblem().

CMatrix< C_FLOAT64 > CMCAMethod::mReducedStoichiometry
private

Definition at line 223 of file CMCAMethod.h.

Referenced by calculateUnscaledConcentrationCC(), and createLinkMatrix().

CMatrix<C_FLOAT64> CMCAMethod::mScaledConcCC
private
CArrayAnnotation* CMCAMethod::mScaledConcCCAnn
private

Definition at line 194 of file CMCAMethod.h.

Referenced by getScaledConcentrationCCAnn(), initObjects(), and resizeAllMatrices().

CMatrix<C_FLOAT64> CMCAMethod::mScaledElasticities
private

Definition at line 190 of file CMCAMethod.h.

Referenced by getScaledElasticities(), initObjects(), resizeAllMatrices(), and scaleMCA().

CArrayAnnotation* CMCAMethod::mScaledElasticitiesAnn
private

Definition at line 191 of file CMCAMethod.h.

Referenced by getScaledElasticitiesAnn(), initObjects(), and resizeAllMatrices().

CMatrix<C_FLOAT64> CMCAMethod::mScaledFluxCC
private
CArrayAnnotation* CMCAMethod::mScaledFluxCCAnn
private

Definition at line 197 of file CMCAMethod.h.

Referenced by getScaledFluxCCAnn(), initObjects(), and resizeAllMatrices().

C_INT16 CMCAMethod::mSSReder
private

1 if MCA coeffs are to be unscaled

Definition at line 202 of file CMCAMethod.h.

Referenced by load().

CSteadyStateMethod::ReturnCode CMCAMethod::mSSStatus
private

Definition at line 217 of file CMCAMethod.h.

Referenced by CalculateMCA(), getSteadyStateStatus(), scaleMCA(), and setSteadyStateTask().

std::vector<C_FLOAT64> CMCAMethod::mSsx
private

If need to evaluate the elasticities, ss_x will be assigned in calculateTimeMCA()

Definition at line 208 of file CMCAMethod.h.

C_FLOAT64 CMCAMethod::mSteadyStateResolution
private

Definition at line 215 of file CMCAMethod.h.

Referenced by process(), and setSteadyStateResolution().

CMatrix<C_FLOAT64> CMCAMethod::mUnscaledConcCC
private
CArrayAnnotation* CMCAMethod::mUnscaledConcCCAnn
private

Definition at line 185 of file CMCAMethod.h.

Referenced by getUnscaledConcentrationCCAnn(), initObjects(), and resizeAllMatrices().

CMatrix<C_FLOAT64> CMCAMethod::mUnscaledElasticities
private
CArrayAnnotation* CMCAMethod::mUnscaledElasticitiesAnn
private

Definition at line 182 of file CMCAMethod.h.

Referenced by getUnscaledElasticitiesAnn(), initObjects(), and resizeAllMatrices().

CMatrix<C_FLOAT64> CMCAMethod::mUnscaledFluxCC
private
CArrayAnnotation* CMCAMethod::mUnscaledFluxCCAnn
private

Definition at line 188 of file CMCAMethod.h.

Referenced by getUnscaledFluxCCAnn(), initObjects(), and resizeAllMatrices().


The documentation for this class was generated from the following files: