A dynamic microsimulation framework for python
MIT License
RunState
enumPublished by virgesmith 11 months ago
patch to fix documentation
Published by virgesmith about 1 year ago
The package now contains the following optional dependencies/extras:
geospatial
: geospatial graph functionality based on nextworkx, osmnx, geopandas etcparallel
: MPIdev
: for local package developmentwhich can be installed like so, e.g.
pip install neworder[parallel]
neworder.geospatial.GeoSpatialGraph
is now available - if the geospatial
extra has been selected. (Previously the implementation was in an example)mpi
submodule:
rank()
and size()
are now attributes: RANK
and SIZE
.COMM
attribute, which is either an mpi4py.MPI.Intracomm
instance or None
depending on whether the parallel
extra was installed.time
submodule, the following functions are now attributes:
never()
becomes NEVER
distant_past()
becomes DISTANT_PAST
far_future()
becomes FAR_FUTURE
.Model.modify()
no longer takes an integer argument. Access neworder.mpi.RANK
from within the function.neworder.mpi.RANK
from within a custom implementation function if necessary.Published by virgesmith over 1 year ago
Conda builds are no longer supported as of this release. Conda users should use pip to install version 1.3 or higher.
neworder.Timeline
to create their own timeline implementations and use them within their model.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.seeder
argument to the base model constructor is now optional, and defaults to neworder.MonteCarlo.deterministic_independent_stream
.Model
base class and Timelines to support custom timelinesPublished by virgesmith over 1 year ago
GeospatialGraph
) is contained within the example, not the neworder
package itself.StateGrid
to translate positions according to the given edge behaviourPublished by virgesmith almost 2 years ago
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).
Published by virgesmith over 2 years ago
[none]
Published by virgesmith over 2 years ago
int
class member of Domain
, are now an enum Edge
. e.g. neworder.Domain.WRAP
becomes neworder.Edge.WRAP
.DataFrame.append
.master
to main
.Published by virgesmith about 3 years ago
StateGrid
class to domainsStateGrid
StateGrid
Published by virgesmith over 3 years ago
Release to coincide with publication in the Journal of Open Source Software
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)
)neworder.Domain
, neworder.Space
):
Timeline
, simplifying model construction.Published by virgesmith over 3 years ago
neworder.version()
has been removed and replaced with the more standard neworder.__version__
Published by virgesmith almost 4 years ago
no functional change
CalendarTimeline.dt()
always returned 0.0 for open-ended timelinesPublished by virgesmith almost 4 years ago
checkpoint
method during model run is no longer supported.checkpoint
method has been renamed finalise
and is called after the final timestep.Published by virgesmith almost 4 years ago
This release purely addresses a build configuration issue with conda-forge. Functionally identical to 0.1.0
Published by virgesmith almost 4 years ago
Fixes packaging issues with 0.1.0, otherwise identical
Published by virgesmith almost 4 years ago
new timeline functionality (breaking change):
neworder.LinearTimeline
replaces neworder.Timeline
neworder.NoTimeline
replaces neworder.Timeline.null()
neworder.NumericTimeline
enables arbitrary numeric timelinesneworder.CalendarTimeline
allows date-based timelines with steps in increments of days, months or yearsuse python's warnings mechanism to report warnings, rather than the standard logging mechanism
Published by virgesmith about 4 years ago
Relax min version requirement for numpy and pandas dependencies, to satisfy conda-forge
Published by virgesmith about 4 years ago
MonteCarlo.sample
methodMonteCarlo.state
method (disabled on OSX due to library issue)Model.halt
method for graceful early termination of model runPublished by virgesmith about 4 years ago
trying to resolve conda-forge issues
Published by virgesmith about 4 years ago
first pre-release