Skip to content

Commit

Permalink
Fixes for bug: #1345
Browse files Browse the repository at this point in the history
- bugfix index of external Objects
- use typeinformation for lowerEqn

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@6823 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Nov 2, 2010
1 parent e69e9b2 commit e29a312
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Compiler/DAELow.mo
Expand Up @@ -6110,6 +6110,7 @@ algorithm
local DAE.Exp e1,e2;
DAE.ComponentRef cr1,cr2;
DAE.ElementSource source "the element source";
Exp.Type tp;

case (DAE.EQUATION(exp = e1,scalar = e2,source = source))
equation
Expand All @@ -6134,14 +6135,16 @@ algorithm

case (DAE.DEFINE(componentRef = cr1, exp = e2, source = source))
equation
e1 = Exp.simplify(DAE.CREF(cr1, DAE.ET_OTHER()));
tp = Exp.typeof(e2);
e1 = Exp.simplify(DAE.CREF(cr1,tp));
e2 = Exp.simplify(e2);
then
EQUATION(e1,e2,source);

case (DAE.INITIALDEFINE(componentRef = cr1, exp = e2, source = source))
equation
e1 = Exp.simplify(DAE.CREF(cr1, DAE.ET_OTHER()));
tp = Exp.typeof(e2);
e1 = Exp.simplify(DAE.CREF(cr1, tp));
e2 = Exp.simplify(e2);
then
EQUATION(e1,e2,source);
Expand Down Expand Up @@ -14511,7 +14514,7 @@ algorithm
(vars_1,x1,xd1,y1,p1,dummy,ext_1,x_strType1,xd_strType1,y_strType1,p_strType1,dummy_strType1) =
calculateIndexes2(vs, x, xd, y, p, dummy,ext_1,x_strType,xd_strType,y_strType,p_strType,dummy_strType);
then
(((VAR(cr,EXTOBJ(path),d,tp,b,value,dim,p,source,dae_var_attr,comment,flowPrefix,streamPrefix),typ,place) :: vars_1),
(((VAR(cr,EXTOBJ(path),d,tp,b,value,dim,ext,source,dae_var_attr,comment,flowPrefix,streamPrefix),typ,place) :: vars_1),
x1,xd1,y1,p1,dummy,ext_1,x_strType,xd_strType,y_strType,p_strType,dummy_strType);
end matchcontinue;
end calculateIndexes2;
Expand Down

0 comments on commit e29a312

Please sign in to comment.