Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 24e74bf

Browse files
Willi BraunOpenModelica-Hudson
authored andcommitted
[DAEmode] added removed equations
Belonging to [master]: - #2244
1 parent f06fb14 commit 24e74bf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Compiler/SimCode/SimCodeMain.mo

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ protected
10851085
Option<SimCode.JacobianMatrix> daeModeSP;
10861086
Option<SimCode.DaeModeData> daeModeData;
10871087
SimCode.DaeModeConfig daeModeConf;
1088-
list<SimCode.SimEqSystem> daeEquations;
1088+
list<SimCode.SimEqSystem> daeEquations, removedEquations;
10891089
list<SimCodeVar.SimVar> residualVars, algebraicStateVars, auxiliaryVars;
10901090
list<SimCode.StateSet> stateSets;
10911091

@@ -1153,6 +1153,7 @@ algorithm
11531153
parameterEquations := listReverse(parameterEquations);
11541154
if debug then ExecStat.execStat("simCode: createParameterEquations"); end if;
11551155

1156+
(uniqueEqIndex, removedEquations) := BackendEquation.traverseEquationArray(BackendDAEUtil.collapseRemovedEqs(inBackendDAE), SimCodeUtil.traversedlowEqToSimEqSystem, (uniqueEqIndex, {}));
11561157
discreteModelVars := BackendDAEUtil.foldEqSystem(inBackendDAE, SimCodeUtil.extractDiscreteModelVars, {});
11571158

11581159
//prepare DAEmode stuff
@@ -1257,7 +1258,7 @@ algorithm
12571258
minValueEquations,
12581259
maxValueEquations,
12591260
parameterEquations,
1260-
{},
1261+
removedEquations,
12611262
{},
12621263
{},
12631264
jacobianEquations,

Compiler/SimCode/SimCodeUtil.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5369,7 +5369,7 @@ algorithm
53695369
end matchcontinue;
53705370
end createAlgorithmAndEquationAsserts;
53715371

5372-
protected function traversedlowEqToSimEqSystem
5372+
public function traversedlowEqToSimEqSystem
53735373
input BackendDAE.Equation inEq;
53745374
input tuple<Integer, list<SimCode.SimEqSystem>> inTpl;
53755375
output BackendDAE.Equation outEq;

0 commit comments

Comments
 (0)