You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 18, 2019. It is now read-only.
let isArrayWithLength = if rangeExpStop then (match ri.path case IDENT(name="array") then "1" else "") else ""
6734
-
let &tmpVarDecls += if isArrayWithLength then 'modelica_integer <%iter.id%>_length;<%\n%>'
6731
+
let &tmpVarDecls += if isArrayWithLength then 'modelica_integer <%iteratorName%>_length;<%\n%>'
6735
6732
let &rangeExpPre += match iter.exp case RANGE(__) then "" else (if firstIndex then '<%firstIndex%> = 1;<%\n%>')
6736
6733
let guardCond = (match iter.guardExp case SOME(grd) then daeExp(grd, context, &guardExpPre, &tmpVarDecls, &auxFunction) else "")
6737
6734
let &tmpVarDecls += '<%identType%><%iteratorName%>;<%\n%>'
6738
6735
let &rangeExpPre += if isArrayWithLength then
6739
-
'<%iter.id%>_length = ((<%stopVar%>-<%if firstIndex then firstIndex else iteratorName %>)/<%stepVar%>)+1;<%\n%>'
6736
+
'<%iteratorName%>_length = ((<%stopVar%>-<%if firstIndex then firstIndex else iteratorName %>)/<%stepVar%>)+1;<%\n%>'
6740
6737
let &rangeExpPre += match iter.exp case RANGE(__) then '<%iteratorName%> = (<%rangeExp%>)-<%stepVar%>;<%\n%>' /* We pre-increment the counter, so subtract the step for the first variable for ranges */
let _ = (iterators |> iter as REDUCTIONITER(__) =>
6824
-
let loopVar = '<%iter.id%>_loopVar'
6821
+
let iteratorName = contextIteratorName(iter.id, context)
6822
+
let loopVar = '<%iteratorName%>_loopVar'
6825
6823
let identType = expTypeFromExpModelica(iter.exp)
6826
-
let &rangeExpPre += '<%length%> = modelica_integer_max(<%length%>,<%match identType case"modelica_metatype" then (if isMetaArray(iter.exp) then 'arrayLength(<%loopVar%>)'else'listLength(<%loopVar%>)') else match iter.exp case RANGE(__) then '<%iter.id%>_length'else'size_of_dimension_base_array(<%loopVar%>, 1)'%>);<%\n%>'
6824
+
let &rangeExpPre += '<%length%> = modelica_integer_max(<%length%>,<%match identType case"modelica_metatype" then (if isMetaArray(iter.exp) then 'arrayLength(<%loopVar%>)'else'listLength(<%loopVar%>)') else match iter.exp case RANGE(__) then '<%iteratorName%>_length'else'size_of_dimension_base_array(<%loopVar%>, 1)'%>);<%\n%>'
AC_ARG_WITH(lpsolve, [ --with-lpsolve (default searching for lpsolve; disable if only using omc to cross-compile)],[if test "$withval" = "no"; then NO_LPLIB="#define NO_LPLIB"; fi],[])
0 commit comments