COPASI API
4.16.103
|
#include <CSteadyStateTask.h>
Public Member Functions | |
virtual CCopasiMethod * | createMethod (const int &type) const |
CSteadyStateTask (const CCopasiContainer *pParent=NULL) | |
CSteadyStateTask (const CSteadyStateTask &src, const CCopasiContainer *pParent=NULL) | |
const CEigen & | getEigenValues () const |
const CEigen & | getEigenValuesReduced () const |
const CMatrix< C_FLOAT64 > & | getJacobian () const |
const CArrayAnnotation * | getJacobianAnnotated () const |
const CMatrix< C_FLOAT64 > & | getJacobianReduced () const |
const CArrayAnnotation * | getJacobianXAnnotated () const |
const CSteadyStateMethod::ReturnCode & | getResult () const |
const CState * | getState () const |
virtual bool | initialize (const OutputFlag &of, COutputHandler *pOutputHandler, std::ostream *pOstream) |
void | load (CReadConfig &configBuffer) |
virtual void | print (std::ostream *ostream) const |
virtual bool | process (const bool &useInitialValues) |
virtual bool | restore () |
void | setInitialState () |
virtual bool | updateMatrices () |
virtual | ~CSteadyStateTask () |
![]() | |
CCopasiTask (const std::string &name="NoName", const CCopasiContainer *pParent=NULL, const std::string &type="Task") | |
CCopasiTask (const Type &taskType, const CCopasiContainer *pParent=NULL, const std::string &type="Task") | |
CCopasiTask (const CCopasiTask &src, const CCopasiContainer *pParent=NULL) | |
void | cleanup () |
CProcessReport * | getCallBack () const |
const CDescription & | getDescription () const |
virtual const std::string & | getKey () const |
CCopasiMethod * | getMethod () |
const CCopasiMethod * | getMethod () const |
COutputHandler * | getOutputHandler () const |
const OutputFlag & | getOutputMode () const |
CCopasiProblem * | getProblem () |
const CCopasiProblem * | getProblem () const |
CReport & | getReport () |
const CResult & | getResult () const |
CCopasiParameterGroup * | getSliders () |
Type | getType () const |
const bool & | isScheduled () const |
const bool & | isUpdateModel () const |
virtual void | output (const COutputInterface::Activity &activity) |
virtual void | separate (const COutputInterface::Activity &activity) |
virtual bool | setCallBack (CProcessReport *pCallBack) |
virtual bool | setMethodType (const int &type) |
void | setScheduled (const bool &scheduled) |
void | setType (const Type &type) |
void | setUpdateModel (const bool &updateModel) |
virtual | ~CCopasiTask () |
![]() | |
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 CObjectInterface * | getObject (const CCopasiObjectName &cn) const |
virtual const objectMap & | getObjects () const |
virtual std::string | getUnits () const |
virtual const CCopasiObject * | getValueObject () const |
virtual bool | remove (CCopasiObject *pObject) |
virtual | ~CCopasiContainer () |
![]() | |
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 CCopasiObjectName | getCN () const |
virtual const DataObjectSet & | getDirectDependencies (const DataObjectSet &context=DataObjectSet()) const |
CCopasiContainer * | getObjectAncestor (const std::string &type) const |
CCopasiDataModel * | getObjectDataModel () |
const CCopasiDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName (bool regular=true, bool richtext=false) const |
const std::string & | getObjectName () const |
CCopasiContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const |
virtual Refresh * | getRefresh () const |
UpdateMethod * | getUpdateMethod () const |
virtual void * | getValuePointer () 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 () |
![]() | |
CObjectInterface () | |
virtual | ~CObjectInterface () |
Private Member Functions | |
void | cleanup () |
void | initObjects () |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CSteadyStateTask &A) |
Additional Inherited Members | |
![]() | |
enum | eOutputFlagBase { INITIALIZE = 0x01, STREAM = 0x02, FINISH = 0x04, REPORT = 0x10, PLOT = 0x20, TIME_SERIES = 0x40 } |
enum | OutputFlag { NO_OUTPUT = 0, OUTPUT_BEFORE = INITIALIZE, OUTPUT_AFTER = FINISH, OUTPUT = REPORT | PLOT | STREAM, OUTPUT_SE = REPORT | PLOT | INITIALIZE | STREAM | FINISH, OUTPUT_UI = REPORT | PLOT | TIME_SERIES | INITIALIZE | STREAM | FINISH, ONLY_TIME_SERIES = TIME_SERIES | INITIALIZE | STREAM | FINISH } |
enum | Type { steadyState = 0, timeCourse, scan, fluxMode, optimization, parameterFitting, mca, lyap, tssAnalysis, sens, moieties, crosssection, lna, unset } |
![]() | |
typedef std::multimap < std::string, CCopasiObject * > | objectMap |
![]() | |
typedef std::set< const CCopasiObject * > | DataObjectSet |
typedef std::vector< Refresh * > | DataUpdateSequence |
![]() | |
typedef std::set< const CObjectInterface * > | ObjectSet |
typedef std::vector < CObjectInterface * > | UpdateSequence |
![]() | |
static bool | isValidMethod (const unsigned int &method, const unsigned int *validMethods) |
![]() | |
static std::vector< Refresh * > | buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet()) |
static void | setRenameHandler (CRenameHandler *rh) |
![]() | |
std::string | Error |
std::string | Warning |
![]() | |
static const std::string | TypeName [] |
static const unsigned int | ValidMethods [] |
static const char * | XMLType [] |
![]() | |
static const std::vector < CCopasiContainer * > | EmptyList |
![]() | |
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 } |
![]() | |
template<class CType > | |
CCopasiObject * | addMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
template<class CType > | |
CCopasiObject * | addObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
template<class CType > | |
CCopasiObject * | addVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
void | initObjects () |
![]() | |
CCopasiObject () | |
CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0) | |
![]() | |
CDescription | mDescription |
OutputFlag | mDoOutput |
std::string | mKey |
unsigned C_INT32 | mOutputCounter |
CProcessReport * | mpCallBack |
CState * | mpInitialState |
CCopasiMethod * | mpMethod |
COutputHandler * | mpOutputHandler |
CCopasiProblem * | mpProblem |
CCopasiParameterGroup * | mpSliders |
CReport | mReport |
CResult | mResult |
bool | mScheduled |
Type | mType |
bool | mUpdateModel |
![]() | |
objectMap | mObjects |
![]() | |
static CRenameHandler * | smpRenameHandler = NULL |
Definition at line 49 of file CSteadyStateTask.h.
CSteadyStateTask::CSteadyStateTask | ( | const CCopasiContainer * | pParent = NULL | ) |
Default constructor
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 40 of file CSteadyStateTask.cpp.
References CCopasiContainer::add(), createMethod(), initObjects(), CCopasiTask::mpMethod, CCopasiTask::mpProblem, and CCopasiMethod::Newton.
CSteadyStateTask::CSteadyStateTask | ( | const CSteadyStateTask & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor
const | CSteadyStateTask & src |
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 58 of file CSteadyStateTask.cpp.
References CCopasiContainer::add(), createMethod(), CCopasiMethod::getSubType(), initObjects(), CCopasiTask::mpMethod, and CCopasiTask::mpProblem.
|
virtual |
Destructor
Definition at line 78 of file CSteadyStateTask.cpp.
References mpSteadyState, and pdelete.
|
private |
|
virtual |
Create a method of the specified type to solve the task. It is the duty of the caller to release the CCopasiMethod.
const | CCopasiMethod::SubType & type |
Reimplemented from CCopasiTask.
Definition at line 84 of file CSteadyStateTask.cpp.
References CSteadyStateMethod::createMethod().
Referenced by CSteadyStateTask().
const CEigen & CSteadyStateTask::getEigenValues | ( | ) | const |
Retrieves a the eigenvalues of the steady state.
Definition at line 156 of file CSteadyStateTask.cpp.
References mEigenValues.
Referenced by StateSubwidget::loadJacobian().
const CEigen & CSteadyStateTask::getEigenValuesReduced | ( | ) | const |
Retrieves a the eigenvalues of the steady state.
Definition at line 160 of file CSteadyStateTask.cpp.
References mEigenValuesX.
Referenced by StateSubwidget::loadJacobian(), and CLNATask::process().
Retrieves a the jacobian of the steady state.
Definition at line 141 of file CSteadyStateTask.cpp.
References mJacobian.
Referenced by CMCAMethod::createLinkMatrix().
const CArrayAnnotation * CSteadyStateTask::getJacobianAnnotated | ( | ) | const |
Definition at line 146 of file CSteadyStateTask.cpp.
References mpJacobianAnn.
Referenced by StateSubwidget::loadJacobian().
Retrieves a the jacobian of the steady state.
Definition at line 143 of file CSteadyStateTask.cpp.
References mJacobianX.
const CArrayAnnotation * CSteadyStateTask::getJacobianXAnnotated | ( | ) | const |
Definition at line 151 of file CSteadyStateTask.cpp.
References mpJacobianXAnn.
Referenced by StateSubwidget::loadJacobian().
|
inline |
Converts the eigenvalues vector to matrix
CEigen | &eigenvalues |
Definition at line 230 of file CSteadyStateTask.h.
References mResult.
Referenced by StateSubwidget::loadAll(), operator<<(), CLNATask::process(), CMCAMethod::setSteadyStateTask(), and SteadyStateWidget::taskFinishedEvent().
const CState * CSteadyStateTask::getState | ( | ) | const |
Retrieves a pointer to steady state.
Definition at line 138 of file CSteadyStateTask.cpp.
References mpSteadyState.
Referenced by StateSubwidget::loadAll(), CQSteadyStateResult::loadResult(), operator<<(), and CQSteadyStateResult::slotUpdateModel().
|
virtual |
Initialize the task. If an ostream is given this ostream is used instead of the target specified in the report. This allows nested tasks to share the same output device.
const | OutputFlag & of |
COutputHandler | * pOutputHandler |
std::ostream | * pOstream (default: NULL) |
Reimplemented from CCopasiTask.
Definition at line 220 of file CSteadyStateTask.cpp.
References CVectorCore< CType >::array(), CStateTemplate::beginIndependent(), CCopasiObject::getCN(), CStateTemplate::getEntities(), CModel::getInitialState(), CCopasiProblem::getModel(), CState::getNumDependent(), CModel::getNumDependentReactionMetabs(), CState::getNumIndependent(), CModel::getStateTemplate(), CModelEntity::getStatus(), CStateTemplate::getUserOrder(), CSteadyStateProblem::initialize(), CSteadyStateMethod::initialize(), CCopasiTask::initialize(), CCopasiMethod::isValidProblem(), mCalculateReducedSystem, mJacobian, mJacobianX, mpJacobianAnn, mpJacobianXAnn, CCopasiTask::mpMethod, CCopasiTask::mpProblem, mpSteadyState, CModelEntity::ODE, pdelete, CModelEntity::REACTIONS, CMatrix< CType >::resize(), CArrayAnnotation::resize(), CArrayAnnotation::setAnnotationCN(), CVectorCore< CType >::size(), and updateMatrices().
Referenced by CFitProblem::initialize(), CLNATask::initialize(), and CMCATask::initialize().
|
private |
Definition at line 94 of file CSteadyStateTask.cpp.
References mEigenvaluesMatrix, mEigenvaluesXMatrix, mJacobian, mJacobianX, mpEigenvaluesJacobianAnn, mpEigenvaluesJacobianXAnn, mpJacobianAnn, mpJacobianXAnn, CArrayAnnotation::OBJECTS, CArrayAnnotation::setDescription(), CArrayAnnotation::setDimensionDescription(), CArrayAnnotation::setMode(), and CArrayAnnotation::VECTOR.
Referenced by CSteadyStateTask().
void CSteadyStateTask::load | ( | CReadConfig & | configBuffer | ) |
Loads parameters for this solver with data coming from a CReadConfig object. (CReadConfig object reads an input stream)
configbuffer | reference to a CReadConfig object. |
Definition at line 128 of file CSteadyStateTask.cpp.
References CReadConfig::getVariable(), CReadConfig::LOOP, CCopasiTask::mpMethod, CCopasiTask::mpProblem, and CCopasiTask::mScheduled.
Referenced by CCopasiDataModel::loadModel().
|
virtual |
This is the output method for any object. The default implementation provided with CCopasiObject uses the ostream operator<< of the object to print the object.To override this default behavior one needs to reimplement the virtual print function.
std::ostream | * ostream |
Reimplemented from CCopasiObject.
Definition at line 126 of file CSteadyStateTask.cpp.
|
virtual |
Process the task with or without initializing to the initial state.
const | bool & useInitialValues |
Reimplemented from CCopasiTask.
Definition at line 301 of file CSteadyStateTask.cpp.
References COutputInterface::AFTER, CModel::applyInitialValues(), CMatrix< CType >::array(), COutputInterface::BEFORE, C_FLOAT64, C_INT32, CEigen::calcEigenValues(), CSteadyStateMethod::doJacobian(), CEigen::getI(), CCopasiProblem::getModel(), CEigen::getR(), CSteadyStateMethod::getStabilityResolution(), CModel::getState(), CState::getTime(), CSteadyStateProblem::isJacobianRequested(), CSteadyStateProblem::isStabilityAnalysisRequested(), CState::isValid(), mEigenValues, mEigenvaluesMatrix, mEigenValuesX, mEigenvaluesXMatrix, mJacobian, mJacobianX, CCopasiTask::mpCallBack, CCopasiTask::mpMethod, CCopasiTask::mpProblem, mpSteadyState, mResult, CSteadyStateMethod::notFound, CCopasiTask::output(), CSteadyStateMethod::process(), restore(), CState::setTime(), CVectorCore< CType >::size(), CMatrix< CType >::size(), and CEigen::stabilityAnalysis().
Referenced by CFitProblem::calculate(), CFitProblem::calculateCrossValidation(), CLNATask::process(), and CMCATask::process().
|
virtual |
Perform necessary cleanup procedures
Reimplemented from CCopasiTask.
Definition at line 422 of file CSteadyStateTask.cpp.
References CCopasiProblem::getModel(), CModel::getState(), CCopasiTask::mpProblem, mpSteadyState, CCopasiTask::mUpdateModel, CCopasiTask::restore(), CModel::setInitialState(), CModel::setState(), CModel::updateInitialValues(), and CModel::updateSimulatedValues().
Referenced by process(), CFitProblem::restore(), CLNATask::restore(), CMCATask::restore(), and CQSteadyStateResult::slotUpdateModel().
void CSteadyStateTask::setInitialState | ( | ) |
Set initial state by taking the current one.
Definition at line 416 of file CSteadyStateTask.cpp.
References CCopasiProblem::getModel(), CModel::getState(), CCopasiTask::mpProblem, and CModel::setInitialState().
|
virtual |
Resizes result matrices and updates array annotations for a specific task. This is used when we need to know about the data structures of a task result without actually performing the task, e.g. when selecting objects for output. For now we assume that this functionality is also performed when initialize() is called.
Reimplemented from CCopasiTask.
Definition at line 165 of file CSteadyStateTask.cpp.
References CVectorCore< CType >::array(), CStateTemplate::beginIndependent(), CCopasiObject::getCN(), CStateTemplate::getEntities(), CCopasiProblem::getModel(), CStateTemplate::getNumDependent(), CStateTemplate::getNumIndependent(), CModel::getStateTemplate(), CModelEntity::getStatus(), CStateTemplate::getUserOrder(), mEigenvaluesMatrix, mEigenvaluesXMatrix, mJacobian, mJacobianX, mpJacobianAnn, mpJacobianXAnn, CCopasiTask::mpProblem, CModelEntity::ODE, CModelEntity::REACTIONS, CMatrix< CType >::resize(), CArrayAnnotation::resize(), CArrayAnnotation::setAnnotationCN(), and CVectorCore< CType >::size().
Referenced by initialize().
|
friend |
Definition at line 439 of file CSteadyStateTask.cpp.
|
private |
Whether the model is actually reducible and calculating stability of the reduced steady states makes sense
Definition at line 75 of file CSteadyStateTask.h.
Referenced by initialize().
|
private |
The Eigenvalues of the Jacobian of the system
Definition at line 80 of file CSteadyStateTask.h.
Referenced by getEigenValues(), operator<<(), and process().
The Eigenvalues matrix of the Jacobian of the system
Definition at line 90 of file CSteadyStateTask.h.
Referenced by initObjects(), process(), and updateMatrices().
|
private |
The Eigenvalues of the Jacobian of the reduced system
Definition at line 85 of file CSteadyStateTask.h.
Referenced by getEigenValuesReduced(), operator<<(), and process().
The Eigenvalues matrix of the Jacobian of the reduced system
Definition at line 95 of file CSteadyStateTask.h.
Referenced by initObjects(), process(), and updateMatrices().
The jacobian of the steady state.
Definition at line 61 of file CSteadyStateTask.h.
Referenced by getJacobian(), initialize(), initObjects(), process(), and updateMatrices().
The jacobian of the steady state.
Definition at line 66 of file CSteadyStateTask.h.
Referenced by getJacobianReduced(), initialize(), initObjects(), process(), and updateMatrices().
|
private |
Definition at line 97 of file CSteadyStateTask.h.
Referenced by initObjects().
|
private |
Definition at line 98 of file CSteadyStateTask.h.
Referenced by initObjects().
|
private |
Definition at line 68 of file CSteadyStateTask.h.
Referenced by getJacobianAnnotated(), initialize(), initObjects(), operator<<(), and updateMatrices().
|
private |
Definition at line 69 of file CSteadyStateTask.h.
Referenced by getJacobianXAnnotated(), initialize(), initObjects(), operator<<(), and updateMatrices().
|
private |
A pointer to the found steady state.
Definition at line 56 of file CSteadyStateTask.h.
Referenced by getState(), initialize(), process(), restore(), and ~CSteadyStateTask().
|
private |
The result of the steady state analysis.
Definition at line 103 of file CSteadyStateTask.h.
Referenced by getResult(), and process().