libRoadRunner C API  1.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Time-course simulation

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

Functions

bool setConfigurationXML (RRHandle handle, const char *caps)
 Set the simulator's capabilities. More...
 
char * getConfigurationXML (RRHandle handle)
 Get the simulator's capabilities. More...
 
bool setTimeStart (RRHandle handle, double timeStart)
 Set the time start for a time course simulation. More...
 
bool setTimeEnd (RRHandle handle, double timeEnd)
 Set the time end for a time course simulation. More...
 
bool setNumPoints (RRHandle handle, int numberOfPoints)
 Set the number of points to generate in a time course simulation. More...
 
bool setTimeCourseSelectionList (RRHandle handle, const char *list)
 Set the selection list for output from simulate(void) or simulateEx(void) More...
 
RRStringArrayPtr getTimeCourseSelectionList (RRHandle handle)
 Get the current selection list for simulate(void) or simulateEx(void) More...
 
RRDataHandle simulate (RRHandle handle)
 Carry out a time-course simulation, use setTimeStart, setTimeEnd and setNumPoints etc to set the simulation characteristics. More...
 
RRCDataPtr getSimulationResult (RRHandle handle)
 Retrieve the result of the last simulation. More...
 
RRDataHandle getRoadRunnerData (RRHandle handle)
 Retrieve a handle to RoadRunners internal data. More...
 
RRDataHandle 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...
 
bool oneStep (RRHandle handle, const double currentTime, const double stepSize, double *value)
 Carry out a one step integration of the model. More...
 
bool getTimeStart (RRHandle handle, double *timeStart)
 Get the value of the current time start. More...
 
bool getTimeEnd (RRHandle handle, double *timeEnd)
 Get the value of the current time end. More...
 
bool getNumPoints (RRHandle handle, int *numPoints)
 Get the value of the current number of points. More...
 
bool reset (RRHandle handle)
 Reset all floating species concentrations to their intial conditions. More...
 

Detailed Description

Deterministic, stochastic, and hybrid simulation algorithms.

Function Documentation

char* 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
bool getNumPoints ( RRHandle  handle,
int *  numPoints 
)

Get the value of the current number of points.

Example:

status = getNumPoints (rrHandle, &numberOfPoints);
Parameters
[in]handleHandle to a RoadRunner instance
numPointsThe current value for the number of points
Returns
Returns true if successful
RRDataHandle getRoadRunnerData ( RRHandle  handle)

Retrieve a handle to RoadRunners internal data.

Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns an handle to roadrunners internal data object
RRCDataPtr getSimulationResult ( RRHandle  handle)

Retrieve the result of the last simulation.

Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns an handle to roadrunners internal data object
Returns an array (RRCDataPtr) of columns containing the results of the simulation including string labels for the individual columms.
RRStringArrayPtr 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
bool getTimeEnd ( RRHandle  handle,
double *  timeEnd 
)

Get the value of the current time end.

Example:

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

Get the value of the current time start.

Example:

status = getTimeStart (rrHandle, &timeStart);
Parameters
[in]handleHandle to a RoadRunner instance
[out]timeStartThe current value for the time start
Returns
Returns true if successful
bool 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, timeStep, newTimeStep);
Parameters
[in]handleHandle to a RoadRunner instance
[in]currentTimeThe current time in the simulation
[in]stepSizeThe step size to use in the integration
[in]valueThe new time (currentTime + stepSize)
Returns
Returns true if successful
bool reset ( RRHandle  handle)

Reset all floating species concentrations to their intial conditions.

Example:

status = reset (RRHandle handle);
Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns true if successful
bool 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 sucessful
bool 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 sucessful
bool 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");

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 sucessful
bool 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 sucessful
bool 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 sucessful
RRDataHandle simulate ( RRHandle  handle)

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

Parameters
[in]handleHandle to a RoadRunner instance
Returns
Returns a handle to roadrunners internal data object.
RRDataHandle 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);
Parameters
[in]handleHandle to a RoadRunner instance
[in]timeStartTime start
[in]timeEndTime end
[in]numberOfPointsNumber of points to generate
Returns
Returns a handle to roadrunners internal data object.