COPASI API  4.40.278
CAnalyticsTask Class Reference

#include <CAnalyticsTask.h>

Inheritance diagram for CAnalyticsTask:
[legend]

Public Member Functions

 CAnalyticsTask (const CAnalyticsTask &src, const CDataContainer *pParent=NULL)
 
 CAnalyticsTask (const CDataContainer *pParent, const CTaskEnum::Task &type=CTaskEnum::Task::analytics)
 
void createEvent ()
 
virtual const CTaskEnum::MethodgetValidMethods () const override
 
virtual bool initialize (const OutputFlag &of, COutputHandler *pOutputHandler, std::ostream *pOstream) override
 
virtual bool process (const bool &useInitialValues) override
 
void removeEvent ()
 
virtual bool restore (const bool &updateModel=true) override
 
 ~CAnalyticsTask ()
 
- Public Member Functions inherited from CTrajectoryTask
 CTrajectoryTask (const CDataContainer *pParent, const CTaskEnum::Task &type=CTaskEnum::Task::timeCourse)
 
 CTrajectoryTask (const CTrajectoryTask &src, const CDataContainer *pParent)
 
const CTimeSeriesgetTimeSeries () const
 
void load (CReadConfig &configBuffer)
 
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 CProcessReportLevelgetCallBack () const
 
const CDescriptiongetDescription () const
 
virtual const std::string & getKey () const
 
CMathContainergetMathContainer () const
 
CCopasiMethodgetMethod ()
 
const CCopasiMethodgetMethod () const
 
COutputHandlergetOutputHandler () const
 
const OutputFlaggetOutputMode () const
 
CCopasiProblemgetProblem ()
 
const CCopasiProblemgetProblem () const
 
CReportgetReport ()
 
const CReportgetReport () const
 
const CResultgetResult () const
 
CCopasiParameterGroupgetSliders ()
 
