-
Notifications
You must be signed in to change notification settings - Fork 50
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
Algebraic Loops over FMUs failing #808
Comments
I tested again with a newer version of OpenModelica and OMSimulator (was using an old version for the first output). The problem is the iteration process for the non-linear loop between FMUs A and B.The generated code for the FMUs is looking good: c := c_in;
b := 3/5*c + 0.4*c -1.8 -c; [ = -1.8]
a := -b -c;
b_out := b;
a_out := a; FMU B: a := a_in;
b := b_in;
c := abs(sqrt(5-a*a + b*b));
c_out := c; The newest problem: warning: Alg. loop (size 3)
warning: B (logStatusWarning): The following assertion has been violated during initialization at time 0.000000
assert | debug | Model error: Argument of sqrt(5.0 - (a_in ^ 2.0 + b_in ^ 2.0)) was -1.48 should be >= 0
getBestJumpBuffer got mmc_jumper=(nil), globalJumpBuffer=(nil)
Aborted
134 TODOs:
|
It shouldn't matter that it's going in the wrong direction. Fix the generated FMU; we should never call |
Good point. But I'm not sure what the best approach would be for that. I've created a ticket for this to continue the discussion there: https://trac.openmodelica.org/OpenModelica/ticket/6125#ticket |
Related PR: OpenModelica/OpenModelica#6757 |
@AnHeuermann What is the status? |
I should re-run my example. But it is not really a good one. |
Description
I have a non-linear algebraic loop with three variables and equations
with Solution
a≈0.635425, b≈-1.8, c≈1.16458
ora≈1.16458, b≈-1.8, c≈0.635425
.When splitting the loop into two FMUs OMSimulator detects the loop, but can't solve it.
Steps to reproduce the behavior
I used this mos script to test:
Output:
In addition to the failing algebraic loop OMSimulator fails to unload all data and has a segmentation fault. Output from gdb:
EDIT: This segmentation fault is caused by the FMU exporting tool OpenModelica.
Expected behavior
Version and OS
The text was updated successfully, but these errors were encountered: