Package org.sbml.jsbml

Examples of org.sbml.jsbml.Trigger


    Parameter p = model.createParameter("p1");
    p.setValue(1d);
    Event e = model.createEvent("e1");
    Priority prior = e.createPriority();
    prior.setMath(new ASTNode(1));
    Trigger t = e.createTrigger();
    t.setFormula("time == 1");
    EventAssignment ea = e.createEventAssignment(p, ASTNode
        .parseFormula("3"));
    e.addEventAssignment(ea);
    System.out.println((new SBMLWriter()).writeSBMLToString(doc));
  }
View Full Code Here


    k1.setConstant(false);
    k2.setConstant(false);
   
    Event event = model.createEvent("test_event");
   
    Trigger trigger = event.createTrigger();
    trigger.setMath(ASTNode.geq(new ASTNode(ASTNode.Type.NAME_TIME),
        new ASTNode(10)));
   
    EventAssignment assignment1 = event.createEventAssignment();
    assignment1.setVariable(k1);
    assignment1.setMath(new ASTNode(34));
View Full Code Here

            ListOf<EventAssignment> listOfEventAssignments = (ListOf<EventAssignment>) newContextObject;
            event.setListOfEventAssignments(listOfEventAssignments);

            return listOfEventAssignments;
          } else if (elementName.equals("trigger")) {
            Trigger trigger = (Trigger) newContextObject;
            event.setTrigger(trigger);

            return trigger;
          } else if (elementName.equals("delay")) {
            Delay delay = (Delay) newContextObject;
View Full Code Here

    Parameter p = model.createParameter("p1");
    p.setValue(1d);
    Event e = model.createEvent("e1");
    Priority prior = e.createPriority();
    prior.setMath(new ASTNode(1));
    Trigger t = e.createTrigger();
    t.setFormula("time == 1");
    EventAssignment ea = e.createEventAssignment(p, ASTNode
        .parseFormula("3"));
    e.addEventAssignment(ea);
    System.out.println((new SBMLWriter()).writeSBMLToString(doc));
  }
View Full Code Here

      assertTrue(false);
    }

    Event e1 = new Event(2, 4);
    Event e2 = new Event(2, 4);
    Trigger t = new Trigger(2, 4);
    e1.setTrigger(t);
    e2.setTrigger(t); // TODO : Document the difference : Setting the same trigger object there in jsbml !!!
    e1.createEventAssignment("k1", math);
    e2.createEventAssignment("k2", math);
    M.addEvent(e1);
View Full Code Here

  @Test
  public void test_Model_getEventById() {
    Event e1 = new Event(2, 4);
    Event e2 = new Event(2, 4);
    Trigger t = new Trigger(2, 4);
    e1.setTrigger(t);
    e2.setTrigger(t);
    e1.createEventAssignment();
    e2.createEventAssignment();
    e1.setId("e1");
View Full Code Here

    Model model = doc.createModel("event_model");
    Compartment c = model.createCompartment("compartment");
    model.createSpecies("s1", c);
    model.createSpecies("s2", c);
    Event ev = model.createEvent();
    Trigger trigger = ev.createTrigger(false, true, ASTNode.parseFormula("3 >= 2"));
    trigger.setMath(ASTNode.geq(new ASTNode(ASTNode.Type.NAME_TIME),
        new ASTNode(10)));
    ev.createPriority(ASTNode.parseFormula("25"));
    ev.createDelay(ASTNode.parseFormula("2"));
    ev.createEventAssignment("s1", ASTNode.parseFormula("s2"));
    System.out.println("==================================");
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.Trigger

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.