libRoadRunner C API  1.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions
Compartment group

Set and Get information on compartments. More...

Functions

bool getCompartmentByIndex (RRHandle handle, const int index, double *value)
 Retrieve the compartment volume for a particular compartment. More...
 
bool setCompartmentByIndex (RRHandle handle, const int index, const double value)
 Set the volume for a particular compartment. More...
 
int getNumberOfCompartments (RRHandle handle)
 Returns the number of compartments in the model. More...
 
RRStringArrayPtr getCompartmentIds (RRHandle handle)
 Obtain the list of compartment Ids. More...
 

Detailed Description

Set and Get information on compartments.

Function Documentation

bool getCompartmentByIndex ( RRHandle  handle,
const int  index,
double *  value 
)

Retrieve the compartment volume for a particular compartment.

Parameters
[in]handleHandle to a RoadRunner instance
[in]indexThe index to the compartment (corresponds to position in getCompartmentIds(RRHandle handle))
[in]valueThe value returned by the method
Returns
Returns true if successful, false otherwise
RRStringArrayPtr getCompartmentIds ( RRHandle  handle)

Obtain the list of compartment Ids.

Example:

1 str = getCompartmentIds (RRHandle handle);
Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns -1 if it fails, if successful it returns a pointer to a RRStringArrayPtr struct
int getNumberOfCompartments ( RRHandle  handle)

Returns the number of compartments in the model.

Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns number of compartments
bool setCompartmentByIndex ( RRHandle  handle,
const int  index,
const double  value 
)

Set the volume for a particular compartment.

Parameters
[in]handleHandle to a RoadRunner instance
[in]indexThe index to the compartment (corresponds to position in getCompartmentIds(RRHandle handle))
[in]valueThe volume of the compartment to set
Returns
Returns true if successful, false otherwise