- From: lpsmith at spod-central.org (Lucian Smith)
- Subject: [cellml-dev] The model of a connection
- Date: Wed, 31 Mar 2010 22:46:27 +0100
...anyone? Bug? Misunderstanding? Something else?
-Lucian
* Lucian Smith <lpsmith at spod-central.org> [2010-03-29 19:46] writes:
>
I have what I *think* is a bug in the CellML API, but I want to check to
>
make sure it's not a misunderstanding first.
>
>
I am reading the model
>
terkildsen_niederer_crampin_hunter_smith_2008/Pandit_Hinch_Niederer.cellml
>
>
which, in turn, imports Pandit_et_al_2001_endo.cellml
>
>
The first model imports a bunch of components from the second, and then
>
makes some connections between two components that it imported from that
>
second model:
>
>
<!-- These components are imported from the Pandit et al endocardial cell
>
model -->
>
<import xmlns:xlink="http://www.w3.org/1999/xlink"
>
xlink:href="Pandit_et_al_2001_endo.cellml">
>
<units name="mV" units_ref="millivolt"/>
>
<units name="uF" units_ref="microF"/>
>
<units name="mM" units_ref="millimolar"/>
>
<units name="mJ_per_mole_K"
>
units_ref="millijoule_per_mole_kelvin"/>
>
<units name="C_per_mole" units_ref="coulomb_per_mole"/>
>
>
<component component_ref="sodium_current"
>
name="pandit_sodium_current"/>
>
<component
>
component_ref="Ca_independent_transient_outward_K_current"
>
name="pandit_Ca_independent_transient_outward_K_current"/>
>
<component component_ref="steady_state_outward_K_current"
>
name="pandit_steady_state_outward_K_current"/>
>
<component component_ref="inward_rectifier"
>
name="pandit_inward_rectifier"/>
>
<component
>
component_ref="hyperpolarisation_activated_current"
>
name="pandit_hyperpolarisation_activated_current"/>
>
<component component_ref="background_currents"
>
name="pandit_background_currents"/>
>
<component component_ref="standard_ionic_concentrations"
>
name="pandit_standard_ionic_concentrations"/>
>
</import>
>
>
And, later:
>
>
<connection>
>
<map_components component_1="pandit_sodium_current"
>
component_2="pandit_background_currents"/>
>
<map_variables variable_1="E_Na" variable_2="E_Na"/>
>
</connection>
>
>
>
Now, you'll notice that the imported components have been given new
>
names--what used to be the component 'sodium_current' is now
>
'pandit_sodium_current'. So when I get to the connection in question, I
>
need to know which model it came from--if it came from the main model
>
(which it does), the components to connect will be 'pandit_sodium_current'
>
and 'pandit_background_currents', while if that connection was present in
>
the submodel, the component names will be 'sodium_current' and
>
'background_currents'. So, I ask the connection which model it came from:
>
>
rv = connection->GetModelElement(getter_AddRefs(topmodel));
>
>
...and this is where the API fails me, because 'topmodel' is
>
'pandit_et_al_2001_endo' instead of 'Pandit_Hinch_Niederer_Model'.
>
>
Presumably, it's lying to me because both of the variables it wants to
>
connect are in the first and not directly in the latter, but since the
>
names have changed, I can no longer find the varibles in question.
>
>
On the positive side, this is the first time the issue's come up when
>
going through all the models on cellml.org alphabetically, so making it to
>
the p's is pretty good!
>
>
-Lucian
>
_______________________________________________
>
cellml-tools-developers mailing list
>
cellml-tools-developers at cellml.org
>
http://www.cellml.org/mailman/listinfo/cellml-tools-developers
- [cellml-dev] The model of a connection, Lucian Smith, 04/01/2010
Archive powered by MHonArc 2.6.18.