Opened 9 years ago
Last modified 4 years ago
#4024 new defect
Bugs in generating xml files
| Reported by: | anonymous | Owned by: | Lennart Ochel |
|---|---|---|---|
| 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)
by , 9 years ago
| Attachment: | Modelica.Fluid.Examples.PumpingSystem.xml added |
|---|
by , 9 years ago
| Attachment: | PumpingSystem.mo added |
|---|
comment:1 by , 9 years ago
| Cc: | added |
|---|
comment:2 by , 9 years ago
by , 9 years ago
| Attachment: | Modelica.Mechanics.Rotational.Examples.FirstGrounded.xml added |
|---|
by , 9 years ago
| Attachment: | Modelica.Mechanics.Rotational.Examples.FirstGrounded.mo added |
|---|
comment:3 by , 9 years ago
| Milestone: | 1.11.0 → 1.12.0 |
|---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:4 by , 8 years ago
| Milestone: | 1.12.0 → 1.13.0 |
|---|
Milestone moved to 1.13.0 due to 1.12.0 already being released.
comment:6 by , 6 years ago
| Milestone: | 1.14.0 → 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:8 by , 5 years ago
| Milestone: | 1.17.0 → 1.18.0 |
|---|
Retargeted to 1.18.0 because of 1.17.0 timed release.

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.
Modelica.Fluid.Interfaces.FluidPort_a port_a( redeclare package Medium = Medium, m_flow(min=if allowFlowReversal then -Constants.inf else 0))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.
<equ:Equation> <exp:Sub> </exp:Sub> </equ:Equation>