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


C# libsbmlcs.Model类代码示例

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


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

示例1: setUp

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

示例2: setUp

 public void setUp()
 {
     M = new  Model(3,1);
       if (M == null);
       {
       }
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:7,代码来源:TestL3Model.cs

示例3: 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:alexholehouse,项目名称:SBMLIntegrator,代码行数:9,代码来源:TestSBMLParentObject.cs

示例4: 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:alexholehouse,项目名称:SBMLIntegrator,代码行数:9,代码来源:TestSBMLParentObject.cs

示例5: 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:alexholehouse,项目名称:SBMLIntegrator,代码行数:11,代码来源:TestSBMLParentObject.cs

示例6: 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:,项目名称:,代码行数:11,代码来源:

示例7: 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:alexholehouse,项目名称:SBMLIntegrator,代码行数:11,代码来源:TestSBMLDocument.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:,项目名称:,代码行数:13,代码来源:

示例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:alexholehouse,项目名称:SBMLIntegrator,代码行数: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:alexholehouse,项目名称:SBMLIntegrator,代码行数:15,代码来源:TestAncestor.cs

示例11: test_ListOf_append

 public void test_ListOf_append()
 {
     Model m = new  Model(2,4);
       m.createCompartment();
       ListOf loc = m.getListOfCompartments();
       assertTrue( loc.size() == 1 );
       SBase c = new  Compartment(2,4);
       int i = loc.append(c);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( loc.size() == 2 );
       SBase sp = new  Species(2,4);
       i = loc.append(sp);
       assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
       assertTrue( loc.size() == 2 );
       m = null;
       sp = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:17,代码来源:TestListOf.cs

示例12: test_SBMLDocument_setLevelAndVersion_Error

 public void test_SBMLDocument_setLevelAndVersion_Error()
 {
     SBMLDocument d = new  SBMLDocument();
       d.setLevelAndVersion(2,1,true);
       Model m1 = new  Model(2,1);
       Unit u = new  Unit(2,1);
       u.setKind(libsbml.UnitKind_forName("mole"));
       u.setOffset(3.2);
       UnitDefinition ud = new  UnitDefinition(2,1);
       ud.setId( "ud");
       ud.addUnit(u);
       m1.addUnitDefinition(ud);
       d.setModel(m1);
       assertTrue( d.setLevelAndVersion(2,2,true) == false );
       assertTrue( d.setLevelAndVersion(2,3,true) == false );
       assertTrue( d.setLevelAndVersion(1,2,true) == false );
       assertTrue( d.setLevelAndVersion(1,1,true) == false );
       d = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:19,代码来源:TestSBMLDocument.cs

示例13: appendFrom

 /**
    * Copies a given Model object's subcomponents and appends the copies to
    * the appropriate places in this Model.
    *
    * This method also calls the <code>appendFrom</code> method on all libSBML
    * plug-in objects.
    *
    *
  *
  * SBML Level&nbsp;3 consists of a <em>Core</em> definition that can be extended
  * via optional SBML Level&nbsp;3 <em>packages</em>.  A given model may indicate
  * that it uses one or more SBML packages, and likewise, a software tool may be
  * able to support one or more packages.  LibSBML does not come preconfigured
  * with all possible packages included and enabled, in part because not all
  * package specifications have been finalized.  To support the ability for
  * software systems to enable support for the Level&nbsp;3 packages they choose,
  * libSBML features a <em>plug-in</em> mechanism.  Each SBML Level&nbsp;3
  * package is implemented in a separate code plug-in that can be enabled by the
  * application to support working with that SBML package.  A given SBML model
  * may thus contain not only objects defined by SBML Level&nbsp;3 Core, but also
  * objects created by libSBML plug-ins supporting additional Level&nbsp;3
  * packages.
  *
  *
    *
    * @param model the Model to merge with this one.
    *
    */
 public new int appendFrom(Model model)
 {
     int ret = libsbmlPINVOKE.Model_appendFrom(swigCPtr, Model.getCPtr(model));
     return ret;
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:33,代码来源:Model.cs

示例14: expandInitialAssignments

 /** */
 /* libsbml-internal */
 public static bool expandInitialAssignments(Model m)
 {
     bool ret = libsbmlPINVOKE.SBMLTransforms_expandInitialAssignments(Model.getCPtr(m));
     return ret;
 }
开发者ID:kirichoi,项目名称:roadrunner,代码行数:7,代码来源:SBMLTransforms.cs

示例15: mapComponentValues

 public static IdList mapComponentValues(Model m)
 {
     IdList ret = new IdList(libsbmlPINVOKE.SBMLTransforms_mapComponentValues(Model.getCPtr(m)), true);
     return ret;
 }
开发者ID:kirichoi,项目名称:roadrunner,代码行数:5,代码来源:SBMLTransforms.cs


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