﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4420	OpenModelica hangs for minutes on examples that are otherwise solvable in milliseconds	Ali Baharev <ali.baharev@…>	Patrick Täuber	"Example 3:

https://github.com/baharev/failure-modes-of-tearing/blob/master/tearing_enabled/example_3.mo

of 

https://github.com/baharev/failure-modes-of-tearing/blob/master/failure_modes_of_tearing.pdf

was designed to test the effects of fill-in. The parameter N of the model can be changed. The latest release of Dymola hangs for more than 6 minutes (with N=500) when tearing is enabled, but the situation is slightly better if I disable tearing.

OpenModelica on the other hand hangs for reasons that seem to have nothing to do with tearing. I suspect that OpenModelica falls into a so-called O(n^2^) trap, but I failed to track down the exact causes.

If you fix this issue, make sure you understand Section 3.3 of the paper too, and test what happens in OpenModelica.

In my opinion, applying tearing by default, and without any caution, is the wrong default. 

A better default would be to check whether tearing eliminated ""sufficiently many"" variables (say, at least 2/3 of all variables AND at least 10 variables, so I propose checking it in both absolute and relative terms). If tearing did not eliminate ""sufficiently many"" variables, disable tearing, and use sparse linear algebra instead, especially if the original problem is sparse.

Here, the ""sufficiently many"" is somewhat arbitrary, and one would have to test it on a reasonable benchmark suite; the above 2/3 and 10 were arbitrary.

In any case, eliminating just a single variable, and turning an otherwise sparse problem into a completely full problem is not acceptable (and that is precisely what Dymola does).

I am available for discussion in person at the 12th International Modelica Conference 2017; I will stay at the Clarion Congress Hotel. 
"	defect	assigned	high	Future	Backend	v1.11.0			Willi Braun
