
Split infusion doses into infusion and bolus paths (model directive)
Source:R/splitBolus.R
splitInfusionBolus-directive.RdsplitInfusionBolus() is a model-only directive that rewrites doses
aimed at cmt into parallel doses to the target compartments,
regardless of whether the dose record is a bolus or an infusion.
Each target compartment receives the full original amount; use f()
to scale the split.
A plain bolus record is split so the FIRST target compartment
receives a modeled infusion start/stop pair (it must declare a
modeled dur() or rate() property, otherwise its copies stay
boluses) while every other target receives a bolus copy. Use
splitBolusInfusion() to give the LAST target the infusion instead.
This feeds one bolus dose record into both an infusion path and a
bolus path (Monolix-style double absorption with mixed zero- and
first-order routes). Steady-state bolus records are not promoted;
they are copied as boluses with a warning when the designated
infusion target declares dur()/rate().
Infusion records (data RATE/DUR or modeled rate()/dur()) are
split preserving their type, exactly like splitInfusion().
This rewrite applies at etTrans() translation time only; doses
pushed while solving with evid_() are not split. Only one
splitting directive (splitBolus(), splitInfusion(),
splitInfusionBolus() or splitBolusInfusion()) is allowed per
model.
There is no R function named splitInfusionBolus() exported by
rxode2; the directive is parsed from the model text directly, as
shown in ?splitBolusInfusion-directive.
Usage inside a model
model({
splitInfusionBolus(depot, central, depot2)
dur(central) <- tk0
f(central) <- f1
f(depot2) <- 1 - f1
d/dt(depot2) <- -ka2 * depot2
d/dt(central) <- ka2 * depot2 - cl / v * central
...
})A bolus dose recorded against depot is split so central (first
target) receives a modeled-duration infusion (zero-order input over
tk0, scaled by f1) and depot2 receives the bolus (first-order
input scaled by 1 - f1).