Skip to content

Commit 875362c

Browse files
authored
Merge pull request #504 from SciML/kic_optim
Reducing hidden simplifications in the known IC regime
2 parents 30e1db3 + 629738e commit 875362c

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

src/identifiable_functions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function _find_identifiable_functions(
125125
priority_variables = [parent_ring_change(p, bring) for p in ode.parameters],
126126
)
127127
else
128-
id_funcs_fracs = dennums_to_fractions(id_funcs)
128+
id_funcs_fracs = RationalFunctionFields.dennums_to_fractions(id_funcs)
129129
end
130130
id_funcs_fracs = [parent_ring_change(f, parent(ode)) for f in id_funcs_fracs]
131131
_runtime_logger[:id_total] = (time_ns() - runtime_start) / 1.0e9

src/known_ic.jl

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,22 @@ function _find_identifiable_functions_kic(
4242
ode,
4343
prob_threshold = half_p,
4444
with_states = true,
45-
simplify = simplify,
45+
simplify = :absent,
4646
rational_interpolator = rational_interpolator,
4747
seed = seed,
4848
)
4949

50-
id_funcs = simplified_generating_set(
51-
RationalFunctionField(
52-
vcat(id_funcs_general, [f // one(parent(ode)) for f in known_ic]),
53-
),
54-
prob_threshold = half_p,
55-
seed = seed,
56-
simplify = simplify,
57-
rational_interpolator = rational_interpolator,
58-
)
50+
id_funcs = vcat(id_funcs_general, [f // one(parent(ode)) for f in known_ic])
51+
52+
if (simplify != :absent)
53+
id_funcs = simplified_generating_set(
54+
RationalFunctionField(id_funcs),
55+
prob_threshold = half_p,
56+
seed = seed,
57+
simplify = simplify,
58+
rational_interpolator = rational_interpolator,
59+
)
60+
end
5961

6062
@info "The search for identifiable functions with known initial conditions concluded in $((time_ns() - runtime_start) / 1.0e9) seconds"
6163

@@ -89,7 +91,7 @@ function _assess_identifiability_kic(
8991
funcs_to_check = vcat(ode.x_vars, ode.parameters)
9092
end
9193
half_p = 0.5 + prob_threshold / 2
92-
id_funcs = _find_identifiable_functions_kic(ode, known_ic, prob_threshold = half_p)
94+
id_funcs = _find_identifiable_functions_kic(ode, known_ic, prob_threshold = half_p, simplify = :absent)
9395
#funcs_to_check = replace_with_ic(ode, funcs_to_check)
9496
result = OrderedDict(f => :globally for f in funcs_to_check)
9597

0 commit comments

Comments
 (0)