# Problem when assessing parameter identifiability using ODE system built with @mtkbuild

**URL:** <https://discourse.julialang.org/t/problem-when-assessing-parameter-identifiability-using-ode-system-built-with-mtkbuild/112418>\
**Category:** Modelling & Simulations\
**Created:** [April 2, 2024, 1:35pm UTC](https://discourse.julialang.org/t/problem-when-assessing-parameter-identifiability-using-ode-system-built-with-mtkbuild/112418 "2024-04-02T13:35:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![giro](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@giro](https://discourse.julialang.org/u/giro)\
**Post date:** [April 2, 2024, 1:35pm UTC](https://discourse.julialang.org/t/problem-when-assessing-parameter-identifiability-using-ode-system-built-with-mtkbuild/112418/1 "2024-04-02T13:35:29Z")

</div>

Hello,

I have built several models of protein dynamics with ModelingToolkit.jl (using `@mtkmodel` and `@mtkbuild`) and I would like to perform a parameter identifiability assessement with StructuralIdentifiability.jl.

But apparently I’m unable to pass the ODE system built with `@mtkbuilt` to StructuralIdentifiability.assess\_local\_identifiability(). It cannot find the output functions although they have been specified. It works if I define the ODE system with `@ODEmodel` as explained on the tutorial: [ODE Tools · StructuralIdentifiability.jl](https://docs.sciml.ai/StructuralIdentifiability/stable/utils/ode/), but if possible, I’d like to avoid having to redefine all models.

As an example, here is the error message I get when I copy-paste the code provided on ModelingToolkit tutorial: [Parameter Identifiability in ODE Models · ModelingToolkit.jl](https://docs.sciml.ai/ModelingToolkit/stable/tutorials/parameter_identifiability/)

```julia
using StructuralIdentifiability, ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D

@mtkmodel Biohydrogenation begin
    @variables begin
        x4(t)
        x5(t)
        x6(t)
        x7(t)
        y1(t), [output = true]
        y2(t), [output = true]
    end
    @parameters begin
        k5
        k6
        k7
        k8
        k9
        k10
    end
    # define equations
    @equations begin
        D(x4) ~ -k5 * x4 / (k6 + x4)
        D(x5) ~ k5 * x4 / (k6 + x4) - k7 * x5 / (k8 + x5 + x6)
        D(x6) ~ k7 * x5 / (k8 + x5 + x6) - k9 * x6 * (k10 - x6) / k10
        D(x7) ~ k9 * x6 * (k10 - x6) / k10
        y1 ~ x4
        y2 ~ x5
    end
end

# define the system
@mtkbuild de = Biohydrogenation()

# query local identifiability
# we pass the ode-system
local_id_all = assess_local_identifiability(de, prob_threshold = 0.99)

```

```julia
ERROR: LoadError: Measured quantities (output functions) were not provided and no outputs were found.

```

I get the same error message with my MTK models. Does anyone know how to fix this?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [April 2, 2024, 2:45pm UTC](https://discourse.julialang.org/t/problem-when-assessing-parameter-identifiability-using-ode-system-built-with-mtkbuild/112418/2 "2024-04-02T14:45:27Z")

</div>

> [@giro](#):
>
> ```julia
> ERROR: LoadError: Measured quantities (output functions) were not provided and no outputs were found.
> 
> ```

It’s missing `measured_quantities` as that states.

> **[Creating ODE System · StructuralIdentifiability.jl](https://docs.sciml.ai/StructuralIdentifiability/stable/tutorials/creating_ode/#Defining-using-ModelingToolkit)**
>
> Documentation for StructuralIdentifiability.jl.

We might need to update that MTK tutorial.

---

<div class="post-metadata">

**Author:** ![giro](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@giro](https://discourse.julialang.org/u/giro)\
**Post date:** [April 2, 2024, 3:32pm UTC](https://discourse.julialang.org/t/problem-when-assessing-parameter-identifiability-using-ode-system-built-with-mtkbuild/112418/3 "2024-04-02T15:32:46Z")

</div>

Many thanks for the input, I could make it run.
