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

solveSimpleEquations: Only update eq if solved #2083

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Compiler/BackEnd/ExpressionSolve.mo
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ DAE.eqs := list( (match syst
tmpComp := comp;
if BackendEquation.isEquation(eqn) then
(eqn,solved) := solveSimpleEquationsWork(eqn, var, DAE.shared);
syst.orderedEqs := BackendEquation.setAtIndex(syst.orderedEqs, eindex, eqn);

if not solved then
if solved then
syst.orderedEqs := BackendEquation.setAtIndex(syst.orderedEqs, eindex, eqn);
else
tmpComp := BackendDAE.EQUATIONSYSTEM({eindex}, {vindx}, BackendDAE.EMPTY_JACOBIAN() ,BackendDAE.JAC_NONLINEAR(), false);
end if;
end if; // isEquation
Expand Down