C API Documentation
Public Types | Public Member Functions | List of all members
rr::Integrator Class Referenceabstract
Inheritance diagram for rr::Integrator:
rr::Solver rr::CVODEIntegrator rr::GillespieIntegrator rr::RK45Integrator rr::RK4Integrator

Public Types

enum  IntegrationMethod { Deterministic , Stochastic , Hybrid , Other }
 

Public Member Functions

virtual IntegrationMethod getIntegrationMethod () const =0
 
virtual void syncWithModel (ExecutableModel *m)
 Called whenever a new model is loaded to allow integrator to reset internal state. More...
 
virtual void loadConfigSettings ()
 
virtual void loadSBMLSettings (const std::string &filename)
 
virtual double integrate (double t0, double hstep)=0
 
virtual void restart (double t0)=0
 
virtual void tweakTolerances ()
 Fix tolerances for SBML tests. More...
 
virtual void setIndividualTolerance (string sid, double value)
 Set tolerance for floating species or variables that have a rate rule, will only be used in CVODEIntegrator. More...
 
virtual void setConcentrationTolerance (const Variant &value)
 Set tolerance based on concentration of species, will only be used in CVODEIntegrator. More...
 
virtual std::vector< double > getConcentrationTolerance ()
 Get tolerance based on concentration of species, will only be used in CVODEIntegrator. More...
 
virtual void setListener (IntegratorListenerPtr)=0
 
virtual IntegratorListenerPtr getListener ()=0
 
std::string toString () const
 Return a string representation of the solver. More...
 
virtual std::string toRepr () const
 Return string representation a la Python repr method. More...
 
virtual void setValue (std::string key, const Variant &value)
 
- Public Member Functions inherited from rr::Solver
virtual std::string getName () const =0
 Get the name of this solver. More...
 
virtual std::string getDescription () const =0
 Get the description of this solver. More...
 
virtual std::string getHint () const =0
 Get a (user-readable) hint for this solver. More...
 
std::vector< std::string > getSettings () const
 Get a list of all settings for this solver. More...
 
virtual void resetSettings ()
 Reset all settings to their respective default values. More...
 
virtual Variant getValue (std::string key) const
 Get the value of an integrator setting. More...
 
virtual Variant hasValue (std::string key) const
 Return true if this setting is supported by the integrator. More...
 
virtual size_t getNumParams () const
 Get the number of parameters. More...
 
virtual std::string getParamName (size_t n) const
 Get the name of the parameter at index n. More...
 
virtual std::string getParamDisplayName (int n) const
 Get the display name of the parameter at index n. More...
 
virtual std::string getParamHint (int n) const
 Get the hint of the parameter at index n. More...
 
virtual std::string getParamDesc (int n) const
 Get the description of the parameter at index n. More...
 
virtual int getValueAsInt (std::string key)
 Wrapper for getValue which converts output to a specific type. More...
 
virtual unsigned int getValueAsUInt (std::string key)
 Wrapper for getValue which converts output to a specific type. More...
 
virtual long getValueAsLong (std::string key)
 Wrapper for getValue which converts output to a specific type. More...
 
virtual unsigned long getValueAsULong (std::string key)
 Wrapper for getValue which converts output to a specific type. More...
 
virtual float getValueAsFloat (std::string key)
 Wrapper for getValue which converts output to a specific type. More...
 
virtual double getValueAsDouble (std::string key)
 Wrapper for getValue which converts output to a specific type. More...
 
virtual std::vector< double > getValueAsDoubleVector (std::string key)
 Wrapper for getValue which converts output to a specific type.
 
virtual char getValueAsChar (std::string key)
 Wrapper for getValue which converts output to a specific type. More...
 
virtual unsigned char getValueAsUChar (std::string key)
 Wrapper for getValue which converts output to a specific type. More...
 
virtual std::string getValueAsString (std::string key)
 Wrapper for getValue which converts output to a specific type. More...
 
virtual bool getValueAsBool (std::string key)
 Wrapper for getValue which converts output to a specific type. More...
 
virtual void setValue (std::string key, const Variant &value)
 
const std::string & getDisplayName (std::string key) const
 Gets the hint associated with a given key. More...
 
const std::string & getHint (std::string key) const
 Gets the hint associated with a given key. More...
 
const std::string & getDescription (std::string key) const
 Gets the description associated with a given key. More...
 
const Variant::TypeId getType (std::string key)
 Gets the type associated with a given key. More...
 
std::string getSettingsRepr () const
 Get the solver settings as a string. More...
 
std::string settingsPyDictRepr () const
 Python dictionary-style string representation of settings. More...
 

Additional Inherited Members

- Protected Types inherited from rr::Solver
typedef std::vector< std::string > SettingsList
 
typedef RR_UNORDERED_MAP< std::string, VariantSettingsMap
 
typedef RR_UNORDERED_MAP< std::string, std::string > DisplayNameMap
 
typedef RR_UNORDERED_MAP< std::string, std::string > HintMap
 
typedef RR_UNORDERED_MAP< std::string, std::string > DescriptionMap
 
- Protected Member Functions inherited from rr::Solver
void addSetting (std::string name, Variant val, string display_name, std::string hint, std::string description)
 
- Protected Attributes inherited from rr::Solver
SettingsList sorted_settings
 
SettingsMap settings
 
DisplayNameMap display_names_
 
HintMap hints
 
DescriptionMap descriptions
 

Member Function Documentation

◆ getConcentrationTolerance()

virtual std::vector<double> rr::Integrator::getConcentrationTolerance ( )
virtual

Get tolerance based on concentration of species, will only be used in CVODEIntegrator.

Author
FY

Reimplemented in rr::CVODEIntegrator.

◆ setConcentrationTolerance()

virtual void rr::Integrator::setConcentrationTolerance ( const Variant value)
virtual

Set tolerance based on concentration of species, will only be used in CVODEIntegrator.

Author
FY

Reimplemented in rr::CVODEIntegrator.

◆ setIndividualTolerance()

virtual void rr::Integrator::setIndividualTolerance ( string  sid,
double  value 
)
virtual

Set tolerance for floating species or variables that have a rate rule, will only be used in CVODEIntegrator.

Author
FY

Reimplemented in rr::CVODEIntegrator.

◆ setValue()

virtual void rr::Solver::setValue

Pull down the setValue from superclass. We do not need to reimplement this but we make it explicit.

◆ syncWithModel()

virtual void rr::Integrator::syncWithModel ( ExecutableModel m)
virtual

Called whenever a new model is loaded to allow integrator to reset internal state.

Author
JKM

Reimplemented in rr::CVODEIntegrator, rr::RK4Integrator, rr::RK45Integrator, and rr::GillespieIntegrator.

◆ toRepr()

virtual std::string rr::Integrator::toRepr ( ) const
virtual

Return string representation a la Python repr method.

Author
JKM

Reimplemented from rr::Solver.

◆ toString()

std::string rr::Integrator::toString ( ) const
virtual

Return a string representation of the solver.

Author
JKM

Reimplemented from rr::Solver.

◆ tweakTolerances()

virtual void rr::Integrator::tweakTolerances ( )
virtual

Fix tolerances for SBML tests.

Author
JKM, WBC, ETS, MTK

In order to ensure that the results of the SBML test suite remain valid, this method enforces a lower bound on tolerance values. Sets minimum absolute and relative tolerances to Config::CVODE_MIN_ABSOLUTE and Config::CVODE_MIN_RELATIVE resp.

Reimplemented in rr::CVODEIntegrator.


The documentation for this class was generated from the following file: