From 45e92f33835b56898f98d8210474abeadf807ae2 Mon Sep 17 00:00:00 2001 From: Lennart Ochel Date: Tue, 7 Oct 2014 08:25:27 +0000 Subject: [PATCH] - handle mixed systems using tearing (new approach) - remove poor handling of mixed systems from the back end (old approach) - remove unused record BackendDAE.MIXEDEQUATIONSYSTEM - remove flag +d=MixedTearing - update two result files - break Modelica.Fluid.Examples.HeatingSystem (msl32) due to non-linear solver issues - fix #1728, #2432 (and probably more) git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@22641 f25d12d1-65f4-0310-ae8a-bbce733d8d8e --- Compiler/BackEnd/BackendDAE.mo | 6 - Compiler/BackEnd/BackendDAEOptimize.mo | 49 ----- Compiler/BackEnd/BackendDAETransform.mo | 209 +--------------------- Compiler/BackEnd/BackendDAEUtil.mo | 5 - Compiler/BackEnd/BackendDump.mo | 83 --------- Compiler/BackEnd/HpcOmTaskGraph.mo | 37 ---- Compiler/BackEnd/Initialization.mo | 9 - Compiler/BackEnd/OnRelaxation.mo | 6 - Compiler/BackEnd/RemoveSimpleEquations.mo | 11 -- Compiler/BackEnd/SimCodeUtil.mo | 29 +-- Compiler/BackEnd/Tearing.mo | 16 -- Compiler/BackEnd/XMLDump.mo | 9 - Compiler/Template/GraphvizDumpTV.mo | 6 - Compiler/Util/Flags.mo | 92 +++++----- 14 files changed, 47 insertions(+), 520 deletions(-) diff --git a/Compiler/BackEnd/BackendDAE.mo b/Compiler/BackEnd/BackendDAE.mo index eacc428c970..e24c153911e 100644 --- a/Compiler/BackEnd/BackendDAE.mo +++ b/Compiler/BackEnd/BackendDAE.mo @@ -392,12 +392,6 @@ uniontype StrongComponent JacobianType jacType; end EQUATIONSYSTEM; - record MIXEDEQUATIONSYSTEM - StrongComponent condSystem; - list disc_eqns; - list disc_vars; - end MIXEDEQUATIONSYSTEM; - record SINGLEARRAY Integer eqn; list vars "be careful with states, this are solved for der(x)"; diff --git a/Compiler/BackEnd/BackendDAEOptimize.mo b/Compiler/BackEnd/BackendDAEOptimize.mo index ec7d958bc53..299df59116c 100644 --- a/Compiler/BackEnd/BackendDAEOptimize.mo +++ b/Compiler/BackEnd/BackendDAEOptimize.mo @@ -1766,10 +1766,6 @@ algorithm var_lst = List.map1r(vindx, BackendVariable.getVarAt, vars); (syst,shared) = solveLinearSystem(syst,shared,eqn_lst,eindex,var_lst,vindx,jac); then (syst,shared,true); - case (syst,shared,(BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp1))) - equation - (syst,shared,b) = constantLinearSystemWork(syst,shared,comp1); - then (syst,shared,b); else (isyst,ishared,false); end matchcontinue; end constantLinearSystemWork; @@ -2276,36 +2272,6 @@ algorithm getSparsePattern2(inputVars, solvedVars, eqns, ineqnSparse, invarSparse, inMark, inUsed, inmarkValue); - result = getSparsePattern(rest, result, invarSparse, inMark, inUsed, inmarkValue+1, inMatrix, inMatrixT); - then result; - case(BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.EQUATIONSYSTEM(eqns=eqns1,vars=vars1), disc_eqns=eqns,disc_vars=vars)::rest,result,_,_,_,_,_,_) - equation - eqns = listAppend(eqns, eqns1); - solvedVars = listAppend(vars, vars1); - inputVarsLst = List.map1(eqns, Util.arrayGetIndexFirst, inMatrix); - inputVars = List.flatten(inputVarsLst); - inputVars = List.fold1(solvedVars, List.removeOnTrue, intEq, inputVars); - - getSparsePattern2(inputVars, solvedVars, eqns, ineqnSparse, invarSparse, inMark, inUsed, inmarkValue); - - result = getSparsePattern(rest, result, invarSparse, inMark, inUsed, inmarkValue+1, inMatrix, inMatrixT); - then result; - case(BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.TORNSYSTEM(residualequations=eqns1,tearingvars=vars1,otherEqnVarTpl=otherEqnVarTpl), disc_eqns=eqns,disc_vars=vars)::rest,result,_,_,_,_,_,_) - equation - inputVarsLst = List.map(otherEqnVarTpl,Util.tuple22); - vars2 = List.flatten(inputVarsLst); - eqns2 = List.map(otherEqnVarTpl,Util.tuple21); - eqns1 = listAppend(eqns1, eqns2); - vars1 = listAppend(vars1, vars2); - eqns = listAppend(eqns, eqns1); - solvedVars = listAppend(vars, vars1); - - inputVarsLst = List.map1(eqns, Util.arrayGetIndexFirst, inMatrix); - inputVars = List.flatten(inputVarsLst); - inputVars = List.fold1(solvedVars, List.removeOnTrue, intEq, inputVars); - - getSparsePattern2(inputVars, solvedVars, eqns, ineqnSparse, invarSparse, inMark, inUsed, inmarkValue); - result = getSparsePattern(rest, result, invarSparse, inMark, inUsed, inmarkValue+1, inMatrix, inMatrixT); then result; else @@ -4676,13 +4642,6 @@ algorithm (_,tpl) = BackendEquation.traverseBackendDAEExpsEqn(eqn,countOperationsExp,inTpl); then countOperationstraverseComps(rest,isyst,ishared,tpl); - case ((comp as BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp1))::rest,_,_,_) - equation - tpl = countOperationstraverseComps({comp1},isyst,ishared,inTpl); - (eqnlst,_,_) = BackendDAETransform.getEquationAndSolvedVar(comp, BackendEquation.getEqnsFromEqSystem(isyst), BackendVariable.daeVars(isyst)); - tpl = BackendDAEUtil.traverseBackendDAEExpsEqns(BackendEquation.listEquation(eqnlst),countOperationsExp,tpl); - then - countOperationstraverseComps(rest,isyst,ishared,tpl); case ((comp as BackendDAE.EQUATIONSYSTEM(jac=jac,jacType=BackendDAE.JAC_LINEAR()))::rest,_,BackendDAE.SHARED(functionTree=funcs),_) equation (eqnlst,varlst,_) = BackendDAETransform.getEquationAndSolvedVar(comp, BackendEquation.getEqnsFromEqSystem(isyst), BackendVariable.daeVars(isyst)); @@ -7485,14 +7444,6 @@ algorithm case ({}, _) then {}; - case (BackendDAE.MIXEDEQUATIONSYSTEM(disc_vars=vlst)::rest, _) equation - varlst = List.map1r(vlst, BackendVariable.getVarAt, inVars); - false = List.isEmpty(varlst); - - warning = "Iteration variables of mixed equation system:\n" +& warnAboutVars(varlst); - warningList = listAllIterationVariables2(rest, inVars); - then warning::warningList; - case (BackendDAE.EQUATIONSYSTEM(vars=vlst, jacType=BackendDAE.JAC_NONLINEAR())::rest, _) equation varlst = List.map1r(vlst, BackendVariable.getVarAt, inVars); false = List.isEmpty(varlst); diff --git a/Compiler/BackEnd/BackendDAETransform.mo b/Compiler/BackEnd/BackendDAETransform.mo index 97ecce34bdb..55cf6e8abf5 100644 --- a/Compiler/BackEnd/BackendDAETransform.mo +++ b/Compiler/BackEnd/BackendDAETransform.mo @@ -447,22 +447,11 @@ algorithm case (compelem::{},_,(_,v)::{},_,_,_,_,false) then BackendDAE.SINGLEEQUATION(compelem,v); - case (comp,eqn_lst,var_varindx_lst,syst as BackendDAE.EQSYSTEM(orderedVars=_,orderedEqs=_),shared,ass1,ass2,false) - equation - var_lst = List.map(var_varindx_lst,Util.tuple21); - true = BackendVariable.hasDiscreteVar(var_lst); - true = BackendVariable.hasContinousVar(var_lst); - varindxs = List.map(var_varindx_lst,Util.tuple22); - (cont_eqn,cont_var,_,_,indxcont_eqn,indxcont_var,indxdisc_eqn,indxdisc_var) = splitMixedEquations(eqn_lst, comp, var_lst, varindxs); - var_varindx_lst_cond = List.threadTuple(cont_var,indxcont_var); - sc = analyseStrongComponentBlock(indxcont_eqn,cont_eqn,var_varindx_lst_cond,syst,shared,ass1,ass2,true); - then - BackendDAE.MIXEDEQUATIONSYSTEM(sc,indxdisc_eqn,indxdisc_var); - case (comp,eqn_lst,var_varindx_lst,syst as BackendDAE.EQSYSTEM(orderedVars=_,orderedEqs=_),shared,_,_,_) equation var_lst = List.map(var_varindx_lst,Util.tuple21); - false = BackendVariable.hasDiscreteVar(var_lst); + //false = BackendVariable.hasDiscreteVar(var_lst); //lochel: mixed systems and non-linear systems are treated the same + true = BackendVariable.hasContinousVar(var_lst); //lochel: pure discrete equation systems are not supported varindxs = List.map(var_varindx_lst,Util.tuple22); eqn_lst1 = replaceDerOpInEquationList(eqn_lst); // States are solved for der(x) not x. @@ -667,16 +656,6 @@ algorithm var = BackendVariable.getVarAt(vars, v); then ({eqn}, {var}, e); - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp, disc_eqns=elst, disc_vars=vlst), eqns, vars) - equation - eqnlst1 = BackendEquation.getEqns(elst, eqns); - varlst1 = List.map1r(vlst, BackendVariable.getVarAt, vars); - e = List.first(elst); - (eqnlst, varlst, _) = getEquationAndSolvedVar(comp, eqns, vars); - eqnlst = listAppend(eqnlst, eqnlst1); - varlst = listAppend(varlst, varlst1); - then - (eqnlst, varlst, e); case (BackendDAE.EQUATIONSYSTEM(eqns=elst, vars=vlst), eqns, vars) equation eqnlst = BackendEquation.getEqns(elst, eqns); @@ -788,13 +767,6 @@ algorithm case (BackendDAE.SINGLEEQUATION(eqn=e,var=v)) then ({e},{v}); - case BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp,disc_eqns=elst,disc_vars=vlst) - equation - (elst1,vlst1) = getEquationAndSolvedVarIndxes(comp); - elst = listAppend(elst1,elst); - vlst = listAppend(vlst1,vlst); - then - (elst,vlst); case BackendDAE.EQUATIONSYSTEM(eqns=elst,vars=vlst) then (elst,vlst); @@ -830,183 +802,6 @@ algorithm end matchcontinue; end getEquationAndSolvedVarIndxes; -protected function splitMixedEquations "author: PA - - Splits the equation of a mixed equation system into its continuous and - discrete parts. - - Even though the matching algorithm might say that a discrete variable is solved in a specific equation - (when part of a mixed system) this is not always correct. It might be impossible to solve the discrete - variable from that equation, for instance solving v from equation x = v < 0; This happens for e.g. the Gear model. - Instead, to split the equations and variables the following scheme is used: - - 1. Split the variables into continuous and discrete. - 2. For each discrete variable v, select among the equations where it is present - for an equation v = expr. (This could be done - by looking at incidence matrix but for now we look through all equations. This is sufficiently - efficient for small systems of mixed equations < 100) - 3. The equations not selected in step 2 are continuous equations. -" - input list eqnLst; - input list indxEqnLst; - input list varLst; - input list indxVarLst; - output list contEqnLst; - output list contVarLst; - output list discEqnLst; - output list discVarLst; - output list indxcontEqnLst; - output list indxcontVarLst; - output list indxdiscEqnLst; - output list indxdiscVarLst; -algorithm - (contEqnLst, contVarLst, discEqnLst, discVarLst, indxcontEqnLst, indxcontVarLst, indxdiscEqnLst, indxdiscVarLst) := matchcontinue (eqnLst, indxEqnLst, varLst, indxVarLst) - local - list> eqnindxlst; - - case (_, _, _, _) equation - (discVarLst, contVarLst, indxdiscVarLst, indxcontVarLst) = splitVars(varLst, indxVarLst, BackendVariable.isVarDiscrete, {}, {}, {}, {}); - eqnindxlst = List.map1(discVarLst, findDiscreteEquation, (eqnLst, indxEqnLst)); - discEqnLst = List.map(eqnindxlst, Util.tuple21); - indxdiscEqnLst = List.map(eqnindxlst, Util.tuple22); - contEqnLst = List.setDifferenceOnTrue(eqnLst, discEqnLst, BackendEquation.equationEqual); - indxcontEqnLst = List.setDifferenceOnTrue(indxEqnLst, indxdiscEqnLst, intEq); - then (contEqnLst, contVarLst, discEqnLst, discVarLst, indxcontEqnLst, indxcontVarLst, indxdiscEqnLst, indxdiscVarLst); - - case (_, _, _, _) equation - Error.addInternalError(BackendDump.varListString(varLst, "involved variables")); - Error.addInternalError(BackendDump.equationListString(eqnLst, "involved equations")); - then fail(); - end matchcontinue; -end splitMixedEquations; - -protected function splitVars " - Helper function to splitMixedEquations." - input list inList; - input list inListb; - input PredicateFunc inFunc; - input list inTrueList; - input list inFalseList; - input list inTrueListb; - input list inFalseListb; - output list outTrueList; - output list outFalseList; - output list outTrueListb; - output list outFalseListb; - - replaceable type Type_a subtypeof Any; - replaceable type Type_b subtypeof Any; - - partial function PredicateFunc - input Type_a inElement; - output Boolean outResult; - end PredicateFunc; -algorithm - (outTrueList, outFalseList,outTrueListb, outFalseListb) := match(inList, inListb, inFunc, inTrueList, inFalseList, inTrueListb, inFalseListb) - local - Type_a e; - Type_b eb; - list rest_e, tl, fl; - list rest_eb, tlb, flb; - Boolean pred; - - case ({}, {}, _, tl, fl, tlb, flb) - then (listReverse(tl), listReverse(fl),listReverse(tlb), listReverse(flb)); - - case (e :: rest_e,eb :: rest_eb, _, tl, fl, tlb, flb) equation - pred = inFunc(e); - (tl, fl,tlb, flb) = splitVars1(e, rest_e,eb, rest_eb, pred, inFunc, tl, fl, tlb, flb); - then (tl, fl,tlb, flb); - end match; -end splitVars; - -protected function splitVars1 " - Helper function to splitVars." - input Type_a inHead; - input list inRest; - input Type_b inHeadb; - input list inRestb; - input Boolean inPred; - input PredicateFunc inFunc; - input list inTrueList; - input list inFalseList; - input list inTrueListb; - input list inFalseListb; - output list outTrueList; - output list outFalseList; - output list outTrueListb; - output list outFalseListb; - - replaceable type Type_a subtypeof Any; - replaceable type Type_b subtypeof Any; - - partial function PredicateFunc - input Type_a inElement; - output Boolean outResult; - end PredicateFunc; -algorithm - (outTrueList, outFalseList,outTrueListb, outFalseListb) := match(inHead, inRest,inHeadb, inRestb, inPred, inFunc, inTrueList, inFalseList,inTrueListb, inFalseListb) - local - list tl, fl; - list tlb, flb; - - case (_, _, _, _, true, _, tl, fl, tlb, flb) equation - tl = inHead :: tl; - tlb = inHeadb :: tlb; - (tl, fl, tlb, flb) = splitVars(inRest, inRestb, inFunc, tl, fl, tlb, flb); - then (tl, fl, tlb, flb); - - case (_, _, _, _, false, _, tl, fl, tlb, flb) equation - fl = inHead :: fl; - flb = inHeadb :: flb; - (tl, fl, tlb, flb) = splitVars(inRest, inRestb, inFunc, tl, fl, tlb, flb); - then (tl, fl, tlb, flb); - end match; -end splitVars1; - -protected function findDiscreteEquation "help function to splitMixedEquations, finds the discrete equation - on the form v = expr for solving variable v" - input BackendDAE.Var v; - input tuple, list> eqnIndxLst; - output tuple eqnindx; -algorithm - eqnindx := matchcontinue(v, eqnIndxLst) - local - DAE.ComponentRef cr1, cr; - DAE.Exp e2; - Integer i; - BackendDAE.Equation eqn; - list ilst; - list eqnLst; - String errstr; - - case (_, (((eqn as BackendDAE.EQUATION(exp=DAE.CREF(componentRef=cr), scalar=_))::_), i::_)) equation - cr1=BackendVariable.varCref(v); - true = ComponentReference.crefEqualNoStringCompare(cr1, cr); - then ((eqn, i)); - - case(_, (((eqn as BackendDAE.EQUATION(exp=_, scalar=DAE.CREF(componentRef=cr)))::_), i::_)) equation - cr1=BackendVariable.varCref(v); - true = ComponentReference.crefEqualNoStringCompare(cr1, cr); - then ((eqn, i)); - - case(_, (_::eqnLst, _::ilst)) equation - ((eqn, i)) = findDiscreteEquation(v, (eqnLst, ilst)); - then ((eqn, i)); - - else equation - Error.addMessage(Error.INTERNAL_ERROR, {"./Compiler/BackEnd/BackendDAETransform.mo: function findDiscreteEquation failed -Your model contains a mixed system involving algorithms or other complex-equations. -Sorry. Currently are supported only mixed system involving simple equations and boolean variables. -Try to break the loop by using the pre operator."}); - true = Flags.isSet(Flags.FAILTRACE); - Debug.trace("findDiscreteEquation failed, searching for variables: "); - errstr = ComponentReference.printComponentRefStr(BackendVariable.varCref(v)); - Debug.traceln(errstr); - then fail(); - end matchcontinue; -end findDiscreteEquation; - public function tarjanAlgorithm "author: PA This is the second part of the BLT sorting. It takes the variable diff --git a/Compiler/BackEnd/BackendDAEUtil.mo b/Compiler/BackEnd/BackendDAEUtil.mo index e1f5bca89b9..ffa10e5857d 100644 --- a/Compiler/BackEnd/BackendDAEUtil.mo +++ b/Compiler/BackEnd/BackendDAEUtil.mo @@ -7413,11 +7413,6 @@ algorithm arg = traverseBackendDAEExps(bdae, inFunc, inTypeA); then traverseStrongComponentsJacobiansExp(rest, inFunc, arg); - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp)::rest, _, _) - equation - arg = traverseStrongComponentsJacobiansExp({comp}, inFunc, inTypeA); - then - traverseStrongComponentsJacobiansExp(rest, inFunc, arg); case (_::rest, _, _) then traverseStrongComponentsJacobiansExp(rest, inFunc, inTypeA); end matchcontinue; diff --git a/Compiler/BackEnd/BackendDump.mo b/Compiler/BackEnd/BackendDump.mo index bb74579d4b4..ef0201e95b3 100644 --- a/Compiler/BackEnd/BackendDump.mo +++ b/Compiler/BackEnd/BackendDump.mo @@ -944,19 +944,6 @@ algorithm dumpEqnsSolved2(rest,eqns,vars); then (); - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp,disc_eqns=elst,disc_vars=vlst)::rest,_,_) - equation - print("Mixed EquationSystem:\n"); - varlst = List.map1r(vlst, BackendVariable.getVarAt, vars); - printVarList(varlst); - eqnlst = BackendEquation.getEqns(elst,eqns); - printEquationList(eqnlst); - print("\n"); - dumpEqnsSolved2({comp},eqns,vars); - print("\n"); - dumpEqnsSolved2(rest,eqns,vars); - then - (); case (BackendDAE.EQUATIONSYSTEM(eqns=elst,vars=vlst,jac=BackendDAE.FULL_JACOBIAN(jac),jacType=jacType)::rest,_,_) equation print("Equationsystem " +& jacobianTypeStr(jacType) +& ":\n"); @@ -1199,14 +1186,6 @@ algorithm tmpStr = "{" +& s +& ":" +& s2 +& "} Size: " +& intString(listLength(vlst)) +& " " +& jacobianTypeStr(jacType) +& "\n"; then tmpStr; - case BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp,disc_eqns=ilst,disc_vars=vlst) - equation - ls = List.map(ilst, intString); - s = stringDelimitList(ls, ", "); - ls = List.map(vlst, intString); - s2 = stringDelimitList(ls, ", "); - tmpStr = "{{" +& s +& ":" +& s2 +& "},\n" +& printComponent(comp) +& "} Size: " +& intString(listLength(vlst)) +& "\n"; - then tmpStr; case BackendDAE.SINGLEARRAY(eqn=i,vars=vlst) equation ls = List.map(vlst, intString); @@ -1293,17 +1272,6 @@ algorithm s2 = stringAppendList({"{",s,":",s1,"} Size: ",sl," ",sj}); then s2; - case BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp,disc_eqns=ilst,disc_vars=vlst) - equation - ls = List.map(ilst, intString); - s = stringDelimitList(ls, ", "); - ls1 = List.map(vlst, intString); - s1 = stringDelimitList(ls1, ", "); - sl = intString(listLength(ilst)); - sj = strongComponentString(comp); - s2 = stringAppendList({"{{",s,":",s1,"},\n",sj,"} Size: ",sl}); - then - s2; case BackendDAE.SINGLEARRAY(eqn=i,vars=vlst) equation ls = List.map(vlst, intString); @@ -3774,57 +3742,6 @@ algorithm e = listLength(ilst); then ((seq,salg,sarr,sce,swe,sie,(e_jc,e_jt,e_jn,e::e_nj),meqsys,teqsys)); - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.SINGLEEQUATION(eqn=_),disc_eqns=ilst),(seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)) equation - d = listLength(ilst); - then ((seq,salg,sarr,sce,swe,sie,eqsys,(d::m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)); - - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.SINGLEALGORITHM(eqn=_),disc_eqns=ilst),(seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)) equation - d = listLength(ilst); - then ((seq,salg,sarr,sce,swe,sie,eqsys,(m_se,d::m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)); - - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.SINGLECOMPLEXEQUATION(eqn=_),disc_eqns=ilst),(seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)) equation - d = listLength(ilst); - then ((seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,d::m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)); - - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.SINGLEWHENEQUATION(eqn=_),disc_eqns=ilst),(seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)) equation - d = listLength(ilst); - then ((seq,salg,sarr,sce,swe,sie,eqsys,(d::m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)); - - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.EQUATIONSYSTEM(eqns=ilst1,jacType=BackendDAE.JAC_CONSTANT()),disc_eqns=ilst),(seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)) equation - d = listLength(ilst); - e = listLength(ilst1); - then ((seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,(d,e)::me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)); - - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.EQUATIONSYSTEM(eqns=ilst1,jacType=BackendDAE.JAC_LINEAR()),disc_eqns=ilst),(seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)) equation - d = listLength(ilst); - e = listLength(ilst1); - then ((seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,(d,e)::me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)); - - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.EQUATIONSYSTEM(eqns=ilst1,jacType=BackendDAE.JAC_NONLINEAR()),disc_eqns=ilst),(seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)) equation - d = listLength(ilst); - e = listLength(ilst1); - then ((seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,(d,e)::me_jn,me_nj,me_lt,me_nt),teqsys)); - - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.EQUATIONSYSTEM(eqns=ilst1,jacType=BackendDAE.JAC_GENERIC()),disc_eqns=ilst),(seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)) equation - d = listLength(ilst); - e = listLength(ilst1); - then ((seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,(d,e)::me_jn,me_nj,me_lt,me_nt),teqsys)); - - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.EQUATIONSYSTEM(eqns=ilst1,jacType=BackendDAE.JAC_NO_ANALYTIC()),disc_eqns=ilst),(seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)) equation - d = listLength(ilst); - e = listLength(ilst1); - then ((seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,(d,e)::me_nj,me_lt,me_nt),teqsys)); - - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.TORNSYSTEM(tearingvars=_,otherEqnVarTpl=eqnvartpllst,linear=true),disc_eqns=ilst),(seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)) equation - d = listLength(ilst); - e = listLength(eqnvartpllst); - then ((seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,(d,e)::me_lt,me_nt),teqsys)); - - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=BackendDAE.TORNSYSTEM(tearingvars=_,otherEqnVarTpl=eqnvartpllst,linear=false),disc_eqns=ilst),(seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,me_nt),teqsys)) equation - d = listLength(ilst); - e = listLength(eqnvartpllst); - then ((seq,salg,sarr,sce,swe,sie,eqsys,(m_se,m_salg,m_sarr,m_sec,me_jc,me_jt,me_jn,me_nj,me_lt,(d,e)::me_nt),teqsys)); - case (BackendDAE.TORNSYSTEM(tearingvars=ilst,otherEqnVarTpl=eqnvartpllst,linear=true),(seq,salg,sarr,sce,swe,sie,eqsys,meqsys,(te_l,te_nl))) equation d = listLength(ilst); e = listLength(eqnvartpllst); diff --git a/Compiler/BackEnd/HpcOmTaskGraph.mo b/Compiler/BackEnd/HpcOmTaskGraph.mo index 403303ad049..9007b5de627 100644 --- a/Compiler/BackEnd/HpcOmTaskGraph.mo +++ b/Compiler/BackEnd/HpcOmTaskGraph.mo @@ -47,7 +47,6 @@ protected import BackendEquation; protected import BackendVariable; protected import ComponentReference; protected import DAEDump; -protected import DAEUtil; protected import Debug; protected import Expression; protected import ExpressionSolve; @@ -639,13 +638,6 @@ algorithm descLst = desc::iEqDesc; then descLst; - case(BackendDAE.MIXEDEQUATIONSYSTEM(disc_eqns = _), BackendDAE.EQSYSTEM(orderedEqs = orderedEqs),_) - equation - _ = BackendEquation.equationList(orderedEqs); - desc = ("MixedEquation System"); - descLst = desc::iEqDesc; - then - descLst; case(BackendDAE.SINGLEARRAY(eqn = i, vars = vs), BackendDAE.EQSYSTEM(orderedEqs = orderedEqs, orderedVars = orderedVars, matching= BackendDAE.MATCHING(ass2=_)),_) equation //get the equation string @@ -971,11 +963,6 @@ algorithm tmpVars = getUnsolvedVarsBySCC0(component,incidenceMatrix,orderedVars,{varIdx},eventVarLst); then tmpVars; - case(BackendDAE.MIXEDEQUATIONSYSTEM(disc_vars=varIdc),_,_,_) - equation - tmpVars = getUnsolvedVarsBySCC0(component,incidenceMatrix,orderedVars,varIdc,eventVarLst); - then - tmpVars; case(BackendDAE.EQUATIONSYSTEM(vars=varIdc),_,_,_) equation tmpVars = getUnsolvedVarsBySCC0(component,incidenceMatrix,orderedVars,varIdc,eventVarLst); @@ -1186,15 +1173,6 @@ algorithm eqnVars = List.flatten(List.map1(eqns, getVarsByEqn, incidenceMatrix)); then eqnVars; - case (BackendDAE.MIXEDEQUATIONSYSTEM(disc_eqns=eqns, condSystem = condSys),_) - equation - //the when condition is a predecessor of the equation system. the affected equation is in the condSys - eqnVars = List.flatten(List.map1(eqns, getVarsByEqn, incidenceMatrix)); - eqnVarsCond = getVarsBySCC(condSys,incidenceMatrix); - eqnVars = listAppend(eqnVars,eqnVarsCond); - eqnVars = List.unique(eqnVars); - then - eqnVars; case (BackendDAE.SINGLEARRAY(eqn=eqnIdx),_) equation eqnVars = getVarsByEqn(eqnIdx,incidenceMatrix); @@ -1359,14 +1337,6 @@ algorithm tmpeqCompMapping = List.fold3(eqns,updateMappingTuple,iSccIdx,iEqSysIdx,iEqOffset,eqCompMapping); then iSccIdx+1; - case(BackendDAE.MIXEDEQUATIONSYSTEM(condSystem = condSys, disc_vars = compVarIdc, disc_eqns = eqns),_,_,_,(iVarOffset,iEqOffset),_) - equation - tmpvarCompMapping = List.fold3(compVarIdc,updateMappingTuple,iSccIdx,iEqSysIdx,iVarOffset,varCompMapping); - tmpeqCompMapping = List.fold3(eqns,updateMappingTuple,iSccIdx,iEqSysIdx,iEqOffset,eqCompMapping); - //gets the whole equationsystem (necessary for the adjacencyList) - _ = List.fold4({condSys}, getVarEqCompMapping0, tmpvarCompMapping,tmpeqCompMapping, iEqSysIdx, iVarEqOffset, iSccIdx); - then - iSccIdx+1; case(BackendDAE.SINGLEWHENEQUATION(vars = compVarIdc,eqn = eq),_,_,_,(iVarOffset,iEqOffset),_) equation tmpvarCompMapping = List.fold3(compVarIdc,updateMappingTuple,iSccIdx,iEqSysIdx,iVarOffset,varCompMapping); @@ -2417,13 +2387,6 @@ algorithm solvesDiscreteValue = BackendVariable.hasDiscreteVar(backendVars); eqn = List.first(eqns); then (solvesDiscreteValue,eqn); - case(BackendDAE.MIXEDEQUATIONSYSTEM(disc_vars=vars,disc_eqns=eqns),_) - equation - //print("Vars of mixed equation system (" +& intString(List.first(eqns)) +& "):" +& stringDelimitList(List.map(vars, intString), ",") +& "\n"); - backendVars = List.map1r(vars, BackendVariable.getVarAt, iOrderedVars); - solvesDiscreteValue = BackendVariable.hasDiscreteVar(backendVars); - eqn = List.first(eqns); - then (solvesDiscreteValue,eqn); case(BackendDAE.SINGLEARRAY(vars=vars,eqn=eqn),_) equation //print("Vars of single array: " +& stringDelimitList(List.map(vars, intString), ",") +& "\n"); diff --git a/Compiler/BackEnd/Initialization.mo b/Compiler/BackEnd/Initialization.mo index de82c81fe82..1a5c9c269a2 100644 --- a/Compiler/BackEnd/Initialization.mo +++ b/Compiler/BackEnd/Initialization.mo @@ -708,15 +708,6 @@ algorithm case ({}, _) then false; - case (BackendDAE.MIXEDEQUATIONSYSTEM(disc_vars=vlst)::rest, _) equation - varlst = List.map1r(vlst, BackendVariable.getVarAt, inVars); - varlst = filterVarsWithoutStartValue(varlst); - false = List.isEmpty(varlst); - - Debug.fcall(Flags.INITIALIZATION, Error.addCompilerWarning, "Iteration variables with default zero start attribute in mixed equation system:\n" +& warnAboutVars2(varlst)); - _ = warnAboutIterationVariablesWithDefaultZeroStartAttribute2(rest, inVars); - then true; - case (BackendDAE.EQUATIONSYSTEM(vars=vlst, jacType=BackendDAE.JAC_NONLINEAR())::rest, _) equation varlst = List.map1r(vlst, BackendVariable.getVarAt, inVars); varlst = filterVarsWithoutStartValue(varlst); diff --git a/Compiler/BackEnd/OnRelaxation.mo b/Compiler/BackEnd/OnRelaxation.mo index 11f79fc2342..639918ebb77 100644 --- a/Compiler/BackEnd/OnRelaxation.mo +++ b/Compiler/BackEnd/OnRelaxation.mo @@ -402,12 +402,6 @@ algorithm (syst,shared,_) = relaxSystem1(syst,shared,comps); then (syst,shared,true); - case (_,_,(BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp1))::comps) - equation - (syst,shared,b) = relaxSystem1(isyst,ishared,{comp1}); - (syst,shared,b1) = relaxSystem1(syst,shared,comps); - then - (syst,shared,b1 or b); case (_,_,_::comps) equation (syst,shared,b) = relaxSystem1(isyst,ishared,comps); diff --git a/Compiler/BackEnd/RemoveSimpleEquations.mo b/Compiler/BackEnd/RemoveSimpleEquations.mo index 3d136429036..b23d591f692 100644 --- a/Compiler/BackEnd/RemoveSimpleEquations.mo +++ b/Compiler/BackEnd/RemoveSimpleEquations.mo @@ -52,7 +52,6 @@ public import BackendDAE; public import DAE; public import FCore; -protected import BackendDAETransform; protected import BackendDAEUtil; protected import BackendDump; protected import BackendEquation; @@ -439,16 +438,6 @@ algorithm arg = inFunc({eqn}, inTypeA); then traverseComponents(rest, iEqns, inFunc, arg); - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp, disc_eqns=elst)::rest, _, _, _) - equation - // collect alle equations - eqnlst = BackendEquation.getEqns(elst, iEqns); - (elst, _) = BackendDAETransform.getEquationAndSolvedVarIndxes(comp); - eqnlst1 = BackendEquation.getEqns(elst, iEqns); - eqnlst = listAppend(eqnlst, eqnlst1); - arg = inFunc(eqnlst, inTypeA); - then - traverseComponents(rest, iEqns, inFunc, arg); case (BackendDAE.EQUATIONSYSTEM(eqns=elst)::rest, _, _, _) equation eqnlst = BackendEquation.getEqns(elst, iEqns); diff --git a/Compiler/BackEnd/SimCodeUtil.mo b/Compiler/BackEnd/SimCodeUtil.mo index 16aa092640b..79d02296a77 100644 --- a/Compiler/BackEnd/SimCodeUtil.mo +++ b/Compiler/BackEnd/SimCodeUtil.mo @@ -3868,34 +3868,7 @@ algorithm BackendDAE.ExtraInfo ei; BackendDAE.Jacobian jacobian; SimCode.BackendMapping tmpBackendMapping; - - // MIXEDEQUATIONSYSTEM: mixed system of equations, continuous part only - case (false, _, syst, shared, BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp1), _, _, _, _, _) equation - Debug.fprintln(Flags.FAILTRACE, "./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem create mixed system continuous part."); - (_, noDiscequations_, uniqueEqIndex, tempvars) = createEquations(true, false, false, skipDiscInAlgorithm, syst, shared, {comp1}, iuniqueEqIndex, itempvars); - tmpEqSccMapping = List.fold1(List.intRange2(iuniqueEqIndex, uniqueEqIndex - 1), appendSccIdx, isccIndex, ieqSccMapping); - tmpBackendMapping = iBackendMapping; - then ({}, noDiscequations_, uniqueEqIndex, tempvars, tmpEqSccMapping, tmpBackendMapping); - - // MIXEDEQUATIONSYSTEM: mixed system of equations, both continous and discrete eqns - case (true, _, syst as BackendDAE.EQSYSTEM(orderedVars=vars, - orderedEqs=eqns), shared as BackendDAE.SHARED(knownVars=knvars), BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp1, - disc_eqns=ieqns, - disc_vars=ivars), _, _, _, _, _) equation - Debug.fprintln(Flags.FAILTRACE, "./Compiler/BackEnd/SimCodeUtil.mo: function createOdeSystem create mixed system."); - // print("\ncreateOdeSystem -> Mixed: cont. and discrete\n"); - // BackendDump.printEquations(block_, dlow); - disc_eqn = BackendEquation.getEqns(ieqns, eqns); - disc_var = List.map1r(ivars, BackendVariable.getVarAt, vars); - (_, {equation_}, uniqueEqIndex, tempvars) = createEquations(true, false, false, skipDiscInAlgorithm, syst, shared, {comp1}, iuniqueEqIndex, itempvars); - simVarsDisc = List.map2(disc_var, dlowvarToSimvar, NONE(), knvars); - uniqueEqIndexMapping = uniqueEqIndex; - (discEqs,uniqueEqIndex) = extractDiscEqs(disc_eqn, disc_var, uniqueEqIndex); - tmpEqSccMapping = List.fold1(List.intRange2(iuniqueEqIndex, uniqueEqIndexMapping - 1), appendSccIdx, isccIndex, ieqSccMapping); - // was madness - tmpBackendMapping = iBackendMapping; - then ({SimCode.SES_MIXED(uniqueEqIndex, equation_, simVarsDisc, discEqs, 0)}, {equation_}, uniqueEqIndex+1, tempvars, tmpEqSccMapping, tmpBackendMapping); - + // EQUATIONSYSTEM: continuous system of equations case (_, _, BackendDAE.EQSYSTEM(orderedVars=vars, orderedEqs=eqns), BackendDAE.SHARED(knownVars=knvars, diff --git a/Compiler/BackEnd/Tearing.mo b/Compiler/BackEnd/Tearing.mo index c8982062efe..c50db67367f 100644 --- a/Compiler/BackEnd/Tearing.mo +++ b/Compiler/BackEnd/Tearing.mo @@ -254,22 +254,6 @@ algorithm (comp1, true) = callTearingMethod(inMethod, isyst, ishared, eindex, vindx, ojac, jacType); then (comp1, true); - // only continues part of a mixed system - case ((BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp1, disc_eqns=eindex, disc_vars=vindx)), _, _, _) equation - Debug.fcall(Flags.TEARING_DUMP, print, "\nCase mixed in traverseComponents\nUse '+d=tearingdumpV' for more details\n\n"); - false = Flags.isSet(Flags.MIXED_TEARING); - Debug.fcall(Flags.TEARING_DUMP, print, "Flag 'MixedTearing' is not set\n(disabled by user)\n\n"); - (comp1, true) = traverseComponents1(comp1, isyst, ishared, inMethod); - then (BackendDAE.MIXEDEQUATIONSYSTEM(comp1, eindex, vindx), true); - - // mixed and continues part - case ((comp as BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp1, disc_eqns=eindex, disc_vars=vindx)), _, _, _) equation - true = Flags.isSet(Flags.MIXED_TEARING); - Debug.fcall(Flags.TEARING_DUMP, print, "Flag 'MixedTearing' is set\n(enabled by default)\n\n"); - (eindex, vindx) = BackendDAETransform.getEquationAndSolvedVarIndxes(comp); - (comp1, true) = callTearingMethod(inMethod, isyst, ishared, eindex, vindx, NONE(), BackendDAE.JAC_NO_ANALYTIC()); - then (comp1, true); - // no component for tearing else (inComp, false); end matchcontinue; diff --git a/Compiler/BackEnd/XMLDump.mo b/Compiler/BackEnd/XMLDump.mo index fbf562ab761..7c622fbfa46 100644 --- a/Compiler/BackEnd/XMLDump.mo +++ b/Compiler/BackEnd/XMLDump.mo @@ -1206,15 +1206,6 @@ algorithm result = getOrderedEqs2(rest,eqns,vars,result); then result; - case (BackendDAE.MIXEDEQUATIONSYSTEM(condSystem=comp,disc_eqns=elst,disc_vars=vlst)::rest,_,_,_) - equation - varlst = List.map1r(vlst, BackendVariable.getVarAt, vars); - eqnlst = BackendEquation.getEqns(elst,eqns); - result = listAppend(inAccum,{(eqnlst,varlst)}); - result = getOrderedEqs2({comp},eqns,vars,result); - result = getOrderedEqs2(rest,eqns,vars,result); - then - result; case (BackendDAE.EQUATIONSYSTEM(eqns=elst,vars=vlst)::rest,_,_,_) equation varlst = List.map1r(vlst, BackendVariable.getVarAt, vars); diff --git a/Compiler/Template/GraphvizDumpTV.mo b/Compiler/Template/GraphvizDumpTV.mo index af4642996ef..87e6432379f 100644 --- a/Compiler/Template/GraphvizDumpTV.mo +++ b/Compiler/Template/GraphvizDumpTV.mo @@ -98,12 +98,6 @@ interface package GraphvizDumpTV JacobianType jacType; end EQUATIONSYSTEM; - record MIXEDEQUATIONSYSTEM - StrongComponent condSystem; - list disc_eqns; - list disc_vars; - end MIXEDEQUATIONSYSTEM; - record SINGLEARRAY Integer eqn; list vars "be carefule with states, this are solved for der(x)"; diff --git a/Compiler/Util/Flags.mo b/Compiler/Util/Flags.mo index 0fd5620a06a..559f9ec6eed 100644 --- a/Compiler/Util/Flags.mo +++ b/Compiler/Util/Flags.mo @@ -320,96 +320,93 @@ constant DebugFlag UNCERTAINTIES = DEBUG_FLAG(77, "uncertainties", false, Util.gettext("Enables dumping of status when calling modelEquationsUC.")); constant DebugFlag SHOW_START_ORIGIN = DEBUG_FLAG(78, "showStartOrigin", false, Util.gettext("Enables dumping of the DAE startOrigin attribute of the variables.")); -// The flags mixedTearing are only needed as long tearing of mixed system in not default. -constant DebugFlag MIXED_TEARING = DEBUG_FLAG(79, "MixedTearing", true, - Util.gettext("Disables tearing of mixed system.")); -constant DebugFlag LINEAR_TEARING = DEBUG_FLAG(80, "doLinearTearing", true, +constant DebugFlag LINEAR_TEARING = DEBUG_FLAG(79, "doLinearTearing", true, Util.gettext("Enables tearing of linear systems, but for now they aren't handled efficent in the runtime.")); -constant DebugFlag DUMP_INITIAL_SYSTEM = DEBUG_FLAG(81, "dumpinitialsystem", false, +constant DebugFlag DUMP_INITIAL_SYSTEM = DEBUG_FLAG(80, "dumpinitialsystem", false, Util.gettext("Dumps the initial equation system.")); -constant DebugFlag GRAPH_INST = DEBUG_FLAG(82, "graphInst", false, +constant DebugFlag GRAPH_INST = DEBUG_FLAG(81, "graphInst", false, Util.gettext("Do graph based instantation.")); -constant DebugFlag GRAPH_INST_RUN_DEP = DEBUG_FLAG(83, "graphInstRunDep", false, +constant DebugFlag GRAPH_INST_RUN_DEP = DEBUG_FLAG(82, "graphInstRunDep", false, Util.gettext("Run scode dependency analysis. Use with +d=graphInst")); -constant DebugFlag GRAPH_INST_GEN_GRAPH = DEBUG_FLAG(84, "graphInstGenGraph", false, +constant DebugFlag GRAPH_INST_GEN_GRAPH = DEBUG_FLAG(83, "graphInstGenGraph", false, Util.gettext("Dumps a graph of the program. Use with +d=graphInst")); -constant DebugFlag GRAPH_INST_SHOW_GRAPH = DEBUG_FLAG(85, "graphInstShowGraph", false, +constant DebugFlag GRAPH_INST_SHOW_GRAPH = DEBUG_FLAG(84, "graphInstShowGraph", false, Util.gettext("Diplay a graph of the program interactively. Use with +d=graphInst")); -constant DebugFlag DUMP_CONST_REPL = DEBUG_FLAG(86, "dumpConstrepl", false, +constant DebugFlag DUMP_CONST_REPL = DEBUG_FLAG(85, "dumpConstrepl", false, Util.gettext("Dump the found replacements for constants.")); -constant DebugFlag PEDANTIC = DEBUG_FLAG(87, "pedantic", false, +constant DebugFlag PEDANTIC = DEBUG_FLAG(86, "pedantic", false, Util.gettext("Switch into pedantic debug-mode, to get much more feedback.")); -constant DebugFlag SHOW_EQUATION_SOURCE = DEBUG_FLAG(88, "showEquationSource", false, +constant DebugFlag SHOW_EQUATION_SOURCE = DEBUG_FLAG(87, "showEquationSource", false, Util.gettext("Display the element source information in the dumped DAE for easier debugging.")); -constant DebugFlag NLS_ANALYTIC_JACOBIAN = DEBUG_FLAG(89, "NLSanalyticJacobian", false, +constant DebugFlag NLS_ANALYTIC_JACOBIAN = DEBUG_FLAG(88, "NLSanalyticJacobian", false, Util.gettext("Generates analytical Jacobian for non-linear algebraic loops.")); -constant DebugFlag INLINE_SOLVER = DEBUG_FLAG(90, "inlineSolver", false, +constant DebugFlag INLINE_SOLVER = DEBUG_FLAG(89, "inlineSolver", false, Util.gettext("Generates code for inline solver.")); -constant DebugFlag HPCOM = DEBUG_FLAG(91, "hpcom", false, +constant DebugFlag HPCOM = DEBUG_FLAG(90, "hpcom", false, Util.gettext("Enables parallel calculation based on task-graphs.")); -constant DebugFlag INITIALIZATION = DEBUG_FLAG(92, "initialization", false, +constant DebugFlag INITIALIZATION = DEBUG_FLAG(91, "initialization", false, Util.gettext("Shows additional information from the initialization process.")); -constant DebugFlag INLINE_FUNCTIONS = DEBUG_FLAG(93, "inlineFunctions", true, +constant DebugFlag INLINE_FUNCTIONS = DEBUG_FLAG(92, "inlineFunctions", true, Util.gettext("Controls if function inlining should be performed.")); -constant DebugFlag DUMP_SCC_GRAPHML = DEBUG_FLAG(94, "dumpSCCGraphML", false, +constant DebugFlag DUMP_SCC_GRAPHML = DEBUG_FLAG(93, "dumpSCCGraphML", false, Util.gettext("Dumps graphml files with the strongly connected components.")); -constant DebugFlag TEARING_DUMPVERBOSE = DEBUG_FLAG(95, "tearingdumpV", false, +constant DebugFlag TEARING_DUMPVERBOSE = DEBUG_FLAG(94, "tearingdumpV", false, Util.gettext("Dumps verbose tearing information.")); -constant DebugFlag DISABLE_SINGLE_FLOW_EQ = DEBUG_FLAG(96, "disableSingleFlowEq", false, +constant DebugFlag DISABLE_SINGLE_FLOW_EQ = DEBUG_FLAG(95, "disableSingleFlowEq", false, Util.gettext("Disables the generation of single flow equations.")); -constant DebugFlag PARTLINTORNSYSTEM = DEBUG_FLAG(97, "partlintornsystem", false, +constant DebugFlag PARTLINTORNSYSTEM = DEBUG_FLAG(96, "partlintornsystem", false, Util.gettext("Disassembles linear torn systems to various singleEquations and a reduced tornSystem.")); -constant DebugFlag DUMP_DISCRETEVARS_INFO = DEBUG_FLAG(98, "discreteinfo", false, +constant DebugFlag DUMP_DISCRETEVARS_INFO = DEBUG_FLAG(97, "discreteinfo", false, Util.gettext("Enables dumping of discrete variables. Extends +d=backenddaeinfo.")); -constant DebugFlag ADDITIONAL_GRAPHVIZ_DUMP = DEBUG_FLAG(99, "graphvizDump", false, +constant DebugFlag ADDITIONAL_GRAPHVIZ_DUMP = DEBUG_FLAG(98, "graphvizDump", false, Util.gettext("Activates additional graphviz dumps (as *.dot files). It can be used in addition to one of the following flags: {dumpdaelow|dumpinitialsystems|dumpindxdae}.")); -constant DebugFlag INFO_XML_OPERATIONS = DEBUG_FLAG(100, "infoXmlOperations", false, +constant DebugFlag INFO_XML_OPERATIONS = DEBUG_FLAG(99, "infoXmlOperations", false, Util.gettext("Enables output of the operations in the _info.xml file when translating models.")); -constant DebugFlag HPCOM_DUMP = DEBUG_FLAG(101, "hpcomDump", false, +constant DebugFlag HPCOM_DUMP = DEBUG_FLAG(100, "hpcomDump", false, Util.gettext("Dumps additional information on the parallel execution with hpcom.")); -constant DebugFlag RESOLVE_LOOPS = DEBUG_FLAG(102, "resolveLoops", false, +constant DebugFlag RESOLVE_LOOPS = DEBUG_FLAG(101, "resolveLoops", false, Util.gettext("Activates the resolveLoops module.")); -constant DebugFlag DISABLE_WINDOWS_PATH_CHECK_WARNING = DEBUG_FLAG(103, "disableWindowsPathCheckWarning", false, +constant DebugFlag DISABLE_WINDOWS_PATH_CHECK_WARNING = DEBUG_FLAG(102, "disableWindowsPathCheckWarning", false, Util.gettext("Disables warnings on Windows if OPENMODELICAHOME/MinGW is missing.")); -constant DebugFlag DISABLE_RECORD_CONSTRUCTOR_OUTPUT = DEBUG_FLAG(104, "disableRecordConstructorOutput", false, +constant DebugFlag DISABLE_RECORD_CONSTRUCTOR_OUTPUT = DEBUG_FLAG(103, "disableRecordConstructorOutput", false, Util.gettext("Disables output of record constructors in the flat code.")); -constant DebugFlag DUMP_TRANSFORMED_MODELICA_MODEL = DEBUG_FLAG(105, "dumpTransformedModelica", false, +constant DebugFlag DUMP_TRANSFORMED_MODELICA_MODEL = DEBUG_FLAG(104, "dumpTransformedModelica", false, Util.gettext("Dumps the back-end DAE to a Modelica-like model after all symbolic transformations are applied.")); -constant DebugFlag EVALUATE_CONST_FUNCTIONS = DEBUG_FLAG(106, "evalConstFuncs", true, +constant DebugFlag EVALUATE_CONST_FUNCTIONS = DEBUG_FLAG(105, "evalConstFuncs", true, Util.gettext("Evaluates functions complete and partially and checks for constant output.")); -constant DebugFlag HPCOM_ANALYZATION_MODE = DEBUG_FLAG(107, "hpcomAnalyzationMode", false, +constant DebugFlag HPCOM_ANALYZATION_MODE = DEBUG_FLAG(106, "hpcomAnalyzationMode", false, Util.gettext("Creates statically linked c++ - code for analyzation (requires statically build cpp-runtime)")); -constant DebugFlag STRICT_RML = DEBUG_FLAG(108, "strictRml", false, +constant DebugFlag STRICT_RML = DEBUG_FLAG(107, "strictRml", false, Util.gettext("Turns on extra RML checks.")); -constant DebugFlag IMPL_ODE = DEBUG_FLAG(109, "implOde", false, +constant DebugFlag IMPL_ODE = DEBUG_FLAG(108, "implOde", false, Util.gettext("activates implicit codegen")); -constant DebugFlag EVAL_FUNC_DUMP = DEBUG_FLAG(110, "evalFuncDump", false, +constant DebugFlag EVAL_FUNC_DUMP = DEBUG_FLAG(109, "evalFuncDump", false, Util.gettext("dumps debug information about the function evaluation")); -constant DebugFlag PRINT_STRUCTURAL = DEBUG_FLAG(111, "printStructuralParameters", false, +constant DebugFlag PRINT_STRUCTURAL = DEBUG_FLAG(110, "printStructuralParameters", false, Util.gettext("Prints the structural parameters identified by the front-end")); -constant DebugFlag ITERATION_VARS = DEBUG_FLAG(112, "iterationVars", false, +constant DebugFlag ITERATION_VARS = DEBUG_FLAG(111, "iterationVars", false, Util.gettext("Shows a list of all iteration variables.")); -constant DebugFlag ALLOW_RECORD_TOO_MANY_FIELDS = DEBUG_FLAG(113, "acceptTooManyFields", false, +constant DebugFlag ALLOW_RECORD_TOO_MANY_FIELDS = DEBUG_FLAG(112, "acceptTooManyFields", false, Util.gettext("Accepts passing records with more fields than expected to a function. This is not allowed, but is used in Fluid.Dissipation. See https://trac.modelica.org/Modelica/ticket/1245 for details.")); -constant DebugFlag HPCOM_MEMORY_OPT = DEBUG_FLAG(114, "hpcomMemoryOpt", false, +constant DebugFlag HPCOM_MEMORY_OPT = DEBUG_FLAG(113, "hpcomMemoryOpt", false, Util.gettext("Optimize the memory structure regarding the selected scheduler")); -constant DebugFlag DUMP_SYNCHRONOUS = DEBUG_FLAG(115, "dumpSynchronous", false, +constant DebugFlag DUMP_SYNCHRONOUS = DEBUG_FLAG(114, "dumpSynchronous", false, Util.gettext("Dumps information of the clock partitioning.")); -constant DebugFlag STRIP_PREFIX = DEBUG_FLAG(116, "stripPrefix", true, +constant DebugFlag STRIP_PREFIX = DEBUG_FLAG(115, "stripPrefix", true, Util.gettext("Strips the environment prefix from path/crefs. Defaults to true.")); -constant DebugFlag DO_SCODE_DEP = DEBUG_FLAG(117, "doSCodeDep", true, +constant DebugFlag DO_SCODE_DEP = DEBUG_FLAG(116, "doSCodeDep", true, Util.gettext("Does scode dependency analysis prior to instantiation. Defaults to true.")); -constant DebugFlag SHOW_INST_CACHE_INFO = DEBUG_FLAG(118, "showInstCacheInfo", false, +constant DebugFlag SHOW_INST_CACHE_INFO = DEBUG_FLAG(117, "showInstCacheInfo", false, Util.gettext("Prints information about instantiation cache hits and additions. Defaults to false.")); -constant DebugFlag DUMP_UNIT = DEBUG_FLAG(119, "dumpUnits", false, +constant DebugFlag DUMP_UNIT = DEBUG_FLAG(118, "dumpUnits", false, Util.gettext("Dumps all the calculated units.")); -constant DebugFlag DUMP_EQ_UNIT = DEBUG_FLAG(120, "dumpEqInUC", false, +constant DebugFlag DUMP_EQ_UNIT = DEBUG_FLAG(119, "dumpEqInUC", false, Util.gettext("Dumps all equations handled by the unit checker.")); -constant DebugFlag DUMP_EQ_UNIT_STRUCT = DEBUG_FLAG(121, "dumpEqUCStruct", false, +constant DebugFlag DUMP_EQ_UNIT_STRUCT = DEBUG_FLAG(120, "dumpEqUCStruct", false, Util.gettext("Dumps all the equations handled by the unit checker as tree-structure.")); -constant DebugFlag SHOW_DAE_GENERATION = DEBUG_FLAG(122, "showDaeGeneration", false, +constant DebugFlag SHOW_DAE_GENERATION = DEBUG_FLAG(121, "showDaeGeneration", false, Util.gettext("Show the dae variable declarations as they happen.")); -constant DebugFlag RESHUFFLE_POST = DEBUG_FLAG(123, "reshufflePost", false, +constant DebugFlag RESHUFFLE_POST = DEBUG_FLAG(122, "reshufflePost", false, Util.gettext("Reshuffles the systems of equations.")); @@ -496,7 +493,6 @@ constant list allDebugFlags = { SEMILINEAR, UNCERTAINTIES, SHOW_START_ORIGIN, - MIXED_TEARING, LINEAR_TEARING, DUMP_INITIAL_SYSTEM, GRAPH_INST,