roadrunner
2.6.0
Fast simulator for SBML models
|
A super basic 4'th order fixed step integrator. More...
#include <RK4Integrator.h>
Public Member Functions | |
RK4Integrator (ExecutableModel *m) | |
Creates a new RK4Integrator. More... | |
~RK4Integrator () override | |
clean up any mess. | |
void | syncWithModel (ExecutableModel *m) override |
Called whenever a new model is loaded to allow integrator to reset internal state. More... | |
double | integrate (double t0, double tf) override |
implement Integrator interface More... | |
void | restart (double t0) override |
copies the state std::vector out of the model and into cvode std::vector, re-initializes cvode. | |
std::string | getName () const override |
Get the name for this integrator. More... | |
std::string | getDescription () const override |
Get the description for this integrator. More... | |
std::string | getHint () const override |
Get the hint for this integrator. More... | |
Solver * | construct (ExecutableModel *model) const override |
construct an instance of type RK4Integrator. More... | |
virtual Setting | getValue (std::string key) |
IntegrationMethod | getIntegrationMethod () const override |
Always deterministic for RK4. More... | |
void | resetSettings () override |
Reset all integrator settings to their respective default values. More... | |
void | setListener (IntegratorListenerPtr) override |
the integrator can hold a single listener. More... | |
IntegratorListenerPtr | getListener () override |
get the integrator listener | |
Integrator (ExecutableModel *model) | |
Integrator () | |
![]() | |
Integrator (ExecutableModel *model) | |
virtual void | loadConfigSettings () |
virtual void | loadSBMLSettings (const std::string &filename) |
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... | |
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 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... | |
Additional Inherited Members | |
![]() | |
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 > |
![]() | |
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) |
![]() | |
double | mIntegrationStartTime |
![]() | |
ExecutableModel * | mModel = nullptr |
non-owning pointer to model | |
A super basic 4'th order fixed step integrator.
The RungeKuttaIntegrator will be the more sophisticated, general purpose Runge-Kutta integrator which will support different orders and adaptive time stepping.
This object is mainly here as an example of creating a new Integrator.
rr::RK4Integrator::RK4Integrator | ( | ExecutableModel * | m | ) |
Creates a new RK4Integrator.
The IntegratorFactory is the ONLY object that creates integrators.
Integrators are created when the IntegratorFactory::New method is called, typically by the top level RoadRunner object.
The integrator will hold onto the ExecutableModel pointer, m, and when the integrate method is called, will advance the model object forward in time.
|
overridevirtual |
construct an instance of type RK4Integrator.
implements the Registrar interface. Used in factory creation of Integrators.
Implements rr::Registrable.
|
overridevirtual |
Get the description for this integrator.
Implements rr::Registrable.
|
overridevirtual |
|
overridevirtual |
Always deterministic for RK4.
Implements rr::Integrator.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Reset all integrator settings to their respective default values.
Reimplemented from rr::Solver.
|
overridevirtual |
the integrator can hold a single listener.
If clients require multicast, they can create a multi-cast listener.
Implements rr::Integrator.
|
overridevirtual |
Called whenever a new model is loaded to allow integrator to reset internal state.
Reimplemented from rr::Integrator.