Loop#
- class Loop(sim)[source]#
Bases:
object
Base class for integration loop
Methods
- run_one_step()[source]#
Take a single step, i.e. call a single function; only used for debugging purposes.
Compare sim.run_one_step(), which runs a full timestep (which involves multiple function calls).
- run(until=None, verbose=None)[source]#
Actually run the integration loop; usually called by sim.run()
- manual_reset()[source]#
Reset the loop to run again. Note, does not reset sim quantities so should only be used for debugging.
- plot(simplify=False, fig_kw=None, plot_kw=None, scatter_kw=None)[source]#
Plot a diagram of all the events
- Parameters:
simplify (bool) – if True, skip update_results and finish_step events, which are automatically applied
fig_kw (dict) – passed to
plt.figure()
plot_kw (dict) – passed to
plt.plot()
scatter_kw (dict) – passed to
plt.scatter()