James Lawson wrote: > Hi all, > > I was sitting in bed last night, and this idea came to me: > > It would be really easy to create some kind of script / automation > process that automatically connects up variables of the same name if > they have matching interfaces. > > Say you have a component A with variables a and b. a is defined in A and > has pub interface out, while b is imported from B, where it is defined. > So you also have component B with variables a and b, a having pub > interface in and b having pub interface out. > > Surely it would be very simple to just have some button to click in > PCEnv or COR that links up these variables? I'm not saying this is done > by default - you'd have to select the option once you'd defined all your > variable interfaces. It wouldn't be able to handle connecting variables > with different names, but it would at least be a start. There would also > be problems with variables with the same name that aren't supposed to be > all connected together, but this, IMO, is just bad CellML practice. > Imports might be an issue too. I find creating connections the most > tedious aspect of coding up a CellML model, and I think the benefits > would vastly outweigh the problems, and of course, people wouldn't have > to use it... > > I also thought, surely someone has already thought of this and thrown > the idea out. But if this could be implemented it would be extremely > useful. > I don't think that it is as simple as using names - I don't think it is always bad practice to use the same names for two different things - this is in fact the norm for when you import the same thing twice. You would also not always get the topology of the model correct if you tried to compose models this way.
Noma's group at Kyoto University uses their Cell Model Ontology metadata to allow the tool to "edit the composition of a model with intelligent assistance" (refer to Takao' Shimayoshi's slides from the CellML Workshop, http://www.cellml.org/workshop2007/presentations/070403cellmlworkshopshimayoshi-handout.pdf/download page 3 in the PDF). If we were going to implement something like this, I think we would want to base it on metadata about the interpretation of variables and not on variable names, and it would have to be a semi-supervised process not a completely automated one, to get the topology right. Best regards, Andrew > James > _______________________________________________ > cellml-discussion mailing list > email@example.com > http://www.cellml.org/mailman/listinfo/cellml-discussion > _______________________________________________ cellml-discussion mailing list firstname.lastname@example.org http://www.cellml.org/mailman/listinfo/cellml-discussion