Skip to content

Commit

Permalink
check input var is not type=T_ARRAY()
Browse files Browse the repository at this point in the history
  • Loading branch information
arun3688 authored and lochel committed Jan 15, 2021
1 parent 3de0877 commit 97b2e24
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions OMCompiler/Compiler/BackEnd/Initialization.mo
Expand Up @@ -760,14 +760,12 @@ algorithm
parameter Real x_start = 6.0;
*/
for var in BackendVariable.varList(dae.shared.globalKnownVars) loop
if BackendVariable.isInput(var) and not Expression.isConstValue(BackendVariable.varStartValue(var)) then
if BackendVariable.isInput(var) and not Expression.isConstValue(BackendVariable.varStartValue(var)) and not Types.isArray(BackendVariable.varType(var)) then
bindExp := BackendVariable.varStartValue(var);
(v, _) := BackendVariable.getVarSingle(Expression.expCref(bindExp), dae.shared.globalKnownVars);
var := BackendVariable.setVarStartValueOption(var, v.bindExp);
globalKnownVarList := var :: globalKnownVarList;
else
globalKnownVarList := var :: globalKnownVarList;
end if;
globalKnownVarList := var :: globalKnownVarList;
end for;
dae := BackendDAEUtil.setDAEGlobalKnownVars(dae, BackendVariable.listVar(globalKnownVarList));

Expand Down

0 comments on commit 97b2e24

Please sign in to comment.