Simulates a Bernoulli process where all individuals in a given source state from sample whether or not to transition to destination state to with a individual probability specified by the DoubleVariable object rate_variable.

multi_probability_bernoulli_process(variable, from, to, rate_variable)

Arguments

variable

a CategoricalVariable object.

from

a string representing the source state.

to

a string representing the destination state.

rate_variable

DoubleVariable giving individual probability of each individual in source state to leave.

Value

a function which can be passed as a process to simulation_loop.