RuleWorld / bionetgen

Rule-based modeling framework
https://bionetgen.org/
MIT License
59 stars 25 forks source link

Improved progress tracking for simulation runs #196

Closed johnsekar closed 6 years ago

johnsekar commented 6 years ago

Suggest track_progress=>0/1 for SSA runs, which will enable console output whenever a recording timestep is passed, e.g.,

Example output:

Running SSA between t=0 and t=1
Reached t=0.2 in 5.1 seconds
Reached t=0.4 in 6.2 seconds
Reached t=0.8 in 6.9 seconds
Reached t=1 in 6.0 seconds
Simulation complete.

This will be useful for very long simulation runs, where the modeler can track the progress and terminate if they think it is going to take too long.

johnsekar commented 6 years ago

Can be accomplished using verbose=>1 in simulate(), works for SSA and ODE and by default in NFsim

Sample output

Stochastic simulation using direct Gillespie algorithm
           time  n_steps n_rate_calls  % spec   % rxn  n_species  n_rxns
       0.000000        0            2  66.667  50.000          3       2
       0.100000        5           12 100.000 100.000          3       2
       0.200000        7           14 100.000 100.000          3       2
       0.300000       15           30 100.000 100.000          3       2