Skip to content

Commit

Permalink
- array equations solving non-array variables are actually non-linear…
Browse files Browse the repository at this point in the history
… systems

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25052 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Volker Waurich committed Mar 12, 2015
1 parent 8f4e8a8 commit a285b3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Compiler/BackEnd/BackendDAETransform.mo
Expand Up @@ -383,6 +383,9 @@ algorithm

case (compelem::{}, BackendDAE.ARRAY_EQUATION()::{}, var_varindx_lst) equation
varindxs = List.map(var_varindx_lst, Util.tuple22);
var_lst = List.map(var_varindx_lst, Util.tuple21);
crlst = List.map(var_lst,BackendVariable.varCref);
true = List.fold(List.map(crlst,ComponentReference.isArrayElement),boolAnd,true); // its only an array equation if all the solved variables belong to an array. if not, its a nonlinear system
then BackendDAE.SINGLEARRAY(compelem, varindxs);

case (compelem::{}, BackendDAE.IF_EQUATION()::{}, var_varindx_lst) equation
Expand Down

0 comments on commit a285b3f

Please sign in to comment.