COPASI API
4.16.103
|
#include <CMathTrigger.h>
Public Member Functions | |
void | applyInitialValues () |
void | calculateTrueValue () |
bool | compile (std::vector< CCopasiContainer * > listOfContainer) |
CRootFinder (const CCopasiContainer *pParent=NULL) | |
CRootFinder (const CRootFinder &src, const CCopasiContainer *pParent=NULL) | |
void | determineDiscrete (const std::set< const CCopasiObject * > &stateVariables) |
C_FLOAT64 * | getRootValuePtr () |
CEvaluationNode * | getTrueExpression () const |
void | initObjects () |
const bool & | isDiscrete () const |
const bool & | isEquality () const |
bool | isTrue () const |
void | toggle (const C_FLOAT64 &time, const bool &equality, const bool &continous) |
void | toggle (const C_FLOAT64 &time) |
virtual | ~CRootFinder () |
![]() | |
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 |
virtual const std::string & | getKey () 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 Attributes | |
bool | mDiscrete |
bool | mEquality |
C_FLOAT64 | mLastToggleTime |
C_FLOAT64 * | mpRootValue |
CExpression | mRoot |
C_FLOAT64 | mTrue |
Friends | |
class | CMathTrigger |
Additional Inherited Members | |
![]() | |
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 std::vector< Refresh * > | buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet()) |
static void | setRenameHandler (CRenameHandler *rh) |
![]() | |
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) | |
![]() | |
objectMap | mObjects |
![]() | |
static CRenameHandler * | smpRenameHandler = NULL |
Definition at line 16 of file CMathTrigger.h.
CMathTrigger::CRootFinder::CRootFinder | ( | const CCopasiContainer * | pParent = NULL | ) |
Default constructor
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 14 of file CMathTrigger.cpp.
References initObjects().
CMathTrigger::CRootFinder::CRootFinder | ( | const CRootFinder & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor
const CRoot & | src |
"const | CCopasiContainer * pParent (default: NULL) |
Definition at line 26 of file CMathTrigger.cpp.
References initObjects().
|
virtual |
void CMathTrigger::CRootFinder::applyInitialValues | ( | ) |
Initialize all values of the math model with their initial values.
Definition at line 141 of file CMathTrigger.cpp.
References CMathTrigger::calculateTrueValue().
void CMathTrigger::CRootFinder::calculateTrueValue | ( | ) |
Determine the truth value for the initial conditions.
Definition at line 147 of file CMathTrigger.cpp.
Referenced by CMathModel::processRoots().
bool CMathTrigger::CRootFinder::compile | ( | std::vector< CCopasiContainer * > | listOfContainer | ) |
Compile the root finder
std::vector< | CCopasiContainer * > listOfContainer |
Definition at line 51 of file CMathTrigger.cpp.
void CMathTrigger::CRootFinder::determineDiscrete | ( | const std::set< const CCopasiObject * > & | stateVariables | ) |
Determine whether the root only changes during discrete events. The root must be compiled before calling this method.
const | std::set< const CCopasiObject *> & stateVariables |
Definition at line 60 of file CMathTrigger.cpp.
C_FLOAT64 * CMathTrigger::CRootFinder::getRootValuePtr | ( | ) |
Retrieve a pointer to the current value of the root.
Definition at line 160 of file CMathTrigger.cpp.
CEvaluationNode * CMathTrigger::CRootFinder::getTrueExpression | ( | ) | const |
Retrieve the expression evaluating the truth value
Definition at line 80 of file CMathTrigger.cpp.
References CCopasiNode< _Data >::addChild(), CEvaluationNodeNumber::DOUBLE, and CEvaluationNodeLogical::GT.
Referenced by CMathTrigger::compileGE(), CMathTrigger::compileGT(), CMathTrigger::compileLE(), and CMathTrigger::compileLT().
void CMathTrigger::CRootFinder::initObjects | ( | ) |
Initialize the contained object references.
Definition at line 42 of file CMathTrigger.cpp.
References CCopasiObject::addDirectDependency(), C_FLOAT64, CExpression::refresh(), and CCopasiObject::setRefresh().
Referenced by CRootFinder().
const bool & CMathTrigger::CRootFinder::isDiscrete | ( | ) | const |
Check whether the root change only during discrete events.
Definition at line 65 of file CMathTrigger.cpp.
const bool & CMathTrigger::CRootFinder::isEquality | ( | ) | const |
Check whether the root is checked for equality.
Definition at line 70 of file CMathTrigger.cpp.
bool CMathTrigger::CRootFinder::isTrue | ( | ) | const |
Check whether the root's current state is true .
Definition at line 75 of file CMathTrigger.cpp.
void CMathTrigger::CRootFinder::toggle | ( | const C_FLOAT64 & | time, |
const bool & | equality, | ||
const bool & | continous | ||
) |
Toggle the root status dependent on the processed equality status
const | C_FLOAT64 & time |
const | bool & equality |
const | bool & continuous |
Definition at line 91 of file CMathTrigger.cpp.
Toggle the root status dependent on the processed equality status
const | C_FLOAT64 & time |
Definition at line 129 of file CMathTrigger.cpp.
|
friend |
Definition at line 18 of file CMathTrigger.h.
|
private |
This indicates whether the root changes only discretely
Definition at line 136 of file CMathTrigger.h.
|
private |
This indicates whether the root is checked for equality
Definition at line 131 of file CMathTrigger.h.
Referenced by CMathTrigger::compileGE(), CMathTrigger::compileGT(), CMathTrigger::compileLE(), and CMathTrigger::compileLT().
|
private |
The time at which the last toggle of the truth value occurred
Definition at line 147 of file CMathTrigger.h.
|
private |
A pointer to the value of the root expression
Definition at line 126 of file CMathTrigger.h.
|
private |
This expression calculates the root
Definition at line 121 of file CMathTrigger.h.
Referenced by CMathTrigger::compileGE(), CMathTrigger::compileGT(), CMathTrigger::compileLE(), and CMathTrigger::compileLT().
|
private |
Indicates the truth value of the root active This should be a bool but the CExpressionTree only handles double
Definition at line 142 of file CMathTrigger.h.