C API Documentation
Public Member Functions | Static Public Member Functions | List of all members
rr::RK4Integrator Class Reference

#include <RK4Integrator.h>

Inheritance diagram for rr::RK4Integrator:
rr::Integrator rr::Solver

Public Member Functions

 RK4Integrator (ExecutableModel *m)
 
virtual ~RK4Integrator ()
 
virtual void syncWithModel (ExecutableModel *m)
 Called whenever a new model is loaded to allow integrator to reset internal state. More...
 
virtual double integrate (double t0, double tf)
 
virtual void restart (double t0)
 
std::string getName () const
 ‍** More...
 
std::string getDescription () const
 Get the description for this integrator. More...
 
std::string getHint () const
 Get the hint for this integrator. More...
 
virtual Variant getValue (std::string key)
 
IntegrationMethod getIntegrationMethod () const
 Always deterministic for RK4. More...
 
void resetSettings ()
 Reset all integrator settings to their respective default values. More...
 
virtual void setListener (IntegratorListenerPtr)
 
virtual IntegratorListenerPtr getListener ()
 
- Public Member Functions inherited from rr::Integrator
virtual void loadConfigSettings ()
 
virtual void loadSBMLSettings (const std::string &filename)
 
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...
 
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
std::vector< std::string > getSettings () const
 Get a list of all settings for this solver. 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...
 

Static Public Member Functions

static std::string getRK4Name ()
 Get the name for this integrator. More...
 
static std::string getRK4Description ()
 Get the description for this integrator. More...
 
static std::string getRK4Hint ()
 Get the hint for this integrator. More...
 

Additional Inherited Members

- Public Types inherited from rr::Integrator
enum  IntegrationMethod { Deterministic , Stochastic , Hybrid , Other }
 
- 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RK4Integrator()

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.

Parameters
ma borrowed reference to an existing ExecutableModel object.
oa reference to a SimulatOptions object where the configuration parameters will be read from.

◆ ~RK4Integrator()

virtual rr::RK4Integrator::~RK4Integrator ( )
virtual

clean up any mess.

Member Function Documentation

◆ getDescription()

std::string rr::RK4Integrator::getDescription ( ) const
virtual

Get the description for this integrator.

Author
JKM
Note
Delegates to getDescription

Implements rr::Solver.

◆ getHint()

std::string rr::RK4Integrator::getHint ( ) const
virtual

Get the hint for this integrator.

Author
WBC
Note
Delegates to getHint

Implements rr::Solver.

◆ getIntegrationMethod()

IntegrationMethod rr::RK4Integrator::getIntegrationMethod ( ) const
virtual

Always deterministic for RK4.

Author
JKM

Implements rr::Integrator.

◆ getListener()

virtual IntegratorListenerPtr rr::RK4Integrator::getListener ( )
virtual

get the integrator listener

Implements rr::Integrator.

◆ getName()

std::string rr::RK4Integrator::getName ( ) const
virtual

‍**

‍**

Author
JKM

Get the name for this integrator

Note
Delegates to getName

Implements rr::Solver.

◆ getRK4Description()

static std::string rr::RK4Integrator::getRK4Description ( )
static

Get the description for this integrator.

Author
JKM

◆ getRK4Hint()

static std::string rr::RK4Integrator::getRK4Hint ( )
static

Get the hint for this integrator.

Author
JKM

◆ getRK4Name()

static std::string rr::RK4Integrator::getRK4Name ( )
static

Get the name for this integrator.

Author
JKM

◆ integrate()

virtual double rr::RK4Integrator::integrate ( double  t0,
double  tf 
)
virtual

implement Integrator interface integrates the model from t0 to tf.

Implements rr::Integrator.

◆ resetSettings()

void rr::RK4Integrator::resetSettings ( )
virtual

Reset all integrator settings to their respective default values.

Author
JKM

Reimplemented from rr::Solver.

◆ restart()

virtual void rr::RK4Integrator::restart ( double  t0)
virtual

copies the state vector out of the model and into cvode vector, re-initializes cvode.

Implements rr::Integrator.

◆ setListener()

virtual void rr::RK4Integrator::setListener ( IntegratorListenerPtr  )
virtual

the integrator can hold a single listener. If clients require multicast, they can create a multi-cast listener.

Implements rr::Integrator.

◆ syncWithModel()

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

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

Author
JKM

Reimplemented from rr::Integrator.


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