Skip to content

Commit

Permalink
- Fixed broken connector balance checking.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17311 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Sep 20, 2013
1 parent be7d6c7 commit fa6f4da
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Compiler/FrontEnd/ConnectUtil.mo
Original file line number Diff line number Diff line change
Expand Up @@ -330,30 +330,25 @@ public function addConnectorVariablesFromDAE
output Sets outConnectionSet;
algorithm
outConnectionSet :=
matchcontinue(inIgnore, inClassState, inPrefix, inVars, inConnectionSet, info, inElementSource)
match(inIgnore, inClassState, inPrefix, inVars, inConnectionSet, info, inElementSource)
local
Absyn.Path class_path;
list<DAE.Var> streams, flows;
list<DAE.Var> vars, streams, flows;
Sets cs;

case (false, ClassInf.CONNECTOR(path = _), _, _, _, _, _)
equation
true = Flags.isSet(Flags.DISABLE_SINGLE_FLOW_EQ);
then
inConnectionSet;

// check balance of non expandable connectors!
case (false, ClassInf.CONNECTOR(path = class_path, isExpandable = false), _, _, cs, _, _)
equation
checkConnectorBalance(inVars, class_path, info);
(flows, streams) = getStreamAndFlowVariables(inVars, {}, {});
vars = Util.if_(Flags.isSet(Flags.DISABLE_SINGLE_FLOW_EQ), {}, inVars);
(flows, streams) = getStreamAndFlowVariables(vars, {}, {});
cs = List.fold2(flows, addFlowVariableFromDAE, inElementSource, inPrefix, cs);
cs = addStreamFlowAssociations(cs, inPrefix, streams, flows);
then
cs;

else inConnectionSet;
end matchcontinue;
end match;
end addConnectorVariablesFromDAE;

protected function addFlowVariableFromDAE
Expand Down

0 comments on commit fa6f4da

Please sign in to comment.