Opened 9 years ago

#3390 new defect

Issues with unparsing the type of variable in model_init.xml

Reported by: Adrian Pop Owned by: Lennart Ochel
Priority: high Milestone: Future
Component: Code Generation Version: trunk
Keywords: Cc:

Description

Reported here:
https://openmodelica.org/forum/default-topic/1664-buildmodel-fails-with-template-error-from-codegenutil-tpl

We get an error in the CodegenUtil.tpl:207 when building the attached model. I made it to generate a text instead of failing and we get something like this in the XML file:

  <ScalarVariable
  name = "$TMP_ThermoS_Uops_Valves_Valve$v1_Medium_ThermodynamicState$v1$state381.X"
  valueReference = "1293"
  variability = "continuous" isDiscrete = "false"
  causality = "none" isValueChangeable = "false"
  alias = "noAlias"
  classIndex = "221" classType = "rAlg"
  isProtected = "true"
  fileName = "" startLine = "0" startColumn = "0" endLine = "0" endColumn = "0" fileWritable = "true">
  /* ScalarVariableType: Real[2] */
  </ScalarVariable>

The variable seems to be an array of two: /* ScalarVariableType: Real[2] */

Weirdly enough these variables doesn't seem to be used in the C code,
so is maybe just a matter of filtering them out?

Attachments (2)

total.mo (104.9 KB ) - added by Adrian Pop 9 years ago.
total.mos (133 bytes ) - added by Adrian Pop 9 years ago.

Download all attachments as: .zip

Change History (2)

by Adrian Pop, 9 years ago

Attachment: total.mo added

by Adrian Pop, 9 years ago

Attachment: total.mos added
Note: See TracTickets for help on using tickets.