Opened 8 years ago
Last modified 3 years ago
#4024 new defect
Bugs in generating xml files
Reported by: | anonymous | Owned by: | lochel |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Code Generation | Version: | v1.11.0 |
Keywords: | xml | Cc: | xiaofeiw@… |
Description
Hi guys, I found several new bugs for OpenModelica v1.11.0-dev-54-g4ec62d0. I attached the xml file and model file.
1.On line 159 of xml file, I think we should exchange line 159 and line 160, since 'exp:QualifiedNamePart' on line 153 does not close.
150: <QualifiedName> 151: <exp:QualifiedNamePart name="pipe"/> 152: <exp:QualifiedNamePart name="flowModel"/> 153: <exp:QualifiedNamePart name="states"> 154: <exp:ArraySubscripts> 155: <exp:IndexExpression> 156: <exp:IntegerLiteral>1</exp:IntegerLiteral> 157: </exp:IndexExpression> 158: </exp:ArraySubscripts> 159: <exp:QualifiedNamePart name="h"/> 160: </exp:QualifiedNamePart> 161: </QualifiedName>
2.On line 2985, the 'min' attribute should be '-100000.0'.
2985: <Real min="*ERROR* initial value of unknown type" max="100000.0" unit="kg/s" />
3.On line 10160, based on the schema 'https://svn.jmodelica.org/trunk/XML/daeEquations.xsd', 'equ:Equation' is not allowed inside 'exp:Sub'.
10158: <equ:Equation> 10159: <exp:Sub> 10160: <equ:Equation> 10161: <exp:Sub> 10162: <exp:Identifier>
4.On line 31810, it is illegal based on schema 'https://svn.jmodelica.org/trunk/XML/daeFunctions.xsd'
31810: <fun:Expression>
- On line 20240, we miss '<exp:Homotopy>' in schema. Actually not only 'Homotopy', a lot of other builtin functions are missing. For example, 'semiLinear', 'dealy', and so on.
20240: <exp:Homotopy>
Attachments (4)
Change History (13)
Changed 8 years ago by anonymous
Changed 8 years ago by anonymous
comment:1 Changed 8 years ago by Xiaofei Wang <xiaofeiw@…>
- Cc xiaofeiw@… added
comment:2 Changed 8 years ago by Xiaofei Wang <xiaofeiw@…>
Changed 8 years ago by Xiaofei Wang <xiaofeiw@…>
Changed 8 years ago by Xiaofei Wang <xiaofeiw@…>
comment:3 Changed 8 years ago by sjoelund.se
- Milestone changed from 1.11.0 to 1.12.0
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:4 Changed 7 years ago by casella
- Milestone changed from 1.12.0 to 1.13.0
Milestone moved to 1.13.0 due to 1.12.0 already being released.
comment:5 Changed 6 years ago by casella
- Milestone changed from 1.13.0 to 1.14.0
Rescheduled to 1.14.0 after 1.13.0 releasee
comment:6 Changed 5 years ago by casella
- Milestone changed from 1.14.0 to 1.16.0
Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0
comment:7 Changed 4 years ago by casella
- Milestone changed from 1.16.0 to 1.17.0
Retargeted to 1.17.0 after 1.16.0 release
comment:8 Changed 4 years ago by casella
- Milestone changed from 1.17.0 to 1.18.0
Retargeted to 1.18.0 because of 1.17.0 timed release.
comment:9 Changed 3 years ago by casella
- Milestone 1.18.0 deleted
Ticket retargeted after milestone closed
Some complements for these bugs:
For bug 2, the cause is the 'min' attribute is actually an 'if expression', and it is not handled correctly in xml template.
For bug 3, the bug happens when it is converting 'NONLINEAR equations'.
One more bug. On line 2265 of 'Modelica.Mechanics.Rotational.Examples.FirstGrounded.xml', an equation is missing. This is a 'LINEAR' equation. I took a look at the template, but had no idea on how to fix it.