Documentation

8.13 Bolus, infusion, lag and bioavailability

For a dose into compartment \(n\), nlmx first evaluates bioavailability Fn and lag ALAGn. The amount entering the model is Fn × AMT; lag schedules its entry at TIME + ALAGn.

Bolus and infusion modes

RATE value Meaning Required model variable
0 Bolus none
>0 Fixed input rate from data none
-1 Modelled rate Rn
-2 Modelled duration Dn

For a fixed or modelled rate, duration is bioavailable amount divided by rate. For a modelled duration, rate is bioavailable amount divided by Dn. Rn and Dn must be positive; ALAGn must be nonnegative. Other negative RATE values are rejected.

The default dose compartment comes from the ADVAN or $MODEL DEFDOSE; an explicit positive CMT selects another valid model compartment. Dosing the output compartment is refused.

Event splitting

A lagged bolus becomes a pending event. A lagged infusion becomes a pending start plus a scheduled end. The engine advances to each boundary, integrates amounts delivered by active infusions, updates the state, ends/starts due inputs, and continues. Overlapping infusions are additive.

Derivative implications

When Fn, ALAGn, Rn or Dn depends on ETA, amount, rate, duration and event time carry dual derivatives. A reference implementation that freezes event times before differentiation will disagree even if its concentration values match.

Worked event

With AMT=100, F1=0.8, ALAG1=0.5 and RATE=-2, D1=2, an infusion of 80 amount units starts at 0.5 h, runs at 40 units/h and ends at 2.5 h. Verify concentrations immediately before, at and after both boundaries.

Common mistakes

  • Computing duration from raw rather than bioavailable amount.
  • Applying lag to the observation instead of the input.
  • Ignoring overlapping infusion boundaries.

Checklist

  • Derive amount, start, rate and end independently.
  • Test boundary times with dense output.
  • Verify derivatives when modifiers depend on ETA.

Further reading

See event ordering, steady-state events and automatic differentiation.