Opened 9 years ago

Closed 8 years ago

#3980 closed defect (fixed)

Error in generating xml files

Reported by: wangxiaofeiheron@… Owned by: Lennart Ochel
Priority: critical Milestone: Future
Component: Code Generation Version: v1.10.0-dev-nightly
Keywords: xml Cc:

Description

I use omc 1.10.0 to generate xml file based on a model which uses external functions. omc 1.9.6 also has the same problem.

On line 117, it should be "<exp:Expression>" instead of "<fun:Expression>".

I attached the model, the external function and the generated xml file.

Attachments (6)

reallyeasy.mo (103 bytes ) - added by wangxiaofeiheron@… 9 years ago.
testLib.mo (98 bytes ) - added by anonymous 9 years ago.
reallyeasy.xml (4.5 KB ) - added by Adrian Pop 9 years ago.
computeHeat.mo (232 bytes ) - added by anonymous 8 years ago.
HysteresisEmbeddedControlNoWhen.mo (636 bytes ) - added by anonymous 8 years ago.
HysteresisEmbeddedControlNoWhen.xml (9.6 KB ) - added by anonymous 8 years ago.

Download all attachments as: .zip

Change History (15)

by wangxiaofeiheron@…, 9 years ago

Attachment: reallyeasy.mo added

by anonymous, 9 years ago

Attachment: testLib.mo added

comment:1 by wangxiaofeiheron@…, 9 years ago

I cannot upload the xml file. It is classified as spam. The line number should be 135 by using omc 1.10.0

comment:2 by anonymous, 9 years ago

Priority: highcritical

comment:3 by Adrian Pop, 9 years ago

Your model is not using external functions, is using normal Modelica functions.

External function are those which have external "C":
http://book.xogeny.com/behavior/functions/external/

by Adrian Pop, 9 years ago

Attachment: reallyeasy.xml added

comment:4 by anonymous, 9 years ago

Keywords: library external removed

I got that. Thanks.

comment:5 by Adrian Pop, 9 years ago

I'm really not sure that fun:Expression should be exp:Expression.
As far as I can see from the algorithms schema here:
https://svn.jmodelica.org/trunk/XML/daeAlgorithms.xsd
and the function schema here:
https://svn.jmodelica.org/trunk/XML/daeFunctions.xsd
I think it should be as it is now: fun:Expression as the Expression element is defined in the algorithm schema which is imported into function schema.

comment:6 by Adrian Pop, 9 years ago

The generated code is correct, see here:
https://www.politesi.polimi.it/bitstream/10589/11689/1/2010_12_Parrotto.pdf
page: 51.

comment:7 by anonymous, 8 years ago

You are right. But the problem is, when I use omc to generate xml for a similar model, the same element is exported differently. I attached the models and xml file. On line 263 of the xml file, it is "<exp:Expression>" instead of "<fun:Expression>".

by anonymous, 8 years ago

Attachment: computeHeat.mo added

by anonymous, 8 years ago

by anonymous, 8 years ago

comment:9 by Adrian Pop, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.