Skip to content

Commit

Permalink
- fixed hpcom for some models with mixedEquationSystems
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@18110 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Volker Waurich committed Nov 13, 2013
1 parent ee38c94 commit a837809
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Compiler/BackEnd/SimCodeUtil.mo
Expand Up @@ -3646,7 +3646,7 @@ algorithm
BackendDAE.IncidenceMatrix m;
BackendDAE.IncidenceMatrixT mt;
BackendDAE.StrongComponent comp, comp1;
Integer index, uniqueEqIndex;
Integer index, uniqueEqIndex, uniqueEqIndexMapping;
BackendDAE.EqSystem syst;
BackendDAE.Shared shared;
String msg;
Expand Down Expand Up @@ -3731,8 +3731,9 @@ algorithm
disc_var = List.map1r(ivars, BackendVariable.getVarAt, vars);
(_, {equation_}, uniqueEqIndex, tempvars) = createEquations(true, false, false, skipDiscInAlgorithm, false, syst, shared, {comp1}, iuniqueEqIndex, itempvars);
simVarsDisc = List.map2(disc_var, dlowvarToSimvar, NONE(), knvars);
uniqueEqIndexMapping = uniqueEqIndex;
(discEqs,uniqueEqIndex) = extractDiscEqs(disc_eqn, disc_var, uniqueEqIndex);
tmpEqSccMapping = List.fold1(List.intRange2(iuniqueEqIndex, uniqueEqIndex - 1), appendSccIdx, isccIndex, ieqSccMapping);
tmpEqSccMapping = List.fold1(List.intRange2(iuniqueEqIndex, uniqueEqIndexMapping - 1), appendSccIdx, isccIndex, ieqSccMapping);
// was madness
then ({SimCode.SES_MIXED(uniqueEqIndex, equation_, simVarsDisc, discEqs, 0)}, {equation_}, uniqueEqIndex+1, tempvars, tmpEqSccMapping);

Expand Down

0 comments on commit a837809

Please sign in to comment.