Template:Team:Paris Saclay/simbox

From 2013.igem.org

(Difference between revisions)
Line 35: Line 35:
  this.volume= undefined;
  this.volume= undefined;
  this.timestep= undefined;
  this.timestep= undefined;
 +
this.cfactor= undefined;
  this.molecules= new Array();
  this.molecules= new Array();
  this.reactions= new Array();
  this.reactions= new Array();
Line 92: Line 93:
  simulations[id].volume= parseFloat(xmldata.getElementsByTagName("volume")[0].childNodes[0].nodeValue);
  simulations[id].volume= parseFloat(xmldata.getElementsByTagName("volume")[0].childNodes[0].nodeValue);
  simulations[id].timestep= parseFloat(xmldata.getElementsByTagName("timestep")[0].childNodes[0].nodeValue);
  simulations[id].timestep= parseFloat(xmldata.getElementsByTagName("timestep")[0].childNodes[0].nodeValue);
 +
simulations[id].cfactor= parseFloat(xmldata.getElementsByTagName("concentration_factor")[0].childNodes[0].nodeValue);
  //Load molecules
  //Load molecules
Line 321: Line 323:
     usedmols[outid]--;
     usedmols[outid]--;
   }
   }
-
   proba /= Math.pow(sim.volume, reac.inputs.length);
+
   proba *= Math.pow(sim.cfactor/sim.volume, reac.inputs.length);
   //alert('BEFORE : reac '+i+ ' proba=' + proba);
   //alert('BEFORE : reac '+i+ ' proba=' + proba);

Revision as of 02:06, 3 August 2013