#2751 closed defect (fixed)
CombiTables do not work for MSL trunk
Reported by: | Martin Sjölund | Owned by: | somebody |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Backend | Version: | trunk |
Keywords: | index reduction | Cc: | Lennart Ochel, Willi Braun |
Description
MSL trunk ModelicaTest.Tables.CombiTimeTable.Test15 fails with the following message (it works fine in the 3.2.1 branch):
Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 6 * Number of variables: 6 Error: Derivative of expression Differentiate.differentiateWhenEquations failed. is non-existent. [/var/lib/hudson/jobs/OpenModelica_TEST_ALL_LIBRARIES/workspace/OpenModelica/build/lib/omlibrary/Modelica trunk/Blocks/Sources.mo:2434:7-2434:83:writable] Error: Internal error Differentiate.differentiateEquationTime failed for when {t_new.timeScaled >= pre(t_new.nextTimeEventScaled), initial()} then t_new.nextTimeEventScaled := Modelica.Blocks.Sources.CombiTimeTable.getNextTimeEvent(t_new.tableID, t_new.timeScaled, t_new.tableOnFileRead) end when Error: Internal error - IndexReduction.pantelidesIndexReduction1 failed! Use +d=bltdump to get more information. Error: Internal error - IndexReduction.pantelidesIndexReduction failed! Error: Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed!
Note that we should never need to keep initial() as a condition among the non-initial equations (and could just keep it always active for the initial equations).
Attachments (1)
Change History (17)
by , 10 years ago
comment:1 by , 10 years ago
follow-up: 3 comment:2 by , 10 years ago
Replying to sjoelund.se:
Note that we should never need to keep initial() as a condition among the non-initial equations (and could just keep it always active for the initial equations).
Sorry, I don't get that remark.
comment:3 by , 10 years ago
Replying to lochel:
Sorry, I don't get that remark.
Since we have the backend do different things for initial and regular systems, it does not make sense to keep when initial() as a condition since it is always false or true depending on which equations you are generating.
comment:4 by , 10 years ago
That’s true and one of the reasons why I want to split up the simulation and initialization part earlier. Currently, we do it after all optimizations on the simulation DAE are made. Therefore, we cannot do such simplifications with the current back end design.
comment:5 by , 10 years ago
BTW: It will not improve anything to remove the initial-call from the simulation DAE.
comment:6 by , 10 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
This ticket was not closed for 1.9.1, which has now been released. It was batch modified for milestone 1.9.2 (but maybe an empty milestone was more appropriate; feel free to change it).
comment:7 by , 10 years ago
Milestone: | 1.9.2 → 1.9.3 |
---|
Milestone changed to 1.9.3 since 1.9.2 was released.
comment:9 by , 9 years ago
Keywords: | index reduction added |
---|
Anything new on this ticket? Why does the index reduction try to differentiate a discrete equation?
[total.mo:164:11-164:87:writable] Error: Internal error Differentiate.differentiateEquationTime failed for when {$whenCondition1, initial()} then t_new.nextTimeEventScaled := Modelica.Blocks.Sources.CombiTimeTable$t_new.getNextTimeEvent(t_new.tableID, t_new.timeScaled, t_new.tableOnFileRead) end when Error: Internal error - IndexReduction.pantelidesIndexReduction1 failed! Use +d=bltdump to get more information. Error: Internal error - IndexReduction.pantelidesIndexReduction failed! Error: Internal error Transformation Module PFPlusExt index Reduction Method Pantelides failed!
follow-up: 11 comment:10 by , 9 years ago
Since [b5101ef], this model compiles. I have added a modification to the pantelides algorithm to restrict the number of equations in the minimally structurally singular subsets.
comment:11 by , 9 years ago
Replying to vwaurich:
I have added a modification to the pantelides algorithm to restrict the number of equations in the minimally structurally singular subsets.
Can you explain that briefly? I just didn't get it.
comment:12 by , 9 years ago
Function calls can have a Derivative-annotation which defines the derivative of the function call. Some functions also have a noDerivative-annotation which defines, which inputs do not have to be derived in order to compose the inputs of the derived-function call. So, when deriving a function call new edges are rearranged among the input-variables, besides for the noDerivative-variables. When collecting the MSSS, the structural singular subsets are collected in order to resolve the singularity by rearrangeing edges through derivation. The edges between function calls and their noDerivative-input variables wont lead to an improved structure(no more assignemnts). Thats why, these edges can be skipped when collecting the MSSS. The modification simply deletes these edges from the incidence matrix when searching for the MSSS.
Any updates on this? Should there be some IndexReduction.never attribute or something on when-equations? They should not be chosen as candidates for index reduction, right?