Simulate a process where individuals in a given from
state
advance to the to
state each time step with probability rate
.
bernoulli_process(variable, from, to, rate)
a categorical variable.
a string representing the source category.
a string representing the destination category.
the probability to move individuals between categories.
a function which can be passed as a process to simulation_loop
.