COPASI API
4.40.278
|
#include <CModelValue.h>
Public Types | |
enum class | Status { FIXED = 0 , ASSIGNMENT , REACTIONS , ODE , TIME , __SIZE } |
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 |
Public Types inherited from CAnnotation | |
typedef std::map< std::string, std::string > | UnsupportedAnnotation |
Public Member Functions | |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) override |
virtual void | calculate () |
CModelEntity (const CModelEntity &src, const CDataContainer *pParent) | |
CModelEntity (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT, const std::string &type="ModelEntity", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
virtual CIssue | compile () |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const override |
virtual std::string | getChildObjectUnits (const CDataObject *pObject) const override |
std::string | getDefaultNoiseExpression () const |
std::string | getExpression () const |
CExpression * | getExpressionPtr () |
const CExpression * | getExpressionPtr () const |
std::string | getInitialExpression () const |
CExpression * | getInitialExpressionPtr () |
const CExpression * | getInitialExpressionPtr () const |
const C_FLOAT64 & | getInitialValue () const |
CDataObject * | getInitialValueReference () const |
virtual const std::string & | getKey () const override |
CModel * | getModel () const |
std::string | getNoiseExpression () const |
CExpression * | getNoiseExpressionPtr () |
const CExpression * | getNoiseExpressionPtr () const |
CDataObject * | getNoiseReference () const |
const C_FLOAT64 & | getRate () const |
CDataObject * | getRateReference () const |
const std::string & | getSBMLId () const |
const CModelEntity::Status & | getStatus () const |
virtual const std::string & | getUnitExpression () const |
const C_FLOAT64 & | getValue () const |
virtual const CDataObject * | getValueObject () const override |
virtual void * | getValuePointer () const override |
CDataObject * | getValueReference () const |
const bool & | hasNoise () const |
bool | isFixed () const |
const bool & | isUsed () const |
CIssue | setExpression (const std::string &expression) |
bool | setExpressionPtr (CExpression *pExpression) |
void | setHasNoise (const bool &hasNoise) |
CIssue | setInitialExpression (const std::string &expression) |
bool | setInitialExpressionPtr (CExpression *pExpression) |
virtual void | setInitialValue (const C_FLOAT64 &initialValue) |
bool | setNoiseExpression (const std::string &expression) |
bool | setNoiseExpressionPtr (CExpression *pExpression) |
virtual bool | setObjectParent (const CDataContainer *pParent) override |
void | setRate (const C_FLOAT64 &rate) |
void | setSBMLId (const std::string &id) const |
bool | setStatus (const CModelEntity::Status &status) |
virtual CIssue | setUnitExpression (std::string unitExpression) |
void | setUsed (const bool &used) |
virtual void | setValue (const C_FLOAT64 &value) |
virtual CData | toData () const override |
~CModelEntity () | |
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) | |
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 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 |
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) |
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 () |
Public Member Functions inherited from CAnnotation | |
bool | addUnsupportedAnnotation (const std::string &name, const std::string &xml) |
bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
CAnnotation () | |
CAnnotation (const CAnnotation &src) | |
void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const |
const std::string & | getMiriamAnnotation () const |
const std::string & | getNotes () const |
UnsupportedAnnotation & | getUnsupportedAnnotations () |
const UnsupportedAnnotation & | getUnsupportedAnnotations () const |
void | initMiriamAnnotation (const std::string &newId) |
bool | operator== (const CAnnotation &rhs) const |
bool | removeUnsupportedAnnotation (const std::string &name) |
bool | replaceUnsupportedAnnotation (const std::string &name, const std::string &xml) |
void | setMiriamAnnotation (const std::string &miriamAnnotation, const std::string &newId, const std::string &oldId) |
void | setNotes (const std::string ¬es) |
CData | toData () const |
virtual | ~CAnnotation () |
Static Public Member Functions | |
static CModelEntity * | fromData (const CData &data, CUndoObjectInterface *pParent) |
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 *) |
Static Public Member Functions inherited from CAnnotation | |
static CMIRIAMInfo * | allocateMiriamInfo (CDataContainer *pParent) |
static CAnnotation * | castObject (CDataObject *pObject) |
static const CAnnotation * | castObject (const CDataObject *pObject) |
static void | freeMiriamInfo (CDataContainer *pParent) |
Static Public Attributes | |
static const CEnumAnnotation< std::string, Status > | StatusName |
static const CEnumAnnotation< std::string, Status > | XMLStatus |
Static Public Attributes inherited from CDataContainer | |
static const CObjectInterface::ContainerList | EmptyList |
Protected Member Functions | |
CModelEntity (const CModelEntity &src) | |
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 | |
bool | mHasNoise |
C_FLOAT64 | mIValue |
C_FLOAT64 | mNoise |
CExpression * | mpExpression |
CExpression * | mpInitialExpression |
CDataObjectReference< C_FLOAT64 > * | mpIValueReference |
CModel * | mpModel |
CExpression * | mpNoiseExpression |
CDataObjectReference< C_FLOAT64 > * | mpNoiseReference |
CDataObjectReference< C_FLOAT64 > * | mpRateReference |
CDataObjectReference< C_FLOAT64 > * | mpValueReference |
C_FLOAT64 | mRate |
std::string | mSBMLId |
std::string | mUnitExpression |
C_FLOAT64 | mValue |
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 |
Protected Attributes inherited from CAnnotation | |
std::string | mKey |
Private Member Functions | |
void | initObjects () |
Private Attributes | |
Status | mStatus |
bool | mUsed |
The base class for CCompartment, CMetab and CModelValue. CModelEntity is a base class for CCompartment, CMetab and CModelValue. These three classes have in common that (in the long run) they can each be model variables (subject to ODEs), constant, or subject to algebraic assignments. In addition, the CMetab objects can also be subject to reactions, and conservation rules.
|
strong |
|
protected |
CModelEntity::CModelEntity | ( | const std::string & | name = "NoName" , |
const CDataContainer * | pParent = NO_PARENT , |
||
const std::string & | type = "ModelEntity" , |
||
const CFlags< Flag > & | flag = CFlags< Flag >::None |
||
) |
Default constructor
const | std::string & name (default: "NoName") |
const | CDataContainer * pParent (default: NULL) |
References CKeyFactory::add(), CONSTRUCTOR_TRACE, CRootContainer::getKeyFactory(), CDataObject::getObjectType(), CAnnotation::initMiriamAnnotation(), initObjects(), and CAnnotation::mKey.
CModelEntity::CModelEntity | ( | const CModelEntity & | src, |
const CDataContainer * | pParent | ||
) |
Copy constructor
const | CModelValue & src |
const | CDataContainer * pParent (default: NULL) |
References CKeyFactory::add(), CRootContainer::getKeyFactory(), CAnnotation::getMiriamAnnotation(), CDataObject::getObjectType(), initObjects(), CAnnotation::mKey, mStatus, CAnnotation::setMiriamAnnotation(), and setStatus().
CModelEntity::~CModelEntity | ( | ) |
Destructor.
References DESTRUCTOR_TRACE, mpModel, and CModel::removeModelEntity().
|
overridevirtual |
Apply the provided data to the object
const | CData & data |
Reimplemented from CDataContainer.
Reimplemented in CMetab, CModelValue, CModel, and CCompartment.
References CData::ADD_NOISE, CAnnotation::applyData(), CDataContainer::applyData(), CData::EXPRESSION, CData::getProperty(), CData::INITIAL_EXPRESSION, CData::INITIAL_VALUE, CData::isSetProperty(), mIValue, mpModel, CData::NOISE_EXPRESSION, CModel::setCompileFlag(), setExpression(), setHasNoise(), setInitialExpression(), setNoiseExpression(), setStatus(), CData::SIMULATION_TYPE, StatusName, CDataValue::toBool(), CDataValue::toDouble(), CEnumAnnotation< Type, Enum >::toEnum(), and CDataValue::toString().
Referenced by CCompartment::applyData(), CModel::applyData(), CModelValue::applyData(), and CMetab::applyData().
|
virtual |
Calculate the value or the rate depending whether we have an ASIGNMENT or ODE
Reimplemented in CMetab.
References ASSIGNMENT, CExpression::calcValue(), mpExpression, mRate, mStatus, mValue, and ODE.
|
virtual |
Compile the model value. This is only needed for status ASIGNMENT and ODE.
Reimplemented in CMetab, and CModel.
References CDataContainer::add(), CValidity::add(), ASSIGNMENT, CExpression::calcValue(), CValidity::clear(), CExpression::compile(), CExpression::createInitialExpression(), CIssue::ExpressionEmpty, getExpression(), CValidity::getFirstWorstIssue(), CEvaluationTree::getInfix(), getNoiseExpression(), CDataObject::getObjectDataModel(), CDataObject::getPrerequisites(), CDataObject::getValidity(), mHasNoise, mIValue, mpExpression, mpInitialExpression, mpModel, mpNoiseExpression, CDataObject::mPrerequisits, mStatus, CObjectInterface::mValidity, ODE, pdelete, CDataObject::setObjectName(), and CIssue::Warning.
Referenced by setExpression(), setExpressionPtr(), setInitialExpression(), setInitialExpressionPtr(), setNoiseExpression(), and setNoiseExpressionPtr().
|
overridevirtual |
Create the undo data which represents the changes recording the differences between the provided oldData and the current data.
CUndoData | & undoData |
const | CUndoData::Type & type |
const | CData & oldData (default: empty data) |
const | CCore::Framework & framework (default: CCore::Framework::ParticleNumbers) |
Reimplemented from CDataContainer.
Reimplemented in CMetab, CModelValue, CModel, and CCompartment.
References CData::ADD_NOISE, CUndoData::addProperty(), CUndoData::CHANGE, CAnnotation::createUndoData(), CDataContainer::createUndoData(), CData::EXPRESSION, getExpression(), getInitialExpression(), getNoiseExpression(), CData::getProperty(), CData::INITIAL_EXPRESSION, CData::INITIAL_VALUE, mHasNoise, mIValue, mStatus, CData::NOISE_EXPRESSION, CData::SIMULATION_TYPE, and StatusName.
Referenced by CCompartment::createUndoData(), CModel::createUndoData(), CModelValue::createUndoData(), and CMetab::createUndoData().
|
static |
Static method to create a CDataObject based on the provided data
const | CData & data |
|
overridevirtual |
Retrieve the units of the child object.
Reimplemented from CDataContainer.
Reimplemented in CMetab, and CModel.
References CModel::getTimeUnit(), CDataContainer::getUnits(), mpIValueReference, mpModel, mpRateReference, and mpValueReference.
Referenced by CModel::getChildObjectUnits(), CMetab::getChildObjectUnits(), and CModelParameter::getUnit().
std::string CModelEntity::getDefaultNoiseExpression | ( | ) | const |
Retrieve the default expression for the noise.
References CDataObject::getCN(), and mpRateReference.
std::string CModelEntity::getExpression | ( | ) | const |
Retrieve the expression for non FIXED model values.
References CEvaluationTree::getInfix(), isFixed(), mpExpression, and CExpression::updateInfix().
Referenced by compile(), CMetab::compile(), CMathObject::createExtensiveODERateExpression(), CSBMLExporter::createRule(), createUndoData(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CCopasiXML::saveModel(), CMetab::setObjectParent(), and toData().
CExpression * CModelEntity::getExpressionPtr | ( | ) |
Retrieve the pointer to the expression for non FIXED model values.
References mpExpression, and CExpression::updateInfix().
const CExpression * CModelEntity::getExpressionPtr | ( | ) | const |
Retrieve the pointer to the expression for non FIXED model values.
References mpExpression, and CExpression::updateInfix().
Referenced by CSBMLExporter::checkForPiecewiseFunctions(), CSBMLExporter::checkForUnsupportedFunctionCalls(), CSBMLExporter::checkForUnsupportedObjectReferences(), CMathObject::compileRate(), CMathObject::compileValue(), CModelAdd::copyExpression(), CSBMLExporter::createRule(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CODEExporter::exportModelEntityExpression(), CODEExporter::exportModelValuesExpressions(), SBMLImporter::importRuleForModelEntity(), CModelMerging::mergeMetabolites(), SBMLImporter::removeUnusedFunctions(), CModelExpansion::replaceInModelEntity(), and CMMLOutput::writeRHS_ModelEntity().
std::string CModelEntity::getInitialExpression | ( | ) | const |
Retrieve the expression for ODE or REACTION model values.
References ASSIGNMENT, CEvaluationTree::getInfix(), mpInitialExpression, mStatus, and CExpression::updateInfix().
Referenced by CModelAdd::addCompartmentsExpressions(), CModelAdd::addMetabolitesExpressions(), CModelAdd::addModelValuesExpressions(), CSBMLExporter::createCompartment(), CSBMLExporter::createMetabolite(), CSBMLExporter::createParameter(), createUndoData(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CMathContainer::initializeMathObjects(), CModelMerging::mergeMetabolites(), CCopasiXML::saveModel(), and toData().
CExpression * CModelEntity::getInitialExpressionPtr | ( | ) |
Retrieve the pointer to the expression for non FIXED model values.
References mpInitialExpression, and CExpression::updateInfix().
const CExpression * CModelEntity::getInitialExpressionPtr | ( | ) | const |
Retrieve the pointer to the expression for non FIXED model values.
References mpInitialExpression, and CExpression::updateInfix().
Referenced by CSBMLExporter::checkForUnsupportedFunctionCalls(), CSBMLExporter::checkForUnsupportedObjectReferences(), CMathObject::compileInitialValue(), CModelAdd::copyInitialExpression(), CSBMLExporter::createInitialAssignment(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), SBMLImporter::importInitialAssignments(), CModelMerging::mergeMetabolites(), SBMLImporter::removeUnusedFunctions(), and CModelExpansion::replaceInModelEntity().
const C_FLOAT64 & CModelEntity::getInitialValue | ( | ) | const |
Retrieve the initial value
References mIValue.
Referenced by CModelAdd::addCompartments(), CModelAdd::addModelValues(), addParticleNumberToInitialValueMap(), SBMLImporter::applyConversionFactors(), CFunctionAnalyzer::constructCallParametersActualValues(), CMetab::convertToConcentration(), CMetab::convertToNumber(), CSBMLExporter::createCompartment(), CModelParameterSet::createFromModel(), CSBMLExporter::createMetabolite(), CModel::createMetabolite(), CSBMLExporter::createParameter(), CCSPMethod::cspstep(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CODEExporter::exportCompartments(), CODEExporter::exportExpression(), CODEExporter::exportMetabolites(), CODEExporter::exportModelValues(), CModel::initializeAtolVector(), CReactionInterface::loadMappingAndValues(), CModelParameter::refreshFromModel(), and CModel::suitableForStochasticSimulation().
CDataObject * CModelEntity::getInitialValueReference | ( | ) | const |
Retrieve object referencing the initial value
References mpIValueReference.
Referenced by addParticleNumberToInitialValueMap(), CMathObject::compileInitialValue(), CMathObject::createExtensiveValueExpression(), CModelParameterSet::createFromModel(), CSBMLExporter::createInitialAssignment(), CExpression::createInitialExpression(), CDataModel::findObjectByDisplayName(), CMetab::getChildObjectUnits(), getInitialCNForSBase(), CModelParameter::getUnit(), SBMLImporter::importInitialAssignments(), CMathContainer::initializeAtolVector(), CMathContainer::initializeObjects(), CModelParameter::refreshFromModel(), SBMLImporter::replace_time_with_initial_time(), CModelParameterSet::saveToStream(), and SEDMLImporter::updateCopasiTaskForSimulation().
|
overridevirtual |
Retrieve the key
Reimplemented from CAnnotation.
Reimplemented in CModel.
References CAnnotation::getKey().
Referenced by CModelAdd::addCompartments(), CModelAdd::addCompartmentsExpressions(), CModelAdd::addMetabolites(), CModelAdd::addMetabolitesExpressions(), CModelAdd::addModelValues(), CModelAdd::addModelValuesExpressions(), addParticleNumberToInitialValueMap(), CModelAdd::addReactions(), CLayoutInitializer::createCompartmentGlyph(), CCopasiSpringLayout::createLayout(), CLayoutInitializer::createMetabGlyph(), CChemEqInterface::createNonExistingMetabs(), CReactionInterface::createOtherObjects(), CSBMLExporter::createSBMLDocument(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateEvent(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CModelExpansion::duplicateReaction(), CODEExporter::exportExpression(), CODEExporter::exportKineticFunction(), CODEExporter::exportMetabolitesConcentrations(), CODEExporter::exportModelEntityExpression(), CODEExporter::exportODEs(), CODEExporterBM::exportSingleCompartment(), CODEExporterC::exportSingleCompartment(), CODEExporterXPPAUT::exportSingleCompartment(), CODEExporterBM::exportSingleMetabolite(), CODEExporterC::exportSingleMetabolite(), CODEExporterXPPAUT::exportSingleMetabolite(), CODEExporterBM::exportSingleModelEntity(), CODEExporterC::exportSingleModelEntity(), CODEExporterXPPAUT::exportSingleModelEntity(), CODEExporterBM::exportSingleModVal(), CODEExporterC::exportSingleModVal(), CODEExporterXPPAUT::exportSingleModVal(), CODEExporterBM::exportSingleODE(), CODEExporterC::exportSingleODE(), CODEExporterXPPAUT::exportSingleODE(), CMetabNameInterface::getMetaboliteKey(), CEFMTask::getSpeciesChanges(), SBMLImporter::importMIRIAM(), CCopasiSpringLayout::initFromLayout(), CODEExporterC::KineticFunction2ODEmember(), CReaction::loadOneRole(), CModelMerging::mergeMetabolites(), CODEExporter::preprocess(), CODEExporterC::preprocess(), CompartmentHandler::processEnd(), MetaboliteHandler::processEnd(), ModelValueHandler::processEnd(), CompartmentGlyphHandler::processStart(), MetaboliteGlyphHandler::processStart(), ModifierHandler::processStart(), ProductHandler::processStart(), SubstrateHandler::processStart(), TextGlyphHandler::processStart(), CCopasiSpringLayout::randomize(), CModel::removeMetabolite(), CModelExpansion::replaceInReaction(), CCopasiXML::saveModel(), CChemEq::setMultiplicity(), CModelMerging::simpleCall(), and CMMLOutput::writeRHS().
CModel * CModelEntity::getModel | ( | ) | const |
Retrieve a pointer to the model the entity belongs too
References mpModel.
Referenced by CMetab::convertToConcentration(), CMetab::convertToNumber(), CSBMLExporter::createAreaUnit(), SBMLImporter::createCModelFromSBMLDocument(), CSBMLExporter::createCompartments(), CSBMLExporter::createLengthUnit(), CSBMLExporter::createMetabolites(), CSBMLExporter::createParameters(), CSBMLExporter::createReactions(), CSBMLExporter::createSubstanceUnit(), CSBMLExporter::createTimeUnit(), CSBMLExporter::createVolumeUnit(), CSBMLExporter::hasVolumeAssignment(), CDataModel::loadModelParameterSets(), and CILDMMethod::printResult().
std::string CModelEntity::getNoiseExpression | ( | ) | const |
Retrieve the expression for non FIXED model values.
References CEvaluationTree::getInfix(), mpNoiseExpression, mStatus, ODE, and CExpression::updateInfix().
Referenced by compile(), CMetab::compile(), CMathObject::createExtensiveNoiseExpression(), createUndoData(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CCopasiXML::saveModel(), and toData().
CExpression * CModelEntity::getNoiseExpressionPtr | ( | ) |
Retrieve the pointer to the expression for ODE model values.
References mpNoiseExpression, and CExpression::updateInfix().
const CExpression * CModelEntity::getNoiseExpressionPtr | ( | ) | const |
Retrieve the pointer to the expression for ODE model values.
References mpNoiseExpression, and CExpression::updateInfix().
Referenced by CMathObject::compileNoise(), CMathObject::createIntensiveNoiseExpression(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), and CModelExpansion::replaceInModelEntity().
CDataObject * CModelEntity::getNoiseReference | ( | ) | const |
Retrieve object referencing the noise
References mpNoiseReference.
const C_FLOAT64 & CModelEntity::getRate | ( | ) | const |
Return rate of production of this entity
References mRate.
CDataObject * CModelEntity::getRateReference | ( | ) | const |
Retrieve object referencing the rate
References mpRateReference.
Referenced by CModel::appendAllDependents(), CMathObject::compileTransitionTime(), CMathObject::createIntensiveRateExpression(), CDataModel::findObjectByDisplayName(), CMathContainer::initializeObjects(), and SEDMLUtils::resolveVariable().
const std::string & CModelEntity::getSBMLId | ( | ) | const |
Returns a reference to the SBML Id.
References mSBMLId.
Referenced by SBMLImporter::applyStoichiometricExpressions(), CSBMLExporter::collectIds(), CSBMLExporter::createCompartment(), SBMLImporter::createCReactionFromReaction(), CSBMLExporter::createInitialAssignment(), CSBMLExporter::createKineticLaw(), CSBMLExporter::createMetabolite(), CSBMLExporter::createParameter(), CSBMLExporter::createReaction(), CSBMLExporter::createRule(), CSBMLExporter::createRules(), CSBMLExporter::createSBMLDocument(), CSBMLExporter::createTimesTree(), CSBMLExporter::exportEventAssignments(), SEDMLUtils::getSbmlId(), SBMLImporter::replaceObjectNames(), CCopasiXML::saveModel(), CEvaluationNodeObject::toAST(), and VariableInfo::VariableInfo().
const CModelEntity::Status & CModelEntity::getStatus | ( | ) | const |
Retrieve the status of the entity.
References mStatus.
Referenced by CModelAdd::addCompartments(), CModelAdd::addMetabolites(), CModelAdd::addModelValues(), CModel::appendAllDependents(), CMetab::calculate(), CSBMLExporter::checkForODESpeciesInNonfixedCompartment(), CSBMLExporter::checkForPiecewiseFunctions(), CMetab::compile(), CEventAssignment::compile(), CMathObject::compileTransitionTime(), CFunctionAnalyzer::constructCallParametersActualValues(), CSBMLExporter::createCompartment(), CMathObject::createIntensiveRateExpression(), CCopasiSpringLayout::createLayout(), CSBMLExporter::createMetabolite(), CSBMLExporter::createParameter(), CSBMLExporter::createRule(), CMathEvent::createUpdateSequences(), CModelParameter::diff(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CODEExporter::exportCompartments(), CODEExporter::exportExpression(), CODEExporter::exportMetabolites(), CODEExporter::exportMetabolitesConcentrations(), CODEExporter::exportModelEntityExpression(), CODEExporter::exportModelValues(), CODEExporter::exportModelValuesExpressions(), CODEExporter::exportODEs(), CODEExporterBM::exportSingleCompartment(), CODEExporterC::exportSingleCompartment(), CODEExporterXPPAUT::exportSingleCompartment(), CODEExporterBM::exportSingleMetabolite(), CODEExporterC::exportSingleMetabolite(), CODEExporterXPPAUT::exportSingleMetabolite(), CODEExporterBM::exportSingleModelEntity(), CODEExporterC::exportSingleModelEntity(), CODEExporterXPPAUT::exportSingleModelEntity(), CODEExporterBM::exportSingleModVal(), CODEExporterC::exportSingleModVal(), CODEExporterXPPAUT::exportSingleModVal(), SBMLImporter::importRuleForModelEntity(), CMathContainer::initializeObjects(), CSBMLExporter::isEventAssignmentSBMLCompatible(), CODEExporter::isModelEntityExpressionODEExporterCompatible(), CModelMerging::mergeMetabolites(), CODEExporter::preprocess(), CODEExporterC::preprocess(), SBMLImporter::removeUnusedFunctions(), CSBMLExporter::replaceSpeciesReferences(), CCopasiXML::saveModel(), CCopasiXML::saveModelParameterSets(), CMetab::setObjectParent(), CModelParameter::updateModel(), and CModelParameterSpecies::updateModel().
|
virtual |
Get the unit.
References mUnitExpression.
Referenced by CSBMLExporter::createParameter(), CModelParameter::getUnit(), and CCopasiXML::saveModel().
const C_FLOAT64 & CModelEntity::getValue | ( | ) | const |
Retrieve the value
References mValue.
Referenced by CMetab::calculate(), and CSBMLExporter::replaceSpeciesReferences().
|
overridevirtual |
Retrieve the object representing the value;
Reimplemented from CDataContainer.
Reimplemented in CMetab.
References mpValueReference.
Referenced by CEventAssignment::CEventAssignment(), and CEventAssignment::compile().
|
overridevirtual |
CDataObject * CModelEntity::getValueReference | ( | ) | const |
Retrieve object referencing the value
References mpValueReference.
Referenced by CMathObject::compile(), CTimeSeries::compile(), CMathEvent::CAssignment::compile(), CMathObject::compilePropensity(), CMathObject::compileTransitionTime(), CMathObject::compileValue(), SEDMLUtils::createAmountMV(), CPlotSpecification::createDefaultPlot(), CMathObject::createExtensiveValueExpression(), CExpression::createInitialExpression(), CSBMLExporter::createRule(), CSBMLExporter::exportEventAssignments(), CDataModel::findObjectByDisplayName(), CMathContainer::getCompartment(), CModel::getCorrespondingTransientObject(), CModelParameterGroup::getObjectUnit(), SBMLImporter::importEvent(), SBMLImporter::importRuleForModelEntity(), CMathReaction::initialize(), CMathContainer::initializeObjects(), CSBMLExporter::replaceSpeciesReferences(), SEDMLUtils::resolveVariable(), SBMLImporter::sbmlId2CopasiCN(), CTrajectoryMethodDsaLsodar::start(), and VariableInfo::VariableInfo().
const bool & CModelEntity::hasNoise | ( | ) | const |
Check whether noise is added to the ODE
References mHasNoise.
Referenced by CMathObject::compileNoise(), CMathObject::createExtensiveNoiseExpression(), CMathObject::createIntensiveNoiseExpression(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CCopasiXML::saveModel(), and setHasNoise().
|
private |
Initialize the contained CDataObjects
References CModel::addModelEntity(), CDataContainer::addObjectReference(), CDataObject::getObjectAncestor(), mIValue, mNoise, mpIValueReference, mpModel, mpNoiseReference, mpRateReference, mpValueReference, mRate, mSBMLId, mValue, CDataObject::ValueDbl, and CDataObject::ValueString.
Referenced by CModelEntity().
|
inline |
Check whether the entity is FIXED or not.
References FIXED, and mStatus.
Referenced by getExpression(), CMetab::setConcentration(), setExpression(), and setExpressionPtr().
const bool & CModelEntity::isUsed | ( | ) | const |
Retrieve whether the model value is used during simulation
References mUsed.
Referenced by CModel::buildUserOrder().
CIssue CModelEntity::setExpression | ( | const std::string & | expression | ) |
Set the expression for non FIXED model values
const | std::string & expression |
References CValidity::add(), CFlags< Enum >::All, compile(), CIssue::Error, CEvaluationTree::getInfix(), isFixed(), mpExpression, mpModel, CObjectInterface::mValidity, CValidity::remove(), CModel::setCompileFlag(), CExpression::setInfix(), and CIssue::SettingFixedExpression.
Referenced by applyData(), CModelAdd::copyExpression(), SEDMLUtils::createAmountMV(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CompartmentHandler::processEnd(), MetaboliteHandler::processEnd(), ModelValueHandler::processEnd(), and CMetab::setObjectParent().
bool CModelEntity::setExpressionPtr | ( | CExpression * | pExpression | ) |
Set the expression for non FIXED model values
CExpression* |
References CDataContainer::add(), compile(), isFixed(), mpExpression, mpModel, pdelete, CDataContainer::remove(), CModel::setCompileFlag(), CDataObject::setObjectName(), and CDataObject::setObjectParent().
Referenced by SBMLImporter::importRuleForModelEntity().
void CModelEntity::setHasNoise | ( | const bool & | hasNoise | ) |
Set whether to add noise to the ODE
const | bool & hasNoise |
References hasNoise(), mHasNoise, mpModel, and CModel::setCompileFlag().
Referenced by applyData(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CompartmentHandler::processStart(), MetaboliteHandler::processStart(), and ModelValueHandler::processStart().
CIssue CModelEntity::setInitialExpression | ( | const std::string & | expression | ) |
Set the expression for ODE or REACTION model values
const | std::string & expression |
References CValidity::add(), CFlags< Enum >::All, ASSIGNMENT, compile(), CIssue::Error, CEvaluationTree::getInfix(), CIssue::InitialExpressionWithAssignment, mpInitialExpression, mpModel, mStatus, CObjectInterface::mValidity, CValidity::remove(), CModel::setCompileFlag(), and CExpression::setInfix().
Referenced by applyData(), CModelAdd::copyInitialExpression(), SBMLImporter::createCReactionFromReaction(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CompartmentHandler::processEnd(), MetaboliteHandler::processEnd(), ModelHandler::processEnd(), ModelValueHandler::processEnd(), and CModelParameter::updateModel().
bool CModelEntity::setInitialExpressionPtr | ( | CExpression * | pExpression | ) |
Set the expression for non FIXED model values
CExpression* |
References CDataContainer::add(), ASSIGNMENT, compile(), mpInitialExpression, mpModel, mStatus, pdelete, CDataContainer::remove(), CModel::setCompileFlag(), CDataObject::setObjectName(), and CDataObject::setObjectParent().
Referenced by SBMLImporter::importInitialAssignments().
|
virtual |
Set the initial value
const | C_FLOAT64 & initialValue |
References mIValue.
Referenced by CModel::createCompartment(), SBMLImporter::createHasOnlySubstanceUnitFactor(), CModel::createMetabolite(), CModel::createModelValue(), CReactionInterface::createUndoData(), CCompartment::load(), CMetab::operator=(), and CModelParameter::updateModel().
bool CModelEntity::setNoiseExpression | ( | const std::string & | expression | ) |
Set the expression for non FIXED model values
const | std::string & expression |
References compile(), mpModel, mpNoiseExpression, mStatus, ODE, CModel::setCompileFlag(), and CExpression::setInfix().
Referenced by applyData(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), CModelExpansion::duplicateMetab(), CompartmentHandler::processEnd(), MetaboliteHandler::processEnd(), and ModelValueHandler::processEnd().
bool CModelEntity::setNoiseExpressionPtr | ( | CExpression * | pExpression | ) |
Set the noise expression for ODE model values
CExpression* |
References CDataContainer::add(), compile(), mpModel, mpNoiseExpression, mStatus, ODE, pdelete, CDataContainer::remove(), CModel::setCompileFlag(), CDataObject::setObjectName(), and CDataObject::setObjectParent().
|
overridevirtual |
Set the object parent
const | CDataContainer * pParent |
Reimplemented from CDataObject.
Reimplemented in CMetab, and CModel.
References CModel::addModelEntity(), CDataObject::getObjectAncestor(), mpModel, CModel::removeModelEntity(), and CDataObject::setObjectParent().
Referenced by CMetab::setObjectParent().
void CModelEntity::setRate | ( | const C_FLOAT64 & | rate | ) |
void CModelEntity::setSBMLId | ( | const std::string & | id | ) | const |
Sets the SBMLId.
References mSBMLId.
Referenced by SBMLImporter::createCCompartmentFromCompartment(), SBMLImporter::createCMetabFromSpecies(), SBMLImporter::createCModelFromSBMLDocument(), SBMLImporter::createCModelValueFromParameter(), CSBMLExporter::createCompartment(), SBMLImporter::createCReactionFromReaction(), CSBMLExporter::createMetabolite(), CSBMLExporter::createParameter(), and SBMLMapHandler::processStart().
bool CModelEntity::setStatus | ( | const CModelEntity::Status & | status | ) |
Set the status
const | CModelEntity::Status & status |
References __SIZE, CDataContainer::add(), ASSIGNMENT, CExpression::createInitialExpression(), FIXED, CDataObject::getObjectDataModel(), CDataObject::getObjectType(), mpExpression, mpInitialExpression, mpModel, mRate, mStatus, mUsed, ODE, pdelete, REACTIONS, CModel::setCompileFlag(), CDataObject::setObjectName(), and TIME.
Referenced by CModelAdd::addCompartments(), CModelAdd::addMetabolites(), CModelAdd::addModelValues(), applyData(), CCompartment::CCompartment(), CMetab::CMetab(), CModel::CModel(), CModelEntity(), SEDMLUtils::createAmountMV(), SBMLImporter::createCMetabFromSpecies(), SBMLImporter::createCReactionFromReaction(), CModel::createMetabolite(), CModelExpansion::duplicateCompartment(), CModelExpansion::duplicateGlobalQuantity(), SBMLImporter::importRuleForModelEntity(), CMetab::load(), CMetab::operator=(), CompartmentHandler::processStart(), MetaboliteHandler::processStart(), ModelValueHandler::processStart(), and CMetab::setObjectParent().
|
virtual |
Set the unit.
const | CUnit & unit |
References CValidity::add(), CFlags< Enum >::All, mUnitExpression, CObjectInterface::mValidity, CValidity::remove(), CUnit::setExpression(), CIssue::UnitConflict, CIssue::UnitInvalid, CIssue::UnitUndefined, and CIssue::Warning.
Referenced by CModelValue::applyData(), SBMLImporter::createCModelValueFromParameter(), and ModelValueHandler::processEnd().
void CModelEntity::setUsed | ( | const bool & | used | ) |
Set whether the model entity is used during simulation
const | bool & used |
References mUsed.
Referenced by CModel::CModel().
|
virtual |
|
overridevirtual |
Retrieve the data describing the object
Reimplemented from CDataContainer.
Reimplemented in CMetab, CModelValue, CModel, and CCompartment.
References CData::ADD_NOISE, CData::addProperty(), CData::appendData(), CData::EXPRESSION, getExpression(), getInitialExpression(), getNoiseExpression(), CData::INITIAL_EXPRESSION, CData::INITIAL_VALUE, mHasNoise, mIValue, mStatus, CData::NOISE_EXPRESSION, CData::SIMULATION_TYPE, StatusName, CAnnotation::toData(), and CDataContainer::toData().
Referenced by CCompartment::toData(), CModel::toData(), CModelValue::toData(), and CMetab::toData().
|
protected |
A Boolean flag indicating whether to add noise to the reaction
Referenced by compile(), CMetab::compile(), createUndoData(), hasNoise(), setHasNoise(), and toData().
|
protected |
Pointer to the initial value of the model entity.
Referenced by CCompartment::applyData(), applyData(), CCompartment::CCompartment(), CModel::CModel(), compile(), CMetab::compile(), CCompartment::createUndoData(), createUndoData(), CModel::getInitialTime(), getInitialValue(), initObjects(), CModel::load(), CModel::setInitialTime(), setInitialValue(), CCompartment::toData(), and toData().
|
protected |
Noise
Referenced by initObjects().
|
protected |
The infix expression for objects of type ASSIGNMENT or ODE
Referenced by calculate(), CMetab::calculate(), compile(), CMetab::compile(), getExpression(), getExpressionPtr(), setExpression(), setExpressionPtr(), and setStatus().
|
protected |
Optional initial expression
Referenced by compile(), CMetab::compile(), getInitialExpression(), getInitialExpressionPtr(), setInitialExpression(), setInitialExpressionPtr(), and setStatus().
|
protected |
|
mutableprotected |
Referenced by CCompartment::applyData(), applyData(), CMetab::calculate(), compile(), CMetab::compileIsInitialValueChangeAllowed(), CModel::createMetabolite(), CMetab::getChildObjectUnits(), getChildObjectUnits(), CMetab::getCountOfDependentReactions(), getModel(), CCompartment::getUnits(), CModel::initObjects(), initObjects(), CMetab::setCompartment(), setExpression(), setExpressionPtr(), setHasNoise(), setInitialExpression(), setInitialExpressionPtr(), setNoiseExpression(), setNoiseExpressionPtr(), setObjectParent(), setStatus(), CModel::~CModel(), and ~CModelEntity().
|
protected |
Optional noise term for entities of type ODE
Referenced by compile(), CMetab::compile(), getNoiseExpression(), getNoiseExpressionPtr(), setNoiseExpression(), and setNoiseExpressionPtr().
|
protected |
Referenced by getNoiseReference(), and initObjects().
|
protected |
Referenced by getChildObjectUnits(), getDefaultNoiseExpression(), getRateReference(), CMetab::initObjects(), and initObjects().
|
protected |
|
protected |
Rate of change/time.
Referenced by calculate(), CMetab::calculate(), CMetab::compile(), getRate(), CModel::initObjects(), initObjects(), CMetab::operator=(), setRate(), and setStatus().
|
mutableprotected |
The id of the corresponding parameter in an SBML file. This value is either set upon importing an SBML file, or when the object is first exported to an SBML file.
Referenced by getSBMLId(), initObjects(), and setSBMLId().
|
private |
Status of the model entity.
Referenced by calculate(), CModelEntity(), compile(), createUndoData(), getInitialExpression(), getNoiseExpression(), getStatus(), isFixed(), setInitialExpression(), setInitialExpressionPtr(), setNoiseExpression(), setNoiseExpressionPtr(), setStatus(), and toData().
|
protected |
Pointer to the Unit of the model entity.
Referenced by CModelValue::createUndoData(), getUnitExpression(), CModelValue::getUnits(), setUnitExpression(), and CModelValue::toData().
|
private |
Indicates whether the model value is used, i.e., must be calculated during the simulation
Referenced by isUsed(), setStatus(), and setUsed().
|
protected |
Pointer to the value of the model entity.
Referenced by calculate(), CMetab::calculate(), CModel::getTime(), getValue(), getValuePointer(), initObjects(), CModel::setTime(), and setValue().
|
static |
String representation of the states
Referenced by CModelParameter::applyData(), applyData(), CModelParameter::createUndoData(), createUndoData(), CODEExporter::exportCompartments(), CODEExporter::exportMetabolites(), CODEExporter::exportMetabolitesConcentrations(), CODEExporter::exportModelEntityExpression(), CODEExporter::exportModelValues(), CModelParameter::toData(), and toData().
|
static |
XML representation of the states
Referenced by CompartmentHandler::processStart(), MetaboliteHandler::processStart(), ModelParameterHandler::processStart(), ModelValueHandler::processStart(), CCopasiXML::saveModel(), CCopasiXML::saveModelParameter(), and CCopasiXML::saveModelParameterSets().