Skip to content

Commit

Permalink
- workaround for nonlinear torn systems
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12448 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Aug 7, 2012
1 parent bd25e9e commit e0be5b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -10711,6 +10711,11 @@ algorithm
Debug.fcall(Flags.TEARING_DUMP, print,"handle torn System\n");
// solve other equations for other vars
size = listLength(eindex);
// do not use it if more than 50 equations there,
// this will be fixed if it is possible to save the information of tearing variables
// and residual equations for code generation, than it is not necessary to solve all the other
// equations and replace the other variables in the residual equations
true = intLt(size,50);
eqns = BackendEquation.daeEqns(subsyst);
vars = BackendVariable.daeVars(subsyst);
tvarexps = List.map2(tvars,getTVarCrefExps,vars,ishared);
Expand Down

0 comments on commit e0be5b5

Please sign in to comment.