AB-CE / abce

Agent-based computational Economics, the Python library that makes AB modelling easier
http://abce.readthedocs.io
184 stars 63 forks source link

Get rid of the processing group #107

Closed DavoudTaghawiNejad closed 6 years ago

DavoudTaghawiNejad commented 6 years ago

This pull request gets rid of processing groups and simplifies the single threaded/process operation.

groups are now proxy classes that call the agents, which are stored in SingleProcess (or Multiprocess). SingleProcess is a container that executes agents as told by the proxy group. Multiprocess is a drop-in replacement, that supports multiprocessing.

Messaging is simplified. In single-threaded mode, messages are given directly to the receiver agents inbox. In the MultiProcess mode, messages are shipped as a single package between each process, via pipes. This is much faster. In relatively compute-intensive applications the multiprocessing mode is the number of cores -1 times faster than single-threaded runs.

Multiprocessing does not work under pypy (yet)

rht commented 6 years ago

Multiprocessing does not work under pypy (yet)

I wasn't aware of this before.