Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ext/ModelingToolkitSIExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,13 @@ function __mtk_to_si(
params_from_measured_quantities = union(
[
filter(
s ->
!Symbolics.iscall(s) &&
s ->
!Symbolics.iscall(s) &&
!(string(s) in string.(state_vars)) &&
!(string(s) * "(t)" in string.(state_vars)) &&
(string(s) != string(t)),
get_variables(y[2]),
) for y in measured_quantities
get_variables(y[2]),
) for y in measured_quantities
]...,
)
params = union(params, params_from_measured_quantities)
Expand Down
12 changes: 6 additions & 6 deletions src/io_equation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ Output:
# choosing the output to prolong
outputs_with_scores = [
(
min(d[2]...) * length(y_equations[d[1]]),
min(d[2]...),
-count(x -> x == min(d[2]...), d[2]) + length(y_equations[d[1]]) // 30,
length(y_equations[d[1]]),
d[1],
) for d in var_degs
min(d[2]...) * length(y_equations[d[1]]),
min(d[2]...),
-count(x -> x == min(d[2]...), d[2]) + length(y_equations[d[1]]) // 30,
length(y_equations[d[1]]),
d[1],
) for d in var_degs
]
@debug "Scores: $outputs_with_scores"
y_prolong = sort(outputs_with_scores)[1][end]
Expand Down
6 changes: 3 additions & 3 deletions test/bodies/diff_sequence_solution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ if GROUP == "All" || GROUP == "Core"
end
return Dict(
(
parent_ring_change(k[1], parent(dds)),
parent_ring_change(k[2], parent(dds)),
) => res for (k, res) in part_diffs
parent_ring_change(k[1], parent(dds)),
parent_ring_change(k[2], parent(dds)),
) => res for (k, res) in part_diffs
)
end

Expand Down
12 changes: 6 additions & 6 deletions test/bodies/paradigm_shift.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ function test_reparametrization(old_ode, new_ode, var_mapping, implicit_relation
new_inputs = new_ode.u_vars
new_param_spec = Dict(
new_param => StructuralIdentifiability.eval_at_dict(
var_mapping[new_param],
old_param_spec,
) for new_param in new_params
var_mapping[new_param],
old_param_spec,
) for new_param in new_params
)
new_var_ic = Dict(
new_var => StructuralIdentifiability.eval_at_dict(
var_mapping[new_var],
merge(old_param_spec, old_var_ic),
) for new_var in new_vars
var_mapping[new_var],
merge(old_param_spec, old_var_ic),
) for new_var in new_vars
)
new_input_ts = Dict{eltype(new_vars), Vector{Nemo.QQFieldElem}}(
new_input => old_input_ts[numerator(var_mapping[new_input])] for
Expand Down
8 changes: 4 additions & 4 deletions test/bodies/submodels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ include(joinpath(@__DIR__, "..", "shared", "test_setup.jl"))
submodels = Set(
[
(
collect(map(var_to_str, ode.x_vars)),
collect(map(var_to_str, ode.y_vars)),
collect(map(var_to_str, ode.u_vars)),
) for ode in submodels
collect(map(var_to_str, ode.x_vars)),
collect(map(var_to_str, ode.y_vars)),
collect(map(var_to_str, ode.u_vars)),
) for ode in submodels
]
)
@test submodels == c[:submodels]
Expand Down
Loading