|
TPCCLIB
|
Simulation of dual-input compartmental models. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include <time.h>#include <string.h>#include "tpccm.h"Go to the source code of this file.
Functions | |
| int | simC1DI (double *t, double *cba, double *cbb, const int nr, const double k1a, const double k1b, const double k2, double *ct) |
| int | simC3DIvs (double *t, double *ca1, double *ca2, double *cb, const int nr, const double k1, const double k2, const double k3, const double k4, const double k5, const double k6, const double k1b, const double k2b, const double f, const double vb, const double fa, const int vvm, double *scpet, double *sct1, double *sct2, double *sct3, double *sct1b, double *sctab, double *sctvb) |
| int | simC4DIvp (double *t, double *ca1, double *ca2, double *cb, const int nr, const double k1, const double k2, const double k3, const double k4, const double k5, const double k6, const double k7, const double km, double k1b, const double k2b, const double f, const double vb, double fa, const int vvm, double *scpet, double *sct1, double *sct2, double *sct3, double *sct1b, double *sctab, double *sctvb, const int verbose) |
| int | simC4DIvs (double *t, double *ca1, double *ca2, double *cb, const int nr, const double k1, const double k2, const double k3, const double k4, const double k5, const double k6, const double k7, const double km, double k1b, double k2b, double f, double vb, double fa, const int vvm, double *scpet, double *sct1, double *sct2, double *sct3, double *sct1b, double *sctab, double *sctvb, const int verbose) |
Simulation of dual-input compartmental models.
Definition in file simdicm.c.
| int simC1DI | ( | double * | t, |
| double * | cba, | ||
| double * | cbb, | ||
| const int | nr, | ||
| const double | k1a, | ||
| const double | k1b, | ||
| const double | k2, | ||
| double * | ct ) |
Simulate tissue TAC using dual-input tissue compartment model with a single tissue compartment.
Simulates tissue TAC using dual-input tissue compartment model (1 compartment, common for both inputs) at input TAC times. Vascular volume is not accounted for. The units of rate constants must be related to the time unit; 1/min and min, or 1/sec and sec.
| t | Array of time values. |
| cba | Array of concentrations of input A. |
| cbb | Array of concentrations of input B. |
| nr | Number of values in TACs. |
| k1a | Rate constant of the model for input A (from blood to C1). |
| k1b | Rate constant of the model for input B (from blood to C1). |
| k2 | Rate constant of the model (from C1 to blood). |
| ct | Pointer for TAC array to be simulated; must be allocated. |
Definition at line 30 of file simdicm.c.
| int simC3DIvs | ( | double * | t, |
| double * | ca1, | ||
| double * | ca2, | ||
| double * | cb, | ||
| const int | nr, | ||
| const double | k1, | ||
| const double | k2, | ||
| const double | k3, | ||
| const double | k4, | ||
| const double | k5, | ||
| const double | k6, | ||
| const double | k1b, | ||
| const double | k2b, | ||
| const double | f, | ||
| const double | vb, | ||
| const double | fa, | ||
| const int | vvm, | ||
| double * | scpet, | ||
| double * | sct1, | ||
| double * | sct2, | ||
| double * | sct3, | ||
| double * | sct1b, | ||
| double * | sctab, | ||
| double * | sctvb ) |
Simulate tissue TAC using dual-input tissue compartment model with compartments in series.
Simulates tissue TAC using dual-input tissue compartment model (1-3 compartments in series for tracer1, and 1 compartment for tracer2) at plasma TAC times, considering also contribution of arterial and venous vasculature, but no exchange between compartments for tracer1 and tracer2. The units of rate constants must be related to the time unit; 1/min and min, or 1/sec and sec. If blood flow is set to 0, function assumes that f>>k1, and Cvb=Cab.
| t | Array of time values. |
| ca1 | Array of arterial plasma activities of tracer1. |
| ca2 | Array of arterial plasma activities of tracer2. |
| cb | Array of arterial blood activities. |
| nr | Number of values in TACs. |
| k1 | Rate constant of the model for tracer1 (from plasma to C1). |
| k2 | Rate constant of the model for tracer1 (from C1 to plasma). |
| k3 | Rate constant of the model for tracer1 (from C1 to C2). |
| k4 | Rate constant of the model for tracer1 (from C2 to C1). |
| k5 | Rate constant of the model for tracer1 (from C2 to C3). |
| k6 | Rate constant of the model for tracer1 (from C3 to C2). |
| k1b | Rate constant of the model for tracer2 (from plasma to C4). |
| k2b | Rate constant of the model for tracer2 (from C4 to plasma). |
| f | Blood flow; if 0, function assumes that f>>k1, and Cvb=Cab. |
| vb | Vascular volume fraction. |
| fa | Arterial fraction of vascular volume. |
| vvm | Vascular volume modelling: set to 0 to use Cpet = Vb*Cb + (1-Vb)*Ct, or set to 1 to use Cpet = Vb*Cb + Ct. |
| scpet | Pointer for TAC array to be simulated; must be allocated. |
| sct1 | Pointer for 1st tracer1 compartment TAC, or NULL if not needed. |
| sct2 | Pointer for 2nd tracer1 compartment TAC, or NULL if not needed. |
| sct3 | Pointer for 3rd tracer1 compartment TAC, or NULL if not needed. |
| sct1b | Pointer for 1st tracer2 compartment TAC, or NULL if not needed. |
| sctab | Pointer for arterial TAC in tissue, or NULL if not needed. |
| sctvb | Pointer for venous TAC in tissue, or NULL if not needed. |
Definition at line 101 of file simdicm.c.
| int simC4DIvp | ( | double * | t, |
| double * | ca1, | ||
| double * | ca2, | ||
| double * | cb, | ||
| const int | nr, | ||
| const double | k1, | ||
| const double | k2, | ||
| const double | k3, | ||
| const double | k4, | ||
| const double | k5, | ||
| const double | k6, | ||
| const double | k7, | ||
| const double | km, | ||
| double | k1b, | ||
| const double | k2b, | ||
| const double | f, | ||
| const double | vb, | ||
| double | fa, | ||
| const int | vvm, | ||
| double * | scpet, | ||
| double * | sct1, | ||
| double * | sct2, | ||
| double * | sct3, | ||
| double * | sct1b, | ||
| double * | sctab, | ||
| double * | sctvb, | ||
| const int | verbose ) |
Simulate tissue TAC using dual-input tissue compartment model (compartments 2 and 3 in parallel for tracer1, and 1 compartment for tracer2) at plasma TAC sample times, considering also contribution of arterial and venous vasculature, and transfer of tracer1 to tracer2.
The units of rate constants must be related to the time unit; 1/min and min, or 1/sec and sec. If blood flow is set to 0, function assumes that f>>k1, and Cvb=Cab. Reference: TPCMOD0001 Appendix C. Tested with program p2t_di -parallel.
| t | Array of time values. |
| ca1 | Array of arterial plasma activities of tracer1 (parent tracer). |
| ca2 | Array of arterial plasma activities of tracer2 (metabolite). |
| cb | Array of (total) arterial blood activities. |
| nr | Number of values in TACs. |
| k1 | Rate constant of the model for tracer1 (from plasma to C1). |
| k2 | Rate constant of the model for tracer1 (from C1 to plasma). |
| k3 | Rate constant of the model for tracer1 (from C1 to C2). |
| k4 | Rate constant of the model for tracer1 (from C2 to C1). |
| k5 | Rate constant of the model for tracer1 (from C1 to C3). |
| k6 | Rate constant of the model for tracer1 (from C3 to C1). |
| k7 | Rate constant of the model for tracer1 (from C3 to plasma). |
| km | Rate constant of the model (from tracer1 in C1 to tracer2 in C4). |
| k1b | Rate constant of the model for tracer2 (from plasma to C4). |
| k2b | Rate constant of the model for tracer2 (from C4 to plasma). |
| f | Blood flow; if 0, function assumes that f>>k1, and Cvb=Cab. |
| vb | Vascular volume fraction (0<=Vb<1). |
| fa | Arterial fraction of vascular volume (0<=fa<=1). |
| vvm | Vascular volume modelling: set to 0 to use Cpet = Vb*Cb + (1-Vb)*Ct, or set to 1 to use Cpet = Vb*Cb + Ct. |
| scpet | Pointer for TAC array to be simulated; must be allocated. |
| sct1 | Pointer for 1st tracer1 compartment TAC, or NULL if not needed. |
| sct2 | Pointer for 2nd tracer1 compartment TAC, or NULL if not needed. |
| sct3 | Pointer for 3rd tracer1 compartment TAC, or NULL if not needed. |
| sct1b | Pointer for 1st tracer2 compartment TAC, or NULL if not needed. |
| sctab | Pointer for arterial TAC in tissue, or NULL if not needed. |
| sctvb | Pointer for venous TAC in tissue, or NULL if not needed. |
| verbose | Verbose level; if zero, then nothing is printed into stdout or stderr. |
Definition at line 251 of file simdicm.c.
| int simC4DIvs | ( | double * | t, |
| double * | ca1, | ||
| double * | ca2, | ||
| double * | cb, | ||
| const int | nr, | ||
| const double | k1, | ||
| const double | k2, | ||
| const double | k3, | ||
| const double | k4, | ||
| const double | k5, | ||
| const double | k6, | ||
| const double | k7, | ||
| const double | km, | ||
| double | k1b, | ||
| double | k2b, | ||
| double | f, | ||
| double | vb, | ||
| double | fa, | ||
| const int | vvm, | ||
| double * | scpet, | ||
| double * | sct1, | ||
| double * | sct2, | ||
| double * | sct3, | ||
| double * | sct1b, | ||
| double * | sctab, | ||
| double * | sctvb, | ||
| const int | verbose ) |
Simulate tissue TAC using dual-input tissue compartment model (1-3 compartments in series for tracer1, and 1 compartment for tracer2) at plasma TAC times, considering also contribution of arterial and venous vasculature, and transfer of tracer1 to tracer2.
The units of rate constants must be related to the time unit; 1/min and min, or 1/sec and sec. If blood flow is set to 0, function assumes that f>>k1, and Cvb=Cab. Reference: TPCMOD0001 Appendix B. Tested with program p2t_di -series.
| t | Array of time values. |
| ca1 | Array of arterial plasma activities of tracer1 (parent tracer). |
| ca2 | Array of arterial plasma activities of tracer2 (metabolite). |
| cb | Array of (total) arterial blood activities. |
| nr | Number of values in TACs. |
| k1 | Rate constant of the model for tracer1 (from plasma to C1). |
| k2 | Rate constant of the model for tracer1 (from C1 to plasma). |
| k3 | Rate constant of the model for tracer1 (from C1 to C2). |
| k4 | Rate constant of the model for tracer1 (from C2 to C1). |
| k5 | Rate constant of the model for tracer1 (from C2 to C3). |
| k6 | Rate constant of the model for tracer1 (from C3 to C2). |
| k7 | Rate constant of the model for tracer1 (from C3 to plasma). |
| km | Rate constant of the model (from tracer1 in C1 to tracer2 in C4). |
| k1b | Rate constant of the model for tracer2 (from plasma to C4). |
| k2b | Rate constant of the model for tracer2 (from C4 to plasma). |
| f | Blood flow; if 0, function assumes that f>>k1, and Cvb=Cab. |
| vb | Vascular volume fraction. |
| fa | Arterial fraction of vascular volume. |
| vvm | Vascular volume modelling: set to 0 to use Cpet = Vb*Cb + (1-Vb)*Ct, or set to 1 to use Cpet = Vb*Cb + Ct. |
| scpet | Pointer for TAC array to be simulated; must be allocated. |
| sct1 | Pointer for 1st tracer1 compartment TAC, or NULL if not needed. |
| sct2 | Pointer for 2nd tracer1 compartment TAC, or NULL if not needed. |
| sct3 | Pointer for 3rd tracer1 compartment TAC, or NULL if not needed. |
| sct1b | Pointer for 1st tracer2 compartment TAC, or NULL if not needed. |
| sctab | Pointer for arterial TAC in tissue, or NULL if not needed. |
| sctvb | Pointer for venous TAC in tissue, or NULL if not needed. |
| verbose | Verbose level; if zero, then nothing is printed into stdout or stderr. |
Definition at line 441 of file simdicm.c.