roadrunner  2.6.0
Fast simulator for SBML models
Public Member Functions | Friends | List of all members
rrllvm::LLVMExecutableModel Class Reference

LLVM executable model. More...

#include <LLVMExecutableModel.h>

Inheritance diagram for rrllvm::LLVMExecutableModel:
rr::ExecutableModel

Public Member Functions

virtual std::string getExecutableModelDesc () const
 Returns a human-readable description of the code generation backend, e.g. LLVM, legacy C, etc. More...
 
 LLVMExecutableModel ()
 the default ctor just zeros out all our private bits, then the main construction is handled by the model generator.
 
 LLVMExecutableModel (const std::shared_ptr< ModelResources > &resources, LLVMModelData *modelData)
 takes ownership of the LLVMModelData pointer.
 
 LLVMExecutableModel (std::istream &in, uint modelGeneratorOpt)
 
virtual std::string getModelName ()
 get the name of the model
 
virtual void setTime (double _time)
 
virtual double getTime ()
 
void evalInitialConditions (uint32_t flags=0)
 evaluate the initial conditions specified in the sbml, this entails evaluating all InitialAssigments, AssigmentRules, initial values, etc... More...
 
virtual void reset ()
 call reset(options) with defaut options.
 
virtual void reset (int options)
 reset the model accordign to a bitfield specified by the SelectionRecord::SelectionType values.
 
virtual int getNumIndFloatingSpecies ()
 independent species do are not defined by rules, they typically participate in reactions and can have thier values set at any time.
 
virtual int getNumDepFloatingSpecies ()
 dependent species are defined by rules and the only way to change them is by changing the values on which they depend.
 
virtual int getNumFloatingSpecies ()
 total number of floating species.
 
virtual int getNumBoundarySpecies ()
 get the number of boundary species.
 
virtual int getNumGlobalParameters ()
 get the number of global parameters
 
virtual int getNumCompartments ()
 
virtual int getCompartmentIndexForFloatingSpecies (size_t index)
 
virtual int getCompartmentIndexForBoundarySpecies (size_t index)
 
virtual int getGlobalParameterValues (size_t len, int const *indx, double *values)
 get the global parameter values More...
 
virtual int setGlobalParameterValues (size_t len, int const *indx, const double *values)
 
virtual int setGlobalParameterValues (size_t len, int const *indx, const double *values, bool strict)
 
virtual int getNumReactions ()
 get the number of reactions the model has
 
virtual int getReactionRates (size_t len, int const *indx, double *values)
 get the std::vector of reaction rates. More...
 
virtual int getCompartmentVolumes (size_t len, int const *indx, double *values)
 get the compartment volumes More...
 
virtual int getNumRateRules ()
 
virtual std::vector< std::string > getRateRuleSymbols () const
 Gets the symbols defined by rate rules, i.e. returns all x such that x' = f(x) is a rule which defines parameter x. More...
 
virtual void getRateRuleValues (double *rateRuleValues)
 copy (but do not evaluate) existing rate rules values into a buffer.
 
virtual std::string getStateVectorId (size_t index)
 get the id of an element of the state std::vector.
 
virtual int getStateVector (double *stateVector)
 copies the internal model state std::vector into the provided buffer. More...
 
virtual int setStateVector (const double *stateVector)
 sets the internal model state to the provided packed state std::vector. More...
 
virtual void getStateVectorRate (double time, const double *y, double *dydt=0)
 where most of the juicy bits occur. More...
 
virtual void testConstraints ()
 
virtual std::string getInfo ()
 
virtual int getFloatingSpeciesIndex (const std::string &)
 
virtual std::string getFloatingSpeciesId (size_t index)
 
virtual int getBoundarySpeciesIndex (const std::string &)
 
virtual std::string getBoundarySpeciesId (size_t index)
 
virtual int getFloatingSpeciesAmounts (size_t len, int const *indx, double *values)
 get the floating species amounts More...
 
virtual int getFloatingSpeciesAmountRates (size_t len, int const *indx, double *values)
 get the floating species amount rates More...
 
