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

"Internal error, check of model failed with no error message."

"Internal error, check of model failed with no error message."

hello,

why I have this message when I'm trying to check this model?

function ret_2_matrix
output Real M1[2,3];
output Real M2[2,3];
algorithm
M1:={{1,2,3},{2,3,6}};
M2:={{1,4,3},{2,7,6}};
end ret_2_matrix;

model test
Real Matrix1[2,3];
Real Matrix2[2,3];
equation
when initial() then
(Matrix1,Matrix2)=ret_2_matrix();
end when;
end test;

is it OpenModelica have a probleme in initialization? because this model was checked in another Modelica compiler successfully.


thinks

Re: "Internal error, check of model failed with no error message."

With the latest (revision 6300) OpenModelica I get this error:
[test.mo:13:1-15:9:writable] Error: Failed to instantiate equation
when initial() then
  (Matrix1,Matrix2) = ret_2_matrix();
end when;
Error: Error occured while flattening model test
Note that in a .mos script you need to use getErrorString(); after the checkModel(); to get the errors, i.e.
loadFile("test.mo"); getErrorString();
checkModel(test); getErrorString();

The problem is that you use a function with multiple outputs which we don't support yet in when equations.
If you use only one output in the function, then it works fine.

Cheers,
Adrian Pop/

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