COPASI API
4.40.278
|
#include <CModel.h>
Public Types | |
enum | DependencyType { initial = 0 , transient , physical } |
enum class | ModelType { deterministic , stochastic , __SIZE } |
enum | UnitType { volume = 0 , area , length , time , quantity } |
Public Types inherited from CModelEntity | |
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 | |
void | addModelEntity (const CModelEntity *pModelEntity) |
bool | appendAllDependents (const CDataContainer &container, DataObjectSet &dependentReactions, DataObjectSet &dependentMetabolites, DataObjectSet &dependentCompartments, DataObjectSet &dependentModelValues, DataObjectSet &dependentEvents, DataObjectSet &dependentEventAssignments, const bool &onlyStructural=false) const |
bool | appendAllDependents (const ObjectSet &objects, DataObjectSet &dependentReactions, DataObjectSet &dependentMetabolites, DataObjectSet &dependentCompartments, DataObjectSet &dependentModelValues, DataObjectSet &dependentEvents, DataObjectSet &dependentEventAssignments, const bool &onlyStructural=false) const |
bool | appendDirectDependents (const CDataContainer &container, DataObjectSet &dependentReactions, DataObjectSet &dependentMetabolites, DataObjectSet &dependentCompartments, DataObjectSet &dependentModelValues, DataObjectSet &dependentEvents, DataObjectSet &dependentEventAssignments, const bool &onlyStructural=false) const |
bool | appendDirectDependents (const ObjectSet &objects, DataObjectSet &dependentReactions, DataObjectSet &dependentMetabolites, DataObjectSet &dependentCompartments, DataObjectSet &dependentModelValues, DataObjectSet &dependentEvents, DataObjectSet &dependentEventAssignments, const bool &onlyStructural=false) const |
void | applyActiveParameterSet () |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
void | applyInitialValues () |
bool | buildDependencyGraphs () |
CCore::CUpdateSequence | buildInitialRefreshSequence (std::set< const CDataObject * > &changedObjects) |
void | buildLinkZero () |
void | buildMoieties () |
void | buildRedStoi () |
void | buildStoi () |
void | changeUnitExpressionSymbols (std::string oldSymbol, std::string newSymbol) |
void | clearSbmlIds () |
CModel (CDataContainer *pParent) | |
bool | compileIfNecessary (CProcessReport *pProcessReport) |
bool | convert2NonReversible () |
CCompartment * | createCompartment (const std::string &name, const C_FLOAT64 &volume=1.0) |
CEvent * | createEvent (const std::string &name) |
bool | createEventsForTimeseries (CExperiment *experiment=NULL) |
CMetab * | createMetabolite (const std::string &name, const std::string &compartment, const C_FLOAT64 &iconc=1.0, const CModelEntity::Status &status=CModelEntity::Status::REACTIONS) |
CModelValue * | createModelValue (const std::string &name, const C_FLOAT64 &value=0.0) |
CReaction * | createReaction (const std::string &name) |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const |
CMetab * | findMetabByName (const std::string &name) const |
size_t | findMoiety (const std::string &Target) const |
bool | forceCompile (CProcessReport *pProcessReport) |
void | functionDefinitionChanged (const CFunction *pFunction) |
CModelParameterSet & | getActiveModelParameterSet () |
const CModelParameterSet & | getActiveModelParameterSet () const |
const std::string & | getAreaUnit () const |
std::string | getAreaUnitName () const |
const C_FLOAT64 & | getAvogadro () const |
virtual std::string | getChildObjectUnits (const CDataObject *pObject) const |
CDataVectorNS< CCompartment > & | getCompartments () |
const CDataVectorNS< CCompartment > & | getCompartments () const |
CDataObject * | getCorrespondingTransientObject (const CDataObject *pObject) const |
CDataVectorN< CEvent > & | getEvents () |
const CDataVectorN< CEvent > & | getEvents () const |
const C_FLOAT64 & | getInitialTime () const |
const std::string & | getKey () const |
const CLinkMatrixView & | getL () const |
const CLinkMatrix & | getL0 () const |
const CDataArray * | getLAnnotation () const |
const std::string & | getLengthUnit () const |
std::string | getLengthUnitName () const |
CMathContainer & | getMathContainer () |
const CMathContainer & | getMathContainer () const |
CDataVector< CMetab > & | getMetabolites () |
const CDataVector< CMetab > & | getMetabolites () const |
CDataVector< CMetab > & | getMetabolitesX () |
const CDataVector< CMetab > & | getMetabolitesX () const |
CDataVectorN< CModelParameterSet > & | getModelParameterSets () |
const CDataVectorN< CModelParameterSet > & | getModelParameterSets () const |
const ModelType & | getModelType () const |
CDataVectorN< CModelValue > & | getModelValues () |
const CDataVectorN< CModelValue > & | getModelValues () const |
const CDataVector< CMoiety > & | getMoieties () const |
size_t | getNumAssignmentMetabs () const |
const C_FLOAT64 & | getNumber2QuantityFactor () const |
size_t | getNumDependentReactionMetabs () const |
size_t | getNumIndependentReactionMetabs () const |
size_t | getNumMetabs () const |
size_t | getNumModelValues () const |
size_t | getNumODEMetabs () const |
size_t | getNumVariableMetabs () const |
const CVector< C_FLOAT64 > & | getParticleFlux () const |
const C_FLOAT64 & | getQuantity2NumberFactor () const |
const std::string | getQuantityUnit () const |
std::string | getQuantityUnitName () const |
CDataVectorNS< CReaction > & | getReactions () |
const CDataVectorNS< CReaction > & | getReactions () const |
const std::set< std::pair< const CReaction *, C_FLOAT64 > > & | getReactionsPerSpecies (const CMetab *) const |
const CMatrix< C_FLOAT64 > & | getRedStoi () const |
const CDataArray * | getRedStoiAnnotation () const |
const CStateTemplate & | getStateTemplate () const |
const CMatrix< C_FLOAT64 > & | getStoi () const |
const CDataArray * | getStoiAnnotation () const |
const C_FLOAT64 & | getTime () const |
const std::string & | getTimeUnit () const |
std::string | getTimeUnitName () const |
size_t | getTotSteps () const |
std::vector< const CEvaluationTree * > | getTreesWithDiscontinuities () const |
virtual const std::string | getUnits () const |
CDataObject::DataObjectSet | getUnitSymbolUsage (std::string symbol) const |
std::map< std::string, CUnit > | getUsedUnits () const |
const std::string & | getVolumeUnit () const |
std::string | getVolumeUnitName () const |
bool | hasReversibleReaction () const |
CVector< C_FLOAT64 > | initializeAtolVector (const C_FLOAT64 &baseTolerance, const bool &reducedModel) const |
void | initializeMetabolites () |
const bool & | isAutonomous () const |
const bool & | isCompileNecessary () const |
bool | isStateVariable (const CDataObject *pObject) const |
C_INT32 | load (CReadConfig &configBuffer) |
CEvaluationNode * | prepareElasticity (const CReaction *pReaction, const CModelEntity *pVar, bool simplify) |
void | refreshActiveParameterSet () |
bool | removeCompartment (const CCompartment *pCompartment, const bool &recursive=true) |
bool | removeCompartment (const size_t index, const bool &recursive=true) |
bool | removeCompartment (const std::string &key, const bool &recursive=true) |
void | removeDependentModelObjects (const ObjectSet &deletedObjects, const bool &onlyStructural=false) |
bool | removeEvent (const CEvent *pEvent, const bool &recursive=true) |
bool | removeEvent (const size_t index, const bool &recursive=true) |
bool | removeEvent (const std::string &key, const bool &recursive=true) |
bool | removeFunction (const CFunction *pFunction, const bool &recursive=true) |
bool | removeLocalReactionParameter (const std::string &key, const bool &recursive=true) |
bool | removeMetabolite (const CMetab *pMetabolite, const bool &recursive=true) |
bool | removeMetabolite (const size_t index, const bool &recursive=true) |
bool | removeMetabolite (const std::string &key, const bool &recursive=true) |
void | removeModelEntity (const CModelEntity *pModelEntity) |
bool | removeModelValue (const CModelValue *pModelValue, const bool &recursive=true) |
bool | removeModelValue (const size_t index, const bool &recursive=true) |
bool | removeModelValue (const std::string &key, const bool &recursive=true) |
bool | removeReaction (const CReaction *pReaction, const bool &recursive=true) |
bool | removeReaction (const size_t index, const bool &recursive=true) |
bool | removeReaction (const std::string &key, const bool &recursive=true) |
bool | setAreaUnit (const std::string &name) |
void | setAvogadro (const C_FLOAT64 &avogadro, const CCore::Framework &frameWork) |
void | setCompileFlag (bool flag=true) |
void | setInitialTime (const C_FLOAT64 &time) |
bool | setLengthUnit (const std::string &name) |
void | setModelType (const ModelType &modelType) |
virtual bool | setObjectParent (const CDataContainer *pParent) |
bool | setQuantityUnit (const std::string &name, const CCore::Framework &frameWork) |
void | setTime (const C_FLOAT64 &time) |
bool | setTimeUnit (const std::string &name) |
bool | setVolumeUnit (const std::string &name) |
void | stateToIntialState () |
std::string | suitableForStochasticSimulation () const |
virtual CData | toData () const |
bool | updateInitialValues (const CCore::Framework &framework) |
void | updateInitialValues (const CDataObject *changedObject) |
void | updateInitialValues (std::set< const CDataObject * > &changedObjects) |
~CModel () | |
Public Member Functions inherited from CModelEntity | |
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) | |
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 |
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) |
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) |
~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 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 CModel * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CModelEntity | |
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, ModelType > | ModelTypeNames |
Static Public Attributes inherited from CModelEntity | |
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 |
Private Member Functions | |
bool | buildStateTemplate () |
bool | buildUserOrder () |
void | clearMoieties () |
CModel (const CModel &src) | |
CIssue | compile () |
CIssue | compileEvents () |
bool | handleUnusedMetabolites () |
void | initObjects () |
CModel & | operator= (const CModel &src) |
void | removeDataObject (const CDataObject *pObject) |
void | replaceInExpressions (const std::string &oldStr, const std::string &newStr) |
void | updateMatrixAnnotations () |
void | updateMoietyValues () |
Friends | |
class | CFunctionDB |
Additional Inherited Members | |
Protected Member Functions inherited from CModelEntity | |
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 inherited from CModelEntity | |
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 |
|
strong |
enum CModel::UnitType |
|
private |
CModel::CModel | ( | CDataContainer * | pParent | ) |
CModel::~CModel | ( | ) |
void CModel::addModelEntity | ( | const CModelEntity * | pModelEntity | ) |
Add a model entity to the model
const | CModelEntity * pModelEntity |
References CStateTemplate::add(), and mStateTemplate.
Referenced by CModelEntity::initObjects(), and CModelEntity::setObjectParent().
bool CModel::appendAllDependents | ( | const CDataContainer & | container, |
DataObjectSet & | dependentReactions, | ||
DataObjectSet & | dependentMetabolites, | ||
DataObjectSet & | dependentCompartments, | ||
DataObjectSet & | dependentModelValues, | ||
DataObjectSet & | dependentEvents, | ||
DataObjectSet & | dependentEventAssignments, | ||
const bool & | onlyStructural = false |
||
) | const |
Appends pointers to compartments, species, model values, reactions, events, and event assignments which dependent on the container. list.
const | CDataContainer & container |
CDataObject::DataObjectSet | & dependentReactions |
CDataObject::DataObjectSet | & dependentMetabolites |
CDataObject::DataObjectSet | & dependentCompartments |
CDataObject::DataObjectSet | & dependentModelValues |
CDataObject::DataObjectSet | & dependentEvents |
CDataObject::DataObjectSet | & dependentEventAssignments |
const | bool & onlyStructural (default: false) |
Referenced by CDataContainer::appendDeletedDependentData(), SBMLImporter::createCModelFromSBMLDocument(), CModelExpansion::SetOfModelElements::fillDependencies(), CFunctionDB::getUsedFunctions(), and removeDependentModelObjects().
bool CModel::appendAllDependents | ( | const ObjectSet & | objects, |
DataObjectSet & | dependentReactions, | ||
DataObjectSet & | dependentMetabolites, | ||
DataObjectSet & | dependentCompartments, | ||
DataObjectSet & | dependentModelValues, | ||
DataObjectSet & | dependentEvents, | ||
DataObjectSet & | dependentEventAssignments, | ||
const bool & | onlyStructural = false |
||
) | const |
Appends pointers to compartments, species, model values, reactions, events, and event assignments which dependent on any of the objets. list.
const | ObjectSet & objects |
CDataObject::DataObjectSet | & dependentReactions |
CDataObject::DataObjectSet | & dependentMetabolites |
CDataObject::DataObjectSet | & dependentCompartments |
CDataObject::DataObjectSet | & dependentModelValues |
CDataObject::DataObjectSet | & dependentEvents |
CDataObject::DataObjectSet | & dependentEventAssignments |
const | bool & onlyStructural (default: false) |
References CMathDependencyGraph::appendAllDependents(), CDataVector< CType >::begin(), CDataVector< CType >::end(), CChemEq::getBalances(), CDataObject::getDataObject(), CDataContainer::getDescendants(), CMathContainer::getInitialDependencies(), CMathContainer::getInitialValueObject(), CMathContainer::getMathObject(), CDataObject::getObjectAncestor(), CDataObject::getObjectName(), CDataObject::getObjectParent(), CModelEntity::getRateReference(), CModelEntity::getStatus(), CMathContainer::getTransientDependencies(), CMetab::getTransitionTimeReference(), CUndoObjectInterface::insert(), CDataContainer::insert(), mpMathContainer, mStructuralDependencies, and CModelEntity::REACTIONS.
bool CModel::appendDirectDependents | ( | const CDataContainer & | container, |
CDataObject::DataObjectSet & | dependentReactions, | ||
CDataObject::DataObjectSet & | dependentMetabolites, | ||
CDataObject::DataObjectSet & | dependentCompartments, | ||
CDataObject::DataObjectSet & | dependentModelValues, | ||
CDataObject::DataObjectSet & | dependentEvents, | ||
CDataObject::DataObjectSet & | dependentEventAssignments, | ||
const bool & | onlyStructural = false |
||
) | const |
Appends pointers to compartments, species, model values, reactions, events, and event assignments which directly dependent on the container. list.
const | CDataContainer & container |
CDataObject::DataObjectSet | & dependentReactions |
CDataObject::DataObjectSet | & dependentMetabolites |
CDataObject::DataObjectSet | & dependentCompartments |
CDataObject::DataObjectSet | & dependentModelValues |
CDataObject::DataObjectSet | & dependentEvents |
CDataObject::DataObjectSet | & dependentEventAssignments |
const | bool & onlyStructural (default: false) |
Referenced by CMetab::getCountOfDependentReactions().
bool CModel::appendDirectDependents | ( | const ObjectSet & | objects, |
CDataObject::DataObjectSet & | dependentReactions, | ||
CDataObject::DataObjectSet & | dependentMetabolites, | ||
CDataObject::DataObjectSet & | dependentCompartments, | ||
CDataObject::DataObjectSet & | dependentModelValues, | ||
CDataObject::DataObjectSet & | dependentEvents, | ||
CDataObject::DataObjectSet & | dependentEventAssignments, | ||
const bool & | onlyStructural = false |
||
) | const |
Appends pointers to compartments, species, model values, reactions, events, and event assignments which directly dependent on any of the objets. list.
const | ObjectSet & objects |
CDataObject::DataObjectSet | & dependentReactions |
CDataObject::DataObjectSet | & dependentMetabolites |
CDataObject::DataObjectSet | & dependentCompartments |
CDataObject::DataObjectSet | & dependentModelValues |
CDataObject::DataObjectSet | & dependentEvents |
CDataObject::DataObjectSet | & dependentEventAssignments |
const | bool & onlyStructural (default: false) |
References CMathDependencyGraph::appendDirectDependents(), CDataVector< CType >::begin(), CDataVector< CType >::end(), CEvent::getAssignments(), CDataObject::getDataObject(), CDataContainer::getDescendants(), CMathContainer::getInitialDependencies(), CMathContainer::getMathObject(), CDataObject::getObjectAncestor(), CMathContainer::getTransientDependencies(), CUndoObjectInterface::insert(), CDataContainer::insert(), mpMathContainer, and mStructuralDependencies.
void CModel::applyActiveParameterSet | ( | ) |
Update the model initial values from the active parameter set.
References CModelParameterSet::createFromModel(), CKeyFactory::get(), CModelParameterSet::getKey(), CRootContainer::getKeyFactory(), mActiveParameterSetKey, mParameterSet, and CModelParameterSet::updateModel().
|
virtual |
Apply the provided data to the object
const | CData & data |
Reimplemented from CModelEntity.
References CModelEntity::applyData(), CData::AREA_UNIT, CData::AVOGADRO_NUMBER, deterministic, CData::FRAMEWORK, CCore::FrameworkNames, CData::getProperty(), CData::isSetProperty(), CData::LENGTH_UNIT, CData::MODEL_TYPE, ModelTypeNames, CCore::ParticleNumbers, CData::QUANTITY_UNIT, setAreaUnit(), setAvogadro(), setLengthUnit(), setModelType(), setQuantityUnit(), setTimeUnit(), setVolumeUnit(), CData::TIME_UNIT, CDataValue::toData(), CDataValue::toDouble(), CEnumAnnotation< Type, Enum >::toEnum(), CDataValue::toString(), CData::VALUE, and CData::VOLUME_UNIT.
void CModel::applyInitialValues | ( | ) |
initialize all values of the model with their initial values
References CMathContainer::applyInitialValues(), CMathContainer::fetchInitialState(), mpMathContainer, CCore::ParticleNumbers, CMathContainer::pushAllTransientValues(), CMathContainer::updateInitialValues(), CMathContainer::updateSimulatedValues(), and CMathContainer::updateTransientDataValues().
bool CModel::buildDependencyGraphs | ( | ) |
CCore::CUpdateSequence CModel::buildInitialRefreshSequence | ( | std::set< const CDataObject * > & | changedObjects | ) |
Build the update sequence used to calculate all initial values depending on the changed objects. For metabolites the initial particle number is updated by default unless itself is in the list of changed objects. In that case the initial concentration is updated.
std::set< | const CDataObject * > & changedObjects |
References CMathUpdateSequence::begin(), CMathContainer::getInitialDependencies(), CMathContainer::getInitialStateObjects(), CMathContainer::getMathObject(), CMathDependencyGraph::getUpdateSequence(), mpMathContainer, and CCore::UpdateMoieties.
Referenced by CSlider::setSliderObject(), and updateInitialValues().
void CModel::buildLinkZero | ( | ) |
Build the core of the link matrix L
const | CMatrix< C_FLOAT64 > & LU |
References CLinkMatrix::build(), CLinkMatrix::doRowPivot(), CLinkMatrix::getNumIndependent(), mL, mNumMetabolitesReactionIndependent, and mStoi.
Referenced by compile().
void CModel::buildMoieties | ( | ) |
Build the moieties based on the LU decomposition
References CMoiety::add(), CDataVector< CType >::add(), CMatrix< CType >::array(), CDataVector< CType >::begin(), C_FLOAT64, CDataVector< CType >::cleanup(), CDataObject::getObjectName(), mL, mMetabolitesX, mMoieties, mNumMetabolitesODE, MNumMetabolitesReactionDependent, mNumMetabolitesReactionIndependent, and updateMoietyValues().
Referenced by compile().
void CModel::buildRedStoi | ( | ) |
Build the Reduced Stoichiometry Matrix from the LU decomposition
References CLinkMatrix::applyRowPivot(), CVectorCore< CType >::array(), CDataVector< CType >::begin(), mL, mMetabolitesX, mNumMetabolitesODE, mNumMetabolitesReaction, mNumMetabolitesReactionIndependent, mRedStoi, mStoi, CMatrix< CType >::numCols(), and CMatrix< CType >::resize().
Referenced by compile().
|
private |
Build the state template for the model.
References CVectorCore< CType >::array(), CModelEntity::ASSIGNMENT, CDataVector< CType >::begin(), CDataVector< CType >::end(), mCompartments, mMetabolitesX, mReorderNeeded, mStateTemplate, mSteps, mValues, CModelEntity::ODE, CStateTemplate::reorder(), CDataVector< CType >::size(), and CVectorCore< CType >::size().
Referenced by compile().
void CModel::buildStoi | ( | ) |
Build the Stoichiometry Matrix from the chemical equations of the steps
References CProcessReport::addItem(), CMatrix< CType >::array(), CDataVector< CType >::begin(), C_FLOAT64, C_INT32, CDataVector< CType >::end(), CCopasiMessage::ERROR, CProcessReport::finishItem(), CDataObject::getKey(), handleUnusedMetabolites(), initializeMetabolites(), MCReaction, mMetabolitesX, mNumMetabolitesODE, mNumMetabolitesReaction, mParticleFluxes, mpProcessReport, mReactionsPerSpecies, mSteps, mStoi, CProcessReport::progressItem(), CMatrix< CType >::resize(), CVector< CType >::resize(), and CDataVector< CType >::size().
Referenced by compile().
|
private |
Build the user order for the state template
References CVectorCore< CType >::array(), CDataVector< CType >::begin(), CDataVector< CType >::end(), CStateTemplate::getEntities(), CStateTemplate::getNumIndependent(), CStateTemplate::getUserOrder(), CModelEntity::isUsed(), mCompartments, mJacobianPivot, mMetabolites, mMetabolitesX, MNumMetabolitesReactionDependent, mStateTemplate, mValues, CModelEntity::ODE, CModelEntity::REACTIONS, CVector< CType >::resize(), CStateTemplate::setUserOrder(), CDataVector< CType >::size(), and CVectorCore< CType >::size().
Referenced by compile().
void CModel::changeUnitExpressionSymbols | ( | std::string | oldSymbol, |
std::string | newSymbol | ||
) |
References CDataVector< CType >::begin(), CDataVector< CType >::end(), getModelValues(), mAreaUnit, mLengthUnit, mQuantityUnit, mTimeUnit, mVolumeUnit, and CUnit::replaceSymbol().
Referenced by CCopasiXML::mergeUnitDefinitions().
|
private |
Clear all references to moieties
References CDataVector< CType >::clear(), and mMoieties.
Referenced by removeEvent(), removeMetabolite(), and removeReaction().
void CModel::clearSbmlIds | ( | ) |
clears all SBML ids in the model
References getCompartments(), getEvents(), getMetabolites(), getModelValues(), and getReactions().
|
privatevirtual |
Compile the model value. This is only needed for status ASIGNMENT and ODE.
Reimplemented from CModelEntity.
References CProcessReport::addItem(), CDataVector< CType >::begin(), buildDependencyGraphs(), buildLinkZero(), buildMoieties(), buildRedStoi(), buildStateTemplate(), buildStoi(), buildUserOrder(), C_INT32, CLinkMatrix::clearPivoting(), CMathContainer::compile(), compileEvents(), CModelParameterSet::createFromModel(), CDataVector< CType >::end(), CIssue::Error, CMathContainer::fetchInitialState(), CProcessReport::finishItem(), CMathContainer::isAutonomous(), CRegisteredCommonName::isEnabled(), mCompileIsNecessary, mIsAutonomous, mL, mMetabolitesX, mParameterSet, mpMathContainer, mpProcessReport, CCore::ParticleNumbers, CProcessReport::progressItem(), CMathContainer::pushInitialState(), CRegisteredCommonName::setEnabled(), CProcessReport::setName(), CMathContainer::updateInitialValues(), and updateMatrixAnnotations().
Referenced by compileIfNecessary(), and load().
|
private |
Compile the events
References CDataVector< CType >::begin(), CDataVector< CType >::end(), and mEvents.
Referenced by compile().
bool CModel::compileIfNecessary | ( | CProcessReport * | pProcessReport | ) |
Compile the model if necessary
CProcessReport | * pProcessReport |
References compile(), mCompileIsNecessary, and mpProcessReport.
Referenced by CDataModel::commonAfterLoad(), CModelExpansion::copyCompleteModel(), SBMLImporter::createCModelFromSBMLDocument(), CModelExpansion::createLinearArray(), CModelExpansion::createRectangularArray(), CDataModel::exportMathModel(), CDataModel::exportMathModelToString(), CDataModel::exportSBML(), CDataModel::exportSBMLToString(), CDataModel::exportSEDML(), CDataModel::exportSEDMLToString(), forceCompile(), CDataModel::reparameterizeFromIniFile(), CDataModel::saveModel(), CDataModel::saveModelToString(), CReaction::setReactionScheme(), CModelAdd::simpleCall(), CModelExpansion::simpleCall(), CModelMerging::simpleCall(), and updateInitialValues().
bool CModel::convert2NonReversible | ( | ) |
Converts the set of reactions to a set of reactions where all reactions are irreversible.
References CFunctionDB::addAndAdaptName(), CReaction::addModifier(), CReaction::addProduct(), CReaction::addSubstrate(), CReaction::compile(), createReaction(), CCopasiMessage::ERROR, findFunction(), CFunctionParameter::FLOAT64, CReaction::getChemEq(), CDataObject::getCN(), CReaction::getFluxReference(), CReaction::getFunction(), CRootContainer::getFunctionList(), CReaction::getFunctionParameters(), CDataObject::getObjectName(), CCopasiParameterGroup::getParameter(), CReaction::getParameterCNs(), CReaction::getParameterObjects(), CReaction::getParameters(), CReaction::getParameterValue(), CReaction::getParticleFluxReference(), CChemEq::getProducts(), getReactions(), CChemEq::getSubstrates(), CFunctionParameter::getType(), CFunctionParameter::getUsage(), CCopasiParameter::getValueReference(), CReaction::isLocalParameter(), MCReaction, CFunctionParameter::MODIFIER, CFunctionParameter::PARAMETER, pdelete, CFunctionParameter::PRODUCT, replaceInExpressions(), setCompileFlag(), CReaction::setFunction(), CReaction::setParameterCNs(), CReaction::setParameterValue(), CReaction::setReversible(), CDataVector< CType >::size(), CFunctionParameters::size(), CFunction::splitFunction(), and CFunctionParameter::SUBSTRATE.
CCompartment * CModel::createCompartment | ( | const std::string & | name, |
const C_FLOAT64 & | volume = 1.0 |
||
) |
Add a compartment to the model
const | std::string &name |
const | C_FLOAT64 & volume (default 1.0) |
References CDataVectorN< CType >::add(), C_INVALID_INDEX, CDataVectorN< CType >::getIndex(), mCompartments, mCompileIsNecessary, CModelEntity::setInitialValue(), and volume.
Referenced by CModelAdd::addCompartments(), SBMLImporter::createCCompartmentFromCompartment(), CChemEqInterface::createNonExistingMetabs(), CReactionInterface::createOtherObjects(), and CModelExpansion::duplicateCompartment().
CEvent * CModel::createEvent | ( | const std::string & | name | ) |
Add a new event to the model
const | std::string &name |
References CDataVectorN< CType >::add(), C_INVALID_INDEX, CDataVectorN< CType >::getIndex(), mCompileIsNecessary, and mEvents.
Referenced by CModelAdd::addEvents(), createEventsForTimeseries(), CModelExpansion::duplicateEvent(), and SBMLImporter::importEvent().
bool CModel::createEventsForTimeseries | ( | CExperiment * | experiment = NULL | ) |
Creates events for all elements of an parameter estimation time course experiment
References CDataVectorN< CType >::add(), CLocaleString::c_str(), CExpression::compile(), CExperiment::compile(), createEvent(), CCopasiMessage::ERROR, CLocaleString::fromUtf8(), CEvent::getAssignments(), CObjectInterface::getCN(), CDataObject::getCN(), CObjectInterface::getDataObject(), CExperiment::getDependentData(), CExperiment::getDependentObjectsMap(), getDependentOrNull(), CExperimentSet::getExperiment(), CFitProblem::getExperimentSet(), CExperiment::getExperimentType(), CEventAssignment::getExpressionPtr(), CExperiment::getFileName(), getNextId(), CExperiment::getNumDataRows(), CDataContainer::getObject(), CDataObject::getObjectDataModel(), CDataObject::getObjectDisplayName(), CDataObject::getObjectParent(), CCopasiTask::getProblem(), CDataModel::getTaskList(), CExperiment::getTimeData(), CEvent::getTriggerExpressionPtr(), mpMathContainer, CMatrix< CType >::numCols(), CExperiment::read(), CEventAssignment::setExpression(), CEvent::setTriggerExpression(), CCopasiParameterGroup::size(), time, CTaskEnum::timeCourse, and CCopasiMessage::WARNING.
CMetab * CModel::createMetabolite | ( | const std::string & | name, |
const std::string & | compartment, | ||
const C_FLOAT64 & | iconc = 1.0 , |
||
const CModelEntity::Status & | status = CModelEntity::Status::REACTIONS |
||
) |
Add a metabolite to the model
const | std::string & name |
const | std::string & compartment |
const | C_FLOAT64 & iconc (default 1.0) |
const | CMetab::Status & status (default CMetab::METAB_VARIABL) |
References CDataVector< CType >::add(), C_INVALID_INDEX, CDataContainer::getIndex(), CDataVectorN< CType >::getIndex(), CModelEntity::getInitialValue(), getMetabolites(), getQuantity2NumberFactor(), mCompartments, mCompileIsNecessary, mMetabolites, CModelEntity::mpModel, CMetab::setInitialConcentration(), CModelEntity::setInitialValue(), CModelEntity::setStatus(), and CDataVector< CType >::size().
Referenced by CModelAdd::addMetabolites(), SBMLImporter::createCMetabFromSpecies(), CChemEqInterface::createNonExistingMetabs(), and CModelExpansion::duplicateMetab().
CModelValue * CModel::createModelValue | ( | const std::string & | name, |
const C_FLOAT64 & | value = 0.0 |
||
) |
Add a non concentration value to the model
const | std::string &name |
const | C_FLOAT64 & value (default 0.0) |
References CDataVectorN< CType >::add(), C_INVALID_INDEX, CDataVectorN< CType >::getIndex(), mCompileIsNecessary, mValues, and CModelEntity::setInitialValue().
Referenced by CModelAdd::addModelValues(), CFixLocalReactionParameters::changeModel(), SEDMLUtils::createAmountMV(), SBMLImporter::createCModelValueFromParameter(), SBMLImporter::createCReactionFromReaction(), CModelExpansion::createLinearArray(), CReactionInterface::createOtherObjects(), CModelExpansion::createRectangularArray(), CModelExpansion::duplicateGlobalQuantity(), and CModelExpansion::simpleCall().
CReaction * CModel::createReaction | ( | const std::string & | name | ) |
Add a new reaction to the model
const | std::string &name |
References CDataVectorN< CType >::add(), C_INVALID_INDEX, CDataVectorN< CType >::getIndex(), mCompileIsNecessary, and mSteps.
Referenced by CModelAdd::addReactions(), convert2NonReversible(), SBMLImporter::createCReactionFromReaction(), CModelExpansion::createDiffusionReaction(), and CModelExpansion::duplicateReaction().
|
virtual |
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 CModelEntity.
References CUndoData::addProperty(), CData::addProperty(), CData::AREA_UNIT, CData::AVOGADRO_NUMBER, CUndoData::CHANGE, CModelEntity::createUndoData(), CData::FRAMEWORK, CCore::FrameworkNames, CData::getProperty(), CData::LENGTH_UNIT, mAreaUnit, mAvogadro, mLengthUnit, CData::MODEL_TYPE, ModelTypeNames, mQuantityUnit, mTimeUnit, mVolumeUnit, CData::QUANTITY_UNIT, CData::TIME_UNIT, CDataValue::toData(), CData::VALUE, and CData::VOLUME_UNIT.
CMetab * CModel::findMetabByName | ( | const std::string & | name | ) | const |
Returns the pointer to the species with the given name
const | std::string & name |
Returns the index of the metab
References CDataObjectMap::equal_range(), CDataContainer::getObjects(), mMetabolites, and unQuote().
Referenced by CMetabNameInterface::getMetabolite(), and CReaction::loadOneRole().
size_t CModel::findMoiety | ( | const std::string & | Target | ) | const |
Returns the index of the moiety
const | std::string & Target |
Returns the index of the Moiety
References C_INVALID_INDEX, CDataObject::getObjectName(), mMoieties, and CDataVector< CType >::size().
bool CModel::forceCompile | ( | CProcessReport * | pProcessReport | ) |
Force a compile the model.
CProcessReport | * pProcessReport |
References compileIfNecessary(), and setCompileFlag().
Referenced by CModel(), and CModelExpansion::replaceInModel().
|
static |
Static method to create a CDataObject based on the provided data
const | CData & data |
References CModel(), CData::getProperty(), NO_PARENT, CData::OBJECT_NAME, CDataObject::setObjectName(), and CDataValue::toString().
void CModel::functionDefinitionChanged | ( | const CFunction * | pFunction | ) |
Trigger a model compile in the case the function is used in the model
References CMathDependencyGraph::appendDirectDependents(), mStructuralDependencies, and setCompileFlag().
CModelParameterSet & CModel::getActiveModelParameterSet | ( | ) |
References mParameterSet.
const CModelParameterSet & CModel::getActiveModelParameterSet | ( | ) | const |
Retrieve the parameter set
References mParameterSet.
Referenced by CDataModel::commonAfterLoad(), SEDMLImporter::importModel(), CModelParameterSet::isActive(), ModelHandler::processEnd(), CDataModel::saveModel(), CCopasiXML::saveModelParameterSets(), and CDataModel::saveModelToString().
const std::string & CModel::getAreaUnit | ( | ) | const |
Get the current area unit of the model
References mAreaUnit.
Referenced by CSBMLExporter::createAreaUnit(), and CCompartment::getUnits().
std::string CModel::getAreaUnitName | ( | ) | const |
Get the unit for areas
References mAreaUnit.
Referenced by CCopasiXML::saveModel(), and CCopasiXML::saveModelParameterSets().
const C_FLOAT64 & CModel::getAvogadro | ( | ) | const |
Retrieve the Avogadro number.
References mAvogadro.
Referenced by CCopasiXML::saveModel(), and CCopasiXML::saveModelParameterSets().
|
virtual |
Retrieve the units of the child object.
Reimplemented from CModelEntity.
References CModelEntity::getChildObjectUnits(), mpAvogadroReference, mpQuantity2NumberFactorReference, and mQuantityUnit.
CDataVectorNS< CCompartment > & CModel::getCompartments | ( | ) |
Return the compartments of this model
References mCompartments.
Referenced by CModelAdd::addCompartments(), CModelAdd::addCompartmentsExpressions(), CModelAdd::addReactions(), CSBMLExporter::checkForInitialAssignments(), CSBMLExporter::checkForPiecewiseFunctions(), CModelAnalyzer::checkReaction(), clearSbmlIds(), CSBMLExporter::collectIds(), CChemEqInterface::completeCompartments(), SBMLImporter::createCCompartmentFromCompartment(), CSBMLExporter::createCompartments(), CModelParameterSet::createFromModel(), CChemEqInterface::createNonExistingMetabs(), CSBMLExporter::createSBMLDocument(), CReactionInterface::createUndoData(), CMathContainer::createValueChangeProhibited(), CODEExporter::exportCompartments(), CODEExporter::exportModelValuesExpressions(), CODEExporterC::exportTitleData(), CModelExpansion::SetOfModelElements::fillComplete(), CDataModel::findObjectByDisplayName(), CReactionInterface::getConcentrationRateUnit(), CMetabNameInterface::getDisplayName(), CObjectLists::getListOfConstObjects(), CMetabNameInterface::getMetabolite(), SEDMLUtils::getObjectForSbmlId(), CExpressionGenerator::getObjectsForSelection(), CReactionInterface::getUnit(), CReactionInterface::getUnitVector(), CSBMLExporter::hasVolumeAssignment(), CLsodaMethod::initializeParameter(), CReactionInterface::isLocked(), CSBMLExporter::isModelSBMLCompatible(), CLNAMethod::isValidProblem(), CMCAMethod::isValidProblem(), CTSSAMethod::isValidProblem(), CModelMerging::mergeMetabolites(), CODEExporter::preprocess(), CODEExporterC::preprocess(), CompartmentHandler::processStart(), removeCompartment(), SBMLImporter::removeUnusedFunctions(), CModelExpansion::replaceInModel(), CCopasiXML::saveModel(), CMetab::setCompartment(), SBMLImporter::setInitialValues(), CTSSAMethod::start(), CReactionInterface::writeBackToReaction(), and CMMLOutput::writeDifferentialEquations().
const CDataVectorNS< CCompartment > & CModel::getCompartments | ( | ) | const |
Return the compartments of this model
References mCompartments.
CDataObject * CModel::getCorrespondingTransientObject | ( | const CDataObject * | pObject | ) | const |
Retrieve the corresponding transient state object of the given object
const | CDataObject * pObject |
References CMetab::getConcentrationReference(), CMetab::getInitialConcentrationReference(), CDataObject::getObjectParent(), and CModelEntity::getValueReference().
CDataVectorN< CEvent > & CModel::getEvents | ( | ) |
Return the vector of events
References mEvents.
Referenced by CModelAdd::addEvents(), CMathContainer::allocate(), CSBMLExporter::checkForEvents(), clearSbmlIds(), CSBMLExporter::collectIds(), CMathContainer::compileEvents(), CSBMLExporter::createEvents(), CSBMLExporter::createSBMLDocument(), CModelExpansion::SetOfModelElements::fillComplete(), CObjectLists::getEventTargets(), CSBMLExporter::hasVolumeAssignment(), SBMLImporter::importEvent(), CMathContainer::initializeEvents(), CSBMLExporter::isModelSBMLCompatible(), CTSSAMethod::isValidProblem(), CModelMerging::mergeMetabolites(), EventHandler::processStart(), SBMLImporter::removeUnusedFunctions(), CModelExpansion::replaceInModel(), and CCopasiXML::saveModel().
const CDataVectorN< CEvent > & CModel::getEvents | ( | ) | const |
Return the vector of events
References mEvents.
const C_FLOAT64 & CModel::getInitialTime | ( | ) | const |
Retrieve the initial time
References CModelEntity::mIValue.
Referenced by CModelParameterSet::createFromModel(), CSEDMLExporter::createTimeCourseTask(), and CEvaluationNodeObject::toAST().
|
virtual |
Return the key of this model
Reimplemented from CModelEntity.
References CAnnotation::mKey.
Referenced by ModelHandler::processEnd(), CCopasiXML::saveModel(), CCopasiXML::saveModelParameterSets(), and CModelAdd::simpleCall().
const CLinkMatrixView & CModel::getL | ( | ) | const |
Get the LU decomposition matrix of this model
References mLView.
Referenced by CODEExporter::exportMetabolites().
const CLinkMatrix & CModel::getL0 | ( | ) | const |
Get the relevant portion of the link matrix L.
References mL.
Referenced by CLNAMethod::calculateCovarianceMatrixFull(), and CMCAMethod::createLinkMatrix().
const CDataArray * CModel::getLAnnotation | ( | ) | const |
References mpLinkMatrixAnnotation.
const std::string & CModel::getLengthUnit | ( | ) | const |
Get the current length unit of the model
References mLengthUnit.
Referenced by CSBMLExporter::createLengthUnit(), and CCompartment::getUnits().
std::string CModel::getLengthUnitName | ( | ) | const |
Get the unit for lengths
References mLengthUnit.
Referenced by CCopasiXML::saveModel(), and CCopasiXML::saveModelParameterSets().
CMathContainer & CModel::getMathContainer | ( | ) |
Retrieve the container of all mathematical objects
References mpMathContainer.
const CMathContainer & CModel::getMathContainer | ( | ) | const |
Retrieve the container of all mathematical objects
References mpMathContainer.
Referenced by CDataModel::commonAfterLoad(), CMetab::compileIsInitialValueChangeAllowed(), CODEExporter::exportObjectNodesFromModel(), CModelParameterGroup::getObjectUnit(), CCopasiTask::initObjects(), TaskHandler::processStart(), CCopasiProblem::setModel(), SEDMLImporter::updateCopasiTaskForSimulation(), and CSlider::writeToObject().
CDataVector< CMetab > & CModel::getMetabolites | ( | ) |
References mMetabolites.
const CDataVector< CMetab > & CModel::getMetabolites | ( | ) | const |
Return the metabolites of this model
References mMetabolites.
Referenced by CModelAdd::addMetabolites(), CModelAdd::addMetabolitesExpressions(), CSBMLExporter::checkForInitialAssignments(), CSBMLExporter::checkForODESpeciesInNonfixedCompartment(), CSBMLExporter::checkForPiecewiseFunctions(), SBMLUnitSupport::checkForSpatialSizeUnits(), clearSbmlIds(), CSBMLExporter::collectIds(), CPlotSpecification::createDefaultPlot(), CModelParameterSet::createFromModel(), createMetabolite(), CSBMLExporter::createMetabolites(), CSBMLExporter::createSBMLDocument(), CReactionInterface::createUndoData(), CMetabNameInterface::doesExist(), CObjectLists::existsFixedMetab(), CODEExporter::exportModelValuesExpressions(), CModelExpansion::SetOfModelElements::fillComplete(), CDataModel::findObjectByDisplayName(), CObjectLists::getListOfConstObjects(), SEDMLUtils::getObjectForSbmlId(), CExpressionGenerator::getObjectsForSelection(), CSBMLExporter::isModelSBMLCompatible(), CMetabNameInterface::isUnique(), CTSSAMethod::isValidProblem(), CModelMerging::mergeMetabolites(), CEFMProblem::printResult(), MetaboliteHandler::processStart(), removeMetabolite(), SBMLImporter::removeUnusedFunctions(), CModelExpansion::replaceInModel(), CCopasiXML::saveModel(), SBMLImporter::setInitialValues(), CModelMerging::simpleCall(), and CMMLOutput::writeDifferentialEquations().
CDataVector< CMetab > & CModel::getMetabolitesX | ( | ) |
References mMetabolitesX.
const CDataVector< CMetab > & CModel::getMetabolitesX | ( | ) | const |
Retrieves the vector of metabolites at it is used in the reduced model.
References mMetabolitesX.
Referenced by CSSAMethod::buildKineticMatrix(), CReactionInterface::createUndoData(), CODEExporter::exportExpression(), CODEExporter::exportMetabolites(), CODEExporter::exportMetabolitesConcentrations(), CODEExporter::exportODEs(), CODEExporter::exportReacParamsAndFuncs(), CODEExporterC::exportTitleData(), CODEExporter::preprocess(), CODEExporterC::preprocess(), CILDMMethod::printResult(), CILDMModifiedMethod::printResult(), CLNAMethod::resizeAllMatrices(), CMCAMethod::resizeAllMatrices(), CILDMMethod::setAnnotationM(), and CILDMModifiedMethod::setAnnotationM().
CDataVectorN< CModelParameterSet > & CModel::getModelParameterSets | ( | ) |
References mParameterSets.
const CDataVectorN< CModelParameterSet > & CModel::getModelParameterSets | ( | ) | const |
Return the non model parameter sets
References mParameterSets.
Referenced by CFitProblem::createParameterSet(), CDataModel::loadModelParameterSets(), ModelHandler::processStart(), ModelParameterSetHandler::processStart(), and CCopasiXML::saveModelParameterSets().
const CModel::ModelType & CModel::getModelType | ( | ) | const |
Retrieve the type of the model.
References mType.
Referenced by CMathObject::compilePropensity(), CCopasiXML::saveModel(), and CCopasiXML::saveModelParameterSets().
CDataVectorN< CModelValue > & CModel::getModelValues | ( | ) |
References mValues.
const CDataVectorN< CModelValue > & CModel::getModelValues | ( | ) | const |
Return the non concentration values of this model
References mValues.
Referenced by CModelAdd::addModelValues(), CModelAdd::addModelValuesExpressions(), changeUnitExpressionSymbols(), CSBMLExporter::checkForInitialAssignments(), CSBMLExporter::checkForPiecewiseFunctions(), CModelAnalyzer::checkReaction(), clearSbmlIds(), CSBMLExporter::collectIds(), CReactionInterface::connectNonMetabolites(), SEDMLUtils::createAmountMV(), SBMLImporter::createCModelFromSBMLDocument(), SBMLImporter::createCModelValueFromParameter(), CModelParameterSet::createFromModel(), CSBMLExporter::createParameters(), CSBMLExporter::createSBMLDocument(), CReactionInterface::createUndoData(), CDataModel::exportMathModel(), CDataModel::exportMathModelToString(), CODEExporter::exportModelValues(), CODEExporter::exportModelValuesExpressions(), CODEExporterC::exportTitleData(), CModelExpansion::SetOfModelElements::fillComplete(), CSBMLExporter::findAvogadro(), CDataModel::findObjectByDisplayName(), CObjectLists::getListOfConstObjects(), SEDMLUtils::getObjectForSbmlId(), CExpressionGenerator::getObjectsForSelection(), getQuantityParameterOrValue(), CReactionInterface::getUnit(), getUnitSymbolUsage(), getUsedUnits(), CReactionInterface::isLocked(), CSBMLExporter::isModelSBMLCompatible(), CTSSAMethod::isValidProblem(), CModelMerging::mergeMetabolites(), CODEExporter::preprocess(), CODEExporterC::preprocess(), ModelValueHandler::processStart(), removeModelValue(), SBMLImporter::removeUnusedFunctions(), CModelExpansion::replaceInModel(), CCopasiXML::saveModel(), SBMLImporter::setInitialValues(), CReactionInterface::writeBackToReaction(), and CMMLOutput::writeDifferentialEquations().
const CDataVector< CMoiety > & CModel::getMoieties | ( | ) | const |
Return the mMoieties of this model
References mMoieties.
Referenced by CMathContainer::allocate(), CMathContainer::initializeObjects(), and CMoietiesProblem::printResult().
size_t CModel::getNumAssignmentMetabs | ( | ) | const |
Get the number of metabolites determined by assignments
References mNumMetabolitesAssignment.
Referenced by CLNAMethod::isValidProblem(), and CTSSAMethod::isValidProblem().
const C_FLOAT64 & CModel::getNumber2QuantityFactor | ( | ) | const |
Get the conversion factor number -> quantity
References mNumber2QuantityFactor.
Referenced by CTimeSeries::compile(), CMetab::convertToConcentration(), CReactionInterface::createUndoData(), CILDMMethod::deuflhard(), CMoiety::initConversionFactor(), CILDMMethod::newton(), CModelParameterSpecies::setValue(), CCSPMethod::start(), and CTSSAMethod::start().
size_t CModel::getNumDependentReactionMetabs | ( | ) | const |
Get the number of dependent metabolites determined by reactions
References mNumMetabolitesReaction, and mNumMetabolitesReactionIndependent.
Referenced by CMathContainer::allocate(), initializeAtolVector(), CCSPMethod::initializeOutput(), and CCSPMethod::setAnnotationM().
size_t CModel::getNumIndependentReactionMetabs | ( | ) | const |
Get the number of independent metabolites determined by reactions
References mNumMetabolitesReactionIndependent.
Referenced by CMathContainer::allocate(), CSSAMethod::buildKineticMatrix(), CMCAMethod::createLinkMatrix(), CODEExporter::exportExpression(), CODEExporter::exportMetabolites(), CODEExporter::exportODEs(), CODEExporter::exportReacParamsAndFuncs(), CODEExporterC::exportTitleData(), CCSPMethod::initializeOutput(), and CCSPMethod::setAnnotationM().
size_t CModel::getNumMetabs | ( | ) | const |
Get the number of total metabolites
References mMetabolitesX, and CDataVector< CType >::size().
Referenced by CMathContainer::allocate(), and CODEExporter::exportModelValuesExpressions().
size_t CModel::getNumModelValues | ( | ) | const |
Get the number of non concentration values
References mValues, and CDataVector< CType >::size().
Referenced by CODEExporter::exportModelValuesExpressions().
size_t CModel::getNumODEMetabs | ( | ) | const |
Get the number of metabolites determined by ODEs
References mNumMetabolitesODE.
Referenced by CMathContainer::allocate(), CODEExporter::exportExpression(), CODEExporter::exportMetabolites(), CODEExporter::exportODEs(), CODEExporter::exportReacParamsAndFuncs(), CODEExporterC::exportTitleData(), CLNAMethod::isValidProblem(), and CTSSAMethod::isValidProblem().
size_t CModel::getNumVariableMetabs | ( | ) | const |
Get the number of variable metabolites
References mNumMetabolitesAssignment, mNumMetabolitesODE, and mNumMetabolitesReaction.
Retrieve the vector of particle fluxes from the model
References mParticleFluxes.
const C_FLOAT64 & CModel::getQuantity2NumberFactor | ( | ) | const |
Get the conversion factor quantity -> number
References mQuantity2NumberFactor.
Referenced by addParticleNumberToInitialValueMap(), CSteadyStateMethod::allPositive(), CMetab::calculate(), CMetab::convertToNumber(), CSBMLExporter::createAvogadroIfNeeded(), SBMLImporter::createCModelFromSBMLDocument(), createMetabolite(), CReactionInterface::createUndoData(), CSBMLExporter::exportEventAssignments(), CODEExporter::exportExpression(), CSBMLExporter::findAvogadro(), getQuantityParameterOrValue(), CLsodaMethod::initializeParameter(), SBMLImporter::preprocessNode(), CSBMLExporter::replaceSpeciesReferences(), SBMLImporter::setInitialValues(), CModelParameterSpecies::setValue(), and CTSSAMethod::start().
const std::string CModel::getQuantityUnit | ( | ) | const |
Get the current quantity unit of the model
References mQuantityUnit.
Referenced by CSBMLExporter::createSubstanceUnit(), CCopasiXML::fixBuild18(), CReactionInterface::getAmountRateUnit(), CReaction::getChildObjectUnits(), CMetab::getChildObjectUnits(), CReactionInterface::getConcentrationRateUnit(), CReaction::getKineticLawUnit(), CReactionInterface::getUnit(), CReactionInterface::getUnitVector(), and CSBMLExporter::replaceSpeciesReferences().
std::string CModel::getQuantityUnitName | ( | ) | const |
Get the unit for quantities
References mQuantityUnit.
Referenced by CCopasiXML::saveModel(), and CCopasiXML::saveModelParameterSets().
CDataVectorNS< CReaction > & CModel::getReactions | ( | ) |
Return the vector of reactions
References mSteps.
Referenced by CModelAdd::addReactions(), CMathContainer::allocate(), CSBMLExporter::assignSBMLIdsToReactions(), CBitPatternMethod::buildKernelMatrix(), CBitPatternTreeMethod::buildKernelMatrix(), CSBMLExporter::checkForPiecewiseFunctions(), CFixLocalReactionParameters::checkModel(), CHybridMethod::checkModel(), CHybridMethodODE45::checkModel(), CModelAnalyzer::checkModel(), clearSbmlIds(), CSBMLExporter::collectIds(), CMathContainer::compile(), convert2NonReversible(), SBMLImporter::createCModelFromSBMLDocument(), SBMLImporter::createCReactionFromReaction(), CModelParameterSet::createFromModel(), CSBMLExporter::createReactions(), CSBMLExporter::createSBMLDocument(), CCSPMethod::CSPOutput(), CODEExporter::exportExpression(), CODEExporterC::exportKineticFunctionGroup(), CODEExporter::exportReacParamsAndFuncs(), CODEExporterC::exportTitleData(), CModelExpansion::SetOfModelElements::fillComplete(), CDataModel::findObjectByDisplayName(), CCopasiXML::fixBuild113(), CObjectLists::getListOfConstObjects(), SEDMLUtils::getObjectForSbmlId(), CExpressionGenerator::getObjectsForSelection(), CEFMAlgorithm::initialize(), CSSAMethod::initialize(), CMathContainer::initializeObjects(), CCSPMethod::initializeOutput(), CEFMMethod::isValidProblem(), CLNAMethod::isValidProblem(), CMMLOutput::listReactionsForMetab(), CModelMerging::mergeMetabolites(), CODEExporter::preprocess(), CODEExporterC::preprocess(), CCSPMethod::printResult(), CILDMMethod::printResult(), ReactionHandler::processStart(), removeReaction(), SBMLImporter::removeUnusedFunctions(), CModelExpansion::replaceInModel(), CMCAMethod::resizeAllMatrices(), CCopasiXML::saveModel(), CCSPMethod::setAnnotationM(), CILDMMethod::setAnnotationM(), CLLayoutRenderer::setDeduceSpeciesReferenceRoles(), and CLLayoutRenderer::update_associations().
const CDataVectorNS< CReaction > & CModel::getReactions | ( | ) | const |
const std::set< std::pair< const CReaction *, C_FLOAT64 > > & CModel::getReactionsPerSpecies | ( | const CMetab * | pSpecies | ) | const |
Return the vector of reaction indices for a species
References mReactionsPerSpecies.
Referenced by CMathObject::compileTransitionTime(), CMathObject::createExtensiveReactionNoiseExpression(), and CMathObject::createExtensiveReactionRateExpression().
Get the Reduced Stoichiometry Matrix of this Model
References mRedStoi.
Referenced by CBitPatternMethod::buildKernelMatrix(), CBitPatternTreeMethod::buildKernelMatrix(), CMCAMethod::createLinkMatrix(), CODEExporter::exportExpression(), CODEExporter::exportReacParamsAndFuncs(), CMathContainer::getStoichiometry(), CSSAMethod::initialize(), CEFMMethod::isValidProblem(), and CILDMMethod::step().
const CDataArray * CModel::getRedStoiAnnotation | ( | ) | const |
References mpRedStoiAnnotation.
const CStateTemplate & CModel::getStateTemplate | ( | ) | const |
Retrieve the state template
References mStateTemplate.
Referenced by CMathContainer::allocate(), CFixLocalReactionParameters::checkModel(), CCSPMethod::CSPOutput(), CMathContainer::initializeObjects(), CCSPMethod::initializeOutput(), CCSPMethod::printResult(), CCopasiXML::saveModel(), and CCSPMethod::setAnnotationM().
Get the stoichiometry matrix of this model
Get the reordered stoichiometry matrix of this model
References mStoi.
Referenced by CHybridMethod::checkModel(), CHybridMethodODE45::checkModel(), CMCAMethod::createLinkMatrix(), CMathContainer::getStoichiometry(), and CEFMAlgorithm::initialize().
const CDataArray * CModel::getStoiAnnotation | ( | ) | const |
References mpStoiAnnotation.
const C_FLOAT64 & CModel::getTime | ( | ) | const |
Retrieve the actual model time
References CModelEntity::mValue.
Referenced by CExperiment::calculateStatistics().
const std::string & CModel::getTimeUnit | ( | ) | const |
Get the current time unit of the model
References mTimeUnit.
Referenced by CSBMLExporter::createTimeUnit(), CCopasiXML::fixBuildBefore104(), CReactionInterface::getAmountRateUnit(), CReaction::getChildObjectUnits(), CMetab::getChildObjectUnits(), CModelEntity::getChildObjectUnits(), CReactionInterface::getConcentrationRateUnit(), CReaction::getKineticLawUnit(), CEvaluationNodeDelay::getUnit(), and CEvaluationNodeDelay::setUnit().
std::string CModel::getTimeUnitName | ( | ) | const |
Get the unit for time
References mTimeUnit.
Referenced by CCSPMethod::printResult(), CILDMMethod::printResult(), CILDMModifiedMethod::printResult(), CCopasiXML::saveModel(), and CCopasiXML::saveModelParameterSets().
size_t CModel::getTotSteps | ( | ) | const |
Get the total steps
References mSteps, and CDataVector< CType >::size().
Referenced by CModelAnalyzer::checkModel().
std::vector< const CEvaluationTree * > CModel::getTreesWithDiscontinuities | ( | ) | const |
generates a string that contains a text description of all model parameters (initial values and reaction parameters) List all trees which introduce discrete changes.
References CVectorCore< CType >::array(), CModelEntity::ASSIGNMENT, CDataVector< CType >::begin(), CDataVector< CType >::end(), CStateTemplate::getEntities(), mEvents, mStateTemplate, mSteps, CModelEntity::ODE, and CStateTemplate::size().
Referenced by CMathContainer::createDiscontinuityEvents().
|
virtual |
Retrieve the units of the object.
Reimplemented from CDataContainer.
References mTimeUnit.
Referenced by CReactionInterface::getUnit().
CDataObject::DataObjectSet CModel::getUnitSymbolUsage | ( | std::string | symbol | ) | const |
std::map< std::string, CUnit > CModel::getUsedUnits | ( | ) | const |
const std::string & CModel::getVolumeUnit | ( | ) | const |
Get the current volume unit of the model
References mVolumeUnit.
Referenced by CSBMLExporter::createVolumeUnit(), CReactionInterface::getConcentrationRateUnit(), CReaction::getKineticLawUnit(), CReactionInterface::getUnit(), CCompartment::getUnits(), and CReactionInterface::getUnitVector().
std::string CModel::getVolumeUnitName | ( | ) | const |
Get the unit for volumes
References mVolumeUnit.
Referenced by CCopasiXML::saveModel(), and CCopasiXML::saveModelParameterSets().
|
private |
Handles unused metabolites and moves them to the end of mMetabolites. Rows of the stoichiometry matrix dealing with unused metabolites are removed.
References CMatrix< CType >::array(), CDataVector< CType >::begin(), C_FLOAT64, min, mMetabolitesX, mNumMetabolitesAssignment, mNumMetabolitesODE, mNumMetabolitesReaction, mNumMetabolitesUnused, mStoi, CMatrix< CType >::numCols(), and CMatrix< CType >::numRows().
Referenced by buildStoi().
bool CModel::hasReversibleReaction | ( | ) | const |
Check whether the model contains reversible reactions
References mSteps, and CDataVector< CType >::size().
CVector< C_FLOAT64 > CModel::initializeAtolVector | ( | const C_FLOAT64 & | baseTolerance, |
const bool & | reducedModel | ||
) | const |
Initialize a vector of individual absolute tolerances
const | C_FLOAT64 & baseTolerance |
const | bool & reducedModel |
References CVectorCore< CType >::array(), CStateTemplate::beginIndependent(), C_FLOAT64, CMetab::getCompartment(), CModelEntity::getInitialValue(), getNumDependentReactionMetabs(), CStateTemplate::getNumIndependent(), max, min, mQuantity2NumberFactor, mStateTemplate, CVector< CType >::resize(), and CVectorCore< CType >::size().
void CModel::initializeMetabolites | ( | ) |
This function must be called to initialize the vector of Metabolites after finishing adding metabolites to compartments.
References CDataVector< CType >::add(), CModelEntity::ASSIGNMENT, CDataVector< CType >::begin(), CDataVector< CType >::clear(), CDataVector< CType >::end(), fatalError, CModelEntity::FIXED, mCompartments, mMetabolitesX, mNumMetabolitesAssignment, mNumMetabolitesODE, mNumMetabolitesReaction, mNumMetabolitesUnused, CModelEntity::ODE, and CModelEntity::REACTIONS.
Referenced by buildStoi(), CModel(), load(), CModelExpansion::replaceInMetab(), and CMetab::setCompartment().
|
private |
Initialize the contained CDataObjects
References CStateTemplate::add(), CDataContainer::addMatrixReference(), CDataContainer::addObjectReference(), CAnnotation::getNotes(), mLView, CModelEntity::mpIValueReference, mpLinkMatrixAnnotation, mpMathContainer, CModelEntity::mpModel, mpRedStoiAnnotation, mpStoiAnnotation, CModelEntity::mpValueReference, CModelEntity::mRate, mRedStoi, mStateTemplate, mSteps, mStoi, CDataArray::Objects, CDataArray::setCopasiVector(), CDataArray::setDescription(), CDataArray::setDimensionDescription(), CDataArray::setMode(), CDataObject::setObjectName(), CDataObject::ValueDbl, and CDataArray::VectorOnTheFly.
Referenced by CModel().
const bool & CModel::isAutonomous | ( | ) | const |
const bool & CModel::isCompileNecessary | ( | ) | const |
Check whether a model compile is necessary.
References mCompileIsNecessary.
bool CModel::isStateVariable | ( | const CDataObject * | pObject | ) | const |
Check whether the given object is a part of state variable
const | CDataObject * pObject |
References CStateTemplate::beginIndependent(), CStateTemplate::endDependent(), CObjectLists::getEventTargets(), CDataObject::getObjectParent(), and mStateTemplate.
C_INT32 CModel::load | ( | CReadConfig & | configBuffer | ) |
Loads an object with data coming from a CReadConfig object. (CReadConfig object reads an input stream)
pconfigbuffer | reference to a CReadConfig object. |
References CDataVector< CType >::add(), C_INT32, CDataVector< CType >::cleanup(), compile(), CRootContainer::getFunctionList(), CDataContainer::getIndex(), CCopasiMessage::getLastMessage(), CCopasiException::getMessage(), CCopasiMessage::getNumber(), CDataObject::getObjectDataModel(), CReadConfig::getVariable(), initializeMetabolites(), CDataVectorS< CType >::load(), CDataVectorNS< CType >::load(), CReadConfig::LOOP, mCompartments, MCReadConfig, CModelEntity::mIValue, mMetabolites, mSteps, CCore::ParticleNumbers, CDataModel::pOldMetabolites, CReadConfig::SEARCH, setCompileFlag(), CAnnotation::setNotes(), CDataObject::setObjectName(), setQuantityUnit(), setTimeUnit(), setVolumeUnit(), CCopasiMessage::size(), and CDataVector< CType >::size().
Referenced by CDataModel::loadModel().
CEvaluationNode * CModel::prepareElasticity | ( | const CReaction * | pReaction, |
const CModelEntity * | pVar, | ||
bool | simplify | ||
) |
References CCopasiNode< _Data >::addChild(), CEvaluationNode::CN, CEvaluationNodeObject::compile(), CExpression::compile(), CDerive::compileTree(), CDerive::deleteBranch(), CDerive::deriveBranch(), CDataObject::getCN(), CMetab::getConcentrationReference(), CReaction::getFunction(), CReaction::getMap(), CFunctionParameterMap::getObjects(), CDataContainer::getObjects(), CEvaluationTree::getRoot(), CReaction::isReversible(), CEvaluationNode::MINUS, CDerive::multiply(), CEvaluationTree::setRoot(), and CCallParameters< Type >::size().
void CModel::refreshActiveParameterSet | ( | ) |
refresh the active parameter set from the model initial values
References mParameterSet, and CModelParameterSet::refreshFromModel().
Referenced by stateToIntialState(), and updateInitialValues().
bool CModel::removeCompartment | ( | const CCompartment * | pCompartment, |
const bool & | recursive = true |
||
) |
Remove a Compartment from the model
References C_INVALID_INDEX, mCompartments, mCompileIsNecessary, removeDataObject(), and removeDependentModelObjects().
bool CModel::removeCompartment | ( | const size_t | index, |
const bool & | recursive = true |
||
) |
Remove a Compartment from the model
References getCompartments().
Referenced by removeCompartment(), removeDependentModelObjects(), and CModelExpansion::replaceInModel().
bool CModel::removeCompartment | ( | const std::string & | key, |
const bool & | recursive = true |
||
) |
Remove a Compartment from the model
References CKeyFactory::get(), CRootContainer::getKeyFactory(), and removeCompartment().
|
private |
Remove a data container from the model
const | CDataObject * pObject |
References mpMathContainer, mStructuralDependencies, CMathContainer::removeDataObject(), and CMathDependencyGraph::removeObject().
Referenced by removeCompartment(), removeDependentModelObjects(), removeEvent(), removeFunction(), removeMetabolite(), removeModelValue(), and removeReaction().
void CModel::removeDependentModelObjects | ( | const ObjectSet & | deletedObjects, |
const bool & | onlyStructural = false |
||
) |
Remove all model objects which depend on the deleted objects
const | CDataObject::ObjectSet & deletedObjects |
const | bool & onlyStructural (default: false) |
References appendAllDependents(), removeCompartment(), removeDataObject(), removeEvent(), removeMetabolite(), removeModelValue(), and removeReaction().
Referenced by removeCompartment(), removeFunction(), removeLocalReactionParameter(), removeMetabolite(), removeModelValue(), and removeReaction().
bool CModel::removeEvent | ( | const CEvent * | pEvent, |
const bool & | recursive = true |
||
) |
Remove an event from the model
const | CEvent * pEvent |
const | bool & recursive (default: true) |
References C_INVALID_INDEX, clearMoieties(), mCompileIsNecessary, mEvents, and removeDataObject().
bool CModel::removeEvent | ( | const size_t | index, |
const bool & | recursive = true |
||
) |
Remove an event from the model
const | size_t index |
const | bool & recursive (default: true) |
References mEvents.
Referenced by removeDependentModelObjects(), removeEvent(), and CModelExpansion::replaceInModel().
bool CModel::removeEvent | ( | const std::string & | key, |
const bool & | recursive = true |
||
) |
Remove an event from the model
const | std::string & key |
const | bool & recursive (default: true) |
References CKeyFactory::get(), CRootContainer::getKeyFactory(), and removeEvent().
bool CModel::removeFunction | ( | const CFunction * | pFunction, |
const bool & | recursive = true |
||
) |
References mCompileIsNecessary, removeDataObject(), and removeDependentModelObjects().
bool CModel::removeLocalReactionParameter | ( | const std::string & | key, |
const bool & | recursive = true |
||
) |
Remove a local reaction parameter from the model
References CKeyFactory::get(), CRootContainer::getKeyFactory(), CDataContainer::insert(), and removeDependentModelObjects().
bool CModel::removeMetabolite | ( | const CMetab * | pMetabolite, |
const bool & | recursive = true |
||
) |
bool CModel::removeMetabolite | ( | const size_t | index, |
const bool & | recursive = true |
||
) |
References getMetabolites(), and removeMetabolite().
bool CModel::removeMetabolite | ( | const std::string & | key, |
const bool & | recursive = true |
||
) |
References CKeyFactory::get(), and CRootContainer::getKeyFactory().
Referenced by removeDependentModelObjects(), removeMetabolite(), CModelExpansion::replaceInModel(), and CModelMerging::simpleCall().
void CModel::removeModelEntity | ( | const CModelEntity * | pModelEntity | ) |
Remove a model entity to the model
const | CModelEntity * pModelEntity |
References mStateTemplate, and CStateTemplate::remove().
Referenced by CModelEntity::setObjectParent(), and CModelEntity::~CModelEntity().
bool CModel::removeModelValue | ( | const CModelValue * | pModelValue, |
const bool & | recursive = true |
||
) |
bool CModel::removeModelValue | ( | const size_t | index, |
const bool & | recursive = true |
||
) |
References getModelValues(), and removeModelValue().
bool CModel::removeModelValue | ( | const std::string & | key, |
const bool & | recursive = true |
||
) |
References CKeyFactory::get(), CRootContainer::getKeyFactory(), and removeModelValue().
bool CModel::removeReaction | ( | const CReaction * | pReaction, |
const bool & | recursive = true |
||
) |
Remove a reaction from the model using its pointer
References C_INVALID_INDEX, clearMoieties(), mCompileIsNecessary, mSteps, removeDataObject(), and removeDependentModelObjects().
Referenced by removeDependentModelObjects(), removeReaction(), and CModelExpansion::replaceInModel().
bool CModel::removeReaction | ( | const size_t | index, |
const bool & | recursive = true |
||
) |
Remove a reaction from the model using its index
References getReactions(), and removeReaction().
bool CModel::removeReaction | ( | const std::string & | key, |
const bool & | recursive = true |
||
) |
Remove a reaction from the model using its key
References CKeyFactory::get(), CRootContainer::getKeyFactory(), and removeReaction().
|
private |
Replace the old string with the new string in all expressions in the model
const | std::string & oldStr |
const | std::string & newStr |
References CDataVector< CType >::begin(), CDataVector< CType >::end(), mCompartments, mEvents, mMetabolitesX, mValues, and stringReplace().
Referenced by convert2NonReversible().
bool CModel::setAreaUnit | ( | const std::string & | name | ) |
Set the unit for areas.
const | std::string & name |
References mAreaUnit, and CUnit::prettyPrint().
Referenced by applyData(), SBMLUnitSupport::checkElementUnits(), SBMLImporter::createCModelFromSBMLDocument(), SBMLUnitSupport::importUnitsFromSBMLDocument(), and ModelHandler::processStart().
void CModel::setAvogadro | ( | const C_FLOAT64 & | avogadro, |
const CCore::Framework & | frameWork | ||
) |
Set the Avogadro number used for the model.
const | C_FLOAT64 & avogadro |
References mAvogadro, mQuantityUnit, and setQuantityUnit().
Referenced by applyData(), SBMLUnitSupport::importUnitsFromSBMLDocument(), and ModelHandler::processStart().
void CModel::setCompileFlag | ( | bool | flag = true | ) |
This must be called whenever something is changed in the model that would make it necessary to recalculate the matrix decomposition
References mCompileIsNecessary.
Referenced by CStateTemplate::add(), CReaction::addParameterObject(), CEventAssignment::applyData(), CEvent::applyData(), CReaction::applyData(), CModelEntity::applyData(), CEventAssignment::CEventAssignment(), convert2NonReversible(), forceCompile(), functionDefinitionChanged(), CEvent::initObjects(), load(), ModelHandler::processEnd(), CStateTemplate::remove(), CDataModel::reparameterizeFromIniFile(), CModelExpansion::replaceInMetab(), CMetab::setCompartment(), CEvent::setDelayAssignment(), CEvent::setDelayExpression(), CEvent::setDelayExpressionPtr(), CEventAssignment::setExpression(), CModelEntity::setExpression(), CEventAssignment::setExpressionPtr(), CModelEntity::setExpressionPtr(), CEvent::setFireAtInitialTime(), CModelEntity::setHasNoise(), CReaction::setHasNoise(), CModelEntity::setInitialExpression(), CModelEntity::setInitialExpressionPtr(), CModelEntity::setNoiseExpression(), CReaction::setNoiseExpression(), CModelEntity::setNoiseExpressionPtr(), CReaction::setNoiseExpressionPtr(), CEventAssignment::setObjectParent(), CEvent::setObjectParent(), CReaction::setParameterObjects(), CEvent::setPersistentTrigger(), CEvent::setPriorityExpression(), CEvent::setPriorityExpressionPtr(), CModelEntity::setStatus(), CEventAssignment::setTargetCN(), CEvent::setTriggerExpression(), CEvent::setTriggerExpressionPtr(), CEvent::~CEvent(), CEventAssignment::~CEventAssignment(), and CReaction::~CReaction().
void CModel::setInitialTime | ( | const C_FLOAT64 & | time | ) |
Return a pointer to the current time Set the start time for modeling
const | C_FLOAT64 & time |
References CModelEntity::mIValue, and time.
Referenced by SEDMLImporter::updateCopasiTaskForSimulation().
bool CModel::setLengthUnit | ( | const std::string & | name | ) |
Set the unit for lengths.
const | std::string & name |
References mLengthUnit, and CUnit::prettyPrint().
Referenced by applyData(), SBMLUnitSupport::checkElementUnits(), SBMLImporter::createCModelFromSBMLDocument(), SBMLUnitSupport::importUnitsFromSBMLDocument(), and ModelHandler::processStart().
void CModel::setModelType | ( | const ModelType & | modelType | ) |
Get the unit for quantities
const | ModelType & modelType |
References mType.
Referenced by applyData(), SBMLImporter::createCModelFromSBMLDocument(), and ModelHandler::processStart().
|
virtual |
Set the object parent
const | CDataContainer * pParent |
Reimplemented from CModelEntity.
References CDataObject::setObjectParent().
Referenced by CDataModel::commonAfterLoad().
bool CModel::setQuantityUnit | ( | const std::string & | name, |
const CCore::Framework & | frameWork | ||
) |
Set the unit for quantities. If COPASI recognizes the unit the conversion factors are set accordingly and true is returned.
const | std::string & name |
References CBaseUnit::avogadro, CBaseUnit::dimensionless, CUnit::getComponents(), CUnit::isDimensionless(), CUnit::isUndefined(), mAvogadro, mNumber2QuantityFactor, mQuantity2NumberFactor, mQuantityUnit, CUnit::prettyPrint(), and updateInitialValues().
Referenced by applyData(), SBMLUnitSupport::checkElementUnits(), CModel(), SBMLImporter::createCModelFromSBMLDocument(), CCopasiXML::fixBuild18(), SBMLUnitSupport::importUnitsFromSBMLDocument(), load(), ModelHandler::processStart(), and setAvogadro().
void CModel::setTime | ( | const C_FLOAT64 & | time | ) |
Set the actual model time
const | C_FLOAT64 & time |
References CModelEntity::mValue, and time.
bool CModel::setTimeUnit | ( | const std::string & | name | ) |
Set the unit for time. If COPASI recognizes the unit the conversion factors are set accordingly and true is returned.
const | std::string & name |
References mTimeUnit, and CUnit::prettyPrint().
Referenced by applyData(), SBMLUnitSupport::checkElementUnits(), SBMLImporter::createCModelFromSBMLDocument(), CCopasiXML::fixBuildBefore104(), SBMLUnitSupport::importUnitsFromSBMLDocument(), load(), and ModelHandler::processStart().
bool CModel::setVolumeUnit | ( | const std::string & | name | ) |
Set the unit for volumes. If COPASI recognizes the unit the conversion factors are set accordingly and true is returned.
const | std::string & name |
References mVolumeUnit, and CUnit::prettyPrint().
Referenced by applyData(), SBMLUnitSupport::checkElementUnits(), SBMLImporter::createCModelFromSBMLDocument(), SBMLUnitSupport::importUnitsFromSBMLDocument(), load(), and ModelHandler::processStart().
void CModel::stateToIntialState | ( | ) |
Copy the current state value to the initial state
References CMathContainer::fetchState(), CMathContainer::getState(), mpMathContainer, CCore::ParticleNumbers, CMathContainer::pushInitialState(), refreshActiveParameterSet(), CMathContainer::setInitialState(), and CMathContainer::updateInitialValues().
std::string CModel::suitableForStochasticSimulation | ( | ) | const |
check if the model is suitable for stochastic simulation
References C_FLOAT64, C_INT32, CModelEntity::getInitialValue(), max, mMetabolites, mSteps, mStoi, CMatrix< CType >::numRows(), and CDataVector< CType >::size().
Referenced by CHybridMethod::isValidProblem(), CStochDirectMethod::isValidProblem(), CStochMethod::isValidProblem(), CTauLeapMethod::isValidProblem(), CTrajAdaptiveSA::isValidProblem(), and CTrajectoryMethodDsaLsodar::isValidProblem().
|
virtual |
Retrieve the data describing the object
Reimplemented from CModelEntity.
References CData::addProperty(), CData::AREA_UNIT, CData::AVOGADRO_NUMBER, CData::FRAMEWORK, CCore::FrameworkNames, CData::LENGTH_UNIT, mAreaUnit, mAvogadro, mLengthUnit, CData::MODEL_TYPE, ModelTypeNames, mQuantityUnit, mTimeUnit, mType, mVolumeUnit, CCore::ParticleNumbers, CData::QUANTITY_UNIT, CData::TIME_UNIT, CModelEntity::toData(), CData::VALUE, and CData::VOLUME_UNIT.
bool CModel::updateInitialValues | ( | const CCore::Framework & | framework | ) |
Update all initial values.
const | CCore::Framework & framework |
References compileIfNecessary(), CMathContainer::fetchInitialState(), mpMathContainer, CMathContainer::pushInitialState(), refreshActiveParameterSet(), and CMathContainer::updateInitialValues().
Referenced by CCompartment::applyData(), CDataModel::changeModelParameter(), CDataModel::commonAfterLoad(), SBMLImporter::setInitialValues(), setQuantityUnit(), SEDMLImporter::updateCopasiTaskForSimulation(), updateInitialValues(), and CModelParameterSet::updateModel().
void CModel::updateInitialValues | ( | const CDataObject * | changedObject | ) |
Builds and executes the the update sequence used to calculate all initial values depending on the changed objects For metabolites the initial particle number is updated by default unless itself is in the list of changed objects. In that case the initial concentration is updated.
std::set< | const CDataObject * > & changedObjects |
References updateInitialValues().
void CModel::updateInitialValues | ( | std::set< const CDataObject * > & | changedObjects | ) |
Builds and executes the the update sequence used to calculate all initial values depending on the changed objects. For metabolites the initial particle number is updated by default unless itself is in the list of changed objects. In that case the initial concentration is updated.
std::set< | const CDataObject * > & changedObjects |
References CMathContainer::applyUpdateSequence(), buildInitialRefreshSequence(), compileIfNecessary(), CMathContainer::fetchInitialState(), mpMathContainer, CMathContainer::pushInitialState(), and refreshActiveParameterSet().
|
private |
This updates the annotations of the link matrix and the stoichiometry matrix
References CDataVector< CType >::begin(), mMetabolitesX, mNumMetabolitesODE, MNumMetabolitesReactionDependent, mNumMetabolitesReactionIndependent, mpLinkMatrixAnnotation, mpRedStoiAnnotation, mpStoiAnnotation, mSteps, CDataArray::resize(), CDataArray::setAnnotation(), and CDataArray::setCopasiVector().
Referenced by compile().
|
private |
compute the actual initial value of all moieties (from the initial values of the metabolites).
References CDataVector< CType >::begin(), CDataVector< CType >::end(), and mMoieties.
Referenced by buildMoieties().
|
friend |
|
private |
The key of the currently active parameter set.
Referenced by applyActiveParameterSet().
|
private |
The volume unit used in the Model
Referenced by changeUnitExpressionSymbols(), createUndoData(), getAreaUnit(), getAreaUnitName(), getUnitSymbolUsage(), getUsedUnits(), setAreaUnit(), and toData().
|
private |
The Avogadro number used for this model.
Referenced by createUndoData(), getAvogadro(), setAvogadro(), setQuantityUnit(), and toData().
|
private |
A Boolean value indicating whether we need to rebuild the initial value refresh sequence
|
private |
for array of compartments
Referenced by buildDependencyGraphs(), buildStateTemplate(), buildUserOrder(), createCompartment(), createMetabolite(), getCompartments(), initializeMetabolites(), load(), removeCompartment(), and replaceInExpressions().
|
private |
indicates whether a recalculation of the stoichiometry matrix decomposition is necessary
Referenced by compile(), compileIfNecessary(), createCompartment(), createEvent(), createMetabolite(), createModelValue(), createReaction(), isCompileNecessary(), removeCompartment(), removeEvent(), removeFunction(), removeMetabolite(), removeModelValue(), removeReaction(), and setCompileFlag().
|
private |
for array of events
Referenced by buildDependencyGraphs(), compileEvents(), createEvent(), getEvents(), getTreesWithDiscontinuities(), removeEvent(), and replaceInExpressions().
|
private |
A flag indicating whether the model is autonomous.
Referenced by compile(), and isAutonomous().
|
private |
Vector for storing the row interchanges during LU-Decomposition Vector for storing the row and column interchanges needed to calculate the full Jacobian in user order.
Referenced by buildUserOrder().
|
private |
This matrix stores L
Referenced by buildLinkZero(), buildMoieties(), buildRedStoi(), compile(), and getL0().
|
private |
The volume unit used in the Model
Referenced by changeUnitExpressionSymbols(), createUndoData(), getLengthUnit(), getLengthUnitName(), getUnitSymbolUsage(), getUsedUnits(), setLengthUnit(), and toData().
|
private |
This is used to return a view to L
Referenced by getL(), and initObjects().
|
private |
Vector of reference to metabolites
Referenced by buildDependencyGraphs(), buildUserOrder(), createMetabolite(), findMetabByName(), getMetabolites(), load(), removeMetabolite(), and suitableForStochasticSimulation().
|
private |
Vector of reference to metabolites in reduced model representation
Referenced by buildMoieties(), buildRedStoi(), buildStateTemplate(), buildStoi(), buildUserOrder(), compile(), getMetabolitesX(), getNumMetabs(), handleUnusedMetabolites(), initializeMetabolites(), removeMetabolite(), replaceInExpressions(), and updateMatrixAnnotations().
|
private |
for array of conserved moieties
Referenced by buildMoieties(), clearMoieties(), findMoiety(), getMoieties(), and updateMoietyValues().
|
private |
Factor to convert from particle number to quantity taking into account the unit for substance quantities
Referenced by getNumber2QuantityFactor(), and setQuantityUnit().
|
private |
The number of metabs determined by assignments in the model
Referenced by getNumAssignmentMetabs(), getNumVariableMetabs(), handleUnusedMetabolites(), and initializeMetabolites().
|
private |
The number of metabs determined by ODEs in the model
Referenced by buildMoieties(), buildRedStoi(), buildStoi(), getNumODEMetabs(), getNumVariableMetabs(), handleUnusedMetabolites(), initializeMetabolites(), and updateMatrixAnnotations().
|
private |
The number of metabs determined by reactions in the model
Referenced by buildRedStoi(), buildStoi(), getNumDependentReactionMetabs(), getNumVariableMetabs(), handleUnusedMetabolites(), and initializeMetabolites().
|
private |
The number of metabs determined by reactions which can be calculated through moieties
Referenced by buildLinkZero(), buildMoieties(), buildRedStoi(), getNumDependentReactionMetabs(), getNumIndependentReactionMetabs(), and updateMatrixAnnotations().
|
private |
The number of unused metabs in the model
Referenced by handleUnusedMetabolites(), and initializeMetabolites().
|
static |
String representation of the valid model types.
Referenced by applyData(), createUndoData(), ModelHandler::processStart(), CCopasiXML::saveModel(), CCopasiXML::saveModelParameterSets(), and toData().
|
private |
The parameter set of the model itself
Referenced by applyActiveParameterSet(), compile(), getActiveModelParameterSet(), and refreshActiveParameterSet().
|
private |
Vector of parameter sets
Referenced by getModelParameterSets().
Vectors of fluxes of the reactions.
Referenced by buildStoi(), and getParticleFlux().
|
private |
Referenced by getChildObjectUnits().
|
private |
Column and Row Annotation for the Link Matrix
Referenced by getLAnnotation(), initObjects(), updateMatrixAnnotations(), and ~CModel().
|
private |
The container of the mathematical model.
Referenced by appendAllDependents(), appendDirectDependents(), applyInitialValues(), buildInitialRefreshSequence(), compile(), createEventsForTimeseries(), getMathContainer(), initObjects(), removeDataObject(), stateToIntialState(), updateInitialValues(), and ~CModel().
|
private |
A pointer to the process report. If not NULL the compile progress is reported to it.
Referenced by buildStoi(), compile(), and compileIfNecessary().
|
private |
Referenced by getChildObjectUnits().
|
private |
Column and Row Annotation for the reduced Stoichiometry Matrix
Referenced by getRedStoiAnnotation(), initObjects(), updateMatrixAnnotations(), and ~CModel().
|
private |
Column and Row Annotation for the reduced Stoichiometry Matrix
Referenced by getStoiAnnotation(), initObjects(), updateMatrixAnnotations(), and ~CModel().
|
private |
Factor to convert from quantity to particle number taking into account the unit for substance quantities
Referenced by getQuantity2NumberFactor(), initializeAtolVector(), and setQuantityUnit().
|
private |
The quantity unit used in the Model
Referenced by changeUnitExpressionSymbols(), CModel(), createUndoData(), getChildObjectUnits(), getQuantityUnit(), getQuantityUnitName(), getUnitSymbolUsage(), getUsedUnits(), setAvogadro(), setQuantityUnit(), and toData().
|
private |
Vector of species that contains associated reactions
Referenced by buildStoi(), and getReactionsPerSpecies().
Reduced Stoichiometry Matrix
Referenced by buildRedStoi(), getRedStoi(), and initObjects().
|
private |
A flag indicating whether the state template has to be reordered
Referenced by buildStateTemplate().
|
private |
The state template for the model
Referenced by addModelEntity(), buildStateTemplate(), buildUserOrder(), getStateTemplate(), getTreesWithDiscontinuities(), initializeAtolVector(), initObjects(), isStateVariable(), and removeModelEntity().
|
private |
for array of steps
Referenced by buildDependencyGraphs(), buildStateTemplate(), buildStoi(), createReaction(), getReactions(), getTotSteps(), getTreesWithDiscontinuities(), hasReversibleReaction(), initObjects(), load(), removeReaction(), suitableForStochasticSimulation(), and updateMatrixAnnotations().
Stoichiometry Matrix
Referenced by buildLinkZero(), buildRedStoi(), buildStoi(), getStoi(), handleUnusedMetabolites(), initObjects(), and suitableForStochasticSimulation().
|
private |
The structural dependencies
Referenced by appendAllDependents(), appendDirectDependents(), buildDependencyGraphs(), functionDefinitionChanged(), and removeDataObject().
|
private |
The time unit used in the Model
Referenced by changeUnitExpressionSymbols(), createUndoData(), getTimeUnit(), getTimeUnitName(), getUnits(), getUnitSymbolUsage(), getUsedUnits(), setTimeUnit(), and toData().
|
private |
The type of the model
Referenced by getModelType(), setModelType(), and toData().
|
private |
vector of non concentration values in the model
Referenced by buildDependencyGraphs(), buildStateTemplate(), buildUserOrder(), createModelValue(), getModelValues(), getNumModelValues(), removeModelValue(), and replaceInExpressions().
|
private |
The volume unit used in the Model
Referenced by changeUnitExpressionSymbols(), createUndoData(), getUnitSymbolUsage(), getUsedUnits(), getVolumeUnit(), getVolumeUnitName(), setVolumeUnit(), and toData().