﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2056	Problems with Modelica.Math.Matrices.inv()	Francesco Casella	Per Östlund	"The following test model:

{{{
model TestInverse
  parameter Integer N = 3;
  Real A[N,N] = identity(N);
  Real B[N,N] = identity(N);
  Real C[N,N];
equation
  C = Modelica.Math.Matrices.inv(A) * B;
end TestInverse;
}}}

gives the following error:

{{{
""[TestInverse.mo:8:3-8:38:writable] Error: Cannot resolve type of 
expression Modelica.Math.Matrices.inv(A) * B. 
The operands have types Real[:, :], Real[3, 3] 
in component <NO COMPONENT>.
}}}

The problem persists even if all matrix sizes are replaced by integer literals, as in

{{{
model TestInverse2
  Real A[3,3] = identity(3);
  Real B[3,3] = identity(3);
  Real C[3,3];
equation
  C = Modelica.Math.Matrices.inv(A) * B;
end TestInverse2;
}}}

Last, but not least, the following simpler model is translated, but then the simulation executable triggers an unhandled exception and crashes

{{{
model TestInverse3
  Real A[3,3] = identity(3);
  Real C[3,3];
equation
  C = Modelica.Math.Matrices.inv(A);
end TestInverse3;
}}}"	defect	closed	high	1.9.0	Frontend	trunk	fixed		Adrian Pop
