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
  • Index
  • » Users
  • » Oh
  • » Profile

Posts

Posts

May-18-10 15:40:32
Unabel to look up a table

Hi beckling,
I use OpenModelica with the SimForge user interface and sometimes just omcshell. I takes a while to learn the in's and out's of the system.
Phil

May-12-10 23:20:31
Unabel to look up a table

Hi, as a followup, I replaced the Ramp block with a Clock with no offset, and it also gave me the right result. - Thanks, again.
Phil

May-12-10 23:12:56
Unabel to look up a table

Thanks, jez, for looking into this. There is something strange about the Ramp block, or I am not using it correctly. Here's what I did:
model Table1
   import Modelica.Blocks.Sources;
   import Modelica.Blocks.Tables;
   Tables.CombiTable1Ds Table1(table=[0,0;1,1;2,2;3,10]);
   Tables.CombiTable1Ds Table2(table=[0,0;1,1;2,2;3,10]);
   Sources.Ramp Ramp22(height=1,duration=3);
equation
   Table1.u=Ramp22.y;
   Table2.u=time;
end Table1;

I plotted the output from Table1 and Table2. As I expected, Table2.y[1] is correct, but Table1.y[1] is not. Any thoughts?

Thanks
Phil

May-11-10 08:06:27
Unabel to look up a table

I got CombiTable1Ds to compile and run with the following declaration

Tables.CombiTable1Ds Table1(tableOnFile=false,table=[0,0;1,1;2,4;3,10])

However, the simulation result is wrong --- CombiTable1Ds simply sets the output equal to its input.

I am sure many people have used CombiTable1Ds successfully. Can someone tell me what I am doing wrong? Here's the rest of the model

model Table1
   import Modelica.Blocks.Sources;
   import Modelica.Blocks.Tables;
   Tables.CombiTable1Ds Table1(tableOnFile=false,table=[0,0;1,1;2,4;3,10]);
   Sources.Ramp Ramp22(height=1,duration=3); 
equation
   connect(Ramp22.y,Table1.u);
end Table1;

May-07-10 21:44:58
Unabel to look up a table

I also just started to use OpenModelica, and am having difficulty with CombiTable1Ds. I have this line in my model:
   Tables.CombiTable1Ds Table2(tableOnFile=false,table = [0,0,1,0;1,2,3,1;1.5,4,10,2],columns={1,3}) - it won't compile
I also tried
   Tables.CombiTable1Ds Table2(tableOnFile=false,table = [0,0,1,0;1,2,3,1;1.5,4,10,2],columns=[1;3])  and
   Tables.CombiTable1Ds Table2(tableOnFile=false,table = [0,0,1,0;1,2,3,1;1.5,4,10,2],columns=[1,3])
The  last two compiled, but give me run time errors. Can someone give me a working example?
Thanks in advance, Phil

  • Index
  • » Users
  • » Oh
  • » Profile
You are here: