Template:Team:Paris Saclay/simbox
From 2013.igem.org
(Difference between revisions)
Line 42: | Line 42: | ||
this.refresh_interval= 100; | this.refresh_interval= 100; | ||
this.timeout= null; | this.timeout= null; | ||
+ | this.curtime= 0.0; | ||
} | } | ||
Line 228: | Line 229: | ||
//Reset quantities, clear curves | //Reset quantities, clear curves | ||
+ | sim.curtime= 0; | ||
for(var i= 0 ; i < simulations[simid].molecules.length ; ++i) | for(var i= 0 ; i < simulations[simid].molecules.length ; ++i) | ||
{ | { | ||
Line 289: | Line 291: | ||
var reac= sim.reactions[sim.reac_order[i]]; | var reac= sim.reactions[sim.reac_order[i]]; | ||
- | var proba= reac.probability; | + | var proba= reac.probability * sim.timestep; |
for(var j= 0 ; j < reac.inputs.length ; ++j) | for(var j= 0 ; j < reac.inputs.length ; ++j) | ||
{ | { | ||
Line 354: | Line 356: | ||
for(var i= 0 ; i < sim.molecules.length ; ++i) | for(var i= 0 ; i < sim.molecules.length ; ++i) | ||
sim.molecules[i].history.push(sim.molecules[i].quantity); | sim.molecules[i].history.push(sim.molecules[i].quantity); | ||
+ | |||
+ | sim.curtime += sim.timestep; | ||
} | } | ||
Revision as of 00:18, 3 August 2013