CellML API
cellml_services::CodeInformation Interface Reference


Public Member Functions | |
ComputationTargetIterator | iterateTargets () |
Iterates through all computation targets. | |
![]() | |
void | add_ref () |
Called to indicate that some code is keeping an owning reference to the object. | |
oneway void | release_ref () |
Removes a reference to an object which was created by some other means (e.g. | |
IObject | query_interface (in utf8string id) |
Returns an IObject of the same implementation, which supports a specific interface. |
Public Attributes | |
readonly attribute wstring | errorMessage |
The error message, in the event that something is wrong with the model. | |
readonly attribute ModelConstraintLevel | constraintLevel |
The constraint level, describing whether or not the model is correctly constrained. | |
readonly attribute unsigned long | algebraicIndexCount |
The number of variables which were assigned indices in the algebraic variables array. | |
readonly attribute unsigned long | rateIndexCount |
The number of variables which were assigned indices into the rates and state variables array. | |
readonly attribute unsigned long | constantIndexCount |
The number of variables which were assigned indices into the constants array. | |
readonly attribute wstring | initConstsString |
There are three types of code strings that can be obtained, each for a different purpose. | |
readonly attribute wstring | ratesString |
The rates string, as described in the table above. | |
readonly attribute wstring | variablesString |
The variables string, as described in the table above. | |
readonly attribute wstring | functionsString |
A string containing any supplementary code which is needed to be used out-of-line by the above strings. | |
readonly attribute mathml_dom::MathMLNodeList | flaggedEquations |
The list of flagged equations. | |
![]() | |
readonly attribute string | objid |
Fetches the ID of the object. |
Detailed Description
Member Function Documentation
ComputationTargetIterator cellml_services::CodeInformation::iterateTargets | ( | ) |
Iterates through all computation targets.
Member Data Documentation
readonly attribute unsigned long cellml_services::CodeInformation::algebraicIndexCount |
readonly attribute unsigned long cellml_services::CodeInformation::constantIndexCount |
readonly attribute ModelConstraintLevel cellml_services::CodeInformation::constraintLevel |
readonly attribute wstring cellml_services::CodeInformation::errorMessage |
readonly attribute mathml_dom::MathMLNodeList cellml_services::CodeInformation::flaggedEquations |
readonly attribute wstring cellml_services::CodeInformation::functionsString |
A string containing any supplementary code which is needed to be used out-of-line by the above strings.
Whether or not supplementary code is used, and exactly what it means depends on the MAL file used with MaLaES, and the options set on the CodeGenerator. Typically, for C, it is used to define extra functions that are passed as arguments to functions being called from expressions.
readonly attribute wstring cellml_services::CodeInformation::initConstsString |
There are three types of code strings that can be obtained, each for a different purpose.
Note that as variables are computed, they are added into 'Known variables'. Definitions: State variable: A variable of which the first or higher derivative is taken. VOI or Variable of Integration: A variable with respect to which the model is being integrated. +----——+--------------——+-----------——+--------——+------------——+ | String | Targeted Variables |Possibly computed| Known | Purpose | | | | variables | Variables | | +----——+--------------——+-----------——+--------——+------------——+ |initConsts|All variables which | Any variable | None |Setting up | | |aren't state | or rate | |constants and | | |variables but have | except VOIs & | |values computed | | |an initial_value | state variables| |from them. | | |attribute, and any | | |Also sets up | | |variables & rates | | |samples of uncerta| | |which follow. | | |in values. | +----——+--------------——+-----------——+--------——+------------——+ | rates |All rates which are |Any variable or |Everything set|Efficiently | | |not static. |rate |above, VOIs, |computing rates | | | | |& state |for the ODE solver| | | | |variables | | +----——+--------------——+-----------——+--------——+------------——+ |variables |All variables not |Any variable |Everything set|Computing the | | |computed above | |above, VOIs, |remaining | | | | |and state |variables. | | | | |variables | | +----——+--------------——+-----------——+--------——+------------——+
Note that some rates also have corresponding higher order entries in the state variables array. These rates are copied from the state variables array into the rates array at the beginning of the rates string, and may be relied upon in the rates string. e.g. INDEX | 0 | 1 | 2 | STATES | x | dx/dt | d^2x/dt2 | RATES | dx/dt | d^2x/dt2 | d^3x/dt3 | RATES[1] is copied from STATES[2], and RATES[0] is copied from STATES[1]. The initConsts string, as described in the table above.
readonly attribute unsigned long cellml_services::CodeInformation::rateIndexCount |
readonly attribute wstring cellml_services::CodeInformation::ratesString |