Select Page

# Empty and reset macros

### Description

The macro empty can be used to set any component of the system, defined in an ODE, to 0 at any given time. Similarly, the macro reset is used to reset a variable of the system to its initial value. Empty or reset times are indicated via a type of administration. The actions of these macros are thus selective, contrary to the reset applied with an EVID column in the dataset with values 3, which resets all compartments.

### Arguments

The arguments are the same for both empty and reset macros:

• adm: Administration type used to indicate empty or reset times. Its default value is 1. Alias: type. The empty and reset macrso only use the administration times, not the amounts.
• target: Name of the ODE variable that is set to 0 or reset to its initial value at the specified times, or target=all to reset all system variables. Mandatory.

The following code defines an emptying of the ODE variable Ap on administration times of type 1 (e.g ADM=1 in the data set).

PK:

This is equivalent to the following code with the depot macro:
PK:


The following code defines a reset based on administration times of type 2 (e.g ADM=2 in the data set), applied to the ODE variable Ac.

PK:

It is possible to define several empty macros with the same adm identifiers to set several targets to 0 at the same times, and the same for reset macros. With the example below, dose events with adm=3 will empty both variables Ac and Ap.
PK:

To reset all variables of the system, “target=all” can al be used:
PK:


### Rules

• The value after type= or adm= must be an integer.
• The value after target= must be a string representing the ODE variable.

### Empty example: urine compartment

The following Mlxplore script implements a two compartments model with an additional urine compartment. There is a transfer from the central compartment to the urine compartment. A single dose with type=1 is administered to the central compartment at time 0. A selective reset of the urine compartment corresponding to collecting times is defined with an administration with type=2. Each amount for this administration is defined as 1 but is actually not used in the model.
When using this model with a data set, urine would be collected over consecutive periods of 12 hours and the amount of drug measured in the urine volume collected for each period would be recorded.
<MODEL>

[LONGITUDINAL]
input = {ka, Cl, V1, Q, V2, p_urine}

PK:
k_urine = p_urine*Cl/V1
k_non_urine = (1-p_urine)*Cl/V1
k12 = Q/V1
k21 = Q/V2

; Dose administration to central compartment (plasma)

; Reset of urine compartment

EQUATION:
t_0=0
Ac_0=0
Ap_0=0
Aurine_0=0

ddt_Ac = - k_non_urine*Ac - k12*Ac + k21*Ap - k_urine*Ac
ddt_Ap = k12*Ac-k21*Ap
ddt_Aurine = k_urine*Ac

Cc=Ac/V1

OUTPUT:
output = {Cc, Aurine}

<PARAMETER>
Cl =0.5
Q =1
V1 =5
V2 =8
ka =10
p_urine =0.05

<DESIGN>

[TREATMENT]

<OUTPUT>
grid=0.02:0.1:100
list={Cc,Aurine}


This script gives the following profiles for the drug amount in the urine compartment (left), and the drug concentration in the central compartment (right).

### Reset example: PD variable

Of course, emptying a compartment of resetting it to its initial state are equivalent actions for compartment which are initially empty. This may be not the case for PD models with non-zero baseline, like in the following example where the PD variable E is reset to its initial value E0 at several times.
<MODEL>
[LONGITUDINAL]
input = {ka, k, E0, IC50, kout}

PK:
reset(target=E, type=2)

EQUATION:
E_0 = E0
kin = E0*kout

ddt_E = kin*(1 - Ac/(Ac+IC50)) - kout*E

OUTPUT:
output = {E}

<PARAMETER>
ka=0.3
k=0.1
E0=100
IC50=20
kout=0.2

<DESIGN>