当前位置: 首页>>代码示例>>C#>>正文


C# libsbml.Model类代码示例

本文整理汇总了C#中libsbml.Model的典型用法代码示例。如果您正苦于以下问题:C# Model类的具体用法?C# Model怎么用?C# Model使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Model类属于libsbml命名空间,在下文中一共展示了Model类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: setUp

 public void setUp()
 {
     M = new  Model(2,4);
       if (M == null);
       {
       }
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:7,代码来源:TestModel_newSetters.cs

示例2: setUp

 public void setUp()
 {
     string filename = "../../annotation/test/test-data/annotationL3.xml";
       d = libsbml.readSBML(filename);
       m = d.getModel();
       c = m.getCompartment(0);
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:7,代码来源:TestL3ModelHistory.cs

示例3: test_CompartmentType_parent_create

 public void test_CompartmentType_parent_create()
 {
     Model m = new Model(2,4);
       CompartmentType ct = m.createCompartmentType();
       ListOf lo = m.getListOfCompartmentTypes();
       assertTrue( lo == m.getCompartmentType(0).getParentSBMLObject() );
       assertTrue( lo == ct.getParentSBMLObject() );
       assertTrue( m == lo.getParentSBMLObject() );
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:9,代码来源:TestSBMLParentObject.cs

示例4: test_AssignmentRule_parent_create

 public void test_AssignmentRule_parent_create()
 {
     Model m = new Model(2,4);
       AssignmentRule r = m.createAssignmentRule();
       ListOf lo = m.getListOfRules();
       assertTrue( lo == m.getRule(0).getParentSBMLObject() );
       assertTrue( lo == r.getParentSBMLObject() );
       assertTrue( m == lo.getParentSBMLObject() );
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:9,代码来源:TestSBMLParentObject.cs

示例5: test_SBMLDocument_setLevelAndVersion

 public void test_SBMLDocument_setLevelAndVersion()
 {
     SBMLDocument d = new  SBMLDocument(2,2);
       Model m1 = new  Model(2,2);
       d.setModel(m1);
       assertTrue( d.setLevelAndVersion(2,3,false) == true );
       assertTrue( d.setLevelAndVersion(2,1,false) == true );
       assertTrue( d.setLevelAndVersion(1,2,false) == true );
       assertTrue( d.setLevelAndVersion(1,1,false) == false );
       d = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:11,代码来源:TestSBMLDocument.cs

示例6: test_CompartmentType_parent_add

 public void test_CompartmentType_parent_add()
 {
     CompartmentType ct = new CompartmentType(2,4);
       Model m = new Model(2,4);
       ct.setId("ct");
       m.addCompartmentType(ct);
       ct = null;
       ListOf lo = m.getListOfCompartmentTypes();
       assertTrue( lo == m.getCompartmentType(0).getParentSBMLObject() );
       assertTrue( m == lo.getParentSBMLObject() );
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:11,代码来源:TestSBMLParentObject.cs

示例7: test_Model_addCompartment2

 public void test_Model_addCompartment2()
 {
     Model m = new  Model(2,2);
       Compartment c = new  Compartment(2,1);
       c.setId( "c");
       int i = m.addCompartment(c);
       assertTrue( i == libsbml.LIBSBML_VERSION_MISMATCH );
       assertTrue( m.getNumCompartments() == 0 );
       c = null;
       m = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:11,代码来源:TestModel_newSetters.cs

示例8: test_Model_addCompartment1

 public void test_Model_addCompartment1()
 {
     Model m = new  Model(2,2);
       Compartment c = new  Compartment(2,2);
       int i = m.addCompartment(c);
       assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
       c.setId( "c");
       i = m.addCompartment(c);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( m.getNumCompartments() == 1 );
       c = null;
       m = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:13,代码来源:TestModel_newSetters.cs

示例9: test_CompartmentType_ancestor_add

 public void test_CompartmentType_ancestor_add()
 {
     CompartmentType ct = new CompartmentType(2,4);
       Model m = new Model(2,4);
       ct.setId("ct");
       m.addCompartmentType(ct);
       ct = null;
       ListOf lo = m.getListOfCompartmentTypes();
       CompartmentType obj = m.getCompartmentType(0);
       assertTrue( obj.getAncestorOfType(libsbml.SBML_MODEL) == m );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_EVENT) == null );
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:14,代码来源:TestAncestor.cs

示例10: test_AssignmentRule_ancestor_create

 public void test_AssignmentRule_ancestor_create()
 {
     Model m = new Model(2,4);
       AssignmentRule r = m.createAssignmentRule();
       ListOf lo = m.getListOfRules();
       assertTrue( r.getAncestorOfType(libsbml.SBML_MODEL) == m );
       assertTrue( r.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
       assertTrue( r.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( r.getAncestorOfType(libsbml.SBML_EVENT) == null );
       Rule obj = m.getRule(0);
       assertTrue( obj.getAncestorOfType(libsbml.SBML_MODEL) == m );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( obj.getAncestorOfType(libsbml.SBML_EVENT) == null );
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:15,代码来源:TestAncestor.cs

示例11: test_Model_createReactant

 public void test_Model_createReactant()
 {
     Model m = new  Model(2,2);
       Reaction p = m.createReaction();
       SpeciesReference sr = m.createReactant();
       assertTrue( p.getNumReactants() == 1 );
       assertTrue( (sr).getLevel() == 2 );
       assertTrue( (sr).getVersion() == 2 );
       m = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:10,代码来源:TestModel_newSetters.cs

示例12: test_Model_createKineticLawParameters

 public void test_Model_createKineticLawParameters()
 {
     Model m = new  Model(2,2);
       Reaction r = m.createReaction();
       KineticLaw kl = m.createKineticLaw();
       Parameter p = m.createKineticLawParameter();
       assertTrue( r.isSetKineticLaw() == true );
       assertTrue( kl.getNumParameters() == 1 );
       assertTrue( (p).getLevel() == 2 );
       assertTrue( (p).getVersion() == 2 );
       m = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:12,代码来源:TestModel_newSetters.cs

示例13: test_Model_createParameter

 public void test_Model_createParameter()
 {
     Model m = new  Model(2,2);
       Parameter p = m.createParameter();
       assertTrue( m.getNumParameters() == 1 );
       assertTrue( (p).getLevel() == 2 );
       assertTrue( (p).getVersion() == 2 );
       m = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:9,代码来源:TestModel_newSetters.cs

示例14: test_Model_createInitialAssignment

 public void test_Model_createInitialAssignment()
 {
     Model m = new  Model(2,2);
       InitialAssignment p = m.createInitialAssignment();
       assertTrue( m.getNumInitialAssignments() == 1 );
       assertTrue( (p).getLevel() == 2 );
       assertTrue( (p).getVersion() == 2 );
       m = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:9,代码来源:TestModel_newSetters.cs

示例15: test_Model_createKineticLaw

 public void test_Model_createKineticLaw()
 {
     Model m = new  Model(2,2);
       Reaction p = m.createReaction();
       KineticLaw kl = m.createKineticLaw();
       assertTrue( p.isSetKineticLaw() == true );
       assertTrue( (kl).getLevel() == 2 );
       assertTrue( (kl).getVersion() == 2 );
       m = null;
 }
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:10,代码来源:TestModel_newSetters.cs


注:本文中的libsbml.Model类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。