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 comparions like if(iters < max_iters) as +Infinity compares greate to
all integer values.
"Export solution vectors for iteration algorithms to iterations.html"},
268
268
// MODEL CHECKING OPTIONS:
@@ -1143,12 +1143,13 @@ else if (sw.equals("epsilon") || sw.equals("e")) {
1143
1143
elseif (sw.equals("maxiters")) {
1144
1144
if (i < args.length - 1) {
1145
1145
try {
1146
-
j = Integer.parseInt(args[++i]);
1147
-
if (j < 0)
1148
-
thrownewNumberFormatException("");
1149
-
set(PRISM_MAX_ITERS, j);
1146
+
doublemax = Double.parseDouble(args[++i]);
1147
+
if (! (max > 0 && max <= Integer.MAX_VALUE && (max == Math.floor(max) || Double.isInfinite(max)))) {
1148
+
thrownewNumberFormatException();
1149
+
}
1150
+
set(PRISM_MAX_ITERS, max);
1150
1151
} catch (NumberFormatExceptione) {
1151
-
thrownewPrismException("Invalid value for -" + sw + " switch");
1152
+
thrownewPrismException("Invalid value for -" + sw + " switch. Expected positive integer or 'Infinity'.");
1152
1153
}
1153
1154
} else {
1154
1155
thrownewPrismException("No value specified for -" + sw + " switch");
@@ -1793,7 +1794,7 @@ public static void printHelp(PrismLog mainLog)
1793
1794
mainLog.println("-relative (or -rel) ............ Use relative error for detecting convergence [default]");
1794
1795
mainLog.println("-absolute (or -abs) ............ Use absolute error for detecting convergence");
1795
1796
mainLog.println("-epsilon <x> (or -e <x>) ....... Set value of epsilon (for convergence check) [default: 1e-6]");
1796
-
mainLog.println("-maxiters <n> .................. Set max number of iterations [default: 10000]");
1797
+
mainLog.println("-maxiters <n> .................. Set max number of iterations to positive integer [default: 10000] or 'Infinity' for unbounded interations.");
0 commit comments