Package org.sbml.jsbml

Examples of org.sbml.jsbml.RateRule


              return rule;
            } else if (elementName.equals("rateRule")
                && list.getSBaseListType().equals(
                    ListOf.Type.listOfRules)) {
              RateRule rule = (RateRule) newContextObject;
              model.addRule(rule);

              return rule;
            } else if (elementName.equals("constraint")
                && list.getSBaseListType().equals(
View Full Code Here


          Rule rule = model.getRule(i);
          if (rule instanceof AssignmentRule) {
            AssignmentRule assignmentRule = (AssignmentRule) rule;
            setAssignmentRuleVariable(assignmentRule, model);
          } else if (rule instanceof RateRule) {
            RateRule rateRule = (RateRule) rule;
            setRateRuleVariable(rateRule, model);
          }
        }
      }
      if (model.isSetListOfCompartments()) {
View Full Code Here

  /**
   *
   * @return
   */
  public RateRule cloneAsRateRule() {
    return new RateRule(this);
  }
View Full Code Here

  @Test
  public void test_Model_addRules() throws ParseException {
    Rule r1 = new AlgebraicRule(2, 4);
    AssignmentRule r2 = new AssignmentRule(2, 4);
    RateRule r3 = new RateRule(2, 4);
    r2.setVariable("r2");
    r3.setVariable("r3");
    r1.setMath(ASTNode.parseFormula("2"));
    r2.setMath(ASTNode.parseFormula("2"));
    r3.setMath(ASTNode.parseFormula("2"));
    M.addRule(r1);
    M.addRule(r2);
    M.addRule(r3);
    assertTrue(M.getNumRules() == 3);
  }
View Full Code Here

  }

  @Test
  public void test_Model_removeRule() {
    Rule o1, o2;
    RateRule o3;
    o1 = M.createAssignmentRule();
    o2 = M.createAlgebraicRule();
    o3 = M.createRateRule();
    o3.setVariable("test");
    assertTrue(M.removeRule(0).equals(o1));
    assertTrue(M.getNumRules() == 2);
    assertTrue(M.removeRule(0).equals(o2));
    assertTrue(M.getNumRules() == 1);
    assertTrue( M.removeRule("test").equals(o3) );
View Full Code Here

                && !assignmentRule.isSetUnitsInstance()
                && assignmentRule.isParameter()) {
              log4jLogger.warn("No UnitDefinition matches the unitsID of AssignmentRule.");
            }
          } else if (rule instanceof RateRule) {
            RateRule rateRule = (RateRule) rule;
            if (rateRule.isSetVariable()
                && !rateRule.isSetVariableInstance()) {
              log4jLogger.warn("No Symbol matches the variableID of RateRule.");
            }
          }
        }
      }
View Full Code Here

              return rule;
            } else if (elementName.equals("rateRule")
                && list.getSBaseListType().equals(
                    ListOf.Type.listOfRules)) {
              RateRule rule = (RateRule) newContextObject;
              model.addRule(rule);

              return rule;
            } else if (elementName.equals("constraint")
                && list.getSBaseListType().equals(
View Full Code Here

          Rule rule = model.getRule(i);
          if (rule instanceof AssignmentRule) {
            AssignmentRule assignmentRule = (AssignmentRule) rule;
            setAssignmentRuleVariable(assignmentRule, model);
          } else if (rule instanceof RateRule) {
            RateRule rateRule = (RateRule) rule;
            setRateRuleVariable(rateRule, model);
          }
        }
      }
      if (model.isSetListOfCompartments()) {
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.RateRule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.