This repository was archived by the owner on May 18, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -104,8 +104,13 @@ algorithm
104104 then (syst, comps);
105105
106106 else algorithm
107- Error . addInternalError("function strongComponentsScalar failed (sorting strong components)" , sourceInfo());
108- then fail();
107+ if Flags . isSet(Flags . NF_SCALARIZE ) then
108+ Error . addInternalError("function strongComponentsScalar failed (sorting strong components)" , sourceInfo());
109+ fail();
110+ else
111+ Error . addCompilerWarning("BackendDAETransform.strongComponentsScalar failed (sorting strong components)" );
112+ end if ;
113+ then (inSystem, {});
109114 end matchcontinue;
110115end strongComponentsScalar;
111116
Original file line number Diff line number Diff line change @@ -188,11 +188,17 @@ public function equationArraySize "author: lochel
188188 should correspond to the number of variables."
189189 input BackendDAE . EquationArray equationArray;
190190 output Integer outSize;
191+ protected
192+ Boolean nfScalarize = Flags . isSet(Flags . NF_SCALARIZE );
191193algorithm
192194 outSize := 0 ;
193195 for i in 1 :ExpandableArray . getLastUsedIndex(equationArray) loop
194196 if ExpandableArray . occupied(i, equationArray) then
195- outSize := outSize + equationSize(ExpandableArray . get(i, equationArray));
197+ if nfScalarize then
198+ outSize := outSize + equationSize(ExpandableArray . get(i, equationArray));
199+ else
200+ outSize := outSize + 1 ;
201+ end if ;
196202 end if ;
197203 end for ;
198204end equationArraySize;
You can’t perform that action at this time.
0 commit comments