Skip to content

Commit

Permalink
Attempt to fix #3741
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranke committed Mar 5, 2016
1 parent f31e10e commit 12ddb6a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Compiler/BackEnd/RemoveSimpleEquations.mo
Expand Up @@ -390,13 +390,24 @@ protected function addUnreplaceable
output HashSet.HashSet outUnreplaceable = inUnreplaceable;
protected
BackendDAE.Variables orderedVars;
Integer idx;
BackendDAE.SubPartition subPartition;
DAE.ComponentRef cr;
algorithm
BackendDAE.EQSYSTEM(orderedVars=orderedVars) := syst;
for var in BackendVariable.varList(orderedVars) loop
if BackendVariable.varUnreplaceable(var) then
outUnreplaceable := BaseHashSet.add(BackendVariable.varCref(var), outUnreplaceable);
end if;
end for;
// add discrete states to unreplaceable (#3741)
if BackendDAEUtil.isClockedSyst(syst) then
BackendDAE.CLOCKED_PARTITION(idx) := syst.partitionKind;
subPartition := shared.partitionsInfo.subPartitions[idx];
for cr in subPartition.prevVars loop
outUnreplaceable := BaseHashSet.add(cr, outUnreplaceable);
end for;
end if;
end addUnreplaceable;

protected function fastAcausal1 "author: Frenkel TUD 2012-12
Expand Down

0 comments on commit 12ddb6a

Please sign in to comment.