Skip to content

mrgsolve 0.6.0

Compare
Choose a tag to compare
@kylebaron kylebaron released this 10 May 14:25

Bugs fixed

  • Fixed a bug where infusion dosing events with evid 4 were not properly implemented. While investigating that issue, also found similar issue with evid 4 infusions getting scheduled with addl (issue 31).
  • Removed NSE evaluation for arguments passed into ev to avoid unintended issues in evaluation (issue 29).

New features

  • Added mcode function as alternative to using mread when your model is written in an R string. Note the order of the arguments:
    first model, then code, then project. project defaults to tempdir. So the call is: mod <- mcode("mymodel", code). The
    equivalent mread call is: mod <- mread("mymodel", tempdir(),code).
  • carry.out() and Req() now take newname = oldname as input. Use this syntax in carry.out when you want to copy a column from the input data set into the simulated data set, changing the column to newname from oldname. Use this syntax in Req when you want to change the names of compartments or output variables spcified in $TABLE / $CAPTURE.
  • Added pkmodel function for easy loading and simulating from 1- and 2-compartment models (issue 39).
  • Added new code block: $PKMODEL for simulating PK model with analytical solutions. The main option for this block is ncmt, which picks the number of compartments for the pk model. See ?PKMODEL for more information and other options (issue 34).

Under the hood

  • Added code attribute to mrgmod objects. The actual source code stays with the model object. see was modified to look at x@code first when showing the model code.
  • Added a tokenizer function (get_tokens), a wrapper for the boost tokenizer) to help checking the model specification file.
  • Data items entered in $FIXED are now implemented as C++ preprocessor directives by default rather than const double variables. Use $SET fixed_type = "define" or $SET fixed_type = "const" to select between the approaches.