COPASI API
4.16.103
|
#include <CLyapTask.h>
Public Member Functions | |
const C_FLOAT64 & | averageDivergence () const |
CLyapTask (const CCopasiContainer *pParent=NULL) | |
virtual CCopasiMethod * | createMethod (const int &type) const |
const CVector< C_FLOAT64 > & | exponents () const |
virtual bool | initialize (const OutputFlag &of, COutputHandler *pOutputHandler, std::ostream *pOstream) |
bool | methodCallback (const C_FLOAT64 &percentage, bool onlyProgress) |
size_t | modelVariablesInResult () const |
size_t | numberOfExponentsCalculated () const |
void | printResult (std::ostream *ostream) const |
virtual bool | process (const bool &useInitialValues) |
virtual bool | restore () |
bool | resultAvailable () const |
bool | resultHasDivergence () const |
virtual bool | setMethodType (const int &type) |
const C_FLOAT64 & | sumOfExponents () const |
~CLyapTask () | |
![]() | |
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) |
void | setScheduled (const bool &scheduled) |
void | setType (const Type &type) |
void | setUpdateModel (const bool &updateModel) |
virtual bool | updateMatrices () |
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 |
virtual void | print (std::ostream *ostream) 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 | calculationsBeforeOutput () |
void | cleanup () |
void | initObjects () |
Private Attributes | |
C_FLOAT64 | mAverageDivergence |
CVector< C_FLOAT64 > | mExponents |
size_t | mhProcess |
C_FLOAT64 | mIntervalDivergence |
CVector< C_FLOAT64 > | mLocalExponents |
size_t | mModelVariablesInResult |
size_t | mNumExponentsCalculated |
C_FLOAT64 | mPercentage |
CLyapMethod * | mpLyapMethod |
CLyapProblem * | mpLyapProblem |
bool | mResultAvailable |
bool | mResultHasDivergence |
C_FLOAT64 | mSumOfExponents |
C_FLOAT64 | mSumOfLocalExponents |
std::vector < CCopasiObjectReference < C_FLOAT64 > * > | mvExpRef |
std::vector < CCopasiObjectReference < C_FLOAT64 > * > | mvLocExpRef |
Friends | |
class | CLyapWolfMethod |
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 38 of file CLyapTask.h.
CLyapTask::CLyapTask | ( | const CCopasiContainer * | pParent = NULL | ) |
Default constructor
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 52 of file CLyapTask.cpp.
References CCopasiContainer::add(), CLyapMethod::createMethod(), initObjects(), CCopasiMethod::lyapWolf, CCopasiTask::mpMethod, and CCopasiTask::mpProblem.
CLyapTask::~CLyapTask | ( | ) |
|
inline |
Definition at line 135 of file CLyapTask.h.
References mAverageDivergence.
Referenced by CQLyapResultWidget::loadFromBackend().
|
private |
this does calculations that need to be done before output: sum of exponents, divergence, ...
Definition at line 278 of file CLyapTask.cpp.
References C_INT32, CLyapProblem::getExponentNumber(), mExponents, mLocalExponents, mpLyapProblem, mSumOfExponents, and mSumOfLocalExponents.
Referenced by methodCallback(), and process().
|
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 253 of file CLyapTask.cpp.
References CLyapMethod::createMethod().
Referenced by setMethodType().
Definition at line 126 of file CLyapTask.h.
References mExponents.
Referenced by CQLyapResultWidget::loadFromBackend().
|
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 125 of file CLyapTask.cpp.
References CVectorCore< CType >::array(), CLyapProblem::getExponentNumber(), CCopasiTask::initialize(), CCopasiMethod::isValidProblem(), LYAP_NUM_REF, mExponents, mLocalExponents, mpLyapMethod, mpLyapProblem, CCopasiTask::mpMethod, CCopasiTask::mpProblem, mvExpRef, mvLocExpRef, CVector< CType >::resize(), and CLyapMethod::setProblem().
|
private |
Definition at line 84 of file CLyapTask.cpp.
References CCopasiContainer::addObjectReference(), CCopasiContainer::addVectorReference(), CVectorCore< CType >::array(), LYAP_NUM_REF, mAverageDivergence, mExponents, mIntervalDivergence, mLocalExponents, mSumOfExponents, mSumOfLocalExponents, mvExpRef, mvLocExpRef, CVector< CType >::resize(), and CCopasiObject::ValueDbl.
Referenced by CLyapTask().
bool CLyapTask::methodCallback | ( | const C_FLOAT64 & | percentage, |
bool | onlyProgress | ||
) |
This is called by the method to generate the output and update the progress bar. The parameter is the percentage for the progress bar. The return value is the return value of the progress bar handler (and determines if the calculation will be stopped). If onlyProgess is true, no output is done.
Definition at line 260 of file CLyapTask.cpp.
References calculationsBeforeOutput(), COutputInterface::DURING, mhProcess, CCopasiTask::mpCallBack, mPercentage, CCopasiTask::output(), and CProcessReport::progressItem().
Referenced by CLyapWolfMethod::calculate().
size_t CLyapTask::modelVariablesInResult | ( | ) | const |
how many independent variables had the model at the time of the last calculation?
Definition at line 330 of file CLyapTask.cpp.
References mModelVariablesInResult.
Referenced by CQLyapResultWidget::loadFromBackend().
size_t CLyapTask::numberOfExponentsCalculated | ( | ) | const |
Definition at line 335 of file CLyapTask.cpp.
References mNumExponentsCalculated.
Referenced by CQLyapResultWidget::loadFromBackend().
void CLyapTask::printResult | ( | std::ostream * | ostream | ) | const |
This functionality is expected from CLyapProblem but has to be implmented here for the moment. This is called from the corresponding method of the problem
Definition at line 292 of file CLyapTask.cpp.
References C_INT32, CLyapProblem::divergenceRequested(), CLyapProblem::getExponentNumber(), mAverageDivergence, mExponents, and mpLyapProblem.
Referenced by CLyapProblem::printResult(), and CQLyapResultWidget::saveToFile().
|
virtual |
Process the task with or without initializing to the initial state.
const | bool & useInitialValues |
Reimplemented from CCopasiTask.
Definition at line 168 of file CLyapTask.cpp.
References CProcessReport::addItem(), COutputInterface::AFTER, CModel::applyInitialValues(), COutputInterface::BEFORE, C_FLOAT64, CLyapMethod::calculate(), calculationsBeforeOutput(), CLyapProblem::divergenceRequested(), COutputInterface::DURING, CProcessReport::finishItem(), CLyapProblem::getExponentNumber(), CCopasiException::getMessage(), CCopasiProblem::getModel(), CState::getNumIndependent(), CModel::getState(), mhProcess, mModelVariablesInResult, mNumExponentsCalculated, CCopasiTask::mpCallBack, mPercentage, mpLyapMethod, mpLyapProblem, mResultAvailable, mResultHasDivergence, CCopasiTask::output(), CProcessReport::setName(), and CModel::updateSimulatedValues().
|
virtual |
Perform neccessary cleaup procedures
Reimplemented from CCopasiTask.
Definition at line 219 of file CLyapTask.cpp.
References CCopasiProblem::getModel(), CModel::getState(), CCopasiTask::mpProblem, CCopasiTask::mUpdateModel, CCopasiTask::restore(), CModel::setInitialState(), CModel::updateInitialValues(), and CModel::updateSimulatedValues().
bool CLyapTask::resultAvailable | ( | ) | const |
Definition at line 320 of file CLyapTask.cpp.
References mResultAvailable.
Referenced by CQLyapResultWidget::loadFromBackend().
bool CLyapTask::resultHasDivergence | ( | ) | const |
was divergence requested for the last calculation?
Definition at line 325 of file CLyapTask.cpp.
References mResultHasDivergence.
Referenced by CQLyapResultWidget::loadFromBackend().
|
virtual |
Set the method type applied to solve the task
const | CCopasiMethod::SubType & type |
Reimplemented from CCopasiTask.
Definition at line 237 of file CLyapTask.cpp.
References CCopasiContainer::add(), createMethod(), CCopasiMethod::getSubType(), CLyapMethod::isValidSubType(), CCopasiTask::mpMethod, and pdelete.
|
inline |
Definition at line 132 of file CLyapTask.h.
References mSumOfExponents.
Referenced by CQLyapResultWidget::loadFromBackend().
|
friend |
Definition at line 40 of file CLyapTask.h.
|
private |
Divergence averaged over the whole integration time
Definition at line 72 of file CLyapTask.h.
Referenced by averageDivergence(), CLyapWolfMethod::calculate(), initObjects(), printResult(), and CLyapWolfMethod::start().
Definition at line 59 of file CLyapTask.h.
Referenced by CLyapWolfMethod::calculate(), calculationsBeforeOutput(), exponents(), initialize(), initObjects(), printResult(), and CLyapWolfMethod::start().
|
private |
Definition at line 76 of file CLyapTask.h.
Referenced by methodCallback(), and process().
|
private |
Divergence averaged over the last orthonormalization interval
Definition at line 67 of file CLyapTask.h.
Referenced by CLyapWolfMethod::calculate(), initObjects(), and CLyapWolfMethod::start().
Vectors with the result
Definition at line 58 of file CLyapTask.h.
Referenced by CLyapWolfMethod::calculate(), calculationsBeforeOutput(), initialize(), initObjects(), and CLyapWolfMethod::start().
|
private |
Definition at line 84 of file CLyapTask.h.
Referenced by modelVariablesInResult(), and process().
|
private |
Definition at line 85 of file CLyapTask.h.
Referenced by numberOfExponentsCalculated(), and process().
|
private |
Definition at line 75 of file CLyapTask.h.
Referenced by methodCallback(), and process().
|
private |
A pointer to the trajectory method
Definition at line 53 of file CLyapTask.h.
Referenced by initialize(), and process().
|
private |
A pointer to the trajectory Problem
Definition at line 48 of file CLyapTask.h.
Referenced by calculationsBeforeOutput(), initialize(), printResult(), and process().
|
private |
Definition at line 82 of file CLyapTask.h.
Referenced by process(), and resultAvailable().
|
private |
Definition at line 83 of file CLyapTask.h.
Referenced by process(), and resultHasDivergence().
|
private |
Definition at line 61 of file CLyapTask.h.
Referenced by calculationsBeforeOutput(), initObjects(), and sumOfExponents().
|
private |
Definition at line 62 of file CLyapTask.h.
Referenced by calculationsBeforeOutput(), and initObjects().
|
private |
Definition at line 79 of file CLyapTask.h.
Referenced by initialize(), and initObjects().
|
private |
Definition at line 80 of file CLyapTask.h.
Referenced by initialize(), and initObjects().