Skip to content

Conversation

@iliailmer
Copy link
Collaborator

Relevant to #55, I started trying to play around with Oscar for Groebner Basis computation

@iliailmer iliailmer added enhancement New feature or request dependency labels Nov 21, 2021
@iliailmer iliailmer self-assigned this Nov 21, 2021
@iliailmer
Copy link
Collaborator Author

The following code:

using StructuralIdentifiability

ode = @ODEmodel(
        x0'(t) = -(a01 + a21) * x0(t) + a12 * x1(t),
        x1'(t) = a21 * x0(t) - a12 * x1(t),
        y(t) = x0(t)
    )

assess_identifiability(ode)

produces the error (note that this is using msolve for Groerbner Basis:

ERROR: Dimension of ideal is greater than zero, no solutions provided.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] msolve(I::MPolyIdeal{Singular.spoly{Singular.n_Q}}; initial_hts::Int64, nr_thrds::Int64, max_nr_pairs::Int64, la_option::Int64, info_level::Int64, precision::Int64)
    @ Oscar ~/.julia/packages/Oscar/ViMMc/src/Rings/msolve/msolve.jl:145
  [3] msolve(I::MPolyIdeal{Singular.spoly{Singular.n_Q}})
    @ Oscar ~/.julia/packages/Oscar/ViMMc/src/Rings/msolve/msolve.jl:80
  [4] check_field_membership(generators::Vector{Vector{fmpq_mpoly}}, rat_funcs::Vector{Union{AbstractAlgebra.Generic.Frac{fmpq_mpoly}, fmpq_mpoly}}, p::Float64; method::Symbol)
    @ StructuralIdentifiability ~/projects/julia/StructuralIdentifiability.jl/src/global_identifiability.jl:85
  [5] check_identifiability(io_equations::Vector{fmpq_mpoly}, parameters::Vector{fmpq_mpoly}, funcs_to_check::Vector{Any}, p::Float64; method::Symbol)
    @ StructuralIdentifiability ~/projects/julia/StructuralIdentifiability.jl/src/global_identifiability.jl:126
  [6] macro expansion
    @ ./timing.jl:287 [inlined]
  [7] assess_global_identifiability(ode::ODE{fmpq_mpoly}, funcs_to_check::Vector{Any}, p::Float64; var_change::Symbol, gb_method::Symbol)
    @ StructuralIdentifiability ~/projects/julia/StructuralIdentifiability.jl/src/global_identifiability.jl:224
  [8] assess_global_identifiability
    @ ~/projects/julia/StructuralIdentifiability.jl/src/global_identifiability.jl:199 [inlined]
  [9] macro expansion
    @ ./timing.jl:287 [inlined]
 [10] assess_identifiability(ode::ODE{fmpq_mpoly}, funcs_to_check::Vector{fmpq_mpoly}, p::Float64)
    @ StructuralIdentifiability ~/projects/julia/StructuralIdentifiability.jl/src/StructuralIdentifiability.jl:113
 [11] assess_identifiability (repeats 2 times)
    @ ~/projects/julia/StructuralIdentifiability.jl/src/StructuralIdentifiability.jl:71 [inlined]
 [12] top-level scope
    @ REPL[5]:1

If I use f4 then I get

ERROR: At the moment f4 only supports finite fields.

We used f4 before, this example worked, what could be the issue? @pogudingleb

@pogudingleb
Copy link
Collaborator

Thank you for checking!

The catch with f4 is that the one we used before was from GroebnerBasis which is different from the one in msolve (which currently supports only primes).

If I understand correctly, msolve uses f4 internally, so I guess we may want to use f4 directly. We can ask Christian about the plans on zero characteristic and, if it is relatively routine, help to add this feature.

@sumiya11
Copy link
Collaborator

Hi ! Judging by msolve sources it implements f4 over rationals indeed. It seems to call it from julia we lack an ideal conversion function (which is commented out here) . I'll try to look into why it was commented

@pogudingleb
Copy link
Collaborator

Sasha, thanks for checking!
I have talked to Mohab, and he says that at the moment msolve has F4 only in positive characteristic, and CRT + rational reconstruction are done only in the solving part

@iliailmer
Copy link
Collaborator Author

I will close this since there is a more relevant solution #77

@iliailmer iliailmer closed this Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependency enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants