Package vsv

Examples of vsv.VSVModel


  {
    Recorder.setHostDirectory("/Users/jaywarrick/Desktop/JavaModelOutputs");
    // Recorder.setHostDirectory("C:\\Users\\ctimm\\Desktop\\JavaModelOutputs");
   
    TestSim sim = new TestSim();
    VSVModel model = new VSVModel(); // initializes the model (cell, virus and reactions)
    model.initialize();
    sim.setParams(model, 6 * 60 * 60, 1.0, 15 * 60); // sets the simulation parameters
    sim.call();
   
  }
View Full Code Here


     
      double decay = this.model.cellDecay(this.t);
      // records the amounts of items in the cell pools at given time
      this.recorder.record(this.duration, this.t, this.model.cell, this.dtRecorder, "TestSim", decay);
     
      VSVModel modelk1 = this.getModelk1(this.model);
      this.model.cell.addRates(modelk1.cell, 1.0 / 6.0);
      VSVModel modelk2 = this.getModelk2(modelk1);
      modelk1 = null;
      this.model.cell.addRates(modelk2.cell, 2.0 / 6.0);
      VSVModel modelk3 = this.getModelk3(modelk2);
      modelk2 = null;
      this.model.cell.addRates(modelk3.cell, 2.0 / 6.0);
      VSVModel modelk4 = this.getModelk4(modelk3);
      modelk3 = null;
      this.model.cell.addRates(modelk4.cell, 1.0 / 6.0);
      modelk4 = null;
      this.model.cell.simpleLinearIntegrate(this.dt, this.t, decay);
     
View Full Code Here

    return 0;
  }
 
  private VSVModel getModelk1(VSVModel initialModel)
  {
    VSVModel modelk1 = this.model.copy();
   
    modelk1.cell.clearRates();
   
    // calculate rates based on each reaction in the simulation
    for (Reaction rxn : modelk1.rxns)
View Full Code Here

    return modelk1;
  }
 
  private VSVModel getModelk3(VSVModel modelk2)
  {
    VSVModel modelk3 = this.model.copy();
   
    modelk3.cell.setRates(modelk2.cell);
   
    double decay = modelk3.cellDecay(this.t);
   
    modelk3.cell.simpleLinearIntegrate(this.dt / 2, this.t, decay);
   
    modelk3.cell.mature(this.t);
   
View Full Code Here

    return modelk3;
  }
 
  private VSVModel getModelk4(VSVModel modelk3)
  {
    VSVModel modelk4 = this.model.copy();
   
    modelk4.cell.setRates(modelk3.cell);
   
    double decay = modelk4.cellDecay(this.t);
   
    modelk4.cell.simpleLinearIntegrate(this.dt, this.t, decay);
   
    modelk4.cell.mature(this.t);
   
View Full Code Here

 
  public static void testSim()
  {
    DirectoryManager.setHostDirectory("/Users/jaywarrick/Desktop/JavaModelOutputs");
    // DirectoryManager.setHostDirectory("C:\\Users\\ctimm\\Desktop\\JavaModelOutputs");
    VSVModel model = new VSVModel();
    TestSim sim = new TestSim();
    sim.setParams(model, 5000.0, 1.0, 30.0);
    sim.call();
  }
View Full Code Here

    this.paramTable.add(new Dim(Statics.rib_SPACING, rib_SPACING));
   
    for (DimensionMap params : this.paramTable.getMapIterator())
    {
      // Create the VSVModel to simulate and set the parameters
      VSVModel model = new VSVModel();
      model.initialize();
      model.setParams(params);
     
      // Set up the simulation;
      TestSim sim = new TestSim();
      sim.setParams(model, this.simDuration * 60 * 60, this.dt, this.recorderInterval * 60);
      this.sims.put(params, sim);
View Full Code Here

TOP

Related Classes of vsv.VSVModel

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.