本文整理汇总了C#中libsbmlcs.SBMLDocument.getError方法的典型用法代码示例。如果您正苦于以下问题:C# SBMLDocument.getError方法的具体用法?C# SBMLDocument.getError怎么用?C# SBMLDocument.getError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libsbmlcs.SBMLDocument
的用法示例。
在下文中一共展示了SBMLDocument.getError方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: test_internal_consistency_check_20306
public void test_internal_consistency_check_20306()
{
SBMLDocument d = new SBMLDocument(3,1);
long errors;
Model m = d.createModel();
FunctionDefinition fd = m.createFunctionDefinition();
fd.setId("fd");
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 20306 );
ASTNode ast = libsbml.parseFormula("lambda(x, 2*x)");
fd.setMath(ast);
errors = d.checkInternalConsistency();
assertTrue( errors == 0 );
d = null;
}
示例2: test_internal_consistency_check_99904_model
public void test_internal_consistency_check_99904_model()
{
SBMLDocument d = new SBMLDocument(2,4);
long errors;
d.setLevelAndVersion(1,2,false);
Model m = new Model(2,4);
Compartment c = m.createCompartment();
c.setId("cc");
m.setMetaId("mmm");
d.setModel(m);
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 20201 );
d = null;
}
示例3: test_internal_consistency_check_20419
public void test_internal_consistency_check_20419()
{
SBMLDocument d = new SBMLDocument(3,1);
long errors;
Model m = d.createModel();
UnitDefinition ud = m.createUnitDefinition();
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 20419 );
ud.setId("ud");
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 0 );
d = null;
}
示例4: test_internal_consistency_check_99902
public void test_internal_consistency_check_99902()
{
SBMLDocument d = new SBMLDocument(2,4);
long errors;
Compartment c = new Compartment(2,4);
d.setLevelAndVersion(1,2,false);
Model m = d.createModel();
c.setCompartmentType("hh");
c.setId("c");
m.addCompartment(c);
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 10103 );
d = null;
}
示例5: test_internal_consistency_check_21231
public void test_internal_consistency_check_21231()
{
SBMLDocument d = new SBMLDocument(3,1);
long errors;
Model m = d.createModel();
Event r = m.createEvent();
r.setUseValuesFromTriggerTime(true);
ASTNode ast = libsbml.parseFormula("2*x");
Trigger t = r.createTrigger();
t.setMath(ast);
t.setPersistent(true);
t.setInitialValue(false);
EventAssignment ea = r.createEventAssignment();
ea.setVariable("ea");
ea.setMath(ast);
Priority prior = r.createPriority();
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 21231 );
prior.setMath(ast);
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 0 );
d = null;
}
示例6: test_internal_consistency_check_21172
public void test_internal_consistency_check_21172()
{
SBMLDocument d = new SBMLDocument(3,1);
long errors;
Model m = d.createModel();
Reaction r = m.createReaction();
r.setId("r");
r.setReversible(true);
r.setFast(false);
SpeciesReference sr = r.createReactant();
sr.setSpecies("s");
sr.setConstant(true);
KineticLaw kl = r.createKineticLaw();
ASTNode ast = libsbml.parseFormula("2*x");
kl.setMath(ast);
LocalParameter lp = kl.createLocalParameter();
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 21172 );
lp.setId("pp");
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 0 );
d = null;
}
示例7: test_internal_consistency_check_20517
public void test_internal_consistency_check_20517()
{
SBMLDocument d = new SBMLDocument(3,1);
long errors;
Model m = d.createModel();
Compartment c = m.createCompartment();
errors = d.checkInternalConsistency();
assertTrue( errors == 2 );
assertTrue( d.getError(0).getErrorId() == 20517 );
assertTrue( d.getError(1).getErrorId() == 20517 );
c.setId("c");
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 20517 );
c.setConstant(true);
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 0 );
d = null;
}
示例8: test_WriteL3SBML_error
public void test_WriteL3SBML_error()
{
SBMLDocument d = new SBMLDocument();
SBMLWriter w = new SBMLWriter();
assertEquals( false, w.writeSBML(d, "/tmp/impossible/path/should/fail") );
assertTrue( d.getNumErrors() == 1 );
assertTrue( d.getError(0).getErrorId() == libsbml.XMLFileUnwritable );
d = null;
w = null;
}
示例9: test_internal_consistency_check_21007
public void test_internal_consistency_check_21007()
{
SBMLDocument d = new SBMLDocument(3,1);
long errors;
Model m = d.createModel();
Constraint r = m.createConstraint();
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 21007 );
ASTNode ast = libsbml.parseFormula("lambda(x, 2*x)");
r.setMath(ast);
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 0 );
d = null;
}
示例10: test_internal_consistency_check_20908
public void test_internal_consistency_check_20908()
{
SBMLDocument d = new SBMLDocument(3,1);
long errors;
Model m = d.createModel();
AssignmentRule r = m.createAssignmentRule();
ASTNode ast = libsbml.parseFormula("lambda(x, 2*x)");
r.setMath(ast);
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 20908 );
r.setVariable("fd");
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 0 );
d = null;
}
示例11: test_internal_consistency_check_20805
public void test_internal_consistency_check_20805()
{
SBMLDocument d = new SBMLDocument(3,1);
long errors;
Model m = d.createModel();
InitialAssignment ia = m.createInitialAssignment();
ASTNode ast = libsbml.parseFormula("lambda(x, 2*x)");
ia.setMath(ast);
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 20805 );
ia.setSymbol("fd");
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 0 );
d = null;
}
示例12: test_internal_consistency_check_20706
public void test_internal_consistency_check_20706()
{
SBMLDocument d = new SBMLDocument(3,1);
long errors;
Model m = d.createModel();
Parameter p = m.createParameter();
errors = d.checkInternalConsistency();
assertTrue( errors == 2 );
assertTrue( d.getError(0).getErrorId() == 20706 );
assertTrue( d.getError(1).getErrorId() == 20706 );
p.setId("c");
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 20706 );
p.setConstant(true);
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 0 );
d = null;
}
示例13: test_internal_consistency_check_99921
public void test_internal_consistency_check_99921()
{
SBMLDocument d = new SBMLDocument(2,4);
long errors;
SpeciesReference sr = new SpeciesReference(2,4);
d.setLevelAndVersion(2,1,false);
Model m = d.createModel();
Compartment c = m.createCompartment();
c.setId("c");
Species s = m.createSpecies();
s.setId("s");
Reaction r = m.createReaction();
r.setId("r");
s.setCompartment("c");
sr.setSpecies("s");
sr.setName("mmm");
r.addReactant(sr);
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 21101 );
d = null;
}
示例14: test_internal_consistency_check_20623
public void test_internal_consistency_check_20623()
{
SBMLDocument d = new SBMLDocument(3,1);
long errors;
Model m = d.createModel();
Compartment c = m.createCompartment();
c.setId("c");
c.setConstant(true);
Species s = m.createSpecies();
errors = d.checkInternalConsistency();
assertTrue( errors == 5 );
assertTrue( d.getError(0).getErrorId() == 20623 );
assertTrue( d.getError(1).getErrorId() == 20614 );
assertTrue( d.getError(2).getErrorId() == 20623 );
assertTrue( d.getError(3).getErrorId() == 20623 );
assertTrue( d.getError(4).getErrorId() == 20623 );
s.setId("s");
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 4 );
assertTrue( d.getError(0).getErrorId() == 20614 );
assertTrue( d.getError(1).getErrorId() == 20623 );
assertTrue( d.getError(2).getErrorId() == 20623 );
assertTrue( d.getError(3).getErrorId() == 20623 );
s.setCompartment("c");
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 3 );
assertTrue( d.getError(0).getErrorId() == 20623 );
assertTrue( d.getError(1).getErrorId() == 20623 );
assertTrue( d.getError(2).getErrorId() == 20623 );
s.setHasOnlySubstanceUnits(true);
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 2 );
assertTrue( d.getError(0).getErrorId() == 20623 );
assertTrue( d.getError(1).getErrorId() == 20623 );
s.setBoundaryCondition(true);
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 20623 );
s.setConstant(true);
d.getErrorLog().clearLog();
errors = d.checkInternalConsistency();
assertTrue( errors == 0 );
d = null;
}
示例15: test_internal_consistency_check_99911_model
public void test_internal_consistency_check_99911_model()
{
SBMLDocument d = new SBMLDocument(2,4);
long errors;
d.setLevelAndVersion(2,1,false);
Model m = new Model(2,4);
m.setSBOTerm(2);
d.setModel(m);
errors = d.checkInternalConsistency();
assertTrue( errors == 1 );
assertTrue( d.getError(0).getErrorId() == 20201 );
d = null;
}