• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# libsbmlcs.Model类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: evaluateASTNode

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


示例17: getCPtr

 internal static HandleRef getCPtr(Model obj)
 {
     return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:4,代码来源:Model.cs


示例18: Model

 /**
    * Copy constructor; creates a (deep) copy of the given Model object.
    *
    * @param orig the object to copy.
    */
 public Model(Model orig)
     : this(libsbmlPINVOKE.new_Model__SWIG_2(Model.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:10,代码来源:Model.cs


示例19: test_Model_constructor

        public void test_Model_constructor()
        {
            SBase s;

              try
              {
            s = new Model(1,1);
            s = new Model(1,2);
            s = new Model(2,1);
            s = new Model(2,2);
            s = new Model(2,3);
            s = new Model(2,4);
            s = new Model(3,1);
            s = new Model(SN11);
            s = new Model(SN12);
            s = new Model(SN21);
            s = new Model(SN22);
            s = new Model(SN23);
            s = new Model(SN24);
            s = new Model(SN31);
              }
              catch (SBMLConstructorException e)
              {
             s = null;
              }
              assertTrue(s != null);

              string msg = "";

              try
              {
            s = new Model(9,9);
              }
              catch (SBMLConstructorException e)
              {
             msg = e.Message;
              }
              assertTrue(msg == ErrMsg);

              msg = "";

              try
              {
            s = new Model(SN99);
              }
              catch (SBMLConstructorException e)
              {
             msg = e.Message;
              }
              assertTrue(msg == ErrMsg);
        }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:51,代码来源:TestSBMLConstructorException.cs


示例20: test_Model_L1V1

 public void test_Model_L1V1()
 {
     Model m = new Model(1,1);
       assertEquals( false, (m.hasRequiredElements()) );
       m.createCompartment();
       assertEquals( false, (m.hasRequiredElements()) );
       m.createSpecies();
       assertEquals( false, (m.hasRequiredElements()) );
       m.createReaction();
       assertEquals( true, m.hasRequiredElements() );
       m = null;
 }
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:12,代码来源:TestRequiredElements.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# libsbmlcs.Reaction类代码示例发布时间:2022-05-26
下一篇:
C# libsbmlcs.Event类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap