﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3997	Missing replacement of identifiers when inlining functions	Rüdiger Franke	Adrian Pop	"OpenModelica generated unnecessarily large and non-linear equation systems for the PowerSystems library so far. The reason was missing `annotation(Inline=true)` for small one-liner functions.

Commit
https://github.com/modelica/PowerSystems/commit/61ba3296af8b2ebdcb86adff0c222291a6a820d7
introduces these annotations.

In some models the compilation fails due to missing identifier `xx` now. This comes from inlining `PhaseSystems.ThreePhase_dq0.jj`. See an example:
{{{#!mo
model InlineMatrixFunction
  function jj ""Vectorized version of j""
    input Real[:,:] xx ""array of voltage or current vectors"";
    output Real[size(xx,1),size(xx,2)] yy ""array of rotated vectors"";
  algorithm
    yy := cat(1, {-xx[2,:], xx[1,:]}, zeros(size(xx,1)-2, size(xx,2)));
    annotation(Inline=true);
  end jj;
  Real[3, 1] v = {{1}, {2}, {3}};
  Real[3, 1] jv = jj(v);
end InlineMatrixFunction;
}}}
See e.g.:
    PowerSystems.Examples.Spot.AC3ph.Line
    PowerSystems.Examples.Spot.TransmissionAC3ph.FaultTline
    PowerSystems.Examples.Spot.TransmissionAC3ph.Tline

Unfortunately the nightly tests don't report `backenddaeinfo`. Shouldn't the nightly tests use the same options for MSL and for other libraries, like PowerSystems?
"	defect	assigned	high	Future	Backend				Willi Braun Vitalij Ruge
