r-simmer / simmer

Discrete-Event Simulation for R
https://r-simmer.org
GNU General Public License v2.0
220 stars 42 forks source link

add support for variable batch sizes #258

Closed Enchufa2 closed 3 years ago

Enchufa2 commented 3 years ago

Enhance batch interface to accept a function as parameter n. This max size is evaluated with the first arrival initiating the batch and stored in the Batched object, which ensures that this limit is not exceeded.

Closes #245.

codecov[bot] commented 3 years ago

Codecov Report

Merging #258 (e370cf1) into master (f58ad54) will decrease coverage by 0.22%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #258      +/-   ##
==========================================
- Coverage   99.64%   99.42%   -0.23%     
==========================================
  Files          47       47              
  Lines        2828     2784      -44     
==========================================
- Hits         2818     2768      -50     
- Misses         10       16       +6     
Impacted Files Coverage Δ
R/simmer-methods.R 99.54% <ø> (ø)
R/generators.R 100.00% <100.00%> (ø)
R/trajectory-activities.R 98.73% <100.00%> (+0.02%) :arrow_up:
inst/include/simmer/activity/arrival.h 98.83% <100.00%> (-0.04%) :arrow_down:
inst/include/simmer/common.h 100.00% <100.00%> (ø)
inst/include/simmer/process/arrival.h 97.14% <100.00%> (-1.38%) :arrow_down:
inst/include/simmer/process/arrival_impl.h 96.42% <100.00%> (-3.58%) :arrow_down:
inst/include/simmer/process/batched.h 100.00% <100.00%> (ø)
inst/include/simmer/process/datasrc.h 97.67% <100.00%> (-2.33%) :arrow_down:
inst/include/simmer/process/generator.h 100.00% <100.00%> (ø)
... and 35 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a932d57...e370cf1. Read the comment docs.