roadrunner
2.6.0
Fast simulator for SBML models
|
Integrator is an abstract base class that provides an interface to specific integrator class implementations. More...
#include <Integrator.h>
Public Types | |
enum | IntegrationMethod { Deterministic , Stochastic , Hybrid , Other } |
![]() | |
using | SettingsList = std::vector< std::string > |
using | SettingsMap = std::unordered_map< std::string, Setting > |
using | DisplayNameMap = std::unordered_map< std::string, std::string > |
using | HintMap = std::unordered_map< std::string, std::string > |
using | DescriptionMap = std::unordered_map< std::string, std::string > |
Public Member Functions | |
Integrator (ExecutableModel *model) | |
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 (std::string sid, double value) |
Set tolerance for floating species or variables that have a rate rule, will only be used in CVODEIntegrator. More... | |
virtual std::vector< double > | getAbsoluteToleranceVector () |
Get the absolute tolerance vector for the solver. More... | |
virtual void | setListener (IntegratorListenerPtr)=0 |
virtual IntegratorListenerPtr | getListener ()=0 |
std::string | toString () const |
Return a std::string representation of the solver. More... | |
virtual std::string | toRepr () const |
Return std::string representation a la Python repr method. More... | |
void | setIntegrationStartTime (double time) |
Solver ()=default | |
Solver (ExecutableModel *model) | |
virtual void | setValue (const std::string &key, Setting value) |
Pull down the setValue from superclass. More... | |
![]() | |
Solver (ExecutableModel *model) | |
void | updateSettings (Dictionary *inputSettings) |
Update settings values. More... | |
std::vector< std::string > | getSettings () const |
Get a list of all settings for this solver. More... | |
std::unordered_map< std::string, Setting > & | getSettingsMap () |
get settings for this solver More... | |
virtual void | resetSettings () |
Reset all settings to their respective default values. | |
virtual Setting | getValue (const std::string &key) const |
Get the value of an integrator setting. More... | |
virtual Setting | hasValue (const 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 std::string | getValueAsString (const std::string &key) |
Wrapper for getValue which converts output to a specific type. More... | |
virtual void | setValue (const std::string &key, Setting value) |
virtual std::string | getSettingsRepr () const |
Get the solver settings as a std::string. More... | |
virtual std::string | settingsPyDictRepr () const |
Python dictionary-style std::string representation of settings. More... | |
const std::string & | getDisplayName (const std::string &key) const |
Gets the hint associated with a given key. More... | |
const std::string & | getHint (const std::string &key) const |
Gets the hint associated with a given key. More... | |
const std::string & | getDescription (const std::string &key) const |
Gets the description associated with a given key. More... | |
Setting::TypeId | getType (const std::string &key) const |
Gets the type associated with a given key. More... | |
virtual ExecutableModel * | getModel () const |
returns the pointer to the ExecutableModel | |
virtual std::string | getName () const=0 |
Gets the name associated with this Solver type. More... | |
virtual std::string | getHint () const=0 |
Gets the hint associated with this Solver type. More... | |
virtual std::string | getDescription () const=0 |
Gets the description associated with this Solver type. More... | |
![]() | |
virtual std::string | getName () const =0 |
Gets the name associated with this Solver type. More... | |
virtual std::string | getDescription () const =0 |
Gets the description associated with this Solver type. More... | |
virtual std::string | getHint () const =0 |
Gets the hint associated with this Solver type. More... | |
virtual Solver * | construct (ExecutableModel *model) const =0 |
Constructs a new Solver of a given type. More... | |
Protected Attributes | |
double | mIntegrationStartTime |
![]() | |
ExecutableModel * | mModel = nullptr |
non-owning pointer to model | |
Additional Inherited Members | |
![]() | |
SettingsList | sorted_settings |
SettingsMap | settings |
DisplayNameMap | display_names_ |
HintMap | hints |
DescriptionMap | descriptions |
![]() | |
void | addSetting (const std::string &name, const Setting &val, const std::string &display_name, const std::string &hint, const std::string &description) |
Integrator is an abstract base class that provides an interface to specific integrator class implementations.
|
virtual |
Get the absolute tolerance vector for the solver.
Most solvers do not have absolute tolerances; this retrieves the vector for the ones (like CVODE) that do.
Reimplemented in rr::CVODEIntegrator.
|
virtual |
Set tolerance for floating species or variables that have a rate rule, will only be used in CVODEIntegrator.
Reimplemented in rr::CVODEIntegrator.
void rr::Solver::setValue |
Pull down the setValue from superclass.
We do not need to reimplement this but we make it explicit.
|
virtual |
Called whenever a new model is loaded to allow integrator to reset internal state.
Implements rr::Solver.
Reimplemented in rr::RK4Integrator, rr::GillespieIntegrator, rr::CVODEIntegrator, and rr::RK45Integrator.
|
virtual |
Return std::string representation a la Python repr method.
Reimplemented from rr::Solver.
Reimplemented in rr::EulerIntegrator.
|
virtual |
Return a std::string representation of the solver.
Reimplemented from rr::Solver.
|
virtual |
Fix tolerances for SBML tests.
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.