From: Lucian S. <luc...@gm...> - 2015-01-20 17:33:34
|
You are exactly correct: you need to provide local copies of things that can then replace or be replaced by elements in the submodels. To recreate your situation in Antimony: model model1() species A in comp1, B in comp2 A -> B; end model model2() species C in comp3, D in comp3 C -> D; end model combined() //Declare the local species and compartment: species C2 in cMain //Import the other models as submodels: M1: model1() M2: model2() //Connect the compartments and species M1.comp2 is cMain M2.comp3 is cMain M1.B is C2 M2.C is C2 end Which in SBML would be the attached model (though presumably with external model definitions instead of local ones). This version used the 'replacedElement' constructs, but you could also pick one of them and used the 'replacedBy' construct. In that case, any initialConcentration or other attribute value would be taken from the submodel target of that replacedBy, instead of by the parent model. -Lucian On Tue, Jan 20, 2015 at 4:25 AM, Daniel Palm <pa...@gm...> wrote: > Dear all > > Suppose I have two external models that I cannot change (well, I can, but > it's undesirable for a number of reasons): > > model1: > > A -> B > > model 2: > > C -> D > > I want to combine these, but B and C are actually the same species and in > the same compartments. The final model should look like this > > model_combined: > > A -> C > C -> D > > with A in compartment 1 and C and D in compartment 2. > > Am I right that the only way would be to have model1 and model2 as > submodels of another model. And make a new compartment that replaces that > of B, C, and D, and make a new species C that replaces B and the old C? > > It would be nice if I could simply say somehow that C (model2) replaces B > (model1) and that the compartment of C replaces the compartment of B. Is > this possible? > > I would be grateful for any help. > > Best regards > Daniel > > -- > You received this message because you are subscribed to the Google Groups > "libsbml-development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to lib...@go.... > To post to this group, send email to lib...@go.... > To view this discussion on the web visit > https://groups.google.com/d/msgid/libsbml-development/4de5441e-6c12-4c35-ab4e-add00670f69e%40googlegroups.com > <https://groups.google.com/d/msgid/libsbml-development/4de5441e-6c12-4c35-ab4e-add00670f69e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > |