﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2530	"translation error of model in comment1: ""model MatricesExp...."""	carlj@…	Martin Sjölund	"When trying to instantiate Modelica.Math.exp in MSL 3.2.1, one gets the following errors:

{{{
Error: Internal error Cannot vectorize call with dimension [size(A, 1)]
Error: No matching function found for abs in component <NO COMPONENT>
candidates are .SystemModeler.Internal.intAbs<function>(Integer v) => Integer
 -.SystemModeler.Internal.realAbs<function>(Real v) => Real
Error: Failed to elaborate expression: abs(B[:,i]).
Error: Wrong type or wrong number of arguments to sum(abs(B[:,i]))'.
 (in component <NO COMPONENT>).
Error: Failed to elaborate expression: sum(abs(B[:,i])).
Error: Failed to elaborate expression: sum(abs(B[:,i])) - abs(B[i,i]).
Error: Internal error Cannot vectorize call with dimension [size(A, 1)]
Error: No matching function found for abs in component <NO COMPONENT>
candidates are .SystemModeler.Internal.intAbs<function>(Integer v) => Integer
 -.SystemModeler.Internal.realAbs<function>(Real v) => Real
Error: Failed to elaborate expression: abs(B[:,i]).
Error: Wrong type or wrong number of arguments to sum(abs(B[:,i]))'.
 (in component <NO COMPONENT>).
Error: Failed to elaborate expression: sum(abs(B[:,i])).
Error: Failed to elaborate expression: sum(abs(B[:,i])) - abs(B[i,i]).
Error: Failed to elaborate rhs of CO:=sum(abs(B[:,i])) - abs(B[i,i]);.
Error: Failed to instantiate statement:
  CO:=sum(abs(B[:,i])) - abs(B[i,i]);
Error: Failed to instantiate statement:
  for i in 1:na loop
      CO:=sum(abs(B[:,i])) - abs(B[i,i]);
    RO:=sum(abs(B[i,:])) - abs(B[i,i]);
    G:=RO / radix;
    F:=1;
    S:=CO + RO;
    while (not (CO >= G or CO == 0)) loop
          F:=F * radix;
      CO:=CO * radix2;
    end while;
    G:=RO * radix;
    while (not (CO < G or RO == 0)) loop
          F:=F / radix;
      CO:=CO / radix2;
    end while;
    if not (CO + RO) / F >= 0.95 * S then 
      G:=1 / F;
      D[i]:=D[i] * F;
      B[i,:]:=B[i,:] * G;
      B[:,i]:=B[:,i] * F;
      noconv:=true;
    else

    end if;
  end for;
Error: Failed to instantiate statement:
  while (noconv) loop
      noconv:=false;
    for i in 1:na loop
          CO:=sum(abs(B[:,i])) - abs(B[i,i]);
      RO:=sum(abs(B[i,:])) - abs(B[i,i]);
      G:=RO / radix;
      F:=1;
      S:=CO + RO;
      while (not (CO >= G or CO == 0)) loop
              F:=F * radix;
        CO:=CO * radix2;
      end while;
      G:=RO * radix;
      while (not (CO < G or RO == 0)) loop
              F:=F / radix;
        CO:=CO / radix2;
      end while;
      if not (CO + RO) / F >= 0.95 * S then 
        G:=1 / F;
        D[i]:=D[i] * F;
        B[i,:]:=B[i,:] * G;
        B[:,i]:=B[:,i] * F;
        noconv:=true;
      else

      end if;
    end for;
  end while;
Error: Failed to instantiate function .Modelica.Math.Matrices.balance in scope Modelica.Math.Matrices.exp.
Error: Failed to elaborate expression: balance(A).
Error: Failed to instantiate statement:
  (Diag,Atransf):=balance(A);
Error: Failed to instantiate function .Modelica.Math.Matrices.exp in scope MatricesExp.
Error: Failed to elaborate expression: Modelica.Math.Matrices.exp(A).
Error: Error occurred while flattening model MatricesExp
Error: Internal error Instantiation of MatricesExp failed with no error message.
}}}
"	defect	closed	high	1.16.0	Backend	trunk	fixed		
