Skip to content

Commit

Permalink
- revert changes to Compiler/BackEnd/Uncertainties.mo from r18258 as …
Browse files Browse the repository at this point in the history
…they break some tests.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@18259 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 23, 2013
1 parent 421c1e8 commit c370157
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Compiler/BackEnd/Uncertainties.mo
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ algorithm

//(dlow_1 as BackendDAE.DAE(BackendDAE.EQSYSTEM(orderedVars=allVars,orderedEqs=allEqs,m=SOME(m),mT=SOME(mt))::eqsyslist,_)) = BackendDAEUtil.mapEqSystem(dlow_1,BackendDAEUtil.getIncidenceMatrixScalarfromOptionForMapEqSystem);

true = List.isEmpty(eqsyslist);
true = intEq(0,listLength(eqsyslist));
mExt=getExtIncidenceMatrix(m);

//dumpExtIncidenceMatrix(mExt);
Expand Down Expand Up @@ -208,7 +208,7 @@ algorithm

(setC,removed_equations_squared)=getEquationsForKnownsSystem(mExt,knowns,unknowns,setS,allEqs,allVars,sharedVars,mapIncRowEqn);

print(Util.if_(List.isNotEmpty(removed_equations_squared),"Warning: the system is ill-posed. One or more equations have been removed from squared system of knowns.\n",""));
print(Util.if_(listLength(removed_equations_squared)>0,"Warning: the system is ill-posed. One or more equations have been removed from squared system of knowns.\n",""));
printSep(getMathematicaText("Equations removed from squared blocks (with more than one equation)"));
printSep(equationsToMathematicaGrid(removed_equations_squared,allEqs,allVars,sharedVars,mapIncRowEqn));

Expand Down Expand Up @@ -728,7 +728,7 @@ algorithm
//print("Cleaning up system of knowns..");
knownsSystem = removeEquations(m,setS);
knownsSystem = removeUnrelatedEquations(knownsSystem,knowns);
true = List.isEmpty(knownsSystem);
true=intEq(listLength(knownsSystem),0);
print("Warning: The system is ill-posed. There are no remaining equations containing the knowns.\n");
then
({},{});
Expand Down Expand Up @@ -1228,12 +1228,12 @@ mOut:=matchcontinue(m,set,acc)
case((eq,vars)::t,_,_)
equation
newVars = List.filter1OnTrue(vars,removeVarsNotInSet_helper,set);
true = List.isEmpty(newVars);
true = intEq(listLength(newVars),0);
then removeVarsNotInSet(t,set,acc);
case((eq,vars)::t,_,_)
equation
newVars = List.filter1OnTrue(vars,removeVarsNotInSet_helper,set);
false = List.isNotEmpty(newVars);
false = intEq(listLength(newVars),0);
then removeVarsNotInSet(t,set,(eq,newVars)::acc);
end matchcontinue;
end removeVarsNotInSet;
Expand Down Expand Up @@ -1331,15 +1331,15 @@ algorithm
then ();
case(_,h::t,_)
equation
true=List.isEmpty(removeUnrelatedEquations(m,{h}));
true=intEq(listLength(removeUnrelatedEquations(m,{h})),0);
not_found_var=BackendVariable.getVarAt(variables,h);
str = ComponentReference.crefStr(BackendVariable.varCref(not_found_var));
print("Warning: The variable '"+&str+&"' was not found in the system of knowns\n");
checkSystemContainsVars(m,t,variables);
then ();
case(_,h::t,_)
equation
false=List.isEmpty(removeUnrelatedEquations(m,{h}));
false=intEq(listLength(removeUnrelatedEquations(m,{h})),0);
checkSystemContainsVars(m,t,variables);
then ();
end matchcontinue;
Expand Down Expand Up @@ -1583,7 +1583,7 @@ protected function containsAny
protected list<Integer> m3;
algorithm
m3:=List.intersectionOnTrue(m1,m2,intEq);
out:=List.isNotEmpty(m3);
out:=listLength(m3)>0;
end containsAny;

protected function containsAll
Expand Down

0 comments on commit c370157

Please sign in to comment.