Temporizador de simulación de Python

I'm looking for a way, in Python, to set up a "timer" for multiple agents.

My simulation is going to have many vehicles which will need to wait for independent time periods before performing actions. However, I also want to be able to perform "stop" "start" and "reset" operations on the timer.

Any suggestions on what to use?

preguntado el 25 de abril de 13 a las 00:04

The threads would have to share a timer. The issue is getting a controllable timer that can spread across threads -

1 Respuestas

I would try to use SimPy (https://simpy.readthedocs.org/en/latest/). Probably rather the 2.3.1 version at the moment (although the SimPy3 should be a valid choice when finished).

There are many examples (https://simpy.readthedocs.org/en/2.3.1/Manuals/Examples.html), that seems to be similar to your case. I have used SimPy for simple biology-themed agent-based simulations myself and it worked well.

Respondido 25 Abr '13, 02:04

¡Gracias! ¡Esto es exactamente lo que estaba buscando! - Tabgok

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.