Opened 7 years ago

Last modified 7 years ago

#4460 closed defect

ResolveLoops scales as O(N^3) in large linear circuit models — at Version 1

Reported by: casella Owned by: vwaurich
Priority: high Milestone: 1.12.0
Component: Backend Version:
Keywords: Cc:

Description (last modified by casella)

The ScalableTestSuite contains several models of electrical distribution systems, which lead to large algebraic loops made of linear equations.

For the largest examples, the execution time of resolveLoops scales as O(N3). For example, DistributionSystemModelica_N_XXX_M_XXX (whose number of equations is proportional to N*M) gives these figures

N M Time [s]
56 56 3.34
80 80 35.4
112 112 203.7

Given the sparsity pattern of the equations, which have only O(N) nonzero entries in the A-matrix, I'm not sure what is the theoretical complexity of the underlying algorithm. It may be O(N2), but it is probably not O(N3).

@vwaurich, please make sure that the implementation is efficient and does not introduce O(N) or O(N2) overhead.

If the algorithm has really O(N3) inherent complexity, then I would suggest to introduce an upper limit to the size of the systems which are subject to this type of analysis, as we have for tearing. As a default, I would suggest 5000 equations, which currently means about 1 s of processing time on these systems. Above this limit, the spent time quickly gets prohibitive and probably not worth the effort in most cases.

Change History (2)

comment:1 Changed 7 years ago by casella

  • Description modified (diff)

Changed 7 years ago by hkiel

Note: See TracTickets for help on using tickets.