libroadrunner C API
Functions
Time-course simulation

Deterministic, stochastic, and hybrid simulation algorithms. More...

Functions

C_DECL_SPEC bool rrcCallConv setConfigurationXML (RRHandle handle, const char *caps)
 Set the simulator's capabilities. More...
 
C_DECL_SPEC char *rrcCallConv getConfigurationXML (RRHandle handle)
 Get the simulator's capabilities. More...
 
C_DECL_SPEC bool rrcCallConv setTimeStart (RRHandle handle, double timeStart)
 Set the time start for a time course simulation. More...
 
C_DECL_SPEC bool rrcCallConv setTimeEnd (RRHandle handle, double timeEnd)
 Set the time end for a time course simulation. More...
 
C_DECL_SPEC bool rrcCallConv setNumPoints (RRHandle handle, int numberOfPoints)
 Set the number of points to generate in a time course simulation. More...
 
C_DECL_SPEC bool rrcCallConv setTimeCourseSelectionList (RRHandle handle, const char *list)
 Set the selection list for output from simulate(void) or simulateEx(void) More...
 
C_DECL_SPEC RRStringArrayPtr rrcCallConv getTimeCourseSelectionList (RRHandle handle)
 Get the current selection list for simulate(void) or simulateEx(void) More...
 
C_DECL_SPEC RRCDataPtr rrcCallConv simulate (RRHandle handle)
 Carry out a time-course simulation. setTimeStart, setTimeEnd, setNumPoints, etc are used to set the simulation characteristics. More...
 
C_DECL_SPEC RRCDataPtr rrcCallConv getSimulationResult (RRHandle handle)
 Retrieve the result of the last simulation. More...
 
C_DECL_SPEC RRCDataPtr rrcCallConv simulateEx (RRHandle handle, const double timeStart, const double timeEnd, const int numberOfPoints)
 Carry out a time-course simulation based on the given arguments, time start, time end and number of points. More...
 
C_DECL_SPEC bool rrcCallConv oneStep (RRHandle handle, const double currentTime, const double stepSize, double *value)
 Carry out a one step integration of the model. More...
 
C_DECL_SPEC bool rrcCallConv getTimeStart (RRHandle handle, double *timeStart)
 Get the value of the current time start. More...
 
C_DECL_SPEC bool rrcCallConv getTimeEnd (RRHandle handle, double *timeEnd)
 Get the value of the current time end. More...
 
C_DECL_SPEC bool rrcCallConv getNumPoints (RRHandle handle, int *numPoints)
 Get the value of the current number of points. More...
 

Detailed Description

Deterministic, stochastic, and hybrid simulation algorithms.

Function Documentation

◆ getConfigurationXML()

C_DECL_SPEC char* rrcCallConv getConfigurationXML ( RRHandle  handle)

Get the simulator's capabilities.

Example:

<caps name="RoadRunner" description="Settings For RoadRunner">
<section name="integration" method="CVODE" description="CVODE Integrator">
<cap name="BDFOrder" value="5" hint="Maximum order for BDF Method" type="integer" />
<cap name="AdamsOrder" value="12" hint="Maximum order for Adams Method" type="integer" />
<cap name="rtol" value="1E-06" hint="Relative Tolerance" type="double" />
<cap name="atol" value="1E-12" hint="Absolute Tolerance" type="double" />
<cap name="maxsteps" value="10000" hint="Maximum number of internal stepsc" type="integer" />
<cap name="initstep" value="0" hint="the initial step size" type="double" />
<cap name="minstep" value="0" hint="specifies a lower bound on the magnitude of the step size." type="double" />
<cap name="maxstep" value="0" hint="specifies an upper bound on the magnitude of the step size." type="double" />
<cap name="conservation" value="1" hint="enables (=1) or disables (=0) the conservation analysis of models for timecourse simulations." type="int" />
<cap name="allowRandom" value="1" hint="if enabled (=1), reinterprets certain function definitions as distributions and draws random numbers for it." type="int" />
<cap name="usekinsol" value="0" hint="Is KinSol used as steady state integrator" type="int" />
</section>
<section name="SteadyState" method="NLEQ2" description="NLEQ2 Steady State Solver">
<cap name="MaxIterations" value="100" hint="Maximum number of newton iterations" type="integer" />
<cap name="relativeTolerance" value="0.0001" hint="Relative precision of solution components" type="double" />
</section>
</caps>
Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns null if it fails, otherwise it returns the simulator's capabilities in the form of an XML string

◆ getNumPoints()

C_DECL_SPEC bool rrcCallConv getNumPoints ( RRHandle  handle,
int *  numPoints 
)

Get the value of the current number of points.

Example:

status = getNumPoints (rrHandle, &numberOfPoints);
C_DECL_SPEC bool rrcCallConv getNumPoints(RRHandle handle, int *numPoints)
Get the value of the current number of points.
Parameters
[in]handleHandle to a RoadRunner instance
numPointsThe current value for the number of points
Returns
Returns true if successful

◆ getSimulationResult()

C_DECL_SPEC RRCDataPtr rrcCallConv getSimulationResult ( RRHandle  handle)

Retrieve the result of the last simulation.

Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns an array (RRCDataPtr) of columns containing the results of the simulation including string labels for the individual columns. The client is responsible for freeing the resulting RRCDataPtr structure.

◆ getTimeCourseSelectionList()

C_DECL_SPEC RRStringArrayPtr rrcCallConv getTimeCourseSelectionList ( RRHandle  handle)

