Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Use of CombiTable1D

Use of CombiTable1D

Hi,
I am trying to use a CombiTable1D in my model

Created a txt file (filename tab01.txt)  as  shown below

#1
double tab1(3,3)   # comment line
1.1 2.1 5.1
2.1 3.1 7.1
3.1 6.1 8.1

and in CombTable1D set parameters as given below
Modelica.Blocks.Sources.CombiTimeTable taba(columns = 2:3, fileName = "C:/Openmod/data01.txt", tableName = "tab1", tableOnFile = true)

Compiling it get this error

... loading "tab1" from "C:/Openmod/data01.txt"

Error in line 5 when reading numeric data of matrix "tab1(3,3)" from file "C:/Openmod/data01.txt"

simulation terminated by an assertion at initialization
Simulation process failed. Exited with code -1.

I am using Open Modelica 1.17 with Modelical 4.0.0 librry loaded

THanks

Re: Use of CombiTable1D

Works fine for me.

Code:


C:/temp/TestTables/TestTables.exe -port=50361 -logFormat=xmltcp -override=startTime=0,stopTime=1,stepSize=0.002,tolerance=1e-6,solver=dassl,outputFormat=mat,variableFilter=.* -r=C:/temp/TestTables/TestTables_res.mat -w -lv=LOG_STATS -inputPath=C:/temp/TestTables -outputPath=C:/temp/TestTables
... loading "tab1" from "C:/temp/Data.txt"

Code:


model TestTables
Modelica.Blocks.Sources.CombiTimeTable taba(columns = 2:3, fileName = "C:/temp/Data.txt", tableName = "tab1", tableOnFile = true);
equation
end TestTables;

What is your OS language and regionalization?

There are 0 guests and 0 other users also viewing this topic