SciML / StructuralIdentifiability.jl

Fast and automatic structural identifiability software for ODE systems
https://docs.sciml.ai/StructuralIdentifiability/stable/
MIT License
109 stars 17 forks source link

Algebraic function in the ODE for structural analysis? #174

Closed danilodurs closed 6 months ago

danilodurs commented 1 year ago

Hello,

I have implemented the minimal glucose model (Bergman et al 1979) with Catalyst.jl, from which I get an ODESystem object. As described in my paper of reference, the small model includes interpolated insulin data (to avoid regulation modeling):

using Catalyst, DifferentialEquations, StructuralIdentifiability, Interpolations

tticks = [0.0, 15.0, 30.0, 60.0, 90.0, 120.0, 180.0, 240.0, 300.0]
datamean = [6.12,18.10, 32.57, 25.77, 27.94, 33.47, 35.18, 39.88, 46.20] 

# minimal model
Iintpol(t) = linear_interpolation(tticks,datamean)(t)
@register_symbolic Iintpol(t)
minimalModel_rn = @reaction_network minimalmodel begin
    B_0,     ∅   ⇒   G_p              # hepatic glucose production
    X,       G_p --> ∅                   # glucose insulin-dependent regulation
    k_greg,  G_p --> 2*G_p      # glucose "self-regulation"
    k_ipan*Iintpol(t), ∅ ⇒ X    # blood insulin --> tissue insulin            
    k_ireg, X --> 2*X                  # insulin "self-regulation"
end B_0 k_ipan k_ireg k_greg

minimalModel_ode = convert(ODESytem, minimalModel_rn)

When I try to perform a full structural analysis, I obtain an issue because of Iintpol(t):

@variables t y(t)
assess_identifiability(minimalModel_ode,measured_quantities = [y ~ states(minimalModel_ode)[1]]) # G_p is the observable

output:

[ Info: Preproccessing `ModelingToolkit.ODESystem` object
ArgumentError: Function Iintpol is not supported

Is there any workaround for this case?

pogudingleb commented 1 year ago

@danilodurs The function you would like to use is piecewise-linear, right? One thing I would propose is just to try a linear function there instead. Then if the model will be identifiable, it will be identifiable with the piecewise-linear one as well.