Get the current selection list for simulate(void) or simulateEx(void)

Parameters
[in]handleHandle to a RoadRunner instance
Returns
A list of symbol Ids indicating the current selection list

◆ getTimeEnd()

C_DECL_SPEC bool rrcCallConv getTimeEnd ( RRHandle  handle,
double *  timeEnd 
)

Get the value of the current time end.

Example:

status = getTimeEnd (rrHandle, &timeEnd);
C_DECL_SPEC bool rrcCallConv getTimeEnd(RRHandle handle, double *timeEnd)
Get the value of the current time end.
Parameters
[in]handleHandle to a RoadRunner instance
timeEndThe current value for the time end
Returns
Returns true if successful

◆ getTimeStart()

C_DECL_SPEC bool rrcCallConv getTimeStart ( RRHandle  handle,
double *  timeStart 
)

Get the value of the current time start.

Example:

status = getTimeStart (rrHandle, &timeStart);
C_DECL_SPEC bool rrcCallConv getTimeStart(RRHandle handle, double *timeStart)
Get the value of the current time start.
Parameters
[in]handleHandle to a RoadRunner instance
[out]timeStartThe current value for the time start
Returns
Returns true if successful

◆ oneStep()

C_DECL_SPEC bool rrcCallConv oneStep ( RRHandle  handle,
const double  currentTime,
const double  stepSize,
double *  value 
)

Carry out a one step integration of the model.

Example:

status = OneStep (rrHandle, currentTime, stepSize, newTime);
Parameters
[in]handleHandle to a RoadRunner instance
[in]currentTimeThe current time in the simulation
[in]stepSizeThe step size to use in the integration
[in]newTimeThe new time (currentTime + stepSize)
Returns
Returns true if successful

◆ setConfigurationXML()

C_DECL_SPEC bool rrcCallConv setConfigurationXML ( RRHandle  handle,
const char *  caps 
)

Set the simulator's capabilities.

Parameters
[in]handleHandle to a RoadRunner instance
[out]capsAn XML string that specifies the simulators capabilities
Returns
Returns true if successful

◆ setNumPoints()

C_DECL_SPEC bool rrcCallConv setNumPoints ( RRHandle  handle,
int  numberOfPoints 
)

Set the number of points to generate in a time course simulation.

Parameters
[in]handleHandle to a RoadRunner instance
[in]numberOfPointsNumber of points to generate in the time course simulation
Returns
Returns true if successful

◆ setTimeCourseSelectionList()

C_DECL_SPEC bool rrcCallConv setTimeCourseSelectionList ( RRHandle  handle,
const char *  list 
)

Set the selection list for output from simulate(void) or simulateEx(void)

Use getAvailableTimeCourseSymbols(void) to retrieve the list of all possible symbols.

Example:

setTimeCourseSelectionList ("Time, S1, J1, J2");
C_DECL_SPEC bool rrcCallConv setTimeCourseSelectionList(RRHandle handle, const char *list)
Set the selection list for output from simulate(void) or simulateEx(void)

or

setTimeCourseSelectionList ("Time S1 J1 J2")

Parameters
[in]handleHandle to a RoadRunner instance
[in]listA string of Ids separated by spaces or comma characters
Returns
Returns true if successful

◆ setTimeEnd()

C_DECL_SPEC bool rrcCallConv setTimeEnd ( RRHandle  handle,
double  timeEnd 
)

Set the time end for a time course simulation.

Parameters
[in]handleHandle to a RoadRunner instance
[in]timeEnd
Returns
Returns true if successful

◆ setTimeStart()

C_DECL_SPEC bool rrcCallConv setTimeStart ( RRHandle  handle,
double  timeStart 
)

Set the time start for a time course simulation.

Parameters
[in]handleHandle to a RoadRunner instance
[in]timeStart
Returns
Returns True if successful

◆ simulate()

C_DECL_SPEC RRCDataPtr rrcCallConv simulate ( RRHandle  handle)

Carry out a time-course simulation. setTimeStart, setTimeEnd, setNumPoints, etc are used to set the simulation characteristics.

Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns an array (RRCDataPtr) of columns containing the results of the simulation including string labels for the individual columns. The client is responsible for freeing the resulting RRCDataPtr structure.

◆ simulateEx()

C_DECL_SPEC RRCDataPtr rrcCallConv simulateEx ( RRHandle  handle,
const double  timeStart,
const double  timeEnd,
const int  numberOfPoints 
)

Carry out a time-course simulation based on the given arguments, time start, time end and number of points.

Example:

double timeStart = 0.0;
double timeEnd = 25;
int numberOfPoints = 200;
m = simulateEx (rrHandle, timeStart, timeEnd, numberOfPoints);
C_DECL_SPEC RRCDataPtr rrcCallConv simulateEx(RRHandle handle, const double timeStart, const double timeEnd, const int numberOfPoints)
Carry out a time-course simulation based on the given arguments, time start, time end and number of p...
Structure for the result type from the simulate calls. The client is responsible for freeing the RRCD...
Definition: rrc_types.h:111
Parameters
[in]handleHandle to a RoadRunner instance
[in]timeStartTime start
[in]timeEndTime end
[in]numberOfPointsNumber of points to generate
Returns
Returns an array (RRCDataPtr) of columns containing the results of the simulation including string labels for the individual columns. The client is responsible for freeing the resulting RRCDataPtr structure.