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

Commit 68cc738

Browse files
arun3688OpenModelica-Hudson
authored andcommitted
fix datareconciliation jacobians var ordering
Belonging to [master]: - #2915 - OpenModelica/OpenModelica-testsuite#1118
1 parent 05c8b02 commit 68cc738

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Compiler/BackEnd/Uncertainties.mo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ algorithm
438438
/* Prepare Torn systems for Jacobians */
439439
//create the Set-S equation to BackendDae innerequation structure
440440
sets_inner_equations=createInnerEquations(tempsetS,var);
441-
(outDiffVars,outResidualVars,outOtherVars,outResidualEqns,outOtherEqns)=SymbolicJacobian.prepareTornStrongComponentData(allVars,allEqs,knowns,tempsetC,sets_inner_equations,shared.functionTree);
441+
(outDiffVars,outResidualVars,outOtherVars,outResidualEqns,outOtherEqns)=SymbolicJacobian.prepareTornStrongComponentData(allVars,allEqs,listReverse(knowns),tempsetC,sets_inner_equations,shared.functionTree);
442442
// Dump the torn systems
443443
/*
444444
BackendDump.dumpVariables(outDiffVars,"Jacobian_knownVariables");
@@ -611,9 +611,9 @@ algorithm
611611

612612
print("\n\nAutomatic Verification Steps of DataReconciliation Algorithm"+ "\n" + UNDERLINE + "\n");
613613

614-
var:=List.map1r(knowns,BackendVariable.getVarAt,allVars);
614+
var:=List.map1r(listReverse(knowns),BackendVariable.getVarAt,allVars);
615615
convar:=List.map1r(constantvars,BackendVariable.getVarAt,allVars);
616-
BackendDump.dumpVarList(var,"knownVariables:"+dumplistInteger(knowns));
616+
BackendDump.dumpVarList(var,"knownVariables:"+dumplistInteger(listReverse(knowns)));
617617
BackendDump.dumpVarList(convar,"ConstantVariables:"+dumplistInteger(constantvars));
618618
print("-SET_C:"+ dumplistInteger(setc)+ "\n" + "-SET_S:" + dumplistInteger(sets) +"\n\n");
619619

0 commit comments

Comments
 (0)