- Fix call identification on error (#286).
- Make tests less verbose by default.
- Fix deprecated functionality in vignette.
- Fix vignette to feed character input to
- Fixes for Apple Clang 10.
CRAN release: 2022-06-25
- Apply magrittr workaround and avoid copying
monitorobjects in function environments for generators too (#279).
- Fix file removal on object destruction for file-backed monitors (#277).
- Remove cap on the number of nested branches for trajectory printing (#262).
- Fix duplicate time-based batch trigger (as part of #263).
- Fix typo and trajectory in bank vignettes (#283).
- Fix clone synchronization with
wait=FALSE, i.e., arrivals don’t need to trigger the same
synchronize()activity to be in sync (#275).
CRAN release: 2022-02-07
CRAN release: 2021-08-11
- Fix multiple reporting of ongoing arrivals (#240).
- Set package namespace as parent of
- Fix arrival restart after queue drops (#257).
- Fix segfault printing activities with empty vectors (#253).
- Fix source behaviour with missing values, which now stop arrival generation in the same way as negative values do (#256).
deactivate(), which now unschedules future arrivals (#249).
CRAN release: 2020-06-06
- Fix memory issues in
rollback(). These are stateful activities that require storing information about passing arrivals to manage clones or redirections. These activities were not properly cleaning their storage when arrivals were rejected at some point in the trajectory. As a result, certain simulations with these activities involved may show random improper behaviour depending on how memory reuse happens. This patch unifies storage management for stateful activities, adds a new interface to register these activities and another interface for arrivals to notify their termination, so that the stored information is properly cleaned up (#231).
- Fix state sharing in round-robin policy operation in
CRAN release: 2020-04-11
- Fix pause status of reneging arrivals that are kicked from a resource queue (#228 addressing #227).
- Set the minimum execution priority for the
timeout()activity. This makes possible to set a null timeout so that the next event is processed in the last place if several more events happen at the same time (#229).
- Extend the
Queueing Systemsvignette with a section about custom service policies (as part of #229).
CRAN release: 2019-12-09
leave()with the same behaviour as in
renege_if(). Code and documentation of these functions are now integrated under
- Convenience functions
from_toaccept dynamic parameters for arguments
- Activities to interact with sources have been vectorised to modify multiple sources at once (#222).
- Several generators or resources with the same parameters can be added with a single call to
add_resource()respectively if a vector of names is provided (#221).
get_mon_*()dispatch for named lists (#210).
- Get/put the RNG state when random numbers are required in the backend (#218).
- Fix convenience functions
from_toto preserve the environment of the supplied functions (as part of #219).
- Documentation improvements (#212, #220).
- Fix queueing in multiple resources after preemption (#224 addressing #206).
CRAN release: 2019-07-30
CRAN release: 2019-03-14
CRAN release: 2019-01-09
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 rejected
seize) or those that
leavea trajectory (#178 addressing #177).
release_selected_all()activities automatically retrieve the amount of resources seized and release it (#180 addressing #25).
get_seized_selected()getters allow an arrival to retrieve the amount of resources seized (#180 addressing #179).
stop_if()activity sets a conditional breakpoint (#181 addressing #100).
- 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 Systemsvignette with a section about state-dependent service rates.
- Fix performance issues in getters (#183).
CRAN release: 2018-11-09
- New getter
get_selected()retrieves names of selected resources via the
select()activity (#172 addressing #171).
- Source and resource getters have been vectorised to retrieve parameters from multiple entities (as part of #172).
- Simplify C++
Simulatorinterface for adding processes and resources (#162). The responsibility of building the objects has been moved to the caller.
add_global()method to attach global attributes to a simulation environment (#174 addressing #158).
- Remove 3.8.0 and 4.0.1 deprecations (#170 addressing #165).
get_global()to work outside trajectories (#170 addressing #165).
rollback()with an infinite amount (#173).
- Fix and improve schedules and managers (as part of #174).
reset()to avoid overwriting the simulation environment (#175).
CRAN release: 2018-09-10
- New getters (#159):
- New resource selection policies:
random-available(#156). These are the same as the existing non-
availableones, but they exclude unavailable resources (capacity set to zero). Thus, if all resources are unavailable, an error is raised.
-DRCPP_PROTECTED_EVAL(Rcpp >= 0.12.17.4) as
- Keep compilation quieter with
when_activated()convenience function to easily generate arrivals on demand from trajectories (#161 closing #160).
- Fix generator-manager name clashing (#163).
*_globalversions should be used instead.
CRAN release: 2018-07-20
simmerlicense has been changed to GPL >= 2.
- 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 listing
LinkingTofield in the DESCRIPTION file.
- New generic
monitorconstructor 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 argument
levelwhich determines whether the message is printed depending on a global
log_leveldefined in the
set_globalgain a new argument to automatically initialise new attributes (#157). Useful to update counters and indexes in a single line, without initialisation boilerplate.
- 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).
-DRCPP_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
- Fix namespace clashes with
CRAN release: 2018-05-01
- New data source
add_dataframeenables 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 that
add_dataframeis able to automatically set attributes and prioritisation values per arrival based on columns of the provided data frame (#140 closing #123).
set_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 argument
monto provide different types of monitors. By default, monitoring is performed in-memory, as usual. Additionally, monitoring can be offloaded to disk through
monitor_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).
- Some documentation improvements (1e14ed7, 194ed05).
- New default
runmethod (3e6aae9, as part of #140).
clonenow accept lists of trajectories, in the same way as
join, so that there is no need to use
- The argument
branch) 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).
CRAN release: 2018-03-03
timeout_from_attribute()activity makes it easier to set a timeout based on an attribute (#129).
- The activities
set_queue_size()get a new argument
modwhich, if set to
"*", modifies the corresponding value instead of substituting it. This makes it easier to increment, decrement or scale one of these values (#130).
*_selected()versions for the already available resource getters:
- Broadcast signals with higher priority to prevent an arrival to catch its own signal with a
- 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
dataargument. 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).
CRAN release: 2018-01-04
set_global()by extension) can set multiple attributes at once by providing vectors of
values(or functions returning such
get_global()by extension) can retrieve multiple
ostreamafter formatting (9ff11f8).
- Fix arrival cloning to copy attributes over to the clone (#118).
- Fix self-induced preemption through
- 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).
CRAN release: 2017-11-04
CRAN release: 2017-07-28
- Show simulation progress via an optional
- 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 of
get_attribute(), and will be removed in version 3.7.x.
get_prioritization()retrieves the three prioritization values (
restart) of the active arrival.
- New shortcuts for global attributes (#110):
get_global(), equivalent to
CRAN release: 2017-05-30
- Update “The Bank Tutorial: Part I” vignette (@nacnudus in #90).
trap()’s handler cloning and associated test (#91).
resourcesis a function (#92).
- Accept dynamic timeouts in batches (#93).
rollback()’s default behaviour to
times=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).
CRAN release: 2017-03-30
- Recycle logical indexes when subsetting (2526e75).
- Implement replacement operators,
rep()S3 method for trajectories (7fa515e).
- Remove plotting functions (bb9656b), deprecated since v3.6.0. The new
simmer.plotpackage (on CRAN) already covers these features among others.
- Don’t evaluate vignette chunks if
Suggestsare not installed (e40e5b6).
- Rewrite DESCRIPTION (3f26516).
- Add an
everyparameter to the
from_to()convenience function (9d68887).
CRAN release: 2016-12-28
- New subsetting operators,
[[, for trajectories (1847898). Think about trajectories as lists of activities and these operators will do (almost) everything you expect. As a side effect, the generics
tail()automatically work with trajectories also as expected.
length()method to obtain the number of first-level activities in a trajectory (f86375a). Useful in combination with the subsetting operators.
create_trajectory()has been deprecated in favor of
plot_attributes()have been deprecated and will be removed in the next release in order to minimise dependencies (5b43f2b). We plan to release a new package on CRAN covering these features and new ones.
- All methods are now S3 methods, so that a nice intelligible error is displayed if you apply a method to the wrong object (e891045).
- All the activity management -related stuff has been removed, i.e,
get_prev_activity()(f86375a). These methods were only useful for development purposes and nobody should be using them. And it was never a good idea to directly expose external pointers.
- Clone all trajectories before passing them to the C++ core (f655cae).
- Update “Advanced Trajectory Usage” vignette.
- Update “Queueing Systems” vignette.
CRAN release: 2016-11-26
- Fix bug in
queue_size_strict=TRUE: arrivals were not being dropped (#83).
- Fix bug in
set_capacity()with a preemptive resource when the old value was
Inf: arrivals were not being preempted (63beb2c).
- Fix bug in per-resource activity monitoring: activity was not being reset (55097c9).
- Update “Advanced Trajectory Usage” vignette.
- New “Other SimPy Examples” vignette.
CRAN release: 2016-10-27
set_queue_size()become activities (#77). Just like
release(), they have the associated
set_queue_size_selected()for a joint use together with
deactivate()activities allow an arrival to start or stop a generator, respectively, from inside a trajectory (#80).
set_distribution()activities allow an arrival to install a new trajectory or distribution, respectively, in a generator from inside a trajectory (#80).
- Refactorised and improved arrival monitoring.
- New interarrival communication activities allowing asynchronous programming:
wait()can be used to send signals, wait for signals, trap them and launch asynchronous handlers.
log_()activity simply prints messages for debugging purposes (eaa4554).
CRAN release: 2016-10-06
CRAN release: 2016-10-02
- Remove warnings for unused arguments in
- Fix crash on arrival reneging in non-triggered batches (8713d95).
- Fix crash on batches triggered before the timer expires (8713d95).
- Fix crash on non-released preemptive resources when capacity decreases (#75).
- Leaving without releasing a resource throws a warning (#76).
CRAN release: 2016-09-03
- Ongoing (unfinished) arrivals are reported with
get_mon_arrivals(ongoing = TRUE)(#73).
- Simplify Rcpp glue: remove unnecessary
- Simplify trajectory’s head/tail management (06432a8).
run(until)runs the simulation exactly until
until, instead of until the first event scheduled at a time >=
- Fix batch cloning (c20bc1d).
- Coverage improved.
CRAN release: 2016-08-11
CRAN release: 2016-08-09
- Prioritization (
restart) has been moved from
add_generator()(#69). This leads to a more natural interpretation of prioritization values as attributes of arrivals from the same generator, rather than attributes of a
seize(). Still, prioritization values can be redefined dynamically from inside a trajectory with the new activity
- New optional
seize_selected()(#49). This feature allows us to fine-tune what happens to an arrival if it cannot seize a resource: instead of getting dropped, it may execute a given sub-trajectory.
clone()implements the workflow pattern in which an entity is processed in multiple parallel threads. The user can define a different sub-trajectory for each clone. With
synchronize(), multiple parallel clones converge and are synchronized: only one continues (the first or the last to arrive), and the others are removed.
separate()activities (#45). They can be used to implement a rollercoaster process:
batch()collects a number of arrivals before they can continue processing as a block, and
separate()splits a previousl established batch.
renege_abort()activities (#58). They can be used to set or unset a timer after which the arrival will abandon.
- If a
0, the arrival skips the
branch()and continues to the next activity instead of throwing an
index out of rangeerror (#70).
- Throw errors on incorrect releases (#72).
- Remove deprecated convenience function
branch()’s deprecated argument
- New “The Bank Tutorial: Part I” vignette, by Duncan Garmonsway @nacnudus (#68).
- Update “Advanced Trajectory Usage” vignette.
CRAN release: 2016-06-28
join()activity to concatenate trajectories (#50).
- Batched generation: the generation function can return more than one interarrival value at a time (#65).
- Add the option
add_resource()to guarantee the queue size limit with preemption (#59).
- Modify resources (capacity, queue size) from inside a trajectory (#66).
- Fix per-resource activity time monitoring (#67). The problem emerged when an arrival revisited a resource and it was enqueued. An uninitialised variable could lead to an activity time greater than
end_time - start_time. All versions 3.2.x are affected by this bug.
- Fix the description of
preemptiblein the documentation of
preemptibleto be equal or greater than
- Reset finite generators (#51).
- Fix the handling of a capacity change when the new value is infinite (#60).
- Various doc fixes (#61).
mergeparameter name to
continue. The old name is deprecated (#57).
match.arg()in multiple-choice arguments (#55).
branch()backwards linking and count (#56).
release()in two steps to deal properly with capacity changes at the same point in time (#64).
- The convenience function
every()is deprecated due to #65.
- Update and extend previous vignettes.
CRAN release: 2016-04-29
- Add time-specific resource availability support (#21). Both resources’
queue_sizecan change over time following a user-defined scheduling, which can be generated with the new function
- Advanced peek: inspect any number of future events in the event queue (8147820). For more details, see
- Fix steps grouping in
- Fix incorrect trajectory behaviour when a rejection occurs inside a branch with
- Fix a couple of segmentation faults in preemptive resources (f64f6b2).
- Improve verbose output (9013db0).
- New multiset-based event queue with unscheduling capabilities (a615fea and d6a9d67).
- A simulation may run forever (until the user interrupts it), that is,
until=Infis allowed now (f47baa9).
- New vignette on queueing systems.
- New vignette on Continuous-Time Markov Chains.
- Update and extend previous vignettes.
CRAN release: 2016-04-04
- In previous versions, resources were monitored before performing the corresponding seize/release activity, before changing the status of the system. Thus,
t=3, queue=2meant that, until
t=3, the queue had 2 customers, and at
t=3the system changed (because of a new arrival or a new departure). The idea was to keep the values and time vectors aligned (see #28). But from this moment on, the resources are monitored after changing the status of the system. This is more consistent with what a user would expect, and more consistent with the behaviour of other related R functions (e.g., see
stepfun(), from the
statspackage). Wrapping up and from now on,
t=3, queue=2means that some event happened at
t=3whose immediate and subsequent result was a queue with 2 customers.
- Add preemption functionality (#34). Preemption comes into play when a resource is specified as
preemptive=TRUE. Arrivals in the server can be preempted on a
seize()has three basic properties:
- Remove deprecated functions
from_to()convenience functions (8e524cd).
- Fix colour scale in
- Fix compatibility with the upcoming version of
branch()activity now provides attributes to its
optionfunction, as the other activities (#42).
- Implement error handling in
CRAN release: 2016-01-04
- Monitor arrivals’ start/activity/end times on a per-resource basis (#38). So far, the function
get_mon_arrivals()returned the start/activity/end times per arrival for the whole trajectory. This behaviour remains, but additionally,
get_mon_arrivals(per_resource = TRUE)returns these times per resource, so that it is possible to retrieve queueing/system times per resource.
- Fix testing ERRORs reported on platforms using clang and Sparc Solaris.
get_mon_*()functions accept a single simulation environment as well as a list of environments representing several replications (5ee2725). A new column (
replication) in the resulting data frame indicates the corresponding replication number.
- Monitoring subsystem refactored (as a consequence of #38).
CRAN release: 2015-12-16
- Performance improvements with Boost (1b654fd).
- Fix arrivals’ timing issues (#24).
- Nicer object printing (#26).
selfvisibly, instead of invisibly (#35).
from()convenience functions (29cccd2 and 7cfdd90).
- Some work on vignettes (#29).
- Fix ggplot2 2.0.0 compatibility issues (#37).
CRAN release: 2015-11-17
CRAN release: 2015-11-15
- First major release submitted to CRAN. The philosophy and workflow of the pre-release remain with a more robust event-based C++ backend and a more flexible frontend.
Enhanced programmability. The timeout activity is more than just a delay. It admits a user-defined function, which can be as complex as needed in order to interact with the simulation model. The old v2.0 was no more than a queueing network simulator. This feature makes simmer a flexible and generic DES framework. Moreover, we have finally got rid of the infamous
add_skip_event()function to implement a more flexible and user-friendly branching method.
- Robustness. The event-based core design is rigorous and simple, which makes simmer faster and less error-prone, at the same level of other state-of-the-art DES frameworks.
Much better performance. Instead of creating
narrivals beforehand, this release leverages the concept of generator of arrivals, which is faster and more flexible. At the same time, the concept of trajectory as a chain of activities is implemented entirely in C++ internally. Our tests show that simmer is even faster than SimPy when it comes to simulate queueing networks.
- Replication. In the pre-release, replication was implemented inside simmer. This no longer makes sense since, with the current design, it is more than straightforward to replicate and even parallelize the execution of replicas using standard R tools.