GillespieIntegrator
-
class GillespieIntegrator : public rr::Integrator
RoadRunner’s implementation of the Gillespie SSA.
- Author
WBC, ETS
Public Functions
-
GillespieIntegrator(ExecutableModel *model)
-
~GillespieIntegrator() override
-
virtual void syncWithModel(ExecutableModel *m) override
Called whenever a new model is loaded to allow integrator to reset internal state.
- Author
JKM
-
virtual std::string getName() const override
Get the name for this integrator.
- Author
WBC
Note
Delegates to getName
-
virtual std::string getDescription() const override
Get the description for this integrator.
- Author
WBC
Note
Delegates to getDescription
-
virtual std::string getHint() const override
Get the hint for this integrator.
- Author
WBC
Note
Delegates to getHint
-
virtual Solver *construct(ExecutableModel *executableModel) const override
Constructs a new Solver of a given type.
the caller is responsible for deleting memory associated with the returned Solver*.
- Author
JKM, WBC
-
virtual IntegrationMethod getIntegrationMethod() const override
Always stochastic for Gillespie.
- Author
WBC, ETS
-
virtual void setValue(const std::string &setting, Setting value) override
Sets the value of an integrator setting (e.g. absolute_tolerance)
- Author
WBC, ETS
-
virtual void resetSettings() override
Reset all integrator settings to their respective default values.
- Author
JKM
-
virtual double integrate(double t0, double tf) override
Main integration routine.
- Author
WBC, ETS
-
virtual void restart(double timeStart) override
Reset time to zero and reinitialize model.
- Author
WBC, ETS
-
virtual IntegratorListenerPtr getListener() override
Gets the integrator listener.
- Author
WBC, ETS
-
virtual void setListener(IntegratorListenerPtr) override
Sets the integrator listener.
- Author
WBC, ETS
-
explicit Integrator(ExecutableModel *model)
-
Integrator()
Private Functions
-
void testRootsAtInitialTime()
-
void applyEvents(double timeEnd, std::vector<unsigned char> &prevEventStatus)
-
double urand()
-
void setEngineSeed(Setting seedSetting)
-
inline double getStoich(uint species, uint reaction)
-
void initializeFromModel()
Initialize model-specific variables.
Called whenever a model is loaded or a Gillespie integrator is constructed
- Author
JKM
Private Members
-
std::mt19937 engine
-
double timeScale
-
double stoichScale
-
int nReactions
-
int floatingSpeciesStart
-
double *reactionRates
-
double *reactionRatesBuffer
-
int stateVectorSize
-
double *stateVector
-
double *stateVectorRate
-
std::vector<unsigned char> eventStatus
-
std::vector<unsigned char> previousEventStatus