Opened 10 years ago

Closed 8 years ago

Last modified 7 years ago

#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)

total.mo (14.3 KB ) - added by Martin Sjölund 10 years ago.

Download all attachments as: .zip

Change History (17)

by Martin Sjölund, 10 years ago

Attachment: total.mo added

comment:1 by Martin Sjölund, 10 years ago

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?

in reply to:  description ; comment:2 by Lennart Ochel, 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.

in reply to:  2 comment:3 by Martin Sjölund, 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 Lennart Ochel, 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 Lennart Ochel, 10 years ago

BTW: It will not improve anything to remove the initial-call from the simulation DAE.

comment:6 by Martin Sjölund, 10 years ago

Milestone: 1.9.11.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 Martin Sjölund, 10 years ago

Milestone: 1.9.21.9.3

Milestone changed to 1.9.3 since 1.9.2 was released.

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:9 by Lennart Ochel, 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!

comment:10 by Volker Waurich, 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.

in reply to:  10 comment:11 by Lennart Ochel, 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 Volker Waurich, 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.

Last edited 9 years ago by Volker Waurich (previous) (diff)

comment:13 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:14 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:15 by Lennart Ochel, 8 years ago

Resolution: fixed
Status: newclosed

I think we can close this one.

comment:16 by Martin Sjölund, 7 years ago

Milestone: 1.10.0

Milestone deleted

Note: See TracTickets for help on using tickets.