From: <lea...@us...> - 2015-11-25 16:29:17
|
Revision: 2406 http://sourceforge.net/p/jsbml/code/2406 Author: leandrohw Date: 2015-11-25 16:29:13 +0000 (Wed, 25 Nov 2015) Log Message: ----------- Fixed problem with org.sbml.jsbml.ext.arrays.test.CompilerTest.testVectorMinus Modified Paths: -------------- trunk/extensions/arrays/src/org/sbml/jsbml/ext/arrays/compiler/VectorCompiler.java trunk/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/ArraysJUnitTests.java trunk/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/FlatteningTest.java trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/VoteModel.xml Added Paths: ----------- trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/and.xml trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/example04.xml trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/toggleSwitch.xml Modified: trunk/extensions/arrays/src/org/sbml/jsbml/ext/arrays/compiler/VectorCompiler.java =================================================================== --- trunk/extensions/arrays/src/org/sbml/jsbml/ext/arrays/compiler/VectorCompiler.java 2015-11-23 09:10:55 UTC (rev 2405) +++ trunk/extensions/arrays/src/org/sbml/jsbml/ext/arrays/compiler/VectorCompiler.java 2015-11-25 16:29:13 UTC (rev 2406) @@ -3169,19 +3169,23 @@ plus(negValues); ASTNode plus = getNode(); - ASTNode minus = new ASTNode(ASTNode.Type.MINUS); - if(plus.getChildCount() > 0) { - minus.addChild(plus.getChild(0)); + setNode(plus); + if(useId) + { + ASTNode minus = new ASTNode(ASTNode.Type.MINUS); + if(plus.getChildCount() > 0) { + minus.addChild(plus.getChild(0)); - for(int i = 1; i < plus.getChildCount(); i++) - { - if(plus.getChild(i).getType() == ASTNode.Type.MINUS && plus.getChild(i).getChildCount() == 1) + for(int i = 1; i < plus.getChildCount(); i++) { - minus.addChild(plus.getChild(i).getChild(0)); + if(plus.getChild(i).getType() == ASTNode.Type.MINUS && plus.getChild(i).getChildCount() == 1) + { + minus.addChild(plus.getChild(i).getChild(0)); + } } + + setNode(minus); } - - setNode(minus); } return dummy; } @@ -3688,11 +3692,11 @@ double result = 0; node.getChildren().clear(); - + if (! node.getType().equals(ASTNode.Type.PLUS)) { node.setType(ASTNode.Type.PLUS); } - + if (values.size() > 0) { for (int i = 0; i < values.size(); ++i) { ASTNode value = values.get(i); Modified: trunk/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/ArraysJUnitTests.java =================================================================== --- trunk/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/ArraysJUnitTests.java 2015-11-23 09:10:55 UTC (rev 2405) +++ trunk/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/ArraysJUnitTests.java 2015-11-25 16:29:13 UTC (rev 2406) @@ -35,6 +35,6 @@ */ @RunWith(value=Suite.class) @SuiteClasses(value={ArrayExtensionTest.class, ArraysWriteTest.class, MathTest.class, ArraysValidationTest.class, - CompilerTest.class}) + CompilerTest.class, FlatteningTest.class}) public class ArraysJUnitTests { } Modified: trunk/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/FlatteningTest.java =================================================================== --- trunk/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/FlatteningTest.java 2015-11-23 09:10:55 UTC (rev 2405) +++ trunk/extensions/arrays/test/org/sbml/jsbml/ext/arrays/test/FlatteningTest.java 2015-11-25 16:29:13 UTC (rev 2406) @@ -60,6 +60,42 @@ */ public class FlatteningTest { + + @Test + public void sizeZeroTest() { + try { + SBMLDocument document = new SBMLDocument(3,1); + + Model model = document.createModel(); + + Species spec = model.createSpecies("s"); + + Parameter param = model.createParameter("n"); + + param.setConstant(true); + + param.setValue(0); + + ArraysSBasePlugin arraysSBasePlugin = new ArraysSBasePlugin(spec); + + spec.addExtension(ArraysConstants.shortLabel, arraysSBasePlugin); + + Dimension dim = arraysSBasePlugin.createDimension("i"); + + dim.setArrayDimension(0); + + dim.setSize("n"); + + SBMLDocument flattened = ArraysFlattening.convert(document); + + assertTrue(flattened.getModel().getSpeciesCount() == 0); + + } catch (SBMLException e) { + assertTrue(false); + e.printStackTrace(); + } + } + /** * */ @@ -538,12 +574,12 @@ inda.setReferencedAttribute("species"); inda.setArrayDimension(0); inda.setMath(ASTNode.parseFormula("j")); - + Index impa = arraysSBasePlugina.createIndex(); impa.setReferencedAttribute("id"); impa.setArrayDimension(0); impa.setMath(ASTNode.parseFormula("j")); - + SpeciesReference b = r.createProduct(B); b.setId("b"); ArraysSBasePlugin arraysSBasePluginb = new ArraysSBasePlugin(b); @@ -559,7 +595,7 @@ impb.setReferencedAttribute("id"); impb.setArrayDimension(0); impb.setMath(ASTNode.parseFormula("j")); - + SBMLWriter.write(doc, System.out, ' ', (short) 2); System.out.println("\n-------------------------------------------"); SBMLDocument flattened = ArraysFlattening.convert(doc); @@ -712,11 +748,11 @@ SBMLDocument doc; try { doc = SBMLReader.read(ArraysWriteTest.class.getResourceAsStream("/org/sbml/jsbml/xml/test/data/arrays/VoteModel.xml")); - SBMLWriter.write(doc, System.out, ' ', (short) 2); - SBMLDocument flattened = ArraysFlattening.convert(doc); + //SBMLWriter.write(doc, System.out, ' ', (short) 2); + //SBMLDocument flattened = ArraysFlattening.convert(doc); + //SBMLWriter.write(flattened, System.out, ' ', (short) 2); + ArraysFlattening.convert(doc); - SBMLWriter.write(flattened, System.out, ' ', (short) 2); - } catch (XMLStreamException e) { assertTrue(false); } @@ -749,29 +785,96 @@ doc = SBMLReader.read(ArraysWriteTest.class.getResourceAsStream("/org/sbml/jsbml/xml/test/data/arrays/layoutTest.xml")); SBMLWriter.write(doc, System.out, ' ', (short) 2); SBMLDocument flattened = ArraysFlattening.convert(doc); - + SBMLWriter.write(flattened, System.out, ' ', (short) 2); } catch (XMLStreamException e) { assertTrue(false); } - + } + +// @Test +// public void testMetaIdRef() { +// SBMLDocument doc; +// try { +// doc = SBMLReader.read(ArraysWriteTest.class.getResourceAsStream("/org/sbml/jsbml/xml/test/data/arrays/xyz.xml")); +// SBMLWriter.write(doc, System.out, ' ', (short) 2); +// SBMLDocument flattened = ArraysFlattening.convert(doc); +// +// SBMLWriter.write(flattened, System.out, ' ', (short) 2); +// +// } catch (XMLStreamException e) { +// assertTrue(false); +// } +// +// } + + @Test + public void getmodel() { + SBMLDocument doc; + try { + doc = SBMLReader.read(ArraysWriteTest.class.getResourceAsStream("/org/sbml/jsbml/xml/test/data/arrays/example04.xml")); + SBMLWriter.write(doc, System.out, ' ', (short) 2); + SBMLDocument flattened = ArraysFlattening.convert(doc); + + SBMLWriter.write(flattened, System.out, ' ', (short) 2); + + } catch (XMLStreamException e) { + assertTrue(false); + } + + } + +// @Test +// public void testASTNodeType() +// { +// SBMLDocument doc = new SBMLDocument(3,1); +// Model model = doc.createModel("foo"); +// FunctionDefinition function = model.createFunctionDefinition("uniform"); +// Constraint c = model.createConstraint(); +// try { +// function.setMath(ASTNode.parseFormula("lambda(a,b,(a+b)/2)")); +// c.setMath(ASTNode.parseFormula("uniform(0,1) > 0.5")); +// } +// catch (ParseException e1) { +// assertTrue(false); +// } +// System.out.println(c.getMath().toString()); +// doc = ArraysFlattening.convert(model.getSBMLDocument()); +// assertTrue(c.getMath().getType() == doc.getModel().getConstraint(0).getMath().getType()); +// } @Test - public void testMetaIdRef() { + public void testTime() { SBMLDocument doc; try { - doc = SBMLReader.read(ArraysWriteTest.class.getResourceAsStream("/org/sbml/jsbml/xml/test/data/arrays/xyz.xml")); + doc = SBMLReader.read(ArraysWriteTest.class.getResourceAsStream("/org/sbml/jsbml/xml/test/data/arrays/and.xml")); SBMLWriter.write(doc, System.out, ' ', (short) 2); SBMLDocument flattened = ArraysFlattening.convert(doc); - + SBMLWriter.write(flattened, System.out, ' ', (short) 2); } catch (XMLStreamException e) { assertTrue(false); } - + } + + @Test + public void toggleTime() { + SBMLDocument doc; + try { + doc = SBMLReader.read(ArraysWriteTest.class.getResourceAsStream("/org/sbml/jsbml/xml/test/data/arrays/toggleSwitch.xml")); + SBMLWriter.write(doc, System.out, ' ', (short) 2); + SBMLDocument flattened = ArraysFlattening.convert(doc); + + SBMLWriter.write(flattened, System.out, ' ', (short) 2); + + } catch (XMLStreamException e) { + assertTrue(false); + } + + } } Modified: trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/VoteModel.xml =================================================================== --- trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/VoteModel.xml 2015-11-23 09:10:55 UTC (rev 2405) +++ trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/VoteModel.xml 2015-11-25 16:29:13 UTC (rev 2406) @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='UTF-8' standalone='no'?> <sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1" level="3" arrays:required="true" fbc:required="false" xmlns:comp="http://www.sbml.org/sbml/level3/version1/comp/version1" xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version1" comp:required="true" xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1" version="1" layout:required="false"> - <model id="VoteModel" metaid="iBioSim4"> +<model id="VoteModel" metaid="iBioSim4"> <listOfFunctionDefinitions> <functionDefinition id="uniform" name="Uniform distribution"> <math xmlns="http://www.w3.org/1998/Math/MathML"> Added: trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/and.xml =================================================================== --- trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/and.xml (rev 0) +++ trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/and.xml 2015-11-25 16:29:13 UTC (rev 2406) @@ -0,0 +1,564 @@ +<?xml version='1.0' encoding='UTF-8' standalone='no'?> +<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1" level="3" arrays:required="true" fbc:required="false" xmlns:comp="http://www.sbml.org/sbml/level3/version1/comp/version1" xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version1" comp:required="true" xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1" version="1" layout:required="false"> + <model id="and" metaid="iBioSim46"> + <comp:listOfPorts xmlns:comp="http://www.sbml.org/sbml/level3/version1/comp/version1"> + <comp:port comp:idRef="Cell" sboTerm="SBO:0000601" comp:id="compartment__Cell"/> + <comp:port comp:idRef="CI" sboTerm="SBO:0000601" comp:id="output__CI"/> + <comp:port comp:idRef="Degradation_CI" sboTerm="SBO:0000601" comp:id="Degradation_CI"/> + <comp:port comp:idRef="GFP" sboTerm="SBO:0000601" comp:id="output__GFP"/> + <comp:port comp:idRef="Degradation_GFP" sboTerm="SBO:0000601" comp:id="Degradation_GFP"/> + <comp:port comp:idRef="LacI" sboTerm="SBO:0000600" comp:id="input__LacI"/> + <comp:port comp:idRef="Degradation_LacI" sboTerm="SBO:0000601" comp:id="Degradation_LacI"/> + <comp:port comp:idRef="TetR" sboTerm="SBO:0000600" comp:id="input__TetR"/> + <comp:port comp:idRef="Degradation_TetR" sboTerm="SBO:0000601" comp:id="Degradation_TetR"/> + </comp:listOfPorts> + <layout:listOfLayouts xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <layout:layout layout:id="iBioSim"> + <layout:dimensions layout:width="1070" layout:height="425" layout:depth="0"/> + <layout:listOfAdditionalGraphicalObjects> + <layout:generalGlyph layout:reference="event0" layout:id="Glyph__event0"> + <layout:boundingBox> + <layout:position layout:x="12.5" layout:y="0"/> + <layout:dimensions layout:width="75" layout:height="25"/> + </layout:boundingBox> + <layout:listOfReferenceGlyphs> + <layout:referenceGlyph layout:id="Glyph__event0__product__TetR" layout:role="product" layout:glyph="Glyph__TetR"> + <layout:curve> + <layout:listOfCurveSegments> + <layout:curveSegment xsi:type="LineSegment"> + <layout:start layout:x="50" layout:y="12.5"/> + <layout:end layout:x="50" layout:y="91.4775390625"/> + </layout:curveSegment> + </layout:listOfCurveSegments> + </layout:curve> + </layout:referenceGlyph> + </layout:listOfReferenceGlyphs> + </layout:generalGlyph> + <layout:generalGlyph layout:reference="event1" layout:id="Glyph__event1"> + <layout:boundingBox> + <layout:position layout:x="142.5" layout:y="0"/> + <layout:dimensions layout:width="75" layout:height="25"/> + </layout:boundingBox> + <layout:listOfReferenceGlyphs> + <layout:referenceGlyph layout:id="Glyph__event1__product__LacI" layout:role="product" layout:glyph="Glyph__LacI"> + <layout:curve> + <layout:listOfCurveSegments> + <layout:curveSegment xsi:type="LineSegment"> + <layout:start layout:x="180" layout:y="12.5"/> + <layout:end layout:x="180" layout:y="91.4775390625"/> + </layout:curveSegment> + </layout:listOfCurveSegments> + </layout:curve> + </layout:referenceGlyph> + </layout:listOfReferenceGlyphs> + </layout:generalGlyph> + </layout:listOfAdditionalGraphicalObjects> + <layout:listOfCompartmentGlyphs> + <layout:compartmentGlyph layout:id="Glyph__Cell" layout:compartment="Cell"> + <layout:boundingBox> + <layout:position layout:x="0" layout:y="0"/> + <layout:dimensions layout:width="1070" layout:height="425"/> + </layout:boundingBox> + </layout:compartmentGlyph> + </layout:listOfCompartmentGlyphs> + <layout:listOfSpeciesGlyphs> + <layout:speciesGlyph layout:id="Glyph__CI" layout:species="CI"> + <layout:boundingBox> + <layout:position layout:x="65" layout:y="159.4326171875"/> + <layout:dimensions layout:width="100" layout:height="30"/> + </layout:boundingBox> + </layout:speciesGlyph> + <layout:speciesGlyph layout:id="Glyph__GFP" layout:species="GFP"> + <layout:boundingBox> + <layout:position layout:x="65" layout:y="242.3876953125"/> + <layout:dimensions layout:width="100" layout:height="30"/> + </layout:boundingBox> + </layout:speciesGlyph> + <layout:speciesGlyph layout:id="Glyph__LacI" layout:species="LacI"> + <layout:boundingBox> + <layout:position layout:x="130" layout:y="76.4775390625"/> + <layout:dimensions layout:width="100" layout:height="30"/> + </layout:boundingBox> + </layout:speciesGlyph> + <layout:speciesGlyph layout:id="Glyph__TetR" layout:species="TetR"> + <layout:boundingBox> + <layout:position layout:x="0" layout:y="76.4775390625"/> + <layout:dimensions layout:width="100" layout:height="30"/> + </layout:boundingBox> + </layout:speciesGlyph> + </layout:listOfSpeciesGlyphs> + <layout:listOfReactionGlyphs> + <layout:reactionGlyph layout:id="Glyph__CI__repression__GFP"> + <layout:boundingBox> + <layout:position layout:x="115" layout:y="257.3876953125"/> + <layout:dimensions layout:width="0" layout:height="0"/> + </layout:boundingBox> + <layout:listOfSpeciesReferenceGlyphs> + <layout:speciesReferenceGlyph layout:id="ReferenceGlyph__CI__repression__GFP" layout:role="product" layout:speciesGlyph="Glyph__GFP"> + <layout:curve> + <layout:listOfCurveSegments> + <layout:curveSegment xsi:type="LineSegment"> + <layout:start layout:x="115" layout:y="174.4326171875"/> + <layout:end layout:x="115" layout:y="257.3876953125"/> + </layout:curveSegment> + </layout:listOfCurveSegments> + </layout:curve> + </layout:speciesReferenceGlyph> + </layout:listOfSpeciesReferenceGlyphs> + </layout:reactionGlyph> + <layout:reactionGlyph layout:id="Glyph__LacI__repression__CI"> + <layout:boundingBox> + <layout:position layout:x="115" layout:y="174.4326171875"/> + <layout:dimensions layout:width="0" layout:height="0"/> + </layout:boundingBox> + <layout:listOfSpeciesReferenceGlyphs> + <layout:speciesReferenceGlyph layout:id="ReferenceGlyph__LacI__repression__CI" layout:role="product" layout:speciesGlyph="Glyph__CI"> + <layout:curve> + <layout:listOfCurveSegments> + <layout:curveSegment xsi:type="LineSegment"> + <layout:start layout:x="180" layout:y="91.4775390625"/> + <layout:end layout:x="115" layout:y="174.4326171875"/> + </layout:curveSegment> + </layout:listOfCurveSegments> + </layout:curve> + </layout:speciesReferenceGlyph> + </layout:listOfSpeciesReferenceGlyphs> + </layout:reactionGlyph> + <layout:reactionGlyph layout:id="Glyph__TetR__repression__CI"> + <layout:boundingBox> + <layout:position layout:x="115" layout:y="174.4326171875"/> + <layout:dimensions layout:width="0" layout:height="0"/> + </layout:boundingBox> + <layout:listOfSpeciesReferenceGlyphs> + <layout:speciesReferenceGlyph layout:id="ReferenceGlyph__TetR__repression__CI" layout:role="product" layout:speciesGlyph="Glyph__CI"> + <layout:curve> + <layout:listOfCurveSegments> + <layout:curveSegment xsi:type="LineSegment"> + <layout:start layout:x="50" layout:y="91.4775390625"/> + <layout:end layout:x="115" layout:y="174.4326171875"/> + </layout:curveSegment> + </layout:listOfCurveSegments> + </layout:curve> + </layout:speciesReferenceGlyph> + </layout:listOfSpeciesReferenceGlyphs> + </layout:reactionGlyph> + </layout:listOfReactionGlyphs> + <layout:listOfTextGlyphs> + <layout:textGlyph layout:graphicalObject="Glyph__Cell" layout:id="TextGlyph__Cell" layout:text="Cell"> + <layout:boundingBox> + <layout:position layout:x="0" layout:y="0"/> + <layout:dimensions layout:width="1070" layout:height="425"/> + </layout:boundingBox> + </layout:textGlyph> + <layout:textGlyph layout:graphicalObject="Glyph__CI" layout:id="TextGlyph__CI" layout:text="CI"> + <layout:boundingBox> + <layout:position layout:x="65" layout:y="159.4326171875"/> + <layout:dimensions layout:width="100" layout:height="30"/> + </layout:boundingBox> + </layout:textGlyph> + <layout:textGlyph layout:graphicalObject="Glyph__GFP" layout:id="TextGlyph__GFP" layout:text="GFP"> + <layout:boundingBox> + <layout:position layout:x="65" layout:y="242.3876953125"/> + <layout:dimensions layout:width="100" layout:height="30"/> + </layout:boundingBox> + </layout:textGlyph> + <layout:textGlyph layout:graphicalObject="Glyph__LacI" layout:id="TextGlyph__LacI" layout:text="LacI"> + <layout:boundingBox> + <layout:position layout:x="130" layout:y="76.4775390625"/> + <layout:dimensions layout:width="100" layout:height="30"/> + </layout:boundingBox> + </layout:textGlyph> + <layout:textGlyph layout:graphicalObject="Glyph__TetR" layout:id="TextGlyph__TetR" layout:text="TetR"> + <layout:boundingBox> + <layout:position layout:x="0" layout:y="76.4775390625"/> + <layout:dimensions layout:width="100" layout:height="30"/> + </layout:boundingBox> + </layout:textGlyph> + <layout:textGlyph layout:graphicalObject="Glyph__event0" layout:id="TextGlyph__event0" layout:text="event0"> + <layout:boundingBox> + <layout:position layout:x="12.5" layout:y="0"/> + <layout:dimensions layout:width="75" layout:height="25"/> + </layout:boundingBox> + </layout:textGlyph> + <layout:textGlyph layout:graphicalObject="Glyph__event1" layout:id="TextGlyph__event1" layout:text="event1"> + <layout:boundingBox> + <layout:position layout:x="142.5" layout:y="0"/> + <layout:dimensions layout:width="75" layout:height="25"/> + </layout:boundingBox> + </layout:textGlyph> + </layout:listOfTextGlyphs> + </layout:layout> + </layout:listOfLayouts> + <listOfCompartments> + <compartment id="Cell" constant="true" spatialDimensions="3" size="1"/> + </listOfCompartments> + <listOfSpecies> + <species id="CI" constant="false" initialAmount="0" hasOnlySubstanceUnits="true" metaid="iBioSim31" boundaryCondition="false" compartment="Cell"/> + <species id="GFP" constant="false" initialAmount="0" hasOnlySubstanceUnits="true" metaid="iBioSim32" boundaryCondition="false" compartment="Cell"/> + <species id="LacI" constant="false" initialAmount="0" hasOnlySubstanceUnits="true" metaid="iBioSim33" boundaryCondition="true" compartment="Cell"/> + <species id="TetR" constant="false" initialAmount="0" hasOnlySubstanceUnits="true" metaid="iBioSim34" boundaryCondition="true" compartment="Cell"/> + <species id="Promoter_GFP" constant="false" initialAmount="2" hasOnlySubstanceUnits="true" metaid="iBioSim35" boundaryCondition="false" sboTerm="SBO:0000590" compartment="Cell"/> + <species id="P1" constant="false" initialAmount="4" hasOnlySubstanceUnits="true" metaid="iBioSim36" boundaryCondition="false" sboTerm="SBO:0000590" compartment="Cell"/> + <species id="P3" constant="false" initialAmount="2" hasOnlySubstanceUnits="true" metaid="iBioSim37" boundaryCondition="false" sboTerm="SBO:0000590" compartment="Cell"/> + <species id="P3_mRNA" constant="false" initialAmount="0" hasOnlySubstanceUnits="true" metaid="iBioSim38" boundaryCondition="false" sboTerm="SBO:0000250" compartment="Cell"/> + <species id="P2" constant="false" initialAmount="2" hasOnlySubstanceUnits="true" metaid="iBioSim39" boundaryCondition="false" sboTerm="SBO:0000590" compartment="Cell"/> + </listOfSpecies> + <listOfParameters> + <parameter id="ko_r" constant="true" name="Reverse RNAP binding rate" metaid="iBioSim2" value="1"/> + <parameter id="nr" constant="true" name="Initial RNAP count" metaid="iBioSim7" value="30"/> + <parameter id="np" constant="true" name="Stoichiometry of production" metaid="iBioSim8" value="10"/> + <parameter id="kr_r" constant="true" name="Reverse repression binding rate" metaid="iBioSim9" value="1"/> + <parameter id="ka_f" constant="true" name="Forward activation binding rate" metaid="iBioSim10" value="0.0033"/> + <parameter id="kecdiff" constant="true" name="Extracellular diffusion rate" metaid="iBioSim11" value="1"/> + <parameter id="ko" constant="true" name="Open complex production rate" metaid="iBioSim12" value="0.05"/> + <parameter id="kmdiff_f" constant="true" name="Forward membrane diffusion rate" metaid="iBioSim13" value="1"/> + <parameter id="kecd" constant="true" name="Extracellular degradation rate" metaid="iBioSim14" value="0.005"/> + <parameter id="kc_r" constant="true" name="Reverse complex formation rate" metaid="iBioSim15" value="1"/> + <parameter id="kr_f" constant="true" name="Forward repression binding rate" metaid="iBioSim16" value="0.5"/> + <parameter id="ka_r" constant="true" name="Reverse activation binding rate" metaid="iBioSim17" value="1"/> + <parameter id="nc" constant="true" name="Stoichiometry of binding" metaid="iBioSim18" value="2"/> + <parameter id="kao_r" constant="true" name="Reverse activated RNAP binding rate" metaid="iBioSim19" value="1"/> + <parameter id="kd" constant="true" name="Degradation rate" metaid="iBioSim20" value="0.0075"/> + <parameter id="kb" constant="true" name="Basal production rate" metaid="iBioSim21" value="0.0001"/> + <parameter id="ng" constant="true" name="Initial promoter count" metaid="iBioSim22" value="2"/> + <parameter id="ka" constant="true" name="Activated production rate" metaid="iBioSim23" value="0.255"/> + <parameter id="kao_f" constant="true" name="Forward activated RNAP binding rate" metaid="iBioSim24" value="1"/> + <parameter id="kmdiff_r" constant="true" name="Reverse membrane diffusion rate" metaid="iBioSim25" value="0.01"/> + <parameter id="ko_f" constant="true" name="Forward RNAP binding rate" metaid="iBioSim26" value="0.033"/> + <parameter id="kc_f" constant="true" name="Forward complex formation rate" metaid="iBioSim27" value="0.05"/> + <parameter id="High" constant="true" metaid="iBioSim28" value="60"/> + <parameter id="HighTime" constant="true" metaid="iBioSim29" value="2000"/> + <parameter id="HighTime2" constant="true" metaid="iBioSim30" value="4000"/> + </listOfParameters> + <listOfReactions> + <reaction id="Degradation_CI" metaid="iBioSim40" reversible="false" sboTerm="SBO:0000179" fast="false" compartment="Cell"> + <listOfReactants> + <speciesReference constant="true" species="CI" stoichiometry="1"/> + </listOfReactants> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <times/> + <ci> kd </ci> + <ci> CI </ci> + </apply> + </math> + </kineticLaw> + </reaction> + <reaction id="Degradation_GFP" metaid="iBioSim41" reversible="false" sboTerm="SBO:0000179" fast="false" compartment="Cell"> + <listOfReactants> + <speciesReference constant="true" species="GFP" stoichiometry="1"/> + </listOfReactants> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <times/> + <ci> kd </ci> + <ci> GFP </ci> + </apply> + </math> + </kineticLaw> + </reaction> + <reaction id="Degradation_LacI" metaid="iBioSim42" reversible="false" sboTerm="SBO:0000179" fast="false" compartment="Cell"> + <listOfReactants> + <speciesReference constant="true" species="LacI" stoichiometry="1"/> + </listOfReactants> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <times/> + <ci> kd </ci> + <ci> LacI </ci> + </apply> + </math> + </kineticLaw> + </reaction> + <reaction id="Degradation_TetR" metaid="iBioSim43" reversible="false" sboTerm="SBO:0000179" fast="false" compartment="Cell"> + <listOfReactants> + <speciesReference constant="true" species="TetR" stoichiometry="1"/> + </listOfReactants> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <times/> + <ci> kd </ci> + <ci> TetR </ci> + </apply> + </math> + </kineticLaw> + </reaction> + <reaction id="Production_Promoter_GFP" metaid="iBioSim3" reversible="false" sboTerm="SBO:0000589" fast="false" compartment="Cell"> + <listOfProducts> + <speciesReference constant="true" species="GFP" stoichiometry="10"/> + </listOfProducts> + <listOfModifiers> + <modifierSpeciesReference species="Promoter_GFP" sboTerm="SBO:0000598"/> + <modifierSpeciesReference species="CI" sboTerm="SBO:0000020"/> + </listOfModifiers> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <divide/> + <apply> + <times/> + <apply> + <times/> + <apply> + <times/> + <ci> Promoter_GFP </ci> + <ci> ko </ci> + </apply> + <apply> + <divide/> + <ci> ko_f </ci> + <ci> ko_r </ci> + </apply> + </apply> + <ci> nr </ci> + </apply> + <apply> + <plus/> + <apply> + <plus/> + <cn type="integer"> 1 </cn> + <apply> + <times/> + <apply> + <divide/> + <ci> ko_f </ci> + <ci> ko_r </ci> + </apply> + <ci> nr </ci> + </apply> + </apply> + <apply> + <power/> + <apply> + <times/> + <apply> + <divide/> + <ci> kr_f </ci> + <ci> kr_r </ci> + </apply> + <ci> CI </ci> + </apply> + <ci> nc_CI_r </ci> + </apply> + </apply> + </apply> + </math> + <listOfLocalParameters> + <localParameter id="nc_CI_r" value="3"/> + </listOfLocalParameters> + </kineticLaw> + </reaction> + <reaction id="Production_P1" metaid="iBioSim4" reversible="false" sboTerm="SBO:0000589" fast="false" compartment="Cell"> + <listOfProducts> + <speciesReference constant="true" species="CI" stoichiometry="10"/> + </listOfProducts> + <listOfModifiers> + <modifierSpeciesReference species="P1" sboTerm="SBO:0000598"/> + <modifierSpeciesReference species="LacI" sboTerm="SBO:0000020"/> + </listOfModifiers> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <divide/> + <apply> + <times/> + <apply> + <times/> + <apply> + <times/> + <ci> P1 </ci> + <ci> ko </ci> + </apply> + <apply> + <divide/> + <ci> ko_f </ci> + <ci> ko_r </ci> + </apply> + </apply> + <ci> nr </ci> + </apply> + <apply> + <plus/> + <apply> + <plus/> + <cn type="integer"> 1 </cn> + <apply> + <times/> + <apply> + <divide/> + <ci> ko_f </ci> + <ci> ko_r </ci> + </apply> + <ci> nr </ci> + </apply> + </apply> + <apply> + <power/> + <apply> + <times/> + <apply> + <divide/> + <ci> kr_f </ci> + <ci> kr_r </ci> + </apply> + <ci> LacI </ci> + </apply> + <ci> nc </ci> + </apply> + </apply> + </apply> + </math> + </kineticLaw> + </reaction> + <reaction id="Production_P3" metaid="iBioSim5" reversible="false" sboTerm="SBO:0000589" fast="false" compartment="Cell"> + <listOfProducts> + <speciesReference constant="true" species="P3_mRNA" stoichiometry="10"/> + </listOfProducts> + <listOfModifiers> + <modifierSpeciesReference species="P3" sboTerm="SBO:0000598"/> + </listOfModifiers> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <divide/> + <apply> + <times/> + <apply> + <times/> + <apply> + <times/> + <ci> P3 </ci> + <ci> ko </ci> + </apply> + <apply> + <divide/> + <ci> ko_f </ci> + <ci> ko_r </ci> + </apply> + </apply> + <ci> nr </ci> + </apply> + <apply> + <plus/> + <cn type="integer"> 1 </cn> + <apply> + <times/> + <apply> + <divide/> + <ci> ko_f </ci> + <ci> ko_r </ci> + </apply> + <ci> nr </ci> + </apply> + </apply> + </apply> + </math> + </kineticLaw> + </reaction> + <reaction id="Production_P2" metaid="iBioSim6" reversible="false" sboTerm="SBO:0000589" fast="false" compartment="Cell"> + <listOfProducts> + <speciesReference constant="true" species="CI" stoichiometry="10"/> + </listOfProducts> + <listOfModifiers> + <modifierSpeciesReference species="P2" sboTerm="SBO:0000598"/> + <modifierSpeciesReference species="TetR" sboTerm="SBO:0000020"/> + </listOfModifiers> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <divide/> + <apply> + <times/> + <apply> + <times/> + <apply> + <times/> + <ci> P2 </ci> + <ci> ko </ci> + </apply> + <apply> + <divide/> + <ci> ko_f </ci> + <ci> ko_r </ci> + </apply> + </apply> + <ci> nr </ci> + </apply> + <apply> + <plus/> + <apply> + <plus/> + <cn type="integer"> 1 </cn> + <apply> + <times/> + <apply> + <divide/> + <ci> ko_f </ci> + <ci> ko_r </ci> + </apply> + <ci> nr </ci> + </apply> + </apply> + <apply> + <power/> + <apply> + <times/> + <apply> + <divide/> + <ci> kr_f </ci> + <ci> kr_r </ci> + </apply> + <ci> TetR </ci> + </apply> + <ci> nc </ci> + </apply> + </apply> + </apply> + </math> + </kineticLaw> + </reaction> + </listOfReactions> + <listOfEvents> + <event id="event0" metaid="iBioSim44" useValuesFromTriggerTime="true"> + <trigger persistent="false" initialValue="true"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <geq/> + <csymbol encoding="text" definitionURL="http://www.sbml.org/sbml/symbols/time"> t </csymbol> + <ci> HighTime </ci> + </apply> + </math> + </trigger> + <listOfEventAssignments> + <eventAssignment variable="TetR"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> High </ci> + </math> + </eventAssignment> + </listOfEventAssignments> + </event> + <event id="event1" metaid="iBioSim45" useValuesFromTriggerTime="true"> + <trigger persistent="false" initialValue="true"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <geq/> + <csymbol encoding="text" definitionURL="http://www.sbml.org/sbml/symbols/time"> t </csymbol> + <ci> HighTime2 </ci> + </apply> + </math> + </trigger> + <listOfEventAssignments> + <eventAssignment variable="LacI"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> High </ci> + </math> + </eventAssignment> + </listOfEventAssignments> + </event> + </listOfEvents> + </model> +</sbml> \ No newline at end of file Added: trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/example04.xml =================================================================== --- trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/example04.xml (rev 0) +++ trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/example04.xml 2015-11-25 16:29:13 UTC (rev 2406) @@ -0,0 +1,317 @@ +<?xml version='1.0' encoding='UTF-8' standalone='no'?> +<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" layout:required="false" xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1" xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version1" xmlns:comp="http://www.sbml.org/sbml/level3/version1/comp/version1" level="3" arrays:required="true" comp:required="true" xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1" version="1" fbc:required="false"> + <model metaid="iBioSim8" id="example04"> + <layout:listOfLayouts xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <layout:layout layout:id="iBioSim"> + <layout:dimensions layout:height="360" layout:depth="0" layout:width="620"/> + <layout:listOfAdditionalGraphicalObjects> + <layout:generalGlyph layout:id="Glyph__k" layout:reference="k"> + <layout:boundingBox> + <layout:position layout:x="375" layout:y="300"/> + <layout:dimensions layout:height="30" layout:width="30"/> + </layout:boundingBox> + <layout:listOfReferenceGlyphs> + <layout:referenceGlyph layout:id="Glyph__k__product__r" layout:role="product" layout:glyph="Glyph__r"> + <layout:curve> + <layout:listOfCurveSegments> + <layout:curveSegment xsi:type="LineSegment"> + <layout:start layout:x="163" layout:y="59"/> + <layout:end layout:x="389" layout:y="248"/> + </layout:curveSegment> + </layout:listOfCurveSegments> + </layout:curve> + </layout:referenceGlyph> + </layout:listOfReferenceGlyphs> + </layout:generalGlyph> + </layout:listOfAdditionalGraphicalObjects> + <layout:listOfCompartmentGlyphs> + <layout:compartmentGlyph layout:id="Glyph__Cell" layout:compartment="Cell"> + <layout:boundingBox> + <layout:position layout:x="160" layout:y="80"/> + <layout:dimensions layout:height="280" layout:width="460"/> + </layout:boundingBox> + </layout:compartmentGlyph> + </layout:listOfCompartmentGlyphs> + <layout:listOfSpeciesGlyphs> + <layout:speciesGlyph layout:id="Glyph__B" layout:species="B"> + <layout:boundingBox> + <layout:position layout:x="190" layout:y="270"/> + <layout:dimensions layout:height="30" layout:width="100"/> + </layout:boundingBox> + </layout:speciesGlyph> + <layout:speciesGlyph layout:id="Glyph__A" layout:species="A"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + </arrays:listOfDimensions> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="layout:species"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + <layout:boundingBox> + <layout:position layout:x="190" layout:y="190"/> + <layout:dimensions layout:height="30" layout:width="100"/> + </layout:boundingBox> + </layout:speciesGlyph> + <layout:speciesGlyph layout:id="Glyph__C" layout:species="C"> + <layout:boundingBox> + <layout:position layout:x="439" layout:y="232"/> + <layout:dimensions layout:height="30" layout:width="100"/> + </layout:boundingBox> + </layout:speciesGlyph> + </layout:listOfSpeciesGlyphs> + <layout:listOfReactionGlyphs> + <layout:reactionGlyph layout:id="Glyph__r" layout:reaction="r"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + </arrays:listOfDimensions> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="layout:reaction"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + <layout:boundingBox> + <layout:position layout:x="374" layout:y="233"/> + <layout:dimensions layout:height="30" layout:width="30"/> + </layout:boundingBox> + <layout:listOfSpeciesReferenceGlyphs> + <layout:speciesReferenceGlyph layout:id="Glyph__r__substrate__B" layout:role="substrate" layout:speciesGlyph="Glyph__B"> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="layout:id"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + <layout:curve> + <layout:listOfCurveSegments> + <layout:curveSegment xsi:type="LineSegment"> + <layout:start layout:x="240" layout:y="285"/> + <layout:end layout:x="389" layout:y="248"/> + </layout:curveSegment> + </layout:listOfCurveSegments> + </layout:curve> + </layout:speciesReferenceGlyph> + <layout:speciesReferenceGlyph layout:id="Glyph__r__substrate__A" layout:role="substrate" layout:speciesGlyph="Glyph__A"> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="layout:speciesGlyph"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="layout:id"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + <layout:curve> + <layout:listOfCurveSegments> + <layout:curveSegment xsi:type="LineSegment"> + <layout:start layout:x="240" layout:y="205"/> + <layout:end layout:x="389" layout:y="248"/> + </layout:curveSegment> + </layout:listOfCurveSegments> + </layout:curve> + </layout:speciesReferenceGlyph> + <layout:speciesReferenceGlyph layout:id="Glyph__r__product__C" layout:role="product" layout:speciesGlyph="Glyph__C"> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="layout:id"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + <layout:curve> + <layout:listOfCurveSegments> + <layout:curveSegment xsi:type="LineSegment"> + <layout:start layout:x="389" layout:y="248"/> + <layout:end layout:x="489" layout:y="247"/> + </layout:curveSegment> + </layout:listOfCurveSegments> + </layout:curve> + </layout:speciesReferenceGlyph> + </layout:listOfSpeciesReferenceGlyphs> + </layout:reactionGlyph> + </layout:listOfReactionGlyphs> + <layout:listOfTextGlyphs> + <layout:textGlyph layout:id="TextGlyph__Cell" layout:text="Cell[n]" layout:graphicalObject="Glyph__Cell"> + <layout:boundingBox> + <layout:position layout:x="160" layout:y="80"/> + <layout:dimensions layout:height="280" layout:width="460"/> + </layout:boundingBox> + </layout:textGlyph> + <layout:textGlyph layout:id="TextGlyph__k" layout:text="k" layout:graphicalObject="Glyph__k"> + <layout:boundingBox> + <layout:position layout:x="375" layout:y="300"/> + <layout:dimensions layout:height="30" layout:width="30"/> + </layout:boundingBox> + </layout:textGlyph> + <layout:textGlyph layout:id="TextGlyph__B" layout:text="B[n]" layout:graphicalObject="Glyph__B"> + <layout:boundingBox> + <layout:position layout:x="190" layout:y="270"/> + <layout:dimensions layout:height="30" layout:width="100"/> + </layout:boundingBox> + </layout:textGlyph> + <layout:textGlyph layout:id="TextGlyph__A" layout:text="A[n]" layout:graphicalObject="Glyph__A"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + </arrays:listOfDimensions> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="layout:graphicalObject"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + <layout:boundingBox> + <layout:position layout:x="190" layout:y="190"/> + <layout:dimensions layout:height="30" layout:width="100"/> + </layout:boundingBox> + </layout:textGlyph> + <layout:textGlyph layout:id="TextGlyph__C" layout:text="C[n]" layout:graphicalObject="Glyph__C"> + <layout:boundingBox> + <layout:position layout:x="439" layout:y="232"/> + <layout:dimensions layout:height="30" layout:width="100"/> + </layout:boundingBox> + </layout:textGlyph> + <layout:textGlyph layout:id="TextGlyph__r" layout:text="r[n]" layout:graphicalObject="Glyph__r"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + </arrays:listOfDimensions> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="layout:graphicalObject"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + <layout:boundingBox> + <layout:position layout:x="374" layout:y="233"/> + <layout:dimensions layout:height="30" layout:width="30"/> + </layout:boundingBox> + </layout:textGlyph> + </layout:listOfTextGlyphs> + </layout:layout> + </layout:listOfLayouts> + <listOfCompartments> + <compartment constant="true" id="Cell" size="1" spatialDimensions="3"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + </arrays:listOfDimensions> + </compartment> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" constant="false" metaid="iBioSim3" hasOnlySubstanceUnits="true" initialAmount="0" compartment="Cell" id="B"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + </arrays:listOfDimensions> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="compartment"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + </species> + <species boundaryCondition="false" constant="false" metaid="iBioSim4" hasOnlySubstanceUnits="true" initialAmount="0" compartment="Cell" id="A"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + </arrays:listOfDimensions> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="compartment"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + </species> + <species boundaryCondition="false" constant="false" metaid="iBioSim5" hasOnlySubstanceUnits="true" initialAmount="0" compartment="Cell" id="C"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + </arrays:listOfDimensions> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="compartment"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + </species> + </listOfSpecies> + <listOfParameters> + <parameter constant="false" id="k" metaid="iBioSim1" value="1"/> + <parameter constant="true" id="n" metaid="iBioSim2" value="5"/> + </listOfParameters> + <listOfReactions> + <reaction compartment="Cell" fast="false" id="r" metaid="iBioSim6" reversible="false"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + </arrays:listOfDimensions> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="compartment"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + <listOfReactants> + <speciesReference stoichiometry="1" constant="true" species="B"> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="species"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + </speciesReference> + <speciesReference stoichiometry="1" constant="true" species="A"> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="species"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + </speciesReference> + </listOfReactants> + <listOfProducts> + <speciesReference stoichiometry="1" constant="true" species="C"> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="species"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + </speciesReference> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <apply> + <times/> + <apply> + <times/> + <ci> k </ci> + <apply> + <selector/> + <ci> A </ci> + <ci> d0 </ci> + </apply> + </apply> + <apply> + <selector/> + <ci> B </ci> + <ci> d0 </ci> + </apply> + </apply> + </math> + </kineticLaw> + </reaction> + </listOfReactions> + </model> +</sbml> \ No newline at end of file Added: trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/toggleSwitch.xml =================================================================== --- trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/toggleSwitch.xml (rev 0) +++ trunk/extensions/arrays/test/org/sbml/jsbml/xml/test/data/arrays/toggleSwitch.xml 2015-11-25 16:29:13 UTC (rev 2406) @@ -0,0 +1,1611 @@ +<?xml version='1.0' encoding='UTF-8' standalone='no'?> +<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" layout:required="false" xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1" xmlns:fbc="http://www.sbml.org/sbml/level3/version1/fbc/version2" xmlns:comp="http://www.sbml.org/sbml/level3/version1/comp/version1" level="3" arrays:required="true" comp:required="true" xmlns:layout="http://www.sbml.org/sbml/level3/version1/layout/version1" version="1" fbc:required="false"> + <model metaid="iBioSim55" id="toggleSwitch"> + <listOfCompartments> + <compartment constant="true" id="Cell_Interior" size="1" metaid="iBioSim2" spatialDimensions="3"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + <arrays:dimension arrays:arrayDimension="1" arrays:id="d1" arrays:size="n"/> + </arrays:listOfDimensions> + </compartment> + <compartment constant="true" id="Exterior" size="1" metaid="iBioSim3" spatialDimensions="3"/> + </listOfCompartments> + <listOfSpecies> + <species boundaryCondition="false" constant="false" metaid="iBioSim4" hasOnlySubstanceUnits="true" initialAmount="0" compartment="Cell_Interior" id="LacI"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + <arrays:dimension arrays:arrayDimension="1" arrays:id="d1" arrays:size="n"/> + </arrays:listOfDimensions> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:index arrays:arrayDimension="0" arrays:referencedAttribute="compartment"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d0 </ci> + </math> + </arrays:index> + <arrays:index arrays:arrayDimension="1" arrays:referencedAttribute="compartment"> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> d1 </ci> + </math> + </arrays:index> + </arrays:listOfIndices> + </species> + <species boundaryCondition="false" constant="false" metaid="iBioSim5" hasOnlySubstanceUnits="true" initialAmount="0" compartment="Cell_Interior" id="IPTG"> + <arrays:listOfDimensions xmlns:arrays="http://www.sbml.org/sbml/level3/version1/arrays/version1"> + <arrays:dimension arrays:arrayDimension="0" arrays:id="d0" arrays:size="n"/> + <arrays:dimension arrays:arrayDimension="1" arrays:id="d1" arrays:size="n"/> + </arrays:listOfDimensions> + <arrays:listOfIndices xmlns:arrays="http://www.sbml.org/sbml/level3/ver... [truncated message content] |