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
  • » estravid
  • » Profile

Posts

Posts

Mar-22-17 19:30:20
problem with TimeScale

It´s a compiler warning , but is produced by a time scale problem.

I'm working with time in days (609) and a 15' time event, so I'm using 58464 events.

In CombyTimeTable documentation said:
"Via parameter timeScale the first column of the table array can be scaled, e.g. if the table array is given in hours (instead of seconds) timeScale shall be set to 3600."

I try , 86400, 21600, 96... and the compiler error is still occurring.

I would can solve the problem if  I loaded Modelica 3.2.1, that doesn´t use timeScale in CombitimeTables, instead of Modelica 3.2.2 but I would like to solve the timeScale problem.

Thanks.

Mar-21-17 20:33:00
problem with TimeScale

Hi,

I can't load an external file with a combitimetable but in 3.2.1 version I don't have any problem.

Modelica.Blocks.Sources.CombiTimeTable combiTimeTable1(columns = integer({16, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17}), fileName = "E:/TFM/BSM1/INf/dyninfluent_bsm1LT.txt", table = [0, 0; 1, 1], tableName = "dyninfluent_bsm1LT", tableOnFile = true, timeScale = 1 / 96,verboseRead = true) 

The error also appears if I use timeScale = 1.

How can I solve this?

This is the compilation error.

BSM1.BSM1_RL_LT.c: In function 'BSM1_BSM1_RL_LT_eqFunction_3509':
BSM1.BSM1_RL_LT.c:4684:5: warning: floating constant exceeds range of 'double' [-Woverflow]
     tmp48 = Less(data->localData[0]->realVars[1075] /* combiTimeTable1._nextTimeEventScaled DISCRETE */,1.797693134862316e+308);
     ^
BSM1.BSM1_RL_LT.c:4685:5: warning: floating constant exceeds range of 'double' [-Woverflow]
     data->localData[0]->realVars[1074] /* combiTimeTable1._nextTimeEvent DISCRETE */ = (tmp48?data->localData[0]->realVars[1075] /* combiTimeTable1._nextTimeEventScaled DISCRETE */:1.797693134862316e+308);

Thanks

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