Permalink
Browse files

Merge pull request #148 from christophblessing/master

Progress on flattening
  • Loading branch information...
niko-rodrigue committed Apr 9, 2018
2 parents e1e0640 + 88adefc commit 46ca561edbca85a1f05f14dcc6e08acd65b2e235
Showing with 5,971 additions and 83 deletions.
  1. +83 −0 examples/resources/org/sbml/jsbml/comp/submodels_example.xml
  2. +53 −0 examples/test/src/org/sbml/jsbml/comp/CompFlattenExample.java
  3. +22 −0 extensions/comp/resources/testFlattening/test1.xml
  4. +42 −0 extensions/comp/resources/testFlattening/test10.xml
  5. +16 −0 extensions/comp/resources/testFlattening/test10_flat.xml
  6. +55 −0 extensions/comp/resources/testFlattening/test11.xml
  7. +24 −0 extensions/comp/resources/testFlattening/test11_flat.xml
  8. +63 −0 extensions/comp/resources/testFlattening/test12.xml
  9. +23 −0 extensions/comp/resources/testFlattening/test12_flat.xml
  10. +66 −0 extensions/comp/resources/testFlattening/test13.xml
  11. +22 −0 extensions/comp/resources/testFlattening/test13_flat.xml
  12. +76 −0 extensions/comp/resources/testFlattening/test14.xml
  13. +22 −0 extensions/comp/resources/testFlattening/test14_flat.xml
  14. +55 −0 extensions/comp/resources/testFlattening/test14_flat_definitions.xml
  15. +26 −0 extensions/comp/resources/testFlattening/test14_flat_ports.xml
  16. +59 −0 extensions/comp/resources/testFlattening/test14_flat_portsAndDefinitions.xml
  17. +32 −0 extensions/comp/resources/testFlattening/test15.xml
  18. +8 −0 extensions/comp/resources/testFlattening/test15_flat.xml
  19. +40 −0 extensions/comp/resources/testFlattening/test16.xml
  20. +8 −0 extensions/comp/resources/testFlattening/test16_flat.xml
  21. +30 −0 extensions/comp/resources/testFlattening/test17.xml
  22. +20 −0 extensions/comp/resources/testFlattening/test17_flat.xml
  23. +35 −0 extensions/comp/resources/testFlattening/test18.xml
  24. +25 −0 extensions/comp/resources/testFlattening/test18_flat.xml
  25. +38 −0 extensions/comp/resources/testFlattening/test19.xml
  26. +32 −0 extensions/comp/resources/testFlattening/test19_flat.xml
  27. +8 −0 extensions/comp/resources/testFlattening/test1_flat.xml
  28. +22 −0 extensions/comp/resources/testFlattening/test1_l3v2.xml
  29. +8 −0 extensions/comp/resources/testFlattening/test1_l3v2_flat.xml
  30. +22 −0 extensions/comp/resources/testFlattening/test2.xml
  31. +46 −0 extensions/comp/resources/testFlattening/test20.xml
  32. +38 −0 extensions/comp/resources/testFlattening/test20_flat.xml
  33. +40 −0 extensions/comp/resources/testFlattening/test21.xml
  34. +34 −0 extensions/comp/resources/testFlattening/test21_flat.xml
  35. +187 −0 extensions/comp/resources/testFlattening/test22.xml
  36. +203 −0 extensions/comp/resources/testFlattening/test22_flat.xml
  37. +171 −0 extensions/comp/resources/testFlattening/test23.xml
  38. +197 −0 extensions/comp/resources/testFlattening/test23_flat.xml
  39. +33 −0 extensions/comp/resources/testFlattening/test24.xml
  40. +30 −0 extensions/comp/resources/testFlattening/test24_flat.xml
  41. +50 −0 extensions/comp/resources/testFlattening/test25.xml
  42. +42 −0 extensions/comp/resources/testFlattening/test25_flat.xml
  43. +34 −0 extensions/comp/resources/testFlattening/test26.xml
  44. +24 −0 extensions/comp/resources/testFlattening/test26_flat.xml
  45. +37 −0 extensions/comp/resources/testFlattening/test27.xml
  46. +37 −0 extensions/comp/resources/testFlattening/test27_flat.xml
  47. +64 −0 extensions/comp/resources/testFlattening/test28.xml
  48. +101 −0 extensions/comp/resources/testFlattening/test28_flat.xml
  49. +41 −0 extensions/comp/resources/testFlattening/test29.xml
  50. +8 −0 extensions/comp/resources/testFlattening/test29_flat.xml
  51. +8 −0 extensions/comp/resources/testFlattening/test2_flat.xml
  52. +22 −0 extensions/comp/resources/testFlattening/test3.xml
  53. +47 −0 extensions/comp/resources/testFlattening/test30.xml
  54. +15 −0 extensions/comp/resources/testFlattening/test30_flat.xml
  55. +48 −0 extensions/comp/resources/testFlattening/test31.xml
  56. +15 −0 extensions/comp/resources/testFlattening/test31_flat.xml
  57. +49 −0 extensions/comp/resources/testFlattening/test32.xml
  58. +42 −0 extensions/comp/resources/testFlattening/test32_flat.xml
  59. +86 −0 extensions/comp/resources/testFlattening/test33.xml
  60. +22 −0 extensions/comp/resources/testFlattening/test33_flat.xml
  61. +59 −0 extensions/comp/resources/testFlattening/test34.xml
  62. +9 −0 extensions/comp/resources/testFlattening/test34_flat.xml
  63. +59 −0 extensions/comp/resources/testFlattening/test35.xml
  64. +39 −0 extensions/comp/resources/testFlattening/test35_flat.xml
  65. +59 −0 extensions/comp/resources/testFlattening/test36.xml
  66. +43 −0 extensions/comp/resources/testFlattening/test36_flat.xml
  67. +59 −0 extensions/comp/resources/testFlattening/test37.xml
  68. +43 −0 extensions/comp/resources/testFlattening/test37_flat.xml
  69. +61 −0 extensions/comp/resources/testFlattening/test38.xml
  70. +29 −0 extensions/comp/resources/testFlattening/test38_flat.xml
  71. +44 −0 extensions/comp/resources/testFlattening/test39.xml
  72. +30 −0 extensions/comp/resources/testFlattening/test39_flat.xml
  73. +8 −0 extensions/comp/resources/testFlattening/test3_flat.xml
  74. +22 −0 extensions/comp/resources/testFlattening/test4.xml
  75. +44 −0 extensions/comp/resources/testFlattening/test40.xml
  76. +30 −0 extensions/comp/resources/testFlattening/test40_flat.xml
  77. +40 −0 extensions/comp/resources/testFlattening/test41.xml
  78. +33 −0 extensions/comp/resources/testFlattening/test41_flat.xml
  79. +44 −0 extensions/comp/resources/testFlattening/test42.xml
  80. +8 −0 extensions/comp/resources/testFlattening/test42_flat.xml
  81. +50 −0 extensions/comp/resources/testFlattening/test43.xml
  82. +15 −0 extensions/comp/resources/testFlattening/test43_flat.xml
  83. +47 −0 extensions/comp/resources/testFlattening/test44.xml
  84. +46 −0 extensions/comp/resources/testFlattening/test44_flat.xml
  85. +39 −0 extensions/comp/resources/testFlattening/test45.xml
  86. +41 −0 extensions/comp/resources/testFlattening/test45_flat.xml
  87. +47 −0 extensions/comp/resources/testFlattening/test46.xml
  88. +54 −0 extensions/comp/resources/testFlattening/test46_flat.xml
  89. +48 −0 extensions/comp/resources/testFlattening/test47.xml
  90. +55 −0 extensions/comp/resources/testFlattening/test47_flat.xml
  91. +43 −0 extensions/comp/resources/testFlattening/test48.xml
  92. +42 −0 extensions/comp/resources/testFlattening/test48_flat.xml
  93. +69 −0 extensions/comp/resources/testFlattening/test49.xml
  94. +41 −0 extensions/comp/resources/testFlattening/test49_flat.xml
  95. +8 −0 extensions/comp/resources/testFlattening/test4_flat.xml
  96. +25 −0 extensions/comp/resources/testFlattening/test5.xml
  97. +70 −0 extensions/comp/resources/testFlattening/test50.xml
  98. +46 −0 extensions/comp/resources/testFlattening/test50_flat.xml
  99. +65 −0 extensions/comp/resources/testFlattening/test51.xml
  100. +34 −0 extensions/comp/resources/testFlattening/test51_flat.xml
  101. +41 −0 extensions/comp/resources/testFlattening/test52.xml
  102. +11 −0 extensions/comp/resources/testFlattening/test52_flat.xml
  103. +41 −0 extensions/comp/resources/testFlattening/test53.xml
  104. +11 −0 extensions/comp/resources/testFlattening/test53_flat.xml
  105. +29 −0 extensions/comp/resources/testFlattening/test54.xml
  106. +8 −0 extensions/comp/resources/testFlattening/test54_flat.xml
  107. +54 −0 extensions/comp/resources/testFlattening/test55.xml
  108. +18 −0 extensions/comp/resources/testFlattening/test55_flat.xml
  109. +61 −0 extensions/comp/resources/testFlattening/test56.xml
  110. +25 −0 extensions/comp/resources/testFlattening/test56_flat.xml
  111. +67 −0 extensions/comp/resources/testFlattening/test57.xml
  112. +36 −0 extensions/comp/resources/testFlattening/test57_flat.xml
  113. +66 −0 extensions/comp/resources/testFlattening/test58.xml
  114. +36 −0 extensions/comp/resources/testFlattening/test58_flat.xml
  115. +64 −0 extensions/comp/resources/testFlattening/test59.xml
  116. +36 −0 extensions/comp/resources/testFlattening/test59_flat.xml
  117. +8 −0 extensions/comp/resources/testFlattening/test5_flat.xml
  118. +26 −0 extensions/comp/resources/testFlattening/test6.xml
  119. +50 −0 extensions/comp/resources/testFlattening/test60.xml
  120. +19 −0 extensions/comp/resources/testFlattening/test60_flat.xml
  121. +79 −0 extensions/comp/resources/testFlattening/test61.xml
  122. +61 −0 extensions/comp/resources/testFlattening/test61_flat.xml
  123. +58 −0 extensions/comp/resources/testFlattening/test62.xml
  124. +35 −0 extensions/comp/resources/testFlattening/test62_flat.xml
  125. +9 −0 extensions/comp/resources/testFlattening/test6_flat.xml
  126. +52 −0 extensions/comp/resources/testFlattening/test7.xml
  127. +35 −0 extensions/comp/resources/testFlattening/test7_flat.xml
  128. +55 −0 extensions/comp/resources/testFlattening/test8.xml
  129. +35 −0 extensions/comp/resources/testFlattening/test8_flat.xml
  130. +36 −0 extensions/comp/resources/testFlattening/test9.xml
  131. +17 −0 extensions/comp/resources/testFlattening/test9_flat.xml
  132. +281 −74 extensions/comp/src/org/sbml/jsbml/ext/comp/util/CompFlatteningConverter.java
  133. +57 −9 extensions/comp/test/org/sbml/jsbml/ext/comp/test/CompFlattenTest.java
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created by libAntimony version v2.7.0 on 2018-01-03 13:21 with libSBML version 5.11.3. -->
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:comp="http://www.sbml.org/sbml/level3/version1/comp/version1" level="3" version="1" comp:required="true">
<model id="m" name="m">
<listOfCompartments>
<compartment sboTerm="SBO:0000410" id="default_compartment" spatialDimensions="3" size="1" constant="true">
<comp:listOfReplacedElements>
<comp:replacedElement comp:idRef="default_compartment" comp:submodelRef="Submodel1"/>
</comp:listOfReplacedElements>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species id="a" compartment="default_compartment" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="b" compartment="default_compartment" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="c" compartment="default_compartment" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<listOfReactions>
<reaction id="_J0" reversible="true" fast="false">
<listOfReactants>
<speciesReference species="a" stoichiometry="1" constant="true"/>
<speciesReference species="b" stoichiometry="1" constant="true"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="c" stoichiometry="1" constant="true"/>
</listOfProducts>
</reaction>
</listOfReactions>
<comp:listOfSubmodels>
<comp:submodel comp:id="Submodel1" comp:modelRef="submodel1"/>
</comp:listOfSubmodels>
</model>
<comp:listOfModelDefinitions>
<comp:modelDefinition id="submodel2" name="submodel2">
<listOfCompartments>
<compartment sboTerm="SBO:0000410" id="default_compartment" spatialDimensions="3" size="1" constant="true"/>
</listOfCompartments>
<listOfSpecies>
<species id="g" compartment="default_compartment" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="h" compartment="default_compartment" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="i" compartment="default_compartment" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<listOfReactions>
<reaction id="_J0" reversible="true" fast="false">
<listOfReactants>
<speciesReference species="g" stoichiometry="1" constant="true"/>
<speciesReference species="h" stoichiometry="1" constant="true"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="i" stoichiometry="1" constant="true"/>
</listOfProducts>
</reaction>
</listOfReactions>
</comp:modelDefinition>
<comp:modelDefinition id="submodel1" name="submodel1">
<listOfCompartments>
<compartment sboTerm="SBO:0000410" id="default_compartment" spatialDimensions="3" size="1" constant="true">
<comp:listOfReplacedElements>
<comp:replacedElement comp:idRef="default_compartment" comp:submodelRef="Submodel2"/>
</comp:listOfReplacedElements>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species id="d" compartment="default_compartment" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="e" compartment="default_compartment" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="f" compartment="default_compartment" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<listOfReactions>
<reaction id="_J0" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="d" stoichiometry="1" constant="true"/>
<speciesReference species="e" stoichiometry="1" constant="true"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="f" stoichiometry="1" constant="true"/>
</listOfProducts>
</reaction>
</listOfReactions>
<comp:listOfSubmodels>
<comp:submodel comp:id="Submodel2" comp:modelRef="submodel2"/>
</comp:listOfSubmodels>
</comp:modelDefinition>
</comp:listOfModelDefinitions>
</sbml>
@@ -0,0 +1,53 @@
/*
* ----------------------------------------------------------------------------
* This file is part of JSBML. Please visit <http://sbml.org/Software/JSBML>
* for the latest version of JSBML and more information about SBML.
*
* Copyright (C) 2009-2018 jointly by the following organizations:
* 1. The University of Tuebingen, Germany
* 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
* 3. The California Institute of Technology, Pasadena, CA, USA
* 4. The University of California, San Diego, La Jolla, CA, USA
* 5. The Babraham Institute, Cambridge, UK
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation. A copy of the license agreement is provided
* in the file named "LICENSE.txt" included with this software distribution
* and also available online as <http://sbml.org/Software/JSBML/License>.
* ----------------------------------------------------------------------------
*/
package org.sbml.jsbml.comp;
import org.sbml.jsbml.SBMLDocument;
import org.sbml.jsbml.SBMLReader;
import org.sbml.jsbml.SBMLWriter;
import org.sbml.jsbml.ext.comp.util.CompFlatteningConverter;
import javax.xml.stream.XMLStreamException;
import java.io.File;
import java.io.IOException;
/**
* @author Christoph Blessing
*/
public class CompFlattenExample {
public static void main(String[] args) throws IOException, XMLStreamException {
File file = new File("examples/resources/org/sbml/jsbml/comp/submodels_example.xml");
SBMLReader reader = new SBMLReader();
SBMLDocument document = reader.readSBML(file);
CompFlatteningConverter compFlatteningConverter = new CompFlatteningConverter();
SBMLDocument flattendSBML = compFlatteningConverter.flatten(document);
SBMLWriter.write(flattendSBML, System.out, ' ', (short) 2);
}
}
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:comp="http://www.sbml.org/sbml/level3/version1/comp/version1" level="3" version="1" comp:required="true">
<model>
<listOfParameters>
<parameter id="param1" constant="true">
<comp:listOfReplacedElements>
<comp:replacedElement comp:idRef="subparam1" comp:submodelRef="submod1"/>
</comp:listOfReplacedElements>
</parameter>
</listOfParameters>
<comp:listOfSubmodels>
<comp:submodel comp:id="submod1" comp:modelRef="Mod1"/>
</comp:listOfSubmodels>
</model>
<comp:listOfModelDefinitions>
<comp:modelDefinition id="Mod1">
<listOfParameters>
<parameter id="subparam1" constant="true"/>
</listOfParameters>
</comp:modelDefinition>
</comp:listOfModelDefinitions>
</sbml>
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:comp="http://www.sbml.org/sbml/level3/version1/comp/version1" level="3" version="1" comp:required="true">
<model>
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="10" constant="false">
<comp:listOfReplacedElements>
<comp:replacedElement comp:idRef="sub1" comp:submodelRef="sub2">
<comp:sBaseRef comp:idRef="C"/>
</comp:replacedElement>
</comp:listOfReplacedElements>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="5" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<comp:listOfSubmodels>
<comp:submodel comp:id="sub1" comp:modelRef="moddef1"/>
<comp:submodel comp:id="sub2" comp:modelRef="moddef2"/>
</comp:listOfSubmodels>
</model>
<comp:listOfModelDefinitions>
<comp:modelDefinition id="moddef1">
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="1" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
</comp:modelDefinition>
<comp:modelDefinition id="moddef2">
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="1" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="9" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<comp:listOfSubmodels>
<comp:submodel comp:id="sub1" comp:modelRef="moddef1"/>
</comp:listOfSubmodels>
</comp:modelDefinition>
</comp:listOfModelDefinitions>
</sbml>
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" level="3" version="1">
<model>
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="10" constant="false"/>
<compartment id="sub1__C" spatialDimensions="3" size="1" constant="false"/>
<compartment id="sub2__C" spatialDimensions="3" size="1" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="5" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub1__S1" compartment="sub1__C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub2__S1" compartment="sub2__C" initialAmount="9" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub2__sub1__S1" compartment="C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
</model>
</sbml>
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:comp="http://www.sbml.org/sbml/level3/version1/comp/version1" level="3" version="1" comp:required="true">
<model>
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="10" constant="false">
<comp:listOfReplacedElements>
<comp:replacedElement comp:idRef="sub1" comp:submodelRef="sub2">
<comp:sBaseRef comp:idRef="C"/>
</comp:replacedElement>
</comp:listOfReplacedElements>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="5" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<comp:listOfSubmodels>
<comp:submodel comp:id="sub1" comp:modelRef="moddef1"/>
<comp:submodel comp:id="sub2" comp:modelRef="moddef2"/>
<comp:submodel comp:id="sub3" comp:modelRef="moddef3"/>
</comp:listOfSubmodels>
</model>
<comp:listOfModelDefinitions>
<comp:modelDefinition id="moddef1">
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="1" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
</comp:modelDefinition>
<comp:modelDefinition id="moddef2">
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="1" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="9" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<comp:listOfSubmodels>
<comp:submodel comp:id="sub1" comp:modelRef="moddef1"/>
</comp:listOfSubmodels>
</comp:modelDefinition>
<comp:modelDefinition id="moddef3">
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="1" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="11" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<comp:listOfSubmodels>
<comp:submodel comp:id="sub1" comp:modelRef="moddef1"/>
<comp:submodel comp:id="sub2" comp:modelRef="moddef2"/>
</comp:listOfSubmodels>
</comp:modelDefinition>
</comp:listOfModelDefinitions>
</sbml>
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" level="3" version="1">
<model>
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="10" constant="false"/>
<compartment id="sub1__C" spatialDimensions="3" size="1" constant="false"/>
<compartment id="sub2__C" spatialDimensions="3" size="1" constant="false"/>
<compartment id="sub3__C" spatialDimensions="3" size="1" constant="false"/>
<compartment id="sub3__sub1__C" spatialDimensions="3" size="1" constant="false"/>
<compartment id="sub3__sub2__C" spatialDimensions="3" size="1" constant="false"/>
<compartment id="sub3__sub2__sub1__C" spatialDimensions="3" size="1" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="5" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub1__S1" compartment="sub1__C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub2__S1" compartment="sub2__C" initialAmount="9" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub2__sub1__S1" compartment="C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub3__S1" compartment="sub3__C" initialAmount="11" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub3__sub1__S1" compartment="sub3__sub1__C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub3__sub2__S1" compartment="sub3__sub2__C" initialAmount="9" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub3__sub2__sub1__S1" compartment="sub3__sub2__sub1__C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
</model>
</sbml>
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:comp="http://www.sbml.org/sbml/level3/version1/comp/version1" level="3" version="1" comp:required="true">
<model>
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="10" constant="false">
<comp:listOfReplacedElements>
<comp:replacedElement comp:idRef="sub1" comp:submodelRef="sub2">
<comp:sBaseRef comp:idRef="C"/>
</comp:replacedElement>
</comp:listOfReplacedElements>
</compartment>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="5" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false">
<comp:listOfReplacedElements>
<comp:replacedElement comp:idRef="sub2" comp:submodelRef="sub3">
<comp:sBaseRef comp:idRef="sub1">
<comp:sBaseRef comp:idRef="S1"/>
</comp:sBaseRef>
</comp:replacedElement>
</comp:listOfReplacedElements>
</species>
</listOfSpecies>
<comp:listOfSubmodels>
<comp:submodel comp:id="sub1" comp:modelRef="moddef1"/>
<comp:submodel comp:id="sub2" comp:modelRef="moddef2"/>
<comp:submodel comp:id="sub3" comp:modelRef="moddef3"/>
</comp:listOfSubmodels>
</model>
<comp:listOfModelDefinitions>
<comp:modelDefinition id="moddef1">
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="1" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
</comp:modelDefinition>
<comp:modelDefinition id="moddef2">
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="1" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="9" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<comp:listOfSubmodels>
<comp:submodel comp:id="sub1" comp:modelRef="moddef1"/>
</comp:listOfSubmodels>
</comp:modelDefinition>
<comp:modelDefinition id="moddef3">
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="1" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="11" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
<comp:listOfSubmodels>
<comp:submodel comp:id="sub1" comp:modelRef="moddef1"/>
<comp:submodel comp:id="sub2" comp:modelRef="moddef2"/>
</comp:listOfSubmodels>
</comp:modelDefinition>
</comp:listOfModelDefinitions>
</sbml>
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" level="3" version="1">
<model>
<listOfCompartments>
<compartment id="C" spatialDimensions="3" size="10" constant="false"/>
<compartment id="sub1__C" spatialDimensions="3" size="1" constant="false"/>
<compartment id="sub2__C" spatialDimensions="3" size="1" constant="false"/>
<compartment id="sub3__C" spatialDimensions="3" size="1" constant="false"/>
<compartment id="sub3__sub1__C" spatialDimensions="3" size="1" constant="false"/>
<compartment id="sub3__sub2__C" spatialDimensions="3" size="1" constant="false"/>
<compartment id="sub3__sub2__sub1__C" spatialDimensions="3" size="1" constant="false"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" compartment="C" initialAmount="5" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub1__S1" compartment="sub1__C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub2__S1" compartment="sub2__C" initialAmount="9" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub2__sub1__S1" compartment="C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub3__S1" compartment="sub3__C" initialAmount="11" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub3__sub1__S1" compartment="sub3__sub1__C" initialAmount="7" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
<species id="sub3__sub2__S1" compartment="sub3__sub2__C" initialAmount="9" hasOnlySubstanceUnits="false" boundaryCondition="false" constant="false"/>
</listOfSpecies>
</model>
</sbml>
Oops, something went wrong.

0 comments on commit 46ca561

Please sign in to comment.