本文整理汇总了C#中libsbmlcs.Reaction类的典型用法代码示例。如果您正苦于以下问题:C# Reaction类的具体用法?C# Reaction怎么用?C# Reaction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Reaction类属于libsbmlcs命名空间,在下文中一共展示了Reaction类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: test_KineticLaw_getParameterById
public void test_KineticLaw_getParameterById()
{
Parameter k1 = new Parameter(2,4);
Parameter k2 = new Parameter(2,4);
k1.setId( "k1");
k2.setId( "k2");
k1.setValue(3.14);
k2.setValue(2.72);
M.addParameter(k1);
M.addParameter(k2);
Reaction r1 = new Reaction(2,4);
r1.setId( "reaction_1" );
KineticLaw kl = new KineticLaw(2,4);
kl.setFormula( "k1 * X0");
Parameter k3 = new Parameter(2,4);
Parameter k4 = new Parameter(2,4);
k3.setId( "k1");
k4.setId( "k2");
k3.setValue(2.72);
k4.setValue(3.14);
kl.addParameter(k3);
kl.addParameter(k4);
r1.setKineticLaw(kl);
M.addReaction(r1);
KineticLaw kl1 = M.getReaction(0).getKineticLaw();
assertNotEquals(kl1.getParameter( "k1" ),k3);
assertNotEquals(kl1.getParameter( "k1" ),k1);
assertNotEquals(kl1.getParameter( "k2" ),k4);
assertEquals(kl1.getParameter( "k3" ),null);
}
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:30,代码来源:TestModel.cs
示例2: setUp
public void setUp()
{
R = new Reaction(2,4);
if (R == null);
{
}
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:7,代码来源:TestReaction.cs
示例3: test_Reaction_addProduct2
public void test_Reaction_addProduct2()
{
Reaction m = new Reaction(2,2);
SpeciesReference p = new SpeciesReference(2,1);
p.setSpecies( "k");
int i = m.addProduct(p);
assertTrue( i == libsbml.LIBSBML_VERSION_MISMATCH );
assertTrue( m.getNumProducts() == 0 );
p = null;
m = null;
}
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:11,代码来源:TestReaction_newSetters.cs
示例4: test_Reaction_addProduct1
public void test_Reaction_addProduct1()
{
Reaction m = new Reaction(2,2);
SpeciesReference p = new SpeciesReference(2,2);
SpeciesReference p1 = new SpeciesReference(2,2);
p1.setSpecies( "k");
p1.setId( "k1");
int i = m.addProduct(p);
assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
p.setSpecies( "k");
p.setId( "k1");
i = m.addProduct(p);
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertTrue( m.getNumProducts() == 1 );
i = m.addProduct(p1);
assertTrue( i == libsbml.LIBSBML_DUPLICATE_OBJECT_ID );
assertTrue( m.getNumProducts() == 1 );
p = null;
p1 = null;
m = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:21,代码来源:TestReaction_newSetters.cs
示例5: test_Reaction_addReactant3
public void test_Reaction_addReactant3()
{
Reaction m = new Reaction(2,2);
SpeciesReference p = new SpeciesReference(1,2);
p.setSpecies( "k");
int i = m.addReactant(p);
assertTrue( i == libsbml.LIBSBML_LEVEL_MISMATCH );
assertTrue( m.getNumReactants() == 0 );
p = null;
m = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:11,代码来源:TestReaction_newSetters.cs
示例6: test_SpeciesReference_Reactant_parent_create
public void test_SpeciesReference_Reactant_parent_create()
{
Reaction r = new Reaction(2,4);
SpeciesReference sr = r.createReactant();
ListOf lo = r.getListOfReactants();
assertTrue( lo == r.getReactant(0).getParentSBMLObject() );
assertTrue( lo == sr.getParentSBMLObject() );
assertTrue( r == lo.getParentSBMLObject() );
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:9,代码来源:TestSBMLParentObject.cs
示例7: test_KineticLaw_ancestor_create
public void test_KineticLaw_ancestor_create()
{
Reaction r = new Reaction(2,4);
KineticLaw kl = r.createKineticLaw();
assertTrue( kl.getAncestorOfType(libsbml.SBML_REACTION) == r );
assertTrue( kl.getAncestorOfType(libsbml.SBML_DELAY) == null );
assertTrue( kl.getAncestorOfType(libsbml.SBML_MODEL) == null );
assertTrue( kl.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
KineticLaw obj = r.getKineticLaw();
assertTrue( obj.getAncestorOfType(libsbml.SBML_REACTION) == r );
assertTrue( obj.getAncestorOfType(libsbml.SBML_MODEL) == null );
assertTrue( obj.getAncestorOfType(libsbml.SBML_DELAY) == null );
assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
r = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:15,代码来源:TestAncestor.cs
示例8: test_SpeciesReference_Modifier_ancestor_add
public void test_SpeciesReference_Modifier_ancestor_add()
{
ModifierSpeciesReference sr = new ModifierSpeciesReference(2,4);
sr.setSpecies("s");
Reaction r = new Reaction(2,4);
r.addModifier(sr);
sr = null;
ListOf lo = r.getListOfModifiers();
ModifierSpeciesReference obj = r.getModifier(0);
assertTrue( obj.getAncestorOfType(libsbml.SBML_REACTION) == r );
assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
assertTrue( obj.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:14,代码来源:TestAncestor.cs
示例9: test_Reaction_createWithNS
public void test_Reaction_createWithNS()
{
XMLNamespaces xmlns = new XMLNamespaces();
xmlns.add( "http://www.sbml.org", "testsbml");
SBMLNamespaces sbmlns = new SBMLNamespaces(2,1);
sbmlns.addNamespaces(xmlns);
Reaction object1 = new Reaction(sbmlns);
assertTrue( object1.getTypeCode() == libsbml.SBML_REACTION );
assertTrue( object1.getMetaId() == "" );
assertTrue( object1.getNotes() == null );
assertTrue( object1.getAnnotation() == null );
assertTrue( object1.getLevel() == 2 );
assertTrue( object1.getVersion() == 1 );
assertTrue( object1.getNamespaces() != null );
assertTrue( object1.getNamespaces().getLength() == 2 );
object1 = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:17,代码来源:TestReaction.cs
示例10: test_Reaction_setName3
public void test_Reaction_setName3()
{
Reaction p = new Reaction(2,2);
int i = p.setName("");
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertEquals( false, p.isSetName() );
p = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:8,代码来源:TestReaction_newSetters.cs
示例11: test_Reaction_createReactant
public void test_Reaction_createReactant()
{
Reaction m = new Reaction(2,2);
SpeciesReference p = m.createReactant();
assertTrue( m.getNumReactants() == 1 );
assertTrue( (p).getLevel() == 2 );
assertTrue( (p).getVersion() == 2 );
m = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:9,代码来源:TestReaction_newSetters.cs
示例12: test_KineticLaw_parent_create
public void test_KineticLaw_parent_create()
{
Reaction r = new Reaction(2,4);
KineticLaw kl = r.createKineticLaw();
assertTrue( r == kl.getParentSBMLObject() );
r = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:7,代码来源:TestSBMLParentObject.cs
示例13: test_KineticLaw_parent_add
public void test_KineticLaw_parent_add()
{
KineticLaw kl = new KineticLaw(2,4);
Reaction r = new Reaction(2,4);
r.setKineticLaw(kl);
assertTrue( r == r.getKineticLaw().getParentSBMLObject() );
r = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:8,代码来源:TestSBMLParentObject.cs
示例14: test_L3_Reaction_createWithNS
public void test_L3_Reaction_createWithNS()
{
XMLNamespaces xmlns = new XMLNamespaces();
xmlns.add( "http://www.sbml.org", "testsbml");
SBMLNamespaces sbmlns = new SBMLNamespaces(3,1);
sbmlns.addNamespaces(xmlns);
Reaction r = new Reaction(sbmlns);
assertTrue( r.getTypeCode() == libsbml.SBML_REACTION );
assertTrue( r.getMetaId() == "" );
assertTrue( r.getNotes() == null );
assertTrue( r.getAnnotation() == null );
assertTrue( r.getLevel() == 3 );
assertTrue( r.getVersion() == 1 );
assertTrue( r.getNamespaces() != null );
assertTrue( r.getNamespaces().getLength() == 2 );
assertTrue( r.getId() == "" );
assertTrue( r.getName() == "" );
assertTrue( r.getCompartment() == "" );
assertTrue( r.getFast() == false );
assertTrue( r.getReversible() == true );
assertEquals( false, r.isSetId() );
assertEquals( false, r.isSetName() );
assertEquals( false, r.isSetCompartment() );
assertEquals( false, r.isSetFast() );
assertEquals( false, r.isSetReversible() );
r = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:27,代码来源:TestL3Reaction.cs
示例15: test_L3_Reaction_hasRequiredAttributes
public void test_L3_Reaction_hasRequiredAttributes()
{
Reaction r = new Reaction(3,1);
assertEquals( false, r.hasRequiredAttributes() );
r.setId( "id");
assertEquals( false, r.hasRequiredAttributes() );
r.setFast(false);
assertEquals( false, r.hasRequiredAttributes() );
r.setReversible(false);
assertEquals( true, r.hasRequiredAttributes() );
r = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:12,代码来源:TestL3Reaction.cs
示例16: test_SpeciesReference_Reactant_ancestor_create
public void test_SpeciesReference_Reactant_ancestor_create()
{
Reaction r = new Reaction(2,4);
SpeciesReference sr = r.createReactant();
ListOf lo = r.getListOfReactants();
assertTrue( sr.getAncestorOfType(libsbml.SBML_REACTION) == r );
assertTrue( sr.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
assertTrue( sr.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
assertTrue( sr.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
SpeciesReference obj = r.getReactant(0);
assertTrue( obj.getAncestorOfType(libsbml.SBML_REACTION) == r );
assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
assertTrue( obj.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:15,代码来源:TestAncestor.cs
示例17: test_SpeciesReference_Reactant_ancestor_add
public void test_SpeciesReference_Reactant_ancestor_add()
{
SpeciesReference sr = new SpeciesReference(2,4);
Reaction r = new Reaction(2,4);
sr.setSpecies("s");
r.addReactant(sr);
sr = null;
ListOf lo = r.getListOfReactants();
SpeciesReference obj = r.getReactant(0);
assertTrue( obj.getAncestorOfType(libsbml.SBML_REACTION) == r );
assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
assertTrue( obj.getAncestorOfType(libsbml.SBML_COMPARTMENT) == null );
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:14,代码来源:TestAncestor.cs
示例18: test_Reaction_addReactant4
public void test_Reaction_addReactant4()
{
Reaction m = new Reaction(2,2);
SpeciesReference p = null;
int i = m.addReactant(p);
assertTrue( i == libsbml.LIBSBML_OPERATION_FAILED );
assertTrue( m.getNumReactants() == 0 );
m = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:9,代码来源:TestReaction_newSetters.cs
示例19: test_Reaction_createKineticLaw
public void test_Reaction_createKineticLaw()
{
Reaction r = new Reaction(2,2);
KineticLaw kl = r.createKineticLaw();
assertTrue( r.isSetKineticLaw() == true );
assertTrue( (kl).getLevel() == 2 );
assertTrue( (kl).getVersion() == 2 );
r = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:9,代码来源:TestReaction_newSetters.cs
示例20: test_KineticLaw_parent_NULL
public void test_KineticLaw_parent_NULL()
{
Reaction r = new Reaction(2,4);
KineticLaw kl = r.createKineticLaw();
Parameter p = kl.createParameter();
assertTrue( r == kl.getParentSBMLObject() );
assertTrue( r == p.getAncestorOfType(libsbml.SBML_REACTION) );
assertTrue( kl == p.getAncestorOfType(libsbml.SBML_KINETIC_LAW) );
KineticLaw kl1 = kl.clone();
assertTrue( kl1.getParentSBMLObject() == null );
assertTrue( kl1.getParameter(0).getAncestorOfType(libsbml.SBML_REACTION) == null );
assertTrue( kl1 == kl1.getParameter(0).getAncestorOfType(libsbml.SBML_KINETIC_LAW) );
r = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:14,代码来源:TestSBMLParentObject.cs
注:本文中的libsbmlcs.Reaction类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论