Skip to contents

The functions allow simulations created with simulation to be run and their state to be queried.

Usage

simulation_transmissiontime(sim)

simulation_resettime(sim)

simulation_network(sim)

simulation_graph(sim)

simulation_options(sim)

simulation_isinfected(sim, nodes)

simulation_ninfected(sim)

simulation_addinfections(sim, nodes, times)

Arguments

sim

a simulation object

Value

  • simulation_transmissiontime(sim) return the transmission time distribution

  • simulation_resettime(sim) return the reset/recovery time distribution

  • simulation_network(sim) return the network. Previusly called simulation_graph.

  • simulation_options(sim) return the algorithm options specified when the simulation was created

  • simulation_isinfected(sim, nodes) returns a boolen vector (of same length as nodes) containing true if the node is infected

  • simulation_ninfected(sim) returns the current number of infected nodes

  • simulation_addinfections(sim, nodes, times) markes the nodes in nodes as infected at the specific times in times

  • simulation_run(sim, stop, opts) runs the simulation, see simulation_run for details

See also