neworder

A dynamic microsimulation framework for python

MIT License

Downloads
802
Stars
18
neworder - Maintenance release v1.4.2 Latest Release

Published by virgesmith 5 months ago

Functional changes

  • add RunState enum
  • update documentation

Other changes

  • Update dependencies
  • Update CI: python 3.10/3.11/3.12
  • linting and formatting
neworder - 1.4.1

Published by virgesmith 11 months ago

patch to fix documentation

neworder - 1.4.0

Published by virgesmith about 1 year ago

Packaging changes

The package now contains the following optional dependencies/extras:

  • geospatial: geospatial graph functionality based on nextworkx, osmnx, geopandas etc
  • parallel: MPI
  • dev: for local package development

which can be installed like so, e.g.

pip install neworder[parallel]

Functional changes

  • neworder.geospatial.GeoSpatialGraph is now available - if the geospatial extra has been selected. (Previously the implementation was in an example)
  • Changes to the mpi submodule:
    • the functions rank() and size() are now attributes: RANK and SIZE.
    • there is a new COMM attribute, which is either an mpi4py.MPI.Intracomm instance or None depending on whether the parallel extra was installed.
  • In the time submodule, the following functions are now attributes:
    • never() becomes NEVER
    • distant_past() becomes DISTANT_PAST
    • far_future() becomes FAR_FUTURE.

Internal changes

  • Model.modify() no longer takes an integer argument. Access neworder.mpi.RANK from within the function.
  • seeder functions no longer take an integer argument. Access neworder.mpi.RANK from within a custom implementation function if necessary.
  • packaging and CI improvements
neworder - v1.3.1

Published by virgesmith over 1 year ago

Packaging changes

Conda builds are no longer supported as of this release. Conda users should use pip to install version 1.3 or higher.

Functional changes

  • Custom timeline support. Users can now subclass neworder.Timeline to create their own timeline implementations and use them within their model.
  • The following timeline attributes that were methods are now properties: at_end, dt, end, index, nsteps, start, time. Although this is potentially a breaking change, it's not considered significant enough to warrant a major version bump.
  • The seeder argument to the base model constructor is now optional, and defaults to neworder.MonteCarlo.deterministic_independent_stream.

Internal changes

  • Refactoring of Model base class and Timelines to support custom timelines
  • Changes to CI workflows

Bugfixes

  • Security fix for example dependencies
neworder - v1.2.1

Published by virgesmith over 1 year ago

Functional changes

  • Added "infection" example to demonstrate movement on a spatial network. In order to avoid a large increase in package dependencies, the spatial domain implementation (GeospatialGraph) is contained within the example, not the neworder package itself.
  • Improved and extended "boids" examples, now with 2d and 3d versions
  • added functionality to StateGrid to translate positions according to the given edge behaviour
  • python 3.9 and below are no longer supported

Internal changes

  • updates to CI

bugfixes

  • fixed display issue with n-body example
neworder - v1.2.0

Published by virgesmith almost 2 years ago

Functional changes

  • The neworder Monte-Carlo engine can now be used directly as a numpy random generator, giving access to all of numpy's random functionality. Create a generator via the as_np adapter method, e.g.:

    model = no.Model(no.NoTimeline(), no.MonteCarlo.deterministic_identical_stream)
    gen = no.as_np(model.mc)
    normals = gen.normal(size=100)
    
  • MonteCarlo.state() method now works on OSX (was previously disabled due to an apparent bug in the MT19937 implementation).

Internal

  • numerous minor updates
  • use C++20 standard
neworder - v1.1.1

Published by virgesmith over 2 years ago

Functional changes

[none]

Internal

  • Fix spurious MSVC17 compiler error on conda.
neworder - v1.1.0

Published by virgesmith over 2 years ago

Functional changes

  • All python code, including examples, now have type annotations. Type stubs have also been generated for the core (C++) library. Your IDE should now display signatures and docstrings for each function. The API documentation on the website is now redundant and has been reomved.
  • Domain edge behaviours, previously an int class member of Domain, are now an enum Edge. e.g. neworder.Domain.WRAP becomes neworder.Edge.WRAP.

Examples

  • The Conway example has been improved.

Internal

  • Removed some deprecated function calls, e.g DataFrame.append.
  • rename master to main.
  • changes to CI builds.
neworder - v1.0.1

Published by virgesmith about 3 years ago

