本文整理匯總了C#中libsbml.Model.addReaction方法的典型用法代碼示例。如果您正苦於以下問題:C# Model.addReaction方法的具體用法?C# Model.addReaction怎麽用?C# Model.addReaction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類libsbml.Model
的用法示例。
在下文中一共展示了Model.addReaction方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: 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;
}
示例2: 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;
}
示例3: 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;
}
示例4: 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;
}
示例5: 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() );
}
示例6: 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 );
}