You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
The key has expired.
v2.2.0
Breaking Changes
Report resulting from outputs.network.calc_component_stats, has been slimmed down. Most of the columns can now be derived from the basic report (see New Features), the only fully deprecated column is centrality.
New Features
Add components as a reportable class in the basic report. After the partnering phase of each time step, the agent attribute component is updated to match the id of their current component. This enables stats to be collected by component as well as other classes (e.g. race). If an agent is not in a component (should only happen on a time step they died), their component ID is -1.
Various performance improvements.
Technical Notes
Changed references to marshall-lab to pph-collective.
Updated np_random variables to use default_rng instead of RandomState per numpy's latest guidance.
Added safe_random_int for consistency across numpy and python random integer choosing as well as performance.
Use custom effective_size instead of networkx's which is tailored to the assumption of our model (much faster).
Only print rows in the basic report which have agents.
Change assorting algorithm so that eligible agents are shuffled, then the first agent that matches the assorting criteria is returned (about twice as fast as previous).
high_risk no longer ends relationships, it marks their duration as 0 so they are ended at the beginning of the next time step.
Re-ordered update_all_agents for consistency of reporting.
No longer create copies of components, not necessary given usage.
Break some large functions into smaller functions.
Add utility functions for getting the bin from a bins param.
safe_shuffle now returns an empty list if there are no items to shuffle (instead of None).