From 3d5d9eed312cd558b9e05dfb5fd19755b273c9cb Mon Sep 17 00:00:00 2001 From: Alexander Demin Date: Sun, 10 Mar 2024 14:41:30 +0300 Subject: [PATCH] also fix unicode for discrete systems --- src/discrete.jl | 2 +- test/ode.jl | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/discrete.jl b/src/discrete.jl index 5cfc7b47..762af07a 100644 --- a/src/discrete.jl +++ b/src/discrete.jl @@ -69,7 +69,7 @@ end function Base.show(io::IO, dds::DDS) for x in x_vars(dds) if endswith(var_to_str(x), "(t)") - print(io, var_to_str(x)[1:(end - 3)] * "(t + 1) = ") + print(io, chopsuffix(var_to_str(x), "(t)") * "(t + 1) = ") else print(io, var_to_str(x) * "(t + 1) = ") end diff --git a/test/ode.jl b/test/ode.jl index 1382d273..a4b79e16 100644 --- a/test/ode.jl +++ b/test/ode.jl @@ -17,7 +17,7 @@ ) end -@testset "ODE unicode" begin +@testset "ODE/DDE unicode" begin ode = StructuralIdentifiability.@ODEmodel( 🐁'(t) = a * 🐁 - b * 🐁 * 🦉, 🦉'(t) = c * 🦉 + d * 🐁 * 🦉, @@ -44,4 +44,12 @@ end StructuralIdentifiability.assess_identifiability(ode) StructuralIdentifiability.find_identifiable_functions(ode) StructuralIdentifiability.reparametrize_global(ode) + + dde = StructuralIdentifiability.@DDSmodel( + 🐁(t + 1) = a * 🐁(t) - b * 🐁(t) * 🦉(t), + 🦉(t + 1) = c * 🦉(t) + d * 🐁(t) * 🦉(t), + y(t) = 🐁(t) + ) + println(dde) + StructuralIdentifiability.assess_local_identifiability(dde) end