Opened 8 years ago

Last modified 3 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>
  1. 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)

Modelica.Fluid.Examples.PumpingSystem.xml (3.8 MB ) - added by anonymous 8 years ago.
PumpingSystem.mo (7.4 KB ) - added by anonymous 8 years ago.
Modelica.Mechanics.Rotational.Examples.FirstGrounded.xml (89.7 KB ) - added by Xiaofei Wang <xiaofeiw@…> 8 years ago.
Modelica.Mechanics.Rotational.Examples.FirstGrounded.mo (3.3 KB ) - added by Xiaofei Wang <xiaofeiw@…> 8 years ago.

Change History (13)

by anonymous, 8 years ago

Attachment: PumpingSystem.mo added

comment:1 by Xiaofei Wang <xiaofeiw@…>, 8 years ago

Cc: xiaofeiw@… added

comment:2 by Xiaofei Wang <xiaofeiw@…>, 8 years ago

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>  

by Xiaofei Wang <xiaofeiw@…>, 8 years ago

by Xiaofei Wang <xiaofeiw@…>, 8 years ago

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

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:4 by Francesco Casella, 7 years ago

Milestone: 1.12.01.13.0

Milestone moved to 1.13.0 due to 1.12.0 already being released.

comment:5 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:6 by Francesco Casella, 5 years ago

Milestone: 1.14.01.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 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:8 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:9 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.