Skip to content

Commit c370157

Browse files
committed
- revert changes to Compiler/BackEnd/Uncertainties.mo from r18258 as they break some tests.
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@18259 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 421c1e8 commit c370157

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Compiler/BackEnd/Uncertainties.mo

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ algorithm
122122

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

125-
true = List.isEmpty(eqsyslist);
125+
true = intEq(0,listLength(eqsyslist));
126126
mExt=getExtIncidenceMatrix(m);
127127

128128
//dumpExtIncidenceMatrix(mExt);
@@ -208,7 +208,7 @@ algorithm
208208

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

211-
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",""));
211+
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",""));
212212
printSep(getMathematicaText("Equations removed from squared blocks (with more than one equation)"));
213213
printSep(equationsToMathematicaGrid(removed_equations_squared,allEqs,allVars,sharedVars,mapIncRowEqn));
214214

@@ -728,7 +728,7 @@ algorithm
728728
//print("Cleaning up system of knowns..");
729729
knownsSystem = removeEquations(m,setS);
730730
knownsSystem = removeUnrelatedEquations(knownsSystem,knowns);
731-
true = List.isEmpty(knownsSystem);
731+
true=intEq(listLength(knownsSystem),0);
732732
print("Warning: The system is ill-posed. There are no remaining equations containing the knowns.\n");
733733
then
734734
({},{});
@@ -1228,12 +1228,12 @@ mOut:=matchcontinue(m,set,acc)
12281228
case((eq,vars)::t,_,_)
12291229
equation
12301230
newVars = List.filter1OnTrue(vars,removeVarsNotInSet_helper,set);
1231-
true = List.isEmpty(newVars);
1231+
true = intEq(listLength(newVars),0);
12321232
then removeVarsNotInSet(t,set,acc);
12331233
case((eq,vars)::t,_,_)
12341234
equation
12351235
newVars = List.filter1OnTrue(vars,removeVarsNotInSet_helper,set);
1236-
false = List.isNotEmpty(newVars);
1236+
false = intEq(listLength(newVars),0);
12371237
then removeVarsNotInSet(t,set,(eq,newVars)::acc);
12381238
end matchcontinue;
12391239
end removeVarsNotInSet;
@@ -1331,15 +1331,15 @@ algorithm
13311331
then ();
13321332
case(_,h::t,_)
13331333
equation
1334-
true=List.isEmpty(removeUnrelatedEquations(m,{h}));
1334+
true=intEq(listLength(removeUnrelatedEquations(m,{h})),0);
13351335
not_found_var=BackendVariable.getVarAt(variables,h);
13361336
str = ComponentReference.crefStr(BackendVariable.varCref(not_found_var));
13371337
print("Warning: The variable '"+&str+&"' was not found in the system of knowns\n");
13381338
checkSystemContainsVars(m,t,variables);
13391339
then ();
13401340
case(_,h::t,_)
13411341
equation
1342-
false=List.isEmpty(removeUnrelatedEquations(m,{h}));
1342+
false=intEq(listLength(removeUnrelatedEquations(m,{h})),0);
13431343
checkSystemContainsVars(m,t,variables);
13441344
then ();
13451345
end matchcontinue;
@@ -1583,7 +1583,7 @@ protected function containsAny
15831583
protected list<Integer> m3;
15841584
algorithm
15851585
m3:=List.intersectionOnTrue(m1,m2,intEq);
1586-
out:=List.isNotEmpty(m3);
1586+
out:=listLength(m3)>0;
15871587
end containsAny;
15881588

15891589
protected function containsAll

0 commit comments

Comments
 (0)