Skip to content

Commit

Permalink
Estimate number of equations
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel authored and OpenModelica-Hudson committed Apr 24, 2017
1 parent cf6f51c commit 4f1dc42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Compiler/BackEnd/FindZeroCrossings.mo
Expand Up @@ -93,7 +93,7 @@ algorithm
// shared removedEqns
((removedEqs, vars, eqns, index, ht)) :=
BackendEquation.traverseEquationArray(shared.removedEqs, encapsulateWhenConditions_Equation,
(BackendEquation.emptyEqns(), DoubleEndedList.fromList({}), DoubleEndedList.fromList({}), index, ht) );
(BackendEquation.emptyEqnsSized(BackendEquation.getNumberOfEquations(shared.removedEqs)), DoubleEndedList.fromList({}), DoubleEndedList.fromList({}), index, ht) );
shared.removedEqs := removedEqs;
eqns_ := BackendEquation.listEquation(DoubleEndedList.toListNoCopyNoClear(eqns));
vars_ := BackendVariable.listVar(DoubleEndedList.toListNoCopyNoClear(vars));
Expand Down Expand Up @@ -129,12 +129,12 @@ algorithm
algorithm
((orderedEqs, varLst, eqnLst, outIndex, outHT)) :=
BackendEquation.traverseEquationArray( orderedEqs, encapsulateWhenConditions_Equation,
(BackendEquation.emptyEqns(), DoubleEndedList.fromList({}), DoubleEndedList.fromList({}), inIndex, inHT) );
(BackendEquation.emptyEqnsSized(BackendEquation.getNumberOfEquations(orderedEqs)), DoubleEndedList.fromList({}), DoubleEndedList.fromList({}), inIndex, inHT) );

// removed equations
((removedEqs, varLst, eqnLst, outIndex, outHT)) :=
BackendEquation.traverseEquationArray( syst.removedEqs, encapsulateWhenConditions_Equation,
(BackendEquation.emptyEqns(), varLst, eqnLst, outIndex, outHT) );
(BackendEquation.emptyEqnsSized(BackendEquation.getNumberOfEquations(syst.removedEqs)), varLst, eqnLst, outIndex, outHT) );
syst.removedEqs := removedEqs;

syst.orderedVars := BackendVariable.addVars(DoubleEndedList.toListNoCopyNoClear(varLst), orderedVars);
Expand Down

0 comments on commit 4f1dc42

Please sign in to comment.