Calvagone / campsis

A generic PK/PD simulation platform based on rxode2 and mrgsolve engines.
https://calvagone.github.io/
GNU General Public License v3.0
8 stars 3 forks source link

Argument outfun should be more flexible #146

Closed luyckxn closed 4 months ago

luyckxn commented 5 months ago

Right now, 'outfun' can be a function or a purrr-style lambda. It allows to post-process the results after each simulated scenario.

In many cases, we want to post-process the entire replicate (i.e. all scenarios), instead of the current scenario.

I suggest to add the following wrapper:

outfun=Outfun(fun=, level="scenario") # Post-processing is done on each scenario (same as before) outfun=Outfun(fun=, level="replicate") # Post-processing is done on the entire replicate

For backwards compatibility, outfun can still be a function or a lambda.