Integrator

class Integrator : public rr::Solver

Integrator is an abstract base class that provides an interface to specific integrator class implementations.

Subclassed by rr::CVODEIntegrator, rr::EulerIntegrator, rr::GillespieIntegrator, rr::RK45Integrator, rr::RK4Integrator

Public Types

enum IntegrationMethod

Values:

enumerator Deterministic
enumerator Stochastic
enumerator Hybrid
enumerator Other

Public Functions

explicit Integrator(ExecutableModel *model)
Integrator()
inline virtual ~Integrator()
virtual IntegrationMethod getIntegrationMethod() const = 0
virtual void syncWithModel(ExecutableModel *m)

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

Author

JKM

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.

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.

Author

JKM, WBC, ETS, MTK

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.

Author

FY

virtual std::vector<double> getAbsoluteToleranceVector()

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.

virtual void setListener(IntegratorListenerPtr) = 0
virtual IntegratorListenerPtr getListener() = 0
virtual std::string toString() const

Return a std::string representation of the solver.

Author

JKM

virtual std::string toRepr() const

Return std::string representation a la Python repr method.

Author

JKM

void setIntegrationStartTime(double time)
Solver() = default
explicit Solver(ExecutableModel *model)
void setValue(const std::string &key, Setting value)

Pull down the setValue from superclass.

We do not need to reimplement this but we make it explicit.

Protected Attributes

double mIntegrationStartTime