checkInternalConsistency() public method

public checkInternalConsistency ( ) : long
return long
 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;
 }
 public void test_internal_consistency_check_99903_param()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Parameter p = new Parameter(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("cc");
       p.setConstant(true);
       p.setId("c");
       m.addParameter(p);
       Rule r = m.createAssignmentRule();
       r.setVariable("c");
       r.setFormula("2*3");
       errors = d.checkInternalConsistency();
       assertTrue( errors == 2 );
       d = null;
 }
 public void test_internal_consistency_check_99903_localparam()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Parameter p = new Parameter(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("cc");
       Reaction r = m.createReaction();
       r.setId("r");
       KineticLaw kl = r.createKineticLaw();
       kl.setFormula("2");
       p.setId("p");
       p.setConstant(false);
       kl.addParameter(p);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99916_rule()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Species s = new Species(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("c");
       s.setId("s");
       s.setCompartment("c");
       s.setConstant(true);
       m.addSpecies(s);
       Rule r = m.createAssignmentRule();
       r.setVariable("s");
       r.setFormula("2");
       errors = d.checkInternalConsistency();
       assertTrue( errors == 2 );
       d = null;
 }
 public void test_internal_consistency_check_99915_alg()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Model m = d.createModel();
       Rule r = new AlgebraicRule(2,4);
       d.setLevelAndVersion(2,1,false);
       r.setUnits("kk");
       m.addRule(r);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99912()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       FunctionDefinition fd = new FunctionDefinition(2,4);
       Model m = d.createModel();
       d.setLevelAndVersion(1,2,false);
       Compartment c = m.createCompartment();
       c.setId("cc");
       c.setConstant(false);
       m.addFunctionDefinition(fd);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99911_react()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Model m = d.createModel();
       Reaction r = new Reaction(2,4);
       d.setLevelAndVersion(2,1,false);
       r.setId("r");
       r.setSBOTerm(2);
       m.addReaction(r);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 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;
 }
 public void test_internal_consistency_check_99905_st()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       SpeciesType ct = new SpeciesType(2,4);
       Model m = d.createModel();
       d.setLevelAndVersion(2,2,false);
       ct.setId("st");
       ct.setSBOTerm(5);
       m.addSpeciesType(ct);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99904_unitdef()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       UnitDefinition u = new UnitDefinition(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("cc");
       u.setId("ud");
       u.setMetaId("mmm");
       u.createUnit();
       m.addUnitDefinition(u);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99904_rule_rate()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Rule r = new RateRule(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("cc");
       c.setConstant(false);
       r.setVariable("cc");
       r.setFormula("2");
       r.setMetaId("mmm");
       m.addRule(r);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99904_react()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Reaction r = new Reaction(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("cc");
       r.setId("r");
       r.setMetaId("mmm");
       m.addReaction(r);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99904_param()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Parameter p = new Parameter(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("cc");
       p.setId("p");
       p.setMetaId("mmm");
       m.addParameter(p);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 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;
 }
 public void test_internal_consistency_check_99904_kl()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       KineticLaw kl = new KineticLaw(2,4);
       Model m = d.createModel();
       d.setLevelAndVersion(1,2,false);
       Compartment c = m.createCompartment();
       c.setId("cc");
       Reaction r = m.createReaction();
       r.setId("r");
       kl.setFormula("2");
       kl.setMetaId("mmm");
       r.setKineticLaw(kl);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99911_fd()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Model m = d.createModel();
       FunctionDefinition fd = new FunctionDefinition(2,4);
       d.setLevelAndVersion(2,1,false);
       fd.setId("fd");
       fd.setSBOTerm(2);
       m.addFunctionDefinition(fd);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99911_kl()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       d.setLevelAndVersion(2,1,false);
       long errors;
       Model m = d.createModel();
       Reaction r = m.createReaction();
       r.setId("r");
       KineticLaw kl = new KineticLaw(2,4);
       kl.setSBOTerm(2);
       Parameter p = kl.createParameter();
       p.setId("p");
       r.setKineticLaw(kl);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99905_stoichmath()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       StoichiometryMath sm = new StoichiometryMath(2,4);
       Model m = d.createModel();
       d.setLevelAndVersion(2,2,false);
       Species s = m.createSpecies();
       s.setId("s");
       Compartment c = m.createCompartment();
       c.setId("c");
       s.setCompartment("c");
       Reaction r = m.createReaction();
       r.setId("r");
       SpeciesReference sr = r.createProduct();
       sr.setSpecies("s");
       sm.setSBOTerm(5);
       sr.setStoichiometryMath(sm);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99911_param()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Model m = d.createModel();
       Parameter p = new Parameter(2,4);
       d.setLevelAndVersion(2,1,false);
       p.setId("p");
       p.setSBOTerm(2);
       m.addParameter(p);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99905_trigger()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Trigger trigger = new Trigger(2,4);
       Event e = new Event(2,4);
       Model m = d.createModel();
       d.setLevelAndVersion(2,2,false);
       trigger.setSBOTerm(5);
       e.setTrigger(trigger);
       m.addEvent(e);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99911_rule_rate()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Model m = d.createModel();
       Parameter p = m.createParameter();
       p.setId("p");
       p.setConstant(false);
       Rule r = new RateRule(2,4);
       d.setLevelAndVersion(2,1,false);
       r.setVariable("p");
       r.setSBOTerm(2);
       m.addRule(r);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99905_unitdef()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       UnitDefinition u = new UnitDefinition(2,4);
       d.setLevelAndVersion(2,2,false);
       Model m = d.createModel();
       u.setId("ud");
       u.setSBOTerm(9);
       u.createUnit();
       m.addUnitDefinition(u);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99913()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       InitialAssignment ia = new InitialAssignment(2,4);
       Model m = d.createModel();
       d.setLevelAndVersion(1,2,false);
       Compartment c = m.createCompartment();
       c.setId("cc");
       c.setConstant(false);
       m.addInitialAssignment(ia);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99909()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Constraint ct = new Constraint(2,4);
       Model m = d.createModel();
       d.setLevelAndVersion(2,1,false);
       m.addConstraint(ct);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99915_rate()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("c");
       c.setConstant(false);
       RateRule r = m.createRateRule();
       r.setL1TypeCode(libsbml.SBML_SPECIES_CONCENTRATION_RULE);
       r.setFormula("2");
       r.setVariable("c");
       r.setUnits("mmm");
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99911_ea()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       d.setLevelAndVersion(2,1,false);
       long errors;
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("c");
       c.setConstant(false);
       Event e = m.createEvent();
       EventAssignment ea = new EventAssignment(2,4);
       ea.setVariable("c");
       ea.setSBOTerm(2);
       e.addEventAssignment(ea);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99919()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Species s = new Species(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("c");
       s.setId("s");
       s.setCompartment("c");
       s.setHasOnlySubstanceUnits(true);
       m.addSpecies(s);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99911_event()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Event e = new Event(2,4);
       Model m = d.createModel();
       d.setLevelAndVersion(2,1,false);
       e.setSBOTerm(2);
       m.addEvent(e);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }
 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 == 0 );
       d = null;
 }
 public void test_internal_consistency_check_99925()
 {
     SBMLDocument d = new SBMLDocument(2,4);
       long errors;
       Unit u = new Unit(2,4);
       d.setLevelAndVersion(1,2,false);
       Model m = d.createModel();
       Compartment c = m.createCompartment();
       c.setId("cc");
       UnitDefinition ud = m.createUnitDefinition();
       ud.setId("ud");
       u.setKind(libsbml.UNIT_KIND_MOLE);
       u.setOffset(9);
       ud.addUnit(u);
       errors = d.checkInternalConsistency();
       assertTrue( errors == 0 );
       d = null;
 }