@@ -1773,14 +1773,20 @@ algorithm
17731773 nfreeStates = listLength(varlst);
17741774 // do state selection of that level
17751775 (dummyVars,stateSets) = selectStatesWork1(nfreeStates,varlst,neqns,eqnslst,level,inSystem,inShared,so,iMapEqnIncRow,iMapIncRowEqn,hov,{},{});
1776- // if Flags.getConfigBool(Flags.DSIABLE_DSS) and neqns < nfreeStates then
1777- // nfreeStates = neqns;
1778- // end if;
17791776 // get derivatives one order less
17801777 lov = List . fold3(iHov, getlowerOrderDerivatives, level, so, vars, {});
17811778 // remove DummyStates DER.x from States with v_d>1 with unkown derivative dummyVars
17821779 repl = HashTable2 . emptyHashTable();
17831780 (dummyVars,repl) = removeFirstOrderDerivatives(dummyVars,vars,so,repl);
1781+ if Flags . getConfigBool(Flags . DSIABLE_DSS ) and neqns < nfreeStates then
1782+ stateSets = {};
1783+ nfreeStates = neqns;
1784+ // print("BEFORE:\n");
1785+ // BackendDump.printVarList(dummyVars);
1786+ (dummyVars,_) = List . split(listReverse(dummyVars), neqns);
1787+ // print("AFTER:\n");
1788+ // BackendDump.printVarList(dummyVars);
1789+ end if ;
17841790 nv = BackendVariable . varsSize(vars);
17851791 ne = BackendDAEUtil . systemSize(inSystem);
17861792 // add the original equations to the systems
@@ -2064,14 +2070,6 @@ algorithm
20642070 (vlst,_,stateSets) = processComps4New(comps,nv,ne,vars,eqns,m,mT,mapEqnIncRow,mapIncRowEqn,vec2,vec1,level,inShared,{},{},iStateSets);
20652071 vlst = List . select(vlst, BackendVariable . isStateVar);
20662072 dummyVars = listAppend(dummyVars,vlst);
2067- // if Flags.getConfigBool(Flags.DSIABLE_DSS) and neqns < nfreeStates then
2068- // print("BEFORE:\n");
2069- // BackendDump.printVarList(dummyVars);
2070- // (dummyVars,_) = List.split(dummyVars, neqns);
2071- // (stateSets,_) = List.split(stateSets, neqns);
2072- // print("AFTER:\n");
2073- // BackendDump.printVarList(dummyVars);
2074- // end if;
20752073 then
20762074 (dummyVars,stateSets);
20772075 // to much equations this is an error
@@ -2510,7 +2508,6 @@ algorithm
25102508 dummyStates := List . map(varlst,BackendVariable . varCref);
25112509 outDummyStates := listAppend(outDummyStates,dummyStates);
25122510 outDummyVars := listAppend(varlst, outDummyVars);
2513-
25142511 end if ;
25152512 end for ;
25162513
0 commit comments