|
virtual std::string | getModelName ()=0 |
|
virtual void | evalInitialConditions ()=0 |
|
virtual void | reset ()=0 |
|
virtual int | getNumDepFloatingSpecies ()=0 |
|
virtual int | getNumFloatingSpecies ()=0 |
|
virtual int | getNumIndFloatingSpecies ()=0 |
|
virtual int | getFloatingSpeciesAmounts (int len, int const *indx, double *values)=0 |
|
virtual int | getFloatingSpeciesConcentrations (int len, int const *indx, double *values)=0 |
|
virtual int | setFloatingSpeciesConcentrations (int len, int const *indx, double const *values)=0 |
|
virtual int | setFloatingSpeciesInitConcentrations (int len, int const *indx, double const *values)=0 |
|
virtual int | getFloatingSpeciesInitConcentrations (int len, int const *indx, double *values)=0 |
|
virtual int | setFloatingSpeciesInitAmounts (int len, int const *indx, double const *values)=0 |
|
virtual int | getFloatingSpeciesInitAmounts (int len, int const *indx, double *values)=0 |
|
virtual int | getNumBoundarySpecies ()=0 |
|
virtual int | getBoundarySpeciesAmounts (int len, int const *indx, double *values)=0 |
|
virtual int | getBoundarySpeciesConcentrations (int len, int const *indx, double *values)=0 |
|
virtual int | setBoundarySpeciesConcentrations (int len, int const *indx, double const *values)=0 |
|
virtual int | getNumGlobalParameters ()=0 |
|
virtual int | getGlobalParameterIndex (const std::string &eid)=0 |
|
virtual std::string | getGlobalParameterId (int index)=0 |
|
virtual int | getGlobalParameterValues (int len, int const *indx, double *values)=0 |
|
virtual int | getCompartmentVolumes (int len, int const *indx, double *values)=0 |
|
virtual int | setCompartmentInitVolumes (int len, int const *indx, double const *values)=0 |
|
virtual int | getCompartmentInitVolumes (int len, int const *indx, double *values)=0 |
|
virtual void | getIds (int types, std::list< std::string > &ids)=0 |
|
virtual int | getSupportedIdTypes ()=0 |
|
virtual double | getValue (const std::string &id)=0 |
|
virtual void | setValue (const std::string &id, double value)=0 |
|
virtual int | getStoichiometryMatrix (int *rows, int *cols, double **data)=0 |
|
virtual double | getStoichiometry (int speciesIndex, int reactionIndex)=0 |
|
virtual int | getNumReactions ()=0 |
|
virtual int | getReactionIndex (const std::string &eid)=0 |
|
virtual std::string | getReactionId (int index)=0 |
|
virtual void | evalReactionRates ()=0 |
|
virtual void | setRateRuleValues (const double *rateRuleValues)=0 |
|
virtual void | getRateRuleValues (double *rateRuleValues)=0 |
|
virtual int | getStateVector (double *stateVector)=0 |
|
virtual int | setStateVector (const double *stateVector)=0 |
|
virtual void | evalModel (double time, const double *y, double *dydt=0)=0 |
|
virtual int | getEventTriggers (int len, const int *indx, unsigned char *values)=0 |
|
virtual void | evalEventRoots (double time, const double *y, double *gdot)=0 |
|
virtual | ~ExecutableModel () |
|
virtual bool | getConservedSumChanged ()=0 |
|
virtual void | computeConservedTotals ()=0 |
|
virtual void | setConservedSumChanged (bool)=0 |
|
virtual void | convertToAmounts ()=0 |
|
The ExecutableModel interface provides a way to access an sbml model that was compiled, JIT'd or interpreted as executable (runnable) module.
An ExecutableModel holds a ModelData structure, all the simulation values are stored in the ModelData struct, i.e. the dynamic state of the model is fully contained in the ModelData structure.
An ExecutableModel shoud also contain all of the initial condisions, rules, functions and whatever other semantic information that was specified in the sbml model.
virtual void rr::ExecutableModel::evalInitialConditions |
( |
| ) |
|
|
pure virtual |
evaluate the initial conditions specified in the sbml, this entails evaluating all InitialAssigments, AssigmentRules, initial values, etc...
Sets the the concentrations and ammounts to the values specified by the initial conditions, ModelData::floatingSpeciesInitConcentrations, i.e. the ModelData::floatingSpeciesAmounts[:] are set to ModelData::floatingSpeciesInitConcentrations[:] * compartment volume, and ModelData::y[:] is set to ModelData::floatingSpeciesInitConcentrations[:].
This sets the concentrations and ammounts to either initialAmount or initialConcentration (which ever exists) or 0 if they are missing. A later call to evalInitialAssignments will apply any initialAssigments to update the concentations and ammounts.
The the model state is fully set.
virtual int rr::ExecutableModel::getEventTriggers |
( |
int |
len, |
|
|
const int * |
indx, |
|
|
unsigned char * |
values |
|
) |
| |
|
pure virtual |
get the event status, false if the even is not triggered, true if it is.
The reason this returns an unsigned char instead of a bool array is this array is typically stuffed into an std::vector, and std::vector<bool> is seriously broken and can not be used as a C array.
So, on every modern system I'm aware of, bool is an unsigned char, so use that data type here.
virtual int rr::ExecutableModel::setCompartmentInitVolumes |
( |
int |
len, |
|
|
int const * |
indx, |
|
|
double const * |
values |
|
) |
| |
|
pure 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.
virtual int rr::ExecutableModel::setFloatingSpeciesInitAmounts |
( |
int |
len, |
|
|
int const * |
indx, |
|
|
double const * |
values |
|
) |
| |
|
pure 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.
virtual int rr::ExecutableModel::setFloatingSpeciesInitConcentrations |
( |
int |
len, |
|
|
int const * |
indx, |
|
|
double const * |
values |
|
) |
| |
|
pure 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.
virtual void rr::ExecutableModel::setRateRuleValues |
( |
const double * |
rateRuleValues | ) |
|
|
pure virtual |
set the 'values' of the rate rules.
Rate rules are a set of rate equations, i.e dy/dt, where y is some existing model variable, i.e. volume, parameter, etc...
This function sets all of the values that the derivatives integrated to, i.e. if dy/dt is the rate of change of say a compartment volume, than this function takes that compartment volume and stores it in the appropriate place.
The length of rateRuleValues obviously must be the number of rate rules we have.