Ejemplo n.º 1
0
  /*
   * @see org.primordion.xholon.app.IApplication#initialize(java.lang.String)
   */
  public void initialize(String configFileName) throws XholonConfigurationException {
    super.initialize(configFileName);

    // Monitoring with plotting of the monitored data.
    if (getUseDataPlotter()) {
      // Monitor these values as the BloodPlasma and contained Erythrocyte circulate in the
      // CirculatorySystem.
      IXholon monitorContext =
          getXPath().evaluate("./descendant::Heart/LeftVentricle/BloodPlasma[2]", root);
      xhMonitored[0] = getXPath().evaluate("ExtraCellularSolution/Glucose", monitorContext);
      xhMonitored[1] = getXPath().evaluate("ExtraCellularSolution/Oxygen", monitorContext);
      xhMonitored[2] = getXPath().evaluate("ExtraCellularSolution/CarbonDioxide", monitorContext);
      xhMonitored[3] = getXPath().evaluate("Erythrocyte[1]/descendant::Glucose", monitorContext);
      xhMonitored[4] = getXPath().evaluate("Erythrocyte[1]/descendant::Oxygen", monitorContext);
      xhMonitored[5] =
          getXPath().evaluate("Erythrocyte[1]/descendant::CarbonDioxide", monitorContext);
    }

    // write an SBML level 2 file
    // if (writeSbml) {
    //	IXholon sbmlContext = xpath.evaluate("./descendant::Eye/descendant::Cone/TerminalButtons",
    // root);
    //	if (sbmlContext != null) {
    //		Cellontro2Sbml cellontro2sbml = new Cellontro2Sbml("./sbml/LifeModel.xml", "LifeModel",
    // sbmlContext);
    //		cellontro2sbml.writeAll();
    //	}
    // }
  }
Ejemplo n.º 2
0
 /*
  * @see org.primordion.xholon.app.IApplication#wrapup()
  */
 public void wrapup() {
   root.preAct();
   if (getUseDataPlotter()) {
     chartViewer.capture(timeStep);
   }
   super.wrapup();
 }
Ejemplo n.º 3
0
 public void initialize(String configFileName) throws XholonConfigurationException {
   super.initialize(configFileName);
   if (getUseInteractions()) {
     // include complete class name on sequence diagrams, rather than truncating long names
     interaction.setMaxNameLen(100);
     interaction.setMaxDataLen(6);
     IPortInterface providedRequiredInterface = new PortInterface();
     providedRequiredInterface.setInterface(Xhmodel04.getSignalIDs());
     providedRequiredInterface.setInterfaceNames(Xhmodel04.getSignalNames());
     interaction.setProvidedRequiredInterface(providedRequiredInterface);
   }
 }
Ejemplo n.º 4
0
 public void wrapup() {
   root.preAct();
   if (getUseDataPlotter()) {
     chartViewer.capture(getTimeStep());
   }
   if (getUseGridViewer()) {
     for (int vIx = 0; vIx < gridViewers.size(); vIx++) {
       GridViewerDetails gvd = (GridViewerDetails) gridViewers.get(vIx);
       if (gvd.useGridViewer) {
         // gvd.gridFrame.setInfoLabel("Time step: " + timeStep);
         // gvd.gridPanel.paintComponent(gvd.gridPanel.getGraphics());
       }
     }
   }
   super.wrapup();
 }
Ejemplo n.º 5
0
 /*
  * @see org.primordion.xholon.app.Application#wrapup()
  */
 public void wrapup() {
   root.cleanup(); // cancel timers
   super.wrapup();
 }