44 while (Remainder !=
"")
65 mValue(std::numeric_limits<
C_FLOAT64 >::quiet_NaN()),
66 mpInitialExpression(NULL),
69 mIsInitialExpressionValid(true)
78 mSimulationType(src.mSimulationType),
80 mpInitialExpression(NULL),
81 mCompareResult(src.mCompareResult),
82 mpObject(src.mpObject),
83 mIsInitialExpressionValid(src.mIsInitialExpressionValid)
128 if (pCompartment == NULL)
141 if (pSpecies == NULL)
162 if (pReaction == NULL)
178 Units.setChemicalEquation(&pReaction->
getChemEq());
268 if (initialExpression ==
"")
314 for (; it != end; ++it, ++Index)
316 if (*it ==
this)
return Index;
350 while (pParent != NULL)
398 assert(pModel != NULL);
400 std::vector< CCopasiContainer * > ListOfContainer;
401 ListOfContainer.push_back(pModel);
409 if (dynamic_cast< CModel * >(
mpObject) != NULL)
411 else if (dynamic_cast< CCompartment * >(
mpObject) != NULL)
413 else if (dynamic_cast< CMetab * >(
mpObject) != NULL)
415 else if (dynamic_cast< CModelValue * >(
mpObject) != NULL)
417 else if (dynamic_cast< CCopasiParameter * >(
mpObject) != NULL)
461 fabs(
getValue(framework) - other.
getValue(framework)) > 50 * (fabs(
getValue(framework)) + fabs(other.
getValue(framework))) * std::numeric_limits< C_FLOAT64 >::epsilon())
525 assert(pModel != NULL);
527 std::vector< CCopasiContainer * > ListOfContainer;
528 ListOfContainer.push_back(pModel);
533 assert(pObject != NULL);
624 if (pReaction != NULL)
636 assert(ModelValue.size() == 1);
645 if (GlobalQuantityCN !=
"")
649 if (pGlobalQuantity != NULL)
693 std::set< CModelParameterSpecies * >::iterator it =
mSpecies.begin();
694 std::set< CModelParameterSpecies * >::iterator end =
mSpecies.end();
696 for (; it != end; ++it)
698 (*it)->mpCompartment = NULL;
706 C_FLOAT64 * pSpeciesValue = SpeciesValues.array();
708 std::set< CModelParameterSpecies * >::iterator it =
mSpecies.begin();
709 std::set< CModelParameterSpecies * >::iterator end =
mSpecies.end();
711 for (; it != end; ++it, ++pSpeciesValue)
713 *pSpeciesValue = (*it)->getValue(framework);
718 pSpeciesValue = SpeciesValues.
array();
721 for (; it != end; ++it, ++pSpeciesValue)
723 (*it)->setValue(*pSpeciesValue, framework);
741 mConcentration(std::numeric_limits<
C_FLOAT64 >::quiet_NaN())
746 mCompartmentCN(src.mCompartmentCN),
748 mConcentration(src.mConcentration)
797 std::string Separator =
"";
805 if (Primary.getObjectType() ==
"Vector" &&
806 Primary.getObjectName() ==
"Compartments")
828 mValue = std::numeric_limits< C_FLOAT64 >::quiet_NaN();
864 os <<
"Model Parameter:" << std::endl;
866 os <<
" CN: " << o.
mCN << std::endl;
867 os <<
" Value: " << o.
mValue << std::endl;
878 mpGlobalQuantity(NULL)
884 mGlobalQuantityCN(src.mGlobalQuantityCN),
885 mpGlobalQuantity(NULL)
901 if (Infix.length() > 2)
905 std::string Separator =
"";
934 std::vector< CCopasiContainer * > ListOfContainer;
937 ListOfContainer.push_back(pModel);
949 if (globalQuantityCN ==
"")
Header file of class CExpression.
CCopasiDataModel * getObjectDataModel()
CCopasiContainer * getObjectAncestor(const std::string &type) const
CModel::AreaUnit getAreaUnitEnum() const
std::string getInitialExpression() const
static std::string nameFromCN(const CCopasiObjectName &cn)
virtual bool setInfix(const std::string &infix)
CModelParameterGroup * mpParent
bool setValue(const CType &value)
std::string getTimeUnitsDisplayString() const
virtual std::string getName() const
const CompareResult & getCompareResult() const
const std::string & getObjectName() const
virtual std::string getName() const
CCopasiObjectName getRemainder() const
virtual const CModelParameter * getChild(const size_t &index) const
CModel::QuantityUnit getQuantityUnitEnum() const
CCopasiObject * get(const std::string &key)
CCopasiObject * getInitialValueReference() const
CModelParameterCompartment * mpCompartment
CModelParameter * getModelParameter(const std::string &cn) const
bool mIsInitialExpressionValid
void addSpecies(CModelParameterSpecies *pSpecies)
void removeSpecies(CModelParameterSpecies *pSpecies)
bool isLocalParameter(const size_t &index) const
static const char * TypeNames[]
CModelParameterCompartment(CModelParameterGroup *pParent, const CModelParameter::Type &type=CModelParameter::Compartment)
void setCompareResult(const CompareResult &compareResult)
bool setInitialExpression(const std::string &expression)
std::set< CModelParameterSpecies * > mSpecies
std::string getObjectType() const
virtual bool compile(std::vector< CCopasiContainer * > listOfContainer=CCopasiContainer::EmptyList)
const std::string getUnit(const Framework &framework) const
const CCopasiObjectName & getCN() const
void setUseHeuristics(bool flag)
CCopasiObject * getObject() const
CExpression * mpInitialExpression
void setInitialExpression(const std::string &initialExpression)
CCopasiObjectName getPrimary() const
virtual const std::string & getKey() const
void setParent(CModelParameterGroup *pParent)
virtual const CompareResult & diff(const CModelParameter &other, const CModelParameter::Framework &framework=ParticleNumbers, const bool &createMissing=false)
const C_FLOAT64 & getInitialValue() const
virtual std::string getChildObjectUnits(const CCopasiObject *pObject) const
const CFunction * getFunction() const
virtual void setValue(const C_FLOAT64 &value, const Framework &framework)
const C_FLOAT64 & getQuantity2NumberFactor() const
virtual void setValue(const double &value, const Framework &framework)
const C_FLOAT64 & getNumber2QuantityFactor() const
size_t getParameterIndex(const std::string ¶meterName, CFunctionParameter::DataType *pType=NULL) const
virtual bool updateModel()
virtual const std::string & getKey() const
const bool & isAutonomous() const
CModelParameterSet * getSet() const
virtual size_t getNumChildren() const
const Value & getValue() const
CModelParameter * mpGlobalQuantity
std::string getElementName(const size_t &pos, const bool &unescape=true) const
CRegisteredObjectName mGlobalQuantityCN
CModel::LengthUnit getLengthUnitEnum() const
CModelEntity::Status mSimulationType
virtual const double & getValue(const Framework &framework) const
void setGlobalQuantityCN(const std::string &globalQuantityCN)
CModelParameterReactionParameter(CModelParameterGroup *pParent, const CModelParameter::Type &type=CModelParameter::ReactionParameter)
virtual ~CModelParameterSpecies()
CCopasiObjectName getCompartmentCN() const
virtual const C_FLOAT64 & getValue(const Framework &framework) const
virtual bool refreshFromModel(const bool &modifyExistence)
const CModelEntity::Status & getSimulationType() const
virtual ~CModelParameterReactionParameter()
CModelParameterSpecies(CModelParameterGroup *pParent, const CModelParameter::Type &type=CModelParameter::Species)
CompareResult mCompareResult
CModel::TimeUnit getTimeUnitEnum() const
static CKeyFactory * getKeyFactory()
CRegisteredObjectName mCompartmentCN
const CExpression * getInitialExpressionPtr() const
void remove(CModelParameter *pModelParameter)
std::vector< CModelParameter * >::const_iterator const_iterator
void setParameterMapping(const size_t &index, const std::string &key)
size_t getCompartmentNumber() const
virtual void setCN(const CCopasiObjectName &cn)
virtual ~CModelParameter()
bool isInitialExpressionValid() const
virtual void setInitialValue(const C_FLOAT64 &initialValue)
virtual void * getValuePointer() const
const Type & getType() const
const CReaction * getReaction() const
const CModelEntity::Status & getStatus() const
CModel::VolumeUnit getVolumeUnitEnum() const
bool setSimulationType(const CModelEntity::Status &simulationType)
virtual void setValue(const C_FLOAT64 &value, const Framework &framework)
std::string getObjectName() const
CCopasiObject * ObjectFromName(const std::vector< CCopasiContainer * > &listOfContainer, const CCopasiObjectName &CN) const
const CChemEq & getChemEq() const
virtual ~CModelParameterCompartment()
CEvaluationNode * getRoot()
const CRegisteredObjectName & getGlobalQuantityCN() const
const std::string & getInfix() const
CCopasiContainer * getObjectParent() const
std::ostream & operator<<(std::ostream &os, const CModelParameter &o)
CModel * getModel() const
CRegisteredObjectName mCN
virtual void setCN(const CCopasiObjectName &cn)
const std::vector< std::string > & getParameterMapping(const size_t &index) const
CModelParameterGroup * getParent() const
CModel * getModel() const