Skip to content

Commit

Permalink
cosmetic change
Browse files Browse the repository at this point in the history
  • Loading branch information
vruge authored and OpenModelica-Hudson committed Jun 1, 2015
1 parent 2678ace commit dd0e9a6
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions Compiler/BackEnd/IndexReduction.mo
Expand Up @@ -1773,14 +1773,20 @@ algorithm
nfreeStates = listLength(varlst);
// do state selection of that level
(dummyVars,stateSets) = selectStatesWork1(nfreeStates,varlst,neqns,eqnslst,level,inSystem,inShared,so,iMapEqnIncRow,iMapIncRowEqn,hov,{},{});
//if Flags.getConfigBool(Flags.DSIABLE_DSS) and neqns < nfreeStates then
// nfreeStates = neqns;
//end if;
// get derivatives one order less
lov = List.fold3(iHov, getlowerOrderDerivatives, level, so, vars, {});
// remove DummyStates DER.x from States with v_d>1 with unkown derivative dummyVars
repl = HashTable2.emptyHashTable();
(dummyVars,repl) = removeFirstOrderDerivatives(dummyVars,vars,so,repl);
if Flags.getConfigBool(Flags.DSIABLE_DSS) and neqns < nfreeStates then
stateSets = {};
nfreeStates = neqns;
//print("BEFORE:\n");
//BackendDump.printVarList(dummyVars);
(dummyVars,_) = List.split(listReverse(dummyVars), neqns);
//print("AFTER:\n");
//BackendDump.printVarList(dummyVars);
end if;
nv = BackendVariable.varsSize(vars);
ne = BackendDAEUtil.systemSize(inSystem);
// add the original equations to the systems
Expand Down Expand Up @@ -2064,14 +2070,6 @@ algorithm
(vlst,_,stateSets) = processComps4New(comps,nv,ne,vars,eqns,m,mT,mapEqnIncRow,mapIncRowEqn,vec2,vec1,level,inShared,{},{},iStateSets);
vlst = List.select(vlst, BackendVariable.isStateVar);
dummyVars = listAppend(dummyVars,vlst);
//if Flags.getConfigBool(Flags.DSIABLE_DSS) and neqns < nfreeStates then
//print("BEFORE:\n");
//BackendDump.printVarList(dummyVars);
//(dummyVars,_) = List.split(dummyVars, neqns);
//(stateSets,_) = List.split(stateSets, neqns);
//print("AFTER:\n");
//BackendDump.printVarList(dummyVars);
//end if;
then
(dummyVars,stateSets);
// to much equations this is an error
Expand Down Expand Up @@ -2510,7 +2508,6 @@ algorithm
dummyStates := List.map(varlst,BackendVariable.varCref);
outDummyStates := listAppend(outDummyStates,dummyStates);
outDummyVars := listAppend(varlst, outDummyVars);

end if;
end for;

Expand Down

0 comments on commit dd0e9a6

Please sign in to comment.