Audrey, I don't think Modelica.Blocks.Tables.CombiTable1D and its sister functions work in OpenModelica. It looks like their implementation is Dymola specific. For example, the implementation includes calls to the functions dymTableInit and dymTableIpo1.
If you're after the interpolation functionality in arrays, I wrote a quick-and-dirty function to do that: function Interp input Real x[:]; input Real y[:]; input Real xp; output Real yp; protected Integer i; algorithm for i in 1:(size(x,1)-1) loop // assume monotonically increasing if ((i == 1 and xp <= x[i+1]) or (i == size(x,1) - 1) or (xp > x[i] and xp <= x[i+1])) then // found appropriate segment yp := y[i] + (xp - x[i]) * (y[i+1] - y[i]) / (x[i+1] - x[i]); end if; end for; end Interp; - Tom Tom Short EPRI On 4/5/07, Audrey JARDIN <[EMAIL PROTECTED]> wrote:
Hi, I'm new in OpenModelica and I wish to use the CombiTable function. I found an example given in the CombiTable annotation but it doesn't work. My procedure is: - step 1: loading the Modelica library - step 2: loading the file CombiTimeTable.mo - step 3: simulating CombiTimeTable But an error occurs everytime : record resultFile = "Simulation failed. Variable getErrorString not found in scope <global scope> Base class Modelica.Interfaces.SO not found in scope CombiTimeTable Error occured while flattening model CombiTimeTable Yet the OPENMODELICALIBRARY pointing at the right location and no error occurs when I load Modelica library... I've tried with the TimeTable function which is the previous version of CombiTimeTable but it doesn't work too. Thanks by advance for your answer if you have any idea on it. Regards, Audrey JARDIN