| Combining Models of Different Types | |
Author: Warren Hedley (Bioengineering Institute, University of Auckland) Contributors: David Bullivant (Bioengineering Institute, University of Auckland) Peter Hunter (Bioengineering Institute, University of Auckland) Melanie Nelson (Physiome Sciences Inc.) Poul Nielsen (Bioengineering Institute, University of Auckland)
At this point, the Auckland team were confident that they had developed a pretty robust and flexible framework for CellML, but there were still a few niggly issues to sort out. The start of this meeting was plagued by interruptions as Poul and David kept deciding that many other things were more important than CellML, but eventually the team managed to sit down for a quarter of an hour to discuss the combination of models of different types.
Melanie also brought up (remotely) the issue of a best practice for the definition of <component> , <connection> and <group> elements within a <model> element. The Auckland team quickly agreed that the best plan is to simply minimize forward references. So groups and connections should be defined after all of their referenced components have been defined. In general, Warren would suggest defining all components first, then all connections, and finally the groups.
Peter had suggested that the team look into the issue of combining models of different types fairly urgently earlier. Type in this context means electro-physiological, mechanical, metabolism and signalling models, but the ideas presented here can be extended to cover the combination of partial models into complete models.
The Auckland team has always thought that the result of combining two or more models is just another model, so the combination process would involve stripping the <connection> s, <component> s and <group> s out of the sub-models and re-inserting them under a new model component. This view hasn't changed but it became clear that some advanced mechanism would be needed to resolve the following problems:
-
component names must be unique.
-
the source code for a model may not be available.
To solve these problems, it was proposed that the <model> element be able to contain copies of other models using the mechanism proposed in the low-level XML re-use scheme. The implication would be that the contents of the copied model would be available to the current <model> element as if they were directly inside it, except that the names of components would be prefixed with the name of the model followed by a fullstop. This is best demonstrated by an example, such as that shown in Figure 1.
<model name=" combined_model " >
<!-- copy in our electrophysiological model -->
<copy
element=" model "
href=" http://www.cellml.org/models/ep_model_1 "
name_ref=" my_electrophysiological_model " >
</copy>
<!-- copy in our mechnical model -->
<copy
element=" model "
href=" http://www.cellml.org/models/mechnical_1 "
name_ref=" my_mechanical_model " >
<!--
Change the value of the public_interface attribute on
intracellular calcium from "out" to "in", so that we can
connect it to intracellular calcium on the EP model.
-->
<modify xpath=" component[@name='intra']/variable[@name='calcium']/@public_interface " >
in
</modify>
<!--
Delete the differential equation that regulates intracellular
calcium - this is now regulated by the EP model.
-->
<delete xpath=" component[@name='intra']/mathml:math/apply[1] " />
</copy>
<!--
Connect the intracellular compartment on both models and map calcium
from the EP to the mechnical model. Note that component names are
now prefixed with the model name.
-->
<connection >
<component_ref name_ref=" my_electrophysiological_model.intra " >
<variable_ref name_ref=" calcium " />
</component_ref>
<component_ref name_ref=" my_mechanical_model.intra " >
<variable_ref name_ref=" calcium " />
</component_ref>
</connection>
</model>
Figure 1
The proposed way to combine two existing models into a more complex model. This example is loosely based on the coupling of the Jafri-Rice-Winslow electro-physiological model to the Hunter-McCulloch-ter-Keurs mechanical model, where intracellular calcium is fed from the JRW model to the HMT model with no feedback mechanism. This requires a change in the interface value of intracellular calcium in the HMT model, as well as the deletion of the equation regulating intracellular calcium.
Note that combining models in this way requires the use of the low-level XML re-use scheme, a fact that Warren finds reasonably entertaining. Someone else may yet come up with a better idea.
|