Functional changes

  • add StateGrid class to domains

Examples

  • convert Schelling example to use StateGrid
  • add Conway's game of life example that uses StateGrid
  • minor corrections to documentation
  • docker container now installs neworder from package repo

Internal

  • add lint (flake8) and config
neworder - v1.0.0

Published by virgesmith over 3 years ago

neworder 1.0.0

Release to coincide with publication in the Journal of Open Source Software

Breaking changes

  • Model.timeline and Model.mc are now class attributes where they were previously methods. (Change e.g. model.mc().ustream(10) to model.mc.ustream(10))

Functional changes

  • Add initial spatial domain support (neworder.Domain, neworder.Space):
    • continuous rectangular domain in n dimensions
    • domain edges can be wrapped, contrained, mirrored or unbounded
    • calculate positions, distances, proximity and movement for points in the domain
  • New example using the domain functionality: boids flocking
  • Migrate existing examples to use new domain functionality, where appropriate
  • Fixes for wolf-sheep predation example

Other

  • Various minor improvements resulting from JOSS reviewer comments.

Internals

  • add a virtual clone method to Timeline, simplifying model construction.
  • migration of most CI builds to github workflows.
neworder - v0.3.0

Published by virgesmith over 3 years ago

Examples

  • new: 3d N-body simulation
  • new: wolf-sheep predation model
  • fixed interactive figures (for matplotlib 3.4)

Internal improvements

  • refactor package to support multiple submodules in future releases - allows for mixed python and C++ implementations
  • enabled test coverage (codecov.io)

Breaking changes

  • The function neworder.version() has been removed and replaced with the more standard neworder.__version__
neworder - v0.2.1

Published by virgesmith almost 4 years ago

neworder 0.2.1

no functional change

Bugfixes

  • fix issue where CalendarTimeline.dt() always returned 0.0 for open-ended timelines
neworder - v0.2.0

Published by virgesmith almost 4 years ago

neworder 0.2.0 release

Breaking changes

  • Calling the Model's checkpoint method during model run is no longer supported.
  • The Model's checkpoint method has been renamed finalise and is called after the final timestep.

New features

  • Monte-Carlo: added Poisson counts function
  • Timeline: added open-ended linear timeline
  • Timeline: added open-ended calendar timeline

Internal improvements

  • Monte-Carlo: improved input parameter validation
  • make global state parameters atomic
  • consolidated CI builds: moved travis builds to appveyor
  • examples code tar/zip files now versioned
neworder - v0.1.2

Published by virgesmith almost 4 years ago

This release purely addresses a build configuration issue with conda-forge. Functionally identical to 0.1.0

neworder - v0.1.1

Published by virgesmith almost 4 years ago

Fixes packaging issues with 0.1.0, otherwise identical

neworder - v0.1.0

Published by virgesmith almost 4 years ago

New features

  • new timeline functionality (breaking change):

    • neworder.LinearTimeline replaces neworder.Timeline
    • neworder.NoTimeline replaces neworder.Timeline.null()
    • neworder.NumericTimeline enables arbitrary numeric timelines
    • neworder.CalendarTimeline allows date-based timelines with steps in increments of days, months or years
  • use python's warnings mechanism to report warnings, rather than the standard logging mechanism

Bug fixes

  • fix bug where Monte-Carlo functions would fail because tolerance of probabilities summing to exactly 1 was too tight - tolerance is now ~1e-8
  • ensure that checkpoint code is still run on current timestep even if halt signal has been sent
neworder - v0.0.8

Published by virgesmith about 4 years ago

Relax min version requirement for numpy and pandas dependencies, to satisfy conda-forge

neworder - v0.0.7

Published by virgesmith about 4 years ago

Functional changes

  • add MonteCarlo.sample method
  • add MonteCarlo.state method (disabled on OSX due to library issue)
  • add Model.halt method for graceful early termination of model run

Other changes

  • Major updates to examples and documentation
  • Usable Docker image containing all the examples code
neworder - v0.0.6

Published by virgesmith about 4 years ago

trying to resolve conda-forge issues

neworder - v0.0.5

Published by virgesmith about 4 years ago

first pre-release

Package Rankings
Top 6.58% on Pypi.org
Badges
Extracted from project README
PyPI - Python Version PyPI License DOI Build and test MPI test codecov Documentation Status Codacy Badge