diff --git a/benchmarking/IdentifiableFunctions/experiments.jl b/benchmarking/IdentifiableFunctions/experiments.jl index e63eb2124..f5b3077a9 100644 --- a/benchmarking/IdentifiableFunctions/experiments.jl +++ b/benchmarking/IdentifiableFunctions/experiments.jl @@ -995,8 +995,8 @@ begin end begin - StructuralIdentifiability.find_identifiable_functions(Pivastatin); - StructuralIdentifiability.print_timings_table(); + StructuralIdentifiability.find_identifiable_functions(Pivastatin) + StructuralIdentifiability.print_timings_table() end fracs = StructuralIdentifiability.dennums_to_fractions(dennums); diff --git a/src/ODE.jl b/src/ODE.jl index 52cad64d4..a69b59308 100644 --- a/src/ODE.jl +++ b/src/ODE.jl @@ -460,13 +460,13 @@ macro ODEmodel(ex::Expr...) end logging_exprs = [ - # :(with_logger(StructuralIdentifiability._si_logger[]) do), + # :(with_logger(StructuralIdentifiability._si_logger[]) do), :(@info "Summary of the model:"), :(@info "State variables: " * $(join(map(string, collect(x_vars)), ", "))), :(@info "Parameters: " * $(join(map(string, collect(params)), ", "))), :(@info "Inputs: " * $(join(map(string, collect(u_vars)), ", "))), :(@info "Outputs: " * $(join(map(string, collect(y_vars)), ", "))), - # :(end), + # :(end), ] # creating the ode object ode_expr = :(StructuralIdentifiability.ODE{StructuralIdentifiability.Nemo.fmpq_mpoly}( diff --git a/src/StructuralIdentifiability.jl b/src/StructuralIdentifiability.jl index ba146daf6..f2eb868a6 100644 --- a/src/StructuralIdentifiability.jl +++ b/src/StructuralIdentifiability.jl @@ -96,10 +96,7 @@ function assess_identifiability( restart_logging(loglevel = loglevel) reset_timings() with_logger(_si_logger[]) do - return _assess_identifiability(ode, - funcs_to_check = funcs_to_check, - p = p - ) + return _assess_identifiability(ode, funcs_to_check = funcs_to_check, p = p) end end @@ -108,7 +105,6 @@ function _assess_identifiability( funcs_to_check = Vector(), p::Float64 = 0.99, ) where {P <: MPolyElem{fmpq}} - p_glob = 1 - (1 - p) * 0.9 p_loc = 1 - (1 - p) * 0.1 @@ -182,7 +178,8 @@ function assess_identifiability( ) restart_logging(loglevel = loglevel) with_logger(_si_logger[]) do - return _assess_identifiability(ode, + return _assess_identifiability( + ode, measured_quantities = measured_quantities, funcs_to_check = funcs_to_check, p = p, @@ -207,11 +204,7 @@ function _assess_identifiability( end funcs_to_check_ = [eval_at_nemo(each, conversion) for each in funcs_to_check] - result = _assess_identifiability( - ode, - funcs_to_check = funcs_to_check_, - p = p, - ) + result = _assess_identifiability(ode, funcs_to_check = funcs_to_check_, p = p) nemo2mtk = Dict(funcs_to_check_ .=> funcs_to_check) out_dict = Dict(nemo2mtk[param] => result[param] for param in funcs_to_check_) return out_dict diff --git a/src/identifiable_functions.jl b/src/identifiable_functions.jl index 378876880..52a6782c7 100644 --- a/src/identifiable_functions.jl +++ b/src/identifiable_functions.jl @@ -54,7 +54,8 @@ function find_identifiable_functions( restart_logging(loglevel = loglevel) reset_timings() with_logger(_si_logger[]) do - return _find_identifiable_functions(ode, + return _find_identifiable_functions( + ode, p = p, seed = seed, with_states = with_states, @@ -71,7 +72,7 @@ function _find_identifiable_functions( with_states = false, simplify = :standard, rational_interpolator = :VanDerHoevenLecerf, -) where {T <: MPolyElem{fmpq}} +) where {T <: MPolyElem{fmpq}} Random.seed!(seed) @assert simplify in (:standard, :weak, :strong, :absent) runtime_start = time_ns() @@ -112,7 +113,7 @@ function _find_identifiable_functions( _runtime_logger[:id_total] = (time_ns() - runtime_start) / 1e9 _runtime_logger[:are_id_funcs_polynomial] = all(isone ∘ denominator, id_funcs_fracs) @info "The search for identifiable functions concluded in $(_runtime_logger[:id_total]) seconds" - + return id_funcs_fracs end @@ -166,7 +167,8 @@ function find_identifiable_functions( restart_logging(loglevel = loglevel) reset_timings() with_logger(_si_logger[]) do - return _find_identifiable_functions(ode, + return _find_identifiable_functions( + ode, measured_quantities = measured_quantities, p = p, seed = seed, diff --git a/src/lincomp.jl b/src/lincomp.jl index aef320884..72dd6a327 100644 --- a/src/lincomp.jl +++ b/src/lincomp.jl @@ -29,7 +29,7 @@ function linear_compartment_model( graph::Vector{Vector{Int}}, inputs::Vector{Int}, outputs::Vector{Int}, - leaks::Vector{Int} + leaks::Vector{Int}, ) n = length(graph) x_vars_names = ["x$i" for i in 1:n] diff --git a/src/local_identifiability.jl b/src/local_identifiability.jl index 994a89938..578240d96 100644 --- a/src/local_identifiability.jl +++ b/src/local_identifiability.jl @@ -173,7 +173,8 @@ function assess_local_identifiability( ) restart_logging(loglevel = loglevel) with_logger(_si_logger[]) do - return _assess_local_identifiability(ode, + return _assess_local_identifiability( + ode, measured_quantities = measured_quantities, funcs_to_check = funcs_to_check, p = p, @@ -260,7 +261,8 @@ function assess_local_identifiability( restart_logging(loglevel = loglevel) reset_timings() with_logger(_si_logger[]) do - return _assess_local_identifiability(ode, + return _assess_local_identifiability( + ode, funcs_to_check = funcs_to_check, p = p, type = type, @@ -276,7 +278,6 @@ function _assess_local_identifiability( type = :SE, trbasis = nothing, ) where {P <: MPolyElem{Nemo.fmpq}} - if isempty(funcs_to_check) funcs_to_check = ode.parameters if type == :SE