You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The switch -maxiters recognizes a new argument, 'Infinity' to indicate
that the number of iteration should not be bounded.
If a number is given, it has to be between zero and Integer.MAX_VALUE.
The implementation stores these values as doubles. This allows to stick
to comparisons like if(iters < max_iters) as +Infinity compares greater to
all integer values.
"Export solution vectors for iteration algorithms to iterations.html"},
271
271
// MODEL CHECKING OPTIONS:
@@ -1162,12 +1162,15 @@ else if (sw.equals("epsilon") || sw.equals("e")) {
1162
1162
elseif (sw.equals("maxiters")) {
1163
1163
if (i < args.length - 1) {
1164
1164
try {
1165
-
j = Integer.parseInt(args[++i]);
1166
-
if (j < 0)
1167
-
thrownewNumberFormatException("");
1168
-
set(PRISM_MAX_ITERS, j);
1165
+
doublemax = Double.parseDouble(args[++i]);
1166
+
System.out.println(max);
1167
+
System.out.println(Double.isInfinite(max));
1168
+
if (! (max > 0 && (max <= Integer.MAX_VALUE && max == Math.floor(max) || Double.isInfinite(max)))) {
1169
+
thrownewNumberFormatException();
1170
+
}
1171
+
set(PRISM_MAX_ITERS, max);
1169
1172
} catch (NumberFormatExceptione) {
1170
-
thrownewPrismException("Invalid value for -" + sw + " switch");
1173
+
thrownewPrismException("Invalid value for -" + sw + " switch. Expected positive integer or 'Infinity'.");
1171
1174
}
1172
1175
} else {
1173
1176
thrownewPrismException("No value specified for -" + sw + " switch");
@@ -1813,7 +1816,7 @@ public static void printHelp(PrismLog mainLog)
1813
1816
mainLog.println("-relative (or -rel) ............ Use relative error for detecting convergence [default]");
1814
1817
mainLog.println("-absolute (or -abs) ............ Use absolute error for detecting convergence");
1815
1818
mainLog.println("-epsilon <x> (or -e <x>) ....... Set value of epsilon (for convergence check) [default: 1e-6]");
1816
-
mainLog.println("-maxiters <n> .................. Set max number of iterations [default: 10000]");
1819
+
mainLog.println("-maxiters <n> .................. Set max number of iterations to positive integer [default: 10000] or 'Infinity' for unbounded interations.");
0 commit comments