Search code examples
modelicaopenmodelica

Function _ not found in scope _


I am having trouble using a replaceable type parameter that defaults to the Modelica standard library 2D combi table. I am using OpenModelica 1.14.1. I am new to Modelica, so I am unsure whether what I am seeing is a bug or the result of misunderstanding.

The following code works fine (in that when I press 'Check Model' there are no translation errors):

model Error
replaceable class DefaultTable = Modelica.Blocks.Tables.CombiTable2D;
DefaultTable bob;
end Error;

However, this does not:

model Error
replaceable class DefaultTable = Modelica.Blocks.Tables.CombiTable2D;
DefaultTable bob;
DefaultTable geoff;
end Error;

The following error is obtained:

 [Modelica.Blocks.Tables: 613:7-613:57]: Function Internal.getTable2DValueNoDer not found in scope DefaultTable.

Solution

  • That's a compiler bug: report it at https://trac.openmodelica.org/OpenModelica/newticket

    It seems to work in the old frontend though (which is the default in command-line and can be turned on in OMEdit).