Other Helpful Functions
StructuralIdentifiability.cmp_lieStructuralIdentifiability.cmp_prefer_paramsStructuralIdentifiability.decompose_derivativeStructuralIdentifiability.default_cmpStructuralIdentifiability.extract_coefficientsStructuralIdentifiability.make_substitutionStructuralIdentifiability.replace_with_icStructuralIdentifiability.switch_ringStructuralIdentifiability.uncertain_factorization
StructuralIdentifiability.cmp_lie — Method
cmp_lie(ode, cmp)Wrap a comparator of rational functions cmp so Lie derivatives are compared when they are nonzero.
StructuralIdentifiability.cmp_prefer_params — Method
cmp_prefer_params(ode, cmp)Wrap a comparator of rational functions cmp so that functions containing only parameters of the ode are preferred over functions containing states.
StructuralIdentifiability.decompose_derivative — Method
decompose_derivative(varname, prefixes)Determines if it is possible to represent the varname as a_number where a is an element of prefixes If yes, returns a pair (a, number), otherwise nothing
StructuralIdentifiability.default_cmp — Method
default_cmp(ode)Returns a comparator for rational functions. Used as a default measure of simplicity in StructuralIdentifiability.jl.
Example
julia> using StructuralIdentifiability
julia> ode = @ODEmodel(
x0'(t) = -(a01 + a21) * x0(t) + a12 * x1(t),
x1'(t) = a21 * x0(t) - a12 * x1(t),
y(t) = x0(t)
);
julia> f1, f2 = (a01 + a21) // a12, x0 // a12;
julia> cmp = default_cmp(ode);
julia> cmp(f1, f2) # returns true, so f1 is considered simpler than f2
trueStructuralIdentifiability.extract_coefficients — Method
extract_coefficients(poly, variables)Input:
poly- multivariate polynomialvariables- a list of variables from the generators of the ring ofpoly
Output:
- dictionary with keys being tuples of length
length(variables)and values being polynomials in the variables other than those which are the coefficients at the corresponding monomials (in a smaller polynomial ring)
StructuralIdentifiability.make_substitution — Method
make_substitution(f, var_sub, val_numer, val_denom)Substitute a variable in a polynomial with an expression
Input:
f- the polynomialvar_sub- the variable to be substitutedvar_numer- numerator of the substitution expressionvar_denom- denominator of the substitution expression
Output:
polynomial- result of substitution
StructuralIdentifiability.replace_with_ic — Method
replace_with_ic(ode::ODE, funcs)Takes an ode and a list of functions in the states and parameters and makes a change of variable names x(t) -> x(0). Function is used to prepare the output for the case of known initial conditions
StructuralIdentifiability.switch_ring — Method
switch_ring(v, ring)For a variable v, returns a variable in ring with the same name
StructuralIdentifiability.uncertain_factorization — Method
uncertain_factorization(f)Input:
f- polynomial with rational coefficients
Output:
- list of pairs
(div, certainty)wherediv's are divisors offsuch thatfis their product with certain powers- if
certaintyis true,divis $Q$-irreducible