samedi 13 mars 2021

How can I randomly choose to do an action or not based on a Poisson distribution model?

I want to simulate the behavior of an employee who may goes and drinks a cup of coffee after he finishes one task based on a Poisson distribution model and on average every hour. I am trying to use the std::poisson_distribution to simulate this process, but this class gives me some random number based on the given average and the Poisson distribution model. I want the behavior of the employee to be random and when he finishes his task, then he decides to go and rest or not. Does anyone know if it is possible to achieve this behavior using the std::poisson_distribution and how?




Aucun commentaire:

Enregistrer un commentaire