-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make mesa faster #882
Comments
This is the first time PyPy is mentioned in this repo. It should be easy to test if Mesa runs on PyPy with Travis (see e.g. https://github.com/AB-CE/abce/blob/master/.travis.yml#L24). |
In abcEconomics, there is an option to run the execution of each agents in a separate CPU (https://github.com/AB-CE/abce/blob/master/abcEconomics/scheduler/multiprocess.py). If there are 20 agents and 4 CPUs, each CPU could execute 5 agents sequentially, but the 4 CPUs are doing it in parallel independently of each other. See any |
There is also a discussion about mesas performance in #798. To recap my 2 cents on this issue: Mesa is mostly a framework and by itself it doesn't "do" much that could be improved by your suggestions. It really depends on the models it is used for (and if the actions are computationally expensive numba might be a very good and easy to use recommendation). Re parallelism: Depending on the model running agents concurrently is either trivial or (almost) impossible. But usually you will run multiple simulations any way and running those in parallel is far easier, either manually or by using BatchrunnerMP (although it doesn't work at the moment, but it is being worked on). |
It's worth trying Cinder. Currently discussed in https://news.ycombinator.com/item?id=36612835. |
addressing this issue, I started to develop an extension of mesa which makes use of vectorized operations on pandas dataframes to achieve faster runtimes. you can provide a feedback or features you'd like to be supported/introduced here |
I'm going to close this issue as completed, now that we have mesa-frames officially under the Mesa umbrella: If there are any specific issues or ideas for Mesa performance, feel free to open a new issue or discussion! |
What's the problem this feature will solve?
Sadly, Python belongs to the slowest programming languages, but it's friendly code makes it popular and extremely usable.
Agent-based simulations can involve very large number of agents (e.g. millions), where concurrency control, parallelism and run-time speed of simulations could be crucial.
Describe the solution you'd like
Using:
could help a lot in simulation speed ups.
The text was updated successfully, but these errors were encountered: