CellMLToolkit.CellModel
— Methodconstructs a CellModel struct for the CellML model defined in path
SciMLBase.ODEProblem
— MethodODEProblem constructs an ODEProblem from a CellModel
CellMLToolkit.classify_variables
— Methodclassify_variables divides all the variables in the doc document into
two categorizes and returns a Dict from Var to Bool:
true: Var is a left-hand-side variable
false: Var is not a left-hand-side variable (should be a parameter)
CellMLToolkit.components_of
— Methodcomponents_of converts the output of get_connection_component to a pair
of strings (the names of the components)
CellMLToolkit.find_alg_names
— Methodlist_alg_names returns the names of variables that occur on the left-hand-side
of a non-ODE equation; hence are *algebraic* variables
comp is an Ezxml(doc) as returned by list_components
CellMLToolkit.find_closure
— Methodfind_closure finds the transitive closure of a list of components (l) minus
the list itself, i.e., it returns the list of components in doc which are
reachable through a chain of connections starting from any component in l.
CellMLToolkit.find_component
— Methodfind_component finds a component by name
CellMLToolkit.find_equivalence_groups
— Methodfind_equivalence_groups categorizes all the variables in the doc document
based on the connections into equivalence groups
it returns a Dictionary of Var to groups (Set of Vars)
CellMLToolkit.find_iv
— Methodfind_iv finds the unique independent variable
CellMLToolkit.find_state_names
— Methodlist_state_names returns the names of variables that occur on the left-hand-side
of an ODE; hence are *state* variables
comp is an Ezxml(doc) as returned by list_components
CellMLToolkit.get_connection_component
— Methodget_connection_variables returns the pair of components for the given connection
conn is an Ezxml(doc) node as returned by list_connections
CellMLToolkit.get_model
— Methodget_model returns the single <model> element of a CellML file
CellMLToolkit.list_all_lhs
— Methodlist_component_lhs returns a set of Var composed of all variables anywhere in
the doc document that occur on the left-hand-side of an ODE or algebraic equation
CellMLToolkit.list_component_lhs
— Methodlist_component_lhs returns a set of Var composed of all variables in component
comp that occur on the left-hand-side of an ODE or algebraic equation
CellMLToolkit.list_component_math
— Methodlist_component_math returns a list of the math elements in the
given component
CellMLToolkit.list_component_variables
— Methodget_component_variables returns the list of the variables of a component
comp is an Ezxml(doc) as returned by list_components
CellMLToolkit.list_components
— Methodlist_components returns the list of CellML <Component>s
CellMLToolkit.list_connection_variables
— Methodlist_connection_variables returns a list composed of pairs of variable
for the given connection
conn is an Ezxml(doc) node as returned by list_connections
CellMLToolkit.list_connections
— Methodlist_connections returns the list of <connection> nodes in the CellML document
CellMLToolkit.list_import_components
— Methodlist_import_components returns the list of component nodes of the given
import element
node: an import node as returned by list_imports
CellMLToolkit.list_imports
— Methodlist_imports returns the list of <import> nodes in the CellML document
CellMLToolkit.list_top_cellml_files
— MethodGiven a path to a directory containing multiple CellML files.
Returns the top level files.
Used as a helper function with the CellML Physiome Model repositories.
CellMLToolkit.load_cellml
— Methodload_cellml loads a CellML file and populates a Document structures with
the components and connections.
If resolve = true, load_cellml also resolve the imported components.
CellMLToolkit.post_substitution
— Methodpost_substitution generates the substitution rules to be applied to
the merged system after structural_simplify is applied
if changes the names of the independent variable (iv) in each system
to the global iv name
TODO: this function assumes the basic iv name is the same among all systems
CellMLToolkit.pre_substitution
— Methodpre_substitution generates the substitution rules to be applied to
individual systems before structural_simplify merges them together
it morphes variables and parameters to their correct form for ModelingToolkit
based on the global CellML doc information
CellMLToolkit.process_component
— Methodprocess_component converts a single CellML component to an ODESystem
comp in the name of the component
class is the output of classify_variables
CellMLToolkit.process_components
— Methodprocess_components is the main entry point
it processes an doc document and returns a merged ODESystem
use simplify=false only for debugging purposes!
CellMLToolkit.resolve_imports!
— Methodresolve_imports recursively resolves the imported components of doc.
CellMLToolkit.subsystems
— Methodsubsystems returns a Dict of the subsystems (keys are Symbols), each one
based on one CellML component of the doc document.
class is the output of classify_variables
CellMLToolkit.translate_connections
— Methodtranslate_connections translates the list of MathML connections to
a list of ModelingToolkit equations
CellMLToolkit.variables_of
— Methodcomponents_of converts the output of list_connection_variables to a pair
of strings (the names of the variables)