Skip to content

Commit

Permalink
also fix unicode for discrete systems
Browse files Browse the repository at this point in the history
  • Loading branch information
sumiya11 committed Mar 10, 2024
1 parent 5343fb4 commit 3d5d9ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/discrete.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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) = ")

Check warning on line 72 in src/discrete.jl

View check run for this annotation

Codecov / codecov/patch

src/discrete.jl#L72

Added line #L72 was not covered by tests
else
print(io, var_to_str(x) * "(t + 1) = ")
end
Expand Down
10 changes: 9 additions & 1 deletion test/ode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
)
end

@testset "ODE unicode" begin
@testset "ODE/DDE unicode" begin
ode = StructuralIdentifiability.@ODEmodel(
🐁'(t) = a * 🐁 - b * 🐁 * 🦉,
🦉'(t) = c * 🦉 + d * 🐁 * 🦉,
Expand All @@ -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

0 comments on commit 3d5d9ee

Please sign in to comment.