@@ -1589,6 +1589,7 @@ protected
15891589
15901590 DAE . Exp expcrA,mulAstates,mulAdstates,expset,expderset,expsetstart;
15911591 list< DAE . Exp > expcrstates,expcrdstates,expcrset,expcrdset,expcrstatesstart;
1592+ list< DAE . ComponentRef > crstates;
15921593 DAE . Operator op;
15931594 BackendDAE . Equation eqn,deqn;
15941595 list< BackendDAE . Equation > cEqnsLst,oEqnLst;
@@ -1607,8 +1608,9 @@ algorithm
16071608 // add Equations
16081609 // set.x = set.A*set.statecandidates
16091610 // der(set.x) = set.A*der(set.candidates)
1610- expcrstates := List . map(stateCandidates,BackendVariable . varExp);
1611- expcrstatesstart := List . map(expcrstates,makeStartExp);
1611+ expcrstates := List . map(stateCandidates, BackendVariable . varExp);
1612+ crstates := List . map(stateCandidates, BackendVariable . varCref);
1613+ expcrstatesstart := List . map(crstates, makeStartExp);
16121614 expcrdstates := List . map(expcrstates,makeder);
16131615 expcrset := List . map(crset,Expression . crefExp);
16141616 expcrdset := List . map(expcrset,makeder);
@@ -1648,11 +1650,11 @@ algorithm
16481650end generateStateSets;
16491651
16501652protected function makeStartExp
1651- "generate the expression: $_start(inExp) "
1652- input DAE . Exp inExp ;
1653+ "generate the expression: $START.inCref "
1654+ input DAE . ComponentRef inCref ;
16531655 output DAE . Exp outExp;
16541656algorithm
1655- outExp := Expression . makePureBuiltinCall( "$_start" , {inExp}, Expression . typeof(inExp ));
1657+ outExp := Expression . crefExp( ComponentReference . crefPrefixStart(inCref ));
16561658end makeStartExp;
16571659
16581660protected function setStartExp
0 commit comments