@@ -5604,7 +5604,7 @@ algorithm
56045604 case (BackendDAE.IF_EQUATION(conditions=conditions, eqnstrue=eqnsLst, eqnsfalse=elseqns, source=source_), _,
56055605 BackendDAE.SHARED(info = ei), _, _, _) equation
56065606 (ifbranches, uniqueEqIndex, tempvars) = createEquationsIfBranch(conditions, eqnsLst, inVars, shared, genDiscrete, iuniqueEqIndex, itempvars);
5607- (equations_, uniqueEqIndex, tempvars) = createEquationsfromList(elseqns, inVars, genDiscrete, uniqueEqIndex, tempvars, ei);
5607+ (equations_, uniqueEqIndex, tempvars) = createEquationsfromList(elseqns, inVars, uniqueEqIndex, tempvars, ei, genDiscrete );
56085608 then ({SimCode.SES_IFEQUATION(uniqueEqIndex, ifbranches, equations_, source_)}, uniqueEqIndex+1, tempvars);
56095609
56105610 else equation
@@ -5643,7 +5643,7 @@ algorithm
56435643
56445644 case (condition::conditionList, eqns::eqnsLst, _,
56455645 BackendDAE.SHARED(info = ei), _, _, _) equation
5646- (equations_, uniqueEqIndex, tempvars) = createEquationsfromList(eqns, inVars, genDiscrete, iuniqueEqIndex, itempvars, ei);
5646+ (equations_, uniqueEqIndex, tempvars) = createEquationsfromList(eqns, inVars, iuniqueEqIndex, itempvars, ei, genDiscrete );
56475647 ifbranch = ((condition, equations_));
56485648 (ifbranches, uniqueEqIndex, tempvars) = createEquationsIfBranch(conditionList, eqnsLst, inVars, shared, genDiscrete, uniqueEqIndex, tempvars);
56495649 ifbranches = ifbranch::ifbranches;
@@ -5658,10 +5658,13 @@ end createEquationsIfBranch;
56585658public function createEquationsfromList
56595659 input list<BackendDAE.Equation> inEquations;
56605660 input list<BackendDAE.Var> inVars;
5661- input Boolean genDiscrete;
56625661 input Integer iuniqueEqIndex;
56635662 input list<SimCodeVar.SimVar> itempvars;
56645663 input BackendDAE.ExtraInfo iextra;
5664+ input Boolean genDiscrete = false;
5665+ input Boolean includeWhen = false;
5666+ input Boolean skipDiscInZc = false;
5667+ input Boolean skipDiscInAlgorithm = false;
56655668 output list<SimCode.SimEqSystem> equations_;
56665669 output Integer ouniqueEqIndex;
56675670 output list<SimCodeVar.SimVar> otempvars;
@@ -5689,7 +5692,7 @@ algorithm
56895692 (BackendDAE.DAE({syst as BackendDAE.EQSYSTEM(matching=BackendDAE.MATCHING(comps=comps))}, shared)) =
56905693 BackendDAEUtil.transformBackendDAE( subsystem_dae, SOME((BackendDAE.NO_INDEX_REDUCTION(),
56915694 BackendDAE.ALLOW_UNDERCONSTRAINED())), NONE(), NONE() );
5692- (equations_, _, uniqueEqIndex, tempvars) = createEquations(false, false , genDiscrete, false , syst, shared, comps, iuniqueEqIndex, itempvars);
5695+ (equations_, _, uniqueEqIndex, tempvars) = createEquations(includeWhen, skipDiscInZc , genDiscrete, skipDiscInAlgorithm , syst, shared, comps, iuniqueEqIndex, itempvars);
56935696 then (equations_, uniqueEqIndex, tempvars);
56945697
56955698 else equation
@@ -5963,7 +5966,7 @@ algorithm
59635966 eqnLst = List.threadMap2(expl, expl1, BackendEquation.generateEquation, source, eqKind);
59645967
59655968 // generate SimCode equations therefore
5966- (eqSystlst, uniqueEqIndex, tempvars) = createEquationsfromList(eqnLst, inVars, genDiscrete, iuniqueEqIndex, itempvars, iextra);
5969+ (eqSystlst, uniqueEqIndex, tempvars) = createEquationsfromList(eqnLst, inVars, iuniqueEqIndex, itempvars, iextra, genDiscrete );
59675970 then
59685971 (eqSystlst, uniqueEqIndex, tempvars);
59695972
@@ -5983,7 +5986,7 @@ algorithm
59835986 eqnLst = List.threadMap2(expl, expl1, BackendEquation.generateEquation, source, eqKind);
59845987
59855988 // generate SimCode equations therefore
5986- (eqSystlst, uniqueEqIndex,_) = createEquationsfromList(eqnLst, inVars, genDiscrete, iuniqueEqIndex, itempvars, iextra);
5989+ (eqSystlst, uniqueEqIndex,_) = createEquationsfromList(eqnLst, inVars, iuniqueEqIndex, itempvars, iextra, genDiscrete );
59875990 then
59885991 (eqSystlst, uniqueEqIndex, itempvars);
59895992
0 commit comments