springer-math / Mathematics-of-Epidemics-on-Networks

Source code accompanying 'Mathematics of Epidemics on Networks' by Kiss, Miller, and Simon http://www.springer.com/us/book/9783319508047 . Documentation for the software package is at https://epidemicsonnetworks.readthedocs.io/en/latest/
MIT License
150 stars 61 forks source link

use setuptools and not distutils for more convenient development #73

Closed wwaites closed 3 years ago

wwaites commented 3 years ago

Using setuptools instead of distutils makes it possible to do python setup.py develop which will use the in-place checked out version of the source. This makes it a lot easier to work with packages that depend on EoN and imply changes in EoN (of which more to follow).

wwaites commented 3 years ago

Apologies, I meant to make this two separate pull requests. Nevertheless.

The second change is to the simulation investigation object. It can happen that nodes have a status that does not appear in return_statuses. How can this happen? It can be useful for nodes to have a status that may not change (so is pointless to return as an observable). An example of this is an epidemic on a bipartite graph. See, for example, https://git.sr.ht/~wwaites/netabc/tree/main/netabc/models/hypergraph.py

In that case, one subset of nodes (partition 0) represents individuals as usual. The other subset (partition 1) represents things like households, schools, places of work and so forth. Using a rate function, we can compute the infection rate for individuals in (or connected to) a particular place.

However, this upsets the simulation investigation object because these vertices that represent non-person entities do not have a useful status to return a timeseries of. This fixes that.

joelmiller commented 3 years ago

Thanks - I've merged these two changes.