pub enum Target {
Concentration,
AUCFromZero,
AUCFromLastDose,
}Expand description
Target type for dose optimization
Specifies whether the optimization targets are drug concentrations at specific times or Area Under the Curve (AUC) values.
§Examples
use pmcore::bestdose::Target;
// Optimize to achieve target concentrations
let target_type = Target::Concentration;
// Optimize to achieve target cumulative AUC from time 0
let target_type = Target::AUCFromZero;
// Optimize to achieve target interval AUC from last dose
let target_type = Target::AUCFromLastDose;§AUC Calculation Methods
The algorithm supports two AUC calculation approaches:
§AUCFromZero (Cumulative AUC)
- Integrates from time 0 to the observation time
- Useful for total drug exposure assessment
- Formula:
AUC(t) = ∫₀ᵗ C(τ) dτ
§AUCFromLastDose (Interval AUC)
- Integrates from the last dose time to the observation time
- Useful for steady-state dosing intervals (e.g., AUCτ)
- Formula:
AUC(t) = ∫ₜ_last_dose^t C(τ) dτ - Automatically finds the most recent bolus/infusion before each observation
Both methods use trapezoidal rule on a dense time grid controlled by settings.predictions().idelta.
Variants§
Concentration
Target concentrations at observation times
The optimizer finds doses to achieve specified concentration values at the observation times in the target subject.
§Example Target Subject
let target = Subject::builder("patient")
.bolus(0.0, 100.0, 0) // Dose to optimize
.observation(12.0, 10.0, 0) // Target: 10 mg/L at 12h
.observation(24.0, 5.0, 0) // Target: 5 mg/L at 24h
.build();AUCFromZero
Target cumulative AUC values from time 0
The optimizer finds doses to achieve specified cumulative AUC values calculated from the beginning of the dosing regimen (time 0).
§Example Target Subject
let target = Subject::builder("patient")
.bolus(0.0, 100.0, 0) // Dose to optimize
.bolus(12.0, 100.0, 0) // Second dose to optimize
.observation(24.0, 400.0, 0) // Target: AUC₀₋₂₄ = 400 mg·h/L
.build();§Time Grid Resolution
Control the time grid density via settings:
settings.predictions().idelta = 15; // 15-minute intervalsAUCFromLastDose
Target interval AUC values from last dose to observation
The optimizer finds doses to achieve specified interval AUC values calculated from the most recent dose before each observation. This is particularly useful for steady-state dosing intervals (AUCτ).
§Example Target Subject
let target = Subject::builder("patient")
.bolus(0.0, 200.0, 0) // Loading dose (fixed at 200 mg)
.bolus(12.0, 0.0, 0) // Maintenance dose to optimize
.observation(24.0, 200.0, 0) // Target: AUC₁₂₋₂₄ = 200 mg·h/L
.build();
// The observation at t=24h targets AUC from t=12h (last dose) to t=24h§Behavior
For each observation at time t:
- Finds the most recent bolus or infusion before time t
- Calculates AUC from that dose time to t
- If no dose exists before t, integrates from time 0
This allows different observations to have different integration intervals, each relative to their respective preceding dose.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Target
impl<'de> Deserialize<'de> for Target
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Copy for Target
impl Eq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnwindSafe for Target
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.