Skip to content

Commit

Permalink
- add index to each SimEqSystem
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12084 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jun 18, 2012
1 parent 97e830f commit 0077476
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 73 deletions.
9 changes: 5 additions & 4 deletions Compiler/BackEnd/BackendQSS.mo
Expand Up @@ -627,7 +627,7 @@ algorithm
SimCode.SimEqSystem eq;
DAE.ComponentRef cref;
list<DAE.ComponentRef> vars_cref;
case (SimCode.SES_SIMPLE_ASSIGN(cref,_,_) :: tail,_,i_algs)
case (SimCode.SES_SIMPLE_ASSIGN(cref=cref) :: tail,_,i_algs)
equation
true = List.notMember(cref,List.map(states,ComponentReference.crefPrefixDer));
true = List.notMember(cref,states);
Expand All @@ -653,7 +653,7 @@ function getExpResidual
algorithm
o:=match (i)
local DAE.Exp e;
case (SimCode.SES_RESIDUAL(e,_)) then e;
case (SimCode.SES_RESIDUAL(exp=e)) then e;
end match;
end getExpResidual;

Expand Down Expand Up @@ -1074,13 +1074,14 @@ algorithm
eq_out :=
matchcontinue (eq,zc_exps)
local
Integer index;
DAE.Exp exp;
DAE.ComponentRef cref;
DAE.ElementSource source;
case (SimCode.SES_SIMPLE_ASSIGN(cref,exp,source),_)
case (SimCode.SES_SIMPLE_ASSIGN(index,cref,exp,source),_)
equation
exp = replaceExpZC(exp,zc_exps,0);
then SimCode.SES_SIMPLE_ASSIGN(cref,exp,source);
then SimCode.SES_SIMPLE_ASSIGN(index,cref,exp,source);
case (_,_) then eq;
end matchcontinue;
end replaceZC;
Expand Down

0 comments on commit 0077476

Please sign in to comment.