virtual int getFloatingSpeciesConcentrationRates (size_t len, int const *indx, double *values)
 get the floating species concentration rates More...
 
virtual int getFloatingSpeciesConcentrations (size_t len, int const *indx, double *values)
 get the floating species concentrations More...
 
virtual int setFloatingSpeciesConcentrations (size_t len, int const *indx, double const *values)
 set the floating species concentrations More...
 
virtual int setFloatingSpeciesAmounts (size_t len, int const *indx, const double *values)
 
virtual int setFloatingSpeciesAmounts (size_t len, int const *indx, const double *values, bool strict)
 
virtual int getBoundarySpeciesAmounts (size_t len, int const *indx, double *values)
 get the boundary species amounts More...
 
virtual int getBoundarySpeciesConcentrations (size_t len, int const *indx, double *values)
 get the boundary species concentrations More...
 
virtual int setBoundarySpeciesConcentrations (size_t len, int const *indx, double const *values)
 get the boundary species concentrations More...
 
virtual int setBoundarySpeciesAmounts (size_t len, int const *indx, double const *values)
 get the boundary species amounts More...
 
virtual int setBoundarySpeciesAmounts (size_t len, int const *indx, double const *values, bool strict)
 
virtual int getGlobalParameterIndex (const std::string &)
 index of the global parameter id, -1 if it does not exist.
 
virtual std::string getGlobalParameterId (size_t)
 id of the indexed global parameter.
 
virtual int getCompartmentIndex (const std::string &)
 
virtual std::string getCompartmentId (size_t)
 
virtual int getReactionIndex (const std::string &)
 get the index of a named reaction More...
 
virtual std::string getReactionId (size_t)
 get the name of the specified reaction
 
virtual int getStoichiometryIndex (const std::string &)
 get the index of a named stoichiometry More...
 
virtual int getStoichiometryIndex (const std::string &speciesId, const std::string &reactionId)
 get the index of a named stoichiometry More...
 
virtual std::string getStoichiometryId (size_t)
 get the name of the specified stoichiometry
 
virtual void print (std::ostream &stream)
 
virtual int getNumConservedMoieties ()
 
virtual int getConservedMoietyIndex (const std::string &name)
 
virtual std::string getConservedMoietyId (size_t index)
 
virtual int getConservedMoietyValues (size_t len, int const *indx, double *values)
 
virtual int setConservedMoietyValues (size_t len, int const *indx, const double *values)
 
virtual int setCompartmentVolumes (size_t len, int const *indx, const double *values)
 
virtual int setCompartmentVolumes (size_t len, int const *indx, const double *values, bool strict)
 
virtual int setStoichiometries (size_t len, int const *indx, const double *values)
 
virtual int setStoichiometries (size_t len, int const *indx, const double *values, bool strict)
 
virtual int setStoichiometry (int index, double value)
 
virtual int setStoichiometry (int speciesIndex, int reactionIndex, double value)
 
virtual double getStoichiometry (int index)
 Get the current stiochiometry value with the given index. More...
 
virtual double getStoichiometry (int speciesIndex, int reactionIndex)
 Get the current stiochiometry value for the given species / reaction. More...
 
virtual int setFloatingSpeciesInitConcentrations (size_t len, const int *indx, double const *values)
 Set the initial concentrations of the floating species. More...
 
virtual int setBoundarySpeciesInitConcentrations (size_t len, const int *indx, double const *values)
 Set the initial concentrations of the boundary species. More...
 
virtual int getFloatingSpeciesInitConcentrations (size_t len, const int *indx, double *values)
 Get the initial concentrations of the floating species, uses the same indexing as the other floating species methods.
 
virtual int getBoundarySpeciesInitConcentrations (size_t len, const int *indx, double *values)
 Get the initial concentrations of the boundary species, uses the same indexing as the other boundary species methods.
 
virtual int setFloatingSpeciesInitAmounts (size_t len, const int *indx, double const *values)
 Set the initial amounts of the floating species. More...
 
virtual int setBoundarySpeciesInitAmounts (size_t len, const int *indx, double const *values)
 Set the initial amounts of the boundary species. More...
 
