COPASI API
4.40.278
|
#include <CTrajectoryTask.h>
Public Member Functions | |
CTrajectoryTask (const CDataContainer *pParent, const CTaskEnum::Task &type=CTaskEnum::Task::timeCourse) | |
CTrajectoryTask (const CTrajectoryTask &src, const CDataContainer *pParent) | |
const CTimeSeries & | getTimeSeries () const |
virtual const CTaskEnum::Method * | getValidMethods () const |
virtual bool | initialize (const OutputFlag &of, COutputHandler *pOutputHandler, std::ostream *pOstream) |
void | load (CReadConfig &configBuffer) |
virtual bool | process (const bool &useInitialValues) |
bool | processStart (const bool &useInitialValues) |
bool | processStep (const C_FLOAT64 &nextTime, const bool &final=false) |
virtual bool | processTrajectory (const bool &useInitialValues) |
virtual bool | processValues (const bool &useInitialValues) |
~CTrajectoryTask () | |
Public Member Functions inherited from CCopasiTask | |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
CCopasiTask (const CCopasiTask &src, const CDataContainer *pParent) | |
CCopasiTask (const CDataContainer *pParent, const CTaskEnum::Task &taskType, const std::string &type="Task") | |
void | cleanup () |
virtual void | clearCallBack () |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const |
const CProcessReportLevel & | getCallBack () const |
const CDescription & | getDescription () const |
virtual const std::string & | getKey () const |
CMathContainer * | getMathContainer () const |
CCopasiMethod * | getMethod () |
const CCopasiMethod * | getMethod () const |
COutputHandler * | getOutputHandler () const |
const OutputFlag & | getOutputMode () const |
CCopasiProblem * | getProblem () |
const CCopasiProblem * | getProblem () const |
CReport & | getReport () |
const CReport & | getReport () const |
const CResult & | getResult () const |
CCopasiParameterGroup * | getSliders () |
CTaskEnum::Task | getType () const |
const bool & | isScheduled () const |
const bool & | isUpdateModel () const |
virtual void | output (const COutputInterface::Activity &activity) |
virtual bool | restore (const bool &updateModel=true) |
virtual void | separate (const COutputInterface::Activity &activity) |
virtual bool | setCallBack (CProcessReportLevel callBack) |
void | setIgnoreProblemData (const bool &ignoreProblemData) |
void | setMathContainer (CMathContainer *pContainer) |
bool | setMethodType (const CTaskEnum::Method &type) |
void | setScheduled (const bool &scheduled) |
void | setType (const CTaskEnum::Task &type) |
virtual void | setUpdateModel (const bool &updateModel) |
virtual CData | toData () const |
virtual bool | updateMatrices () |
virtual | ~CCopasiTask () |
Public Member Functions inherited from CDataContainer | |
virtual bool | add (CDataObject *pObject, const bool &adopt=true) |
virtual bool | appendDeletedDependentData (CUndoData &undoData) const |
CDataContainer (const CDataContainer &src, const CDataContainer *pParent) | |
CDataContainer (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
virtual std::string | getChildObjectUnits (const CDataObject *pObject) const |
void | getDescendants (CDataObject::DataObjectSet &descendants, const bool &recursive=false) const |
virtual size_t | getIndex (const CDataObject *pObject) const |
virtual const CObjectInterface * | getObject (const CCommonName &cn) const override |
virtual objectMap & | getObjects () |
virtual const objectMap & | getObjects () const |
virtual const std::string | getUnits () const override |
virtual const CDataObject * | getValueObject () const override |
virtual CUndoObjectInterface * | insert (const CData &data) override |
void | objectRenamed (CDataObject *pObject, const std::string &oldName) |
virtual bool | remove (CDataObject *pObject) |
virtual | ~CDataContainer () |
Public Member Functions inherited from CDataObject | |
void | addIssue (const CIssue &issue) |
void | addReference (const CDataContainer *pReference) |
virtual void | calculateValue () override |
CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL) | |
virtual void | destruct () override |
virtual CCommonName | getCN () const override |
virtual const CDataObject * | getDataObject () const override |
CDataContainer * | getObjectAncestor (const std::string &type) const |
CDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName () const override |
const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
const std::string & | getObjectName () const |
CDataContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
virtual const CValidity & | getValidity () const override |
virtual void * | getValuePointer () const override |
bool | hasFlag (const Flag &flag) const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override |
bool | prerequisitsContains (const DataObjectSet &objects) const |
virtual void | print (std::ostream *ostream) const override |
void | removeIssue (const CIssue &issue) |
void | removeReference (const CDataContainer *pReference) |
bool | setObjectName (const std::string &name) |
virtual bool | setObjectParent (const CDataContainer *pParent) |
void | validityChanged (const CValidity &changedValidity) override |
void | validityRemoved (const CValidity &changedValidity) |
virtual | ~CDataObject () |
Public Member Functions inherited from CObjectInterface | |
CObjectInterface () | |
CObjectInterface (const CObjectInterface &src) | |
virtual | ~CObjectInterface () |
Public Member Functions inherited from CUndoObjectInterface | |
CUndoObjectInterface () | |
CUndoObjectInterface (const CUndoObjectInterface &src) | |
bool | generateUuid () |
const xg::Guid & | getUuid () const |
bool | setUuid (const std::string &uuid) |
bool | setUuid (const xg::Guid &uuid) |
virtual void | updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject) |
virtual | ~CUndoObjectInterface () |
Static Public Attributes | |
static const CTaskEnum::Method | ValidMethods [] |
Static Public Attributes inherited from CDataContainer | |
static const CObjectInterface::ContainerList | EmptyList |
Protected Member Functions | |
virtual void | signalMathContainerChanged () |
virtual void | signalMethodChanged () |
Protected Member Functions inherited from CCopasiTask | |
bool | isTaskValid () const |
Protected Member Functions inherited from CDataContainer | |
template<class CType > | |
CDataMatrixReference< CType > * | addMatrixReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataObjectReference< CType > * | addObjectReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataVectorReference< CType > * | addVectorReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
CDataContainer (const CDataContainer &src) | |
void | initObjects () |
Protected Member Functions inherited from CDataObject | |
CDataObject () | |
CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
Private Member Functions | |
void | cleanup () |
CTrajectoryTask () | |
Additional Inherited Members | |
Public Types inherited from CCopasiTask | |
enum | eOutputFlagBase { INITIALIZE = 0x01 , STREAM = 0x02 , FINISH = 0x04 , REPORT = 0x10 , PLOT = 0x20 , TIME_SERIES = 0x40 } |
enum | OutputFlag { NO_OUTPUT = 0 , OUTPUT_BEFORE = INITIALIZE , OUTPUT_DURING = STREAM , 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 } |
Public Types inherited from CDataContainer | |
typedef CDataObjectMap | objectMap |
Public Types inherited from CDataObject | |
typedef std::set< const CDataObject * > | DataObjectSet |
enum | Flag { Container , Vector , Matrix , NameVector , Reference , ValueBool , ValueInt , ValueInt64 , ValueDbl , NonUniqueName , StaticString , ValueString , Separator , DisplayName , ModelEntity , Array , DataModel , Root , Gui , __SIZE } |
Public Types inherited from CObjectInterface | |
typedef std::vector< const CDataContainer * > | ContainerList |
typedef std::set< const CObjectInterface * > | ObjectSet |
Static Public Member Functions inherited from CCopasiTask | |
static CCopasiTask * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static bool | isValidMethod (const CTaskEnum::Method &method, const CTaskEnum::Method *validMethods) |
Static Public Member Functions inherited from CDataContainer | |
static CDataContainer * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataObject | |
static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
Static Public Member Functions inherited from CUndoObjectInterface | |
template<class CType > | |
static CType * | fromData (const CData &, CUndoObjectInterface *) |
Public Attributes inherited from CCopasiTask | |
std::string | Error |
std::string | Warning |
|
private |
Default constructor
CTrajectoryTask::CTrajectoryTask | ( | const CDataContainer * | pParent, |
const CTaskEnum::Task & | type = CTaskEnum::Task::timeCourse |
||
) |
Specific constructor
const | CDataContainer * pParent |
const | CTaskEnum::Task & type (default: timeCourse) |
References CMethodFactory::create(), CTaskEnum::deterministic, CCopasiTask::getType(), CCopasiTask::mpMethod, mUpdateMoieties, and signalMathContainerChanged().
CTrajectoryTask::CTrajectoryTask | ( | const CTrajectoryTask & | src, |
const CDataContainer * | pParent | ||
) |
Copy constructor
const | CTrajectoryTask & src |
const | CDataContainer * pParent (default: NULL) |
References CCopasiTask::mpMethod, mUpdateMoieties, and signalMathContainerChanged().
CTrajectoryTask::~CTrajectoryTask | ( | ) |
Destructor
References cleanup().
|
private |
Referenced by ~CTrajectoryTask().
const CTimeSeries & CTrajectoryTask::getTimeSeries | ( | ) | const |
gets a reference to the time series
References mTimeSeries.
Referenced by CTrajectoryProblem::printResult().
|
virtual |
Retrieve the list of valid methods
Reimplemented from CCopasiTask.
Reimplemented in CCrossSectionTask, and CAnalyticsTask.
References ValidMethods.
|
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.
Reimplemented in CCrossSectionTask, and CAnalyticsTask.
References COutputHandler::addInterface(), CTimeSeries::allocate(), CTimeSeries::clear(), CDataObject::getObjectDataModel(), CTrajectoryProblem::getStartInSteadyState(), CTrajectoryProblem::getStepNumber(), CDataModel::getTaskList(), CCopasiTask::initialize(), CSteadyStateTask::initialize(), CCopasiMethod::isValidProblem(), CCopasiTask::mpMethod, CCopasiTask::mpProblem, mpSteadyState, mpTrajectoryMethod, mpTrajectoryProblem, mTimeSeries, mTimeSeriesRequested, mUpdateMoieties, CTrajectoryMethod::setProblem(), signalMathContainerChanged(), CCopasiTask::TIME_SERIES, and CTrajectoryProblem::timeSeriesRequested().
Referenced by CFitProblem::initialize(), CNewtonMethod::initialize(), CAnalyticsTask::initialize(), and CCrossSectionTask::initialize().
void CTrajectoryTask::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. |
References CMethodFactory::create(), CTaskEnum::deterministic, CCopasiTask::getType(), CReadConfig::getVariable(), CReadConfig::LOOP, CCopasiTask::mpMethod, CCopasiTask::mpProblem, CCopasiTask::mScheduled, mUpdateMoieties, and pdelete.
Referenced by CDataModel::loadModel().
|
virtual |
Process the task with or without initializing to the initial state.
const | bool & useInitialValues |
Reimplemented from CCopasiTask.
Reimplemented in CCrossSectionTask, and CAnalyticsTask.
References CTrajectoryProblem::getUseValues(), mpTrajectoryProblem, processTrajectory(), and processValues().
Referenced by CNewtonMethod::doIntegration().
bool CTrajectoryTask::processStart | ( | const bool & | useInitialValues | ) |
Starts the process of integration by calling CTrajectoryMethod::start
const | bool & useInitialValues |
References CMathContainer::applyInitialValues(), CVectorCore< CType >::array(), CCopasiMessage::ERROR, CMathContainer::getCountFixedEventTargets(), CTrajectoryProblem::getStartInSteadyState(), CMathContainer::getState(), CVectorCore< CType >::initialize(), mContainerState, CCopasiTask::mpContainer, mpContainerStateTime, mpSteadyState, mpTrajectoryMethod, mpTrajectoryProblem, mUpdateMoieties, CSteadyStateTask::process(), and CTrajectoryMethod::start().
Referenced by CFitProblem::calculate(), CFitProblem::calculateCrossValidation(), CAnalyticsTask::process(), CCrossSectionTask::process(), processTrajectory(), and processValues().
bool CTrajectoryTask::processStep | ( | const C_FLOAT64 & | nextTime, |
const bool & | final = false |
||
) |
Integrates one step
const | C_FLOAT64 & nextTime |
const | bool & final (default: false) |
References C_FLOAT64, COutputInterface::DURING, CCopasiMessage::EXCEPTION, CTrajectoryMethod::FAILURE, CTrajectoryProblem::getAutomaticStepSize(), CTrajectoryProblem::getOutputEvent(), CMathContainer::getProcessQueueExecutionTime(), CTrajectoryMethod::getRoots(), CMathContainer::getState(), mContainerState, MCTrajectoryMethod, min, mOutputStartTime, CCopasiTask::mpContainer, mpContainerStateTime, mpLessOrEqual, CCopasiTask::mProcessReport, mpTrajectoryMethod, mpTrajectoryProblem, mUpdateMoieties, CFlags< eStateChange >::None, CTrajectoryMethod::NORMAL, CCopasiTask::output(), CProcessReportLevel::proceed(), CMathContainer::processQueue(), CMathContainer::processRoots(), CTrajectoryMethod::ROOT, CMathContainer::setState(), CTrajectoryMethod::stateChange(), CTrajectoryMethod::step(), CMathContainer::updateRootValues(), and CMathContainer::updateSimulatedValues().
Referenced by CFitProblem::calculate(), CFitProblem::calculateCrossValidation(), CAnalyticsTask::process(), CCrossSectionTask::process(), processTrajectory(), and processValues().
|
virtual |
References CProcessReportLevel::addItem(), COutputInterface::AFTER, COutputInterface::BEFORE, bl(), ble(), C_FLOAT64, C_INT32, C_INVALID_INDEX, COutputInterface::DURING, CCopasiMessage::ERROR, CCopasiMessage::EXCEPTION, CProcessReportLevel::finishItem(), fl(), fle(), CTrajectoryProblem::getAutomaticStepSize(), CTrajectoryProblem::getDuration(), CCopasiException::getMessage(), CTrajectoryProblem::getOutputStartTime(), CMathContainer::getState(), CTrajectoryProblem::getStepSize(), mContainerState, MCTrajectoryMethod, MCTrajectoryProblem, min, mOutputStartTime, CCopasiTask::mpContainer, mpContainerStateTime, mpLess, mpLessOrEqual, CCopasiTask::mProcessReport, mpTrajectoryMethod, mpTrajectoryProblem, mUpdateMoieties, CCopasiTask::output(), CMathContainer::processQueue(), processStart(), processStep(), CProcessReportLevel::progressItem(), CMathContainer::pushAllTransientValues(), CProcessReportLevel::setName(), CMathContainer::setState(), CTrajectoryMethod::stateChange(), CMathContainer::updateSimulatedValues(), and CMathContainer::updateTransientDataValues().
Referenced by process().
|
virtual |
References CProcessReportLevel::addItem(), COutputInterface::AFTER, COutputInterface::BEFORE, C_FLOAT64, C_INVALID_INDEX, COutputInterface::DURING, CCopasiMessage::ERROR, CCopasiMessage::EXCEPTION, CProcessReportLevel::finishItem(), fl(), fle(), CCopasiException::getMessage(), CTrajectoryProblem::getOutputStartTime(), CMathContainer::getState(), CTrajectoryProblem::getValues(), mContainerState, MCTrajectoryMethod, MCTrajectoryProblem, min, mOutputStartTime, CCopasiTask::mpContainer, mpContainerStateTime, mpLess, mpLessOrEqual, CCopasiTask::mProcessReport, mpTrajectoryMethod, mpTrajectoryProblem, mUpdateMoieties, CCopasiTask::output(), CMathContainer::processQueue(), processStart(), processStep(), CProcessReportLevel::progressItem(), CMathContainer::pushAllTransientValues(), CProcessReportLevel::setName(), CMathContainer::setState(), CTrajectoryMethod::stateChange(), CMathContainer::updateSimulatedValues(), and CMathContainer::updateTransientDataValues().
Referenced by process().
|
protectedvirtual |
Signal that the math container has changed
Reimplemented from CCopasiTask.
References CVectorCore< CType >::array(), CMathContainer::getCountFixedEventTargets(), CMathContainer::getState(), CVectorCore< CType >::initialize(), mContainerState, CCopasiTask::mpContainer, mpContainerStateTime, and mUpdateMoieties.
Referenced by CTrajectoryTask(), initialize(), and CCrossSectionTask::removeEvent().
|
protectedvirtual |
Signal that the method has changed
Reimplemented from CCopasiTask.
References CCopasiTask::mpMethod, and mUpdateMoieties.
|
protected |
The current state of the integration.
Referenced by CAnalyticsTask::eventCallBack(), CCrossSectionTask::eventCallBack(), CAnalyticsTask::process(), CCrossSectionTask::process(), processStart(), processStep(), processTrajectory(), processValues(), and signalMathContainerChanged().
|
protected |
A pointer to the time at which the output starts.
Referenced by CAnalyticsTask::eventCallBack(), CCrossSectionTask::eventCallBack(), CAnalyticsTask::process(), CCrossSectionTask::process(), processStep(), processTrajectory(), and processValues().
|
protected |
A pointer to the current time of the integration.
Referenced by CAnalyticsTask::eventCallBack(), CCrossSectionTask::eventCallBack(), CAnalyticsTask::finish(), CAnalyticsTask::process(), CCrossSectionTask::process(), processStart(), processStep(), processTrajectory(), processValues(), and signalMathContainerChanged().
A pointer to less comparison
Referenced by processTrajectory(), and processValues().
A pointer to lessOrEqual comparison
Referenced by processStep(), processTrajectory(), and processValues().
|
protected |
Pointer to CSteadyStateTask. To be used in processStart() to start simulation in steady state
Referenced by initialize(), and processStart().
|
protected |
A pointer to the trajectory method
Referenced by initialize(), processStart(), processStep(), processTrajectory(), and processValues().
|
protected |
A pointer to the trajectory Problem
Referenced by initialize(), process(), processStart(), processStep(), processTrajectory(), and processValues().
|
protected |
the time series (if requested)
Referenced by getTimeSeries(), and initialize().
|
protected |
whether the time series should be stored in mTimeSeries
Referenced by initialize().
|
protected |
Indicates whether we need to update moieties.
Referenced by CTrajectoryTask(), CAnalyticsTask::eventCallBack(), CCrossSectionTask::eventCallBack(), initialize(), load(), CAnalyticsTask::process(), CCrossSectionTask::process(), processStart(), processStep(), processTrajectory(), processValues(), signalMathContainerChanged(), and signalMethodChanged().
|
static |
Referenced by getValidMethods(), CAnalyticsTask::getValidMethods(), and CCrossSectionTask::getValidMethods().