14 #ifndef GILLESPIEINTEGRATOR_H_
15 #define GILLESPIEINTEGRATOR_H_
20 #include "rrRoadRunnerOptions.h"
22 #include "tr1proxy/rr_random.h"
29 class ExecutableModel;
38 using Integrator::Integrator;
58 std::string
getName()
const override;
72 std::string
getHint()
const override;
102 double integrate(
double t0,
double tf)
override;
108 void restart(
double timeStart)
override;
130 int floatingSpeciesStart;
131 double* reactionRates;
132 double* reactionRatesBuffer;
135 double* stateVectorRate;
136 std::vector<unsigned char> eventStatus;
137 std::vector<unsigned char> previousEventStatus;
139 void testRootsAtInitialTime();
140 void applyEvents(
double timeEnd, std::vector<unsigned char> &prevEventStatus);
143 void setEngineSeed(
Setting seedSetting);
145 inline double getStoich(uint species, uint reaction)
156 void initializeFromModel();
RoadRunner's Gillespie SSA integrator.
Base class for all code generation systems; allows compiling and evaluating the model.
Definition: rrExecutableModel.h:118
virtual double getStoichiometry(int index)=0
Get the current stiochiometry value with the given index.
RoadRunner's implementation of the Gillespie SSA.
Definition: GillespieIntegrator.h:36
std::string getHint() const override
Get the hint for this integrator.
Definition: GillespieIntegrator.cpp:139
void restart(double timeStart) override
Reset time to zero and reinitialize model.
Definition: GillespieIntegrator.cpp:385
double integrate(double t0, double tf) override
Main integration routine.
Definition: GillespieIntegrator.cpp:190
Solver * construct(ExecutableModel *executableModel) const override
Constructs a new Solver of a given type.
Definition: GillespieIntegrator.cpp:439
std::string getName() const override
Get the name for this integrator.
Definition: GillespieIntegrator.cpp:127
std::string getDescription() const override
Get the description for this integrator.
Definition: GillespieIntegrator.cpp:131
IntegrationMethod getIntegrationMethod() const override
Always stochastic for Gillespie.
Definition: GillespieIntegrator.cpp:143
IntegratorListenerPtr getListener() override
Gets the integrator listener.
Definition: GillespieIntegrator.cpp:411
void resetSettings() override
Reset all integrator settings to their respective default values.
Definition: GillespieIntegrator.cpp:173
void setListener(IntegratorListenerPtr) override
Sets the integrator listener.
Definition: GillespieIntegrator.cpp:407
void syncWithModel(ExecutableModel *m) override
Called whenever a new model is loaded to allow integrator to reset internal state.
Definition: GillespieIntegrator.cpp:103
Integrator is an abstract base class that provides an interface to specific integrator class implemen...
Definition: Integrator.h:60
virtual void setValue(const std::string &key, Setting value)
Pull down the setValue from superclass.
Definition: Solver.cpp:125
Store a roadrunner option (or setting) as a Variant type.
Definition: Setting.h:78
Base class for all integrators and steady state solvers.
Definition: Solver.h:39
ExecutableModel * mModel
non-owning pointer to model
Definition: Solver.h:208
Base class for all code generators in RoadRunner.