virtual int getFloatingSpeciesInitAmounts (size_t size_t, const int *indx, double *values)
 Get the initial amounts of the floating species, uses the same indexing as the other floating species methods.
 
virtual int getBoundarySpeciesInitAmounts (size_t size_t, const int *indx, double *values)
 Get the initial amounts of the boundary species, uses the same indexing as the other boundary species methods.
 
virtual int setCompartmentInitVolumes (size_t len, const int *indx, double const *values)
 Set the initial volumes of the compartments. More...
 
virtual int getCompartmentInitVolumes (size_t len, const int *indx, double *values)
 Get the initial volume of the compartments, uses the same indexing as the other compartment methods.
 
virtual int setGlobalParameterInitValues (size_t len, const int *indx, double const *values)
 Set the initial value of the global parameter. More...
 
virtual int getGlobalParameterInitValues (size_t len, const int *indx, double *values)
 Get the initial amounts of the global parameter, uses the same indexing as the other global parameter methods.
 
virtual void getIds (int types, std::list< std::string > &ids)
 populates a given list with all the ids that this class can accept.
 
virtual int getSupportedIdTypes ()
 returns a bit field of the ids that this class supports.
 
virtual double getValue (const std::string &id)
 gets the value for the given id std::string. More...
 
virtual void setValue (const std::string &id, double value)
 sets the value coresponding to the given selection stringl
 
virtual void setRandomSeed (int64_t)
 set the seed used by the random number generator. More...
 
virtual int64_t getRandomSeed ()
 get the seed used by the RNG.
 
virtual double getRandom ()
 Get a uniform random number between 0 and 1 created by the RNG. More...
 
virtual int getNumEvents ()
 
virtual int getEventTriggers (size_t len, const int *indx, unsigned char *eventState)
 Get status of event triggers. More...
 
virtual int applyEvents (double timeEnd, const unsigned char *previousEventState, const double *initialState, double *finalState)
 erases expired events, and applies ripe events as long as we have ripe events.
 
virtual void getEventRoots (double time, const double *y, double *gdot)
 evaluate the event 'roots' – when events transition form triggered - non-triggered or triggered to non-triggered state. More...
 
virtual void getPiecewiseTriggerRoots (double time, const double *y, double *gdot)
 
virtual double getNextPendingEventTime (bool pop)
 
virtual int getPendingEventSize ()
 
virtual void resetEvents ()
 
double getEventDelay (size_t event)
 
double getEventPriority (size_t event)
 
bool getEventTrigger (size_t event)
 
bool getEventUseValuesFromTriggerTime (size_t event)
 
bool getEventInitialValue (size_t event)
 
bool getEventPersistent (size_t event)
 
size_t getEventBufferSize (size_t event)
 
void getEventData (size_t eventId, double *data)
 
void assignEvent (size_t eventId, double *data)
 assign or apply the event using the given data.
 
bool getEventTieBreak (size_t eventA, size_t eventB)
 
virtual int getEventIndex (const std::string &eid)
 Gets the index for an event id. More...
 
virtual std::string getEventId (size_t index)
 
virtual void getEventIds (std::list< std::string > &out)
 
virtual int getNumPiecewiseTriggers ()
 We do root-finding for 'piecewise triggers': those times in a piecewise function that transition from one condition to the next.
 
virtual void getAssignmentRuleIds (std::list< std::string > &out)
 
virtual void getRateRuleIds (std::list< std::string > &out)
 
virtual void getInitialAssignmentIds (std::list< std::string > &out)
 
virtual void setEventListener (size_t index, rr::EventListenerPtr eventHandler)
 
virtual rr::EventListenerPtr getEventListener (size_t index)
 
virtual double getFloatingSpeciesAmountRate (size_t index, const double *reactionRates)
 Get the amount rate of change for the i'th floating species given a reaction rates std::vector. More...
 
virtual int getRateRuleRates (size_t len, int const *indx, double *values)
 calculate rate rule values. More...
 
virtual uint32_t getFlags () const
 Get the current set of flags.
 
virtual void setFlags (uint32_t val)
 Set certain options that determine the state of the ExecutableModel, these are listed in.
 
