Skip to content

Commit d4fd35f

Browse files
committed
fix warn messages
1 parent 5c0bd3b commit d4fd35f

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

test/extensions/structural_identifiability.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ end
316316
### Other Tests ###
317317

318318
# Checks that identifiability can be assessed for coupled CRN/DAE systems.
319+
# `remove_conserved = false` is used to remove info print statement from log.
319320
let
320321
rs = @reaction_network begin
321322
@parameters k c1 c2
@@ -329,19 +330,20 @@ let
329330
@unpack p, d, k, c1, c2 = rs
330331

331332
# Tests identifiability assessment when all unknowns are measured.
332-
gi_1 = assess_identifiability(rs; measured_quantities = [:X, :V, :C], loglevel)
333-
li_1 = assess_local_identifiability(rs; measured_quantities = [:X, :V, :C], loglevel)
334-
ifs_1 = find_identifiable_functions(rs; measured_quantities = [:X, :V, :C], loglevel)
333+
remove_conserved = false
334+
gi_1 = assess_identifiability(rs; measured_quantities = [:X, :V, :C], loglevel, remove_conserved)
335+
li_1 = assess_local_identifiability(rs; measured_quantities = [:X, :V, :C], loglevel, remove_conserved)
336+
ifs_1 = find_identifiable_functions(rs; measured_quantities = [:X, :V, :C], loglevel, remove_conserved)
335337
@test sym_dict(gi_1) == Dict([:X => :globally, :C => :globally, :V => :globally, :k => :globally,
336338
:c1 => :nonidentifiable, :c2 => :nonidentifiable, :p => :globally, :d => :globally])
337339
@test sym_dict(li_1) == Dict([:X => 1, :C => 1, :V => 1, :k => 1, :c1 => 0, :c2 => 0, :p => 1, :d => 1])
338340
@test issetequal(ifs_1, [d, p, k, c1 + c2])
339341

340342
# Tests identifiability assessment when only variables are measured.
341343
# Checks that a parameter in an equation can be set as known.
342-
gi_2 = assess_identifiability(rs; measured_quantities = [:V, :C], known_p = [:c1], loglevel)
343-
li_2 = assess_local_identifiability(rs; measured_quantities = [:V, :C], known_p = [:c1], loglevel)
344-
ifs_2 = find_identifiable_functions(rs; measured_quantities = [:V, :C], known_p = [:c1], loglevel)
344+
gi_2 = assess_identifiability(rs; measured_quantities = [:V, :C], known_p = [:c1], loglevel, remove_conserved)
345+
li_2 = assess_local_identifiability(rs; measured_quantities = [:V, :C], known_p = [:c1], loglevel, remove_conserved)
346+
ifs_2 = find_identifiable_functions(rs; measured_quantities = [:V, :C], known_p = [:c1], loglevel, remove_conserved)
345347
@test sym_dict(gi_2) == Dict([:X => :nonidentifiable, :C => :globally, :V => :globally, :k => :nonidentifiable,
346348
:c1 => :globally, :c2 => :nonidentifiable, :p => :nonidentifiable, :d => :globally])
347349
@test sym_dict(li_2) == Dict([:X => 0, :C => 1, :V => 1, :k => 0, :c1 => 1, :c2 => 0, :p => 0, :d => 1])

test/simulation_and_solving/solve_nonlinear.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ let
9090
# Creates NonlinearProblem.
9191
u0 = [steady_state_network_3.X => rand(), steady_state_network_3.Y => rand() + 1.0, steady_state_network_3.Y2 => rand() + 3.0, steady_state_network_3.XY2 => 0.0]
9292
p = [:p => rand()+1.0, :d => 0.5, :k1 => 1.0, :k2 => 2.0, :k3 => 3.0, :k4 => 4.0]
93-
nl_prob_1 = NonlinearProblem(steady_state_network_3, u0, p; remove_conserved = true)
93+
nl_prob_1 = NonlinearProblem(steady_state_network_3, u0, p; remove_conserved = true, remove_conserved_warn = false)
9494
nl_prob_2 = NonlinearProblem(steady_state_network_3, u0, p)
9595

9696
# Solves it using standard algorithm and simulation based algorithm.

0 commit comments

Comments
 (0)