Opened 8 years ago

Closed 3 years ago

Last modified 3 years ago

#4161 closed defect (fixed)

Wrong type mismatch error when handling parameter records

Reported by: Christian Kral <dr.christian.kral@…> Owned by: adrpo
Priority: high Milestone: 1.19.0
Component: New Instantiation Version: v1.11.0
Keywords: Cc: perost

Description

Please consider the library PhotoVoltaics hosted on GitHub. Download version fd497d1 to demonstrate the following issue:

Check or try to simulate the model PhotoVoltaics.Testing.SimpleResistor. An error is triggered:

[1] 18:05:08 Translation Error
[PhotoVoltaics: 36:50-36:71]: Type mismatch in binding ns = 48.0, expected subtype of Integer, got type Real.

[2] 18:05:08 Translation Error
Error occurred while flattening model PhotoVoltaics.Testing.SimpleResistor

This error is obviously not correct, since there is never any real number assigned to the Integer parameter ns. This simulation example shall have no errors and checks OK with Dymola.

The issue applies to OpenModelica 1.11.0~dev-468-g26ce3a2 used under Linux Mint 18.

Change History (4)

comment:1 Changed 8 years ago by Christian Kral <dr.christian.kral@…>

Clarification: The issue is related with a parameter record containing the Integer parameter ns

comment:2 Changed 8 years ago by adeas31

  • Cc perost added
  • Component changed from OMEdit to Frontend
  • Owner changed from adeas31 to adrpo
  • Status changed from new to assigned

comment:3 Changed 3 years ago by perost

  • Component changed from Frontend to New Instantiation
  • Milestone changed from Future to 1.18.0
  • Resolution set to fixed
  • Status changed from assigned to closed

The error is still there in the old frontend, but works fine with the new frontend that's now the default in OM.

comment:4 Changed 3 years ago by casella

  • Milestone changed from 1.18.0 to 1.19.0
Note: See TracTickets for help on using tickets.