copasi API  0.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
COptItem Class Reference

#include <COptItem.h>

Inheritance diagram for COptItem:
CCopasiParameterGroup CCopasiParameter CCopasiContainer CCopasiObject CFitItem CFitConstraint

List of all members.

Public Member Functions

 COptItem (const CCopasiContainer *pParent, const std::string &name="OptimizationItem")
 COptItem (const COptItem &src, const CCopasiContainer *pParent=NULL)
 COptItem (const CCopasiParameterGroup &group, const CCopasiContainer *pParent=NULL)
virtual ~COptItem ()
bool setObjectCN (const CCopasiObjectName &objectCN)
const CCopasiObjectName getObjectCN () const
const CCopasiObjectgetObject () const
std::string getObjectDisplayName () const
bool setLowerBound (const CCopasiObjectName &lowerBound)
const std::string getLowerBound () const
bool setUpperBound (const CCopasiObjectName &upperBound)
const std::string getUpperBound () const
virtual UpdateMethodgetUpdateMethod () const
virtual bool isValid () const
virtual bool compile (const std::vector< CCopasiContainer * > listOfContainer=CCopasiContainer::EmptyList)
virtual C_INT32 checkConstraint () const
virtual C_FLOAT64 getConstraintViolation () const
C_INT32 checkConstraint (const C_FLOAT64 &value) const
bool checkLowerBound (const C_FLOAT64 &value) const
bool checkUpperBound (const C_FLOAT64 &value) const
virtual const C_FLOAT64 * getObjectValue () const
const C_FLOAT64 * getLowerBoundValue () const
const C_FLOAT64 * getUpperBoundValue () const
bool setStartValue (const C_FLOAT64 &value)
const C_FLOAT64 & getStartValue () const
C_FLOAT64 getRandomValue (CRandom *pRandom=NULL)

Static Public Member Functions

static bool isValid (CCopasiParameterGroup &group)

Protected Member Functions

 COptItem ()

Protected Attributes

std::string * mpParmObjectCN
std::string * mpParmLowerBound
std::string * mpParmUpperBound
C_FLOAT64 * mpParmStartValue
const CCopasiObjectmpObject
UpdateMethodmpMethod
const C_FLOAT64 * mpObjectValue
const CCopasiObjectmpLowerObject
const C_FLOAT64 * mpLowerBound
C_FLOAT64 mLowerBound
const CCopasiObjectmpUpperObject
const C_FLOAT64 * mpUpperBound
C_FLOAT64 mUpperBound

Static Protected Attributes

static CRandommpRandom = NULL

Friends

std::ostream & operator<< (std::ostream &os, const COptItem &o)

Constructor & Destructor Documentation

COptItem::COptItem ( ) [protected]

Default constructor

COptItem::COptItem ( const CCopasiContainer pParent,
const std::string &  name = "OptimizationItem" 
)

Specific constructor

