libroadrunner C API
Functions
Parameters group

Set and get global and local parameters. More...

Functions

C_DECL_SPEC RRVectorPtr rrcCallConv getGlobalParameterValues (RRHandle handle)
 Retrieve the values for all the global parameter values in a vector. More...
 
C_DECL_SPEC bool rrcCallConv setGlobalParameterByIndex (RRHandle handle, const int index, const double value)
 Set the value for a particular global parameter. More...
 
C_DECL_SPEC bool rrcCallConv getGlobalParameterByIndex (RRHandle handle, const int index, double *value)
 Retrieve the global parameter value. More...
 
C_DECL_SPEC int rrcCallConv getNumberOfGlobalParameters (RRHandle handle)
 Returns the number of global parameters in the model. More...
 
C_DECL_SPEC RRStringArrayPtr rrcCallConv getGlobalParameterIds (RRHandle handle)
 Obtain the list of global parameter Ids. More...
 

Detailed Description

Set and get global and local parameters.

Function Documentation

◆ getGlobalParameterByIndex()

C_DECL_SPEC bool rrcCallConv getGlobalParameterByIndex ( RRHandle  handle,
const int  index,
double *  value 
)

Retrieve the global parameter value.

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

◆ getGlobalParameterIds()

C_DECL_SPEC RRStringArrayPtr rrcCallConv getGlobalParameterIds ( RRHandle  handle)

Obtain the list of global parameter Ids.

Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns null if it fails, if successful it returns a pointer to a RRStringArrayPtr struct

◆ getGlobalParameterValues()

C_DECL_SPEC RRVectorPtr rrcCallConv getGlobalParameterValues ( RRHandle  handle)

Retrieve the values for all the global parameter values in a vector.

Example:

C_DECL_SPEC RRVectorPtr rrcCallConv getGlobalParameterValues(RRHandle handle)
Retrieve the values for all the global parameter values in a vector.
Structure for a simple vector of doubles.
Definition: rrc_types.h:58
Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns the vector of global parameter values or null if an error occurred

◆ getNumberOfGlobalParameters()

C_DECL_SPEC int rrcCallConv getNumberOfGlobalParameters ( RRHandle  handle)

Returns the number of global parameters in the model.

Parameters
[in]handleHandle to a RoadRunner instance

◆ setGlobalParameterByIndex()

C_DECL_SPEC bool rrcCallConv setGlobalParameterByIndex ( RRHandle  handle,
const int  index,
const double  value 
)

Set the value for a particular global parameter.

Parameters
[in]handleHandle to a RoadRunner instance
indexThe index to the global parameter (corresponds to position in getGlobalParameterIds(RRHandle handle))
valueThe value of the parameter to set
Returns
Returns true if successful