本文整理汇总了C#中libsbmlcs.Model.addReaction方法的典型用法代码示例。如果您正苦于以下问题:C# Model.addReaction方法的具体用法?C# Model.addReaction怎么用?C# Model.addReaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libsbmlcs.Model
的用法示例。
在下文中一共展示了Model.addReaction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: test_Reaction_parent_add
public void test_Reaction_parent_add()
{
Reaction ia = new Reaction(2,4);
Model m = new Model(2,4);
ia.setId("k");
m.addReaction(ia);
ia = null;
ListOf lo = m.getListOfReactions();
assertTrue( lo == m.getReaction(0).getParentSBMLObject() );
assertTrue( m == lo.getParentSBMLObject() );
}
示例2: test_Reaction_ancestor_add
public void test_Reaction_ancestor_add()
{
Reaction ia = new Reaction(2,4);
Model m = new Model(2,4);
ia.setId("k");
m.addReaction(ia);
ia = null;
ListOf lo = m.getListOfReactions();
Reaction obj = m.getReaction(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 );
}
示例3: test_Model_addReaction5
public void test_Model_addReaction5()
{
Model m = new Model(2,2);
Reaction r = new Reaction(2,2);
r.setId( "r");
Reaction r1 = new Reaction(2,2);
r1.setId( "r");
int i = m.addReaction(r);
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertTrue( m.getNumReactions() == 1 );
i = m.addReaction(r1);
assertTrue( i == libsbml.LIBSBML_DUPLICATE_OBJECT_ID );
assertTrue( m.getNumReactions() == 1 );
r = null;
r1 = null;
m = null;
}
示例4: test_Model_addReaction4
public void test_Model_addReaction4()
{
Model m = new Model(2,2);
Reaction r = null;
int i = m.addReaction(r);
assertTrue( i == libsbml.LIBSBML_OPERATION_FAILED );
assertTrue( m.getNumReactions() == 0 );
m = null;
}
示例5: test_Model_addReaction3
public void test_Model_addReaction3()
{
Model m = new Model(2,2);
Reaction r = new Reaction(1,2);
r.setId( "r");
int i = m.addReaction(r);
assertTrue( i == libsbml.LIBSBML_LEVEL_MISMATCH );
assertTrue( m.getNumReactions() == 0 );
r = null;
m = null;
}
示例6: test_Model_addReaction1
public void test_Model_addReaction1()
{
Model m = new Model(2,2);
Reaction r = new Reaction(2,2);
int i = m.addReaction(r);
assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
r.setId( "r");
i = m.addReaction(r);
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertTrue( m.getNumReactions() == 1 );
r = null;
m = null;
}