void saveState (std::ostream &out)
 
- Public Member Functions inherited from rr::ExecutableModel
 ExecutableModel ()
 Returns a human-readable description of the code generation backend, e.g. LLVM, legacy C, etc. More...
 
virtual ~ExecutableModel ()
 need a virtual destructor as object implementing this interface can be deleted directly, i.e. More...
 
void computeAllRatesOfChange ()
 for source compatability
 
virtual void setIntegrationStartTime (double time)
 

Friends

class LLVMModelGenerator
 
template<typename a_type , typename b_type >
void copyCachedModel (a_type *src, b_type *dst)
 copy the cached model fields between a cached model, and a executable model. More...
 

Additional Inherited Members

- Public Types inherited from rr::ExecutableModel
enum  ExecutableModelFlags { INTEGRATION = (0x1 << 0) , OPTIMIZE_REACTION_RATE_SELECTION = (0x1 << 1) }
 
- Protected Member Functions inherited from rr::ExecutableModel
void setIntegration (bool value)
 is integration is currently proceeding.
 
- Protected Attributes inherited from rr::ExecutableModel
double mIntegrationStartTime
 

Detailed Description

LLVM executable model.

Author
ETS

Interface to LLVM executable model.

Member Function Documentation

◆ evalInitialConditions()

void rrllvm::LLVMExecutableModel::evalInitialConditions ( uint32_t  flags = 0)

evaluate the initial conditions specified in the sbml, this entails evaluating all InitialAssigments, AssigmentRules, initial values, etc...

Then the model state is fully set.

◆ getBoundarySpeciesAmounts()

int rrllvm::LLVMExecutableModel::getBoundarySpeciesAmounts ( size_t  len,
int const *  indx,
double *  values 
)
virtual

get the boundary species amounts

Parameters
[in]lenthe length of the indx and values arrays.
[in]indxan array of length len of boundary species to return.
[out]valuesan array of at least length len which will store the returned boundary species amounts.

Implements rr::ExecutableModel.

◆ getBoundarySpeciesConcentrations()

int rrllvm::LLVMExecutableModel::getBoundarySpeciesConcentrations ( size_t  len,
int const *  indx,
double *  values 
)
virtual

get the boundary species concentrations

Parameters
[in]lenthe length of the indx and values arrays.
[in]indxan array of length len of boundary species to return.
[out]valuesan array of at least length len which will store the returned boundary species amounts.

Implements rr::ExecutableModel.

◆ getCompartmentVolumes()

int rrllvm::LLVMExecutableModel::getCompartmentVolumes ( size_t  len,
int const *  indx,
double *  values 
)
virtual

get the compartment volumes

Parameters
[in]lenthe length of the indx and values arrays.
[in]indxan array of length len of boundary species to return.
[out]valuesan array of at least length len which will store the returned boundary species amounts.

Implements rr::ExecutableModel.

◆ getEventIndex()

int rrllvm::LLVMExecutableModel::getEventIndex ( const std::string &  eid)
virtual

Gets the index for an event id.

If there is no event with this id, returns -1.

Implements rr::ExecutableModel.

◆ getEventRoots()

void rrllvm::LLVMExecutableModel::getEventRoots ( double  time,
const double *  y,
double *  gdot 
)
virtual

evaluate the event 'roots' – when events transition form triggered - non-triggered or triggered to non-triggered state.

Simplest method is to return 1 for triggered, -1 for not-triggered, so long as there is a zero crossing.

Parameters
[in]timecurrent time
[in]ythe state std::vector
[out]gdotresult event roots, this is of length numEvents.

Implements rr::ExecutableModel.

◆ getEventTriggers()

int rrllvm::LLVMExecutableModel::getEventTriggers ( size_t  len,
const int *  indx,
unsigned char *  eventState 
)
virtual

Get status of event triggers.

Author
ETS

When len <= 0, returns number of events. Otherwise, sets bits in eventState to the corresponding trigger.

Parameters
[in]lenThe length of indx
[in]indxAn index into eventState
[out]eventStateThe state of the event triggers

Implements rr::ExecutableModel.

◆ getExecutableModelDesc()

virtual std::string rrllvm::LLVMExecutableModel::getExecutableModelDesc ( ) const
inlinevirtual

Returns a human-readable description of the code generation backend, e.g. LLVM, legacy C, etc.

Author
JKM
Date
07/31/2015

Implements rr::ExecutableModel.

◆ getFloatingSpeciesAmountRate()

double rrllvm::LLVMExecutableModel::getFloatingSpeciesAmountRate ( size_t  index,
const double *  reactionRates 
)
virtual

Get the amount rate of change for the i'th floating species given a reaction rates std::vector.

TODO: This should be merged with getFloatingSpeciesAmountRates, but that will break inteface, will do in next point release.

TODO: If the conversion factor changes in between getting the reaction rates std::vector via getReactionRates

Parameters
indexindex of the desired floating speceis rate.
reactionRatespointer to buffer of reaction rates.

Implements rr::ExecutableModel.

◆ getFloatingSpeciesAmountRates()

int rrllvm::LLVMExecutableModel::getFloatingSpeciesAmountRates ( size_t  len,
int const *  indx,
double *  values 
)
virtual

get the floating species amount rates

Parameters
[in]lenthe length of the indx and values arrays.
[in]indxan array of length len of floating species to return.
[out]valuesan array of at least length len which will store the returned floating species amount rates.

Implements rr::ExecutableModel.

◆ getFloatingSpeciesAmounts()

int rrllvm::LLVMExecutableModel::getFloatingSpeciesAmounts ( size_t  len,
int const *  indx,
double *  values 
)
virtual

get the floating species amounts

Parameters
[in]lenthe length of the indx and values arrays.
[in]indxan array of length len of boundary species to return.
[out]valuesan array of at least length len which will store the returned boundary species amounts.

Implements rr::ExecutableModel.

◆ getFloatingSpeciesConcentrationRates()

int rrllvm::LLVMExecutableModel::getFloatingSpeciesConcentrationRates ( size_t  len,
int const *  indx,
double *  values 
)
virtual

get the floating species concentration rates

Parameters
[in]lenthe length of the indx and values arrays.
[in]indxan array of length len of floating species to return.
[out]valuesan array of at least length len which will store the returned floating species concentration rates.

Implements rr::ExecutableModel.

◆ getFloatingSpeciesConcentrations()

int rrllvm::LLVMExecutableModel::getFloatingSpeciesConcentrations ( size_t  len,
int const *  indx,
double *  values 
)
virtual

get the floating species concentrations

Parameters
[in]lenthe length of the indx and values arrays.
[in]indxan array of length len of boundary species to return.
[out]valuesan array of at least length len which will store the returned boundary species amounts.

Implements rr::ExecutableModel.

◆ getGlobalParameterValues()

int rrllvm::LLVMExecutableModel::getGlobalParameterValues ( size_t  len,
int const *  indx,
double *  values 
)
virtual

get the global parameter values

Parameters
[in]lenthe length of the indx and values arrays.
[in]indxan array of length len of boundary species to return.
[out]valuesan array of at least length len which will store the returned boundary species amounts.

Implements rr::ExecutableModel.

◆ getRandom()

double rrllvm::LLVMExecutableModel::getRandom ( )
virtual

Get a uniform random number between 0 and 1 created by the RNG.

The type of RNG can be specified in the config file with the RANDOM_GENERATOR_TYPE key.

Implements rr::ExecutableModel.

◆ getRateRuleRates()

int rrllvm::LLVMExecutableModel::getRateRuleRates ( size_t  len,
int const *  indx,
double *  values 
)
virtual

calculate rate rule values.

TODO redo this function, not very effecient.

Reimplemented from rr::ExecutableModel.

◆ getRateRuleSymbols()

std::vector< std::string > rrllvm::LLVMExecutableModel::getRateRuleSymbols ( ) const
virtual

Gets the symbols defined by rate rules, i.e. returns all x such that x' = f(x) is a rule which defines parameter x.

Author
JKM
Date
07/31/2015

