
Split bolus doses into bolus and infusion paths (model directive)
Source:R/splitBolus.R
splitBolusInfusion-directive.RdsplitBolusInfusion() 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 LAST 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
splitInfusionBolus() to give the FIRST target the infusion
instead. This feeds one bolus dose record into both a bolus path
and an infusion path (Monolix-style double absorption with mixed
first- and zero-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 splitBolusInfusion() exported by
rxode2; the directive is parsed from the model text directly, as
shown below.
Usage inside a model
model({
splitBolusInfusion(depot, depot2, central)
dur(central) <- tk0
f(depot2) <- 1 - f1
f(central) <- f1
d/dt(depot2) <- -ka2 * depot2
d/dt(central) <- ka2 * depot2 - cl / v * central
...
})A bolus dose recorded against depot is split so depot2 receives
the bolus (first-order input scaled by 1 - f1) and central
(last target) receives a modeled-duration infusion (zero-order
input over tk0, scaled by f1).