本文整理汇总了C#中libsbml.Model类的典型用法代码示例。如果您正苦于以下问题:C# Model类的具体用法?C# Model怎么用?C# Model使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Model类属于libsbml命名空间,在下文中一共展示了Model类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: setUp
public void setUp()
{
M = new Model(2,4);
if (M == null);
{
}
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:7,代码来源:TestModel_newSetters.cs
示例2: setUp
public void setUp()
{
string filename = "../../annotation/test/test-data/annotationL3.xml";
d = libsbml.readSBML(filename);
m = d.getModel();
c = m.getCompartment(0);
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:7,代码来源:TestL3ModelHistory.cs
示例3: 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:mgaldzic,项目名称:copasi_api,代码行数:9,代码来源:TestSBMLParentObject.cs
示例4: 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:mgaldzic,项目名称:copasi_api,代码行数:9,代码来源:TestSBMLParentObject.cs
示例5: 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:mgaldzic,项目名称:copasi_api,代码行数:11,代码来源:TestSBMLDocument.cs
示例6: 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:mgaldzic,项目名称:copasi_api,代码行数:11,代码来源:TestSBMLParentObject.cs
示例7: 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:mgaldzic,项目名称:copasi_api,代码行数:11,代码来源:TestModel_newSetters.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:mgaldzic,项目名称:copasi_api,代码行数:13,代码来源:TestModel_newSetters.cs
示例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:mgaldzic,项目名称:copasi_api,代码行数: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:mgaldzic,项目名称:copasi_api,代码行数:15,代码来源:TestAncestor.cs
示例11: test_Model_createReactant
public void test_Model_createReactant()
{
Model m = new Model(2,2);
Reaction p = m.createReaction();
SpeciesReference sr = m.createReactant();
assertTrue( p.getNumReactants() == 1 );
assertTrue( (sr).getLevel() == 2 );
assertTrue( (sr).getVersion() == 2 );
m = null;
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:10,代码来源:TestModel_newSetters.cs
示例12: test_Model_createKineticLawParameters
public void test_Model_createKineticLawParameters()
{
Model m = new Model(2,2);
Reaction r = m.createReaction();
KineticLaw kl = m.createKineticLaw();
Parameter p = m.createKineticLawParameter();
assertTrue( r.isSetKineticLaw() == true );
assertTrue( kl.getNumParameters() == 1 );
assertTrue( (p).getLevel() == 2 );
assertTrue( (p).getVersion() == 2 );
m = null;
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:12,代码来源:TestModel_newSetters.cs
示例13: test_Model_createParameter
public void test_Model_createParameter()
{
Model m = new Model(2,2);
Parameter p = m.createParameter();
assertTrue( m.getNumParameters() == 1 );
assertTrue( (p).getLevel() == 2 );
assertTrue( (p).getVersion() == 2 );
m = null;
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:9,代码来源:TestModel_newSetters.cs
示例14: test_Model_createInitialAssignment
public void test_Model_createInitialAssignment()
{
Model m = new Model(2,2);
InitialAssignment p = m.createInitialAssignment();
assertTrue( m.getNumInitialAssignments() == 1 );
assertTrue( (p).getLevel() == 2 );
assertTrue( (p).getVersion() == 2 );
m = null;
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:9,代码来源:TestModel_newSetters.cs
示例15: test_Model_createKineticLaw
public void test_Model_createKineticLaw()
{
Model m = new Model(2,2);
Reaction p = m.createReaction();
KineticLaw kl = m.createKineticLaw();
assertTrue( p.isSetKineticLaw() == true );
assertTrue( (kl).getLevel() == 2 );
assertTrue( (kl).getVersion() == 2 );
m = null;
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:10,代码来源:TestModel_newSetters.cs
示例16: test_Model_createConstraint
public void test_Model_createConstraint()
{
Model m = new Model(2,2);
Constraint p = m.createConstraint();
assertTrue( m.getNumConstraints() == 1 );
assertTrue( (p).getLevel() == 2 );
assertTrue( (p).getVersion() == 2 );
m = null;
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:9,代码来源:TestModel_newSetters.cs
示例17: test_Model_createEventAssignment
public void test_Model_createEventAssignment()
{
Model m = new Model(2,2);
Event p = m.createEvent();
EventAssignment ea = m.createEventAssignment();
assertTrue( p.getNumEventAssignments() == 1 );
assertTrue( (ea).getLevel() == 2 );
assertTrue( (ea).getVersion() == 2 );
m = null;
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:10,代码来源:TestModel_newSetters.cs
示例18: test_Model_addSpeciesType2
public void test_Model_addSpeciesType2()
{
Model m = new Model(2,2);
SpeciesType st = new SpeciesType(2,3);
st.setId( "st");
int i = m.addSpeciesType(st);
assertTrue( i == libsbml.LIBSBML_VERSION_MISMATCH );
assertTrue( m.getNumSpeciesTypes() == 0 );
st = null;
m = null;
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:11,代码来源:TestModel_newSetters.cs
示例19: test_Model_createCompartmentType
public void test_Model_createCompartmentType()
{
Model m = new Model(2,2);
CompartmentType p = m.createCompartmentType();
assertTrue( m.getNumCompartmentTypes() == 1 );
assertTrue( (p).getLevel() == 2 );
assertTrue( (p).getVersion() == 2 );
m = null;
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:9,代码来源:TestModel_newSetters.cs
示例20: test_SBase_setNotes
public void test_SBase_setNotes()
{
SBase c = new Model(1,2);
XMLToken token;
XMLNode node;
token = new XMLToken("This is a test note");
node = new XMLNode(token);
c.setNotes(node);
assertTrue( c.isSetNotes() == true );
if (c.getNotes() == node);
{
}
XMLNode t1 = c.getNotes();
assertTrue( t1.getNumChildren() == 1 );
assertTrue(( "This is a test note" == t1.getChild(0).getCharacters() ));
c.setNotes(c.getNotes());
t1 = c.getNotes();
assertTrue( t1.getNumChildren() == 1 );
string chars = t1.getChild(0).getCharacters();
assertTrue(( "This is a test note" == chars ));
c.setNotes((XMLNode)null);
assertTrue( c.isSetNotes() == false );
if (c.getNotes() != null);
{
}
c.setNotes(node);
assertTrue( c.isSetNotes() == true );
token = new XMLToken("(CR) ¨ ¨ ¨ (NOT CR) &#; &#x; �a8; ¨ ¨");
node = new XMLNode(token);
c.setNotes(node);
t1 = c.getNotes();
assertTrue( t1.getNumChildren() == 1 );
string s = t1.getChild(0).toXMLString();
string expected = "(CR) ¨ ¨ ¨ (NOT CR) &#; &#x; &#00a8; &#0168 &#x00a8";
assertTrue(( expected == s ));
token = new XMLToken("& ' > < \" & ' > < "");
node = new XMLNode(token);
c.setNotes(node);
t1 = c.getNotes();
assertTrue( t1.getNumChildren() == 1 );
string s2 = t1.getChild(0).toXMLString();
string expected2 = "& ' > < " & ' > < "";
assertTrue(( expected2 == s2 ));
token = null;
node = null;
}
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:46,代码来源:TestSBase.cs
注:本文中的libsbml.Model类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论