CTaskEnum::Task 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 (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 CObjectInterfacegetObject (const CCommonName &cn) const override
 
virtual objectMapgetObjects ()
 
virtual const objectMapgetObjects () const
 
virtual const std::string getUnits () const override
 
virtual const CDataObjectgetValueObject () const override
 
virtual CUndoObjectInterfaceinsert (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 CDataObjectgetDataObject () const override
 
CDataContainergetObjectAncestor (const std::string &type) const
 
CDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName () const override
 
const CObjectInterfacegetObjectFromCN (const CCommonName &cn) const
 
const std::string & getObjectName () const
 
CDataContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const CObjectInterface::ObjectSetgetPrerequisites () const override
 
virtual const CValiditygetValidity () 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 ()
 

Private Types

enum  STATE { TRANSIENT = 0 , MAIN , FINISH }
 

Private Member Functions

 CAnalyticsTask ()
 
void computeSelectedStatistics (std::vector< C_FLOAT64 >, std::vector< C_FLOAT64 >)
 
void eventCallBack (void *pData, void *pCaller)
 
void finish ()
 
void initObjects ()
 
C_FLOAT64 relativeDifferenceOfStates (const CVectorCore< C_FLOAT64 > &s1, const CVectorCore< C_FLOAT64 > &s2)
 
void setEventCallback (const bool &set)
 

Private Attributes

C_FLOAT64 mAverageFreq
 
C_FLOAT64 mAveragePeriod
 
C_FLOAT64 mFreq
 
size_t mhProgress
 
size_t mIndex
 
C_FLOAT64 mLastFreq
 
C_FLOAT64 mLastPeriod
 
size_t mMaxNumCrossings
 
size_t mNumCrossings
 
size_t mOutputStartNumCrossings
 
CAnalyticsProblemmpAnalyticsProblem
 
C_FLOAT64 mPeriod
 
C_INT mPeriodicity
 
CMathEventmpEvent
 
CCallbackInterfacempEventCallback
 
CDataObjectmpObjectRate
 
CDataObjectmpObjectSelected
 
CDataArraympResultAnnotation
 
C_FLOAT64 mPreviousCrossingTime
 
C_FLOAT64 mProgressFactor
 
C_FLOAT64 mProgressMax
 
C_FLOAT64 mProgressValue
 
const CDataObjectmpSelectedObject
 
CDataArraympStatValAnn
 
C_FLOAT64 mStartTime
 
STATE mState
 
std::vector< CVector< C_FLOAT64 > > mStatesRing
 
size_t mStatesRingCounter
 
C_FLOAT64 mStatTime
 
C_FLOAT64 mStatVal
 
std::vector< C_FLOAT64mTimes
 
std::vector< C_FLOAT64mValues
 
std::vector< CVector< C_FLOAT64 > > mValuesSeries
 
CStatisticspStats
 
CStatisticspStatsTime
 

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 CCopasiTaskfromData (const CData &data, CUndoObjectInterface *pParent)
 
static bool isValidMethod (const CTaskEnum::Method &method, const CTaskEnum::Method *validMethods)
 
- Static Public Member Functions inherited from CDataContainer
static CDataContainerfromData (const CData &data, CUndoObjectInterface *pParent)
 
- Static Public Member Functions inherited from CDataObject
static CDataObjectfromData (const CData &data, CUndoObjectInterface *pParent)
 
static void sanitizeObjectName (std::string &name)
 
- Static Public Member Functions inherited from CObjectInterface
static const CDataObjectDataObject (const CObjectInterface *pInterface)
 
static CObjectInterfaceGetObjectFromCN (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
 
- Static Public Attributes inherited from CTrajectoryTask
static const CTaskEnum::Method ValidMethods []
 
- Static Public Attributes inherited from CDataContainer
static const CObjectInterface::ContainerList EmptyList
 
- Protected Member Functions inherited from CTrajectoryTask
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)
 
- Protected Attributes inherited from CTrajectoryTask
CVectorCore< C_FLOAT64mContainerState
 
C_FLOAT64 mOutputStartTime
 
C_FLOAT64mpContainerStateTime
 
bool(* mpLess )(const C_FLOAT64 &, const C_FLOAT64 &)
 
bool(* mpLessOrEqual )(const C_FLOAT64 &, const C_FLOAT64 &)
 
CSteadyStateTaskmpSteadyState
 
CTrajectoryMethodmpTrajectoryMethod
 
CTrajectoryProblemmpTrajectoryProblem
 
CTimeSeries mTimeSeries
 
bool mTimeSeriesRequested
 
bool mUpdateMoieties
 
- Protected Attributes inherited from CCopasiTask
CDescription mDescription
 
OutputFlag mDoOutput
 
bool mIgnoreProblemData
 
CVector< C_FLOAT64mInitialState
 
std::string mKey
 
unsigned C_INT32 mOutputCounter
 
CMathContainermpContainer
 
CCopasiMethodmpMethod
 
COutputHandlermpOutputHandler
 
CCopasiProblemmpProblem
 
CProcessReportLevel mProcessReport
 
CCopasiParameterGroupmpSliders
 
CReport mReport
 
CResult mResult
 
bool mScheduled
 
CTaskEnum::Task mType
 
bool mUpdateModel
 
- Protected Attributes inherited from CDataContainer
objectMap mObjects
 
- Protected Attributes inherited from CDataObject
ObjectSet mPrerequisits
 
std::set< CDataContainer * > mReferences
 
- Protected Attributes inherited from CObjectInterface
CValidity mValidity
 

Member Enumeration Documentation

◆ STATE

enum CAnalyticsTask::STATE
private

describes the internal state of the calculation

Enumerator
TRANSIENT 
MAIN 
FINISH 

Constructor & Destructor Documentation

◆ CAnalyticsTask() [1/3]

CAnalyticsTask::CAnalyticsTask ( )
private

Default constructor

◆ CAnalyticsTask() [2/3]

CAnalyticsTask::CAnalyticsTask ( const CDataContainer pParent,
const CTaskEnum::Task type = CTaskEnum::Task::analytics 
)

Specific constructor

Parameters
constCDataContainer * pParent
constCTaskEnum::Task & type (default: analytics)

CAnalyticsTask class.

This class implements a cross section task.

References CMethodFactory::create(), CTaskEnum::deterministic, CCopasiTask::getType(), initObjects(), and CCopasiTask::mpMethod.

◆ CAnalyticsTask() [3/3]

CAnalyticsTask::CAnalyticsTask ( const CAnalyticsTask src,
const CDataContainer pParent = NULL 
)

Copy constructor

Parameters
constCAnalyticsTask & src
constCDataContainer * pParent (default: NULL)

References initObjects().

◆ ~CAnalyticsTask()

CAnalyticsTask::~CAnalyticsTask ( )

Destructor

References mpEventCallback, and pdelete.

Member Function Documentation

◆ computeSelectedStatistics()

void CAnalyticsTask::computeSelectedStatistics ( std::vector< C_FLOAT64 mValues,
std::vector< C_FLOAT64 mTimes 
)
private

◆ createEvent()

◆ eventCallBack()

◆ finish()

void CAnalyticsTask::finish ( )
private

◆ getValidMethods()

const CTaskEnum::Method * CAnalyticsTask::getValidMethods ( ) const
overridevirtual

Retrieve the list of valid methods

Returns
const CTaskEnum::Method * pValidMethods

Reimplemented from CTrajectoryTask.

References CTaskEnum::deterministic, CTaskEnum::UnsetMethod, and CTrajectoryTask::ValidMethods.

◆ initialize()

bool CAnalyticsTask::initialize ( const OutputFlag of,
COutputHandler pOutputHandler,
std::ostream *  pOstream 
)
overridevirtual

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.

Parameters
constOutputFlag & of
COutputHandler* pOutputHandler
std::ostream* pOstream (default: NULL)
Returns
bool success

Reimplemented from CTrajectoryTask.

References createEvent(), CTrajectoryTask::initialize(), mpAnalyticsProblem, CCopasiTask::mpMethod, CCopasiTask::mpProblem, mStatesRing, mStatesRingCounter, and RING_SIZE.

◆ initObjects()

void CAnalyticsTask::initObjects ( )
private

◆ process()

bool CAnalyticsTask::process ( const bool &  useInitialValues)
overridevirtual

◆ relativeDifferenceOfStates()

C_FLOAT64 CAnalyticsTask::relativeDifferenceOfStates ( const CVectorCore< C_FLOAT64 > &  s1,
const CVectorCore< C_FLOAT64 > &  s2 
)
private

◆ removeEvent()

void CAnalyticsTask::removeEvent ( )

◆ restore()

bool CAnalyticsTask::restore ( const bool &  updateModel = true)
overridevirtual

Perform necessary cleanup procedures

Reimplemented from CCopasiTask.

References removeEvent(), and CCopasiTask::restore().

◆ setEventCallback()

void CAnalyticsTask::setEventCallback ( const bool &  set)
private

Set or unset the event callback

Parameters
constbool & set

References eventCallBack(), mpEvent, mpEventCallback, and CMathEvent::setCallback().

Referenced by createEvent(), and removeEvent().

Member Data Documentation

◆ mAverageFreq

C_FLOAT64 CAnalyticsTask::mAverageFreq
private

Referenced by eventCallBack(), initObjects(), and process().

◆ mAveragePeriod

C_FLOAT64 CAnalyticsTask::mAveragePeriod
private

Referenced by eventCallBack(), initObjects(), and process().

◆ mFreq

C_FLOAT64 CAnalyticsTask::mFreq
private

Referenced by eventCallBack(), initObjects(), and process().

◆ mhProgress

size_t CAnalyticsTask::mhProgress
private

handle for progress reporting

Referenced by eventCallBack(), finish(), and process().

◆ mIndex

size_t CAnalyticsTask::mIndex
private

Index of the selected object for the task

Referenced by createEvent(), eventCallBack(), finish(), and process().

◆ mLastFreq

C_FLOAT64 CAnalyticsTask::mLastFreq
private

Referenced by eventCallBack(), initObjects(), and process().

◆ mLastPeriod

C_FLOAT64 CAnalyticsTask::mLastPeriod
private

Referenced by eventCallBack(), initObjects(), and process().

◆ mMaxNumCrossings

size_t CAnalyticsTask::mMaxNumCrossings
private

Referenced by eventCallBack(), and process().

◆ mNumCrossings

size_t CAnalyticsTask::mNumCrossings
private

Referenced by eventCallBack(), and process().

◆ mOutputStartNumCrossings

size_t CAnalyticsTask::mOutputStartNumCrossings
private

Referenced by eventCallBack(), and process().

◆ mpAnalyticsProblem

CAnalyticsProblem* CAnalyticsTask::mpAnalyticsProblem
private

A pointer to the trajectory Problem

Referenced by computeSelectedStatistics(), createEvent(), eventCallBack(), initialize(), and process().

◆ mPeriod

C_FLOAT64 CAnalyticsTask::mPeriod
private

Referenced by eventCallBack(), initObjects(), and process().

◆ mPeriodicity

C_INT CAnalyticsTask::mPeriodicity
private

Referenced by eventCallBack(), initObjects(), and process().

◆ mpEvent

CMathEvent* CAnalyticsTask::mpEvent
private

Pointer to the event representing the cut plane

Referenced by createEvent(), removeEvent(), and setEventCallback().

◆ mpEventCallback

CCallbackInterface* CAnalyticsTask::mpEventCallback
private

A pointer to the callback register with the event.

Referenced by setEventCallback(), and ~CAnalyticsTask().

◆ mpObjectRate

CDataObject* CAnalyticsTask::mpObjectRate
private

◆ mpObjectSelected

CDataObject* CAnalyticsTask::mpObjectSelected
private

◆ mpResultAnnotation

CDataArray* CAnalyticsTask::mpResultAnnotation
private

◆ mPreviousCrossingTime

C_FLOAT64 CAnalyticsTask::mPreviousCrossingTime
private

Referenced by eventCallBack(), and process().

◆ mProgressFactor

C_FLOAT64 CAnalyticsTask::mProgressFactor
private

this holds the current value for the progress reporting

Referenced by eventCallBack(), and process().

◆ mProgressMax

C_FLOAT64 CAnalyticsTask::mProgressMax
private

this holds the max value for the progress reporting

Referenced by process().

◆ mProgressValue

C_FLOAT64 CAnalyticsTask::mProgressValue
private

this holds the current value for the progress reporting

Referenced by eventCallBack(), and process().

◆ mpSelectedObject

const CDataObject* CAnalyticsTask::mpSelectedObject
private

◆ mpStatValAnn

CDataArray* CAnalyticsTask::mpStatValAnn
private

◆ mStartTime

C_FLOAT64 CAnalyticsTask::mStartTime
private

time at which the simulation starts.

Referenced by eventCallBack(), and process().

◆ mState

STATE CAnalyticsTask::mState
private

Referenced by eventCallBack(), and process().

◆ mStatesRing

std::vector< CVector< C_FLOAT64 > > CAnalyticsTask::mStatesRing
private

Referenced by eventCallBack(), and initialize().

◆ mStatesRingCounter

size_t CAnalyticsTask::mStatesRingCounter
private

Referenced by eventCallBack(), initialize(), and process().

◆ mStatTime

C_FLOAT64 CAnalyticsTask::mStatTime
private

◆ mStatVal

C_FLOAT64 CAnalyticsTask::mStatVal
private

This holds the result

Referenced by computeSelectedStatistics().

◆ mTimes

std::vector< C_FLOAT64 > CAnalyticsTask::mTimes
private

◆ mValues

std::vector< C_FLOAT64 > CAnalyticsTask::mValues
private

◆ mValuesSeries

std::vector< CVector< C_FLOAT64 > > CAnalyticsTask::mValuesSeries
private

◆ pStats

CStatistics* CAnalyticsTask::pStats
private

◆ pStatsTime

CStatistics* CAnalyticsTask::pStatsTime
private

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