Skip to content

Commit

Permalink
- Fixed expansion of sum(param with fixed=false).
Browse files Browse the repository at this point in the history
- Added test case mofiles/Sum.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6123 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Sep 14, 2010
1 parent 02abb48 commit 807192b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Compiler/Static.mo
Expand Up @@ -11045,13 +11045,16 @@ algorithm
(cache,DAE.CREF(cr_1,expTy),DAE.C_CONST(),acc);

// parameters without value but with fixed=false is ok, these are given value during initialization. (as long as not for iterator)
case (cache,env,cr,acc,SCode.PARAM(),NONE/* not foriter*/,io,tt,DAE.UNBOUND(),doVect,_,_)
case (cache,env,cr,acc,SCode.PARAM(),NONE/* not foriter*/,io,tt,DAE.UNBOUND(),
doVect,Lookup.SPLICEDEXPDATA(sexp,idTp),_)
equation
false = Types.getFixedVarAttribute(tt);
expTy = Types.elabType(tt);
expIdTy = Types.elabType(idTp);
cr_1 = fillCrefSubscripts(cr, tt);
e = crefVectorize(doVect, DAE.CREF(cr_1,expTy), tt, sexp,expIdTy,true);
then
(cache,DAE.CREF(cr_1,expTy),DAE.C_PARAM(),acc);
(cache,e,DAE.C_PARAM(),acc);

// outer parameters without value is ok.
case (cache,env,cr,acc,SCode.PARAM(),_,io,tt,DAE.UNBOUND(),doVect,_,_)
Expand Down

0 comments on commit 807192b

Please sign in to comment.