Skip to content

Commit 2dd6c85

Browse files
author
Willi Braun
committed
- fixed #1228, by adding when equation also to other torn equations.
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23260 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent c02de76 commit 2dd6c85

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Compiler/SimCode/SimCodeUtil.mo

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4302,7 +4302,7 @@ algorithm
43024302
eqn = BackendEquation.equationNth1(eqns, eqnindx);
43034303
// generate comp
43044304
comp = createTornSystemOtherEqns1(eqn, eqnindx, vars);
4305-
(simequations, _, uniqueEqIndex, tempvars) = createEquations(false, false, true, skipDiscInAlgorithm, isyst, ishared, {comp}, iuniqueEqIndex, itempvars);
4305+
(simequations, _, uniqueEqIndex, tempvars) = createEquations(true, false, true, skipDiscInAlgorithm, isyst, ishared, {comp}, iuniqueEqIndex, itempvars);
43064306
simequations = listAppend(isimequations, simequations);
43074307
// generade other equations
43084308
(simequations, uniqueEqIndex, tempvars) = createTornSystemOtherEqns(rest, skipDiscInAlgorithm, isyst, ishared, uniqueEqIndex, tempvars, simequations);
@@ -4340,6 +4340,10 @@ algorithm
43404340
case (BackendDAE.COMPLEX_EQUATION(), _, _)
43414341
then
43424342
BackendDAE.SINGLECOMPLEXEQUATION(eqnindx, varindx);
4343+
case (BackendDAE.WHEN_EQUATION(size=_), _, _)
4344+
then
4345+
BackendDAE.SINGLEWHENEQUATION(eqnindx, varindx);
4346+
43434347
else
43444348
equation
43454349
print("SimCodeUtil.createTornSystemOtherEqns1 failed for\n");

0 commit comments

Comments
 (0)