libroadrunner C API
Functions
Compartment group

Set and Get information on compartments. More...

Functions

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

Detailed Description

Set and Get information on compartments.

Function Documentation

◆ getCompartmentByIndex()

C_DECL_SPEC bool rrcCallConv 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

◆ getCompartmentIds()

C_DECL_SPEC RRStringArrayPtr rrcCallConv getCompartmentIds ( RRHandle  handle)

Obtain the list of compartment Ids.

Example:

str = getCompartmentIds (RRHandle handle);
C_DECL_SPEC RRStringArrayPtr rrcCallConv getCompartmentIds(RRHandle handle)
Obtain the list of compartment Ids.
void * RRHandle
Void pointer to a RoadRunner instance.
Definition: rrc_types.h:50
Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns -1 if it fails, if successful it returns a pointer to a RRStringArrayPtr struct

◆ getNumberOfCompartments()

C_DECL_SPEC int rrcCallConv getNumberOfCompartments ( RRHandle  handle)

Returns the number of compartments in the model.

Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns number of compartments

◆ setCompartmentByIndex()

C_DECL_SPEC bool rrcCallConv 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