#include <rrRoadRunner.h>
Public Member Functions | |
| RoadRunner (const std::string &compiler="", const std::string &tempDir="", const std::string &supportCodeDir="") | |
| virtual | ~RoadRunner () |
| int | getInstanceID () |
| int | getInstanceCount () |
| std::string | getInfo () |
| class Compiler * | getCompiler () |
| bool | setCompiler (const std::string &compiler) |
| Integrator * | getIntegrator () |
| std::string | getModelName () |
| double | oneStep (double currentTime, double stepSize, bool reset=true) |
| const RoadRunnerData * | simulate (const SimulateOptions *options=0) |
| RoadRunnerData * | getSimulationResult () |
| SimulateOptions & | getSimulateOptions () |
| std::string | getSBML () |
| void | reset () |
| ModelGenerator * | getModelGenerator () |
| ExecutableModel * | getModel () |
| bool | load (const std::string &uriOrSBML, const LoadSBMLOptions *options=0) |
| virtual _xmlNode * | createConfigNode () |
| virtual void | loadConfig (const _xmlDoc *doc) |
| std::string | getConfigurationXML () |
| void | setConfigurationXML (const std::string &xml) |
| rr::SelectionRecord | createSelection (const std::string &str) |
| std::vector < rr::SelectionRecord > & | getSelections () |
| double | getValue (const std::string &sel) |
| std::vector< double > | getSelectedValues () |
| void | getIds (int types, std::list< std::string > &ids) |
| int | getSupportedIdTypes () |
| bool | setValue (const std::string &id, double value) |
| ls::DoubleMatrix | getFullJacobian () |
| ls::DoubleMatrix | getReducedJacobian () |
| ls::DoubleMatrix | getEigenvalues () |
| std::vector< std::string > | getEigenvalueIds () |
| double | getUnscaledParameterElasticity (const string &reactionName, const string ¶meterName) |
| void | setConservedMoietyAnalysis (bool value) |
| bool | getConservedMoietyAnalysis () |
| std::string | getCurrentSBML () |
| void | evalModel () |
| double | getuCC (const std::string &variableName, const std::string ¶meterName) |
| double | getCC (const std::string &variableName, const std::string ¶meterName) |
| double | getuEE (const std::string &reactionName, const std::string ¶meterName) |
| double | getuEE (const std::string &reactionName, const std::string ¶meterName, bool computeSteadystate) |
| double | getEE (const std::string &reactionName, const std::string ¶meterName) |
| double | getEE (const std::string &reactionName, const std::string ¶meterName, bool computeSteadyState) |
| ls::DoubleMatrix | getUnscaledElasticityMatrix () |
| ls::DoubleMatrix | getScaledElasticityMatrix () |
| double | getScaledFloatingSpeciesElasticity (const std::string &reactionName, const std::string &speciesName) |
| double | getUnscaledSpeciesElasticity (int reactionId, int speciesIndex) |
| double | steadyState () |
| std::vector < rr::SelectionRecord > & | getSteadyStateSelections () |
| void | setSteadyStateSelections (const std::vector< std::string > &steadyStateSelections) |
| void | setSteadyStateSelections (const std::vector< rr::SelectionRecord > &steadyStateSelections) |
| std::vector< double > | getSteadyStateValues () |
Static Public Member Functions | |
| static std::string | getParamPromotedSBML (const std::string &sArg) |
| static std::string | getExtendedVersionInfo () |
Static Public Member Functions inherited from rr::Configurable | |
| static void | loadXmlConfig (const std::string &xml, Configurable *configurable) |
| static std::string | xmlFromConfigNode (_xmlNode *config) |
| static _xmlNode * | createCapabilityNode (const std::string &name, const std::string &method, const std::string &desc) |
| static _xmlNode * | createCapabilitiesNode (const std::string &name, const std::string &desc) |
| static _xmlNode * | addChild (_xmlNode *parent, _xmlNode *cur) |
| static _xmlNode * | createParameterNode (const std::string &name, const std::string &hint, const std::string &value) |
| static _xmlNode * | createParameterNode (const std::string &name, const std::string &hint, int value) |
| static _xmlNode * | createParameterNode (const std::string &name, const std::string &hint, double value) |
| static std::string | getParameterStringValue (const _xmlDoc *doc, const std::string &capabilityName, const std::string ¶meterName) |
| static int | getParameterIntValue (const _xmlDoc *doc, const std::string &capabilityName, const std::string ¶meterName) |
| static double | getParameterDoubleValue (const _xmlDoc *doc, const std::string &capabilityName, const std::string ¶meterName) |
The main RoadRunner class.
The RoadRunner class is responsible for loading and simulating SBML models.
MemoryManagment: Any pointer returned by a get... method is owned by the RoadRunner object and does NOT have to be deleted.
| rr::RoadRunner::RoadRunner | ( | const std::string & | compiler = "", |
| const std::string & | tempDir = "", |
||
| const std::string & | supportCodeDir = "" |
||
| ) |
All three of the RoadRunner options default to the empty string, in this case, the default values are used.
| compiler,: | If LLVM build is enabled, the compiler defaults to LLVM. |
| tempDir,: | If the old external C compiler is used, this is the where the C files are written to. |
| supportCodeDir,: | If the old external C compiler is used, this is the location where roadrunner C include files are. |
|
virtual |
free any memory this class allocated
|
virtual |
creates a new xml element that represent the current state of this Configurable object and all if its child objects.
This node needs to be consumed by Configurable::xmlFromConfigNode
Implements rr::Configurable.
| SelectionRecord rr::RoadRunner::createSelection | ( | const std::string & | str | ) |
create a selection record. This record can be used to select values.
| void rr::RoadRunner::evalModel | ( | ) |
The C back end requires this to be called to update model variables if anyting is changes. Does nothing in LLVM back end as everything is automatically handled with lazy evaluation.
| double rr::RoadRunner::getCC | ( | const std::string & | variableName, |
| const std::string & | parameterName | ||
| ) |
Get scaled control coefficient with respect to a global parameter
The variableName must be either a reaction id, or a floating species id.
The parameterName must be either a global parameter, boundary species, or conserved sum.
| Compiler * rr::RoadRunner::getCompiler | ( | ) |
The Compiler that the ModelGenerator is using to compile / interpret sbml code.
| std::string rr::RoadRunner::getConfigurationXML | ( | ) |
recurse through all of the child configurable objects that this class ownes and build an assemble all of thier configuration parameters into a single xml document which is returned as a string.
The value of this result depends on what child objects are presently loaded.
| bool rr::RoadRunner::getConservedMoietyAnalysis | ( | ) |
is conservation analysis enabled. This is set
| string rr::RoadRunner::getCurrentSBML | ( | ) |
Returns the SBML with the current parameterset.
| double rr::RoadRunner::getEE | ( | const std::string & | reactionName, |
| const std::string & | parameterName | ||
| ) |
Get scaled elasticity coefficient with respect to a global parameter or species
| double rr::RoadRunner::getEE | ( | const std::string & | reactionName, |
| const std::string & | parameterName, | ||
| bool | computeSteadyState | ||
| ) |
Get scaled elasticity coefficient with respect to a global parameter or species. Optionally the model is brought to steady state after the computation.
| vector< string > rr::RoadRunner::getEigenvalueIds | ( | ) |
returns the list of floating species, but with a "eigen(...)" string wrapped around them.
| DoubleMatrix rr::RoadRunner::getEigenvalues | ( | ) |
Returns eigenvalues, first column real part, second column imaginary part
|
static |
getVersion plus info about dependent libs versions..
| DoubleMatrix rr::RoadRunner::getFullJacobian | ( | ) |
compute the full Jacobian at the current operating point
| void rr::RoadRunner::getIds | ( | int | types, |
| std::list< std::string > & | ids | ||
| ) |
populates a given list with all the ids that this class can accept.
| string rr::RoadRunner::getInfo | ( | ) |
information about the current state of this object.
| int rr::RoadRunner::getInstanceCount | ( | ) |
Number of currently running RoadRunner instances.
| int rr::RoadRunner::getInstanceID | ( | ) |
When there are multiple instances of RoadRunner, this is the instance id.
| Integrator * rr::RoadRunner::getIntegrator | ( | ) |
get a pointer to the integrator which is currently being used to time evolve the system.
| ExecutableModel * rr::RoadRunner::getModel | ( | ) |
get a pointer to the ExecutableModel owned by the RoadRunner object.
| ModelGenerator * rr::RoadRunner::getModelGenerator | ( | ) |
get the ModelGenerator that is used to create executable (runnable) models.
| string rr::RoadRunner::getModelName | ( | ) |
returns the model name if a model is loaded, empty string otherwise.
|
static |
given an sbml document, this method moves all the local parameters to global parameters.
| DoubleMatrix rr::RoadRunner::getReducedJacobian | ( | ) |
Compute the reduced Jacobian at the current operating point.
| string rr::RoadRunner::getSBML | ( | ) |
get the currently loaded sbml document as a string.
| DoubleMatrix rr::RoadRunner::getScaledElasticityMatrix | ( | ) |
Compute the unscaled elasticity matrix at the current operating point
| double rr::RoadRunner::getScaledFloatingSpeciesElasticity | ( | const std::string & | reactionName, |
| const std::string & | speciesName | ||
| ) |
Compute the scaled elasticity for a given reaction and given species
| vector< double > rr::RoadRunner::getSelectedValues | ( | ) |
returns the values selected with SimulateOptions for the current model time / timestep")
| std::vector< rr::SelectionRecord > & rr::RoadRunner::getSelections | ( | ) |
Returns the currently selected columns that will be returned by calls to simulate() or simulateEx(,,).
| SimulateOptions & rr::RoadRunner::getSimulateOptions | ( | ) |
get a reference to the SimulateOptions that were set either by setSimulateOptions or simulate.
| RoadRunnerData * rr::RoadRunner::getSimulationResult | ( | ) |
obtain a pointer to the simulation result.
This is owned by the RoadRunner object.
| vector< SelectionRecord > & rr::RoadRunner::getSteadyStateSelections | ( | ) |
returns the current set of steady state selections.
| vector< double > rr::RoadRunner::getSteadyStateValues | ( | ) |
Performs a steady state calculation (evolves the system to a steady state), then calculates and returns the set of values specifed by the steady state selections.
| int rr::RoadRunner::getSupportedIdTypes | ( | ) |
returns a bit field of the ids that this class supports.
| double rr::RoadRunner::getuCC | ( | const std::string & | variableName, |
| const std::string & | parameterName | ||
| ) |
Get unscaled control coefficient with respect to a global parameter
variableName must be either a reaction or floating species.
parameterName must be eithe a global parameter, boundary species, or conserved sum.
| double rr::RoadRunner::getuEE | ( | const std::string & | reactionName, |
| const std::string & | parameterName | ||
| ) |
Get unscaled elasticity coefficient with respect to a global parameter or species
| double rr::RoadRunner::getuEE | ( | const std::string & | reactionName, |
| const std::string & | parameterName, | ||
| bool | computeSteadystate | ||
| ) |
Get unscaled elasticity coefficient with respect to a global parameter or species. Optionally the model is brought to steady state after the computation.
| DoubleMatrix rr::RoadRunner::getUnscaledElasticityMatrix | ( | ) |
Compute the unscaled species elasticity matrix at the current operating point
| double rr::RoadRunner::getUnscaledParameterElasticity | ( | const string & | reactionName, |
| const string & | parameterName | ||
| ) |
Returns the unscaled elasticity for a named reaction with respect to a named parameter
| double rr::RoadRunner::getUnscaledSpeciesElasticity | ( | int | reactionId, |
| int | speciesIndex | ||
| ) |
Get a single species elasticity value IMPORTANT: Assumes that the reaction rates have been precomputed at the operating point !!
| double rr::RoadRunner::getValue | ( | const std::string & | sel | ) |
Creates a new selection based on the selection string, and returns the value it queries.
| bool rr::RoadRunner::load | ( | const std::string & | uriOrSBML, |
| const LoadSBMLOptions * | options = 0 |
||
| ) |
load an sbml document from anywhere.
If options is not null, then the RoadRunner::computeAndAssignConservationLaws flag is set to whatever value is specified in the options struct.
| uriOrSBML,: | a URI, local path or sbml document contents. |
| options,: | an options struct, if null, default values are used. |
|
virtual |
Given an xml element, the Configurable object should pick its needed values that are stored in the element and use them to set its internal configuration state.
Implements rr::Configurable.
| double rr::RoadRunner::oneStep | ( | double | currentTime, |
| double | stepSize, | ||
| bool | reset = true |
||
| ) |
Carry out a single integration step using a stepsize as indicated in the method call. Arguments: double CurrentTime, double StepSize, bool: reset integrator if true, Return Value: new CurrentTime.
| void rr::RoadRunner::reset | ( | ) |
Reset the simulator back to the initial conditions specified in the SBML model, provided an SBML model is loaded.
| bool rr::RoadRunner::setCompiler | ( | const std::string & | compiler | ) |
Set the name of the externa compiler to use. Some ModelGenerators may have no use for this value.
| void rr::RoadRunner::setConfigurationXML | ( | const std::string & | xml | ) |
given a xml document, which should have been returned from getConfigurationXML, this method recurses though all the child configurable elements and sets thier configuration to the values specified in the document.
| void rr::RoadRunner::setConservedMoietyAnalysis | ( | bool | value | ) |
This method turns on / off the computation and adherence to conservation laws.
| void rr::RoadRunner::setSteadyStateSelections | ( | const std::vector< std::string > & | steadyStateSelections | ) |
parses the given list of strings and generates selections records which will be used for the steady state selections.
| void rr::RoadRunner::setSteadyStateSelections | ( | const std::vector< rr::SelectionRecord > & | steadyStateSelections | ) |
makes a copy of an existing list of selection records. These will be saved and used for selection values in getSteadyStateValues().
| bool rr::RoadRunner::setValue | ( | const std::string & | id, |
| double | value | ||
| ) |
sets the value coresponding to the given selection string
| const RoadRunnerData * rr::RoadRunner::simulate | ( | const SimulateOptions * | options = 0 | ) |
simulate the current SBML model.
If options is null, then the current simulation settings (start time, end time, n steps) are used. If options is not null, then the current simulation settings are set to the values specified by options and they are used.
| double rr::RoadRunner::steadyState | ( | ) |
Compute the steady state of the model, returns the sum of squares of the solution
1.8.5