Skip to content

Error when calling a ME_NeuralFMU without having defined a solver #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
juguma opened this issue Feb 7, 2024 · 1 comment
Closed

Error when calling a ME_NeuralFMU without having defined a solver #124

juguma opened this issue Feb 7, 2024 · 1 comment

Comments

@juguma
Copy link

juguma commented Feb 7, 2024

When you call an ME_NeuralFMU

function (nfmu::ME_NeuralFMU)(x_start::Union{Array{<:Real}, Nothing} = nfmu.x0,
, for which you haven't defined a solver, you get an error
MethodError: no method matching isimplicit(::Nothing)

This is since in neural.jl, line 1290 the definition of the sensealg is based on the definition of the solver.
MWE is the script of #120 up to batchDataSolution (which fails).

If you simply leave the sensealg in such cases as nothing (e.g. modify line 1290 to if !isnothing(solver) && isimplicit(solver)), batchDataSolution runs through smoothly. However, I am not sure this is a globally valid solution (which would mean that both the solver and the sensealg are determined by heuristics of other packages!?).

@juguma
Copy link
Author

juguma commented Feb 22, 2024

Fixed by #126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant