Comments (5)
What solver is used? If you don't provide a specific solver, DifferentialEquations is using one based on a heuristic. Can you please check the simulation with a robust solver like e.g. CVODE_BDF from Sundials
package? Question is if this is a bug in FMI.jl or if the (automatically determined) solver is not sufficient for the ODE inside the ME FMU.
from fmi.jl.
That's a good idea.
I changed the solver to CVODE:
using FMI
using DifferentialEquations
using Sundials
fmu = fmiLoad("ScalableTranslationStatistics.Examples.ScaledNLEquations.NLEquations_5.fmu")
simData = fmiSimulate(fmu, (0.0, 10.0); solver=CVODE_BDF, recordValues=["outputs[1]"])
Now the solver seems to be stuck. Even interrupting the Julia process (Ctrl+C) doesn't stop it 😆
I had to kill the process and shell.
I tried explicit Euler as well, but it got stuck as well. I can't see where the program is stuck.
When using OMSimulator the ME FMU simulates in around 15 seconds. It uses CVODE as well.
$ time OMSimulator ScalableTranslationStatistics.Examples.ScaledNLEquations.NLEquations_5.fmu --stopTime=10
info: maximum step size for 'model.root': 0.001000
info: Result file: model_res.mat (bufferSize=10)
info: Final Statistics for 'model.root':
NumSteps = 1 NumRhsEvals = 2 NumLinSolvSetups = 1
NumNonlinSolvIters = 1 NumNonlinSolvConvFails = 0 NumErrTestFails = 0
real 0m15.567s
user 0m15.435s
sys 0m0.121s
@ThummeTo I can send you the Linux FMU if you want to investigate more.
from fmi.jl.
you can try showProgress=true
(to show a progress bar to see where the solver stucks) and try the max_iters
keyword to give a maximum number of solver steps before termination. Using the progress bar you further should be able to kill the solution process, because the background process checks for interrupts every time the progress bar is updated (this is not the default for the Julia REPL, thats why it sometimes freezes during long computations without periodic GUI interrupts).
of course you can also send me the FMU for debugging purpose.
from fmi.jl.
Well, that did something, but I'll send you the FMU via mail.
julia> simData = fmiSimulate(fmu, (0.0, 10.0); showProgress=true, recordValues=["outputs[1]"])
ERROR: StackOverflowError:
Stacktrace:
[1] fmi2Simulate(::FMU2, ::Nothing, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:showProgress, :recordValues), Tuple{Bool, Vector{String}}}}) (repeats 4799 times)
@ FMI ~/.julia/packages/FMI/C5VcZ/src/FMI2_comp_wraps.jl:17
[2] #fmiSimulate#158
@ ~/.julia/packages/FMI/C5VcZ/src/FMI.jl:527 [inlined]
[3] top-level scope
@ REPL[4]:1
from fmi.jl.
i will approach the issue
from fmi.jl.
Related Issues (20)
- Implement enumerations parsing HOT 1
- ME simulation for FMI3 [BETA]
- Input functions of the form (u,t) for CS FMUs HOT 7
- fmiReload and fmiLoad not thread-save HOT 9
- Warning: Using arrays or dicts to store parameters of different types can hurt performance.
- Ability to graphically visualize FMUs HOT 3
- Backport compat for SciMLBase@v2 for [email protected] HOT 5
- Solution CSV export for alias variables HOT 2
- FMI Compatibility Page for the Docs
- condition() called while not in continuous time mode HOT 1
- example inputs.ipynb doesn't run with v0.13.0 HOT 1
- DimensionMismatch for OpenModelica `Modelica.Blocks.Examples.RealNetwork1` 2.0.4 FMU
- Implement fmiGet! for fmi2Enum
- Segmentation fault after assert HOT 1
- StackOverFlowError HOT 1
- simData.success not working properly? HOT 3
- Relax compat requirements HOT 4
- Extend Compatibility information
- Request for DiffEqCallbacks v3 compat with FMI v0.10.x HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fmi.jl.