That is a very good point. Perhaps what is needed is quite different altogether. A component like the sodium current needs a component to play the role of "membrane", and another component to play the role of "m gate" and another to play the role of "h gate" etc.
I think what we are aiming to do is make sure that the component playing the role of "membrane" is connected to the appropriate variables, likewise, the component playing the role of "m gate" etc. This leads to the idea of specifying what roles a component can play, what roles it requires external components to play, and associating variables with the roles. Using Beeler-Reuter as an example: Component sodium-current needs components to play the following roles: membrane(variable: V) role; environment(variable: time) role; m-gate(variable: m) role; h-gate(variable: h) role; j-gate(variable: j) role. Component m-gate needs components to play the following roles: environment(variable: time) role; membrane(variable: V) role. (interestingly the current BR model lets the sodium current play both these roles for the m-gate). We are already doing this in a sense, but the possible roles are hard-coded to the unfortunately named "public" and "private": "in" means "requires", "out" means "provides". The idea of specifying what roles a component can play is analogous to specifying what interfaces a Java class implements. The idea of specifying what roles a component requires other components to play is analogous to dependency injection, again from the Java world. Regards, Randall > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:cellml-discussion- > [EMAIL PROTECTED] On Behalf Of Andrew Miller > Sent: Thursday, 10 January 2008 1:39 p.m. ... > For example, the total sodium current in the Beeler-Reuter model is > meaningless to the parts which contribute to the sodium current, and > isolating them properly from each other helps prevent coding errors in > the encapsulated gate components. This makes the sodium current > variable, in the sodium current component, an example of when publicly > visible but privately hidden interfaces make sense. > _______________________________________________ cellml-discussion mailing list [email protected] http://www.cellml.org/mailman/listinfo/cellml-discussion
