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

Commit

Permalink
fix added jacobian vars also to HT (#1)
Browse files Browse the repository at this point in the history
- fix mergeError

Belonging to [master]:
  - #2937
  - OpenModelica/OpenModelica-testsuite#1123
  • Loading branch information
wibraun authored and OpenModelica-Hudson committed Feb 19, 2019
1 parent af50f26 commit 9b98e73
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Compiler/SimCode/SimCodeUtil.mo
Expand Up @@ -8934,14 +8934,9 @@ algorithm
outHT := List.fold(vars.intConstVars, HashTableCrefSimVar.addSimVarToHashTable, outHT);
outHT := List.fold(vars.boolConstVars, HashTableCrefSimVar.addSimVarToHashTable, outHT);
outHT := List.fold(vars.stringConstVars, HashTableCrefSimVar.addSimVarToHashTable, outHT);
if (Config.simCodeTarget()=="Cpp" or Config.simCodeTarget()=="omsicpp") then
// Not needed in the hashtable (actually breaks code generation
// due to bad indexes, no information that they are seed variables
// and so on...
outHT := List.fold(vars.sensitivityVars, HashTableCrefSimVar.addSimVarToHashTable, outHT);
outHT := List.fold(vars.jacobianVars, HashTableCrefSimVar.addSimVarToHashTable, outHT);
outHT := List.fold(vars.seedVars, HashTableCrefSimVar.addSimVarToHashTable, outHT);
end if;
outHT := List.fold(vars.sensitivityVars, HashTableCrefSimVar.addSimVarToHashTable, outHT);
outHT := List.fold(vars.jacobianVars, HashTableCrefSimVar.addSimVarToHashTable, outHT);
outHT := List.fold(vars.seedVars, HashTableCrefSimVar.addSimVarToHashTable, outHT);
outHT := List.fold(vars.realOptimizeConstraintsVars, HashTableCrefSimVar.addSimVarToHashTable, outHT);
outHT := List.fold(vars.realOptimizeFinalConstraintsVars, HashTableCrefSimVar.addSimVarToHashTable, outHT);
else
Expand Down

0 comments on commit 9b98e73

Please sign in to comment.