Releases: stewid/SimInf
CRAN release v8.3.2
BUG FIXES
-
Updated the build configuration script ('src/Makevars.ucrt') for Windows UCRT to fix the installation failure on CRAN introduced in version 8.3.0. Thanks to Tomas Kalibera for providing the patch.
-
Improved the test logic for checks using multiple threads to also check that the number of available threads is greater than one before running a test using two threads. Thanks to Tomas Kalibera for reporting a test failure on CRAN r-devel-windows-x86_64-gcc10-UCRT on a machine using one thread.
CRAN release v8.3.0
CHANGES OR IMPROVEMENTS
-
Changed the R dependency to R(>= 4.0).
-
Refactoring of the build configuration script on Windows.
-
Added functionality to fit models to time series data using the Approximate Bayesian Computation Sequential Monte Carlo ('ABC-SMC') algorithm of Toni and others (2009) doi: 10.1098/rsif.2008.0172.
-
Added a vignette about scheduled events. This vignette is work-in-progress and not yet complete.
CRAN release v8.2.0
IMPROVEMENTS
-
Prevalence function: better handling of condition in prevalence
formula. -
Use 'Date' on the x-axis when plotting events if time was specified
in a Date format. -
Return event 'time' as Date and 'event' type as character when
coercing events to a 'data.frame' if they were specified as Date and
character.
CRAN release v8.1.0
This release of SimInf focuses primarily on improving the plotting of
trajectory data.
CHANGES OR IMPROVEMENTS
-
The plotting functionality has been improved to allow visualisation
of the prevalence using the same formula notation as the
'prevalence' function, see the documentation. In addition, the box
around the plot has been removed and the legend has been moved to
the top. -
The prevalence function has been updated to always return a matrix
when format='matrix'. Before it returned a vector instead of a
'1 x length(tspan)' matrix when the level argument was equal to 1
or 2, or when level = 3 and the prevalence included one node only.
CRAN release v8.0.0
This release of SimInf includes improvements and changes to facilitate
post-processing of trajectory data and future development of the
package.
IMPROVEMENTS
-
Added the 'compartments' and 'index' arguments to the 'boxplot' and
'pairs' plotting methods to facilitate analysis of a simulated
trajectory, see the documentation. -
The build configuration script has been improved to identify if
OpenMP can be used. It is also possible to skip the check for OpenMP
if --disable-openmp is specified when installing the package.
BREAKING CHANGES
Backwards incompatible changes that are the reason why the major
version has been incremented.
-
The 'prevalence' function was changed to an S4 method. Moreover, the
'type' character argument was renamed to 'level' and changed to an
integer argument. The reason for renaming the 'type' argument was to
prepare for improvements in the plot function in the future to
display the prevalence but where there is already an argument called
'type'. Additionally, the 'as.is' argument was renamed to 'format'
for clarity. Finally, the unused '...' argument was removed. See the
documentation for examples. -
The 'trajectory' function was changed to an S4 method. Furthermore,
the node index argument was renamed from 'node' to 'index' to
facilitate future development where indices can also represent other
structures in a model. Additionally, the 'as.is' argument was
renamed to 'format' for clarity. Finally, the unused '...' argument
was removed. See the documentation for examples. -
The 'Nn' function to determine the number of nodes in a model has
been replaced with the S4 method 'n_nodes'.
CRAN release v7.0.1
CHANGES
- Removed the timestamp from the first line of the C code generated by
'mparse' in order to keep the hash of the C-code constant, even if
the code is regenerated at a later time with an identical
model. This avoids re-compiling the C-code for the model, if the
source code has already been compiled.
BUG FIXES
-
Fixed a problem that prevented re-compiling the model C-code even
though it had changed. -
Changed to use the 'R_FINITE' instead of 'isfinite' in the internal
C function 'SimInf_print_status'
CRAN release v7.0.0
CHANGES OR IMPROVEMENTS
-
The beta and gamma parameters in the built-in SIR model have been
moved internally from 'gdata' to 'ldata' to allow node specific
parameter values. -
The beta, gamma and epsilon parameters in the built-in SEIR model
have been moved internally from 'gdata' to 'ldata' to allow node
specific parameter values. -
In order to reduce the compilation-time when running multiple
simulations of a model that contains C code, the MD5 hash of the C
code is used to determine if a model has already been compiled and
the DLL loaded, and thus the compilation step can be skipped before
running a trajectory. -
The C functions 'SimInf_forward_euler_linear_decay' and
'SimInf_local_spread' are now available to be called by C code in
another package. -
The values in the 'E' matrix are now used as weights when sampling
individuals for the exit, internal transfer and external transfer
events. The individuals are sampled, one by one, without replacement
from the compartments specified by 'E[, select]' in such a way that
the probability that a particular individual is sampled at a given
draw is proportional to the weight in 'E[, select]'. -
The values in the 'E' matrix are now used as weights for enter
events. If the column 'E[, select]' contains several non-zero
entries, the compartment to add an individual to is sampled in such
a way that the probability is proportional to the weight in 'E[,
select]'. -
The scheduled enter events can now use 'proportion' when 'n = 0',
see description of breaking changes below. Additionally, the 'shift'
feature can also be used to further control in which compartments
individuals are added.
BREAKING CHANGES
Backwards incompatible changes that are the reason why the major
version has been incremented.
-
Removed the 'run_outer' function.
-
Removed the unused 'threads' argument from the 'SimInf_run' function
(use 'set_num_threads' to specify the number of threads). The
'SimInf_run' function is the C function that a model calls to
simulate a trajectory. Because of this change, model packages
created with a previous version of SimInf must be modified/recreated
to work with this version of SimInf. -
Events with n = 0 utilize the proportion instead to calculate the
number of individuals affected by the event. The number was
previously calculated by multiplying the number of individuals in a
node by the proportion in the event. This made it tricky to use
proportion for a scheduled event when the proportion was very small
or very large and the number of individuals in a node was small,
since the result was that it always rounded to 0 individuals with a
small proportion and all individuals with a large proportion. This
has been replaced with a sampling from a binomial distribution to
determine the number of individuals affected by the event. Thanks to
Thomas Rosendal in PR #28.
CRAN release v6.5.1
BUG FIXES
- Fixed a memory access error in the internal C code that was
introduced in the recently released 6.5.0 version. Detected by the
CRAN gcc-UBSAN tests (Undefined Behavior Sanitizer).
CRAN release v6.5.0
IMPROVEMENTS
-
It's now possible to have a 'tspan' vector of length one to simulate
over one time-unit only i.e. [t, t+1). -
The
trajectory
function has been ported to C and parallelized to
efficiently transform simulated data from a model to adata.frame
. -
Static code analysis of the codebase has been performed using the
lintr
package in order to improve code style, consistency and
readability. -
It's now possible to specify what type of plot should be drawn from
the simulated data, see the documentation. -
Better documentation of the SISe, SISe3, SISe_sp, and SISe3_sp
models.
CHANGES
-
The way to specify the number of threads to use in parallelized
functions has been changed to fix that specifying the number of
threads should only affect SimInf and not other packages using
OpenMP. Useset_num_threads
to specify the number of threads, see
documentation. It still works to pass the number of threads to the
run()
function, however, thethreads
argument will be removed
fromrun()
in a future release. -
Updated the vignette to use the 'set_num_threads' function.
-
To avoid cluttering the error message, the name of the internal
function that generated the error has been removed from the error
message (usetraceback
to print the call stack of the last
uncaught error). Additionally, all error messages now ends with a
.
(full stop). -
Removed the row and column names from the internal matrices U and V
because they were not used anywhere in the code.
BUG FIXES
- Fix storing solution of the state vectors of the first time point
until after simulated time has passed the the first time point in
tspan.
CRAN release v6.4.0
CHANGES
-
Updated the vignette, the CITATION file and added the DOI for the
JSS publication to DESCRIPTION/Description. -
Renamed the
NEWS
file toNEWS.md
and changed to use markdown
format style.
BUG FIX
- Removed a timestamp from a test to avoid a possible test failure.