Opened 14 years ago
Last modified 7 years ago
#1551 new defect
Index reduction fails for "simple" model
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Backend | Version: | trunk |
Keywords: | Cc: | Martin Sjölund, Frenkel, TUD, Lennart Ochel, Willi Braun |
Description
model M Real y1,y2; equation y1 = sin(time^2); y2 = der(der(y1)); end M;
Change History (5)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
I don't know if it is possible in general, but you could either:
- If index-reduction fails, add this equation (and try again)
- Display an error message (like Dymola), but also add a suggestion that adding Real dy1 = der(y1) *might* result in a solvable model
comment:3 by , 13 years ago
- since rev 9245 an error message is displayed. Adding Real dy1 = der(y1) is more complicated in case of index-reduction fails (cause of get the reason for failing index reduction)
follow-up: 5 comment:4 by , 10 years ago
Cc: | added; removed |
---|---|
Component: | → Backend |
Milestone: | → Future |
Version: | → trunk |
In the current trunk an internal error message is shown, but the compilation continues anyway. A proper error message should be shown instead, and the compilation should abort.
comment:5 by , 7 years ago
Replying to perost:
In the current trunk an internal error message is shown, but the compilation continues anyway. A proper error message should be shown instead, and the compilation should abort.
This is still the behaviour with 1.12.0-beta3. The compilation continues and later the C compiler fails.
If higher-order derivatives are not supported, after showing the error message
[1] 23:35:07 Translation Error Internal error The model includes derivatives of order > 1 for: y1. That is not supported. Real dy1 = der(y1) *might* result in a solvable model
the compilation *must* abort
Dymola reports for this model:
Error: The model includes derivatives of order > 1 for:
but that is not supported.
Errors detected in model.
Check aborted.
ERROR: 1 error was found
For this particular model it is possible to add a variable and an equation( Real dy1; der(y1) = dy1) to get a simulateable model.
{{{model M
equation
end M;}}}
The question is if this is possible in general?