
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 targeting a compartment that declares a modeled
dur() or rate() property is promoted to a modeled infusion
start/stop pair for that compartment, so a single bolus dose record
can feed 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 a 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 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).