Implements rr::ExecutableModel.

◆ getReactionIndex()

int rrllvm::LLVMExecutableModel::getReactionIndex ( const std::string &  eid)
virtual

get the index of a named reaction

Returns
>= 0 on success, < 0 on failure.

Implements rr::ExecutableModel.

◆ getReactionRates()

int rrllvm::LLVMExecutableModel::getReactionRates ( size_t  len,
int const *  indx,
double *  values 
)
virtual

get the std::vector of reaction rates.

Parameters
lenthe length of the supplied buffer, must be >= reaction rates size.
indxpointer to index array. If NULL, then it is ignored and the reaction rates are copied directly into the supplied buffer.
valuespointer to user supplied buffer where rates will be stored.

Implements rr::ExecutableModel.

◆ getStateVector()

int rrllvm::LLVMExecutableModel::getStateVector ( double *  stateVector)
virtual

copies the internal model state std::vector into the provided buffer.

Parameters
[out]stateVectora buffer to copy the state std::vector into, if NULL, return the size required.
Returns
the number of items coppied into the provided buffer, if stateVector is NULL, returns the length of the state std::vector.

Implements rr::ExecutableModel.

◆ getStateVectorRate()

void rrllvm::LLVMExecutableModel::getStateVectorRate ( double  time,
const double *  y,
double *  dydt = 0 
)
virtual

where most of the juicy bits occur.

the state std::vector y is the rate rule values and floating species concentrations concatenated. y is of length numFloatingSpecies + numRateRules.

The state std::vector is packed such that the first n raterule elements are the values of the rate rules, and the last n floatingspecies are the floating species values.

Parameters
[in]timecurrent simulator time
[in]ystate std::vector, must be of size returned by getStateVector
[out]dydtcalculated rate of change of the state std::vector, if null, it is ignored.

Implements rr::ExecutableModel.

◆ getStoichiometry() [1/2]

double rrllvm::LLVMExecutableModel::getStoichiometry ( int  index)
virtual

Get the current stiochiometry value with the given index.

If either are not valid, NaN is returned.

Implements rr::ExecutableModel.

◆ getStoichiometry() [2/2]

double rrllvm::LLVMExecutableModel::getStoichiometry ( int  speciesIndex,
int  reactionIndex 
)
virtual

Get the current stiochiometry value for the given species / reaction.

If either are not valid, NaN is returned.

Implements rr::ExecutableModel.

◆ getStoichiometryIndex() [1/2]

int rrllvm::LLVMExecutableModel::getStoichiometryIndex ( const std::string &  )
virtual

get the index of a named stoichiometry

Returns
>= 0 on success, < 0 on failure.

Implements rr::ExecutableModel.

◆ getStoichiometryIndex() [2/2]

int rrllvm::LLVMExecutableModel::getStoichiometryIndex ( const std::string &  ,
const std::string &   
)
virtual

get the index of a named stoichiometry

Returns
>= 0 on success, < 0 on failure.

Implements rr::ExecutableModel.

◆ getValue()

double rrllvm::LLVMExecutableModel::getValue ( const std::string &  id)
virtual

gets the value for the given id std::string.

The std::string must be a SelectionRecord std::string that is accepted by this class.

Implements rr::ExecutableModel.

◆ setBoundarySpeciesAmounts()

int rrllvm::LLVMExecutableModel::setBoundarySpeciesAmounts ( size_t  len,
int const *  indx,
double const *  values 
)
virtual

get the boundary species amounts

Parameters
[in]lenthe length of the indx and values arrays.
[in]indxan array of length len of boundary species to return.
[in]valuesan array of at least length len which will store the returned boundary species amounts.

Implements rr::ExecutableModel.

◆ setBoundarySpeciesConcentrations()

int rrllvm::LLVMExecutableModel::setBoundarySpeciesConcentrations ( size_t  len,
int const *  indx,
double const *  values 
)
virtual

get the boundary species concentrations

Parameters
[in]lenthe length of the indx and values arrays.
[in]indxan array of length len of boundary species to return.
[in]valuesan array of at least length len which will store the returned boundary species amounts.

