Opened 9 years ago

Last modified 6 years ago

#3997 assigned defect

Missing replacement of identifiers when inlining functions — at Initial Version

Reported by: Rüdiger Franke Owned by: somebody
Priority: high Milestone: Future
Component: Backend Version:
Keywords: Cc: Willi Braun, Vitalij Ruge

Description

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:

within PhaseSystems.ThreePhase_dq0;
    redeclare 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;

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?

Change History (0)

Note: See TracTickets for help on using tickets.