Parameters:
constCCopasiContainer * pParent
conststd::string & name (default: OptimizationItem)
COptItem::COptItem ( const COptItem src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters:
constCOptItem & src
constCCopasiContainer * pParent (default: src data model)
COptItem::COptItem ( const CCopasiParameterGroup group,
const CCopasiContainer pParent = NULL 
)

Specific constructor used for reading COPASI files

Parameters:
constCCopasiParameterGroup & group
constCCopasiContainer * pParent (default: group data model)
COptItem::~COptItem ( ) [virtual]

Destructor


Member Function Documentation

C_INT32 COptItem::checkConstraint ( ) const [virtual]

This functions check whether the current value is within the limits of the optimization item.

Returns:
C_INT32 result (-1: to small, 0: within boundaries, 1 to large)

Reimplemented in CFitConstraint, and CFitItem.

C_INT32 COptItem::checkConstraint ( const C_FLOAT64 &  value) const

This functions check whether the value is within the limits of the optimization item.

Parameters:
constC_FLOAT64 & value
Returns:
C_INT32 result (-1: to small, 0: within boundaries, 1 to large)
bool COptItem::checkLowerBound ( const C_FLOAT64 &  value) const

Checks whether the value fulfills the lower bound constraint.

Parameters:
constC_FLOAT64 & value
Returns:
bool fulfills
bool COptItem::checkUpperBound ( const C_FLOAT64 &  value) const

Checks whether the value fulfills the upper bound constraint.

Parameters:
constC_FLOAT64 & value
Returns:
bool fulfills
bool COptItem::compile ( const std::vector< CCopasiContainer * >  listOfContainer = CCopasiContainer::EmptyList) [virtual]

Compile the optimization item. This function must be called before any of the check functions are called.

Parameters:
conststd::vector< CCopasiContainer * > listOfContainer
Returns:
bool success

Reimplemented in CFitItem.

C_FLOAT64 COptItem::getConstraintViolation ( ) const [virtual]

Retrieve the magnitude of the constraint violation This is always a positive number

Returns:
C_FLOAT64 constraintViolation;

Reimplemented in CFitConstraint, and CFitItem.

const std::string COptItem::getLowerBound ( ) const

Retrieve the lower bound.

Returns:
const std::string lowerBound
const C_FLOAT64* COptItem::getLowerBoundValue ( ) const [inline]

Retrieve the value of the lower bound.

Returns:
const C_FLOAT64 * lowerBoundValue
const CCopasiObject * COptItem::getObject ( ) const

Retrieve the item object. This may only be called after compile

Returns:
const CCopasiObject *
const CCopasiObjectName COptItem::getObjectCN ( ) const

Retrieve the object of the optimization item.

Returns:
const CCopasiObjectName objectCN
std::string COptItem::getObjectDisplayName ( ) const

Retrieve the display name of the optimization item.

Returns:
std::string displayName
const C_FLOAT64 * COptItem::getObjectValue ( ) const [virtual]

Retrieve the value of the optimization object.

Returns:
const C_FLOAT64 * objectValue

Reimplemented in CFitItem.

C_FLOAT64 COptItem::getRandomValue ( CRandom pRandom = NULL)

Retrieve a random value in the interval (lower bound, upper bound). Optionally one may provide a random number generator to be used to create the random value.

Parameters:
CRandom* pRandom (default: NULL)
Returns:
C_FLOAT64 randomValue
const C_FLOAT64 & COptItem::getStartValue ( ) const

Retrieve the sart value of the optimization object.

Returns:
const C_FLOAT64 & startValue
UpdateMethod * COptItem::getUpdateMethod ( ) const [virtual]

Retrieve the update method

Returns:
UpdateMethod * pUpdateMethod

Reimplemented from CCopasiObject.

Reimplemented in CFitItem.

const std::string COptItem::getUpperBound ( ) const

Retrieve the upper bound.

Returns:
const std::string upperBound
const C_FLOAT64* COptItem::getUpperBoundValue ( ) const [inline]

Retrieve the value of the upper bound.

Returns:
const C_FLOAT64 * upperBoundValue
bool COptItem::isValid ( ) const [virtual]

Check the validity of the optimization item.

Reimplemented in CFitItem.

bool COptItem::isValid ( CCopasiParameterGroup group) [static]

Check whether the group describes a valid optimization item.

Returns:
bool isValid

Reimplemented in CFitItem.

bool COptItem::setLowerBound ( const CCopasiObjectName lowerBound)

Set the lower bound.

Parameters:
constCCopasiObjectName & lowerBound
Returns:
bool success
bool COptItem::setObjectCN ( const CCopasiObjectName objectCN)

Set the object of the optimization item.

Parameters:
constCCopasiObjectName & objectCN
Returns:
bool success
bool COptItem::setStartValue ( const C_FLOAT64 &  value)

Set the value start value.

Parameters:
constC_FLOAT64 & startValue
Returns:
bool succes
bool COptItem::setUpperBound ( const CCopasiObjectName upperBound)

Set the upper bound.

Parameters:
constCCopasiObjectName & upperBound
Returns:
bool success

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const COptItem o 
) [friend]

Output stream operator

Parameters:
ostream& os
constCOptItem & A
Returns:
ostream & os

Member Data Documentation

C_FLOAT64 COptItem::mLowerBound [protected]

The value of the lower bound (only if not on object)

const C_FLOAT64* COptItem::mpLowerBound [protected]

A pointer to the lower bound value

A pointer to the object for the lower bound

A pointer to the object update method

const CCopasiObject* COptItem::mpObject [protected]

A pointer to the object

const C_FLOAT64* COptItem::mpObjectValue [protected]

A pointer to the object value

std::string* COptItem::mpParmLowerBound [protected]

A pointer to the value of the CCopasiParameter holding the LowerBound

std::string* COptItem::mpParmObjectCN [protected]

A pointer to the value of the CCopasiParameter holding the ObjectCN

C_FLOAT64* COptItem::mpParmStartValue [protected]

A pointer to the value of the CCopasiParameter holding the start value

std::string* COptItem::mpParmUpperBound [protected]

A pointer to the value of the CCopasiParameter holding the UpperBound

CRandom * COptItem::mpRandom = NULL [static, protected]

A pointer to the random number generator used in randomizeStartValue

const C_FLOAT64* COptItem::mpUpperBound [protected]

A pointer to the upper bound value

A pointer to the object for the upper bound

C_FLOAT64 COptItem::mUpperBound [protected]

The value of the upper bound (only if not on object)


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines