Recent Releases of sim-tools

sim-tools - v0.10.0

Added

  • Add sort argument to DistributionRegistry.create_batch() for dict inputs, ensuring deterministic results if the config key order changes.
  • Add _validate_and_create() to DistributionRegistry which checks that the distribution configurations are dictionaries with only two keys: "class_name" and "params".
  • Add tests for the new sort argument and _validate_and_create() method.

Changed

  • Some linting of _validation.py, time_dependent.py, distributions.py and trace.py.

- Python
Published by TomMonks 7 months ago

sim-tools - v0.9.1

Added

  • Add unit tests for all distributions which check it uses the base class, data types and sample size are correct, that the sample mean looks right, and that the random seed is working. Some similar tests existed, but they did not cover all distributions.
  • Add some specific tests for Lognormal and DiscreteEmpirical.
  • Add back tests for all distributions (which check that new samples are equal to those generated previously, when random seed controlled).

Changed

  • Adjusted docstrings to use a more consistent NumPy style.
  • Some linting of distributions.py.

Fixed

  • DiscreteEmpirical - now allows any type of data to be included. For example, str, as well as numeric value.

- Python
Published by TomMonks 7 months ago

sim-tools - v0.9.0

Added

  • distributions.DistributionRegistry - for batch creation of standard distributions from a dictionary or list.
  • DOCS: DistributionRegistry explanation and examples including use of JSON to store configs.
  • distributions.spawn_seeds function to support creation of PRNG streams.
  • Hyperexponential - A continuous probability distribution that is a mixture (weighted sum) of exponential distributions. It has a higher coefficient of variation than a single exponential distribution, making it useful for modeling highly variable processes or heavy-tailed phenomena.
  • RawContinuousEmpirical - A distribution that performs linear interpolation between data points according to the algorithm described in Law & Kelton's "Simulation Modeling and Analysis".
  • sim_tools._validation: internal module that contains common validation routines for sim_tools functions and classes. #33
  • All distribution classes updated to include validation of input parameters. #33
  • DOCS: Dedicated page for using empirical distributions.

Changed

  • Distribution changed from abstract base class to Protocol. All inheritance removed from concrete classes. #37
  • Added __repr__() to all distribution classes.
  • DOCS: improved docstrings for all distribution classes
  • BREAKING: Discrete -> DiscreteEmpirical
  • BREAKING: RawEmpirical -> RawDiscreteEmpirical
  • BREAKING: ContinuousEmpirical -> GroupedContinuousEmpirical`. To clarify the purpose of the empirical distribution
  • BREAKING: NSPPThinning: class now only requires "meaniat" column in data. Acceptance/rejection calculated using $iat{min} / iat(t)$

Fixed

  • Gamma fix of the calculation of the mean based on alpha and beta.
  • GroupedContinuousEmpirical: silent bug when u selects the first group. Interpolation did not work correctly and sampled out of range. This now been handled by logic pre-sample.
  • NSPPThinning: removed redundant outer loop from sampling.

- Python
Published by TomMonks 10 months ago

sim-tools - v0.8.0

Added

  • Add simpy and treat-sim to the environment, as these were required in the notebooks in docs/.
  • Add nbqa and pylint to the environment for linting, plus a relevant files lint.sh and .pylintrc.
  • Add tests for output_analysis functions (functional, unit and back tests).
  • Add validation of parameters in ReplicationsAlgorithm.
  • Add validation of data type in OnlineStatistics.

Changed

  • Simplified distribution value type tests to a single test where possible using pytest.mark.parametrize.
  • Linted .py and .ipynb files using pylint (most addressed, some remain unresolved).
  • Provided advice on tests, building docs and linting in the README.md.
  • 00_front_page.md now just imported README.md (reducing duplication, and keping it up-to-date).

Removed

  • Removed duplicate sw21_tutorial.ipynb.

Fixed

  • Within confidence_interval_method, convert data provided to OnlineStatistics to np.array so that it is actually used to update the class (when before, it was not, as it was a list).

- Python
Published by TomMonks 11 months ago

sim-tools - v0.8.0

Added

  • Add simpy and treat-sim to the environment, as these were required in the notebooks in docs/.
  • Add nbqa and pylint to the environment for linting, plus a relevant files lint.sh and .pylintrc.
  • Add tests for output_analysis functions (functional, unit and back tests).
  • Add validation of parameters in ReplicationsAlgorithm.
  • Add validation of data type in OnlineStatistics.

Changed

  • Simplified distribution value type tests to a single test where possible using pytest.mark.parametrize.
  • Linted .py and .ipynb files using pylint (most addressed, some remain unresolved).
  • Provided advice on tests, building docs and linting in the README.md.
  • 00_front_page.md now just imported README.md (reducing duplication, and keping it up-to-date).

Removed

  • Removed duplicate sw21_tutorial.ipynb.

Fixed

  • Within confidence_interval_method, convert data provided to OnlineStatistics to np.array so that it is actually used to update the class (when before, it was not, as it was a list).

- Python
Published by TomMonks 11 months ago

sim-tools - v0.7.1

Fixed

  • Patched ReplicationsAlgorithm look ahead will now correctly use _klimit() to calculate extra no. replications to run.

- Python
Published by TomMonks about 1 year ago

sim-tools - v0.7.0

Added

  • output_analysis module - focussed at the moment on selecting the number of replications
  • ReplicationsAlgorithm that implements the automated approach to selecting the number of replications for a single performance measures.
  • ReplicationsAlgorithmModelAdapter - a Protocol to adapt any model to work with with ReplicationsAlgorithm
  • confidence_interval_method - select the number of replication using the classical confidence interval method
  • plotly_confidence_interval_method - visualise the confidence interval method using plotly.
  • ReplicationObserver a Protocol for observering the replications algorithm
  • ReplicationTabulizer record replications algorithm in a pandas dataframe.
  • Documentation for ReplicationsAlgorithm

Updated

  • sim-tools dev conda environment now pip installs local python package in editable model.

- Python
Published by TomMonks about 1 year ago

sim-tools - v0.6.1

Fixed

  • BUILD: added rich library.

Removed

  • BUILD: scipy Dependency

- Python
Published by TomMonks over 1 year ago

sim-tools - v0.6.0

Added

  • Added nspp_plot and nspp_simulation functions to time_dependent module.
  • DOCS: added nspp_plot and nspp_simulation examples to time dependent notebook
  • DOCS: simple trace notebook

Changed

  • BREAKING: to prototype trace functionality. config name -> class breaks with v0.5.0

Fixed

  • THINNING: patched compatibility of thinning algorithm to work with numpy >= v2. np.Inf -> np.inf

- Python
Published by TomMonks over 1 year ago

sim-tools - v0.5.0

Added

  • EXPERIMENTAL: added trace module with Traceable class for colour coding output from different processes and tracking individual patients.

Fixed

  • DIST: fix to NSPPThinning sampling to pre-calcualte mean IAT to ensure that correct exponential mean is used.
  • DIST: normal distribution uses minimum value instead of resampling on negative value.

- Python
Published by TomMonks over 1 year ago

sim-tools - v0.4.0

Changes

  • BUILD: Dropped legacy setuptools and migrated package build to hatch
  • BUILD: Removed setup.py, requirements.txt and MANIFEST in favour of pyproject.toml

- Python
Published by TomMonks almost 2 years ago

sim-tools - v0.3.3

PATCH:

  • PATCH: distributions.Discrete was not returning numpy arrays.

- Python
Published by TomMonks about 2 years ago

sim-tools - v0.3.2

PATCH:

  • Update Github action to publish to pypi. Use setuptools instead of build

- Python
Published by TomMonks about 2 years ago

sim-tools - v0.3.1

PATCH:

  • PYPI has deprecated username and password. PYPI Publish Github action no works with API Token

- Python
Published by TomMonks about 2 years ago

sim-tools - v0.3.0

Changes:

  • Distributions classes now have python type hints.
  • Added distributions and time dependent arrivals via thinning example notebooks.
  • Added datasets module and function to load example NSPP dataset.
  • Distributions added
    • Erlang (mean and stdev parameters)
    • ErlangK (k and theta parameters)
    • Poisson
    • Beta
    • Gamma
    • Weibull
    • PearsonV
    • PearsonVI
    • Discrete (values and observed frequency parameters)
    • ContinuousEmpirical (linear interpolation between groups)
    • RawEmpirical (resample with replacement from individual X's)
    • TruncatedDistribution (arbitrary truncation of any distribution)
  • Added simtools.timedependent module that contains NSPPThinning class for modelling time dependent arrival processes.
  • Updated test suite for distributions and thinning
  • Basic Jupyterbook of documentation.

- Python
Published by TomMonks about 2 years ago

sim-tools - v0.2.1

Changes

Patches

  • Modified Setup tools to avoid numpy import error on build.
  • Updated github action to use up to date actions.

- Python
Published by TomMonks about 2 years ago

sim-tools - v0.2.0

  • Added sim_tools.distribution module. This contains classes representing popular sampling distributions for Discrete-event simulation. All classes encapsulate a numpy.random.Generator object, a random seed, and the parameters of a sampling distribution.

  • Python has been updated, tested, and patched for 3.10 and 3.11 as well as numpy 1.20+

  • Minor linting and code formatting improvement.

- Python
Published by TomMonks about 2 years ago

sim-tools - v0.1.4

v0.1.3 broke ovs.indifference_zone due to name change of function (imported but not used). This dependency has been removed.

- Python
Published by TomMonks over 4 years ago

sim-tools - v.0.1.3

fix for spelling mistake in ovs.toy_models functions that create sequences of Gaussian models. guassian -> gaussian

- Python
Published by TomMonks over 4 years ago

sim-tools - v0.1.2

Minor updates to SW21 tutorial simtools.ovs.toymodel.ManualOptimiser updated. .sigmas -> vars

- Python
Published by TomMonks almost 5 years ago

sim-tools - v0.1.1

Cleaned up readme.md Badge links for OVS to Google Colab. Citation information.

- Python
Published by TomMonks almost 5 years ago

sim-tools - v0.1.0

Initial release.

- Python
Published by TomMonks about 5 years ago