Opened 13 years ago
Last modified 13 years ago
#1661 closed defect (fixed)
model containing integer step fails with internal error
Reported by: | Peter Junglas | Owned by: | Peter Junglas |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Backend | Version: | trunk |
Keywords: | Cc: | Peter Junglas, Frenkel TUD |
Description
The attached model schaltint (using GearWithExternalRatioI) fails with an internal error.
After replacing the IntegerStep by a real Step and the IntegerInput in the submodel by a RealInput, the models works.
Attachments (2)
Change History (3)
by , 13 years ago
Attachment: | schaltint.mo added |
---|
comment:1 by , 13 years ago
comment:2 by , 13 years ago
using flags +d=bltdump generates the following plot:
High index problem, differentiated equation:
integerstep1.y = integerstep1.offset + (if time < integerstep1.startTime then 0 else integerstep1.height)
to
0.0 = 0.0
High index problem, differentiated equation:
inertia2.phi = Real(integerstep1.y) * inertia3.phi
to
der(inertia2.phi) = Real(integerstep1.y) * der(inertia3.phi)
High index problem, differentiated equation:
0.0 = 0.0
to
0.0 = 0.0
The problem is omc tries to add a derivative of a discrete variable although the derivative of integerstep1.y is not necessary. The matching algorithm fails thereafter because no equation for der(integerstep1.y) is present.
Adding a complete, working version (previous one was incomplete):
{{{model GearWithExternalRatioI
equation
end GearWithExternalRatioI;
model schaltint
equation
end schaltint;}}}
Flattening succeeds; but
Error: Internal error BackendDAETransform.selectDummyState: no state to select
And
[/home/marsj/dev/trunk/build/lib/omlibrary/Modelica 3.1/Blocks/Sources.mo:3027:5-3027:58:writable] Error: Model is structurally singular, error found sorting equations 0.0 = 0.0;