Releases: r-simmer/simmer
Releases · r-simmer/simmer
simmer 4.2.1
New features:
- New
handle_unfinished()
activity sets a drop-out trajectory for unfinished
arrivals, i.e., those dropped from a resource (due to preemption, resource
shrinkage or a rejectedseize
) or those thatleave
a trajectory (#178
addressing #177). - New
release_all()
andrelease_selected_all()
activities automatically
retrieve the amount of resources seized and release it (#180 addressing #25). - New
get_seized()
andget_seized_selected()
getters allow an arrival to
retrieve the amount of resources seized (#180 addressing #179). - New
stop_if()
activity sets a conditional breakpoint (#181 addressing #100).
Minor changes and fixes:
- Fix performance issues in data sources (#176).
- Update CITATION.
- Fix monitored activity for preempted arrivals (as part of #178).
- Fix seizes/releases with a null amount (as part of #180).
- Rename internal status codes (as part of #181).
- Provide more context on error or warning (as part of #181).
- Extend the
Queueing Systems
vignette with a section about state-dependent
service rates. - Fix performance issues in getters (#183).
- 4.2.0 (untagged) -> 4.2.1: Fix memtest notes on CRAN (e741686).
simmer 4.1.0
New features:
- New getter
get_selected()
retrieves names of selected resources via theselect()
activity (#172 addressing #171). - Source and resource getters have been vectorised to retrieve parameters from multiple entities (as part of #172).
- Simplify C++
Simulator
interface for adding processes and resources (#162). The responsibility of building the objects has been moved to the caller. - New
add_global()
method to attach global attributes to a simulation environment (#174 addressing #158).
Minor changes and fixes:
- Remove 3.8.0 and 4.0.1 deprecations (#170 addressing #165).
- Fix
get_global()
to work outside trajectories (#170 addressing #165). - Fix
rollback()
with an infinite amount (#173). - Fix and improve schedules and managers (as part of #174).
- Fix
reset()
to avoid overwriting the simulation environment (#175).
simmer 4.0.1
New features:
- New getters (#159):
get_sources()
andget_resources()
retrieve a character vector of source/resource names defined in a simulation environment.get_trajectory()
retrieves a trajectory to which a given source is attached.
- New resource selection policies:
shortest-queue-available
,round-robin-available
,random-available
(#156). These are the same as the existing non-available
ones, but they exclude unavailable resources (capacity set to zero). Thus, if all resources are unavailable, an error is raised.
Minor changes and fixes:
- Rename
-DRCPP_PROTECTED_EVAL
(Rcpp >= 0.12.17.4) as-DRCPP_USE_UNWIND_PROTECT
(6d27671). - Keep compilation quieter with
-DBOOST_NO_AUTO_PTR
(70328b6). - Improve
log_
print (7c2e3b1). - Add
when_activated()
convenience function to easily generate arrivals on demand from trajectories (#161 closing #160). - Enhance
schedule
printing (9c66285). - Fix generator-manager name clashing (#163).
- Deprecate
set_attribute(global=TRUE)
,get_attribute(global=TRUE)
andtimeout_from_attribute(global=TRUE)
(#164), the*_global
versions should be used instead.
simmer 4.0.0
- The
simmer
license has been changed to GPL >= 2.
New features:
- The C++ core has been refactorised into a header-only library under
inst/include
(#147 closing #145). Therefore, from now on it is possible to extend the C++ API from another package by listingsimmer
under theLinkingTo
field in the DESCRIPTION file. - New generic
monitor
constructor enables the development of new monitoring backends in other packages (179f656, as part of #147). - New simulation-scoped logging levels. The
log_
activity has a new argumentlevel
which determines whether the message is printed depending on a globallog_level
defined in thesimmer
constructor (#152). set_attribute
andset_global
gain a new argument to automatically initialise new attributes (#157). Useful to update counters and indexes in a single line, without initialisation boilerplate.
Minor changes and fixes:
- Enhanced exception handling, with more informative error messages (#148).
- Refactorisation of the printing methods and associated code (#149).
- Allow empty trajectories in sources and activities with sub-trajectories (#151 closing #150).
- Enable
RCPP_PROTECTED_EVAL
(Rcpp >= 0.12.17.3), which provides fast evaluation of R expressions by leveraging the new stack unwinding protection API (R >= 3.5.0). - Replace backspace usage in vector's
ostream
method (2b2f43e). - Fix namespace clashes with
rlang
andpurrr
(#154).
simmer 3.8.0
New features:
- New data source
add_dataframe
enables the attachment of precomputed data, in the form of a data frame, to a trajectory. It can be used instead of (or along with)add_generator
. The most notable advantage over the latter is thatadd_dataframe
is able to automatically set attributes and prioritisation values per arrival based on columns of the provided data frame (#140 closing #123). - New
set_source
activity deprecatesset_distribution()
. It works both for generators and data sources (275a09c, as part of #140). - New monitoring interface allows for disk offloading. The
simmer()
constructor gains a new argumentmon
to provide different types of monitors. By default, monitoring is performed in-memory, as usual. Additionally, monitoring can be offloaded to disk throughmonitor_delim
andmonitor_csv
, which produce flat delimited files. But more importantly, the C++ interface has been refactorised to enable the development of new monitoring backends (#146 closing #119).
Minor changes and fixes:
- Some documentation improvements (1e14ed7, 194ed05).
- New default
until=Inf
for therun
method (3e6aae9, as part of #140). branch
andclone
now accept lists of trajectories, in the same way asjoin
, so that there is no need to usedo.call
(#142).- The argument
continue
(present inseize
andbranch
) is recycled if only one value is provided but several sub-trajectories are defined (#143). - Fix process reset: sources are reset in strict order of creation (e7d909b).
- Fix infinite timeouts (#144).
simmer 3.7.0
New features:
- New
timeout_from_attribute()
activity makes it easier to set a timeout based on an attribute (#129). - The activities
set_attribute()
,set_prioritization()
,set_capacity()
andset_queue_size()
get a new argumentmod
which, if set to"+"
or"*"
, modifies the corresponding value instead of substituting it. This makes it easier to increment, decrement or scale one of these values (#130). - New
*_selected()
versions for the already available resource getters:get_capacity()
,get_queue seize()
,get_server_count()
andget_queue_count()
(#134).
Minor changes and fixes:
- Broadcast signals with higher priority to prevent an arrival to catch its own signal with a
trap()
after asend()
(#135). - Generate new arrivals with minimum priority to avoid wrong interactions with simultaneous activities (#136).
- Remove v3.6.x deprecations: the old attribute retrieval system (see notes for v3.6.3), as well as methods
create_trajectory()
andonestep()
(#117). - Remove
get_mon_resources()
'sdata
argument. It was there for historical reasons and probably nobody was using it (851d34b). - New vignette, "simmer: Discrete-Event Simuation for R", paper accepted for publication in the Journal of Statistical Software. Remove "Terminology" vignette (#127).
- New vignette, "Design and Analysis of 5G Scenarios", supplementary materials for a paper accepted for publication in the IEEE Communications Magazine (#137).
simmer 3.6.5
New features:
set_attribute()
(andset_global()
by extension) can set multiple attributes at once by providing vectors ofkeys
andvalues
(or functions returning suchkeys
and/orvalues
).get_attribute()
(andget_global()
by extension) can retrieve multiplekeys
(#122).- New
stepn()
method deprecatesonestep()
(e452975).
Minor changes and fixes:
- Restore
ostream
after formatting (9ff11f8). - Fix arrival cloning to copy attributes over to the clone (#118).
- Fix self-induced preemption through
set_capacity()
(#125). - Update "Queueing Systems" vignette (a0409a0, 8f03f4f).
- Update "Advanced Trajectory Usage" vignette (4501927).
- Fix print methods to return the object invisibly (#128).
- New "Dining Philosophers Problem" vignette (ff6137e).
simmer 3.6.4
Minor changes and fixes:
simmer 3.6.3
New features:
- Show simulation progress via an optional
progress
callback inrun()
(#103). - New "The Bank Tutorial: Part II" vignette, by Duncan Garmonsway @nacnudus (#106).
- New getters for running arrivals (#109), meant to be used inside trajectories:
get_name()
retrieves the arrival name.get_attribute()
retrieves an attribute by name. The old method of retrieving them by providing a function with one argument is deprecated in favour ofget_attribute()
, and will be removed in version 3.7.x.get_prioritization()
retrieves the three prioritization values (priority
,preemptible
,restart
) of the active arrival.
- New shortcuts for global attributes (#110):
set_global()
andget_global()
, equivalent toset_attribute(global=TRUE)
andget_attribute(global=TRUE)
respectively.
Minor changes and fixes:
simmer 3.6.2
Minor changes and fixes:
- Update "The Bank Tutorial: Part I" vignette (@nacnudus in #90).
- Fix
trap()
's handler cloning and associated test (#91). - Apply
select()
'spolicy
also whenresources
is a function (#92). - Accept dynamic timeouts in batches (#93).
- Change
rollback()
's default behaviour totimes=Inf
, i.e., infinite loop (#95). - Stop and throw an error when
timeout()
returns a missing value (#96 and #97). - Fix memory management: resetting the environment was clearing but not deallocating memory (#98, fixed in #99).
- Fix object destruction: workaround for tidyverse/magrittr#146 (#98, fixed in effcb6b).