Implements rr::ExecutableModel.

◆ setBoundarySpeciesInitAmounts()

int rrllvm::LLVMExecutableModel::setBoundarySpeciesInitAmounts ( size_t  len,
const int *  indx,
double const *  values 
)
virtual

Set the initial amounts of the boundary species.

Takes the same indices as the other boundary species methods.

Note, if a boundary species has an initial assignment rule, than the initial conditions value can only be set by updating the values on which it depends, it can not be set directly.

Implements rr::ExecutableModel.

◆ setBoundarySpeciesInitConcentrations()

int rrllvm::LLVMExecutableModel::setBoundarySpeciesInitConcentrations ( size_t  len,
const int *  indx,
double const *  values 
)
virtual

Set the initial concentrations of the boundary species.

Takes the same indices as the other boundary species methods.

Note, if a boundary species has an initial assignment rule, than the initial conditions value can only be set by updating the values on which it depends, it can not be set directly.

Implements rr::ExecutableModel.

◆ setCompartmentInitVolumes()

int rrllvm::LLVMExecutableModel::setCompartmentInitVolumes ( size_t  len,
const int *  indx,
double const *  values 
)
virtual

Set the initial volumes of the compartments.

Takes the same indices as the other compartment methods.

Note, if a compartment has an initial assignment rule, than the initial conditions value can only be set by updating the values on which it depends, it can not be set directly.

Implements rr::ExecutableModel.

◆ setFloatingSpeciesConcentrations()

int rrllvm::LLVMExecutableModel::setFloatingSpeciesConcentrations ( size_t  len,
int const *  indx,
double const *  values 
)
virtual

set the floating species concentrations

Parameters
[in]lenthe length of the indx and values arrays.
[in]indxan array of length len of boundary species to return.
[in]valuesan array of at least length len which will store the returned boundary species amounts.

Implements rr::ExecutableModel.

◆ setFloatingSpeciesInitAmounts()

int rrllvm::LLVMExecutableModel::setFloatingSpeciesInitAmounts ( size_t  len,
const int *  indx,
double const *  values 
)
virtual

Set the initial amounts of the floating species.

Takes the same indices as the other floating species methods.

Note, if a floating species has an initial assignment rule, than the initial conditions value can only be set by updating the values on which it depends, it can not be set directly.

Implements rr::ExecutableModel.

◆ setFloatingSpeciesInitConcentrations()

int rrllvm::LLVMExecutableModel::setFloatingSpeciesInitConcentrations ( size_t  len,
const int *  indx,
double const *  values 
)
virtual

Set the initial concentrations of the floating species.

Takes the same indices as the other floating species methods.

Note, if a floating species has an initial assignment rule, than the initial conditions value can only be set by updating the values on which it depends, it can not be set directly.

Implements rr::ExecutableModel.

◆ setGlobalParameterInitValues()

int rrllvm::LLVMExecutableModel::setGlobalParameterInitValues ( size_t  len,
const int *  indx,
double const *  values 
)
virtual

Set the initial value of the global parameter.

Takes the same indices as the other global parameter methods.

Implements rr::ExecutableModel.

◆ setRandomSeed()

void rrllvm::LLVMExecutableModel::setRandomSeed ( int64_t  seed)
virtual

set the seed used by the random number generator.

This will by definition reset the RNG.

Implements rr::ExecutableModel.

◆ setStateVector()

int rrllvm::LLVMExecutableModel::setStateVector ( const double *  stateVector)
virtual

sets the internal model state to the provided packed state std::vector.

Parameters
[in]stateVectoran array which holds the packed state std::vector, must be at least the size returned by getStateVector.
Returns
the number of items copied from the state std::vector, negative on failure.

Implements rr::ExecutableModel.

Friends And Related Function Documentation

◆ copyCachedModel

template<typename a_type , typename b_type >
void copyCachedModel ( a_type *  src,
b_type *  dst 
)
friend

copy the cached model fields between a cached model, and a executable model.

We don't want to have ExecutableModel inherit from CahcedModel because they do compleltly different things, and have completly differnt deletion semantics


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