How can I override the AccuracyGoal parameter in NMinimize? Instead of the evaluation stopping at the required Accuracy, I want it to stop after a specific number of iterations, even if the AccuracyGoal is not reached. I tried the following example code, but it doesn't stop after 100 iterations.
NMaximize[{Norm[Array[c1, 10], Infinity]+Norm[Array[d1, 10], Infinity],
And @@ Table[-1 <= c1[i] <= 1, {i, 1,10}] && And @@ Table[-1 <= d1[i] <= 1, {i, 1, 10}]},
Flatten[{Array[c1, 10], Array[d1, 10]}],Method -> "SimulatedAnnealing",MaxIterations -> 100];
This question is similar to my query, but is yet to be answered.
Table[-1 <= d1[i] <= 1, {i, 1, d10}]
, changed10
to10
and your code runs.! $\endgroup$NMaximize[{Norm[Array[c1, 10], Infinity] + Norm[Array[d1, 10], Infinity], And @@ Table[-1 <= c1[i] <= 1, {i, 1, 10}] && And @@ Table[-1 <= d1[i] <= 1, {i, 1, 10}]}, Flatten[{Array[c1, 10], Array[d1, 10]}], Method -> "SimulatedAnnealing", MaxIterations -> 10]
performs a warning "NMaximize::cvmit: Failed to converge to the requested accuracy or precision within 10 iterations" and $\endgroup$