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

A bug of OpenModelica(1.9.0 beta4)?

A bug of OpenModelica(1.9.0 beta4)?

Hi everyone,

I met a error, when I simulate the following codes in openmodelica. I thought it might be a bug of openmodelica, as the codes can be simulated in dymola2013(demo) without any problems. Can somebody fix it or tell me how to avoid this error? Many thanks!

The simulation time is set to 2 seconds.

Code:

model rr


Real v(start =0);
Real H;
equation
der(H)=H+1;

when time > 1 then
v = max(H);
end when;


end rr;

The error information:
base_array.c: the number of array dimensions are < 0!
Assertion failed: base_array_ok(a), file util/real_array.c, line 1473

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Edited by: rui - Mar-11-13 14:08:36

Re: A bug of OpenModelica(1.9.0 beta4)?

It's a bug in both omc and dymola. You cannot call max on a scalar. Please add a bug report to trac.openmodelica.org

There are 0 guests and 0 other users also viewing this topic
You are here: