Skip to content

Commit

Permalink
[DAEmode] added removed equations
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - OpenModelica/OMCompiler#2244
  • Loading branch information
Willi Braun authored and OpenModelica-Hudson committed Mar 1, 2018
1 parent f06fb14 commit 24e74bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Compiler/SimCode/SimCodeMain.mo
Expand Up @@ -1085,7 +1085,7 @@ protected
Option<SimCode.JacobianMatrix> daeModeSP;
Option<SimCode.DaeModeData> daeModeData;
SimCode.DaeModeConfig daeModeConf;
list<SimCode.SimEqSystem> daeEquations;
list<SimCode.SimEqSystem> daeEquations, removedEquations;
list<SimCodeVar.SimVar> residualVars, algebraicStateVars, auxiliaryVars;
list<SimCode.StateSet> stateSets;

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

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

//prepare DAEmode stuff
Expand Down Expand Up @@ -1257,7 +1258,7 @@ algorithm
minValueEquations,
maxValueEquations,
parameterEquations,
{},
removedEquations,
{},
{},
jacobianEquations,
Expand Down
2 changes: 1 addition & 1 deletion Compiler/SimCode/SimCodeUtil.mo
Expand Up @@ -5369,7 +5369,7 @@ algorithm
end matchcontinue;
end createAlgorithmAndEquationAsserts;

protected function traversedlowEqToSimEqSystem
public function traversedlowEqToSimEqSystem
input BackendDAE.Equation inEq;
input tuple<Integer, list<SimCode.SimEqSystem>> inTpl;
output BackendDAE.Equation outEq;
Expand Down

0 comments on commit 24e74bf

Please sign in to comment.